bilibili-app-recommend

为B站首页添加像App一样的推荐

当前为 2022-07-12 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.3.7
// @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        https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png
// @match        *://www.bilibili.com/
// @require      https://unpkg.com/[email protected]/dist/jquery.min.js
// @require      https://unpkg.com/[email protected]/dist/axios.min.js
// @require      https://unpkg.com/[email protected]/dist/axiosGmxhrAdapter.min.js
// @require      https://unpkg.com/[email protected]/umd/react.production.min.js
// @require      https://unpkg.com/[email protected]/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
// ==/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_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 gh=Object.defineProperty,yh=Object.defineProperties;var bh=Object.getOwnPropertyDescriptors;var ut=Object.getOwnPropertySymbols;var gs=Object.prototype.hasOwnProperty,ys=Object.prototype.propertyIsEnumerable;var Sn=(v,H,U)=>H in v?gh(v,H,{enumerable:!0,configurable:!0,writable:!0,value:U}):v[H]=U,Se=(v,H)=>{for(var U in H||(H={}))gs.call(H,U)&&Sn(v,U,H[U]);if(ut)for(var U of ut(H))ys.call(H,U)&&Sn(v,U,H[U]);return v},Oe=(v,H)=>yh(v,bh(H));var bs=(v,H)=>{var U={};for(var Z in v)gs.call(v,Z)&&H.indexOf(Z)<0&&(U[Z]=v[Z]);if(v!=null&&ut)for(var Z of ut(v))H.indexOf(Z)<0&&ys.call(v,Z)&&(U[Z]=v[Z]);return U};var Tn=(v,H,U)=>(Sn(v,typeof H!="symbol"?H+"":H,U),U);(function(v,H,U,Z,_s){"use strict";function Ae(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var ft=Ae(v),Pe=Ae(H),ws=Ae(U),dt=Ae(Z),Ss=Ae(_s),Ts=typeof global=="object"&&global&&global.Object===Object&&global,xn=Ts,xs=typeof self=="object"&&self&&self.Object===Object&&self,Es=xn||xs||Function("return this")(),ee=Es,Cs=ee.Symbol,te=Cs,En=Object.prototype,Os=En.hasOwnProperty,As=En.toString,Re=te?te.toStringTag:void 0;function Ps(e){var t=Os.call(e,Re),n=e[Re];try{e[Re]=void 0;var r=!0}catch{}var i=As.call(e);return r&&(t?e[Re]=n:delete e[Re]),i}var Rs=Object.prototype,Ms=Rs.toString;function Ds(e){return Ms.call(e)}var Ls="[object Null]",Ns="[object Undefined]",Cn=te?te.toStringTag:void 0;function Te(e){return e==null?e===void 0?Ns:Ls:Cn&&Cn in Object(e)?Ps(e):Ds(e)}function xe(e){return e!=null&&typeof e=="object"}var ks="[object Symbol]";function He(e){return typeof e=="symbol"||xe(e)&&Te(e)==ks}function Fs(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var js=Array.isArray,se=js,Is=1/0,On=te?te.prototype:void 0,An=On?On.toString:void 0;function ht(e){if(typeof e=="string")return e;if(se(e))return Fs(e,ht)+"";if(He(e))return An?An.call(e):"";var t=e+"";return t=="0"&&1/e==-Is?"-0":t}var $s=/\s/;function zs(e){for(var t=e.length;t--&&$s.test(e.charAt(t)););return t}var Bs=/^\s+/;function Hs(e){return e&&e.slice(0,zs(e)+1).replace(Bs,"")}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Pn=0/0,Ws=/^[-+]0x[0-9a-f]+$/i,Us=/^0b[01]+$/i,Ys=/^0o[0-7]+$/i,Gs=parseInt;function pt(e){if(typeof e=="number")return e;if(He(e))return Pn;if(ce(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ce(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Hs(e);var n=Us.test(e);return n||Ys.test(e)?Gs(e.slice(2),n?2:8):Ws.test(e)?Pn:+e}var Rn=1/0,Ks=17976931348623157e292;function Vs(e){if(!e)return e===0?e:0;if(e=pt(e),e===Rn||e===-Rn){var t=e<0?-1:1;return t*Ks}return e===e?e:0}function Xs(e){var t=Vs(e),n=t%1;return t===t?n?t-n:t:0}function Js(e){return e}var Zs="[object AsyncFunction]",Qs="[object Function]",qs="[object GeneratorFunction]",ea="[object Proxy]";function Mn(e){if(!ce(e))return!1;var t=Te(e);return t==Qs||t==qs||t==Zs||t==ea}var ta=ee["__core-js_shared__"],vt=ta,Dn=function(){var e=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function na(e){return!!Dn&&Dn in e}var ra=Function.prototype,ia=ra.toString;function de(e){if(e!=null){try{return ia.call(e)}catch{}try{return e+""}catch{}}return""}var sa=/[\\^$.*+?()[\]{}|]/g,aa=/^\[object .+?Constructor\]$/,oa=Function.prototype,la=Object.prototype,ca=oa.toString,ua=la.hasOwnProperty,fa=RegExp("^"+ca.call(ua).replace(sa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function da(e){if(!ce(e)||na(e))return!1;var t=Mn(e)?fa:aa;return t.test(de(e))}function ha(e,t){return e==null?void 0:e[t]}function he(e,t){var n=ha(e,t);return da(n)?n:void 0}var pa=he(ee,"WeakMap"),mt=pa;function va(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var ma=800,ga=16,ya=Date.now;function ba(e){var t=0,n=0;return function(){var r=ya(),i=ga-(r-n);if(n=r,i>0){if(++t>=ma)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function _a(e){return function(){return e}}var wa=function(){try{var e=he(Object,"defineProperty");return e({},"",{}),e}catch{}}(),We=wa,Sa=We?function(e,t){return We(e,"toString",{configurable:!0,enumerable:!1,value:_a(t),writable:!0})}:Js,Ta=Sa,xa=ba(Ta),Ea=xa,Ca=9007199254740991,Oa=/^(?:0|[1-9]\d*)$/;function gt(e,t){var n=typeof e;return t=t==null?Ca:t,!!t&&(n=="number"||n!="symbol"&&Oa.test(e))&&e>-1&&e%1==0&&e<t}function Aa(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function yt(e,t){return e===t||e!==e&&t!==t}var Pa=Object.prototype,Ra=Pa.hasOwnProperty;function Ma(e,t,n){var r=e[t];(!(Ra.call(e,t)&&yt(r,n))||n===void 0&&!(t in e))&&Aa(e,t,n)}var Ln=Math.max;function Da(e,t,n){return t=Ln(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=Ln(r.length-t,0),a=Array(s);++i<s;)a[i]=r[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=r[i];return o[t]=n(a),va(e,this,o)}}var La=9007199254740991;function bt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=La}function Na(e){return e!=null&&bt(e.length)&&!Mn(e)}var ka=Object.prototype;function Fa(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ka;return e===n}function ja(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Ia="[object Arguments]";function Nn(e){return xe(e)&&Te(e)==Ia}var kn=Object.prototype,$a=kn.hasOwnProperty,za=kn.propertyIsEnumerable,Ba=Nn(function(){return arguments}())?Nn:function(e){return xe(e)&&$a.call(e,"callee")&&!za.call(e,"callee")},_t=Ba;function Ha(){return!1}var Fn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,jn=Fn&&typeof module=="object"&&module&&!module.nodeType&&module,Wa=jn&&jn.exports===Fn,In=Wa?ee.Buffer:void 0,Ua=In?In.isBuffer:void 0,Ya=Ua||Ha,wt=Ya,Ga="[object Arguments]",Ka="[object Array]",Va="[object Boolean]",Xa="[object Date]",Ja="[object Error]",Za="[object Function]",Qa="[object Map]",qa="[object Number]",eo="[object Object]",to="[object RegExp]",no="[object Set]",ro="[object String]",io="[object WeakMap]",so="[object ArrayBuffer]",ao="[object DataView]",oo="[object Float32Array]",lo="[object Float64Array]",co="[object Int8Array]",uo="[object Int16Array]",fo="[object Int32Array]",ho="[object Uint8Array]",po="[object Uint8ClampedArray]",vo="[object Uint16Array]",mo="[object Uint32Array]",F={};F[oo]=F[lo]=F[co]=F[uo]=F[fo]=F[ho]=F[po]=F[vo]=F[mo]=!0,F[Ga]=F[Ka]=F[so]=F[Va]=F[ao]=F[Xa]=F[Ja]=F[Za]=F[Qa]=F[qa]=F[eo]=F[to]=F[no]=F[ro]=F[io]=!1;function go(e){return xe(e)&&bt(e.length)&&!!F[Te(e)]}function yo(e){return function(t){return e(t)}}var $n=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Me=$n&&typeof module=="object"&&module&&!module.nodeType&&module,bo=Me&&Me.exports===$n,St=bo&&xn.process,_o=function(){try{var e=Me&&Me.require&&Me.require("util").types;return e||St&&St.binding&&St.binding("util")}catch{}}(),zn=_o,Bn=zn&&zn.isTypedArray,wo=Bn?yo(Bn):go,Hn=wo,So=Object.prototype,To=So.hasOwnProperty;function xo(e,t){var n=se(e),r=!n&&_t(e),i=!n&&!r&&wt(e),s=!n&&!r&&!i&&Hn(e),a=n||r||i||s,o=a?ja(e.length,String):[],c=o.length;for(var l in e)(t||To.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||s&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||gt(l,c)))&&o.push(l);return o}function Eo(e,t){return function(n){return e(t(n))}}var Co=Eo(Object.keys,Object),Oo=Co,Ao=Object.prototype,Po=Ao.hasOwnProperty;function Ro(e){if(!Fa(e))return Oo(e);var t=[];for(var n in Object(e))Po.call(e,n)&&n!="constructor"&&t.push(n);return t}function Mo(e){return Na(e)?xo(e):Ro(e)}var Do=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lo=/^\w*$/;function No(e,t){if(se(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||He(e)?!0:Lo.test(e)||!Do.test(e)||t!=null&&e in Object(t)}var ko=he(Object,"create"),De=ko;function Fo(){this.__data__=De?De(null):{},this.size=0}function jo(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Io="__lodash_hash_undefined__",$o=Object.prototype,zo=$o.hasOwnProperty;function Bo(e){var t=this.__data__;if(De){var n=t[e];return n===Io?void 0:n}return zo.call(t,e)?t[e]:void 0}var Ho=Object.prototype,Wo=Ho.hasOwnProperty;function Uo(e){var t=this.__data__;return De?t[e]!==void 0:Wo.call(t,e)}var Yo="__lodash_hash_undefined__";function Go(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=De&&t===void 0?Yo:t,this}function pe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}pe.prototype.clear=Fo,pe.prototype.delete=jo,pe.prototype.get=Bo,pe.prototype.has=Uo,pe.prototype.set=Go;function Ko(){this.__data__=[],this.size=0}function Ue(e,t){for(var n=e.length;n--;)if(yt(e[n][0],t))return n;return-1}var Vo=Array.prototype,Xo=Vo.splice;function Jo(e){var t=this.__data__,n=Ue(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Xo.call(t,n,1),--this.size,!0}function Zo(e){var t=this.__data__,n=Ue(t,e);return n<0?void 0:t[n][1]}function Qo(e){return Ue(this.__data__,e)>-1}function qo(e,t){var n=this.__data__,r=Ue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ae(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}ae.prototype.clear=Ko,ae.prototype.delete=Jo,ae.prototype.get=Zo,ae.prototype.has=Qo,ae.prototype.set=qo;var el=he(ee,"Map"),Le=el;function tl(){this.size=0,this.__data__={hash:new pe,map:new(Le||ae),string:new pe}}function nl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ye(e,t){var n=e.__data__;return nl(t)?n[typeof t=="string"?"string":"hash"]:n.map}function rl(e){var t=Ye(this,e).delete(e);return this.size-=t?1:0,t}function il(e){return Ye(this,e).get(e)}function sl(e){return Ye(this,e).has(e)}function al(e,t){var n=Ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function oe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}oe.prototype.clear=tl,oe.prototype.delete=rl,oe.prototype.get=il,oe.prototype.has=sl,oe.prototype.set=al;var ol="Expected a function";function Tt(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ol);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=e.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(Tt.Cache||oe),n}Tt.Cache=oe;var ll=500;function cl(e){var t=Tt(e,function(r){return n.size===ll&&n.clear(),r}),n=t.cache;return t}var ul=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fl=/\\(\\)?/g,dl=cl(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ul,function(n,r,i,s){t.push(i?s.replace(fl,"$1"):r||n)}),t}),hl=dl;function Wn(e){return e==null?"":ht(e)}function Ge(e,t){return se(e)?e:No(e,t)?[e]:hl(Wn(e))}var pl=1/0;function xt(e){if(typeof e=="string"||He(e))return e;var t=e+"";return t=="0"&&1/e==-pl?"-0":t}function vl(e,t){t=Ge(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[xt(t[n++])];return n&&n==r?e:void 0}function Un(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Yn=te?te.isConcatSpreadable:void 0;function ml(e){return se(e)||_t(e)||!!(Yn&&e&&e[Yn])}function Gn(e,t,n,r,i){var s=-1,a=e.length;for(n||(n=ml),i||(i=[]);++s<a;){var o=e[s];t>0&&n(o)?t>1?Gn(o,t-1,n,r,i):Un(i,o):r||(i[i.length]=o)}return i}function gl(e){var t=e==null?0:e.length;return t?Gn(e,1):[]}function yl(e){return Ea(Da(e,void 0,gl),e+"")}function bl(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<i;)s[r]=e[r+t];return s}function _l(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:bl(e,t,n)}var wl="\\ud800-\\udfff",Sl="\\u0300-\\u036f",Tl="\\ufe20-\\ufe2f",xl="\\u20d0-\\u20ff",El=Sl+Tl+xl,Cl="\\ufe0e\\ufe0f",Ol="\\u200d",Al=RegExp("["+Ol+wl+El+Cl+"]");function Et(e){return Al.test(e)}function Pl(e){return e.split("")}var Kn="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Ml="\\ufe20-\\ufe2f",Dl="\\u20d0-\\u20ff",Ll=Rl+Ml+Dl,Nl="\\ufe0e\\ufe0f",kl="["+Kn+"]",Ct="["+Ll+"]",Ot="\\ud83c[\\udffb-\\udfff]",Fl="(?:"+Ct+"|"+Ot+")",Vn="[^"+Kn+"]",Xn="(?:\\ud83c[\\udde6-\\uddff]){2}",Jn="[\\ud800-\\udbff][\\udc00-\\udfff]",jl="\\u200d",Zn=Fl+"?",Qn="["+Nl+"]?",Il="(?:"+jl+"(?:"+[Vn,Xn,Jn].join("|")+")"+Qn+Zn+")*",$l=Qn+Zn+Il,zl="(?:"+[Vn+Ct+"?",Ct,Xn,Jn,kl].join("|")+")",Bl=RegExp(Ot+"(?="+Ot+")|"+zl+$l,"g");function Hl(e){return e.match(Bl)||[]}function Wl(e){return Et(e)?Hl(e):Pl(e)}function Ul(){this.__data__=new ae,this.size=0}function Yl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gl(e){return this.__data__.get(e)}function Kl(e){return this.__data__.has(e)}var Vl=200;function Xl(e,t){var n=this.__data__;if(n instanceof ae){var r=n.__data__;if(!Le||r.length<Vl-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new oe(r)}return n.set(e,t),this.size=n.size,this}function ue(e){var t=this.__data__=new ae(e);this.size=t.size}ue.prototype.clear=Ul,ue.prototype.delete=Yl,ue.prototype.get=Gl,ue.prototype.has=Kl,ue.prototype.set=Xl;function Jl(e,t){for(var n=-1,r=e==null?0:e.length,i=0,s=[];++n<r;){var a=e[n];t(a,n,e)&&(s[i++]=a)}return s}function Zl(){return[]}var Ql=Object.prototype,ql=Ql.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,ec=qn?function(e){return e==null?[]:(e=Object(e),Jl(qn(e),function(t){return ql.call(e,t)}))}:Zl,tc=ec;function nc(e,t,n){var r=t(e);return se(e)?r:Un(r,n(e))}function er(e){return nc(e,Mo,tc)}var rc=he(ee,"DataView"),At=rc,ic=he(ee,"Promise"),Pt=ic,sc=he(ee,"Set"),Rt=sc,tr="[object Map]",ac="[object Object]",nr="[object Promise]",rr="[object Set]",ir="[object WeakMap]",sr="[object DataView]",oc=de(At),lc=de(Le),cc=de(Pt),uc=de(Rt),fc=de(mt),ve=Te;(At&&ve(new At(new ArrayBuffer(1)))!=sr||Le&&ve(new Le)!=tr||Pt&&ve(Pt.resolve())!=nr||Rt&&ve(new Rt)!=rr||mt&&ve(new mt)!=ir)&&(ve=function(e){var t=Te(e),n=t==ac?e.constructor:void 0,r=n?de(n):"";if(r)switch(r){case oc:return sr;case lc:return tr;case cc:return nr;case uc:return rr;case fc:return ir}return t});var ar=ve,dc=ee.Uint8Array,or=dc,hc="__lodash_hash_undefined__";function pc(e){return this.__data__.set(e,hc),this}function vc(e){return this.__data__.has(e)}function Ke(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new oe;++t<n;)this.add(e[t])}Ke.prototype.add=Ke.prototype.push=pc,Ke.prototype.has=vc;function mc(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function gc(e,t){return e.has(t)}var yc=1,bc=2;function lr(e,t,n,r,i,s){var a=n&yc,o=e.length,c=t.length;if(o!=c&&!(a&&c>o))return!1;var l=s.get(e),u=s.get(t);if(l&&u)return l==t&&u==e;var f=-1,d=!0,h=n&bc?new Ke:void 0;for(s.set(e,t),s.set(t,e);++f<o;){var p=e[f],g=t[f];if(r)var y=a?r(g,p,f,t,e,s):r(p,g,f,e,t,s);if(y!==void 0){if(y)continue;d=!1;break}if(h){if(!mc(t,function(b,P){if(!gc(h,P)&&(p===b||i(p,b,n,r,s)))return h.push(P)})){d=!1;break}}else if(!(p===g||i(p,g,n,r,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function _c(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function wc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Sc=1,Tc=2,xc="[object Boolean]",Ec="[object Date]",Cc="[object Error]",Oc="[object Map]",Ac="[object Number]",Pc="[object RegExp]",Rc="[object Set]",Mc="[object String]",Dc="[object Symbol]",Lc="[object ArrayBuffer]",Nc="[object DataView]",cr=te?te.prototype:void 0,Mt=cr?cr.valueOf:void 0;function kc(e,t,n,r,i,s,a){switch(n){case Nc:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Lc:return!(e.byteLength!=t.byteLength||!s(new or(e),new or(t)));case xc:case Ec:case Ac:return yt(+e,+t);case Cc:return e.name==t.name&&e.message==t.message;case Pc:case Mc:return e==t+"";case Oc:var o=_c;case Rc:var c=r&Sc;if(o||(o=wc),e.size!=t.size&&!c)return!1;var l=a.get(e);if(l)return l==t;r|=Tc,a.set(e,t);var u=lr(o(e),o(t),r,i,s,a);return a.delete(e),u;case Dc:if(Mt)return Mt.call(e)==Mt.call(t)}return!1}var Fc=1,jc=Object.prototype,Ic=jc.hasOwnProperty;function $c(e,t,n,r,i,s){var a=n&Fc,o=er(e),c=o.length,l=er(t),u=l.length;if(c!=u&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in t:Ic.call(t,d)))return!1}var h=s.get(e),p=s.get(t);if(h&&p)return h==t&&p==e;var g=!0;s.set(e,t),s.set(t,e);for(var y=a;++f<c;){d=o[f];var b=e[d],P=t[d];if(r)var D=a?r(P,b,d,t,e,s):r(b,P,d,e,t,s);if(!(D===void 0?b===P||i(b,P,n,r,s):D)){g=!1;break}y||(y=d=="constructor")}if(g&&!y){var T=e.constructor,x=t.constructor;T!=x&&"constructor"in e&&"constructor"in t&&!(typeof T=="function"&&T instanceof T&&typeof x=="function"&&x instanceof x)&&(g=!1)}return s.delete(e),s.delete(t),g}var zc=1,ur="[object Arguments]",fr="[object Array]",Ve="[object Object]",Bc=Object.prototype,dr=Bc.hasOwnProperty;function Hc(e,t,n,r,i,s){var a=se(e),o=se(t),c=a?fr:ar(e),l=o?fr:ar(t);c=c==ur?Ve:c,l=l==ur?Ve:l;var u=c==Ve,f=l==Ve,d=c==l;if(d&&wt(e)){if(!wt(t))return!1;a=!0,u=!1}if(d&&!u)return s||(s=new ue),a||Hn(e)?lr(e,t,n,r,i,s):kc(e,t,c,n,r,i,s);if(!(n&zc)){var h=u&&dr.call(e,"__wrapped__"),p=f&&dr.call(t,"__wrapped__");if(h||p){var g=h?e.value():e,y=p?t.value():t;return s||(s=new ue),i(g,y,n,r,s)}}return d?(s||(s=new ue),$c(e,t,n,r,i,s)):!1}function hr(e,t,n,r,i){return e===t?!0:e==null||t==null||!xe(e)&&!xe(t)?e!==e&&t!==t:Hc(e,t,n,r,hr,i)}function Wc(e,t){return e!=null&&t in Object(e)}function Uc(e,t,n){t=Ge(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var a=xt(t[r]);if(!(s=e!=null&&n(e,a)))break;e=e[a]}return s||++r!=i?s:(i=e==null?0:e.length,!!i&&bt(i)&&gt(a,i)&&(se(e)||_t(e)))}function Yc(e,t){return e!=null&&Uc(e,t,Wc)}function Gc(e){return function(t){return t==null?void 0:t[e]}}var Kc=function(){return ee.Date.now()},Dt=Kc,Vc="Expected a function",Xc=Math.max,Jc=Math.min;function pr(e,t,n){var r,i,s,a,o,c,l=0,u=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Vc);t=pt(t)||0,ce(n)&&(u=!!n.leading,f="maxWait"in n,s=f?Xc(pt(n.maxWait)||0,t):s,d="trailing"in n?!!n.trailing:d);function h(C){var j=r,z=i;return r=i=void 0,l=C,a=e.apply(z,j),a}function p(C){return l=C,o=setTimeout(b,t),u?h(C):a}function g(C){var j=C-c,z=C-l,k=t-j;return f?Jc(k,s-z):k}function y(C){var j=C-c,z=C-l;return c===void 0||j>=t||j<0||f&&z>=s}function b(){var C=Dt();if(y(C))return P(C);o=setTimeout(b,g(C))}function P(C){return o=void 0,d&&r?h(C):(r=i=void 0,a)}function D(){o!==void 0&&clearTimeout(o),l=0,r=c=i=o=void 0}function T(){return o===void 0?a:P(Dt())}function x(){var C=Dt(),j=y(C);if(r=arguments,i=this,c=C,j){if(o===void 0)return p(c);if(f)return clearTimeout(o),o=setTimeout(b,t),h(c)}return o===void 0&&(o=setTimeout(b,t)),a}return x.cancel=D,x.flush=T,x}function Zc(e,t){return hr(e,t)}function Qc(e,t,n,r){if(!ce(e))return e;t=Ge(t,e);for(var i=-1,s=t.length,a=s-1,o=e;o!=null&&++i<s;){var c=xt(t[i]),l=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=a){var u=o[c];l=r?r(u,c,o):void 0,l===void 0&&(l=ce(u)?u:gt(t[i+1])?[]:{})}Ma(o,c,l),o=o[c]}return e}function qc(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var a=t[r],o=vl(e,a);n(o,a)&&Qc(s,Ge(a,e),o)}return s}var eu=9007199254740991,tu=Math.floor;function vr(e,t){var n="";if(!e||t<1||t>eu)return n;do t%2&&(n+=e),t=tu(t/2),t&&(e+=e);while(t);return n}var nu=Gc("length"),ru=nu,mr="\\ud800-\\udfff",iu="\\u0300-\\u036f",su="\\ufe20-\\ufe2f",au="\\u20d0-\\u20ff",ou=iu+su+au,lu="\\ufe0e\\ufe0f",cu="["+mr+"]",Lt="["+ou+"]",Nt="\\ud83c[\\udffb-\\udfff]",uu="(?:"+Lt+"|"+Nt+")",gr="[^"+mr+"]",yr="(?:\\ud83c[\\udde6-\\uddff]){2}",br="[\\ud800-\\udbff][\\udc00-\\udfff]",fu="\\u200d",_r=uu+"?",wr="["+lu+"]?",du="(?:"+fu+"(?:"+[gr,yr,br].join("|")+")"+wr+_r+")*",hu=wr+_r+du,pu="(?:"+[gr+Lt+"?",Lt,yr,br,cu].join("|")+")",Sr=RegExp(Nt+"(?="+Nt+")|"+pu+hu,"g");function vu(e){for(var t=Sr.lastIndex=0;Sr.test(e);)++t;return t}function Tr(e){return Et(e)?vu(e):ru(e)}var mu=Math.ceil;function gu(e,t){t=t===void 0?" ":ht(t);var n=t.length;if(n<2)return n?vr(t,e):t;var r=vr(t,mu(e/Tr(t)));return Et(t)?_l(Wl(r),0,e).join(""):r.slice(0,e)}function yu(e,t,n){e=Wn(e),t=Xs(t);var r=t?Tr(e):0;return t&&r<t?gu(t-r,n)+e:e}function bu(e,t){return qc(e,t,function(n,r){return Yc(e,r)})}var _u=yl(function(e,t){return e==null?{}:bu(e,t)}),xr=_u,wu="Expected a function";function Su(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(wu);return ce(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),pr(e,t,{leading:r,maxWait:t,trailing:i})}const kt=Symbol(),Tu=Symbol(),Ft=Symbol(),jt=Object.getPrototypeOf,It=new WeakMap,Er=e=>e&&(It.has(e)?It.get(e):jt(e)===Object.prototype||jt(e)===Array.prototype),$t=e=>typeof e=="object"&&e!==null,xu=(e,t)=>{let n=!1;const r=(s,a,o)=>{if(!n){let c=s.a.get(e);c||(c=new Set,s.a.set(e,c)),o&&c.has(kt)||c.add(a)}},i={f:t,get(s,a){return a===Ft?e:(r(this,a),Cr(s[a],this.a,this.c))},has(s,a){return a===Tu?(n=!0,this.a.delete(e),!0):(r(this,a),a in s)},getOwnPropertyDescriptor(s,a){return r(this,a,!0),Object.getOwnPropertyDescriptor(s,a)},ownKeys(s){return r(this,kt),Reflect.ownKeys(s)}};return t&&(i.set=i.deleteProperty=()=>!1),i},Cr=(e,t,n)=>{if(!Er(e))return e;const r=e[Ft]||e,i=(a=>Object.isFrozen(a)||Object.values(Object.getOwnPropertyDescriptors(a)).some(o=>!o.writable))(r);let s=n&&n.get(r);return s&&s.f===i||(s=xu(r,i),s.p=new Proxy(i?(a=>{if(Array.isArray(a))return Array.from(a);const o=Object.getOwnPropertyDescriptors(a);return Object.values(o).forEach(c=>{c.configurable=!0}),Object.create(jt(a),o)})(r):r,s),n&&n.set(r,s)),s.a=t,s.c=n,s.p},Eu=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((i,s)=>i!==r[s])},Or=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!$t(e)||!$t(t))return!0;const i=n.get(e);if(!i)return!0;if(r){const a=r.get(e);if(a&&a.n===t)return a.g;r.set(e,{n:t,g:!1})}let s=null;for(const a of i){const o=a===kt?Eu(e,t):Or(e[a],t[a],n,r);if(o!==!0&&o!==!1||(s=o),s)break}return s===null&&(s=!0),r&&r.set(e,{n:t,g:s}),s},Cu=e=>Er(e)&&e[Ft]||null,Ar=(e,t)=>{It.set(e,t)},Ou=(e,t)=>{const n=[],r=new WeakSet,i=(s,a)=>{if(r.has(s))return;$t(s)&&r.add(s);const o=t.get(s);o?o.forEach(c=>{i(s[c],a?[...a,c]:[c])}):a&&n.push(a)};return i(e),n};var Au=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Pr={exports:{}},Rr={};/**
 * @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 Ee=ft.default;function Pu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ru=typeof Object.is=="function"?Object.is:Pu,Mu=Ee.useState,Du=Ee.useEffect,Lu=Ee.useLayoutEffect,Nu=Ee.useDebugValue;function ku(e,t){var n=t(),r=Mu({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Lu(function(){i.value=n,i.getSnapshot=t,zt(i)&&s({inst:i})},[e,n,t]),Du(function(){return zt(i)&&s({inst:i}),e(function(){zt(i)&&s({inst:i})})},[e]),Nu(n),n}function zt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ru(e,n)}catch{return!0}}function Fu(e,t){return t()}var ju=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Fu:ku;Rr.useSyncExternalStore=Ee.useSyncExternalStore!==void 0?Ee.useSyncExternalStore:ju,Pr.exports=Rr;var Iu=Pr.exports;const $u=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),ne=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),Xe=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),zu=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Ne=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),Mr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),Dr=new WeakSet,Bt=e=>typeof e=="object"&&e!==null,Bu=e=>Bt(e)&&!Dr.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),Lr=new WeakMap;let Nr=1;const kr=new WeakMap;function Je(e={}){if(!Bt(e))throw new Error("object required");const t=Lr.get(e);if(t)return t;let n=Nr;const r=new Set,i=(d,h=++Nr)=>{n!==h&&(n=h,r.forEach(p=>p(d,h)))},s=new Map,a=d=>{let h=s.get(d);return h||(h=(p,g)=>{const y=[...p];y[1]=[d,...y[1]],i(y,g)},s.set(d,h)),h},o=d=>{const h=s.get(d);return s.delete(d),h},c=(d,h)=>{const p=kr.get(h);if((p==null?void 0:p[0])===n)return p[1];const g=Array.isArray(d)?[]:Object.create(Object.getPrototypeOf(d));return Ar(g,!0),kr.set(h,[n,g]),Reflect.ownKeys(d).forEach(y=>{const b=Reflect.get(d,y,h);if(Dr.has(b))Ar(b,!1),g[y]=b;else if(b instanceof Promise)if(Ne in b)g[y]=b[Ne];else{const P=b[Mr]||b;Object.defineProperty(g,y,{get(){if(Ne in b)return b[Ne];throw P}})}else b!=null&&b[ne]?g[y]=b[Xe]:g[y]=b}),Object.freeze(g),g},l=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e)),u={get(d,h,p){return h===$u?n:h===ne?r:h===Xe?c(d,p):h===zu?u:Reflect.get(d,h,p)},deleteProperty(d,h){const p=Reflect.get(d,h),g=p==null?void 0:p[ne];g&&g.delete(o(h));const y=Reflect.deleteProperty(d,h);return y&&i(["delete",[h],p]),y},is:Object.is,canProxy:Bu,set(d,h,p,g){var y;const b=Reflect.has(d,h),P=Reflect.get(d,h,g);if(b&&this.is(P,p))return!0;const D=P==null?void 0:P[ne];D&&D.delete(o(h)),Bt(p)&&(p=Cu(p)||p);let T;return(y=Object.getOwnPropertyDescriptor(d,h))!=null&&y.set?T=p:p instanceof Promise?T=p.then(x=>(T[Ne]=x,i(["resolve",[h],x]),x)).catch(x=>{T[Mr]=x,i(["reject",[h],x])}):p!=null&&p[ne]?(T=p,T[ne].add(a(h))):this.canProxy(p)?(T=Je(p),T[ne].add(a(h))):T=p,Reflect.set(d,h,T,g),i(["set",[h],p,P]),!0}},f=new Proxy(l,u);return Lr.set(e,f),Reflect.ownKeys(e).forEach(d=>{const h=Object.getOwnPropertyDescriptor(e,d);h.get||h.set?Object.defineProperty(l,d,h):f[d]=e[d]}),f}function Fr(e,t,n){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[ne])&&console.warn("Please use proxy object");let r;const i=[],s=a=>{if(i.push(a),n){t(i.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,t(i.splice(0))}))};return e[ne].add(s),()=>{e[ne].delete(s)}}function jr(e){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[Xe])&&console.warn("Please use proxy object"),e[Xe]}const{useSyncExternalStore:Hu}=Iu,Wu=(e,t)=>{const n=v.useRef();v.useEffect(()=>{n.current=Ou(e,t)}),v.useDebugValue(n.current)};function Ht(e,t){const n=t==null?void 0:t.sync,r=v.useRef(),i=v.useRef();let s=!0;const a=Hu(v.useCallback(l=>{const u=Fr(e,l,n);return l(),u},[e,n]),()=>{const l=jr(e);try{if(!s&&r.current&&i.current&&!Or(r.current,l,i.current,new WeakMap))return r.current}catch{}return l},()=>jr(e));s=!1;const o=new WeakMap;v.useEffect(()=>{r.current=a,i.current=o}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Wu(a,o);const c=v.useMemo(()=>new WeakMap,[]);return Cr(a,o,c)}const Ir={accessKey:"",useNarrowMode:!1,initialShowMore:!1},$r=Object.keys(Ir),re=Je(Ir),Wt=function(){return Ht(re)},zr="bilibili-app-recommend.config";function Uu(){const e=GM_getValue(zr);e&&typeof e=="object"&&Object.assign(re,xr(e,$r)),Fr(re,()=>{Yu()})}function Yu(){GM_setValue(zr,xr(re,$r))}function Br(e){Object.assign(re,e)}Uu();var Ut={exports:{}};const Gu=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Hr=()=>{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(Hr());let a,o,c;const l=e||clearTimeout,u=()=>{l(a),c(Hr())},f=()=>{s&&s.removeEventListener("abort",u)},d=new Promise((h,p)=>{o=()=>{f(),n?h(i):p(i)},c=p,a=(t||setTimeout)(o,r)});return s&&s.addEventListener("abort",u,{once:!0}),d.clear=()=>{l(a),a=null,o()},d},Ur=e=>{const t=Wr(Oe(Se({},e),{willResolve:!0}));return t.reject=Wr(Oe(Se({},e),{willResolve:!1})),t.range=(n,r,i)=>t(Gu(n,r),i),t},Yt=Ur();Yt.createWithTimers=Ur,Ut.exports=Yt,Ut.exports.default=Yt;var Yr=Ut.exports,Gt,Ku=ws.default;Gt=Ku.createRoot;var Vu=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)}},Kt=function(t){return typeof t=="function"},Xu=function(t){return typeof t=="string"},Gr=function(t){return typeof t=="number"};function W(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;i<arguments.length;i++)r[i]=arguments[i];return t.current.apply(this,r)}),n.current}var Vt=Vu(v.useEffect),Ju=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Kr=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ju(arguments[t]));return e},Vr=function(t,n){var r=n.manual,i=n.ready,s=i===void 0?!0:i,a=n.defaultParams,o=a===void 0?[]:a,c=n.refreshDeps,l=c===void 0?[]:c,u=n.refreshDepsAction,f=v.useRef(!1);return f.current=!1,Vt(function(){!r&&s&&(f.current=!0,t.run.apply(t,Kr(o)))},[s]),Vt(function(){f.current||r||(f.current=!0,u?u():t.refresh())},Kr(l)),{onBefore:function(){if(!s)return{stopNow:!0}}}};Vr.onInit=function(e){var t=e.ready,n=t===void 0?!0:t,r=e.manual;return{loading:!r&&n}};var Zu=Vr;function Xt(e,t){if(e===t)return!0;for(var n=0;n<e.length;n++)if(!Object.is(e[n],t[n]))return!1;return!0}function Xr(e,t){var n=v.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!Xt(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj}function ke(e){var t=v.useRef(e);return t.current=e,t}var Qu=function(t){var n=ke(t);v.useEffect(function(){return function(){n.current()}},[])},Fe=Qu,Ze=globalThis&&globalThis.__assign||function(){return Ze=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ze.apply(this,arguments)},Qe=new Map,qu=function(t,n,r){var i=Qe.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;n>-1&&(s=setTimeout(function(){Qe.delete(t)},n)),Qe.set(t,Ze(Ze({},r),{timer:s}))},ef=function(t){return Qe.get(t)},qe=new Map,tf=function(t){return qe.get(t)},nf=function(t,n){qe.set(t,n),n.then(function(r){return qe.delete(t),r}).catch(function(){qe.delete(t)})},me={},rf=function(t,n){me[t]&&me[t].forEach(function(r){return r(n)})},Jt=function(t,n){return me[t]||(me[t]=[]),me[t].push(n),function(){var i=me[t].indexOf(n);me[t].splice(i,1)}},sf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},af=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(sf(arguments[t]));return e},of=function(t,n){var r=n.cacheKey,i=n.cacheTime,s=i===void 0?5*60*1e3:i,a=n.staleTime,o=a===void 0?0:a,c=n.setCache,l=n.getCache,u=v.useRef(),f=v.useRef(),d=function(g,y){c?c(y):qu(g,s,y),rf(g,y.data)},h=function(g,y){return y===void 0&&(y=[]),l?l(y):ef(g)};return Xr(function(){if(!!r){var p=h(r);p&&Object.hasOwnProperty.call(p,"data")&&(t.state.data=p.data,t.state.params=p.params,(o===-1||new Date().getTime()-p.time<=o)&&(t.state.loading=!1)),u.current=Jt(r,function(g){t.setState({data:g})})}},[]),Fe(function(){var p;(p=u.current)===null||p===void 0||p.call(u)}),r?{onBefore:function(g){var y=h(r,g);return!y||!Object.hasOwnProperty.call(y,"data")?{}:o===-1||new Date().getTime()-y.time<=o?{loading:!1,data:y==null?void 0:y.data,returnNow:!0}:{data:y==null?void 0:y.data}},onRequest:function(g,y){var b=tf(r);return b&&b!==f.current?{servicePromise:b}:(b=g.apply(void 0,af(y)),f.current=b,nf(r,b),{servicePromise:b})},onSuccess:function(g,y){var b;r&&((b=u.current)===null||b===void 0||b.call(u),d(r,{data:g,params:y,time:new Date().getTime()}),u.current=Jt(r,function(P){t.setState({data:P})}))},onMutate:function(g){var y;r&&((y=u.current)===null||y===void 0||y.call(u),d(r,{data:g,params:t.state.params,time:new Date().getTime()}),u.current=Jt(r,function(b){t.setState({data:b})}))}}:{}},lf=of,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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},uf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(cf(arguments[t]));return e},ff=function(t,n){var r=n.debounceWait,i=n.debounceLeading,s=n.debounceTrailing,a=n.debounceMaxWait,o=v.useRef(),c=v.useMemo(function(){var l={};return i!==void 0&&(l.leading=i),s!==void 0&&(l.trailing=s),a!==void 0&&(l.maxWait=a),l},[i,s,a]);return v.useEffect(function(){if(r){var l=t.runAsync.bind(t);return o.current=pr(function(u){u()},r,c),t.runAsync=function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];return new Promise(function(d,h){var p;(p=o.current)===null||p===void 0||p.call(o,function(){l.apply(void 0,uf(u)).then(d).catch(h)})})},function(){var u;(u=o.current)===null||u===void 0||u.cancel(),t.runAsync=l}}},[r,c]),r?{onCancel:function(){var u;(u=o.current)===null||u===void 0||u.cancel()}}:{}},df=ff,hf=function(t,n){var r=n.loadingDelay,i=v.useRef();if(!r)return{};var s=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return s(),i.current=setTimeout(function(){t.setState({loading:!0})},r),{loading:!1}},onFinally:function(){s()},onCancel:function(){s()}}},pf=hf;function et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function Zt(){return et()?document.visibilityState!=="hidden":!0}var je=[];function vf(e){return je.push(e),function(){var n=je.indexOf(e);je.splice(n,1)}}if(et()){var mf=function(){if(!!Zt())for(var t=0;t<je.length;t++){var n=je[t];n()}};window.addEventListener("visibilitychange",mf,!1)}var gf=function(t,n){var r=n.pollingInterval,i=n.pollingWhenHidden,s=i===void 0?!0:i,a=v.useRef(),o=v.useRef(),c=function(){var u;a.current&&clearTimeout(a.current),(u=o.current)===null||u===void 0||u.call(o)};return Vt(function(){r||c()},[r]),r?{onBefore:function(){c()},onFinally:function(){if(!s&&!Zt()){o.current=vf(function(){t.refresh()});return}a.current=setTimeout(function(){t.refresh()},r)},onCancel:function(){c()}}:{}},yf=gf,bf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},_f=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(bf(arguments[t]));return e};function wf(e,t){var n=!1;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];n||(n=!0,e.apply(void 0,_f(r)),setTimeout(function(){n=!1},t))}}function Sf(){return et()&&typeof navigator.onLine!="undefined"?navigator.onLine:!0}var Ie=[];function Tf(e){return Ie.push(e),function(){var n=Ie.indexOf(e);Ie.splice(n,1)}}if(et()){var Jr=function(){if(!(!Zt()||!Sf()))for(var t=0;t<Ie.length;t++){var n=Ie[t];n()}};window.addEventListener("visibilitychange",Jr,!1),window.addEventListener("focus",Jr,!1)}var xf=function(t,n){var r=n.refreshOnWindowFocus,i=n.focusTimespan,s=i===void 0?5e3:i,a=v.useRef(),o=function(){var l;(l=a.current)===null||l===void 0||l.call(a)};return v.useEffect(function(){if(r){var c=wf(t.refresh.bind(t),s);a.current=Tf(function(){c()})}return function(){o()}},[r,s]),Fe(function(){o()}),{}},Ef=xf,Cf=function(t,n){var r=n.retryInterval,i=n.retryCount,s=v.useRef(),a=v.useRef(0),o=v.useRef(!1);return i?{onBefore:function(){o.current||(a.current=0),o.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){a.current=0},onError:function(){if(a.current+=1,i===-1||a.current<=i){var l=r!=null?r:Math.min(1e3*Math.pow(2,a.current),3e4);s.current=setTimeout(function(){o.current=!0,t.refresh()},l)}else a.current=0},onCancel:function(){a.current=0,s.current&&clearTimeout(s.current)}}:{}},Of=Cf,Af=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Pf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Af(arguments[t]));return e},Rf=function(t,n){var r=n.throttleWait,i=n.throttleLeading,s=n.throttleTrailing,a=v.useRef(),o={};return i!==void 0&&(o.leading=i),s!==void 0&&(o.trailing=s),v.useEffect(function(){if(r){var c=t.runAsync.bind(t);return a.current=Su(function(l){l()},r,o),t.runAsync=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return new Promise(function(f,d){var h;(h=a.current)===null||h===void 0||h.call(a,function(){c.apply(void 0,Pf(l)).then(f).catch(d)})})},function(){var l;t.runAsync=c,(l=a.current)===null||l===void 0||l.cancel()}}},[r,i,s]),r?{onCancel:function(){var l;(l=a.current)===null||l===void 0||l.cancel()}}:{}},Mf=Rf,Df=function(t){v.useEffect(function(){t==null||t()},[])},Lf=Df,Nf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},kf=function(){var t=Nf(v.useState({}),2),n=t[1];return v.useCallback(function(){return n({})},[])},Ff=kf,fe=globalThis&&globalThis.__assign||function(){return fe=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},fe.apply(this,arguments)},jf=globalThis&&globalThis.__awaiter||function(e,t,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(u){try{l(r.next(u))}catch(f){a(f)}}function c(u){try{l(r.throw(u))}catch(f){a(f)}}function l(u){u.done?s(u.value):i(u.value).then(o,c)}l((r=r.apply(e,t||[])).next())})},If=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(u){return c([l,u])}}function c(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){n.label=l[1];break}if(l[0]===6&&n.label<s[1]){n.label=s[1],s=l;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(l);break}s[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(u){l=[6,u],i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},$f=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},zf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Ce=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(zf(arguments[t]));return e},Bf=function(){function e(t,n,r,i){i===void 0&&(i={}),this.serviceRef=t,this.options=n,this.subscribe=r,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=fe(fe(fe({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=fe(fe({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=this.pluginImpls.map(function(s){var a;return(a=s[t])===null||a===void 0?void 0:a.call.apply(a,Ce([s],n))}).filter(Boolean);return Object.assign.apply(Object,Ce([{}],i))},e.prototype.runAsync=function(){for(var t,n,r,i,s,a,o,c,l,u,f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];return jf(this,void 0,void 0,function(){var h,p,g,y,b,P,D,T,x,C,j;return If(this,function(z){switch(z.label){case 0:if(this.count+=1,h=this.count,p=this.runPluginHandler("onBefore",f),g=p.stopNow,y=g===void 0?!1:g,b=p.returnNow,P=b===void 0?!1:b,D=$f(p,["stopNow","returnNow"]),y)return[2,new Promise(function(){})];if(this.setState(fe({loading:!0,params:f},D)),P)return[2,Promise.resolve(D.data)];(n=(t=this.options).onBefore)===null||n===void 0||n.call(t,f),z.label=1;case 1:return z.trys.push([1,3,,4]),T=this.runPluginHandler("onRequest",this.serviceRef.current,f).servicePromise,T||(T=(j=this.serviceRef).current.apply(j,Ce(f))),[4,T];case 2:return x=z.sent(),h!==this.count?[2,new Promise(function(){})]:(this.setState({data:x,error:void 0,loading:!1}),(i=(r=this.options).onSuccess)===null||i===void 0||i.call(r,x,f),this.runPluginHandler("onSuccess",x,f),(a=(s=this.options).onFinally)===null||a===void 0||a.call(s,f,x,void 0),h===this.count&&this.runPluginHandler("onFinally",f,x,void 0),[2,x]);case 3:if(C=z.sent(),h!==this.count)return[2,new Promise(function(){})];throw this.setState({error:C,loading:!1}),(c=(o=this.options).onError)===null||c===void 0||c.call(o,C,f),this.runPluginHandler("onError",C,f),(u=(l=this.options).onFinally)===null||u===void 0||u.call(l,f,void 0,C),h===this.count&&this.runPluginHandler("onFinally",f,void 0,C),C;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,Ce(n)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,Ce(this.state.params||[]))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Ce(this.state.params||[]))},e.prototype.mutate=function(t){var n;Kt(t)?n=t(this.state.data):n=t,this.runPluginHandler("onMutate",n),this.setState({data:n})},e}(),Hf=Bf,Qt=globalThis&&globalThis.__assign||function(){return Qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qt.apply(this,arguments)},Wf=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},Uf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Zr=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Uf(arguments[t]));return e};function Yf(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,i=r===void 0?!1:r,s=Wf(t,["manual"]),a=Qt({manual:i},s),o=ke(e),c=Ff(),l=Xr(function(){var u=n.map(function(f){var d;return(d=f==null?void 0:f.onInit)===null||d===void 0?void 0:d.call(f,a)}).filter(Boolean);return new Hf(o,a,c,Object.assign.apply(Object,Zr([{}],u)))},[]);return l.options=a,l.pluginImpls=n.map(function(u){return u(l,a)}),Lf(function(){if(!i){var u=l.state.params||t.defaultParams||[];l.run.apply(l,Zr(u))}}),Fe(function(){l.cancel()}),{loading:l.state.loading,data:l.state.data,error:l.state.error,params:l.state.params||[],cancel:W(l.cancel.bind(l)),refresh:W(l.refresh.bind(l)),refreshAsync:W(l.refreshAsync.bind(l)),run:W(l.run.bind(l)),runAsync:W(l.runAsync.bind(l)),mutate:W(l.mutate.bind(l))}}var Gf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},Kf=globalThis&&globalThis.__spread||function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Gf(arguments[t]));return e};function Qr(e,t,n){return Yf(e,t,Kf(n||[],[df,pf,yf,Ef,Mf,Zu,lf,Of]))}var Vf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function qr(e,t){e===void 0&&(e=!1);var n=Vf(v.useState(e),2),r=n[0],i=n[1],s=v.useMemo(function(){var a=t===void 0?!e:t,o=function(){return i(function(d){return d===e?a:e})},c=function(d){return i(d)},l=function(){return i(e)},u=function(){return i(a)};return{toggle:o,set:c,setLeft:l,setRight:u}},[]);return[r,s]}var Xf=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function Jf(e){e===void 0&&(e=!1);var t=Xf(qr(e),2),n=t[0],r=t[1],i=r.toggle,s=r.set,a=v.useMemo(function(){var o=function(){return s(!0)},c=function(){return s(!1)};return{toggle:i,set:function(u){return s(!!u)},setTrue:o,setFalse:c}},[]);return[n,a]}var Zf=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Qf=Zf;function tt(e,t){if(!!Qf){if(!e)return t;var n;return Kt(e)?n=e():"current"in e?n=e.current:n=e,n}}var qf=function(t){var n=function(i,s,a){var o=v.useRef(!1),c=v.useRef([]),l=v.useRef([]),u=v.useRef();t(function(){var f,d=Array.isArray(a)?a:[a],h=d.map(function(p){return tt(p)});if(!o.current){o.current=!0,c.current=h,l.current=s,u.current=i();return}(h.length!==c.current.length||!Xt(h,c.current)||!Xt(s,l.current))&&((f=u.current)===null||f===void 0||f.call(u),c.current=h,l.current=s,u.current=i())}),Fe(function(){var f;(f=u.current)===null||f===void 0||f.call(u),o.current=!1})};return n},ed=qf,td=ed(v.useEffect),ei=td,ti={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Au,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",a="second",o="minute",c="hour",l="day",u="week",f="month",d="quarter",h="year",p="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,P={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(E,S,_){var O=String(E);return!O||O.length>=S?E:""+Array(S+1-O.length).join(_)+E},T={s:D,z:function(E){var S=-E.utcOffset(),_=Math.abs(S),O=Math.floor(_/60),w=_%60;return(S<=0?"+":"-")+D(O,2,"0")+":"+D(w,2,"0")},m:function E(S,_){if(S.date()<_.date())return-E(_,S);var O=12*(_.year()-S.year())+(_.month()-S.month()),w=S.clone().add(O,f),A=_-w<0,R=S.clone().add(O+(A?-1:1),f);return+(-(O+(_-w)/(A?w-R:R-w))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:f,y:h,w:u,d:l,D:p,h:c,m:o,s:a,ms:s,Q:d}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},x="en",C={};C[x]=P;var j=function(E){return E instanceof K},z=function E(S,_,O){var w;if(!S)return x;if(typeof S=="string"){var A=S.toLowerCase();C[A]&&(w=A),_&&(C[A]=_,w=A);var R=S.split("-");if(!w&&R.length>1)return E(R[0])}else{var N=S.name;C[N]=S,w=N}return!O&&w&&(x=w),w||!O&&x},k=function(E,S){if(j(E))return E.clone();var _=typeof S=="object"?S:{};return _.date=E,_.args=arguments,new K(_)},L=T;L.l=z,L.i=j,L.w=function(E,S){return k(E,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var K=function(){function E(_){this.$L=z(_.locale,null,!0),this.parse(_)}var S=E.prototype;return S.parse=function(_){this.$d=function(O){var w=O.date,A=O.utc;if(w===null)return new Date(NaN);if(L.u(w))return new Date;if(w instanceof Date)return new Date(w);if(typeof w=="string"&&!/Z$/i.test(w)){var R=w.match(y);if(R){var N=R[2]-1||0,B=(R[7]||"0").substring(0,3);return A?new Date(Date.UTC(R[1],N,R[3]||1,R[4]||0,R[5]||0,R[6]||0,B)):new Date(R[1],N,R[3]||1,R[4]||0,R[5]||0,R[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 L},S.isValid=function(){return this.$d.toString()!==g},S.isSame=function(_,O){var w=k(_);return this.startOf(O)<=w&&w<=this.endOf(O)},S.isAfter=function(_,O){return k(_)<this.startOf(O)},S.isBefore=function(_,O){return this.endOf(O)<k(_)},S.$g=function(_,O,w){return L.u(_)?this[O]:this.set(w,_)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(_,O){var w=this,A=!!L.u(O)||O,R=L.p(_),N=function(J,G){var q=L.w(w.$u?Date.UTC(w.$y,G,J):new Date(w.$y,G,J),w);return A?q:q.endOf(l)},B=function(J,G){return L.w(w.toDate()[J].apply(w.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(G)),w)},I=this.$W,Y=this.$M,ie=this.$D,Q="set"+(this.$u?"UTC":"");switch(R){case h:return A?N(1,0):N(31,11);case f:return A?N(1,Y):N(0,Y+1);case u:var _e=this.$locale().weekStart||0,we=(I<_e?I+7:I)-_e;return N(A?ie-we:ie+(6-we),Y);case l:case p:return B(Q+"Hours",0);case c:return B(Q+"Minutes",1);case o:return B(Q+"Seconds",2);case a:return B(Q+"Milliseconds",3);default:return this.clone()}},S.endOf=function(_){return this.startOf(_,!1)},S.$set=function(_,O){var w,A=L.p(_),R="set"+(this.$u?"UTC":""),N=(w={},w[l]=R+"Date",w[p]=R+"Date",w[f]=R+"Month",w[h]=R+"FullYear",w[c]=R+"Hours",w[o]=R+"Minutes",w[a]=R+"Seconds",w[s]=R+"Milliseconds",w)[A],B=A===l?this.$D+(O-this.$W):O;if(A===f||A===h){var I=this.clone().set(p,1);I.$d[N](B),I.init(),this.$d=I.set(p,Math.min(this.$D,I.daysInMonth())).$d}else N&&this.$d[N](B);return this.init(),this},S.set=function(_,O){return this.clone().$set(_,O)},S.get=function(_){return this[L.p(_)]()},S.add=function(_,O){var w,A=this;_=Number(_);var R=L.p(O),N=function(Y){var ie=k(A);return L.w(ie.date(ie.date()+Math.round(Y*_)),A)};if(R===f)return this.set(f,this.$M+_);if(R===h)return this.set(h,this.$y+_);if(R===l)return N(1);if(R===u)return N(7);var B=(w={},w[o]=r,w[c]=i,w[a]=n,w)[R]||1,I=this.$d.getTime()+_*B;return L.w(I,this)},S.subtract=function(_,O){return this.add(-1*_,O)},S.format=function(_){var O=this,w=this.$locale();if(!this.isValid())return w.invalidDate||g;var A=_||"YYYY-MM-DDTHH:mm:ssZ",R=L.z(this),N=this.$H,B=this.$m,I=this.$M,Y=w.weekdays,ie=w.months,Q=function(G,q,Be,ct){return G&&(G[q]||G(O,A))||Be[q].slice(0,ct)},_e=function(G){return L.s(N%12||12,G,"0")},we=w.meridiem||function(G,q,Be){var ct=G<12?"AM":"PM";return Be?ct.toLowerCase():ct},J={YY:String(this.$y).slice(-2),YYYY:this.$y,M:I+1,MM:L.s(I+1,2,"0"),MMM:Q(w.monthsShort,I,ie,3),MMMM:Q(ie,I),D:this.$D,DD:L.s(this.$D,2,"0"),d:String(this.$W),dd:Q(w.weekdaysMin,this.$W,Y,2),ddd:Q(w.weekdaysShort,this.$W,Y,3),dddd:Y[this.$W],H:String(N),HH:L.s(N,2,"0"),h:_e(1),hh:_e(2),a:we(N,B,!0),A:we(N,B,!1),m:String(B),mm:L.s(B,2,"0"),s:String(this.$s),ss:L.s(this.$s,2,"0"),SSS:L.s(this.$ms,3,"0"),Z:R};return A.replace(b,function(G,q){return q||J[G]||R.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(_,O,w){var A,R=L.p(O),N=k(_),B=(N.utcOffset()-this.utcOffset())*r,I=this-N,Y=L.m(this,N);return Y=(A={},A[h]=Y/12,A[f]=Y,A[d]=Y/3,A[u]=(I-B)/6048e5,A[l]=(I-B)/864e5,A[c]=I/i,A[o]=I/r,A[a]=I/n,A)[R]||I,w?Y:L.a(Y)},S.daysInMonth=function(){return this.endOf(f).$D},S.$locale=function(){return C[this.$L]},S.locale=function(_,O){if(!_)return this.$L;var w=this.clone(),A=z(_,O,!0);return A&&(w.$L=A),w},S.clone=function(){return L.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},E}(),ze=K.prototype;return k.prototype=ze,[["$ms",s],["$s",a],["$m",o],["$H",c],["$W",l],["$M",f],["$y",h],["$D",p]].forEach(function(E){ze[E[1]]=function(S){return this.$g(S,E[0],E[1])}}),k.extend=function(E,S){return E.$i||(E(S,K,k),E.$i=!0),k},k.locale=z,k.isDayjs=j,k.unix=function(E){return k(1e3*E)},k.en=C[x],k.Ls=C,k.p={},k})})(ti);var ni=ti.exports;function qt(e,t,n){n===void 0&&(n={});var r=ke(t);ei(function(){var i=tt(n.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(o){return r.current(o)};return i.addEventListener(e,s,{capture:n.capture,once:n.once,passive:n.passive}),function(){i.removeEventListener(e,s,{capture:n.capture})}}},[e,n.capture,n.once,n.passive],n.target)}var nd=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},en=function(e,t){var n=t||{},r=n.onEnter,i=n.onLeave,s=nd(Jf(!1),2),a=s[0],o=s[1],c=o.setTrue,l=o.setFalse;return qt("mouseenter",function(){r==null||r(),c()},{target:e}),qt("mouseleave",function(){i==null||i(),l()},{target:e}),a},rd=function(t,n){return n===void 0&&(n=[]),Zc(t,n)},id=function(t,n,r){var i=v.useRef(),s=v.useRef(0);rd(n,i.current)||(i.current=n,s.current+=1),ei(t,[s.current],r)},sd=id,tn=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},nn={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 od(e){var t=Object.keys(nn).reduce(function(n,r){return nn[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function ri(e,t,n){var r,i;if(!e.key)return!1;if(Gr(t))return e.keyCode===t;var s=t.split("."),a=0;try{for(var o=tn(s),c=o.next();!c.done;c=o.next()){var l=c.value,u=nn[l],f=ad[l.toLowerCase()];(u&&u(e)||f&&f===e.keyCode)&&a++}}catch(d){r={error:d}}finally{try{c&&!c.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}return n?a===s.length&&od(e)===s.length:a===s.length}function ld(e,t){return Kt(e)?e:Xu(e)||Gr(e)?function(n){return ri(n,e,t)}:Array.isArray(e)?function(n){return e.some(function(r){return ri(n,r,t)})}:e?function(){return!0}:function(){return!1}}var cd=["keydown"];function ge(e,t,n){var r=n||{},i=r.events,s=i===void 0?cd:i,a=r.target,o=r.exactMatch,c=o===void 0?!1:o,l=ke(t),u=ke(e);sd(function(){var f,d,h,p=tt(a,window);if(!!p){var g=function(T){var x,C=ld(u.current,c);if(C(T))return(x=l.current)===null||x===void 0?void 0:x.call(l,T)};try{for(var y=tn(s),b=y.next();!b.done;b=y.next()){var P=b.value;(h=p==null?void 0:p.addEventListener)===null||h===void 0||h.call(p,P,g)}}catch(D){f={error:D}}finally{try{b&&!b.done&&(d=y.return)&&d.call(y)}finally{if(f)throw f.error}}return function(){var D,T,x;try{for(var C=tn(s),j=C.next();!j.done;j=C.next()){var z=j.value;(x=p==null?void 0:p.removeEventListener)===null||x===void 0||x.call(p,z,g)}}catch(k){D={error:k}}finally{try{j&&!j.done&&(T=C.return)&&T.call(C)}finally{if(D)throw D.error}}}}},[s],a)}var ud=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s};function fd(e){var t=v.useRef(0),n=ud(v.useState(e),2),r=n[0],i=n[1],s=v.useCallback(function(a){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(a)})},[]);return Fe(function(){cancelAnimationFrame(t.current)}),[r,s]}var dd=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=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(o){a={error:o}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return s},hd={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},pd=function(e){var t=dd(fd(hd),2),n=t[0],r=t[1];return qt("mousemove",function(i){var s=i.screenX,a=i.screenY,o=i.clientX,c=i.clientY,l=i.pageX,u=i.pageY,f={screenX:s,screenY:a,clientX:o,clientY:c,pageX:l,pageY:u,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},d=tt(e);if(d){var h=d.getBoundingClientRect(),p=h.left,g=h.top,y=h.width,b=h.height;f.elementPosX=p+window.pageXOffset,f.elementPosY=g+window.pageYOffset,f.elementX=l-f.elementPosX,f.elementY=u-f.elementPosY,f.elementW=y,f.elementH=b}r(f)},{target:function(){return document}}),n},ii={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;i<arguments.length;i++){var s=arguments[i];if(!!s){var a=typeof s;if(a==="string"||a==="number")r.push(s);else if(Array.isArray(s)){if(s.length){var o=n.apply(null,s);o&&r.push(o)}}else if(a==="object")if(s.toString===Object.prototype.toString)for(var c in s)t.call(s,c)&&s[c]&&r.push(c);else r.push(s.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(ii);var V=ii.exports;const vd="https://api.bilibili.com",si="https://app.bilibili.com",rn=dt.default.create({baseURL:vd});rn.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params=Oe(Se({},e.params),{_:Date.now()})),e},function(e){return Promise.reject(e)});const nt=dt.default.create({adapter:Ss.default});nt.interceptors.request.use(function(e){return e.params=Se({access_key:re.accessKey||""},e.params),e},function(e){return Promise.reject(e)}),nt.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 md(){return(await nt.get(si+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data.data}async function gd(){return sn(2)}async function sn(e){const t=new Array(e).fill(0).map(i=>md());let r=(await Promise.all(t)).reduce((i,s)=>i.concat(s),[]);return r=yd(r),r.map(i=>Oe(Se({},i),{uniqId:i.param+"-"+crypto.randomUUID()}))}function yd(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 ai="_toast-container_9119l_1";var wh={toastContainer:ai};function le(e,t=2e3){const n=Pe.default(`<div class='${ai}'>${e}</div>`);n.appendTo(document.body),setTimeout(()=>n.remove(),t)}const bd="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",_d="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function oi(){return le(bd)}function li(){return le(_d)}async function wd(){var c,l;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(!((c=t==null?void 0:t.data)!=null&&c.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((l=t==null?void 0:t.data)!=null&&l.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",d=>{if(d.origin!="https://www.mcbbs.net"||!d.data)return;const h=d.data.match(/access_key=([0-9a-z]{32})/);if(!h||!h[1])return u({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});u(h[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=Pe.default(`<iframe src='${n}' style="display: none;" />`);s.appendTo(document.body);function a(){s.remove(),r&&(clearTimeout(r),r=null)}const o=await i;return a(),o}async function Sd(){const e=await wd();if(typeof e=="object"&&"errmsg"in e){le(e.errmsg);return}const t=e;return re.accessKey=t,le("\u83B7\u53D6\u6210\u529F"),t}function Td(){re.accessKey="",le("\u5DF2\u5220\u9664 access_key")}const ci="_expand-btn_wdzp9_1",ui="_expanded_wdzp9_12";var Sh={expandBtn:ci,expanded:ui},rt={exports:{}},it={};/**
 * @license React
 * react-jsx-runtime.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 xd=ft.default,Ed=Symbol.for("react.element"),Cd=Symbol.for("react.fragment"),Od=Object.prototype.hasOwnProperty,Ad=xd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Pd={key:!0,ref:!0,__self:!0,__source:!0};function fi(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Od.call(t,r)&&!Pd.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Ed,type:e,key:s,ref:a,props:i,_owner:Ad.current}}it.Fragment=Cd,it.jsx=fi,it.jsxs=fi,rt.exports=it;const m=rt.exports.jsx,M=rt.exports.jsxs,st=rt.exports.Fragment,di=v.forwardRef(function({children:t},n){const[r,i]=qr(!1);v.useImperativeHandle(n,()=>i,[i]);const s=m("button",{className:V("primary-btn",ci),onClick:i.toggle,children:m("svg",{className:V({[ui]:r}),children:m("use",{xlinkHref:"#widget-arrow"})})});return M(st,{children:[s,r&&t]})});var hi={exports:{}},Rd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Md=Rd,Dd=Md;function pi(){}function vi(){}vi.resetWarningCache=pi;var Ld=function(){function e(r,i,s,a,o,c){if(c!==Dd){var l=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 l.name="Invariant Violation",l}}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:vi,resetWarningCache:pi};return n.PropTypes=n,n};hi.exports=Ld();var X=hi.exports;class an 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,a=n.pageYOffset!==void 0?n.pageYOffset:s.scrollTop;this.props.isReverse?i=a:i=this.calculateOffset(t,a)}else this.props.isReverse?i=r.scrollTop:i=t.scrollHeight-r.scrollTop-r.clientHeight;i<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=r.scrollHeight,this.beforeScrollTop=r.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,n){return t?this.calculateTopPosition(t)+(t.offsetHeight-n-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const b=this.filterProps(this.props),{children:n,element:r,hasMore:i,initialLoad:s,isReverse:a,loader:o,loadMore:c,pageStart:l,ref:u,threshold:f,useCapture:d,useWindow:h,getScrollParent:p}=b,g=bs(b,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);g.ref=P=>{this.scrollComponent=P,u&&u(P)};const y=[n];return i&&(o?a?y.unshift(o):y.push(o):this.defaultLoader&&(a?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),ft.default.createElement(r,g,y)}}Tn(an,"propTypes",{children:X.node.isRequired,element:X.node,hasMore:X.bool,initialLoad:X.bool,isReverse:X.bool,loader:X.node,loadMore:X.func.isRequired,pageStart:X.number,ref:X.func,getScrollParent:X.func,threshold:X.number,useCapture:X.bool,useWindow:X.bool}),Tn(an,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});let $e=0;const Nd=()=>{$e++,document.body.style.overflow="hidden"},kd=()=>{$e--,$e<0&&($e=0),$e===0&&(document.body.style.overflow="overlay")},mi=()=>document.body.classList.contains("dark"),gi=Je({value:mi()}),Fd=function(){return Ht(gi).value};new MutationObserver(function(){gi.value=mi()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});function yi({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1}){v.useLayoutEffect(()=>{e?Nd():kd()},[e]);const a=v.useRef(null),o=Fd(),{bg:c,c:l}=v.useMemo(()=>{const p=window.getComputedStyle(document.body)["background-color"],g=window.getComputedStyle(document.body).color;return{bg:p,c:g}},[o]),u=v.useMemo(()=>o?{"--bg":c,"--c":l,backgroundColor:c,color:l}:{},[c,l,o]),f=v.useId(),d=v.useMemo(()=>{const p=document.createElement("div");return p.setAttribute("data-id","base-modal-"+f),document.body.appendChild(p),p},[]),h=W(p=>{var g;(g=a.current)!=null&&g.contains(p.target)||s&&t()});return e?U.createPortal(m("div",{className:V(r),onClick:h,children:m("div",{className:V(i),style:u,ref:a,children:n})}),d):null}function jd(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(a=>yu(a.toString(),2,"0")).join(":")}function on(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}function Id({className:e,item:t,pvideo:n}){var k;const r=v.useRef(null),i=pd(r.current),{elementW:s,elementH:a,elementX:o}=i;let c=0,l=0;s&&o&&!isNaN(o)&&!isNaN(s)&&(c=o/s,c<0&&(c=0),c>1&&(c=1),l=Math.floor((t.duration||0)*c));let u=v.useMemo(()=>{const L=(n==null?void 0:n.index)||[];let K=zd(L,l);return K!==-1?K:l>L[L.length-1]?(K=Math.floor(L.length*c)-1,K<0&&(K=0),K):0},[n,l]);const{img_x_len:f,img_y_len:d,img_x_size:h,img_y_size:p}=n,g=d*f;u=u+1;const y=Math.floor(u/g),b=u-y*g,P=((k=n.image)==null?void 0:k[y])||"",D=Math.floor(b/f)+1,T=b-(D-1)*f,x=s*f,C=a*d,j=(D-1)*a,z=(T-1)*s;return m("div",{ref:r,className:e,style:{backgroundColor:"black",backgroundImage:`url(${P})`,backgroundPosition:`-${z}px -${j}px`,backgroundSize:`${x}px ${C}px`},children:m($d,{progress:c})})}function $d({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 zd(e,t){var o;let n=0,r=e.length-1,i=-1;for(;n<=r;){const c=Math.floor((n+r)/2),l=e[c];if(t===l)return c;l<t?(n=c+1,i=c):r=c-1}if(i===-1)return-1;const s=e[i],a=(o=e[i+1])!=null?o:0;return s<t&&t<a?i:-1}function Bd(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw le("\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 ln=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,bi=typeof AbortController=="function",_i=bi?AbortController:class{constructor(){this.signal=new wi}abort(){this.signal.dispatchEvent("abort")}},wi=bi?AbortSignal: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))}},cn=new Set,un=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;at(n)&&dn(n,`${e} option`,`options.${t}`,be)},fn=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(at(n)){const{prototype:r}=be,{get:i}=Object.getOwnPropertyDescriptor(r,e);dn(n,`${e} method`,`cache.${t}()`,i)}},Hd=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(at(n)){const{prototype:r}=be,{get:i}=Object.getOwnPropertyDescriptor(r,e);dn(n,`${e} property`,`cache.${t}`,i)}},Si=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},at=e=>!cn.has(e),dn=(e,t,n,r)=>{cn.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;Si(i,"DeprecationWarning",e,r)},ye=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Ti=e=>ye(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?ot:null:null;class ot extends Array{constructor(t){super(t),this.fill(0)}}class Wd{constructor(t){if(t===0)return[];const n=Ti(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:a,updateAgeOnHas:o,allowStale:c,dispose:l,disposeAfter:u,noDisposeOnSet:f,noUpdateTTL:d,maxSize:h=0,sizeCalculation:p,fetchMethod:g,noDeleteOnFetchRejection:y}=t,{length:b,maxAge:P,stale:D}=t instanceof be?{}:t;if(n!==0&&!ye(n))throw new TypeError("max option must be a nonnegative integer");const T=n?Ti(n):Array;if(!T)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=h,this.sizeCalculation=p||b,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=g||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(n).fill(null),this.valList=new Array(n).fill(null),this.next=new T(n),this.prev=new T(n),this.head=0,this.tail=0,this.free=new Wd(n),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!y,this.maxSize!==0){if(!ye(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!c||!!D,this.updateAgeOnGet=!!a,this.updateAgeOnHas=!!o,this.ttlResolution=ye(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||P||0,this.ttl){if(!ye(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 x="LRU_CACHE_UNBOUNDED";at(x)&&(cn.add(x),Si("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,be))}D&&un("stale","allowStale"),P&&un("maxAge","ttl"),b&&un("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new ot(this.max),this.starts=new ot(this.max),this.setItemTTL=(r,i)=>{if(this.starts[r]=i!==0?ln.now():0,this.ttls[r]=i,i!==0&&this.ttlAutopurge){const s=setTimeout(()=>{this.isStale(r)&&this.delete(this.keyList[r])},i+1);s.unref&&s.unref()}},this.updateItemAge=r=>{this.starts[r]=this.ttls[r]!==0?ln.now():0};let t=0;const n=()=>{const r=ln.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){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new ot(this.max),this.removeItemSize=t=>this.calculatedSize-=this.sizes[t],this.requireSize=(t,n,r,i)=>{if(!ye(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,t),!ye(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,r,i)=>{this.sizes[t]=i;const s=this.maxSize-this.sizes[t];for(;this.calculatedSize>s;)this.evict(!0);this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,n,r,i){}requireSize(t,n,r,i){if(r||i)throw new TypeError("cannot set size without setting maxSize 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 fn("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()){const r=this.keyList[n],s={value:this.valList[n]};this.ttls&&(s.ttl=this.ttls[n]),this.sizes&&(s.size=this.sizes[n]),t.unshift([r,s])}return t}load(t){this.clear();for(const[n,r]of t)this.set(n,r.value,r)}dispose(t,n,r){}set(t,n,{ttl:r=this.ttl,noDisposeOnSet:i=this.noDisposeOnSet,size:s=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:o=this.noUpdateTTL}={}){s=this.requireSize(t,n,s,a);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,n,t,s),o=!1;else{const l=this.valList[c];n!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():i||(this.dispose(l,t,"set"),this.disposeAfter&&this.disposed.push([l,t,"set"])),this.removeItemSize(c),this.valList[c]=n,this.addItemSize(c,n,t,s)),this.moveToTail(c)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),o||this.setItemTTL(c,r),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)))return this.valList[r]}backgroundFetch(t,n,r){const i=n===void 0?void 0:this.valList[n];if(this.isBackgroundFetch(i))return i;const s=new _i,a={signal:s.signal,options:r},o=f=>(s.signal.aborted||this.set(t,f,a.options),f),c=f=>{if(this.valList[n]===u&&(!r.noDeleteOnFetchRejection||u.__staleWhileFetching===void 0?this.delete(t):this.valList[n]=u.__staleWhileFetching),u.__returned===u)throw f},l=f=>f(this.fetchMethod(t,i,a)),u=new Promise(l).then(o,c);return u.__abortController=s,u.__staleWhileFetching=i,u.__returned=null,n===void 0?(this.set(t,u,a.options),n=this.keyMap.get(t)):this.valList[n]=u,u}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,ttl:i=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:a=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection}={}){if(!this.fetchMethod)return this.get(t,{allowStale:n,updateAgeOnGet:r});const u={allowStale:n,updateAgeOnGet:r,ttl:i,noDisposeOnSet:s,size:a,sizeCalculation:o,noUpdateTTL:c,noDeleteOnFetchRejection:l};let f=this.keyMap.get(t);if(f===void 0){const d=this.backgroundFetch(t,f,u);return d.__returned=d}else{const d=this.valList[f];if(this.isBackgroundFetch(d))return n&&d.__staleWhileFetching!==void 0?d.__staleWhileFetching:d.__returned=d;if(!this.isStale(f))return this.moveToTail(f),r&&this.updateItemAge(f),d;const h=this.backgroundFetch(t,f,u);return n&&h.__staleWhileFetching!==void 0?h.__staleWhileFetching:h.__returned=h}}get(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet}={}){const i=this.keyMap.get(t);if(i!==void 0){const s=this.valList[i],a=this.isBackgroundFetch(s);return this.isStale(i)?a?n?s.__staleWhileFetching:void 0:(this.delete(t),n?s:void 0):a?void 0:(this.moveToTail(i),r&&this.updateItemAge(i),s)}}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 fn("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 fn("reset","clear"),this.clear}get length(){return Hd("length","size"),this.size}static get AbortController(){return _i}static get AbortSignal(){return wi}}var Ud=be;async function Yd(e){return(await rn.get("/pvideo",{params:{aid:e}})).data.data}async function Gd(e){return[]}const hn=new Ud({max:200});async function Kd(e){if(hn.has(e))return hn.get(e);const[t,n]=await Promise.all([Yd(e),Gd()]);return hn.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function xi(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",Bd());const s=(await rn.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 Vd=xi("add"),Xd=xi("del"),Ei=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var o;const s=(await nt.get(si+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(o=n.tag)==null?void 0:o.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"}},Jd=Ei("dislike"),Zd=Ei("cancel"),Ci="_bili-video-card_14zjz_1",Oi="_image-wrapper_14zjz_4",Ai="_preview-card-wrapper_14zjz_8",Pi="_watch-later_14zjz_21",Ri="_badge_14zjz_24",Mi="_recommend-reason_14zjz_32",Di="_bangumi-desc_14zjz_47",Li="_btn-dislike_14zjz_50",Ni="_btn-dislike-icon_14zjz_65",ki="_btn-dislike-tip_14zjz_72",Fi="_disliked-wrapper_14zjz_87",ji="_dislike-content-cover_14zjz_101",Ii="_dislike-content-cover-inner_14zjz_107",Qd="_dislike-icon_14zjz_118",$i="_dislike-reason_14zjz_121",zi="_dislike-desc_14zjz_125",Bi="_dislike-content-action_14zjz_129";var xh={biliVideoCard:Ci,imageWrapper:Oi,previewCardWrapper:Ai,watchLater:Pi,badge:Ri,recommendReason:Mi,bangumiDesc:Di,btnDislike:Li,btnDislikeIcon:Ni,btnDislikeTip:ki,dislikedWrapper:Fi,dislikeContentCover:ji,dislikeContentCoverInner:Ii,dislikeIcon:Qd,dislikeReason:$i,dislikeDesc:zi,dislikeContentAction:Bi};function qd(e){const t=Je({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}const Hi="_modal-mask_vh629_1",Wi="_modal_vh629_1",Ui="_modal-header_vh629_23",Yi="_modal-title_vh629_30",Gi="_title-desc_vh629_35",Ki="_btn-close_vh629_39",Vi="_modal-body_vh629_57",Xi="_reason-list_vh629_62",Ji="_reason_vh629_62";var Eh={modalMask:Hi,modal:Wi,modalHeader:Ui,modalTitle:Yi,titleDesc:Gi,btnClose:Ki,modalBody:Vi,reasonList:Xi,reason:Ji};const pn=qd();function eh(){return Ht(pn)}function th(e){const t=eh();if(!!e)return t.get(e)}function nh({show:e,onHide:t,item:n}){const[r,i]=v.useState(!1),s=W(async(o,c)=>{if(!n)return;let l=!1,u=null;try{i(!0),l=await Jd(n,o)}catch(f){u=f}finally{i(!1)}if(u)return console.error(u.stack||u),oi();l?le("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):li(),l&&(pn.set(n.param,{id:o,name:c}),t())}),a=v.useMemo(()=>{var o;return[...(o=n==null?void 0:n.dislike_reasons)!=null?o:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[n]);return M(yi,{show:e,onHide:t,clsModalMask:Hi,clsModal:Wi,hideWhenMaskOnClick:!0,children:[M("div",{className:Ui,children:[M("div",{className:Yi,children:["\u6211\u4E0D\u60F3\u770B",m("span",{className:Gi,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),m("div",{className:"space",style:{flex:1}}),M("button",{className:`primary-btn roll-btn ${Ki}`,onClick:t,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:Vi,children:m("div",{className:Xi,children:a.map(o=>m("button",{className:Ji,"data-id":o.reason_id,onClick:()=>s(o.reason_id,o.reason_name),disabled:r,children:o.reason_name},o.reason_id))})})]})}const Zi={show:!1,onHide:Qi,item:null};function Qi(){qi({show:!1,item:null})}function qi(e){Object.assign(Zi,e),rh().render(m(nh,Oe(Se({},Zi),{onHide:Qi})))}let vn;function rh(){if(!vn){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),vn=Gt(e)}return vn}function ih(e){qi({show:!0,item:e})}const sh=ni().format("YYYY"),ah=e=>{if(!e)return"";const t=ni.unix(e);return t.format("YYYY")===sh?t.format("M-D"):t.format("YY-M-D")},oh=e=>e.replace(/^http:\/\//,"https://"),mn=v.memo(function({style:t,className:n,item:r,loading:i}){i=i!=null?i:!r;const s=M("div",{className:V("bili-video-card__skeleton",{hide:!i}),children:[m("div",{className:"bili-video-card__skeleton--cover"}),m("div",{className:"bili-video-card__skeleton--info",children:M("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"})]})})]}),a=th(r==null?void 0:r.param);return M("div",{style:t,className:V("bili-video-card",Ci,n),"data-report":"partition_recommend.content",children:[s,!i&&r&&(a?m(lh,{item:r,dislikedReason:a}):m(ch,{item:r}))]})}),lh=v.memo(function({dislikedReason:t,item:n}){const r=W(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Zd(n,t.id)}catch(a){s=a}if(s)return console.error(s.stack||s),oi();i?le("\u5DF2\u64A4\u9500"):li(),i&&pn.delete(n.param)});return M("div",{className:V(Fi),children:[m("div",{className:ji,children:M("div",{className:Ii,children:[m("div",{className:"icon"}),m("div",{className:$i,children:t==null?void 0:t.name}),m("div",{className:zi,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),m("div",{className:Bi,children:m("button",{onClick:r,children:"\u64A4\u9500"})})]})}),ch=v.memo(function({item:t}){const n=v.useRef(null),r=en(n),i=v.useRef(null),s=en(i),[a,o]=v.useState(!1),{accessKey:c}=Wt(),l=Boolean(c),{param:u,title:f,cover:d,goto:h,play:p,like:g,coin:y,desc:b,danmaku:P,ctime:D,duration:T,name:x,face:C,mid:j,favorite:z,badge:k,rcmd_reason:L}=t,K=v.useMemo(()=>ah(D),[D]),ze=v.useMemo(()=>oh(d),[d]),[E,S]=v.useState(null),[_,O]=v.useState(!1),w=W(async()=>{if(!E&&!_)try{O(!0);const J=await Kd(u);S(J)}finally{O(!1)}});v.useEffect(()=>{r&&w()},[r]);let A=!1;const R=W(async J=>{if(J.preventDefault(),A)return;A=!0;const G=a?Xd:Vd;let q=!1;try{q=await G(u)}finally{A=!1}q&&o(Be=>!Be)}),N=v.useRef(null),B=en(N),I=W(J=>{J.stopPropagation(),J.preventDefault(),ih(t)}),Y=t.goto==="av"?`/video/av${u}`:t.uri,ie=v.useMemo(()=>jd(T),[T]),Q=v.useMemo(()=>on(p),[p]),_e=v.useMemo(()=>on(g),[g]),we=v.useMemo(()=>on(z),[z]);return M("div",{className:"bili-video-card__wrap __scale-wrap",children:[m("a",{href:Y,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:M("div",{className:"bili-video-card__image __scale-player-wrap",ref:n,children:[M("div",{className:V("bili-video-card__image--wrap",Oi),children:[M("picture",{className:"v-img bili-video-card__cover",children:[m("source",{srcSet:`${ze}@672w_378h_1c.webp`,type:"image/webp"}),m("img",{src:`${ze}@672w_378h_1c.webp`,alt:f,loading:"lazy"})]}),r&&(E==null?void 0:E.pvideoData)&&m(Id,{className:Ai,item:t,pvideo:E==null?void 0:E.pvideoData}),M("div",{className:`bili-watch-later ${Pi}`,style:{display:r?"flex":"none"},ref:i,onClick:R,children:[m("svg",{className:"bili-watch-later__icon",children:m("use",{xlinkHref:a?"#widget-watch-save":"#widget-watch-later"})}),m("span",{className:"bili-watch-later__tip",style:{display:s?"block":"none"},children:a?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),l&&M("div",{ref:N,className:Li,onClick:I,style:{display:r?"flex":"none"},children:[m("svg",{className:Ni,children:m("use",{xlinkHref:"#widget-close"})}),m("span",{className:ki,style:{display:B?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),m("div",{className:"bili-video-card__mask",children:M("div",{className:"bili-video-card__stats",children:[M("div",{className:"bili-video-card__stats--left",children:[M("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:Q})]}),m("span",{className:"bili-video-card__stats--item",children:h==="av"?M(st,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:_e})]}):M(st,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:we})]})})]}),m("span",{className:"bili-video-card__stats__duration",children:ie})]})})]})}),m("div",{className:"bili-video-card__info __scale-disable",children:M("div",{className:"bili-video-card__info--right",children:[m("a",{href:Y,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:m("h3",{className:"bili-video-card__info--tit",title:f,children:f})}),M("p",{className:"bili-video-card__info--bottom",children:[h==="av"&&M("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${j}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[L!=null&&L.content?m("span",{className:Mi,children:L.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:x}),K&&M("span",{className:"bili-video-card__info--date",children:["\xB7 ",K]})]}),h==="bangumi"&&M("a",{className:"bili-video-card__info--owner",href:Y,target:"_blank",children:[m("span",{className:Ri,children:k}),m("span",{className:Di,children:b})]})]})]})})]})}),es="_modal-mask_1urmj_1",ts="_narrow-mode_1urmj_13",ns="_modal_1urmj_1",rs="_modal-header_1urmj_38",is="_modal-title_1urmj_46",ss="_btn-refresh_1urmj_51",as="_btn-close_1urmj_52",lt="_modal-body_1urmj_68",uh="_list_1urmj_74",gn="_card_1urmj_77",yn="_active_1urmj_85",os="_video-card-list_1urmj_90",bn="_video-card-body_1urmj_1",ls="_loader_1urmj_99",_n="_checkbox_1urmj_104";var Ch={modalMask:es,narrowMode:ts,modal:ns,modalHeader:rs,modalTitle:is,btnRefresh:ss,btnClose:as,modalBody:lt,list:uh,card:gn,active:yn,videoCardList:os,videoCardBody:bn,loader:ls,checkbox:_n};function fh({show:e,refresh:t,minIndex:n=0,maxIndex:r}){const[i,s]=v.useState(null),a=W(()=>{if(i===null)return!1;const g=document.querySelector(`${wn}.${yn}`),y=document.querySelector(`.${lt}`);if(!g||!y)return!1;const b=y.getBoundingClientRect(),P=g.getBoundingClientRect();return!(P.top-b.top<-(b.height+P.height)||P.top-b.top>b.height*2+P.height)}),o=W((g,y)=>{if(!e)return;y==null||y.preventDefault();const b=a()?i+g:dh();if(!(b<n)){if(b>r){fs(r);return}s(b),fs(b)}}),c=v.useCallback(g=>{o(-1,g)},[]),l=v.useCallback(g=>{o(1,g)},[]);ge("leftarrow",c),ge("rightarrow",l);const u=v.useCallback(g=>{o(-hs(),g)},[]),f=v.useCallback(g=>{o(hs(),g)},[]);ge("uparrow",u),ge("downarrow",f);const d=W(()=>{!i||!e||hh(i)}),h=W(()=>{!e||s(null)});ge("enter",d),ge("esc",h);const p=W(()=>{!e||t()});return ge("r",p,{exactMatch:!0}),{activeIndex:i,clearActiveIndex:h}}function dh(){const e=document.querySelector(`.${lt}`);if(!e)return 0;const t=e.getBoundingClientRect(),n=cs();for(let r=0;r<n.length;r++)if(n[r].getBoundingClientRect().top>=t.top)return r;return 0}const wn=`#${bn} .${gn}`;function cs(){return[...document.querySelectorAll(wn)]}function us(e){return cs()[e]}function fs(e){var n;const t=us(e);(n=t==null?void 0:t.scrollIntoViewIfNeeded)==null||n.call(t,!1)}function hh(e){const t=us(e);if(!t)return;const n=t.querySelector(".bili-video-card__wrap > a");n==null||n.click()}const ds=new Map;function hs(){if(re.useNarrowMode)return 2;let e=ds.get(window.innerWidth);if(e)return e;const t=document.querySelector(wn);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 ds.set(window.innerWidth,e),e}function ps(){return v.useMemo(()=>crypto.randomUUID(),[])}const ph=v.memo(function({show:t,onHide:n}){const[r,i]=v.useState([]),[s,a]=v.useState(!1),o=v.useRef(null),c=W(async()=>{o.current&&(o.current.scrollTop=0),await Yr(50);try{a(!0),y(),i(await sn(2)),y()}finally{a(!1)}}),l=W(async D=>{const T=await sn(2);i(x=>[...x,...T])}),{useNarrowMode:u,initialShowMore:f}=Wt(),d=v.useCallback(D=>{const T=D.target.checked;Br({useNarrowMode:T})},[]),h=v.useCallback(D=>{const T=D.target.checked;Br({initialShowMore:T}),T&&le("\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")},[]),p=v.useMemo(()=>({[ts]:u}),[u]),{activeIndex:g,clearActiveIndex:y}=fh({show:t,refresh:c,maxIndex:r.length-1}),b=ps(),P=ps();return M(yi,{show:t,onHide:n,clsModalMask:V(es,p),clsModal:V(ns,p),children:[M("div",{className:rs,children:[m("div",{className:is,children:"\u63A8\u8350"}),m("div",{className:"space",style:{flex:1}}),M(di,{children:[m("input",{type:"checkbox",className:_n,id:P,checked:f,onChange:h}),m("label",{htmlFor:P,children:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A"}),m("input",{type:"checkbox",className:_n,id:b,checked:u,onChange:d}),m("label",{htmlFor:b,children:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F"})]}),M("button",{className:`primary-btn roll-btn ${ss}`,onClick:c,children:[m("svg",{children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),M("button",{className:`primary-btn roll-btn ${as}`,onClick:n,children:[m("svg",{children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:lt,ref:o,children:m(an,{pageStart:0,loadMore:l,hasMore:!0,useWindow:!1,threshold:360,style:{minHeight:"100%"},loader:m("div",{className:ls,children:"\u52A0\u8F7D\u4E2D..."},0),children:m("div",{className:`video-card-list is-full ${os}`,children:m("div",{id:bn,className:V("video-card-body",p),children:r.map((D,T)=>m(mn,{loading:s,item:D,className:V(gn,{[yn]:T===g})},D.uniqId))})})})})]})}),vs="_grid_20olc_1",ms="_video-card-list_20olc_5";var Ph={grid:vs,videoCardList:ms,expandBtn:"_expand-btn_20olc_19",expanded:"_expanded_20olc_30"};function vh(){const e=v.useRef(null),{accessKey:t}=Wt(),n=Qr(Sd,{manual:!0}),r=W(async()=>{var y;await n.runAsync()&&((y=e.current)==null||y.set(!1))}),i=Td,s=W(()=>{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")}),a=v.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:o,loading:c,error:l,refresh:u}=Qr(gd);l&&console.error(l.stack||l);const[f,d]=v.useState(()=>re.initialShowMore),h=v.useCallback(()=>{d(!0)},[]),p=v.useCallback(()=>{d(!1)},[]);return m("section",{className:V("bili-grid no-margin",vs),"data-area":"\u63A8\u8350",children:M("div",{className:`video-card-list is-full ${ms}`,children:[M("div",{className:"area-header",children:[M("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"})})]}),M("div",{className:"right",children:[t?M(di,{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"})})]}):M(st,{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"})})]}),M("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"})]}),M("button",{className:"primary-btn see-more",onClick:h,children:[m("span",{children:"\u67E5\u770B\u66F4\u591A"}),m("svg",{children:m("use",{xlinkHref:"#widget-arrow"})})]})]})]}),m(ph,{show:f,onHide:p}),m("div",{className:"video-card-body more-class1 more-class2",children:c||l?a.map(g=>m(mn,{},g)):o.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 mh()})();async function mh(){const e=Date.now(),t=10*1e3,n=()=>Pe.default(".bili-layout > section.bili-grid").length>0;for(;!n()&&Date.now()-e<t;)await Yr(100);if(!n()){console.error("[bilibili-app-recommend]: init fail");return}const r=Pe.default(".bili-layout > section.bili-grid").eq(0),i=Pe.default("<section></section>");i.insertAfter(r);const s=i[0];Gt(s).render(m(vh,{}))}})(React,$,ReactDOM,axios,axiosGmxhrAdapter);