// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.6.1 // @author magicdawn // @description 为B站首页添加像App一样的推荐 // @license MIT // @homepageURL https://github.com/magicdawn/bilibili-app-recommend // @supportURL https://github.com/magicdawn/bilibili-app-recommend/issues // @match *://www.bilibili.com/ // @match *://www.bilibili.com/?* // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png // @match https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?* // @require https://unpkg.com/axios@0.27.2/dist/axios.min.js // @require https://unpkg.com/axios-userscript-adapter@0.2.0/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/react@18.2.0/umd/react.production.min.js // @require https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js // @connect app.bilibili.com // @connect passport.bilibili.com // @connect link.acg.tv // @connect www.mcbbs.net // @grant GM.xmlHttpRequest // @grant GM_deleteValue // @grant GM_getValue // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant unsafeWindow // @downloadURL none // ==/UserScript== (i=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=i,document.head.appendChild(e)})(`.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}._modal-mask_1fjgs_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_1fjgs_1{width:500px;max-height:calc(80vh - 50px);background-color:#fff;border-radius:10px;padding:0 15px 15px;display:flex;flex-direction:column;overflow:hidden}._modal-header_1fjgs_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal-body_1fjgs_30{padding-top:0;flex-grow:1;overflow-y:scroll}._modal-title_1fjgs_35{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._btn-close_1fjgs_42{margin-left:10px}._btn-close_1fjgs_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._btn-close_1fjgs_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._toast-container_mcbuq_1{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999999;padding:12px 24px;font-size:14px;min-width:200px;width:max-content;max-width:450px;background:#ffb243;color:#fff;border-radius:6px;white-space:pre-wrap}._toast-container_mcbuq_1._single-line_mcbuq_17{text-align:center}._modal_pfmut_1{width:500px}._title-desc_pfmut_4{margin-left:5px;font-size:40%}._reason-list_pfmut_8{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_pfmut_8{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_pfmut_8{border:1px solid #333}._bili-video-card_1a93a_1{position:relative}._image-wrapper_1a93a_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_1a93a_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._preview-card-wrapper_1a93a_8 ._preview-card-inner_1a93a_21{width:100%;height:100%}._watch-later_1a93a_25{z-index:3}._badge_1a93a_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_1a93a_36{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_1a93a_51{color:default}._btn-dislike_1a93a_54{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_1a93a_54 ._btn-dislike-icon_1a93a_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_1a93a_54 ._btn-dislike-tip_1a93a_76{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_1a93a_91{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_1a93a_91{border:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-icon_1a93a_122{margin-bottom:5px}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-reason_1a93a_125{font-size:20px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-desc_1a93a_129{font-size:16px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{border-top:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._video-grid_14t5i_9{display:grid;position:relative;width:100%;grid-gap:20px 12px}@media (max-width: 1099.9px){._video-grid_14t5i_9{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1100px) and (max-width: 1700.9px){._video-grid_14t5i_9{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}@media (min-width: 1701px){._video-grid_14t5i_9{grid-template-columns:repeat(6,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 13){display:none!important}}._video-grid_14t5i_9._internal-testing_14t5i_43{grid-gap:20px 20px}@media (max-width: 1399.9px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 5){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1400px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 6){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}._narrow-mode_14t5i_71{grid-template-columns:repeat(2,1fr)!important}._checkbox_5cp8u_1{margin-top:1px;cursor:pointer;outline:none}._checkbox_5cp8u_1+label{margin-left:2px;user-select:none;cursor:pointer}._config-icon_1jab1_1{line-height:1;margin-right:5px;font-size:0}._settings-group_1jab1_6{margin-bottom:10px}._settings-group_1jab1_6 ._settings-group-title_1jab1_9{font-size:2em}._settings-group_1jab1_6 ._settings-group-content_1jab1_12{color:default}._settings-group_1jab1_6 ._settings-group-content_1jab1_12 button:first-child{margin-left:0}._row_1jab1_18{display:flex;align-items:center}._check_1jab1_22{margin-left:20px}._check_1jab1_22:first-child{margin-left:0}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._modal-mask_1as61_1._narrow-mode_1as61_1{background-color:#000000e6}._modal_1as61_1{width:calc(100vw - 30px);height:calc(100vh - 30px);max-height:unset;padding-right:0}body.dark ._modal_1as61_1{border:1px solid #fb7299}._modal_1as61_1._narrow-mode_1as61_1{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1as61_1._narrow-mode_1as61_1{border:none}._modal-header_1as61_21,._modal-body_1as61_22{padding-right:15px}body.dark ._btn-refresh_1as61_25{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px} `); var ay=Object.defineProperty;var cy=(p,me,He)=>me in p?ay(p,me,{enumerable:!0,configurable:!0,writable:!0,value:He}):p[me]=He;var Vr=(p,me,He)=>(cy(p,typeof me!="symbol"?me+"":me,He),He);(function(p,me,He,sc){"use strict";const Gt=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function oc(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ue=Gt(p),$i=oc(p),ac=Gt(me),Kr=Gt(He),cc=Gt(sc);var uc=typeof global=="object"&&global&&global.Object===Object&&global;const Hi=uc;var lc=typeof self=="object"&&self&&self.Object===Object&&self,fc=Hi||lc||Function("return this")();const ge=fc;var dc=ge.Symbol;const ve=dc;var Ui=Object.prototype,hc=Ui.hasOwnProperty,pc=Ui.toString,vt=ve?ve.toStringTag:void 0;function mc(e){var t=hc.call(e,vt),r=e[vt];try{e[vt]=void 0;var n=!0}catch{}var i=pc.call(e);return n&&(t?e[vt]=r:delete e[vt]),i}var gc=Object.prototype,vc=gc.toString;function yc(e){return vc.call(e)}var bc="[object Null]",wc="[object Undefined]",Gi=ve?ve.toStringTag:void 0;function qe(e){return e==null?e===void 0?wc:bc:Gi&&Gi in Object(e)?mc(e):yc(e)}function et(e){return e!=null&&typeof e=="object"}var _c="[object Symbol]";function Yt(e){return typeof e=="symbol"||et(e)&&qe(e)==_c}function Sc(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r0){if(++t>=tu)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function su(e){return function(){return e}}var ou=function(){try{var e=Ge(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Vt=ou;var au=Vt?function(e,t){return Vt(e,"toString",{configurable:!0,enumerable:!1,value:su(t),writable:!0})}:Nc,cu=iu(au);const uu=cu;var lu=9007199254740991,fu=/^(?:0|[1-9]\d*)$/;function qr(e,t){var r=typeof e;return t=t==null?lu:t,!!t&&(r=="number"||r!="symbol"&&fu.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=vu}function yu(e){return e!=null&&tn(e.length)&&!Zi(e)}var bu=Object.prototype;function wu(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||bu;return e===r}function _u(e,t){for(var r=-1,n=Array(e);++r-1}function Fl(e,t){var r=this.__data__,n=Kt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t0&&r(a)?t>1?ds(a,t-1,r,n,i):ls(i,a):n||(i[i.length]=a)}return i}function ef(e){var t=e==null?0:e.length;return t?ds(e,1):[]}function tf(e){return uu(gu(e,void 0,ef),e+"")}var rf="Expected a function";function nf(e,t){var r;if(typeof t!="function")throw new TypeError(rf);return e=Ji(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function sf(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n=n?e:sf(e,t,r)}var af="\\ud800-\\udfff",cf="\\u0300-\\u036f",uf="\\ufe20-\\ufe2f",lf="\\u20d0-\\u20ff",ff=cf+uf+lf,df="\\ufe0e\\ufe0f",hf="\\u200d",pf=RegExp("["+hf+af+ff+df+"]");function cn(e){return pf.test(e)}function mf(e){return e.split("")}var hs="\\ud800-\\udfff",gf="\\u0300-\\u036f",vf="\\ufe20-\\ufe2f",yf="\\u20d0-\\u20ff",bf=gf+vf+yf,wf="\\ufe0e\\ufe0f",_f="["+hs+"]",un="["+bf+"]",ln="\\ud83c[\\udffb-\\udfff]",Sf="(?:"+un+"|"+ln+")",ps="[^"+hs+"]",ms="(?:\\ud83c[\\udde6-\\uddff]){2}",gs="[\\ud800-\\udbff][\\udc00-\\udfff]",Cf="\\u200d",vs=Sf+"?",ys="["+wf+"]?",kf="(?:"+Cf+"(?:"+[ps,ms,gs].join("|")+")"+ys+vs+")*",Tf=ys+vs+kf,Ef="(?:"+[ps+un+"?",un,ms,gs,_f].join("|")+")",xf=RegExp(ln+"(?="+ln+")|"+Ef+Tf,"g");function Of(e){return e.match(xf)||[]}function Af(e){return cn(e)?Of(e):mf(e)}function Lf(){this.__data__=new Ae,this.size=0}function Mf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Pf(e){return this.__data__.get(e)}function Rf(e){return this.__data__.has(e)}var Df=200;function Nf(e,t){var r=this.__data__;if(r instanceof Ae){var n=r.__data__;if(!wt||n.lengtha))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,m=r&sd?new Zt:void 0;for(s.set(e,t),s.set(t,e);++f=t||k<0||f&&N>=s}function _(){var b=mn();if(v(b))return M(b);a=setTimeout(_,y(b))}function M(b){return a=void 0,d&&n?m(b):(n=i=void 0,o)}function A(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function x(){return a===void 0?o:M(mn())}function w(){var b=mn(),k=v(b);if(n=arguments,i=this,u=b,k){if(a===void 0)return g(u);if(f)return clearTimeout(a),a=setTimeout(_,t),m(u)}return a===void 0&&(a=setTimeout(_,t)),o}return w.cancel=A,w.flush=x,w}function jd(e,t){return Rs(e,t)}function Id(e,t,r,n){if(!Fe(e))return e;t=Jt(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++iBd)return r;do t%2&&(r+=e),t=$d(t/2),t&&(e+=e);while(t);return r}var Hd=Pd("length");const Ud=Hd;var Fs="\\ud800-\\udfff",Gd="\\u0300-\\u036f",Yd="\\ufe20-\\ufe2f",Vd="\\u20d0-\\u20ff",Kd=Gd+Yd+Vd,Xd="\\ufe0e\\ufe0f",Jd="["+Fs+"]",gn="["+Kd+"]",vn="\\ud83c[\\udffb-\\udfff]",Zd="(?:"+gn+"|"+vn+")",js="[^"+Fs+"]",Is="(?:\\ud83c[\\udde6-\\uddff]){2}",Ws="[\\ud800-\\udbff][\\udc00-\\udfff]",Qd="\\u200d",zs=Zd+"?",Bs="["+Xd+"]?",qd="(?:"+Qd+"(?:"+[js,Is,Ws].join("|")+")"+Bs+zs+")*",eh=Bs+zs+qd,th="(?:"+[js+gn+"?",gn,Is,Ws,Jd].join("|")+")",$s=RegExp(vn+"(?="+vn+")|"+th+eh,"g");function rh(e){for(var t=$s.lastIndex=0;$s.test(e);)++t;return t}function Hs(e){return cn(e)?rh(e):Ud(e)}var nh=Math.ceil;function ih(e,t){t=t===void 0?" ":Xr(t);var r=t.length;if(r<2)return r?Ns(t,e):t;var n=Ns(t,nh(e/Hs(t)));return cn(t)?of(Af(n),0,e).join(""):n.slice(0,e)}function sh(e,t,r){e=us(e),t=Ji(t);var n=t?Hs(e):0;return t&&nnew Proxy(e,t);const wn=Object.getPrototypeOf,_n=new WeakMap,Gs=e=>e&&(_n.has(e)?_n.get(e):wn(e)===Object.prototype||wn(e)===Array.prototype),Ys=e=>typeof e=="object"&&e!==null,Vs=new WeakMap,Ks=e=>e[bn]||e,Xs=(e,t,r)=>{if(!Gs(e))return e;const n=Ks(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(a=>!a.writable))(n);let s=r&&r.get(n);return s&&s[1].f===i||(s=((o,a)=>{const u={f:a};let c=!1;const l=(d,m)=>{if(!c){let g=u.a.get(o);g||(g=new Set,u.a.set(o,g)),m&&g.has(yn)||g.add(d)}},f={get:(d,m)=>m===bn?o:(l(m),Xs(d[m],u.a,u.c)),has:(d,m)=>m===lh?(c=!0,u.a.delete(o),!0):(l(m),m in d),getOwnPropertyDescriptor:(d,m)=>(l(m,!0),Object.getOwnPropertyDescriptor(d,m)),ownKeys:d=>(l(yn),Reflect.ownKeys(d))};return a&&(f.set=f.deleteProperty=()=>!1),[f,u]})(n,i),s[1].p=fh(i?(o=>{let a=Vs.get(o);if(!a){if(Array.isArray(o))a=Array.from(o);else{const u=Object.getOwnPropertyDescriptors(o);Object.values(u).forEach(c=>{c.configurable=!0}),a=Object.create(wn(o),u)}Vs.set(o,a)}return a})(n):n,s[0]),r&&r.set(n,s)),s[1].a=t,s[1].c=r,s[1].p},dh=(e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((i,s)=>i!==n[s])},Js=(e,t,r,n)=>{if(Object.is(e,t))return!1;if(!Ys(e)||!Ys(t))return!0;const i=r.get(Ks(e));if(!i)return!0;if(n){const o=n.get(e);if(o&&o.n===t)return o.g;n.set(e,{n:t,g:!1})}let s=null;for(const o of i){const a=o===yn?dh(e,t):Js(e[o],t[o],r,n);if(a!==!0&&a!==!1||(s=a),s)break}return s===null&&(s=!0),n&&n.set(e,{n:t,g:s}),s},Zs=e=>Gs(e)&&e[bn]||null,Qs=(e,t=!0)=>{_n.set(e,t)};var hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ph(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mh(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var qs={exports:{}},eo={};/** * @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 tt=ue.default;function gh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vh=typeof Object.is=="function"?Object.is:gh,yh=tt.useState,bh=tt.useEffect,wh=tt.useLayoutEffect,_h=tt.useDebugValue;function Sh(e,t){var r=t(),n=yh({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return wh(function(){i.value=r,i.getSnapshot=t,Sn(i)&&s({inst:i})},[e,r,t]),bh(function(){return Sn(i)&&s({inst:i}),e(function(){Sn(i)&&s({inst:i})})},[e]),_h(r),r}function Sn(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!vh(e,r)}catch{return!0}}function Ch(e,t){return t()}var kh=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ch:Sh;eo.useSyncExternalStore=tt.useSyncExternalStore!==void 0?tt.useSyncExternalStore:kh,function(e){e.exports=eo}(qs);const Th=ph(qs.exports),Cn=e=>typeof e=="object"&&e!==null,le=Symbol(),kn=new WeakSet,Eh=(e=Object.is,t=(c,l)=>new Proxy(c,l),r=c=>Cn(c)&&!kn.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),n=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},i=new WeakMap,s=(c,l,f,d=n)=>{const m=i.get(l);if((m==null?void 0:m[0])===f)return m[1];const g=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return Qs(g,!0),i.set(l,[f,g]),Reflect.ownKeys(c).forEach(y=>{const v=Reflect.get(c,y,l);kn.has(v)?(Qs(v,!1),g[y]=v):v instanceof Promise?Object.defineProperty(g,y,{get(){return d(v)}}):v!=null&&v[le]?g[y]=Tn(v,d):g[y]=v}),Object.freeze(g)},o=new WeakMap,a=[1],u=c=>{if(!Cn(c))throw new Error("object required");const l=o.get(c);if(l)return l;let f=a[0];const d=new Set,m=(x,w=++a[0])=>{f!==w&&(f=w,d.forEach(b=>b(x,w)))},g=new Map,y=x=>{let w=g.get(x);return w||(w=(b,k)=>{const N=[...b];N[1]=[x,...N[1]],m(N,k)},g.set(x,w)),w},v=x=>{const w=g.get(x);return g.delete(x),w},_=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),A=t(_,{get(x,w,b){return w===le?[x,b,f,s,d]:Reflect.get(x,w,b)},deleteProperty(x,w){var b;const k=Reflect.get(x,w),N=(b=k==null?void 0:k[le])==null?void 0:b[4];N&&N.delete(v(w));const j=Reflect.deleteProperty(x,w);return j&&m(["delete",[w],k]),j},set(x,w,b,k){var N,j;const E=Reflect.has(x,w),F=Reflect.get(x,w,k);if(E&&e(F,b))return!0;const I=(N=F==null?void 0:F[le])==null?void 0:N[4];I&&I.delete(v(w)),Cn(b)&&(b=Zs(b)||b);let O=b;return(j=Object.getOwnPropertyDescriptor(x,w))!=null&&j.set||(b instanceof Promise?b.then(C=>{b.status="fulfilled",b.value=C,m(["resolve",[w],C])}).catch(C=>{b.status="rejected",b.reason=C,m(["reject",[w],C])}):(!(b!=null&&b[le])&&r(b)&&(O=rt(b)),O!=null&&O[le]&&O[le][4].add(y(w)))),Reflect.set(x,w,O,k),m(["set",[w],b,F]),!0}});return o.set(c,A),Reflect.ownKeys(c).forEach(x=>{const w=Object.getOwnPropertyDescriptor(c,x);w.get||w.set?Object.defineProperty(_,x,w):A[x]=c[x]}),A})=>[u,le,kn,e,t,r,n,i,s,o,a],[xh]=Eh();function rt(e={}){return xh(e)}function to(e,t,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[le])&&console.warn("Please use proxy object");let n;const i=[],s=e[le][4],o=a=>{if(i.push(a),r){t(i.splice(0));return}n||(n=Promise.resolve().then(()=>{n=void 0,s.has(o)&&t(i.splice(0))}))};return s.add(o),()=>s.delete(o)}function Tn(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[le])&&console.warn("Please use proxy object");const[r,n,i,s]=e[le];return s(r,n,i,t)}const{use:ro}=ue.default,{useSyncExternalStore:Oh}=Th,Ah=(e,t)=>{const r=[],n=new WeakSet,i=(s,o)=>{if(n.has(s))return;let a;typeof s=="object"&&s!==null&&(n.add(s),a=t.get(Zs(s)||s)),a?a.forEach(u=>{"value"in(Object.getOwnPropertyDescriptor(s,u)||{})&&i(s[u],o?[...o,u]:[u])}):o&&r.push(o)};return i(e),r},Lh=(e,t)=>{const r=p.useRef();p.useEffect(()=>{r.current=Ah(e,t)}),p.useDebugValue(r.current)};function nt(e,t){const r=t==null?void 0:t.sync,n=p.useRef(),i=p.useRef();let s=!0;const o=Oh(p.useCallback(c=>{const l=to(e,c,r);return c(),l},[e,r]),()=>{const c=Tn(e,ro);try{if(!s&&n.current&&i.current&&!Js(n.current,c,i.current,new WeakMap))return n.current}catch{}return c},()=>Tn(e,ro));s=!1;const a=new WeakMap;p.useEffect(()=>{n.current=o,i.current=a}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Lh(o,a);const u=p.useMemo(()=>new WeakMap,[]);return Xs(o,a,u)}const no={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1},fe=rt(no),io=Object.keys(no),Ie=function(){return nt(fe)},so="bilibili-app-recommend.config";function Mh(){const e=GM_getValue(so);e&&typeof e=="object"&&Object.assign(fe,Us(e,io)),to(fe,()=>{Ph()})}function Ph(){const e=Us(fe,io);GM_setValue(so,e)}function Rh(e){Object.assign(fe,e)}Mh();var _t={exports:{}};const Dh=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),oo=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},ao=({clearTimeout:e,setTimeout:t,willResolve:r})=>(n,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(oo());let o,a,u;const c=e||clearTimeout,l=()=>{c(o),u(oo())},f=()=>{s&&s.removeEventListener("abort",l)},d=new Promise((m,g)=>{a=()=>{f(),r?m(i):g(i)},u=g,o=(t||setTimeout)(a,n)});return s&&s.addEventListener("abort",l,{once:!0}),d.clear=()=>{c(o),o=null,a()},d},co=e=>{const t=ao({...e,willResolve:!0});return t.reject=ao({...e,willResolve:!1}),t.range=(r,n,i)=>t(Dh(r,n),i),t},En=co();En.createWithTimers=co,_t.exports=En,_t.exports.default=En;var qt,uo=ac.default;qt=uo.createRoot,uo.hydrateRoot;const fy="",er=zd(()=>!!document.querySelectorAll(".bili-feed4").length),lo=function(){return p.useMemo(()=>er(),[])},fo=document.querySelector(".bili-header__bar"),ho=Boolean(fo&&window.getComputedStyle(fo).display==="none")?50:64,po=()=>document.body.classList.contains("dark"),mo=rt({value:po()});function xn(){return nt(mo).value}const tr=new MutationObserver(function(){mo.value=po()});tr.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{tr==null||tr.disconnect()});var On={},ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.DEFAULT_ICON_CONFIGS=void 0,ie.IconConverter=wo,ie.IconProvider=void 0,ie.IconWrapper=$h;var rr=Nh(ue.default);function go(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(go=function(n){return n?r:t})(e)}function Nh(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=go(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}var Fh=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function vo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yo(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function Wh(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s=0)&&(r[i]=e[i]);return r}var bo={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};ie.DEFAULT_ICON_CONFIGS=bo;function zh(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function wo(e,t,r){var n=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||r.theme;switch(s){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:i,id:e}}var _o=(0,rr.createContext)(bo),Bh=_o.Provider;ie.IconProvider=Bh;function $h(e,t,r){return function(n){var i=n.size,s=n.strokeWidth,o=n.strokeLinecap,a=n.strokeLinejoin,u=n.theme,c=n.fill,l=n.className,f=n.spin,d=Ih(n,Fh),m=(0,rr.useContext)(_o),g=(0,rr.useMemo)(zh,[]),y=wo(g,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:a,theme:u,fill:c},m),v=[m.prefix+"-icon"];return v.push(m.prefix+"-icon-"+e),t&&m.rtl&&v.push(m.prefix+"-icon-rtl"),f&&v.push(m.prefix+"-icon-spin"),l&&v.push(l),rr.default.createElement("span",yo(yo({},d),{},{className:v.join(" ")}),r(y))}}Object.defineProperty(On,"__esModule",{value:!0});var So=On.default=void 0,An=Uh(ue.default),Hh=ie;function Uh(e){return e&&e.__esModule?e:{default:e}}var Gh=(0,Hh.IconWrapper)("close",!1,function(e){return An.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},An.default.createElement("path",{d:"M8 8L40 40",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),An.default.createElement("path",{d:"M8 40L40 8",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});So=On.default=Gh;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});var Co=Ln.default=void 0,Mn=Vh(ue.default),Yh=ie;function Vh(e){return e&&e.__esModule?e:{default:e}}var Kh=(0,Yh.IconWrapper)("config",!1,function(e){return Mn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Mn.default.createElement("path",{d:"M24 4L18 10H10V18L4 24L10 30V38H18L24 44L30 38H38V30L44 24L38 18V10H30L24 4Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Mn.default.createElement("path",{d:"M24 30C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30Z",fill:e.colors[3],stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}))});Co=Ln.default=Kh;var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});var ko=Pn.default=void 0,St=Jh(ue.default),Xh=ie;function Jh(e){return e&&e.__esModule?e:{default:e}}var Zh=(0,Xh.IconWrapper)("distraught-face",!1,function(e){return St.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},St.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),St.default.createElement("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),St.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),St.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});ko=Pn.default=Zh;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});var To=Rn.default=void 0,Dn=qh(ue.default),Qh=ie;function qh(e){return e&&e.__esModule?e:{default:e}}var ep=(0,Qh.IconWrapper)("return",!0,function(e){return Dn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Dn.default.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Dn.default.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});To=Rn.default=ep;var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});var Eo=Nn.default=void 0,ye=rp(ue.default),tp=ie;function rp(e){return e&&e.__esModule?e:{default:e}}var np=(0,tp.IconWrapper)("loading-three",!1,function(e){return ye.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},ye.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M24 12V15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M32.4852 15.5147L30.3639 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M36 24H33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M32.4852 32.4853L30.3639 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M24 36V33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M15.5148 32.4853L17.6361 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M12 24H15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M15.5148 15.5147L17.6361 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Eo=Nn.default=np;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});var xo=Fn.default=void 0,jn=sp(ue.default),ip=ie;function sp(e){return e&&e.__esModule?e:{default:e}}var op=(0,ip.IconWrapper)("loading",!0,function(e){return jn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},jn.default.createElement("path",{d:"M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),jn.default.createElement("path",{d:"M36 24C36 17.3726 30.6274 12 24 12C17.3726 12 12 17.3726 12 24C12 30.6274 17.3726 36 24 36V36",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});xo=Fn.default=op;function ap(e){if(e.sheet)return e.sheet;for(var t=0;t0?q(st,--re):0,it--,K===10&&(it=1,or--),K}function se(){return K=re2||Et(K)>3?"":" "}function bp(e,t){for(;--t&&se()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return Tt(e,cr()+(t<6&&we()==32&&se()==32))}function $n(e){for(;se();)switch(K){case e:return re;case 34:case 39:e!==34&&e!==39&&$n(K);break;case 40:e===41&&$n(e);break;case 92:se();break}return re}function wp(e,t){for(;se()&&e+K!==47+10;)if(e+K===42+42&&we()===47)break;return"/*"+Tt(t,re-1)+"*"+ir(e===47?e:se())}function _p(e){for(;!Et(we());)se();return Tt(e,re)}function Sp(e){return Ro(lr("",null,null,null,[""],e=Po(e),0,[0],e))}function lr(e,t,r,n,i,s,o,a,u){for(var c=0,l=0,f=o,d=0,m=0,g=0,y=1,v=1,_=1,M=0,A="",x=i,w=s,b=n,k=A;v;)switch(g=M,M=se()){case 40:if(g!=108&&q(k,f-1)==58){zn(k+=B(ur(M),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:k+=ur(M);break;case 9:case 10:case 13:case 32:k+=yp(g);break;case 92:k+=bp(cr()-1,7);continue;case 47:switch(we()){case 42:case 47:sr(Cp(wp(se(),cr()),t,r),u);break;default:k+="/"}break;case 123*y:a[c++]=be(k)*_;case 125*y:case 59:case 0:switch(M){case 0:case 125:v=0;case 59+l:m>0&&be(k)-f&&sr(m>32?No(k+";",n,r,f-1):No(B(k," ","")+";",n,r,f-2),u);break;case 59:k+=";";default:if(sr(b=Do(k,t,r,c,l,i,a,A,x=[],w=[],f),s),M===123)if(l===0)lr(k,t,b,b,x,s,f,a,w);else switch(d===99&&q(k,3)===110?100:d){case 100:case 109:case 115:lr(e,b,b,n&&sr(Do(e,b,b,0,0,i,a,A,i,x=[],f),w),i,w,f,a,n?x:w);break;default:lr(k,b,b,b,[""],w,0,a,w)}}c=l=m=0,y=_=1,A=k="",f=o;break;case 58:f=1+be(k),m=g;default:if(y<1){if(M==123)--y;else if(M==125&&y++==0&&vp()==125)continue}switch(k+=ir(M),M*y){case 38:_=l>0?1:(k+="\f",-1);break;case 44:a[c++]=(be(k)-1)*_,_=1;break;case 64:we()===45&&(k+=ur(se())),d=we(),l=f=be(A=k+=_p(cr())),M++;break;case 45:g===45&&be(k)==2&&(y=0)}}return s}function Do(e,t,r,n,i,s,o,a,u,c,l){for(var f=i-1,d=i===0?s:[""],m=Bn(d),g=0,y=0,v=0;g0?d[_]+" "+M:B(M,/&\f/g,d[_])))&&(u[v++]=A);return ar(e,t,r,i===0?In:a,u,c,l)}function Cp(e,t,r){return ar(e,t,r,Oo,ir(gp()),Ct(e,2,-2),0)}function No(e,t,r,n){return ar(e,t,r,Wn,Ct(e,0,n),Ct(e,n+1,-1),n)}function ot(e,t){for(var r="",n=Bn(e),i=0;i6)switch(q(e,t+1)){case 109:if(q(e,t+4)!==45)break;case 102:return B(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+nr+(q(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zn(e,"stretch")?jo(B(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(q(e,t+1)!==115)break;case 6444:switch(q(e,be(e)-3-(~zn(e,"!important")&&10))){case 107:return B(e,":",":"+z)+e;case 101:return B(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(q(e,14)===45?"inline-":"")+"box$3$1"+z+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(q(e,t+11)){case 114:return z+e+ee+B(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+ee+B(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+ee+B(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+ee+e+e}return e}var Rp=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Wn:t.return=jo(t.value,t.length);break;case Ao:return ot([kt(t,{value:B(t.value,"@","@"+z)})],i);case In:if(t.length)return mp(t.props,function(s){switch(pp(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ot([kt(t,{props:[B(s,/:(read-\w+)/,":"+nr+"$1")]})],i);case"::placeholder":return ot([kt(t,{props:[B(s,/:(plac\w+)/,":"+z+"input-$1")]}),kt(t,{props:[B(s,/:(plac\w+)/,":"+nr+"$1")]}),kt(t,{props:[B(s,/:(plac\w+)/,ee+"input-$1")]})],i)}return""})}},Dp=[Rp],Io=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Dp,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),_=1;_=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Up={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Gp=/[A-Z]|^ms/g,Yp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Go=function(t){return t.charCodeAt(1)===45},Yo=function(t){return t!=null&&typeof t!="boolean"},Vn=xp(function(e){return Go(e)?e:e.replace(Gp,"-$&").toLowerCase()}),Vo=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Yp,function(n,i,s){return _e={name:i,styles:s,next:_e},i})}return Up[t]!==1&&!Go(t)&&typeof r=="number"&&r!==0?r+"px":r},hy="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function xt(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return _e={name:r.name,styles:r.styles,next:_e},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)_e={name:n.name,styles:n.styles,next:_e},n=n.next;var i=r.styles+";";return i}return Vp(e,t,r)}case"function":{if(e!==void 0){var s=_e,o=r(e);return _e=s,xt(e,t,o)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function Vp(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},oa=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n-1&&(s=setTimeout(function(){Tr.delete(t)},r)),Tr.set(t,kr(kr({},n),{timer:s}))},vm=function(t){return Tr.get(t)},Er=new Map,ym=function(t){return Er.get(t)},bm=function(t,r){Er.set(t,r),r.then(function(n){return Er.delete(t),n}).catch(function(){Er.delete(t)})},Ke={},wm=function(t,r){Ke[t]&&Ke[t].forEach(function(n){return n(r)})},qn=function(t,r){return Ke[t]||(Ke[t]=[]),Ke[t].push(r),function(){var i=Ke[t].indexOf(r);Ke[t].splice(i,1)}},_m=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Sm=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Em=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},jm=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n-1&&Dt.splice(r,1)}}if(Pt){var ua=function(){if(!(!ei()||!Wm()))for(var t=0;t0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Ym=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Qm=function(){var t=Zm(p.useState({}),2),r=t[1];return p.useCallback(function(){return r({})},[])};const qm=Qm;var ze=globalThis&&globalThis.__assign||function(){return ze=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},lt=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},fa=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},da=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function pa(e,t){e===void 0&&(e=!1);var r=cg(p.useState(e),2),n=r[0],i=r[1],s=p.useMemo(function(){var o=t===void 0?!e:t,a=function(){return i(function(d){return d===e?o:e})},u=function(d){return i(d)},c=function(){return i(e)},l=function(){return i(o)};return{toggle:a,set:u,setLeft:c,setRight:l}},[]);return[n,s]}var ug=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function lg(e){e===void 0&&(e=!1);var t=ug(pa(e),2),r=t[0],n=t[1],i=n.toggle,s=n.set,o=p.useMemo(function(){var a=function(){return s(!0)},u=function(){return s(!1)};return{toggle:i,set:function(l){return s(!!l)},setTrue:a,setFalse:u}},[]);return[r,o]}function xr(e,t){if(!!Pt){if(!e)return t;var r;return ct(e)?r=e():"current"in e?r=e.current:r=e,r}}var fg=function(t){var r=function(i,s,o){var a=p.useRef(!1),u=p.useRef([]),c=p.useRef([]),l=p.useRef();t(function(){var f,d=Array.isArray(o)?o:[o],m=d.map(function(g){return xr(g)});if(!a.current){a.current=!0,u.current=m,c.current=s,l.current=i();return}(m.length!==u.current.length||!Qn(m,u.current)||!Qn(s,c.current))&&((f=l.current)===null||f===void 0||f.call(l),u.current=m,c.current=s,l.current=i())}),Mt(function(){var f;(f=l.current)===null||f===void 0||f.call(l),a.current=!1})};return r},dg=fg(p.useEffect);const ma=dg;var ga={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(hh,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",u="hour",c="day",l="week",f="month",d="quarter",m="year",g="date",y="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var C=["th","st","nd","rd"],S=O%100;return"["+O+(C[(S-20)%10]||C[S]||C[0])+"]"}},A=function(O,C,S){var P=String(O);return!P||P.length>=C?O:""+Array(C+1-P.length).join(S)+O},x={s:A,z:function(O){var C=-O.utcOffset(),S=Math.abs(C),P=Math.floor(S/60),T=S%60;return(C<=0?"+":"-")+A(P,2,"0")+":"+A(T,2,"0")},m:function O(C,S){if(C.date()1)return O(D[0])}else{var W=C.name;b[W]=C,T=W}return!P&&T&&(w=T),T||!P&&w},j=function(O,C){if(k(O))return O.clone();var S=typeof C=="object"?C:{};return S.date=O,S.args=arguments,new F(S)},E=x;E.l=N,E.i=k,E.w=function(O,C){return j(O,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var F=function(){function O(S){this.$L=N(S.locale,null,!0),this.parse(S)}var C=O.prototype;return C.parse=function(S){this.$d=function(P){var T=P.date,R=P.utc;if(T===null)return new Date(NaN);if(E.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var D=T.match(v);if(D){var W=D[2]-1||0,Y=(D[7]||"0").substring(0,3);return R?new Date(Date.UTC(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,Y)):new Date(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,Y)}}return new Date(T)}(S),this.$x=S.x||{},this.init()},C.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},C.$utils=function(){return E},C.isValid=function(){return this.$d.toString()!==y},C.isSame=function(S,P){var T=j(S);return this.startOf(P)<=T&&T<=this.endOf(P)},C.isAfter=function(S,P){return j(S)0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};const ri=function(e,t){var r=t||{},n=r.onEnter,i=r.onLeave,s=r.onChange,o=hg(lg(!1),2),a=o[0],u=o[1],c=u.setTrue,l=u.setFalse;return Or("mouseenter",function(){n==null||n(),c(),s==null||s(!0)},{target:e}),Or("mouseleave",function(){i==null||i(),l(),s==null||s(!1)},{target:e}),a};var pg=function(t,r){return r===void 0&&(r=[]),jd(t,r)},mg=function(t,r,n){var i=p.useRef(),s=p.useRef(0);pg(r,i.current)||(i.current=r,s.current+=1),ma(t,[s.current],n)};const gg=mg;var ni=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vg={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},ii={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 yg(e){var t=Object.keys(ii).reduce(function(r,n){return ii[n](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function ya(e,t,r){var n,i;if(!e.key)return!1;if(ia(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var a=ni(s),u=a.next();!u.done;u=a.next()){var c=u.value,l=ii[c],f=vg[c.toLowerCase()];(l&&l(e)||f&&f===e.keyCode)&&o++}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r?o===s.length&&yg(e)===s.length:o===s.length}function bg(e,t){return ct(e)?e:dm(e)||ia(e)?function(r){return ya(r,e,t)}:Array.isArray(e)?function(r){return e.some(function(n){return ya(r,n,t)})}:e?function(){return!0}:function(){return!1}}var wg=["keydown"];function Me(e,t,r){var n=r||{},i=n.events,s=i===void 0?wg:i,o=n.target,a=n.exactMatch,u=a===void 0?!1:a,c=Lt(t),l=Lt(e);gg(function(){var f,d,m,g=xr(o,window);if(!!g){var y=function(x){var w,b=bg(l.current,u);if(b(x))return(w=c.current)===null||w===void 0?void 0:w.call(c,x)};try{for(var v=ni(s),_=v.next();!_.done;_=v.next()){var M=_.value;(m=g==null?void 0:g.addEventListener)===null||m===void 0||m.call(g,M,y)}}catch(A){f={error:A}}finally{try{_&&!_.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}return function(){var A,x,w;try{for(var b=ni(s),k=b.next();!k.done;k=b.next()){var N=k.value;(w=g==null?void 0:g.removeEventListener)===null||w===void 0||w.call(g,N,y)}}catch(j){A={error:j}}finally{try{k&&!k.done&&(x=b.return)&&x.call(b)}finally{if(A)throw A.error}}}}},[s],o)}var _g=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function Sg(e){var t=p.useRef(0),r=_g(p.useState(e),2),n=r[0],i=r[1],s=p.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return Mt(function(){cancelAnimationFrame(t.current)}),[n,s]}var Cg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},kg={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN};const Tg=function(e){var t=Cg(Sg(kg),2),r=t[0],n=t[1];return Or("mousemove",function(i){var s=i.screenX,o=i.screenY,a=i.clientX,u=i.clientY,c=i.pageX,l=i.pageY,f={screenX:s,screenY:o,clientX:a,clientY:u,pageX:c,pageY:l,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},d=xr(e);if(d){var m=d.getBoundingClientRect(),g=m.left,y=m.top,v=m.width,_=m.height;f.elementPosX=g+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=c-f.elementPosX,f.elementY=l-f.elementPosY,f.elementW=v,f.elementH=_}n(f)},{target:function(){return document}}),r},de={modalMask:"_modal-mask_1fjgs_1",modal:"_modal_1fjgs_1",modalHeader:"_modal-header_1fjgs_23",modalBody:"_modal-body_1fjgs_30",modalTitle:"_modal-title_1fjgs_35",btnClose:"_btn-close_1fjgs_42"};let Nt=0;const Eg=()=>{Nt++,document.body.style.overflow="hidden"},xg=()=>{Nt--,Nt<0&&(Nt=0),Nt===0&&(document.body.style.overflow="overlay")};function si({show:e,onHide:t,children:r,clsModalMask:n,clsModal:i,hideWhenMaskOnClick:s=!1,hideWhenEsc:o=!1}){p.useLayoutEffect(()=>{e?Eg():xg()},[e]);const a=p.useRef(null),u=xn(),{bg:c,c:l}=p.useMemo(()=>{const y=window.getComputedStyle(document.body)["background-color"],v=window.getComputedStyle(document.body).color;return{bg:y,c:v}},[u]),f=p.useMemo(()=>u?{"--bg":c,"--c":l,backgroundColor:c,color:l}:{},[c,l,u]),d=p.useId(),m=p.useMemo(()=>{const y=document.createElement("div");return y.setAttribute("data-id","base-modal-"+d),document.body.appendChild(y),y},[]),g=H(y=>{var v;(v=a.current)!=null&&v.contains(y.target)||s&&t()});return Me("esc",()=>{!e||o&&t()}),e?me.createPortal(h("div",{className:J(de.modalMask,n),onClick:g,children:h("div",{className:J(de.modal,i),style:f,ref:a,children:r})}),m):null}const oi=e=>h(At,{...e,name:"Close",size:18,style:{cursor:"pointer",marginLeft:10,...e.style}});var ft=1e3,dt=ft*60,ht=dt*60,Xe=ht*24,Og=Xe*7,Ag=Xe*365.25,Lg=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Mg(e);if(r==="number"&&isFinite(e))return t.long?Rg(e):Pg(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Mg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ag;case"weeks":case"week":case"w":return r*Og;case"days":case"day":case"d":return r*Xe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ht;case"minutes":case"minute":case"mins":case"min":case"m":return r*dt;case"seconds":case"second":case"secs":case"sec":case"s":return r*ft;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Pg(e){var t=Math.abs(e);return t>=Xe?Math.round(e/Xe)+"d":t>=ht?Math.round(e/ht)+"h":t>=dt?Math.round(e/dt)+"m":t>=ft?Math.round(e/ft)+"s":e+"ms"}function Rg(e){var t=Math.abs(e);return t>=Xe?Ar(e,t,Xe,"day"):t>=ht?Ar(e,t,ht,"hour"):t>=dt?Ar(e,t,dt,"minute"):t>=ft?Ar(e,t,ft,"second"):e+" ms"}function Ar(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}const ba="_toast-container_mcbuq_1",wa="_single-line_mcbuq_17",_y={toastContainer:ba,singleLine:wa};function ae(e,t=2e3){let r=typeof t=="number"?t:Lg(t);const n=document.createElement("div");n.className=ba,n.innerText=e,!e.includes(` `)&&!e.includes("n.remove(),r)}const Dg="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",Ng="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function _a(){return ae(Dg)}function Sa(){return ae(Ng)}function Fg(e){const t=rt({data:Array.from(e||[]),has(r){return this.data.some(n=>n[0]===r)},set(r,n){const i=this.data.find(s=>s[0]===r);return i?i[1]=n:this.data.push([r,n]),this},get(r){var n;return(n=this.data.find(i=>i[0]===r))==null?void 0:n[1]},delete(r){const n=this.data.findIndex(i=>i[0]===r);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(r){this.data.forEach(n=>{r(n[1],n[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[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 jg="https://api.bilibili.com",Ca="https://app.bilibili.com",ai=Kr.default.create({baseURL:jg});ai.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params={...e.params,_:Date.now()}),e},function(e){return Promise.reject(e)});const Lr=Kr.default.create({adapter:cc.default});Lr.interceptors.request.use(function(e){return e.params={access_key:fe.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),Lr.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,r=new Uint8Array(e.data),n=t.decode(r);e.data=n;try{e.data=JSON.parse(n)}catch{}}return e});function Ig(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw ae("\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 Ft=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Mr=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new ka}abort(){this.signal.dispatchEvent("abort")}},Wg=typeof AbortSignal=="function",zg=typeof Mr.AbortSignal=="function",ka=Wg?AbortSignal:zg?Mr.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;const r={type:t,target:this};this.onabort(r),this._listeners.forEach(n=>n(r),this)}}onabort(){}addEventListener(t,r){t==="abort"&&this._listeners.push(r)}removeEventListener(t,r){t==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},ci=new Set,ui=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;Pr(r)&&fi(r,`${e} option`,`options.${t}`,Je)},li=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(Pr(r)){const{prototype:n}=Je,{get:i}=Object.getOwnPropertyDescriptor(n,e);fi(r,`${e} method`,`cache.${t}()`,i)}},Bg=(e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(Pr(r)){const{prototype:n}=Je,{get:i}=Object.getOwnPropertyDescriptor(n,e);fi(r,`${e} property`,`cache.${t}`,i)}},Ta=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},Pr=e=>!ci.has(e),fi=(e,t,r,n)=>{ci.add(e);const i=`The ${t} is deprecated. Please use ${r} instead.`;Ta(i,"DeprecationWarning",e,n)},Be=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Ea=e=>Be(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Rr:null:null;class Rr extends Array{constructor(t){super(t),this.fill(0)}}class $g{constructor(t){if(t===0)return[];const r=Ea(t);this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Je{constructor(t={}){const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:l,noDisposeOnSet:f,noUpdateTTL:d,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:v,fetchContext:_,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:A}=t,{length:x,maxAge:w,stale:b}=t instanceof Je?{}:t;if(r!==0&&!Be(r))throw new TypeError("max option must be a nonnegative integer");const k=r?Ea(r):Array;if(!k)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=m,this.maxEntrySize=g||this.maxSize,this.sizeCalculation=y||x,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=v||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=_,!this.fetchMethod&&_!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new k(r),this.prev=new k(r),this.head=0,this.tail=0,this.free=new $g(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof l=="function"?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!M,this.maxEntrySize!==0){if(this.maxSize!==0&&!Be(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Be(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!b,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Be(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||w||0,this.ttl){if(!Be(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 N="LRU_CACHE_UNBOUNDED";Pr(N)&&(ci.add(N),Ta("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,Je))}b&&ui("stale","allowStale"),w&&ui("maxAge","ttl"),x&&ui("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Rr(this.max),this.starts=new Rr(this.max),this.setItemTTL=(n,i,s=Ft.now())=>{if(this.starts[n]=i!==0?s:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){const o=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);o.unref&&o.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?Ft.now():0};let t=0;const r=()=>{const n=Ft.now();if(this.ttlResolution>0){t=n;const i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{const i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(t||r())-this.starts[n]>this.ttls[n]}updateItemAge(t){}setItemTTL(t,r,n){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Rr(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!Be(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,t),!Be(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return n},this.addItemSize=(t,r)=>{if(this.sizes[t]=r,this.maxSize){const n=this.maxSize-this.sizes[t];for(;this.calculatedSize>n;)this.evict(!0)}this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,r){}requireSize(t,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}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,r={}){for(const n of this.indexes())if(t(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],r)}forEach(t,r=this){for(const n of this.indexes())t.call(r,this.valList[n],this.keyList[n],this)}rforEach(t,r=this){for(const n of this.rindexes())t.call(r,this.valList[n],this.keyList[n],this)}get prune(){return li("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),t=!0);return t}dump(){const t=[];for(const r of this.indexes({allowStale:!0})){const n=this.keyList[r],i=this.valList[r],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[r];const a=Ft.now()-this.starts[r];o.start=Math.floor(Date.now()-a)}this.sizes&&(o.size=this.sizes[r]),t.unshift([n,o])}return t}load(t){this.clear();for(const[r,n]of t){if(n.start){const i=Date.now()-n.start;n.start=Ft.now()-i}this.set(r,n.value,n)}}dispose(t,r,n){}set(t,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(o=this.requireSize(t,r,o,a),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(t),this;let c=this.size===0?void 0:this.keyMap.get(t);if(c===void 0)c=this.newIndex(),this.keyList[c]=t,this.valList[c]=r,this.keyMap.set(t,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),u=!1;else{const l=this.valList[c];r!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():s||(this.dispose(l,t,"set"),this.disposeAfter&&this.disposed.push([l,t,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,o)),this.moveToTail(c)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,n,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),t&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(t,{updateAgeOnHas:r=this.updateAgeOnHas}={}){const n=this.keyMap.get(t);return n!==void 0&&!this.isStale(n)?(r&&this.updateItemAge(n),!0):!1}peek(t,{allowStale:r=this.allowStale}={}){const n=this.keyMap.get(t);if(n!==void 0&&(r||!this.isStale(n))){const i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,r,n,i){const s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;const o=new Mr,a={signal:o.signal,options:n,context:i},u=d=>(o.signal.aborted||this.set(t,d,a.options),d),c=d=>{if(this.valList[r]===f&&(!n.noDeleteOnFetchRejection||f.__staleWhileFetching===void 0?this.delete(t):this.valList[r]=f.__staleWhileFetching),f.__returned===f)throw d},l=d=>d(this.fetchMethod(t,s,a)),f=new Promise(l).then(u,c);return f.__abortController=o,f.__staleWhileFetching=s,f.__returned=null,r===void 0?(this.set(t,f,a.options),r=this.keyMap.get(t)):this.valList[r]=f,f}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:f=this.fetchContext,forceRefresh:d=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i});const m={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:l};let g=this.keyMap.get(t);if(g===void 0){const y=this.backgroundFetch(t,g,m,f);return y.__returned=y}else{const y=this.valList[g];if(this.isBackgroundFetch(y))return r&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!d&&!this.isStale(g))return this.moveToTail(g),n&&this.updateItemAge(g),y;const v=this.backgroundFetch(t,g,m,f);return r&&v.__staleWhileFetching!==void 0?v.__staleWhileFetching:v.__returned=v}}get(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const s=this.keyMap.get(t);if(s!==void 0){const o=this.valList[s],a=this.isBackgroundFetch(o);return this.isStale(s)?a?r?o.__staleWhileFetching:void 0:(i||this.delete(t),r?o:void 0):a?void 0:(this.moveToTail(s),n&&this.updateItemAge(s),o)}}connect(t,r){this.prev[r]=t,this.next[t]=r}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 li("del","delete"),this.delete}delete(t){let r=!1;if(this.size!==0){const n=this.keyMap.get(t);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);const i=this.valList[n];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[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const t of this.rindexes({allowStale:!0})){const r=this.valList[t];if(this.isBackgroundFetch(r))r.__abortController.abort();else{const n=this.keyList[t];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"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 li("reset","clear"),this.clear}get length(){return Bg("length","size"),this.size}static get AbortController(){return Mr}static get AbortSignal(){return ka}}var Hg=Je;const Ug=Hg;async function Gg(e){return(await ai.get("/pvideo",{params:{aid:e}})).data.data}async function Yg(e){return[]}const di=new Ug({max:200});async function Vg(e){if(di.has(e))return di.get(e);const[t,r]=await Promise.all([Gg(e),Yg()]);return di.set(e,{pvideoData:t,dmData:r}),{pvideoData:t,dmData:r}}function xa(e){return async function(r){const n=new FormData;n.append("aid",r),n.append("csrf",Ig());const s=(await ai.post("/x/v2/history/toview/"+e,n,{withCredentials:!0})).data,o=(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0";return o||ae((s==null?void 0:s.message)||"\u51FA\u9519\u4E86"),o}}const Kg=xa("add"),Xg=xa("del"),Oa=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(r,n){var a;const s=(await Lr.get(Ca+t,{params:{goto:r.goto,id:r.param,mid:r.mid,rid:r.tid,tag_id:(a=r.tag)==null?void 0:a.tag_id,reason_id:n,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"}},Jg=Oa("dislike"),Zg=Oa("cancel"),Dr={modal:"_modal_pfmut_1",titleDesc:"_title-desc_pfmut_4",reasonList:"_reason-list_pfmut_8",reason:"_reason_pfmut_8"},hi=Fg();function Qg(){return nt(hi)}function qg(e){const t=Qg();if(!!e)return t.get(e)}function ev({show:e,onHide:t,item:r}){const[n,i]=p.useState(!1),s=H(async(a,u)=>{if(!r)return;let c=!1,l=null;try{i(!0),c=await Jg(r,a)}catch(f){l=f}finally{i(!1)}if(l)return console.error(l.stack||l),_a();c?ae("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Sa(),c&&(hi.set(r.param,{id:a,name:u}),t())}),o=p.useMemo(()=>{var a;return[...(a=r==null?void 0:r.dislike_reasons)!=null?a:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[r]);return L(si,{show:e,onHide:t,clsModal:Dr.modal,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[L("div",{className:de.modalHeader,children:[L("div",{className:de.modalTitle,children:["\u6211\u4E0D\u60F3\u770B",h("span",{className:Dr.titleDesc,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),h("div",{className:"space",style:{flex:1}}),h(oi,{onClick:t})]}),h("div",{className:de.modalBody,children:h("div",{className:Dr.reasonList,children:o.map(a=>h("button",{className:Dr.reason,"data-id":a.reason_id,onClick:()=>s(a.reason_id,a.reason_name),disabled:n,children:a.reason_name},a.reason_id))})})]})}const Nr={show:!1,onHide:La,item:null},Aa=rt({value:Nr.show}),tv=function(){return nt(Aa).value};function La(){Ma({show:!1,item:null})}function Ma(e){Object.assign(Nr,e),Aa.value=Nr.show,rv().render(h(ev,{...Nr,onHide:La}))}let pi;function rv(){if(!pi){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),pi=qt(e)}return pi}function Pa(e){Ma({show:!0,item:e})}function nv(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const r=Math.trunc(e/60);e-=r*60;const i=[t,r,e];return i[0]===0&&i.shift(),i.map(o=>sh(o.toString(),2,"0")).join(":")}function mi(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}const Z={biliVideoCard:"_bili-video-card_1a93a_1",imageWrapper:"_image-wrapper_1a93a_4",previewCardWrapper:"_preview-card-wrapper_1a93a_8",previewCardInner:"_preview-card-inner_1a93a_21",watchLater:"_watch-later_1a93a_25",badge:"_badge_1a93a_28",recommendReason:"_recommend-reason_1a93a_36",bangumiDesc:"_bangumi-desc_1a93a_51",btnDislike:"_btn-dislike_1a93a_54",btnDislikeIcon:"_btn-dislike-icon_1a93a_69",btnDislikeTip:"_btn-dislike-tip_1a93a_76",dislikedWrapper:"_disliked-wrapper_1a93a_91",dislikeContentCover:"_dislike-content-cover_1a93a_105",dislikeContentCoverInner:"_dislike-content-cover-inner_1a93a_111",dislikeIcon:"_dislike-icon_1a93a_122",dislikeReason:"_dislike-reason_1a93a_125",dislikeDesc:"_dislike-desc_1a93a_129",dislikeContentAction:"_dislike-content-action_1a93a_133"};function gi(e,t){return isNaN(e)?t:e}function iv({className:e,item:t,pvideo:r,enterCursorState:n}){const i=p.useRef(null),s=Tg(i),o={item:t,pvideo:r,cursorState:s,elWidth:gi(s.elementW,n.width),elHeight:gi(s.elementH,n.height),relativeX:gi(s.elementX,n.relativeX)};return h("div",{ref:i,className:J(Z.previewCardWrapper,e),children:r?h(sv,{...o}):!1})}function sv({item:e,pvideo:t,elWidth:r,elHeight:n,relativeX:i}){var b;let s=0,o=0;r&&i&&!isNaN(i)&&!isNaN(r)&&(s=i/r,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e.duration||0)*s));let a=p.useMemo(()=>{const k=(t==null?void 0:t.index)||[];let N=av(k,o);return N!==-1?N:o>k[k.length-1]?(N=Math.floor(k.length*s)-1,N<0&&(N=0),N):0},[t,o]);const{img_x_len:u,img_y_len:c,img_x_size:l,img_y_size:f}=t,d=c*u;a=a+1;const m=Math.floor(a/d),g=a-m*d,y=((b=t.image)==null?void 0:b[m])||"",v=Math.floor(g/u)+1,_=g-(v-1)*u,M=r*u,A=n*c,x=(v-1)*n,w=(_-1)*r;return h("div",{className:Z.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${w}px -${x}px`,backgroundSize:`${M}px ${A}px`},children:h(ov,{progress:s})})}function ov({progress:e}){return h("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:h("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function av(e,t){var a;let r=0,n=e.length-1,i=-1;for(;r<=n;){const u=Math.floor((r+n)/2),c=e[u];if(t===c)return u;c{if(!e)return"";const t=va.unix(e);return t.format("YYYY")===cv?t.format("M-D"):t.format("YY-M-D")},lv=e=>e.replace(/^http:\/\//,"https://"),vi=p.memo(function({style:t,className:r,item:n,loading:i}){i=i!=null?i:!n;const s=L("div",{className:J("bili-video-card__skeleton",{hide:!i}),children:[h("div",{className:"bili-video-card__skeleton--cover"}),h("div",{className:"bili-video-card__skeleton--info",children:L("div",{className:"bili-video-card__skeleton--right",children:[h("p",{className:"bili-video-card__skeleton--text"}),h("p",{className:"bili-video-card__skeleton--text short"}),h("p",{className:"bili-video-card__skeleton--light"})]})})]}),o=qg(n==null?void 0:n.param);return L("div",{style:t,className:J("bili-video-card",Z.biliVideoCard,r),"data-report":"partition_recommend.content",children:[s,!i&&n&&(o?h(fv,{item:n,dislikedReason:o}):h(dv,{item:n}))]})}),fv=p.memo(function({dislikedReason:t,item:r}){const n=H(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Zg(r,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),_a();i?ae("\u5DF2\u64A4\u9500"):Sa(),i&&hi.delete(r.param)});return L("div",{className:J(Z.dislikedWrapper),children:[h("div",{className:Z.dislikeContentCover,children:L("div",{className:Z.dislikeContentCoverInner,children:[h(At,{name:"DistraughtFace",size:32,className:Z.dislikeIcon}),h("div",{className:Z.dislikeReason,children:t==null?void 0:t.name}),h("div",{className:Z.dislikeDesc,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),h("div",{className:Z.dislikeContentAction,children:L("button",{onClick:n,children:[h(At,{name:"Return",size:"16",style:{marginRight:4,marginTop:-2}}),"\u64A4\u9500"]})})]})}),dv=p.memo(function({item:t}){const r=p.useRef(null),[n,i]=p.useState(()=>({width:0,height:0,relativeX:0}));Or("mouseenter",ce=>{var ic;const Gr=(ic=r.current)==null?void 0:ic.getBoundingClientRect();if(!Gr)return;const{width:Yr,height:Bi,x:oy}=Gr;i({width:Yr,height:Bi,relativeX:ce.pageX-window.pageXOffset-oy})},{target:r});const s=ri(r),o=p.useRef(null),a=ri(o),[u,c]=p.useState(!1),{accessKey:l}=Ie(),f=Boolean(l),{param:d,title:m,cover:g,goto:y,play:v,like:_,coin:M,desc:A,danmaku:x,ctime:w,duration:b,name:k,face:N,mid:j,favorite:E,badge:F,rcmd_reason:I}=t,O=p.useMemo(()=>uv(w),[w]),C=p.useMemo(()=>lv(g),[g]),[S,P]=p.useState(null),[T,R]=p.useState(!1),D=H(async()=>{if(!S&&!T)try{R(!0);const ce=await Vg(d);P(ce)}finally{R(!1)}});p.useEffect(()=>{s&&D()},[s]);let W=!1;const Y=H(async ce=>{if(ce.preventDefault(),W)return;W=!0;const Gr=u?Xg:Kg;let Yr=!1;try{Yr=await Gr(d)}finally{W=!1}Yr&&c(Bi=>!Bi)}),G=p.useRef(null),Q=ri(G),Ee=H(ce=>{ce.stopPropagation(),ce.preventDefault(),Pa(t)}),pe=t.goto==="bangumi",De=t.goto==="av",Ne=De?`/video/av${d}`:t.uri,$e=p.useMemo(()=>nv(b),[b]),te=p.useMemo(()=>mi(v),[v]),xe=p.useMemo(()=>mi(_),[_]),Ut=p.useMemo(()=>mi(E),[E]);return L("div",{className:"bili-video-card__wrap __scale-wrap",children:[h("a",{href:Ne,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:L("div",{className:"bili-video-card__image __scale-player-wrap",ref:r,children:[L("div",{className:J("bili-video-card__image--wrap",Z.imageWrapper),children:[L("picture",{className:"v-img bili-video-card__cover",children:[h("source",{srcSet:`${C}@672w_378h_1c.webp`,type:"image/webp"}),h("img",{src:`${C}@672w_378h_1c.webp`,alt:m,loading:"lazy"})]}),s&&h(iv,{item:t,pvideo:S==null?void 0:S.pvideoData,enterCursorState:n}),L("div",{className:`bili-watch-later ${Z.watchLater}`,style:{display:s?"flex":"none"},ref:o,onClick:Y,children:[h("svg",{className:"bili-watch-later__icon",children:h("use",{xlinkHref:u?"#widget-watch-save":"#widget-watch-later"})}),h("span",{className:"bili-watch-later__tip",style:{display:a?"block":"none"},children:u?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),f&&L("div",{ref:G,className:Z.btnDislike,onClick:Ee,style:{display:s?"flex":"none"},children:[h("svg",{className:Z.btnDislikeIcon,children:h("use",{xlinkHref:"#widget-close"})}),h("span",{className:Z.btnDislikeTip,style:{display:Q?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),h("div",{className:"bili-video-card__mask",children:L("div",{className:"bili-video-card__stats",children:[L("div",{className:"bili-video-card__stats--left",children:[L("span",{className:"bili-video-card__stats--item",children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-play-count"})}),h("span",{className:"bili-video-card__stats--text",children:te})]}),h("span",{className:"bili-video-card__stats--item",children:y==="av"?L(We,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:xe})]}):L(We,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:Ut})]})})]}),h("span",{className:"bili-video-card__stats__duration",children:De&&$e})]})})]})}),h("div",{className:"bili-video-card__info __scale-disable",children:L("div",{className:"bili-video-card__info--right",children:[h("a",{href:Ne,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:h("h3",{className:"bili-video-card__info--tit",title:m,children:m})}),L("p",{className:"bili-video-card__info--bottom",children:[De&&L("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:[I!=null&&I.content?h("span",{className:Z.recommendReason,children:I.content}):h("svg",{className:"bili-video-card__info--owner__up",children:h("use",{xlinkHref:"#widget-up"})}),h("span",{className:"bili-video-card__info--author",children:k}),O&&L("span",{className:"bili-video-card__info--date",children:["\xB7 ",O]})]}),pe&&L("a",{className:"bili-video-card__info--owner",href:Ne,target:"_blank",children:[h("span",{className:Z.badge,children:F}),h("span",{className:Z.bangumiDesc,children:A})]})]})]})})]})});var Fr={exports:{}},yi={exports:{}},jt={exports:{}},V=jt.exports={},Se,Ce;function bi(){throw new Error("setTimeout has not been defined")}function wi(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Se=setTimeout:Se=bi}catch{Se=bi}try{typeof clearTimeout=="function"?Ce=clearTimeout:Ce=wi}catch{Ce=wi}})();function Ra(e){if(Se===setTimeout)return setTimeout(e,0);if((Se===bi||!Se)&&setTimeout)return Se=setTimeout,setTimeout(e,0);try{return Se(e,0)}catch{try{return Se.call(null,e,0)}catch{return Se.call(this,e,0)}}}function hv(e){if(Ce===clearTimeout)return clearTimeout(e);if((Ce===wi||!Ce)&&clearTimeout)return Ce=clearTimeout,clearTimeout(e);try{return Ce(e)}catch{try{return Ce.call(null,e)}catch{return Ce.call(this,e)}}}var Pe=[],pt=!1,Ze,jr=-1;function pv(){!pt||!Ze||(pt=!1,Ze.length?Pe=Ze.concat(Pe):jr=-1,Pe.length&&Da())}function Da(){if(!pt){var e=Ra(pv);pt=!0;for(var t=Pe.length;t;){for(Ze=Pe,Pe=[];++jr1)for(var r=1;r=i)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return a}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),zr(t)?r.showHidden=t:t&&Li(r,t),Te(r.showHidden)&&(r.showHidden=!1),Te(r.depth)&&(r.depth=2),Te(r.colors)&&(r.colors=!1),Te(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=gv),Wr(r,e,r.depth)}ke.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ke.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function gv(e,t){var r=ke.styles[t];return r?"\x1B["+ke.colors[r][0]+"m"+e+"\x1B["+ke.colors[r][1]+"m":e}function vv(e,t){return e}function yv(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Wr(e,t,r){if(e.customInspect&&t&&$t(t.inspect)&&t.inspect!==ke&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Wt(n)||(n=Wr(e,n,r)),n}var i=bv(e,t);if(i)return i;var s=Object.keys(t),o=yv(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),Bt(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return ki(t);if(s.length===0){if($t(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(zt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Br(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Bt(t))return ki(t)}var u="",c=!1,l=["{","}"];if(Ei(t)&&(c=!0,l=["[","]"]),$t(t)){var f=t.name?": "+t.name:"";u=" [Function"+f+"]"}if(zt(t)&&(u=" "+RegExp.prototype.toString.call(t)),Br(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Bt(t)&&(u=" "+ki(t)),s.length===0&&(!c||t.length==0))return l[0]+u+l[1];if(r<0)return zt(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var d;return c?d=wv(e,t,r,o,s):d=s.map(function(m){return Ti(e,t,r,o,m,c)}),e.seen.pop(),_v(d,u,l)}function bv(e,t){if(Te(t))return e.stylize("undefined","undefined");if(Wt(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(xi(t))return e.stylize(""+t,"number");if(zr(t))return e.stylize(""+t,"boolean");if(It(t))return e.stylize("null","null")}function ki(e){return"["+Error.prototype.toString.call(e)+"]"}function wv(e,t,r,n,i){for(var s=[],o=0,a=t.length;o-1&&(s?a=a.split(` `).map(function(c){return" "+c}).join(` `).substr(2):a=` `+a.split(` `).map(function(c){return" "+c}).join(` `))):a=e.stylize("[Circular]","special")),Te(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function _v(e,t,r){var n=e.reduce(function(i,s){return s.indexOf(` `)>=0,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function Ei(e){return Array.isArray(e)}function zr(e){return typeof e=="boolean"}function It(e){return e===null}function Ia(e){return e==null}function xi(e){return typeof e=="number"}function Wt(e){return typeof e=="string"}function Wa(e){return typeof e=="symbol"}function Te(e){return e===void 0}function zt(e){return Qe(e)&&Oi(e)==="[object RegExp]"}function Qe(e){return typeof e=="object"&&e!==null}function Br(e){return Qe(e)&&Oi(e)==="[object Date]"}function Bt(e){return Qe(e)&&(Oi(e)==="[object Error]"||e instanceof Error)}function $t(e){return typeof e=="function"}function za(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function Ba(e){return Buffer.isBuffer(e)}function Oi(e){return Object.prototype.toString.call(e)}function Ai(e){return e<10?"0"+e.toString(10):e.toString(10)}var Sv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cv(){var e=new Date,t=[Ai(e.getHours()),Ai(e.getMinutes()),Ai(e.getSeconds())].join(":");return[e.getDate(),Sv[e.getMonth()],t].join(" ")}function $a(){console.log("%s - %s",Cv(),mt.apply(null,arguments))}function Li(e,t){if(!t||!Qe(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function Ha(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var kv=mh(Object.freeze(Object.defineProperty({__proto__:null,format:mt,deprecate:Si,debuglog:ja,inspect:ke,isArray:Ei,isBoolean:zr,isNull:It,isNullOrUndefined:Ia,isNumber:xi,isString:Wt,isSymbol:Wa,isUndefined:Te,isRegExp:zt,isObject:Qe,isDate:Br,isError:Bt,isFunction:$t,isPrimitive:za,isBuffer:Ba,log:$a,inherits:Fa,_extend:Li,default:{inherits:Fa,_extend:Li,log:$a,isBuffer:Ba,isPrimitive:za,isFunction:$t,isError:Bt,isDate:Br,isObject:Qe,isRegExp:zt,isUndefined:Te,isSymbol:Wa,isString:Wt,isNumber:xi,isNullOrUndefined:Ia,isNull:It,isBoolean:zr,isArray:Ei,inspect:ke,deprecate:Si,format:mt,debuglog:ja}},Symbol.toStringTag,{value:"Module"}))).format;function Tv(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function Ev(e,t){return function(){var r=this,n=[].slice.call(arguments);Tv();var i=new AbortController;return n.push(i.signal),new Promise(function(s,o){var a=setTimeout(function(){var u=new $r(t);o(u),i.abort()},t);Promise.resolve(e.apply(r,n)).then(function(u){clearTimeout(a),s(u)},function(u){clearTimeout(a),o(u)})})}}class $r extends Error{constructor(t){super(),this.timeout=t,this.message=kv("timeout of %sms exceed",t),Error.captureStackTrace(this,$r)}}yi.exports=Ev,yi.exports.TimeoutError=$r;const Ua=yi.exports,xv=Ua.TimeoutError;Fr.exports=function(t,r){const n=t;r=r||{};const i=r.times||5,s=r.timeout;s&&(t=Ua(t,s));const o=r.onerror;return async function(){const a=this,u=[].slice.call(arguments),c=new Array(i);for(let l=0;l"} ${this.times} times`,this.timeout&&(this.message+=` with timeout = ${this.timeout}ms`),Error.captureStackTrace(this,this.constructor)}}class Ov extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}var Av=Fr.exports.RetryError=Ga;Fr.exports.TimeoutError=xv;const Mi="bilibili-app-recommend";class Pi extends Error{constructor(r){super();Vr(this,"json");Error.captureStackTrace(this,Pi),this.json=r,this.message=r.message||JSON.stringify(r)}}async function Lv(){const t=(await Lr.get(Ca+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data;if(!t.data){if(t.code===-663)throw new Pi(t);return ae(`${Mi}: \u672A\u77E5\u9519\u8BEF, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005 code=${t.code} message=${t.message||""}`,"5s"),[]}return t.data}const Mv=Fr.exports(Lv,{times:5,timeout:2e3,onerror(e,t){console.info("[%s] tryGetRecommend onerror: index=%s",Mi,t,e)}});async function Pv(){try{return await Mv()}catch(e){if(e instanceof Av){console.error(e.errors);const t=[mt("\u8BF7\u6C42\u51FA\u9519, \u5DF2\u91CD\u8BD5%s\u6B21:",e.times),...e.errors.map((r,n)=>mt(" %s) %s",n+1,r.message)),"","\u8BF7\u91CD\u65B0\u83B7\u53D6 access_key \u540E\u91CD\u8BD5~"].join(` `);ae(t,"5s")}throw e}}async function Rv(){return Ri(2)}async function Ri(e){const t=new Array(e).fill(0).map(i=>Pv());let n=(await Promise.all(t)).reduce((i,s)=>i.concat(s||[]),[]);return n=Dv(n),n.map(i=>({...i,uniqId:i.param+"-"+crypto.randomUUID()}))}function Dv(e){const t=new Set;return e=e.filter(r=>{const{param:n}=r;return t.has(n)?(console.log("[%s]: [uniqRecList]: duplicate",Mi,r),!1):(t.add(n),!0)}),e}var ne={exports:{}},Nv="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Fv=Nv,jv=Fv;function Ya(){}function Va(){}Va.resetWarningCache=Ya;var Iv=function(){function e(n,i,s,o,a,u){if(u!==jv){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={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:Va,resetWarningCache:Ya};return r.PropTypes=r,r};ne.exports=Iv();class Di extends p.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 r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}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 r=this.props.getScrollParent&&this.props.getScrollParent();return r!=null?r:t&&t.parentNode}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.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,r=window,n=this.getParentElement(t);let i;if(this.props.useWindow){const s=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:s.scrollTop;this.props.isReverse?i=o:i=this.calculateOffset(t,o)}else this.props.isReverse?i=n.scrollTop:i=t.scrollHeight-n.scrollTop-n.clientHeight;i{this.scrollComponent=_,l&&l(_)};const v=[r];return i&&(a?o?v.unshift(a):v.push(a):this.defaultLoader&&(o?v.unshift(this.defaultLoader):v.push(this.defaultLoader))),ue.default.createElement(n,y,v)}}Vr(Di,"propTypes",{children:ne.exports.node.isRequired,element:ne.exports.node,hasMore:ne.exports.bool,initialLoad:ne.exports.bool,isReverse:ne.exports.bool,loader:ne.exports.node,loadMore:ne.exports.func.isRequired,pageStart:ne.exports.number,ref:ne.exports.func,getScrollParent:ne.exports.func,threshold:ne.exports.number,useCapture:ne.exports.bool,useWindow:ne.exports.bool}),Vr(Di,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const Ni="_video-grid_14t5i_9",Ka="_limit-two-lines_14t5i_19",Fi="_internal-testing_14t5i_43",Wv="_limit-one-line_14t5i_50",Xa="_narrow-mode_14t5i_71",Ky={videoGrid:Ni,limitTwoLines:Ka,internalTesting:Fi,limitOneLine:Wv,narrowMode:Xa};function zv({enabled:e,refresh:t,minIndex:r=0,maxIndex:n,containerRef:i,getScrollerRect:s,openDislikeAt:o}){const[a,u]=p.useState(null),c=H(()=>{var I;if(a===null||!i.current)return!1;const E=s(),F=(I=i.current.querySelector(`.${gt.card}.${gt.cardActive}`))==null?void 0:I.getBoundingClientRect();return!(!E||!F||F.top-E.top<-(E.height+F.height)||F.top-E.top>E.height*2+F.height)}),l=H((E,F)=>{if(!e)return;F==null||F.preventDefault();const I=c()?a+E:A();if(!(In){k(n);return}u(I),k(I)}}),f=p.useCallback(E=>{l(-1,E)},[]),d=p.useCallback(E=>{l(1,E)},[]);Me("leftarrow",f),Me("rightarrow",d);const m=p.useCallback(E=>{l(-j(),E)},[]),g=p.useCallback(E=>{l(j(),E)},[]);Me("uparrow",m),Me("downarrow",g);const y=H(()=>{!e||u(null)}),v=H(()=>{!e||typeof a!="number"||N(a)}),_=H(()=>{!e||typeof a!="number"||o(a)});Me("esc",y),Me("enter",v),Me("backspace",_);const M=H(()=>{!e||t()});Me("r",M,{exactMatch:!0});function A(){const E=s();if(!E)return 0;const F=w();for(let I=0;I=E.top)return I;return 0}const x=`.${gt.card}`;function w(){var E;return[...((E=i.current)==null?void 0:E.querySelectorAll(x))||[]]}function b(E){return w()[E]}function k(E){var I;const F=b(E);(I=F==null?void 0:F.scrollIntoViewIfNeeded)==null||I.call(F,!1)}function N(E){const F=b(E);if(!F)return;const I=F.querySelector(".bili-video-card__wrap > a");I==null||I.click()}function j(){if(fe.useNarrowMode)return 2;let E=Ja.get(window.innerWidth);if(E)return E;const F=i.current;if(!F)return 0;const I=window.getComputedStyle(F);return I.display!=="grid"?0:(E=I.gridTemplateColumns.split(" ").length,Ja.set(window.innerWidth,E),E)}return{activeIndex:a,clearActiveIndex:y}}const Ja=new Map,gt={loader:Xn` text-align: center; line-height: 60px; font-size: 120%; `,card:Xn` border: 2px solid transparent; /* global class under .card */ .bili-video-card__info { padding-left: 2px; padding-bottom: 1px; margin-top: calc(var(--info-margin-top) - 1px); } `,cardActive:Xn` border-color: #fb7299; border-radius: 6px; overflow: hidden; `},Za=p.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:r,className:n,scrollerRef:i},s)=>{const[o,a]=p.useState([]),[u,c]=p.useState(!1);p.useImperativeHandle(s,()=>({refresh:l}));const l=H(async()=>{await(r==null?void 0:r());try{_(),c(!0),a(await Ri(2)),_()}finally{c(!1)}}),f=H(async A=>{const x=await Ri(2);a(w=>[...w,...x])}),{useNarrowMode:d}=Ie(),m=p.useRef(null),g=H(()=>{var A;if(e){const x=ho+50;return new DOMRect(0,x,window.innerWidth,window.innerHeight-x)}else return(A=i==null?void 0:i.current)==null?void 0:A.getBoundingClientRect()}),y=tv(),{activeIndex:v,clearActiveIndex:_}=zv({enabled:t&&!y,refresh:l,maxIndex:o.length-1,containerRef:m,getScrollerRect:g,openDislikeAt(A){Pa(o[A])}}),M=lo();return h(Di,{pageStart:0,loadMore:f,hasMore:!0,useWindow:e,threshold:360,style:{minHeight:"100%"},loader:h("div",{className:gt.loader,children:"\u52A0\u8F7D\u4E2D..."},0),children:h("div",{ref:m,className:J(Ni,{[Fi]:M},{[Xa]:d},n),children:o.map((A,x)=>h(vi,{loading:u,item:A,className:J(gt.card,{[gt.cardActive]:x===v})},A.uniqId))})})}),Bv={checkbox:"_checkbox_5cp8u_1"};async function $v(){var u,c;const t=(await Kr.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(!((u=t==null?void 0:t.data)!=null&&u.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((c=t==null?void 0:t.data)!=null&&c.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:t};const r=t.data.confirm_uri;let n;const i=new Promise(l=>{window.addEventListener("message",f=>{if(f.origin!="https://www.mcbbs.net"||!f.data)return;const d=f.data.match(/access_key=([0-9a-z]{32})/);if(!d||!d[1])return l({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});l(d[1])}),n=setTimeout(()=>{l({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},10*1e3)}),s=document.createElement("iframe");s.src=r,s.style.display="none",document.body.appendChild(s);function o(){s.remove(),n&&(clearTimeout(n),n=null)}const a=await i;return o(),a}async function Hv(){const e=await $v();if(typeof e=="object"&&"errmsg"in e){ae(e.errmsg);return}const t=e;return fe.accessKey=t,ae("\u83B7\u53D6\u6210\u529F"),t}function Uv(){fe.accessKey="",ae("\u5DF2\u5220\u9664 access_key")}function ji(){const e=p.useRef(null),{accessKey:t}=Ie(),r=ha(Hv,{manual:!0}),n=H(async()=>{var a;await r.runAsync()&&((a=e.current)==null||a.set(!1))}),i=Uv,s=H(()=>{const o="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(o,"_blank")});return h(We,{children:t?L(We,{children:[h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:()=>n(),disabled:r.loading,children:h("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),h("button",{className:"primary-btn roll-btn",onClick:i,children:h("span",{children:"\u5220\u9664 access_key"})})]}):L(We,{children:[h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:n,disabled:r.loading,children:h("span",{children:"\u83B7\u53D6 access_key"})})]})})}const Ii={container:{name:"8irbms",styles:"display:inline-flex;align-items:center"},checkbox:{name:"4l4ubo",styles:"cursor:pointer;outline:none"},label:{name:"side0b",styles:"margin-left:2px;user-select:none;cursor:pointer"}};function Hr({configKey:e,label:t,className:r}){const i=!!Ie()[e],s=p.useCallback(a=>{const u=a.target.checked;Rh({[e]:u}),u&&e==="initialShowMore"&&ae("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u63A8\u8350\u5F39\u6846")},[]),o=p.useId();return L("span",{css:Ii.container,className:r,children:[h("input",{type:"checkbox",id:o,checked:i,onChange:s,css:Ii.checkbox}),h("label",{htmlFor:o,css:Ii.label,children:t||e})]})}var Gv={name:"1qkltea",styles:"margin-left:5px"};const Yv=function(){const e=Gv;return L(We,{children:[h(Hr,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",css:e}),h(Hr,{configKey:"useNarrowMode",label:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F",css:e})]})},he={configIcon:"_config-icon_1jab1_1",settingsGroup:"_settings-group_1jab1_6",settingsGroupTitle:"_settings-group-title_1jab1_9",settingsGroupContent:"_settings-group-content_1jab1_12",row:"_row_1jab1_18",check:"_check_1jab1_22"};function Vv({show:e,onHide:t}){const r=p.useId(),{pureRecommend:n}=Ie();return L(si,{show:e,onHide:t,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[L("div",{className:de.modalHeader,children:[L("div",{className:de.modalTitle,children:[h(At,{name:"Config",className:he.configIcon}),"\u8BBE\u7F6E\u9879"]}),h("div",{className:"space",style:{flex:1}}),h(oi,{onClick:t})]}),L("main",{className:de.modalBody,children:[L("div",{className:he.settingsGroup,children:[h("div",{className:he.settingsGroupTitle,children:"Auth"}),h("div",{className:J(he.settingsGroupContent,he.row),children:h(ji,{})})]}),L("div",{className:he.settingsGroup,children:[h("div",{className:he.settingsGroupTitle,children:"\u5F00\u5173"}),L("div",{className:J(he.settingsGroupContent,he.row),children:[h("input",{type:"checkbox",className:Bv.checkbox,id:r,checked:n,onChange:async i=>{fe.pureRecommend=i.target.checked,ae("\u5373\u5C06\u5237\u65B0\u7F51\u9875"),await _t.exports(500),location.reload()}}),h("label",{htmlFor:r,children:"\u5F00\u542F\u7EAF\u5206\u4EAB\u6A21\u5F0F"}),h(Hr,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",className:he.check}),h(Hr,{configKey:"useNarrowMode",label:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F",className:he.check})]})]})]})]})}const Qa={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},qa=p.forwardRef(function({children:t},r){const[n,i]=pa(!1);p.useImperativeHandle(r,()=>i,[i]);const s=h("button",{className:J("primary-btn",Qa.expandBtn),onClick:i.toggle,children:h("svg",{className:J({[Qa.expanded]:n}),children:h("use",{xlinkHref:"#widget-arrow"})})});return L(We,{children:[s,n&&t]})}),Ht={modalMask:"_modal-mask_1as61_1",narrowMode:"_narrow-mode_1as61_1",modal:"_modal_1as61_1",modalHeader:"_modal-header_1as61_21",modalBody:"_modal-body_1as61_22",btnRefresh:"_btn-refresh_1as61_25"},Kv=p.memo(function({show:t,onHide:r}){const n=p.useRef(null),i=p.useRef(null),{useNarrowMode:s}=Ie(),o=p.useMemo(()=>({[Ht.narrowMode]:s}),[s]),a=H(()=>{var c;return(c=i.current)==null?void 0:c.refresh()}),u=H(()=>{n.current&&(n.current.scrollTop=0)});return L(si,{show:t,onHide:r,clsModalMask:J(o),clsModal:J(Ht.modal,o),children:[L("div",{className:J(de.modalHeader,Ht.modalHeader),children:[h("div",{className:de.modalTitle,children:"\u63A8\u8350"}),h("div",{className:"space",style:{flex:1}}),h(qa,{children:h(Yv,{})}),L("button",{className:`primary-btn roll-btn ${Ht.btnRefresh}`,onClick:a,children:[h("svg",{children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),h(oi,{onClick:r})]}),h("div",{className:J(de.modalBody,Ht.modalBody),ref:n,children:h(Za,{ref:i,shortcutEnabled:t,onScrollToTop:u,infiteScrollUseWindow:!1,scrollerRef:n})})]})});var Wi={};Object.defineProperty(Wi,"__esModule",{value:!0});var ec=Wi.useSticky=void 0;const zi=ue.default;function Xv(){const e=(0,zi.useRef)(null),[t,r]=(0,zi.useState)(!1);return(0,zi.useEffect)(()=>{function n(){if(!e.current)return;const i=e.current.getBoundingClientRect().top,s=parseInt(getComputedStyle(e.current).top),o=i<=s;o&&!t?r(!0):!o&&t&&r(!1)}return n(),document.addEventListener("scroll",n),window.addEventListener("resize",n),window.addEventListener("orientationchange",n),()=>{document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)}},[t]),[e,t]}ec=Wi.useSticky=Xv;const tc={btn:at` padding: 0; width: 31px; height: 31px; border-radius: 50%; `,icon:at` svg { width: 14px; height: 14px; } `},Ur=rt({showMore:fe.initialShowMore}),Jv=function(){return nt(Ur)},Zv=()=>{Ur.showMore=!0},Qv=()=>{Ur.showMore=!1};function rc({onRefresh:e}){const{accessKey:t,pureRecommend:r}=Ie(),n=p.useRef(null),{showMore:i}=nt(Ur),[s,o]=p.useState(!1),a=p.useCallback(()=>{o(!0)},[]),u=p.useCallback(()=>{o(!1)},[]),[c,l]=ec();return xn(),L(We,{children:[L("div",{ref:c,className:"area-header",css:[at` margin-bottom: 0; height: 50px; `,r&&at` position: sticky; top: ${ho}px; z-index: 1000; `,r&&l&&at` background-color: var(--bg1_float); box-shadow: 0 2px 4px rgb(0 0 0 / 8%); `,"",""],children:[L("div",{className:"left",children:[h("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),h("svg",{className:"icon",children:h("use",{xlinkHref:"#channel-cinephile"})}),h("a",{className:"title",href:"#",children:h("span",{children:"\u63A8\u8350"})})]}),L("div",{className:"right",children:[h("button",{className:"primary-btn",css:tc.btn,onClick:a,children:h(At,{name:"Config",css:tc.icon})}),t?h(qa,{ref:n,children:h(ji,{})}):h(ji,{}),L("button",{className:"primary-btn roll-btn",onClick:e,children:[h("svg",{style:{transform:"rotate(0deg)"},children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),L("button",{className:"primary-btn see-more",onClick:Zv,children:[h("span",{children:"\u67E5\u770B\u66F4\u591A"}),h("svg",{children:h("use",{xlinkHref:"#widget-arrow"})})]})]})]}),h(Kv,{show:i,onHide:Qv}),h(Vv,{show:s,onHide:u})]})}const qv={grid:at` /* card=299 col-gap=20 */ width: ${299*2+20}px; margin: 0 auto; `};function ey(){const{useNarrowMode:e}=Ie(),{showMore:t}=Jv(),r=p.useRef(null),n=H(()=>{var s;return(s=r.current)==null?void 0:s.refresh()}),i=H(()=>{document.documentElement.scrollTop=0});return L("section",{"data-area":"\u63A8\u8350",children:[h(rc,{onRefresh:n}),h(Za,{ref:r,css:[e&&qv.grid,"",""],shortcutEnabled:!t,infiteScrollUseWindow:!0,onScrollToTop:i})]})}function ty(){const e=p.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:t,loading:r,error:n,refresh:i}=ha(Rv);n&&console.error(n.stack||n);const s=lo();return L("section",{"data-area":"\u63A8\u8350",children:[h(rc,{onRefresh:i}),h("div",{className:J(Ni,Ka,{[Fi]:s}),style:{marginBottom:s?30:0},children:r||n?e.map(o=>h(vi,{},o)):t.map(o=>h(vi,{item:o},o.uniqId))})]})}const ry=10*1e3;async function nc(e){let t=[];const r=()=>{t=Array.from(document.querySelectorAll(e))},n=performance.now();for(;!t.length&&performance.now()-n{i.remove()})}(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 ny()})();async function ny(){return fe.pureRecommend?sy():iy()}async function iy(){const t=Date.now()+1e4;let r=null;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){r=document.querySelector(".bili-layout > section.bili-grid");break}if(er()&&document.querySelector(".recommended-container")){r=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await _t.exports(100)}if(!r){console.error("[bilibili-app-recommend]: init fail");return}const n=document.createElement("section");r.insertAdjacentElement("afterend",n),qt(n).render(h(ty,{}))}async function sy(){var i,s;er()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),nc(".bili-feed4 .header-channel")):((s=document.querySelector(".bili-layout"))==null||s.remove(),nc(".bili-footer"));const e=document.createElement("div");e.classList.add(er()?"bili-feed4-layout":"bili-layout","pure-recommend");const t=document.querySelector(".bili-header");t==null||t.insertAdjacentElement("afterend",e);const r=document.createElement("section");e==null||e.appendChild(r),qt(r).render(h(ey,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);