您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
为B站首页添加像App一样的推荐
当前为
// ==UserScript== // @name bilibili-app-recommend // @namespace https://magicdawn.fun // @version 0.6.0 // @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/[email protected]/dist/axios.min.js // @require https://unpkg.com/[email protected]/dist/axiosGmxhrAdapter.min.js // @require https://unpkg.com/[email protected]/umd/react.production.min.js // @require https://unpkg.com/[email protected]/umd/react-dom.production.min.js // @connect app.bilibili.com // @connect passport.bilibili.com // @connect link.acg.tv // @connect www.mcbbs.net // @grant GM.xmlHttpRequest // @grant GM_deleteValue // @grant GM_getValue // @grant GM_setValue // @grant GM_xmlhttpRequest // @grant unsafeWindow // ==/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}._toast-container_9119l_1{position:fixed;top:50%;left:50%;z-index:999999;padding:12px 24px;font-size:14px;width:240px;margin-left:-120px;background:#ffb243;color:#fff;border-radius:6px}._modal-mask_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._bili-video-card_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}._modal-mask_3m0r6_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_3m0r6_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_3m0r6_1 ._modal-header_3m0r6_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_3m0r6_1 ._modal-header_3m0r6_23 ._modal-title_3m0r6_30{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._modal_3m0r6_1 ._modal-header_3m0r6_23 ._modal-title_3m0r6_30 ._config-icon_3m0r6_37{line-height:1;margin-right:5px;font-size:0}._modal_3m0r6_1 ._modal-header_3m0r6_23 ._btn-close_3m0r6_42{margin-left:10px}._modal_3m0r6_1 ._modal-header_3m0r6_23 ._btn-close_3m0r6_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_3m0r6_1 ._modal-header_3m0r6_23 ._btn-close_3m0r6_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_3m0r6_1 ._modal-body_3m0r6_60{padding-top:0;flex-grow:1;overflow-y:scroll}._settings-group_3m0r6_65{margin-bottom:10px}._settings-group_3m0r6_65 ._settings-group-title_3m0r6_68{font-size:2em}._settings-group_3m0r6_65 ._settings-group-content_3m0r6_71{color:default}._settings-group_3m0r6_65 ._settings-group-content_3m0r6_71 button:first-child{margin-left:0}._row_3m0r6_77{display:flex;align-items:center}._check_3m0r6_81{margin-left:20px}._check_3m0r6_81: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_1f28q_1{position:fixed;left:0;top:0;right:0;bottom:0;z-index:11000;background-color:#00000080;display:flex;align-items:center;justify-content:center}._modal-mask_1f28q_1._narrow-mode_1f28q_13{background-color:#000000e6}._modal_1f28q_1{width:calc(100vw - 30px);height:calc(100vh - 30px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 0 15px 15px;display:flex;flex-direction:column}body.dark ._modal_1f28q_1{border:1px solid #fb7299}._modal_1f28q_1._narrow-mode_1f28q_13{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1f28q_1._narrow-mode_1f28q_13{border:none}._modal_1f28q_1 ._modal-header_1f28q_38{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_1f28q_1 ._modal-header_1f28q_38 ._modal-title_1f28q_46{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_1f28q_1 ._modal-header_1f28q_38 ._btn-refresh_1f28q_51,body.dark ._modal_1f28q_1 ._modal-header_1f28q_38 ._btn-close_1f28q_52{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_1f28q_1 ._modal-header_1f28q_38 ._btn-close_1f28q_52{margin-left:10px}._modal_1f28q_1 ._modal-header_1f28q_38 ._btn-close_1f28q_52 svg{width:10px;height:10px}._modal_1f28q_1 ._modal-body_1f28q_68{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px} `); var Eg=Object.defineProperty;var xg=(y,me,De)=>me in y?Eg(y,me,{enumerable:!0,configurable:!0,writable:!0,value:De}):y[me]=De;var gr=(y,me,De)=>(xg(y,typeof me!="symbol"?me+"":me,De),De);(function(y,me,De,Jo){"use strict";const St=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function Zo(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 Ce=St(y),Vn=Zo(y),Qo=St(me),yr=St(De),qo=St(Jo);var ea=typeof global=="object"&&global&&global.Object===Object&&global;const Xn=ea;var ta=typeof self=="object"&&self&&self.Object===Object&&self,ra=Xn||ta||Function("return this")();const ge=ra;var na=ge.Symbol;const ye=na;var Jn=Object.prototype,ia=Jn.hasOwnProperty,sa=Jn.toString,et=ye?ye.toStringTag:void 0;function oa(e){var t=ia.call(e,et),r=e[et];try{e[et]=void 0;var n=!0}catch{}var i=sa.call(e);return n&&(t?e[et]=r:delete e[et]),i}var aa=Object.prototype,ca=aa.toString;function la(e){return ca.call(e)}var ua="[object Null]",fa="[object Undefined]",Zn=ye?ye.toStringTag:void 0;function He(e){return e==null?e===void 0?fa:ua:Zn&&Zn in Object(e)?oa(e):la(e)}function Ue(e){return e!=null&&typeof e=="object"}var da="[object Symbol]";function Ct(e){return typeof e=="symbol"||Ue(e)&&He(e)==da}function ha(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var pa=Array.isArray;const Te=pa;var ma=1/0,Qn=ye?ye.prototype:void 0,qn=Qn?Qn.toString:void 0;function vr(e){if(typeof e=="string")return e;if(Te(e))return ha(e,vr)+"";if(Ct(e))return qn?qn.call(e):"";var t=e+"";return t=="0"&&1/e==-ma?"-0":t}var ga=/\s/;function ya(e){for(var t=e.length;t--&&ga.test(e.charAt(t)););return t}var va=/^\s+/;function ba(e){return e&&e.slice(0,ya(e)+1).replace(va,"")}function Oe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ei=0/0,_a=/^[-+]0x[0-9a-f]+$/i,wa=/^0b[01]+$/i,Sa=/^0o[0-7]+$/i,Ca=parseInt;function br(e){if(typeof e=="number")return e;if(Ct(e))return ei;if(Oe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Oe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=ba(e);var r=wa.test(e);return r||Sa.test(e)?Ca(e.slice(2),r?2:8):_a.test(e)?ei:+e}var ti=1/0,Ta=17976931348623157e292;function Ea(e){if(!e)return e===0?e:0;if(e=br(e),e===ti||e===-ti){var t=e<0?-1:1;return t*Ta}return e===e?e:0}function ri(e){var t=Ea(e),r=t%1;return t===t?r?t-r:t:0}function xa(e){return e}var Aa="[object AsyncFunction]",Oa="[object Function]",ka="[object GeneratorFunction]",Ma="[object Proxy]";function ni(e){if(!Oe(e))return!1;var t=He(e);return t==Oa||t==ka||t==Aa||t==Ma}var Pa=ge["__core-js_shared__"];const _r=Pa;var ii=function(){var e=/[^.]+$/.exec(_r&&_r.keys&&_r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ra(e){return!!ii&&ii in e}var La=Function.prototype,Na=La.toString;function Fe(e){if(e!=null){try{return Na.call(e)}catch{}try{return e+""}catch{}}return""}var Da=/[\\^$.*+?()[\]{}|]/g,Fa=/^\[object .+?Constructor\]$/,$a=Function.prototype,Ia=Object.prototype,ja=$a.toString,za=Ia.hasOwnProperty,Wa=RegExp("^"+ja.call(za).replace(Da,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ba(e){if(!Oe(e)||Ra(e))return!1;var t=ni(e)?Wa:Fa;return t.test(Fe(e))}function Ha(e,t){return e==null?void 0:e[t]}function $e(e,t){var r=Ha(e,t);return Ba(r)?r:void 0}var Ua=$e(ge,"WeakMap");const wr=Ua;function Ga(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var Ya=800,Ka=16,Va=Date.now;function Xa(e){var t=0,r=0;return function(){var n=Va(),i=Ka-(n-r);if(r=n,i>0){if(++t>=Ya)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ja(e){return function(){return e}}var Za=function(){try{var e=$e(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Tt=Za;var Qa=Tt?function(e,t){return Tt(e,"toString",{configurable:!0,enumerable:!1,value:Ja(t),writable:!0})}:xa,qa=Xa(Qa);const ec=qa;var tc=9007199254740991,rc=/^(?:0|[1-9]\d*)$/;function Sr(e,t){var r=typeof e;return t=t==null?tc:t,!!t&&(r=="number"||r!="symbol"&&rc.test(e))&&e>-1&&e%1==0&&e<t}function nc(e,t,r){t=="__proto__"&&Tt?Tt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Cr(e,t){return e===t||e!==e&&t!==t}var ic=Object.prototype,sc=ic.hasOwnProperty;function oc(e,t,r){var n=e[t];(!(sc.call(e,t)&&Cr(n,r))||r===void 0&&!(t in e))&&nc(e,t,r)}var si=Math.max;function ac(e,t,r){return t=si(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=si(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=n[i];return c[t]=r(o),Ga(e,this,c)}}var cc=9007199254740991;function Tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cc}function lc(e){return e!=null&&Tr(e.length)&&!ni(e)}var uc=Object.prototype;function fc(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||uc;return e===r}function dc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var hc="[object Arguments]";function oi(e){return Ue(e)&&He(e)==hc}var ai=Object.prototype,pc=ai.hasOwnProperty,mc=ai.propertyIsEnumerable,gc=oi(function(){return arguments}())?oi:function(e){return Ue(e)&&pc.call(e,"callee")&&!mc.call(e,"callee")};const Er=gc;function yc(){return!1}var ci=typeof exports=="object"&&exports&&!exports.nodeType&&exports,li=ci&&typeof module=="object"&&module&&!module.nodeType&&module,vc=li&&li.exports===ci,ui=vc?ge.Buffer:void 0,bc=ui?ui.isBuffer:void 0,_c=bc||yc;const xr=_c;var wc="[object Arguments]",Sc="[object Array]",Cc="[object Boolean]",Tc="[object Date]",Ec="[object Error]",xc="[object Function]",Ac="[object Map]",Oc="[object Number]",kc="[object Object]",Mc="[object RegExp]",Pc="[object Set]",Rc="[object String]",Lc="[object WeakMap]",Nc="[object ArrayBuffer]",Dc="[object DataView]",Fc="[object Float32Array]",$c="[object Float64Array]",Ic="[object Int8Array]",jc="[object Int16Array]",zc="[object Int32Array]",Wc="[object Uint8Array]",Bc="[object Uint8ClampedArray]",Hc="[object Uint16Array]",Uc="[object Uint32Array]",K={};K[Fc]=K[$c]=K[Ic]=K[jc]=K[zc]=K[Wc]=K[Bc]=K[Hc]=K[Uc]=!0,K[wc]=K[Sc]=K[Nc]=K[Cc]=K[Dc]=K[Tc]=K[Ec]=K[xc]=K[Ac]=K[Oc]=K[kc]=K[Mc]=K[Pc]=K[Rc]=K[Lc]=!1;function Gc(e){return Ue(e)&&Tr(e.length)&&!!K[He(e)]}function Yc(e){return function(t){return e(t)}}var fi=typeof exports=="object"&&exports&&!exports.nodeType&&exports,tt=fi&&typeof module=="object"&&module&&!module.nodeType&&module,Kc=tt&&tt.exports===fi,Ar=Kc&&Xn.process,Vc=function(){try{var e=tt&&tt.require&&tt.require("util").types;return e||Ar&&Ar.binding&&Ar.binding("util")}catch{}}();const di=Vc;var hi=di&&di.isTypedArray,Xc=hi?Yc(hi):Gc;const pi=Xc;var Jc=Object.prototype,Zc=Jc.hasOwnProperty;function Qc(e,t){var r=Te(e),n=!r&&Er(e),i=!r&&!n&&xr(e),s=!r&&!n&&!i&&pi(e),o=r||n||i||s,c=o?dc(e.length,String):[],l=c.length;for(var a in e)(t||Zc.call(e,a))&&!(o&&(a=="length"||i&&(a=="offset"||a=="parent")||s&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||Sr(a,l)))&&c.push(a);return c}function qc(e,t){return function(r){return e(t(r))}}var el=qc(Object.keys,Object);const tl=el;var rl=Object.prototype,nl=rl.hasOwnProperty;function il(e){if(!fc(e))return tl(e);var t=[];for(var r in Object(e))nl.call(e,r)&&r!="constructor"&&t.push(r);return t}function sl(e){return lc(e)?Qc(e):il(e)}var ol=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,al=/^\w*$/;function cl(e,t){if(Te(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ct(e)?!0:al.test(e)||!ol.test(e)||t!=null&&e in Object(t)}var ll=$e(Object,"create");const rt=ll;function ul(){this.__data__=rt?rt(null):{},this.size=0}function fl(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var dl="__lodash_hash_undefined__",hl=Object.prototype,pl=hl.hasOwnProperty;function ml(e){var t=this.__data__;if(rt){var r=t[e];return r===dl?void 0:r}return pl.call(t,e)?t[e]:void 0}var gl=Object.prototype,yl=gl.hasOwnProperty;function vl(e){var t=this.__data__;return rt?t[e]!==void 0:yl.call(t,e)}var bl="__lodash_hash_undefined__";function _l(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rt&&t===void 0?bl:t,this}function Ie(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ie.prototype.clear=ul,Ie.prototype.delete=fl,Ie.prototype.get=ml,Ie.prototype.has=vl,Ie.prototype.set=_l;function wl(){this.__data__=[],this.size=0}function Et(e,t){for(var r=e.length;r--;)if(Cr(e[r][0],t))return r;return-1}var Sl=Array.prototype,Cl=Sl.splice;function Tl(e){var t=this.__data__,r=Et(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Cl.call(t,r,1),--this.size,!0}function El(e){var t=this.__data__,r=Et(t,e);return r<0?void 0:t[r][1]}function xl(e){return Et(this.__data__,e)>-1}function Al(e,t){var r=this.__data__,n=Et(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ee(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ee.prototype.clear=wl,Ee.prototype.delete=Tl,Ee.prototype.get=El,Ee.prototype.has=xl,Ee.prototype.set=Al;var Ol=$e(ge,"Map");const nt=Ol;function kl(){this.size=0,this.__data__={hash:new Ie,map:new(nt||Ee),string:new Ie}}function Ml(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function xt(e,t){var r=e.__data__;return Ml(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Pl(e){var t=xt(this,e).delete(e);return this.size-=t?1:0,t}function Rl(e){return xt(this,e).get(e)}function Ll(e){return xt(this,e).has(e)}function Nl(e,t){var r=xt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xe.prototype.clear=kl,xe.prototype.delete=Pl,xe.prototype.get=Rl,xe.prototype.has=Ll,xe.prototype.set=Nl;var Dl="Expected a function";function Or(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Dl);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=e.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(Or.Cache||xe),r}Or.Cache=xe;var Fl=500;function $l(e){var t=Or(e,function(n){return r.size===Fl&&r.clear(),n}),r=t.cache;return t}var Il=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jl=/\\(\\)?/g,zl=$l(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Il,function(r,n,i,s){t.push(i?s.replace(jl,"$1"):n||r)}),t});const Wl=zl;function mi(e){return e==null?"":vr(e)}function At(e,t){return Te(e)?e:cl(e,t)?[e]:Wl(mi(e))}var Bl=1/0;function kr(e){if(typeof e=="string"||Ct(e))return e;var t=e+"";return t=="0"&&1/e==-Bl?"-0":t}function Hl(e,t){t=At(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[kr(t[r++])];return r&&r==n?e:void 0}function gi(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var yi=ye?ye.isConcatSpreadable:void 0;function Ul(e){return Te(e)||Er(e)||!!(yi&&e&&e[yi])}function vi(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=Ul),i||(i=[]);++s<o;){var c=e[s];t>0&&r(c)?t>1?vi(c,t-1,r,n,i):gi(i,c):n||(i[i.length]=c)}return i}function Gl(e){var t=e==null?0:e.length;return t?vi(e,1):[]}function Yl(e){return ec(ac(e,void 0,Gl),e+"")}var Kl="Expected a function";function Vl(e,t){var r;if(typeof t!="function")throw new TypeError(Kl);return e=ri(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function Xl(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<i;)s[n]=e[n+t];return s}function Jl(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:Xl(e,t,r)}var Zl="\\ud800-\\udfff",Ql="\\u0300-\\u036f",ql="\\ufe20-\\ufe2f",eu="\\u20d0-\\u20ff",tu=Ql+ql+eu,ru="\\ufe0e\\ufe0f",nu="\\u200d",iu=RegExp("["+nu+Zl+tu+ru+"]");function Mr(e){return iu.test(e)}function su(e){return e.split("")}var bi="\\ud800-\\udfff",ou="\\u0300-\\u036f",au="\\ufe20-\\ufe2f",cu="\\u20d0-\\u20ff",lu=ou+au+cu,uu="\\ufe0e\\ufe0f",fu="["+bi+"]",Pr="["+lu+"]",Rr="\\ud83c[\\udffb-\\udfff]",du="(?:"+Pr+"|"+Rr+")",_i="[^"+bi+"]",wi="(?:\\ud83c[\\udde6-\\uddff]){2}",Si="[\\ud800-\\udbff][\\udc00-\\udfff]",hu="\\u200d",Ci=du+"?",Ti="["+uu+"]?",pu="(?:"+hu+"(?:"+[_i,wi,Si].join("|")+")"+Ti+Ci+")*",mu=Ti+Ci+pu,gu="(?:"+[_i+Pr+"?",Pr,wi,Si,fu].join("|")+")",yu=RegExp(Rr+"(?="+Rr+")|"+gu+mu,"g");function vu(e){return e.match(yu)||[]}function bu(e){return Mr(e)?vu(e):su(e)}function _u(){this.__data__=new Ee,this.size=0}function wu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Su(e){return this.__data__.get(e)}function Cu(e){return this.__data__.has(e)}var Tu=200;function Eu(e,t){var r=this.__data__;if(r instanceof Ee){var n=r.__data__;if(!nt||n.length<Tu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new xe(n)}return r.set(e,t),this.size=r.size,this}function ke(e){var t=this.__data__=new Ee(e);this.size=t.size}ke.prototype.clear=_u,ke.prototype.delete=wu,ke.prototype.get=Su,ke.prototype.has=Cu,ke.prototype.set=Eu;function xu(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var o=e[r];t(o,r,e)&&(s[i++]=o)}return s}function Au(){return[]}var Ou=Object.prototype,ku=Ou.propertyIsEnumerable,Ei=Object.getOwnPropertySymbols,Mu=Ei?function(e){return e==null?[]:(e=Object(e),xu(Ei(e),function(t){return ku.call(e,t)}))}:Au;const Pu=Mu;function Ru(e,t,r){var n=t(e);return Te(e)?n:gi(n,r(e))}function xi(e){return Ru(e,sl,Pu)}var Lu=$e(ge,"DataView");const Lr=Lu;var Nu=$e(ge,"Promise");const Nr=Nu;var Du=$e(ge,"Set");const Dr=Du;var Ai="[object Map]",Fu="[object Object]",Oi="[object Promise]",ki="[object Set]",Mi="[object WeakMap]",Pi="[object DataView]",$u=Fe(Lr),Iu=Fe(nt),ju=Fe(Nr),zu=Fe(Dr),Wu=Fe(wr),je=He;(Lr&&je(new Lr(new ArrayBuffer(1)))!=Pi||nt&&je(new nt)!=Ai||Nr&&je(Nr.resolve())!=Oi||Dr&&je(new Dr)!=ki||wr&&je(new wr)!=Mi)&&(je=function(e){var t=He(e),r=t==Fu?e.constructor:void 0,n=r?Fe(r):"";if(n)switch(n){case $u:return Pi;case Iu:return Ai;case ju:return Oi;case zu:return ki;case Wu:return Mi}return t});const Ri=je;var Bu=ge.Uint8Array;const Li=Bu;var Hu="__lodash_hash_undefined__";function Uu(e){return this.__data__.set(e,Hu),this}function Gu(e){return this.__data__.has(e)}function Ot(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new xe;++t<r;)this.add(e[t])}Ot.prototype.add=Ot.prototype.push=Uu,Ot.prototype.has=Gu;function Yu(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Ku(e,t){return e.has(t)}var Vu=1,Xu=2;function Ni(e,t,r,n,i,s){var o=r&Vu,c=e.length,l=t.length;if(c!=l&&!(o&&l>c))return!1;var a=s.get(e),u=s.get(t);if(a&&u)return a==t&&u==e;var d=-1,h=!0,v=r&Xu?new Ot:void 0;for(s.set(e,t),s.set(t,e);++d<c;){var g=e[d],_=t[d];if(n)var b=o?n(_,g,d,t,e,s):n(g,_,d,e,t,s);if(b!==void 0){if(b)continue;h=!1;break}if(v){if(!Yu(t,function(T,D){if(!Ku(v,D)&&(g===T||i(g,T,r,n,s)))return v.push(D)})){h=!1;break}}else if(!(g===_||i(g,_,r,n,s))){h=!1;break}}return s.delete(e),s.delete(t),h}function Ju(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function Zu(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Qu=1,qu=2,ef="[object Boolean]",tf="[object Date]",rf="[object Error]",nf="[object Map]",sf="[object Number]",of="[object RegExp]",af="[object Set]",cf="[object String]",lf="[object Symbol]",uf="[object ArrayBuffer]",ff="[object DataView]",Di=ye?ye.prototype:void 0,Fr=Di?Di.valueOf:void 0;function df(e,t,r,n,i,s,o){switch(r){case ff:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case uf:return!(e.byteLength!=t.byteLength||!s(new Li(e),new Li(t)));case ef:case tf:case sf:return Cr(+e,+t);case rf:return e.name==t.name&&e.message==t.message;case of:case cf:return e==t+"";case nf:var c=Ju;case af:var l=n&Qu;if(c||(c=Zu),e.size!=t.size&&!l)return!1;var a=o.get(e);if(a)return a==t;n|=qu,o.set(e,t);var u=Ni(c(e),c(t),n,i,s,o);return o.delete(e),u;case lf:if(Fr)return Fr.call(e)==Fr.call(t)}return!1}var hf=1,pf=Object.prototype,mf=pf.hasOwnProperty;function gf(e,t,r,n,i,s){var o=r&hf,c=xi(e),l=c.length,a=xi(t),u=a.length;if(l!=u&&!o)return!1;for(var d=l;d--;){var h=c[d];if(!(o?h in t:mf.call(t,h)))return!1}var v=s.get(e),g=s.get(t);if(v&&g)return v==t&&g==e;var _=!0;s.set(e,t),s.set(t,e);for(var b=o;++d<l;){h=c[d];var T=e[h],D=t[h];if(n)var L=o?n(D,T,h,t,e,s):n(T,D,h,e,t,s);if(!(L===void 0?T===D||i(T,D,r,n,s):L)){_=!1;break}b||(b=h=="constructor")}if(_&&!b){var k=e.constructor,C=t.constructor;k!=C&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof C=="function"&&C instanceof C)&&(_=!1)}return s.delete(e),s.delete(t),_}var yf=1,Fi="[object Arguments]",$i="[object Array]",kt="[object Object]",vf=Object.prototype,Ii=vf.hasOwnProperty;function bf(e,t,r,n,i,s){var o=Te(e),c=Te(t),l=o?$i:Ri(e),a=c?$i:Ri(t);l=l==Fi?kt:l,a=a==Fi?kt:a;var u=l==kt,d=a==kt,h=l==a;if(h&&xr(e)){if(!xr(t))return!1;o=!0,u=!1}if(h&&!u)return s||(s=new ke),o||pi(e)?Ni(e,t,r,n,i,s):df(e,t,l,r,n,i,s);if(!(r&yf)){var v=u&&Ii.call(e,"__wrapped__"),g=d&&Ii.call(t,"__wrapped__");if(v||g){var _=v?e.value():e,b=g?t.value():t;return s||(s=new ke),i(_,b,r,n,s)}}return h?(s||(s=new ke),gf(e,t,r,n,i,s)):!1}function ji(e,t,r,n,i){return e===t?!0:e==null||t==null||!Ue(e)&&!Ue(t)?e!==e&&t!==t:bf(e,t,r,n,ji,i)}function _f(e,t){return e!=null&&t in Object(e)}function wf(e,t,r){t=At(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=kr(t[n]);if(!(s=e!=null&&r(e,o)))break;e=e[o]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&Tr(i)&&Sr(o,i)&&(Te(e)||Er(e)))}function Sf(e,t){return e!=null&&wf(e,t,_f)}function Cf(e){return function(t){return t==null?void 0:t[e]}}var Tf=function(){return ge.Date.now()};const $r=Tf;var Ef="Expected a function",xf=Math.max,Af=Math.min;function zi(e,t,r){var n,i,s,o,c,l,a=0,u=!1,d=!1,h=!0;if(typeof e!="function")throw new TypeError(Ef);t=br(t)||0,Oe(r)&&(u=!!r.leading,d="maxWait"in r,s=d?xf(br(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h);function v(S){var A=n,E=i;return n=i=void 0,a=S,o=e.apply(E,A),o}function g(S){return a=S,c=setTimeout(T,t),u?v(S):o}function _(S){var A=S-l,E=S-a,M=t-A;return d?Af(M,s-E):M}function b(S){var A=S-l,E=S-a;return l===void 0||A>=t||A<0||d&&E>=s}function T(){var S=$r();if(b(S))return D(S);c=setTimeout(T,_(S))}function D(S){return c=void 0,h&&n?v(S):(n=i=void 0,o)}function L(){c!==void 0&&clearTimeout(c),a=0,n=l=i=c=void 0}function k(){return c===void 0?o:D($r())}function C(){var S=$r(),A=b(S);if(n=arguments,i=this,l=S,A){if(c===void 0)return g(l);if(d)return clearTimeout(c),c=setTimeout(T,t),v(l)}return c===void 0&&(c=setTimeout(T,t)),o}return C.cancel=L,C.flush=k,C}function Of(e,t){return ji(e,t)}function kf(e,t,r,n){if(!Oe(e))return e;t=At(t,e);for(var i=-1,s=t.length,o=s-1,c=e;c!=null&&++i<s;){var l=kr(t[i]),a=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=o){var u=c[l];a=n?n(u,l,c):void 0,a===void 0&&(a=Oe(u)?u:Sr(t[i+1])?[]:{})}oc(c,l,a),c=c[l]}return e}function Mf(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],c=Hl(e,o);r(c,o)&&kf(s,At(o,e),c)}return s}function Pf(e){return Vl(2,e)}var Rf=9007199254740991,Lf=Math.floor;function Wi(e,t){var r="";if(!e||t<1||t>Rf)return r;do t%2&&(r+=e),t=Lf(t/2),t&&(e+=e);while(t);return r}var Nf=Cf("length");const Df=Nf;var Bi="\\ud800-\\udfff",Ff="\\u0300-\\u036f",$f="\\ufe20-\\ufe2f",If="\\u20d0-\\u20ff",jf=Ff+$f+If,zf="\\ufe0e\\ufe0f",Wf="["+Bi+"]",Ir="["+jf+"]",jr="\\ud83c[\\udffb-\\udfff]",Bf="(?:"+Ir+"|"+jr+")",Hi="[^"+Bi+"]",Ui="(?:\\ud83c[\\udde6-\\uddff]){2}",Gi="[\\ud800-\\udbff][\\udc00-\\udfff]",Hf="\\u200d",Yi=Bf+"?",Ki="["+zf+"]?",Uf="(?:"+Hf+"(?:"+[Hi,Ui,Gi].join("|")+")"+Ki+Yi+")*",Gf=Ki+Yi+Uf,Yf="(?:"+[Hi+Ir+"?",Ir,Ui,Gi,Wf].join("|")+")",Vi=RegExp(jr+"(?="+jr+")|"+Yf+Gf,"g");function Kf(e){for(var t=Vi.lastIndex=0;Vi.test(e);)++t;return t}function Xi(e){return Mr(e)?Kf(e):Df(e)}var Vf=Math.ceil;function Xf(e,t){t=t===void 0?" ":vr(t);var r=t.length;if(r<2)return r?Wi(t,e):t;var n=Wi(t,Vf(e/Xi(t)));return Mr(t)?Jl(bu(n),0,e).join(""):n.slice(0,e)}function Jf(e,t,r){e=mi(e),t=ri(t);var n=t?Xi(e):0;return t&&n<t?Xf(t-n,r)+e:e}function Zf(e,t){return Mf(e,t,function(r,n){return Sf(e,n)})}var Qf=Yl(function(e,t){return e==null?{}:Zf(e,t)});const Ji=Qf;var qf="Expected a function";function ed(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(qf);return Oe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),zi(e,t,{leading:n,maxWait:t,trailing:i})}const zr=Symbol(),td=Symbol(),Wr=Symbol();let rd=(e,t)=>new Proxy(e,t);const Br=Object.getPrototypeOf,Hr=new WeakMap,Zi=e=>e&&(Hr.has(e)?Hr.get(e):Br(e)===Object.prototype||Br(e)===Array.prototype),Qi=e=>typeof e=="object"&&e!==null,qi=new WeakMap,es=e=>e[Wr]||e,ts=(e,t,r)=>{if(!Zi(e))return e;const n=es(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(c=>!c.writable))(n);let s=r&&r.get(n);return s&&s[1].f===i||(s=((o,c)=>{const l={f:c};let a=!1;const u=(h,v)=>{if(!a){let g=l.a.get(o);g||(g=new Set,l.a.set(o,g)),v&&g.has(zr)||g.add(h)}},d={get:(h,v)=>v===Wr?o:(u(v),ts(h[v],l.a,l.c)),has:(h,v)=>v===td?(a=!0,l.a.delete(o),!0):(u(v),v in h),getOwnPropertyDescriptor:(h,v)=>(u(v,!0),Object.getOwnPropertyDescriptor(h,v)),ownKeys:h=>(u(zr),Reflect.ownKeys(h))};return c&&(d.set=d.deleteProperty=()=>!1),[d,l]})(n,i),s[1].p=rd(i?(o=>{let c=qi.get(o);if(!c){if(Array.isArray(o))c=Array.from(o);else{const l=Object.getOwnPropertyDescriptors(o);Object.values(l).forEach(a=>{a.configurable=!0}),c=Object.create(Br(o),l)}qi.set(o,c)}return c})(n):n,s[0]),r&&r.set(n,s)),s[1].a=t,s[1].c=r,s[1].p},nd=(e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((i,s)=>i!==n[s])},rs=(e,t,r,n)=>{if(Object.is(e,t))return!1;if(!Qi(e)||!Qi(t))return!0;const i=r.get(es(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 c=o===zr?nd(e,t):rs(e[o],t[o],r,n);if(c!==!0&&c!==!1||(s=c),s)break}return s===null&&(s=!0),n&&n.set(e,{n:t,g:s}),s},ns=e=>Zi(e)&&e[Wr]||null,is=(e,t=!0)=>{Hr.set(e,t)};var ss=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function id(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var os={exports:{}},as={};/** * @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 Ge=Ce.default;function sd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var od=typeof Object.is=="function"?Object.is:sd,ad=Ge.useState,cd=Ge.useEffect,ld=Ge.useLayoutEffect,ud=Ge.useDebugValue;function fd(e,t){var r=t(),n=ad({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return ld(function(){i.value=r,i.getSnapshot=t,Ur(i)&&s({inst:i})},[e,r,t]),cd(function(){return Ur(i)&&s({inst:i}),e(function(){Ur(i)&&s({inst:i})})},[e]),ud(r),r}function Ur(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!od(e,r)}catch{return!0}}function dd(e,t){return t()}var hd=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?dd:fd;as.useSyncExternalStore=Ge.useSyncExternalStore!==void 0?Ge.useSyncExternalStore:hd,function(e){e.exports=as}(os);const pd=id(os.exports),Gr=e=>typeof e=="object"&&e!==null,de=Symbol(),Yr=new WeakSet,md=(e=Object.is,t=(a,u)=>new Proxy(a,u),r=a=>Gr(a)&&!Yr.has(a)&&(Array.isArray(a)||!(Symbol.iterator in a))&&!(a instanceof WeakMap)&&!(a instanceof WeakSet)&&!(a instanceof Error)&&!(a instanceof Number)&&!(a instanceof Date)&&!(a instanceof String)&&!(a instanceof RegExp)&&!(a instanceof ArrayBuffer),n=a=>{switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:throw a}},i=new WeakMap,s=(a,u,d,h=n)=>{const v=i.get(u);if((v==null?void 0:v[0])===d)return v[1];const g=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a));return is(g,!0),i.set(u,[d,g]),Reflect.ownKeys(a).forEach(_=>{const b=Reflect.get(a,_,u);Yr.has(b)?(is(b,!1),g[_]=b):b instanceof Promise?Object.defineProperty(g,_,{get(){return h(b)}}):b!=null&&b[de]?g[_]=Kr(b,h):g[_]=b}),Object.freeze(g)},o=new WeakMap,c=[1],l=a=>{if(!Gr(a))throw new Error("object required");const u=o.get(a);if(u)return u;let d=c[0];const h=new Set,v=(k,C=++c[0])=>{d!==C&&(d=C,h.forEach(S=>S(k,C)))},g=new Map,_=k=>{let C=g.get(k);return C||(C=(S,A)=>{const E=[...S];E[1]=[k,...E[1]],v(E,A)},g.set(k,C)),C},b=k=>{const C=g.get(k);return g.delete(k),C},T=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a)),L=t(T,{get(k,C,S){return C===de?[k,S,d,s,h]:Reflect.get(k,C,S)},deleteProperty(k,C){var S;const A=Reflect.get(k,C),E=(S=A==null?void 0:A[de])==null?void 0:S[4];E&&E.delete(b(C));const M=Reflect.deleteProperty(k,C);return M&&v(["delete",[C],A]),M},set(k,C,S,A){var E,M;const P=Reflect.has(k,C),oe=Reflect.get(k,C,A);if(P&&e(oe,S))return!0;const ne=(E=oe==null?void 0:oe[de])==null?void 0:E[4];ne&&ne.delete(b(C)),Gr(S)&&(S=ns(S)||S);let N=S;return(M=Object.getOwnPropertyDescriptor(k,C))!=null&&M.set||(S instanceof Promise?S.then(O=>{S.status="fulfilled",S.value=O,v(["resolve",[C],O])}).catch(O=>{S.status="rejected",S.reason=O,v(["reject",[C],O])}):(!(S!=null&&S[de])&&r(S)&&(N=it(S)),N!=null&&N[de]&&N[de][4].add(_(C)))),Reflect.set(k,C,N,A),v(["set",[C],S,oe]),!0}});return o.set(a,L),Reflect.ownKeys(a).forEach(k=>{const C=Object.getOwnPropertyDescriptor(a,k);C.get||C.set?Object.defineProperty(T,k,C):L[k]=a[k]}),L})=>[l,de,Yr,e,t,r,n,i,s,o,c],[gd]=md();function it(e={}){return gd(e)}function cs(e,t,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[de])&&console.warn("Please use proxy object");let n;const i=[],s=e[de][4],o=c=>{if(i.push(c),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 Kr(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[de])&&console.warn("Please use proxy object");const[r,n,i,s]=e[de];return s(r,n,i,t)}const{use:ls}=Ce.default,{useSyncExternalStore:yd}=pd,vd=(e,t)=>{const r=[],n=new WeakSet,i=(s,o)=>{if(n.has(s))return;let c;typeof s=="object"&&s!==null&&(n.add(s),c=t.get(ns(s)||s)),c?c.forEach(l=>{"value"in(Object.getOwnPropertyDescriptor(s,l)||{})&&i(s[l],o?[...o,l]:[l])}):o&&r.push(o)};return i(e),r},bd=(e,t)=>{const r=y.useRef();y.useEffect(()=>{r.current=vd(e,t)}),y.useDebugValue(r.current)};function st(e,t){const r=t==null?void 0:t.sync,n=y.useRef(),i=y.useRef();let s=!0;const o=yd(y.useCallback(a=>{const u=cs(e,a,r);return a(),u},[e,r]),()=>{const a=Kr(e,ls);try{if(!s&&n.current&&i.current&&!rs(n.current,a,i.current,new WeakMap))return n.current}catch{}return a},()=>Kr(e,ls));s=!1;const c=new WeakMap;y.useEffect(()=>{n.current=o,i.current=c}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&bd(o,c);const l=y.useMemo(()=>new WeakMap,[]);return ts(o,c,l)}const us={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1},he=it(us),fs=Object.keys(us),Me=function(){return st(he)},ds="bilibili-app-recommend.config";function _d(){const e=GM_getValue(ds);e&&typeof e=="object"&&Object.assign(he,Ji(e,fs)),cs(he,()=>{wd()})}function wd(){const e=Ji(he,fs);GM_setValue(ds,e)}function Sd(e){Object.assign(he,e)}_d();var ot={exports:{}};const Cd=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),hs=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},ps=({clearTimeout:e,setTimeout:t,willResolve:r})=>(n,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(hs());let o,c,l;const a=e||clearTimeout,u=()=>{a(o),l(hs())},d=()=>{s&&s.removeEventListener("abort",u)},h=new Promise((v,g)=>{c=()=>{d(),r?v(i):g(i)},l=g,o=(t||setTimeout)(c,n)});return s&&s.addEventListener("abort",u,{once:!0}),h.clear=()=>{a(o),o=null,c()},h},ms=e=>{const t=ps({...e,willResolve:!0});return t.reject=ps({...e,willResolve:!1}),t.range=(r,n,i)=>t(Cd(r,n),i),t},Vr=ms();Vr.createWithTimers=ms,ot.exports=Vr,ot.exports.default=Vr;var Mt,gs=Qo.default;Mt=gs.createRoot,gs.hydrateRoot;const kg="";var ys={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],i=0;i<arguments.length;i++){var s=arguments[i];if(!!s){var o=typeof s;if(o==="string"||o==="number")n.push(s);else if(Array.isArray(s)){if(s.length){var c=r.apply(null,s);c&&n.push(c)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var l in s)t.call(s,l)&&s[l]&&n.push(l)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ys);const te=ys.exports;function Td(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Ed(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var xd=function(){function e(r){var n=this;this._insertTag=function(i){var s;n.tags.length===0?n.insertionPoint?s=n.insertionPoint.nextSibling:n.prepend?s=n.container.firstChild:s=n.before:s=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,s),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Ed(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=Td(i);try{s.insertRule(n,s.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){return n.parentNode&&n.parentNode.removeChild(n)}),this.tags=[],this.ctr=0},e}(),re="-ms-",Pt="-moz-",B="-webkit-",vs="comm",Xr="rule",Jr="decl",Ad="@import",bs="@keyframes",Od=Math.abs,Rt=String.fromCharCode,kd=Object.assign;function Md(e,t){return q(e,0)^45?(((t<<2^q(e,0))<<2^q(e,1))<<2^q(e,2))<<2^q(e,3):0}function _s(e){return e.trim()}function Pd(e,t){return(e=t.exec(e))?e[0]:e}function H(e,t,r){return e.replace(t,r)}function Zr(e,t){return e.indexOf(t)}function q(e,t){return e.charCodeAt(t)|0}function at(e,t,r){return e.slice(t,r)}function ve(e){return e.length}function Qr(e){return e.length}function Lt(e,t){return t.push(e),e}function Rd(e,t){return e.map(t).join("")}var Nt=1,Ye=1,ws=0,ie=0,V=0,Ke="";function Dt(e,t,r,n,i,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:Nt,column:Ye,length:o,return:""}}function ct(e,t){return kd(Dt("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ld(){return V}function Nd(){return V=ie>0?q(Ke,--ie):0,Ye--,V===10&&(Ye=1,Nt--),V}function ce(){return V=ie<ws?q(Ke,ie++):0,Ye++,V===10&&(Ye=1,Nt++),V}function be(){return q(Ke,ie)}function Ft(){return ie}function lt(e,t){return at(Ke,e,t)}function ut(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ss(e){return Nt=Ye=1,ws=ve(Ke=e),ie=0,[]}function Cs(e){return Ke="",e}function $t(e){return _s(lt(ie-1,qr(e===91?e+2:e===40?e+1:e)))}function Dd(e){for(;(V=be())&&V<33;)ce();return ut(e)>2||ut(V)>3?"":" "}function Fd(e,t){for(;--t&&ce()&&!(V<48||V>102||V>57&&V<65||V>70&&V<97););return lt(e,Ft()+(t<6&&be()==32&&ce()==32))}function qr(e){for(;ce();)switch(V){case e:return ie;case 34:case 39:e!==34&&e!==39&&qr(V);break;case 40:e===41&&qr(e);break;case 92:ce();break}return ie}function $d(e,t){for(;ce()&&e+V!==47+10;)if(e+V===42+42&&be()===47)break;return"/*"+lt(t,ie-1)+"*"+Rt(e===47?e:ce())}function Id(e){for(;!ut(be());)ce();return lt(e,ie)}function jd(e){return Cs(It("",null,null,null,[""],e=Ss(e),0,[0],e))}function It(e,t,r,n,i,s,o,c,l){for(var a=0,u=0,d=o,h=0,v=0,g=0,_=1,b=1,T=1,D=0,L="",k=i,C=s,S=n,A=L;b;)switch(g=D,D=ce()){case 40:if(g!=108&&q(A,d-1)==58){Zr(A+=H($t(D),"&","&\f"),"&\f")!=-1&&(T=-1);break}case 34:case 39:case 91:A+=$t(D);break;case 9:case 10:case 13:case 32:A+=Dd(g);break;case 92:A+=Fd(Ft()-1,7);continue;case 47:switch(be()){case 42:case 47:Lt(zd($d(ce(),Ft()),t,r),l);break;default:A+="/"}break;case 123*_:c[a++]=ve(A)*T;case 125*_:case 59:case 0:switch(D){case 0:case 125:b=0;case 59+u:v>0&&ve(A)-d&&Lt(v>32?Es(A+";",n,r,d-1):Es(H(A," ","")+";",n,r,d-2),l);break;case 59:A+=";";default:if(Lt(S=Ts(A,t,r,a,u,i,c,L,k=[],C=[],d),s),D===123)if(u===0)It(A,t,S,S,k,s,d,c,C);else switch(h===99&&q(A,3)===110?100:h){case 100:case 109:case 115:It(e,S,S,n&&Lt(Ts(e,S,S,0,0,i,c,L,i,k=[],d),C),i,C,d,c,n?k:C);break;default:It(A,S,S,S,[""],C,0,c,C)}}a=u=v=0,_=T=1,L=A="",d=o;break;case 58:d=1+ve(A),v=g;default:if(_<1){if(D==123)--_;else if(D==125&&_++==0&&Nd()==125)continue}switch(A+=Rt(D),D*_){case 38:T=u>0?1:(A+="\f",-1);break;case 44:c[a++]=(ve(A)-1)*T,T=1;break;case 64:be()===45&&(A+=$t(ce())),h=be(),u=d=ve(L=A+=Id(Ft())),D++;break;case 45:g===45&&ve(A)==2&&(_=0)}}return s}function Ts(e,t,r,n,i,s,o,c,l,a,u){for(var d=i-1,h=i===0?s:[""],v=Qr(h),g=0,_=0,b=0;g<n;++g)for(var T=0,D=at(e,d+1,d=Od(_=o[g])),L=e;T<v;++T)(L=_s(_>0?h[T]+" "+D:H(D,/&\f/g,h[T])))&&(l[b++]=L);return Dt(e,t,r,i===0?Xr:c,l,a,u)}function zd(e,t,r){return Dt(e,t,r,vs,Rt(Ld()),at(e,2,-2),0)}function Es(e,t,r,n){return Dt(e,t,r,Jr,at(e,0,n),at(e,n+1,-1),n)}function Ve(e,t){for(var r="",n=Qr(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function Wd(e,t,r,n){switch(e.type){case Ad:case Jr:return e.return=e.return||e.value;case vs:return"";case bs:return e.return=e.value+"{"+Ve(e.children,n)+"}";case Xr:e.value=e.props.join(",")}return ve(r=Ve(e.children,n))?e.return=e.value+"{"+r+"}":""}function Bd(e){var t=Qr(e);return function(r,n,i,s){for(var o="",c=0;c<t;c++)o+=e[c](r,n,i,s)||"";return o}}function Hd(e){return function(t){t.root||(t=t.return)&&e(t)}}function Ud(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Gd=function(t,r,n){for(var i=0,s=0;i=s,s=be(),i===38&&s===12&&(r[n]=1),!ut(s);)ce();return lt(t,ie)},Yd=function(t,r){var n=-1,i=44;do switch(ut(i)){case 0:i===38&&be()===12&&(r[n]=1),t[n]+=Gd(ie-1,r,n);break;case 2:t[n]+=$t(i);break;case 4:if(i===44){t[++n]=be()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Rt(i)}while(i=ce());return t},Kd=function(t,r){return Cs(Yd(Ss(t),r))},xs=new WeakMap,Vd=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!xs.get(n))&&!i){xs.set(t,!0);for(var s=[],o=Kd(r,s),c=n.props,l=0,a=0;l<o.length;l++)for(var u=0;u<c.length;u++,a++)t.props[a]=s[l]?o[l].replace(/&\f/g,c[u]):c[u]+" "+o[l]}}},Xd=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function As(e,t){switch(Md(e,t)){case 5103:return B+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return B+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return B+e+Pt+e+re+e+e;case 6828:case 4268:return B+e+re+e+e;case 6165:return B+e+re+"flex-"+e+e;case 5187:return B+e+H(e,/(\w+).+(:[^]+)/,B+"box-$1$2"+re+"flex-$1$2")+e;case 5443:return B+e+re+"flex-item-"+H(e,/flex-|-self/,"")+e;case 4675:return B+e+re+"flex-line-pack"+H(e,/align-content|flex-|-self/,"")+e;case 5548:return B+e+re+H(e,"shrink","negative")+e;case 5292:return B+e+re+H(e,"basis","preferred-size")+e;case 6060:return B+"box-"+H(e,"-grow","")+B+e+re+H(e,"grow","positive")+e;case 4554:return B+H(e,/([^-])(transform)/g,"$1"+B+"$2")+e;case 6187:return H(H(H(e,/(zoom-|grab)/,B+"$1"),/(image-set)/,B+"$1"),e,"")+e;case 5495:case 3959:return H(e,/(image-set\([^]*)/,B+"$1$`$1");case 4968:return H(H(e,/(.+:)(flex-)?(.*)/,B+"box-pack:$3"+re+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+B+e+e;case 4095:case 3583:case 4068:case 2532:return H(e,/(.+)-inline(.+)/,B+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ve(e)-1-t>6)switch(q(e,t+1)){case 109:if(q(e,t+4)!==45)break;case 102:return H(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+Pt+(q(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Zr(e,"stretch")?As(H(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(q(e,t+1)!==115)break;case 6444:switch(q(e,ve(e)-3-(~Zr(e,"!important")&&10))){case 107:return H(e,":",":"+B)+e;case 101:return H(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(q(e,14)===45?"inline-":"")+"box$3$1"+B+"$2$3$1"+re+"$2box$3")+e}break;case 5936:switch(q(e,t+11)){case 114:return B+e+re+H(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+re+H(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+re+H(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+re+e+e}return e}var Jd=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Jr:t.return=As(t.value,t.length);break;case bs:return Ve([ct(t,{value:H(t.value,"@","@"+B)})],i);case Xr:if(t.length)return Rd(t.props,function(s){switch(Pd(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ve([ct(t,{props:[H(s,/:(read-\w+)/,":"+Pt+"$1")]})],i);case"::placeholder":return Ve([ct(t,{props:[H(s,/:(plac\w+)/,":"+B+"input-$1")]}),ct(t,{props:[H(s,/:(plac\w+)/,":"+Pt+"$1")]}),ct(t,{props:[H(s,/:(plac\w+)/,re+"input-$1")]})],i)}return""})}},Zd=[Jd],Os=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(_){var b=_.getAttribute("data-emotion");b.indexOf(" ")!==-1&&(document.head.appendChild(_),_.setAttribute("data-s",""))})}var i=t.stylisPlugins||Zd,s={},o,c=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(_){for(var b=_.getAttribute("data-emotion").split(" "),T=1;T<b.length;T++)s[b[T]]=!0;c.push(_)});var l,a=[Vd,Xd];{var u,d=[Wd,Hd(function(_){u.insert(_)})],h=Bd(a.concat(i,d)),v=function(b){return Ve(jd(b),h)};l=function(b,T,D,L){u=D,v(b?b+"{"+T.styles+"}":T.styles),L&&(g.inserted[T.name]=!0)}}var g={key:r,sheet:new xd({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:l};return g.sheet.hydrate(c),g},ks={exports:{}},G={};/** @license React v16.13.1 * react-is.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 J=typeof Symbol=="function"&&Symbol.for,en=J?Symbol.for("react.element"):60103,tn=J?Symbol.for("react.portal"):60106,jt=J?Symbol.for("react.fragment"):60107,zt=J?Symbol.for("react.strict_mode"):60108,Wt=J?Symbol.for("react.profiler"):60114,Bt=J?Symbol.for("react.provider"):60109,Ht=J?Symbol.for("react.context"):60110,rn=J?Symbol.for("react.async_mode"):60111,Ut=J?Symbol.for("react.concurrent_mode"):60111,Gt=J?Symbol.for("react.forward_ref"):60112,Yt=J?Symbol.for("react.suspense"):60113,Qd=J?Symbol.for("react.suspense_list"):60120,Kt=J?Symbol.for("react.memo"):60115,Vt=J?Symbol.for("react.lazy"):60116,qd=J?Symbol.for("react.block"):60121,eh=J?Symbol.for("react.fundamental"):60117,th=J?Symbol.for("react.responder"):60118,rh=J?Symbol.for("react.scope"):60119;function le(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case en:switch(e=e.type,e){case rn:case Ut:case jt:case Wt:case zt:case Yt:return e;default:switch(e=e&&e.$$typeof,e){case Ht:case Gt:case Vt:case Kt:case Bt:return e;default:return t}}case tn:return t}}}function Ms(e){return le(e)===Ut}G.AsyncMode=rn,G.ConcurrentMode=Ut,G.ContextConsumer=Ht,G.ContextProvider=Bt,G.Element=en,G.ForwardRef=Gt,G.Fragment=jt,G.Lazy=Vt,G.Memo=Kt,G.Portal=tn,G.Profiler=Wt,G.StrictMode=zt,G.Suspense=Yt,G.isAsyncMode=function(e){return Ms(e)||le(e)===rn},G.isConcurrentMode=Ms,G.isContextConsumer=function(e){return le(e)===Ht},G.isContextProvider=function(e){return le(e)===Bt},G.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===en},G.isForwardRef=function(e){return le(e)===Gt},G.isFragment=function(e){return le(e)===jt},G.isLazy=function(e){return le(e)===Vt},G.isMemo=function(e){return le(e)===Kt},G.isPortal=function(e){return le(e)===tn},G.isProfiler=function(e){return le(e)===Wt},G.isStrictMode=function(e){return le(e)===zt},G.isSuspense=function(e){return le(e)===Yt},G.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jt||e===Ut||e===Wt||e===zt||e===Yt||e===Qd||typeof e=="object"&&e!==null&&(e.$$typeof===Vt||e.$$typeof===Kt||e.$$typeof===Bt||e.$$typeof===Ht||e.$$typeof===Gt||e.$$typeof===eh||e.$$typeof===th||e.$$typeof===rh||e.$$typeof===qd)},G.typeOf=le,function(e){e.exports=G}(ks);var Ps=ks.exports,nh={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ih={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Rs={};Rs[Ps.ForwardRef]=nh,Rs[Ps.Memo]=ih;var sh=!0;function nn(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var Ls=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||sh===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},Ns=function(t,r,n){Ls(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var s=r;do t.insert(r===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function oh(e){for(var t=0,r,n=0,i=e.length;i>=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 ah={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},ch=/[A-Z]|^ms/g,lh=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ds=function(t){return t.charCodeAt(1)===45},Fs=function(t){return t!=null&&typeof t!="boolean"},sn=Ud(function(e){return Ds(e)?e:e.replace(ch,"-$&").toLowerCase()}),$s=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(lh,function(n,i,s){return _e={name:i,styles:s,next:_e},i})}return ah[t]!==1&&!Ds(t)&&typeof r=="number"&&r!==0?r+"px":r},Mg="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ft(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 uh(e,t,r)}case"function":{if(e!==void 0){var s=_e,o=r(e);return _e=s,ft(e,t,o)}break}}if(t==null)return r;var c=t[r];return c!==void 0?c:r}function uh(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=ft(e,t,r[i])+";";else for(var s in r){var o=r[s];if(typeof o!="object")t!=null&&t[o]!==void 0?n+=s+"{"+t[o]+"}":Fs(o)&&(n+=sn(s)+":"+$s(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)Fs(o[c])&&(n+=sn(s)+":"+$s(s,o[c])+";");else{var l=ft(e,t,o);switch(s){case"animation":case"animationName":{n+=sn(s)+":"+l+";";break}default:n+=s+"{"+l+"}"}}}return n}var Is=/label:\s*([^\s;\n{]+)\s*(;|$)/g,_e,dt=function(t,r,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,s="";_e=void 0;var o=t[0];o==null||o.raw===void 0?(i=!1,s+=ft(n,r,o)):s+=o[0];for(var c=1;c<t.length;c++)s+=ft(n,r,t[c]),i&&(s+=o[c]);Is.lastIndex=0;for(var l="",a;(a=Is.exec(s))!==null;)l+="-"+a[1];var u=oh(s)+l;return{name:u,styles:s,next:_e}},fh=function(t){return t()},dh=Vn["useInsertionEffect"]?Vn["useInsertionEffect"]:!1,hh=dh||fh,Xt={}.hasOwnProperty,js=y.createContext(typeof HTMLElement<"u"?Os({key:"css"}):null);js.Provider;var ph=function(t){return y.forwardRef(function(r,n){var i=y.useContext(js);return t(r,i,n)})},mh=y.createContext({}),on="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",zs=function(t,r){var n={};for(var i in r)Xt.call(r,i)&&(n[i]=r[i]);return n[on]=t,n},gh=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return Ls(r,n,i),hh(function(){return Ns(r,n,i)}),null},Ws=ph(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var i=e[on],s=[n],o="";typeof e.className=="string"?o=nn(t.registered,s,e.className):e.className!=null&&(o=e.className+" ");var c=dt(s,void 0,y.useContext(mh));o+=t.key+"-"+c.name;var l={};for(var a in e)Xt.call(e,a)&&a!=="css"&&a!==on&&(l[a]=e[a]);return l.ref=r,l.className=o,y.createElement(y.Fragment,null,y.createElement(gh,{cache:t,serialized:c,isStringTag:typeof i=="string"}),y.createElement(i,l))});function Xe(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return dt(t)}function Bs(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Hs(e,t,r){var n=[],i=nn(e,n,r);return n.length<2?r:i+t(n)}var yh=function(t){var r=Os(t);r.sheet.speedy=function(c){this.isSpeedy=c},r.compat=!0;var n=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];var d=dt(a,r.registered,void 0);return Ns(r,d,!1),r.key+"-"+d.name},i=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];var d=dt(a,r.registered),h="animation-"+d.name;return Bs(r,{name:d.name,styles:"@keyframes "+h+"{"+d.styles+"}"}),h},s=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];var d=dt(a,r.registered);Bs(r,d)},o=function(){for(var l=arguments.length,a=new Array(l),u=0;u<l;u++)a[u]=arguments[u];return Hs(r.registered,n,vh(a))};return{css:n,cx:o,injectGlobal:s,keyframes:i,hydrate:function(l){l.forEach(function(a){r.inserted[a]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:nn.bind(null,r.registered),merge:Hs.bind(null,r.registered,n)}},vh=function e(t){for(var r="",n=0;n<t.length;n++){var i=t[n];if(i!=null){var s=void 0;switch(typeof i){case"boolean":break;case"object":{if(Array.isArray(i))s=e(i);else{s="";for(var o in i)i[o]&&o&&(s&&(s+=" "),s+=o)}break}default:s=i}s&&(r&&(r+=" "),r+=s)}}return r},bh=yh({key:"css"}),an=bh.css;const Jt=Pf(()=>!!document.querySelectorAll(".bili-feed4").length),Us=function(){return y.useMemo(()=>Jt(),[])},Gs=document.querySelector(".bili-header__bar"),Ys=Boolean(Gs&&window.getComputedStyle(Gs).display==="none")?50:64,Ks=()=>document.body.classList.contains("dark"),Vs=it({value:Ks()});function cn(){return st(Vs).value}const Zt=new MutationObserver(function(){Vs.value=Ks()});Zt.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{Zt==null||Zt.disconnect()});var _h=function(t){return function(r,n){var i=y.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return r()},n)}},Je=function(t){return typeof t=="function"},wh=function(t){return typeof t=="string"},Xs=function(t){return typeof t=="number"},Sh=!1;const ln=Sh;function Y(e){ln&&(Je(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=y.useRef(e);t.current=y.useMemo(function(){return e},[e]);var r=y.useRef();return r.current||(r.current=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return t.current.apply(this,n)}),r.current}const un=_h(y.useEffect);var Js=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Zs=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Qs=function(t,r){var n=r.manual,i=r.ready,s=i===void 0?!0:i,o=r.defaultParams,c=o===void 0?[]:o,l=r.refreshDeps,a=l===void 0?[]:l,u=r.refreshDepsAction,d=y.useRef(!1);return d.current=!1,un(function(){!n&&s&&(d.current=!0,t.run.apply(t,Zs([],Js(c),!1)))},[s]),un(function(){d.current||n||(d.current=!0,u?u():t.refresh())},Zs([],Js(a),!1)),{onBefore:function(){if(!s)return{stopNow:!0}}}};Qs.onInit=function(e){var t=e.ready,r=t===void 0?!0:t,n=e.manual;return{loading:!n&&r}};const Ch=Qs;function fn(e,t){if(e===t)return!0;for(var r=0;r<e.length;r++)if(!Object.is(e[r],t[r]))return!1;return!0}function qs(e,t){var r=y.useRef({deps:t,obj:void 0,initialized:!1}).current;return(r.initialized===!1||!fn(r.deps,t))&&(r.deps=t,r.obj=e(),r.initialized=!0),r.obj}function ht(e){var t=y.useRef(e);return t.current=e,t}var Th=function(t){ln&&(Je(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var r=ht(t);y.useEffect(function(){return function(){r.current()}},[])};const pt=Th;var Qt=globalThis&&globalThis.__assign||function(){return Qt=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Qt.apply(this,arguments)},qt=new Map,Eh=function(t,r,n){var i=qt.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;r>-1&&(s=setTimeout(function(){qt.delete(t)},r)),qt.set(t,Qt(Qt({},n),{timer:s}))},xh=function(t){return qt.get(t)},er=new Map,Ah=function(t){return er.get(t)},Oh=function(t,r){er.set(t,r),r.then(function(n){return er.delete(t),n}).catch(function(){er.delete(t)})},ze={},kh=function(t,r){ze[t]&&ze[t].forEach(function(n){return n(r)})},dn=function(t,r){return ze[t]||(ze[t]=[]),ze[t].push(r),function(){var i=ze[t].indexOf(r);ze[t].splice(i,1)}},Mh=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Ph=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Rh=function(t,r){var n=r.cacheKey,i=r.cacheTime,s=i===void 0?5*60*1e3:i,o=r.staleTime,c=o===void 0?0:o,l=r.setCache,a=r.getCache,u=y.useRef(),d=y.useRef(),h=function(_,b){l?l(b):Eh(_,s,b),kh(_,b.data)},v=function(_,b){return b===void 0&&(b=[]),a?a(b):xh(_)};return qs(function(){if(!!n){var g=v(n);g&&Object.hasOwnProperty.call(g,"data")&&(t.state.data=g.data,t.state.params=g.params,(c===-1||new Date().getTime()-g.time<=c)&&(t.state.loading=!1)),u.current=dn(n,function(_){t.setState({data:_})})}},[]),pt(function(){var g;(g=u.current)===null||g===void 0||g.call(u)}),n?{onBefore:function(_){var b=v(n,_);return!b||!Object.hasOwnProperty.call(b,"data")?{}:c===-1||new Date().getTime()-b.time<=c?{loading:!1,data:b==null?void 0:b.data,error:void 0,returnNow:!0}:{data:b==null?void 0:b.data,error:void 0}},onRequest:function(_,b){var T=Ah(n);return T&&T!==d.current?{servicePromise:T}:(T=_.apply(void 0,Ph([],Mh(b),!1)),d.current=T,Oh(n,T),{servicePromise:T})},onSuccess:function(_,b){var T;n&&((T=u.current)===null||T===void 0||T.call(u),h(n,{data:_,params:b,time:new Date().getTime()}),u.current=dn(n,function(D){t.setState({data:D})}))},onMutate:function(_){var b;n&&((b=u.current)===null||b===void 0||b.call(u),h(n,{data:_,params:t.state.params,time:new Date().getTime()}),u.current=dn(n,function(T){t.setState({data:T})}))}}:{}};const Lh=Rh;var Nh=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Dh=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},Fh=function(t,r){var n=r.debounceWait,i=r.debounceLeading,s=r.debounceTrailing,o=r.debounceMaxWait,c=y.useRef(),l=y.useMemo(function(){var a={};return i!==void 0&&(a.leading=i),s!==void 0&&(a.trailing=s),o!==void 0&&(a.maxWait=o),a},[i,s,o]);return y.useEffect(function(){if(n){var a=t.runAsync.bind(t);return c.current=zi(function(u){u()},n,l),t.runAsync=function(){for(var u=[],d=0;d<arguments.length;d++)u[d]=arguments[d];return new Promise(function(h,v){var g;(g=c.current)===null||g===void 0||g.call(c,function(){a.apply(void 0,Dh([],Nh(u),!1)).then(h).catch(v)})})},function(){var u;(u=c.current)===null||u===void 0||u.cancel(),t.runAsync=a}}},[n,l]),n?{onCancel:function(){var u;(u=c.current)===null||u===void 0||u.cancel()}}:{}};const $h=Fh;var Ih=function(t,r){var n=r.loadingDelay,i=y.useRef();if(!n)return{};var s=function(){i.current&&clearTimeout(i.current)};return{onBefore:function(){return s(),i.current=setTimeout(function(){t.setState({loading:!0})},n),{loading:!1}},onFinally:function(){s()},onCancel:function(){s()}}};const jh=Ih;var zh=!!(typeof window<"u"&&window.document&&window.document.createElement);const mt=zh;function hn(){return mt?document.visibilityState!=="hidden":!0}var gt=[];function Wh(e){return gt.push(e),function(){var r=gt.indexOf(e);gt.splice(r,1)}}if(mt){var Bh=function(){if(!!hn())for(var t=0;t<gt.length;t++){var r=gt[t];r()}};window.addEventListener("visibilitychange",Bh,!1)}var Hh=function(t,r){var n=r.pollingInterval,i=r.pollingWhenHidden,s=i===void 0?!0:i,o=r.pollingErrorRetryCount,c=o===void 0?-1:o,l=y.useRef(),a=y.useRef(),u=y.useRef(0),d=function(){var v;l.current&&clearTimeout(l.current),(v=a.current)===null||v===void 0||v.call(a)};return un(function(){n||d()},[n]),n?{onBefore:function(){d()},onError:function(){u.current+=1},onSuccess:function(){u.current=0},onFinally:function(){c===-1||c!==-1&&u.current<=c?l.current=setTimeout(function(){!s&&!hn()?a.current=Wh(function(){t.refresh()}):t.refresh()},n):u.current=0},onCancel:function(){d()}}:{}};const Uh=Hh;var Gh=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Yh=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))};function Kh(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];r||(r=!0,e.apply(void 0,Yh([],Gh(n),!1)),setTimeout(function(){r=!1},t))}}function Vh(){return mt&&typeof navigator.onLine<"u"?navigator.onLine:!0}var yt=[];function Xh(e){return yt.push(e),function(){var r=yt.indexOf(e);r>-1&&yt.splice(r,1)}}if(mt){var eo=function(){if(!(!hn()||!Vh()))for(var t=0;t<yt.length;t++){var r=yt[t];r()}};window.addEventListener("visibilitychange",eo,!1),window.addEventListener("focus",eo,!1)}var Jh=function(t,r){var n=r.refreshOnWindowFocus,i=r.focusTimespan,s=i===void 0?5e3:i,o=y.useRef(),c=function(){var a;(a=o.current)===null||a===void 0||a.call(o)};return y.useEffect(function(){if(n){var l=Kh(t.refresh.bind(t),s);o.current=Xh(function(){l()})}return function(){c()}},[n,s]),pt(function(){c()}),{}};const Zh=Jh;var Qh=function(t,r){var n=r.retryInterval,i=r.retryCount,s=y.useRef(),o=y.useRef(0),c=y.useRef(!1);return i?{onBefore:function(){c.current||(o.current=0),c.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,i===-1||o.current<=i){var a=n!=null?n:Math.min(1e3*Math.pow(2,o.current),3e4);s.current=setTimeout(function(){c.current=!0,t.refresh()},a)}else o.current=0},onCancel:function(){o.current=0,s.current&&clearTimeout(s.current)}}:{}};const qh=Qh;var ep=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},tp=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},rp=function(t,r){var n=r.throttleWait,i=r.throttleLeading,s=r.throttleTrailing,o=y.useRef(),c={};return i!==void 0&&(c.leading=i),s!==void 0&&(c.trailing=s),y.useEffect(function(){if(n){var l=t.runAsync.bind(t);return o.current=ed(function(a){a()},n,c),t.runAsync=function(){for(var a=[],u=0;u<arguments.length;u++)a[u]=arguments[u];return new Promise(function(d,h){var v;(v=o.current)===null||v===void 0||v.call(o,function(){l.apply(void 0,tp([],ep(a),!1)).then(d).catch(h)})})},function(){var a;t.runAsync=l,(a=o.current)===null||a===void 0||a.cancel()}}},[n,i,s]),n?{onCancel:function(){var a;(a=o.current)===null||a===void 0||a.cancel()}}:{}};const np=rp;var ip=function(t){ln&&(Je(t)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t,'".'))),y.useEffect(function(){t==null||t()},[])};const sp=ip;var op=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ap=function(){var t=op(y.useState({}),2),r=t[1];return y.useCallback(function(){return r({})},[])};const cp=ap;var Pe=globalThis&&globalThis.__assign||function(){return Pe=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pe.apply(this,arguments)},lp=globalThis&&globalThis.__awaiter||function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function c(u){try{a(n.next(u))}catch(d){o(d)}}function l(u){try{a(n.throw(u))}catch(d){o(d)}}function a(u){u.done?s(u.value):i(u.value).then(c,l)}a((n=n.apply(e,t||[])).next())})},up=globalThis&&globalThis.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(u){return l([a,u])}}function l(a){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){r=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){r.label=a[1];break}if(a[0]===6&&r.label<s[1]){r.label=s[1],s=a;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(a);break}s[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(u){a=[6,u],i=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},fp=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},Ze=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Qe=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))},dp=function(){function e(t,r,n,i){i===void 0&&(i={}),this.serviceRef=t,this.options=r,this.subscribe=n,this.initState=i,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=Pe(Pe(Pe({},this.state),{loading:!r.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=Pe(Pe({},this.state),t),this.subscribe()},e.prototype.runPluginHandler=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this.pluginImpls.map(function(s){var o;return(o=s[t])===null||o===void 0?void 0:o.call.apply(o,Qe([s],Ze(r),!1))}).filter(Boolean);return Object.assign.apply(Object,Qe([{}],Ze(i),!1))},e.prototype.runAsync=function(){for(var t,r,n,i,s,o,c,l,a,u,d=[],h=0;h<arguments.length;h++)d[h]=arguments[h];return lp(this,void 0,void 0,function(){var v,g,_,b,T,D,L,k,C,S,A;return up(this,function(E){switch(E.label){case 0:if(this.count+=1,v=this.count,g=this.runPluginHandler("onBefore",d),_=g.stopNow,b=_===void 0?!1:_,T=g.returnNow,D=T===void 0?!1:T,L=fp(g,["stopNow","returnNow"]),b)return[2,new Promise(function(){})];if(this.setState(Pe({loading:!0,params:d},L)),D)return[2,Promise.resolve(L.data)];(r=(t=this.options).onBefore)===null||r===void 0||r.call(t,d),E.label=1;case 1:return E.trys.push([1,3,,4]),k=this.runPluginHandler("onRequest",this.serviceRef.current,d).servicePromise,k||(k=(A=this.serviceRef).current.apply(A,Qe([],Ze(d),!1))),[4,k];case 2:return C=E.sent(),v!==this.count?[2,new Promise(function(){})]:(this.setState({data:C,error:void 0,loading:!1}),(i=(n=this.options).onSuccess)===null||i===void 0||i.call(n,C,d),this.runPluginHandler("onSuccess",C,d),(o=(s=this.options).onFinally)===null||o===void 0||o.call(s,d,C,void 0),v===this.count&&this.runPluginHandler("onFinally",d,C,void 0),[2,C]);case 3:if(S=E.sent(),v!==this.count)return[2,new Promise(function(){})];throw this.setState({error:S,loading:!1}),(l=(c=this.options).onError)===null||l===void 0||l.call(c,S,d),this.runPluginHandler("onError",S,d),(u=(a=this.options).onFinally)===null||u===void 0||u.call(a,d,void 0,S),v===this.count&&this.runPluginHandler("onFinally",d,void 0,S),S;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];this.runAsync.apply(this,Qe([],Ze(r),!1)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,Qe([],Ze(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Qe([],Ze(this.state.params||[]),!1))},e.prototype.mutate=function(t){var r=Je(t)?t(this.state.data):t;this.runPluginHandler("onMutate",r),this.setState({data:r})},e}();const hp=dp;var pn=globalThis&&globalThis.__assign||function(){return pn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pn.apply(this,arguments)},pp=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},to=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},ro=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))};function mp(e,t,r){t===void 0&&(t={}),r===void 0&&(r=[]);var n=t.manual,i=n===void 0?!1:n,s=pp(t,["manual"]),o=pn({manual:i},s),c=ht(e),l=cp(),a=qs(function(){var u=r.map(function(d){var h;return(h=d==null?void 0:d.onInit)===null||h===void 0?void 0:h.call(d,o)}).filter(Boolean);return new hp(c,o,l,Object.assign.apply(Object,ro([{}],to(u),!1)))},[]);return a.options=o,a.pluginImpls=r.map(function(u){return u(a,o)}),sp(function(){if(!i){var u=a.state.params||t.defaultParams||[];a.run.apply(a,ro([],to(u),!1))}}),pt(function(){a.cancel()}),{loading:a.state.loading,data:a.state.data,error:a.state.error,params:a.state.params||[],cancel:Y(a.cancel.bind(a)),refresh:Y(a.refresh.bind(a)),refreshAsync:Y(a.refreshAsync.bind(a)),run:Y(a.run.bind(a)),runAsync:Y(a.runAsync.bind(a)),mutate:Y(a.mutate.bind(a))}}var gp=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},no=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;n<i;n++)(s||!(n in t))&&(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))};function io(e,t,r){return mp(e,t,no(no([],gp(r||[]),!1),[$h,jh,Uh,Zh,np,Ch,Lh,qh],!1))}var yp=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function so(e,t){e===void 0&&(e=!1);var r=yp(y.useState(e),2),n=r[0],i=r[1],s=y.useMemo(function(){var o=t===void 0?!e:t,c=function(){return i(function(h){return h===e?o:e})},l=function(h){return i(h)},a=function(){return i(e)},u=function(){return i(o)};return{toggle:c,set:l,setLeft:a,setRight:u}},[]);return[n,s]}var vp=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function bp(e){e===void 0&&(e=!1);var t=vp(so(e),2),r=t[0],n=t[1],i=n.toggle,s=n.set,o=y.useMemo(function(){var c=function(){return s(!0)},l=function(){return s(!1)};return{toggle:i,set:function(u){return s(!!u)},setTrue:c,setFalse:l}},[]);return[r,o]}function tr(e,t){if(!!mt){if(!e)return t;var r;return Je(e)?r=e():"current"in e?r=e.current:r=e,r}}var _p=function(t){var r=function(i,s,o){var c=y.useRef(!1),l=y.useRef([]),a=y.useRef([]),u=y.useRef();t(function(){var d,h=Array.isArray(o)?o:[o],v=h.map(function(g){return tr(g)});if(!c.current){c.current=!0,l.current=v,a.current=s,u.current=i();return}(v.length!==l.current.length||!fn(v,l.current)||!fn(s,a.current))&&((d=u.current)===null||d===void 0||d.call(u),l.current=v,a.current=s,u.current=i())}),pt(function(){var d;(d=u.current)===null||d===void 0||d.call(u),c.current=!1})};return r},wp=_p(y.useEffect);const oo=wp;var ao={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(ss,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",c="minute",l="hour",a="day",u="week",d="month",h="quarter",v="year",g="date",_="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,T=/\[([^\]]+)]|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,D={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(N){var O=["th","st","nd","rd"],x=N%100;return"["+N+(O[(x-20)%10]||O[x]||O[0])+"]"}},L=function(N,O,x){var I=String(N);return!I||I.length>=O?N:""+Array(O+1-I.length).join(x)+N},k={s:L,z:function(N){var O=-N.utcOffset(),x=Math.abs(O),I=Math.floor(x/60),f=x%60;return(O<=0?"+":"-")+L(I,2,"0")+":"+L(f,2,"0")},m:function N(O,x){if(O.date()<x.date())return-N(x,O);var I=12*(x.year()-O.year())+(x.month()-O.month()),f=O.clone().add(I,d),m=x-f<0,w=O.clone().add(I+(m?-1:1),d);return+(-(I+(x-f)/(m?f-w:w-f))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:d,y:v,w:u,d:a,D:g,h:l,m:c,s:o,ms:s,Q:h}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},C="en",S={};S[C]=D;var A=function(N){return N instanceof oe},E=function N(O,x,I){var f;if(!O)return C;if(typeof O=="string"){var m=O.toLowerCase();S[m]&&(f=m),x&&(S[m]=x,f=m);var w=O.split("-");if(!f&&w.length>1)return N(w[0])}else{var R=O.name;S[R]=O,f=R}return!I&&f&&(C=f),f||!I&&C},M=function(N,O){if(A(N))return N.clone();var x=typeof O=="object"?O:{};return x.date=N,x.args=arguments,new oe(x)},P=k;P.l=E,P.i=A,P.w=function(N,O){return M(N,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var oe=function(){function N(x){this.$L=E(x.locale,null,!0),this.parse(x)}var O=N.prototype;return O.parse=function(x){this.$d=function(I){var f=I.date,m=I.utc;if(f===null)return new Date(NaN);if(P.u(f))return new Date;if(f instanceof Date)return new Date(f);if(typeof f=="string"&&!/Z$/i.test(f)){var w=f.match(b);if(w){var R=w[2]-1||0,z=(w[7]||"0").substring(0,3);return m?new Date(Date.UTC(w[1],R,w[3]||1,w[4]||0,w[5]||0,w[6]||0,z)):new Date(w[1],R,w[3]||1,w[4]||0,w[5]||0,w[6]||0,z)}}return new Date(f)}(x),this.$x=x.x||{},this.init()},O.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},O.$utils=function(){return P},O.isValid=function(){return this.$d.toString()!==_},O.isSame=function(x,I){var f=M(x);return this.startOf(I)<=f&&f<=this.endOf(I)},O.isAfter=function(x,I){return M(x)<this.startOf(I)},O.isBefore=function(x,I){return this.endOf(I)<M(x)},O.$g=function(x,I,f){return P.u(x)?this[I]:this.set(f,x)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(x,I){var f=this,m=!!P.u(I)||I,w=P.p(x),R=function(Se,X){var pe=P.w(f.$u?Date.UTC(f.$y,X,Se):new Date(f.$y,X,Se),f);return m?pe:pe.endOf(a)},z=function(Se,X){return P.w(f.toDate()[Se].apply(f.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(X)),f)},$=this.$W,j=this.$M,W=this.$D,U="set"+(this.$u?"UTC":"");switch(w){case v:return m?R(1,0):R(31,11);case d:return m?R(1,j):R(0,j+1);case u:var Q=this.$locale().weekStart||0,ae=($<Q?$+7:$)-Q;return R(m?W-ae:W+(6-ae),j);case a:case g:return z(U+"Hours",0);case l:return z(U+"Minutes",1);case c:return z(U+"Seconds",2);case o:return z(U+"Milliseconds",3);default:return this.clone()}},O.endOf=function(x){return this.startOf(x,!1)},O.$set=function(x,I){var f,m=P.p(x),w="set"+(this.$u?"UTC":""),R=(f={},f[a]=w+"Date",f[g]=w+"Date",f[d]=w+"Month",f[v]=w+"FullYear",f[l]=w+"Hours",f[c]=w+"Minutes",f[o]=w+"Seconds",f[s]=w+"Milliseconds",f)[m],z=m===a?this.$D+(I-this.$W):I;if(m===d||m===v){var $=this.clone().set(g,1);$.$d[R](z),$.init(),this.$d=$.set(g,Math.min(this.$D,$.daysInMonth())).$d}else R&&this.$d[R](z);return this.init(),this},O.set=function(x,I){return this.clone().$set(x,I)},O.get=function(x){return this[P.p(x)]()},O.add=function(x,I){var f,m=this;x=Number(x);var w=P.p(I),R=function(j){var W=M(m);return P.w(W.date(W.date()+Math.round(j*x)),m)};if(w===d)return this.set(d,this.$M+x);if(w===v)return this.set(v,this.$y+x);if(w===a)return R(1);if(w===u)return R(7);var z=(f={},f[c]=n,f[l]=i,f[o]=r,f)[w]||1,$=this.$d.getTime()+x*z;return P.w($,this)},O.subtract=function(x,I){return this.add(-1*x,I)},O.format=function(x){var I=this,f=this.$locale();if(!this.isValid())return f.invalidDate||_;var m=x||"YYYY-MM-DDTHH:mm:ssZ",w=P.z(this),R=this.$H,z=this.$m,$=this.$M,j=f.weekdays,W=f.months,U=function(X,pe,wt,fe){return X&&(X[pe]||X(I,m))||wt[pe].slice(0,fe)},Q=function(X){return P.s(R%12||12,X,"0")},ae=f.meridiem||function(X,pe,wt){var fe=X<12?"AM":"PM";return wt?fe.toLowerCase():fe},Se={YY:String(this.$y).slice(-2),YYYY:this.$y,M:$+1,MM:P.s($+1,2,"0"),MMM:U(f.monthsShort,$,W,3),MMMM:U(W,$),D:this.$D,DD:P.s(this.$D,2,"0"),d:String(this.$W),dd:U(f.weekdaysMin,this.$W,j,2),ddd:U(f.weekdaysShort,this.$W,j,3),dddd:j[this.$W],H:String(R),HH:P.s(R,2,"0"),h:Q(1),hh:Q(2),a:ae(R,z,!0),A:ae(R,z,!1),m:String(z),mm:P.s(z,2,"0"),s:String(this.$s),ss:P.s(this.$s,2,"0"),SSS:P.s(this.$ms,3,"0"),Z:w};return m.replace(T,function(X,pe){return pe||Se[X]||w.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(x,I,f){var m,w=P.p(I),R=M(x),z=(R.utcOffset()-this.utcOffset())*n,$=this-R,j=P.m(this,R);return j=(m={},m[v]=j/12,m[d]=j,m[h]=j/3,m[u]=($-z)/6048e5,m[a]=($-z)/864e5,m[l]=$/i,m[c]=$/n,m[o]=$/r,m)[w]||$,f?j:P.a(j)},O.daysInMonth=function(){return this.endOf(d).$D},O.$locale=function(){return S[this.$L]},O.locale=function(x,I){if(!x)return this.$L;var f=this.clone(),m=E(x,I,!0);return m&&(f.$L=m),f},O.clone=function(){return P.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},N}(),ne=oe.prototype;return M.prototype=ne,[["$ms",s],["$s",o],["$m",c],["$H",l],["$W",a],["$M",d],["$y",v],["$D",g]].forEach(function(N){ne[N[1]]=function(O){return this.$g(O,N[0],N[1])}}),M.extend=function(N,O){return N.$i||(N(O,oe,M),N.$i=!0),M},M.locale=E,M.isDayjs=A,M.unix=function(N){return M(1e3*N)},M.en=S[C],M.Ls=S,M.p={},M})})(ao);const co=ao.exports;function rr(e,t,r){r===void 0&&(r={});var n=ht(t);oo(function(){var i=tr(r.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(c){return n.current(c)};return i.addEventListener(e,s,{capture:r.capture,once:r.once,passive:r.passive}),function(){i.removeEventListener(e,s,{capture:r.capture})}}},[e,r.capture,r.once,r.passive],r.target)}var Sp=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};const mn=function(e,t){var r=t||{},n=r.onEnter,i=r.onLeave,s=r.onChange,o=Sp(bp(!1),2),c=o[0],l=o[1],a=l.setTrue,u=l.setFalse;return rr("mouseenter",function(){n==null||n(),a(),s==null||s(!0)},{target:e}),rr("mouseleave",function(){i==null||i(),u(),s==null||s(!1)},{target:e}),c};var Cp=function(t,r){return r===void 0&&(r=[]),Of(t,r)},Tp=function(t,r,n){var i=y.useRef(),s=y.useRef(0);Cp(r,i.current)||(i.current=r,s.current+=1),oo(t,[s.current],n)};const Ep=Tp;var gn=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.")},xp={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},yn={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 Ap(e){var t=Object.keys(yn).reduce(function(r,n){return yn[n](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function lo(e,t,r){var n,i;if(!e.key)return!1;if(Xs(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var c=gn(s),l=c.next();!l.done;l=c.next()){var a=l.value,u=yn[a],d=xp[a.toLowerCase()];(u&&u(e)||d&&d===e.keyCode)&&o++}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return r?o===s.length&&Ap(e)===s.length:o===s.length}function Op(e,t){return Je(e)?e:wh(e)||Xs(e)?function(r){return lo(r,e,t)}:Array.isArray(e)?function(r){return e.some(function(n){return lo(r,n,t)})}:e?function(){return!0}:function(){return!1}}var kp=["keydown"];function We(e,t,r){var n=r||{},i=n.events,s=i===void 0?kp:i,o=n.target,c=n.exactMatch,l=c===void 0?!1:c,a=ht(t),u=ht(e);Ep(function(){var d,h,v,g=tr(o,window);if(!!g){var _=function(k){var C,S=Op(u.current,l);if(S(k))return(C=a.current)===null||C===void 0?void 0:C.call(a,k)};try{for(var b=gn(s),T=b.next();!T.done;T=b.next()){var D=T.value;(v=g==null?void 0:g.addEventListener)===null||v===void 0||v.call(g,D,_)}}catch(L){d={error:L}}finally{try{T&&!T.done&&(h=b.return)&&h.call(b)}finally{if(d)throw d.error}}return function(){var L,k,C;try{for(var S=gn(s),A=S.next();!A.done;A=S.next()){var E=A.value;(C=g==null?void 0:g.removeEventListener)===null||C===void 0||C.call(g,E,_)}}catch(M){L={error:M}}finally{try{A&&!A.done&&(k=S.return)&&k.call(S)}finally{if(L)throw L.error}}}}},[s],o)}var Mp=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function Pp(e){var t=y.useRef(0),r=Mp(y.useState(e),2),n=r[0],i=r[1],s=y.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return pt(function(){cancelAnimationFrame(t.current)}),[n,s]}var Rp=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(c){o={error:c}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Lp={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 Np=function(e){var t=Rp(Pp(Lp),2),r=t[0],n=t[1];return rr("mousemove",function(i){var s=i.screenX,o=i.screenY,c=i.clientX,l=i.clientY,a=i.pageX,u=i.pageY,d={screenX:s,screenY:o,clientX:c,clientY:l,pageX:a,pageY:u,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},h=tr(e);if(h){var v=h.getBoundingClientRect(),g=v.left,_=v.top,b=v.width,T=v.height;d.elementPosX=g+window.pageXOffset,d.elementPosY=_+window.pageYOffset,d.elementX=a-d.elementPosX,d.elementY=u-d.elementPosY,d.elementW=b,d.elementH=T}n(d)},{target:function(){return document}}),r};var nr={exports:{}},ir={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Dp=Ce.default,Fp=Symbol.for("react.element"),$p=Symbol.for("react.fragment"),Ip=Object.prototype.hasOwnProperty,jp=Dp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zp={key:!0,ref:!0,__self:!0,__source:!0};function uo(e,t,r){var n,i={},s=null,o=null;r!==void 0&&(s=""+r),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(n in t)Ip.call(t,n)&&!zp.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)i[n]===void 0&&(i[n]=t[n]);return{$$typeof:Fp,type:e,key:s,ref:o,props:i,_owner:jp.current}}ir.Fragment=$p,ir.jsx=uo,ir.jsxs=uo,function(e){e.exports=ir}(nr);const Wp=nr.exports.Fragment,fo=nr.exports.jsx,ho=nr.exports.jsxs;var Re=Wp;function p(e,t,r){return Xt.call(t,"css")?fo(Ws,zs(e,t),r):fo(e,t,r)}function F(e,t,r){return Xt.call(t,"css")?ho(Ws,zs(e,t),r):ho(e,t,r)}let vt=0;const Bp=()=>{vt++,document.body.style.overflow="hidden"},Hp=()=>{vt--,vt<0&&(vt=0),vt===0&&(document.body.style.overflow="overlay")};function vn({show:e,onHide:t,children:r,clsModalMask:n,clsModal:i,hideWhenMaskOnClick:s=!1}){y.useLayoutEffect(()=>{e?Bp():Hp()},[e]);const o=y.useRef(null),c=cn(),{bg:l,c:a}=y.useMemo(()=>{const g=window.getComputedStyle(document.body)["background-color"],_=window.getComputedStyle(document.body).color;return{bg:g,c:_}},[c]),u=y.useMemo(()=>c?{"--bg":l,"--c":a,backgroundColor:l,color:a}:{},[l,a,c]),d=y.useId(),h=y.useMemo(()=>{const g=document.createElement("div");return g.setAttribute("data-id","base-modal-"+d),document.body.appendChild(g),g},[]),v=Y(g=>{var _;(_=o.current)!=null&&_.contains(g.target)||s&&t()});return e?me.createPortal(p("div",{className:te(n),onClick:v,children:p("div",{className:te(i),style:u,ref:o,children:r})}),h):null}const po="_toast-container_9119l_1",Lg={toastContainer:po};function ue(e,t=2e3){const r=document.createElement("div");r.className=po,r.innerText=e,document.body.appendChild(r),setTimeout(()=>r.remove(),t)}const Up="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",Gp="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function mo(){return ue(Up)}function go(){return ue(Gp)}function Yp(e){const t=it({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 Kp="https://api.bilibili.com",yo="https://app.bilibili.com",bn=yr.default.create({baseURL:Kp});bn.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 sr=yr.default.create({adapter:qo.default});sr.interceptors.request.use(function(e){return e.params={access_key:he.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),sr.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 Vp(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw ue("\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 bt=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,or=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new vo}abort(){this.signal.dispatchEvent("abort")}},Xp=typeof AbortSignal=="function",Jp=typeof or.AbortSignal=="function",vo=Xp?AbortSignal:Jp?or.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))}},_n=new Set,wn=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;ar(r)&&Cn(r,`${e} option`,`options.${t}`,Be)},Sn=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(ar(r)){const{prototype:n}=Be,{get:i}=Object.getOwnPropertyDescriptor(n,e);Cn(r,`${e} method`,`cache.${t}()`,i)}},Zp=(e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(ar(r)){const{prototype:n}=Be,{get:i}=Object.getOwnPropertyDescriptor(n,e);Cn(r,`${e} property`,`cache.${t}`,i)}},bo=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},ar=e=>!_n.has(e),Cn=(e,t,r,n)=>{_n.add(e);const i=`The ${t} is deprecated. Please use ${r} instead.`;bo(i,"DeprecationWarning",e,n)},Le=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),_o=e=>Le(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?cr:null:null;class cr extends Array{constructor(t){super(t),this.fill(0)}}class Qp{constructor(t){if(t===0)return[];const r=_o(t);this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Be{constructor(t={}){const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:a,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:h,maxSize:v=0,maxEntrySize:g=0,sizeCalculation:_,fetchMethod:b,fetchContext:T,noDeleteOnFetchRejection:D,noDeleteOnStaleGet:L}=t,{length:k,maxAge:C,stale:S}=t instanceof Be?{}:t;if(r!==0&&!Le(r))throw new TypeError("max option must be a nonnegative integer");const A=r?_o(r):Array;if(!A)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=v,this.maxEntrySize=g||this.maxSize,this.sizeCalculation=_||k,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=b||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=T,!this.fetchMethod&&T!==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 A(r),this.prev=new A(r),this.head=0,this.tail=0,this.free=new Qp(r),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof u=="function"?(this.disposeAfter=u,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!D,this.maxEntrySize!==0){if(this.maxSize!==0&&!Le(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Le(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!l||!!S,this.noDeleteOnStaleGet=!!L,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=Le(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||C||0,this.ttl){if(!Le(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 E="LRU_CACHE_UNBOUNDED";ar(E)&&(_n.add(E),bo("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",E,Be))}S&&wn("stale","allowStale"),C&&wn("maxAge","ttl"),k&&wn("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new cr(this.max),this.starts=new cr(this.max),this.setItemTTL=(n,i,s=bt.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?bt.now():0};let t=0;const r=()=>{const n=bt.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 cr(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(!Le(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,t),!Le(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 Sn("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 c=bt.now()-this.starts[r];o.start=Math.floor(Date.now()-c)}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=bt.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:c=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL}={}){if(o=this.requireSize(t,r,o,c),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(t),this;let a=this.size===0?void 0:this.keyMap.get(t);if(a===void 0)a=this.newIndex(),this.keyList[a]=t,this.valList[a]=r,this.keyMap.set(t,a),this.next[this.tail]=a,this.prev[a]=this.tail,this.tail=a,this.size++,this.addItemSize(a,o),l=!1;else{const u=this.valList[a];r!==u&&(this.isBackgroundFetch(u)?u.__abortController.abort():s||(this.dispose(u,t,"set"),this.disposeAfter&&this.disposed.push([u,t,"set"])),this.removeItemSize(a),this.valList[a]=r,this.addItemSize(a,o)),this.moveToTail(a)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),l||this.setItemTTL(a,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 or,c={signal:o.signal,options:n,context:i},l=h=>(o.signal.aborted||this.set(t,h,c.options),h),a=h=>{if(this.valList[r]===d&&(!n.noDeleteOnFetchRejection||d.__staleWhileFetching===void 0?this.delete(t):this.valList[r]=d.__staleWhileFetching),d.__returned===d)throw h},u=h=>h(this.fetchMethod(t,s,c)),d=new Promise(u).then(l,a);return d.__abortController=o,d.__staleWhileFetching=s,d.__returned=null,r===void 0?(this.set(t,d,c.options),r=this.keyMap.get(t)):this.valList[r]=d,d}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:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,fetchContext:d=this.fetchContext,forceRefresh:h=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i});const v={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:c,sizeCalculation:l,noUpdateTTL:a,noDeleteOnFetchRejection:u};let g=this.keyMap.get(t);if(g===void 0){const _=this.backgroundFetch(t,g,v,d);return _.__returned=_}else{const _=this.valList[g];if(this.isBackgroundFetch(_))return r&&_.__staleWhileFetching!==void 0?_.__staleWhileFetching:_.__returned=_;if(!h&&!this.isStale(g))return this.moveToTail(g),n&&this.updateItemAge(g),_;const b=this.backgroundFetch(t,g,v,d);return r&&b.__staleWhileFetching!==void 0?b.__staleWhileFetching:b.__returned=b}}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],c=this.isBackgroundFetch(o);return this.isStale(s)?c?r?o.__staleWhileFetching:void 0:(i||this.delete(t),r?o:void 0):c?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 Sn("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 Sn("reset","clear"),this.clear}get length(){return Zp("length","size"),this.size}static get AbortController(){return or}static get AbortSignal(){return vo}}var qp=Be;const em=qp;async function tm(e){return(await bn.get("/pvideo",{params:{aid:e}})).data.data}async function rm(e){return[]}const Tn=new em({max:200});async function nm(e){if(Tn.has(e))return Tn.get(e);const[t,r]=await Promise.all([tm(e),rm()]);return Tn.set(e,{pvideoData:t,dmData:r}),{pvideoData:t,dmData:r}}function wo(e){return async function(r){const n=new FormData;n.append("aid",r),n.append("csrf",Vp());const s=(await bn.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||ue((s==null?void 0:s.message)||"\u51FA\u9519\u4E86"),o}}const im=wo("add"),sm=wo("del"),So=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(r,n){var c;const s=(await sr.get(yo+t,{params:{goto:r.goto,id:r.param,mid:r.mid,rid:r.tid,tag_id:(c=r.tag)==null?void 0:c.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"}},om=So("dislike"),am=So("cancel"),Ae={modalMask:"_modal-mask_vh629_1",modal:"_modal_vh629_1",modalHeader:"_modal-header_vh629_23",modalTitle:"_modal-title_vh629_30",titleDesc:"_title-desc_vh629_35",btnClose:"_btn-close_vh629_39",modalBody:"_modal-body_vh629_57",reasonList:"_reason-list_vh629_62",reason:"_reason_vh629_62"},En=Yp();function cm(){return st(En)}function lm(e){const t=cm();if(!!e)return t.get(e)}function um({show:e,onHide:t,item:r}){const[n,i]=y.useState(!1),s=Y(async(c,l)=>{if(!r)return;let a=!1,u=null;try{i(!0),a=await om(r,c)}catch(d){u=d}finally{i(!1)}if(u)return console.error(u.stack||u),mo();a?ue("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):go(),a&&(En.set(r.param,{id:c,name:l}),t())}),o=y.useMemo(()=>{var c;return[...(c=r==null?void 0:r.dislike_reasons)!=null?c:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[r]);return F(vn,{show:e,onHide:t,clsModalMask:Ae.modalMask,clsModal:Ae.modal,hideWhenMaskOnClick:!0,children:[F("div",{className:Ae.modalHeader,children:[F("div",{className:Ae.modalTitle,children:["\u6211\u4E0D\u60F3\u770B",p("span",{className:Ae.titleDesc,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),p("div",{className:"space",style:{flex:1}}),F("button",{className:`primary-btn roll-btn ${Ae.btnClose}`,onClick:t,children:[p("svg",{style:{transform:"rotate(0deg)"},children:p("use",{xlinkHref:"#widget-close"})}),p("span",{children:"\u5173\u95ED"})]})]}),p("div",{className:Ae.modalBody,children:p("div",{className:Ae.reasonList,children:o.map(c=>p("button",{className:Ae.reason,"data-id":c.reason_id,onClick:()=>s(c.reason_id,c.reason_name),disabled:n,children:c.reason_name},c.reason_id))})})]})}const Co={show:!1,onHide:To,item:null};function To(){Eo({show:!1,item:null})}function Eo(e){Object.assign(Co,e),fm().render(p(um,{...Co,onHide:To}))}let xn;function fm(){if(!xn){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),xn=Mt(e)}return xn}function dm(e){Eo({show:!0,item:e})}function hm(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=>Jf(o.toString(),2,"0")).join(":")}function An(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}var On={},we={};Object.defineProperty(we,"__esModule",{value:!0}),we.DEFAULT_ICON_CONFIGS=void 0,we.IconConverter=Mo,we.IconProvider=void 0,we.IconWrapper=wm;var lr=pm(Ce.default);function xo(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(xo=function(n){return n?r:t})(e)}function pm(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=xo(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 mm=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function Ao(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 Oo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ao(Object(r),!0).forEach(function(n){gm(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ym(e,t){if(e==null)return{};var r=vm(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,n)||(r[n]=e[n]))}return r}function vm(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var ko={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"};we.DEFAULT_ICON_CONFIGS=ko;function bm(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Mo(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 Po=(0,lr.createContext)(ko),_m=Po.Provider;we.IconProvider=_m;function wm(e,t,r){return function(n){var i=n.size,s=n.strokeWidth,o=n.strokeLinecap,c=n.strokeLinejoin,l=n.theme,a=n.fill,u=n.className,d=n.spin,h=ym(n,mm),v=(0,lr.useContext)(Po),g=(0,lr.useMemo)(bm,[]),_=Mo(g,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:c,theme:l,fill:a},v),b=[v.prefix+"-icon"];return b.push(v.prefix+"-icon-"+e),t&&v.rtl&&b.push(v.prefix+"-icon-rtl"),d&&b.push(v.prefix+"-icon-spin"),u&&b.push(u),lr.default.createElement("span",Oo(Oo({},h),{},{className:b.join(" ")}),r(_))}}Object.defineProperty(On,"__esModule",{value:!0});var Ro=On.default=void 0,_t=Cm(Ce.default),Sm=we;function Cm(e){return e&&e.__esModule?e:{default:e}}var Tm=(0,Sm.IconWrapper)("distraught-face",!1,function(e){return _t.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},_t.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}),_t.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}),_t.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),_t.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Ro=On.default=Tm;var kn={};Object.defineProperty(kn,"__esModule",{value:!0});var Lo=kn.default=void 0,Mn=xm(Ce.default),Em=we;function xm(e){return e&&e.__esModule?e:{default:e}}var Am=(0,Em.IconWrapper)("return",!0,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:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Mn.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}))});Lo=kn.default=Am;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 Pn(e,t){return isNaN(e)?t:e}function Om({className:e,item:t,pvideo:r,enterCursorState:n}){const i=y.useRef(null),s=Np(i),o={item:t,pvideo:r,cursorState:s,elWidth:Pn(s.elementW,n.width),elHeight:Pn(s.elementH,n.height),relativeX:Pn(s.elementX,n.relativeX)};return p("div",{ref:i,className:te(Z.previewCardWrapper,e),children:r?p(km,{...o}):!1})}function km({item:e,pvideo:t,elWidth:r,elHeight:n,relativeX:i}){var S;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 c=y.useMemo(()=>{const A=(t==null?void 0:t.index)||[];let E=Pm(A,o);return E!==-1?E:o>A[A.length-1]?(E=Math.floor(A.length*s)-1,E<0&&(E=0),E):0},[t,o]);const{img_x_len:l,img_y_len:a,img_x_size:u,img_y_size:d}=t,h=a*l;c=c+1;const v=Math.floor(c/h),g=c-v*h,_=((S=t.image)==null?void 0:S[v])||"",b=Math.floor(g/l)+1,T=g-(b-1)*l,D=r*l,L=n*a,k=(b-1)*n,C=(T-1)*r;return p("div",{className:Z.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${_})`,backgroundPosition:`-${C}px -${k}px`,backgroundSize:`${D}px ${L}px`},children:p(Mm,{progress:s})})}function Mm({progress:e}){return p("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:p("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function Pm(e,t){var c;let r=0,n=e.length-1,i=-1;for(;r<=n;){const l=Math.floor((r+n)/2),a=e[l];if(t===a)return l;a<t?(r=l+1,i=l):n=l-1}if(i===-1)return-1;const s=e[i],o=(c=e[i+1])!=null?c:0;return s<t&&t<o?i:-1}const Rm=co().format("YYYY"),Lm=e=>{if(!e)return"";const t=co.unix(e);return t.format("YYYY")===Rm?t.format("M-D"):t.format("YY-M-D")},Nm=e=>e.replace(/^http:\/\//,"https://"),Rn=y.memo(function({style:t,className:r,item:n,loading:i}){i=i!=null?i:!n;const s=F("div",{className:te("bili-video-card__skeleton",{hide:!i}),children:[p("div",{className:"bili-video-card__skeleton--cover"}),p("div",{className:"bili-video-card__skeleton--info",children:F("div",{className:"bili-video-card__skeleton--right",children:[p("p",{className:"bili-video-card__skeleton--text"}),p("p",{className:"bili-video-card__skeleton--text short"}),p("p",{className:"bili-video-card__skeleton--light"})]})})]}),o=lm(n==null?void 0:n.param);return F("div",{style:t,className:te("bili-video-card",Z.biliVideoCard,r),"data-report":"partition_recommend.content",children:[s,!i&&n&&(o?p(Dm,{item:n,dislikedReason:o}):p(Fm,{item:n}))]})}),Dm=y.memo(function({dislikedReason:t,item:r}){const n=Y(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await am(r,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),mo();i?ue("\u5DF2\u64A4\u9500"):go(),i&&En.delete(r.param)});return F("div",{className:te(Z.dislikedWrapper),children:[p("div",{className:Z.dislikeContentCover,children:F("div",{className:Z.dislikeContentCoverInner,children:[p(Ro,{theme:"outline",size:"32",fill:"#333",className:Z.dislikeIcon}),p("div",{className:Z.dislikeReason,children:t==null?void 0:t.name}),p("div",{className:Z.dislikeDesc,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),p("div",{className:Z.dislikeContentAction,children:F("button",{onClick:n,children:[p(Lo,{theme:"outline",size:"16",fill:"#333",style:{marginRight:4,fontSize:0,marginTop:-2}}),"\u64A4\u9500"]})})]})}),Fm=y.memo(function({item:t}){const r=y.useRef(null),[n,i]=y.useState(()=>({width:0,height:0,relativeX:0}));rr("mouseenter",fe=>{var Xo;const pr=(Xo=r.current)==null?void 0:Xo.getBoundingClientRect();if(!pr)return;const{width:mr,height:Kn,x:Tg}=pr;i({width:mr,height:Kn,relativeX:fe.pageX-window.pageXOffset-Tg})},{target:r});const s=mn(r),o=y.useRef(null),c=mn(o),[l,a]=y.useState(!1),{accessKey:u}=Me(),d=Boolean(u),{param:h,title:v,cover:g,goto:_,play:b,like:T,coin:D,desc:L,danmaku:k,ctime:C,duration:S,name:A,face:E,mid:M,favorite:P,badge:oe,rcmd_reason:ne}=t,N=y.useMemo(()=>Lm(C),[C]),O=y.useMemo(()=>Nm(g),[g]),[x,I]=y.useState(null),[f,m]=y.useState(!1),w=Y(async()=>{if(!x&&!f)try{m(!0);const fe=await nm(h);I(fe)}finally{m(!1)}});y.useEffect(()=>{s&&w()},[s]);let R=!1;const z=Y(async fe=>{if(fe.preventDefault(),R)return;R=!0;const pr=l?sm:im;let mr=!1;try{mr=await pr(h)}finally{R=!1}mr&&a(Kn=>!Kn)}),$=y.useRef(null),j=mn($),W=Y(fe=>{fe.stopPropagation(),fe.preventDefault(),dm(t)}),U=t.goto==="bangumi",Q=t.goto==="av",ae=Q?`/video/av${h}`:t.uri,Se=y.useMemo(()=>hm(S),[S]),X=y.useMemo(()=>An(b),[b]),pe=y.useMemo(()=>An(T),[T]),wt=y.useMemo(()=>An(P),[P]);return F("div",{className:"bili-video-card__wrap __scale-wrap",children:[p("a",{href:ae,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:F("div",{className:"bili-video-card__image __scale-player-wrap",ref:r,children:[F("div",{className:te("bili-video-card__image--wrap",Z.imageWrapper),children:[F("picture",{className:"v-img bili-video-card__cover",children:[p("source",{srcSet:`${O}@672w_378h_1c.webp`,type:"image/webp"}),p("img",{src:`${O}@672w_378h_1c.webp`,alt:v,loading:"lazy"})]}),s&&p(Om,{item:t,pvideo:x==null?void 0:x.pvideoData,enterCursorState:n}),F("div",{className:`bili-watch-later ${Z.watchLater}`,style:{display:s?"flex":"none"},ref:o,onClick:z,children:[p("svg",{className:"bili-watch-later__icon",children:p("use",{xlinkHref:l?"#widget-watch-save":"#widget-watch-later"})}),p("span",{className:"bili-watch-later__tip",style:{display:c?"block":"none"},children:l?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),d&&F("div",{ref:$,className:Z.btnDislike,onClick:W,style:{display:s?"flex":"none"},children:[p("svg",{className:Z.btnDislikeIcon,children:p("use",{xlinkHref:"#widget-close"})}),p("span",{className:Z.btnDislikeTip,style:{display:j?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),p("div",{className:"bili-video-card__mask",children:F("div",{className:"bili-video-card__stats",children:[F("div",{className:"bili-video-card__stats--left",children:[F("span",{className:"bili-video-card__stats--item",children:[p("svg",{className:"bili-video-card__stats--icon",children:p("use",{xlinkHref:"#widget-play-count"})}),p("span",{className:"bili-video-card__stats--text",children:X})]}),p("span",{className:"bili-video-card__stats--item",children:_==="av"?F(Re,{children:[p("svg",{className:"bili-video-card__stats--icon",children:p("use",{xlinkHref:"#widget-agree"})}),p("span",{className:"bili-video-card__stats--text",children:pe})]}):F(Re,{children:[p("svg",{className:"bili-video-card__stats--icon",children:p("use",{xlinkHref:"#widget-agree"})}),p("span",{className:"bili-video-card__stats--text",children:wt})]})})]}),p("span",{className:"bili-video-card__stats__duration",children:Q&&Se})]})})]})}),p("div",{className:"bili-video-card__info __scale-disable",children:F("div",{className:"bili-video-card__info--right",children:[p("a",{href:ae,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:p("h3",{className:"bili-video-card__info--tit",title:v,children:v})}),F("p",{className:"bili-video-card__info--bottom",children:[Q&&F("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${M}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[ne!=null&&ne.content?p("span",{className:Z.recommendReason,children:ne.content}):p("svg",{className:"bili-video-card__info--owner__up",children:p("use",{xlinkHref:"#widget-up"})}),p("span",{className:"bili-video-card__info--author",children:A}),N&&F("span",{className:"bili-video-card__info--date",children:["\xB7 ",N]})]}),U&&F("a",{className:"bili-video-card__info--owner",href:ae,target:"_blank",children:[p("span",{className:Z.badge,children:oe}),p("span",{className:Z.bangumiDesc,children:L})]})]})]})})]})});var ur={exports:{}},Ln={exports:{}},No={},$m=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Nn={exports:{}};typeof Object.create=="function"?Nn.exports=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:Nn.exports=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t},function(e){var t=/%[sdj%]/g;e.format=function(f){if(!L(f)){for(var m=[],w=0;w<arguments.length;w++)m.push(i(arguments[w]));return m.join(" ")}for(var w=1,R=arguments,z=R.length,$=String(f).replace(t,function(W){if(W==="%%")return"%";if(w>=z)return W;switch(W){case"%s":return String(R[w++]);case"%d":return Number(R[w++]);case"%j":try{return JSON.stringify(R[w++])}catch{return"[Circular]"}default:return W}}),j=R[w];w<z;j=R[++w])b(j)||!A(j)?$+=" "+j:$+=" "+i(j);return $},e.deprecate=function(f,m){if(C(ss.process))return function(){return e.deprecate(f,m).apply(this,arguments)};if(process.noDeprecation===!0)return f;var w=!1;function R(){if(!w){if(process.throwDeprecation)throw new Error(m);process.traceDeprecation?console.trace(m):console.error(m),w=!0}return f.apply(this,arguments)}return R};var r={},n;e.debuglog=function(f){if(C(n)&&(n=process.env.NODE_DEBUG||""),f=f.toUpperCase(),!r[f])if(new RegExp("\\b"+f+"\\b","i").test(n)){var m=process.pid;r[f]=function(){var w=e.format.apply(e,arguments);console.error("%s %d: %s",f,m,w)}}else r[f]=function(){};return r[f]};function i(f,m){var w={seen:[],stylize:o};return arguments.length>=3&&(w.depth=arguments[2]),arguments.length>=4&&(w.colors=arguments[3]),_(m)?w.showHidden=m:m&&e._extend(w,m),C(w.showHidden)&&(w.showHidden=!1),C(w.depth)&&(w.depth=2),C(w.colors)&&(w.colors=!1),C(w.customInspect)&&(w.customInspect=!0),w.colors&&(w.stylize=s),l(w,f,w.depth)}e.inspect=i,i.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]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(f,m){var w=i.styles[m];return w?"\x1B["+i.colors[w][0]+"m"+f+"\x1B["+i.colors[w][1]+"m":f}function o(f,m){return f}function c(f){var m={};return f.forEach(function(w,R){m[w]=!0}),m}function l(f,m,w){if(f.customInspect&&m&&P(m.inspect)&&m.inspect!==e.inspect&&!(m.constructor&&m.constructor.prototype===m)){var R=m.inspect(w,f);return L(R)||(R=l(f,R,w)),R}var z=a(f,m);if(z)return z;var $=Object.keys(m),j=c($);if(f.showHidden&&($=Object.getOwnPropertyNames(m)),M(m)&&($.indexOf("message")>=0||$.indexOf("description")>=0))return u(m);if($.length===0){if(P(m)){var W=m.name?": "+m.name:"";return f.stylize("[Function"+W+"]","special")}if(S(m))return f.stylize(RegExp.prototype.toString.call(m),"regexp");if(E(m))return f.stylize(Date.prototype.toString.call(m),"date");if(M(m))return u(m)}var U="",Q=!1,ae=["{","}"];if(g(m)&&(Q=!0,ae=["[","]"]),P(m)){var Se=m.name?": "+m.name:"";U=" [Function"+Se+"]"}if(S(m)&&(U=" "+RegExp.prototype.toString.call(m)),E(m)&&(U=" "+Date.prototype.toUTCString.call(m)),M(m)&&(U=" "+u(m)),$.length===0&&(!Q||m.length==0))return ae[0]+U+ae[1];if(w<0)return S(m)?f.stylize(RegExp.prototype.toString.call(m),"regexp"):f.stylize("[Object]","special");f.seen.push(m);var X;return Q?X=d(f,m,w,j,$):X=$.map(function(pe){return h(f,m,w,j,pe,Q)}),f.seen.pop(),v(X,U,ae)}function a(f,m){if(C(m))return f.stylize("undefined","undefined");if(L(m)){var w="'"+JSON.stringify(m).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return f.stylize(w,"string")}if(D(m))return f.stylize(""+m,"number");if(_(m))return f.stylize(""+m,"boolean");if(b(m))return f.stylize("null","null")}function u(f){return"["+Error.prototype.toString.call(f)+"]"}function d(f,m,w,R,z){for(var $=[],j=0,W=m.length;j<W;++j)I(m,String(j))?$.push(h(f,m,w,R,String(j),!0)):$.push("");return z.forEach(function(U){U.match(/^\d+$/)||$.push(h(f,m,w,R,U,!0))}),$}function h(f,m,w,R,z,$){var j,W,U;if(U=Object.getOwnPropertyDescriptor(m,z)||{value:m[z]},U.get?U.set?W=f.stylize("[Getter/Setter]","special"):W=f.stylize("[Getter]","special"):U.set&&(W=f.stylize("[Setter]","special")),I(R,z)||(j="["+z+"]"),W||(f.seen.indexOf(U.value)<0?(b(w)?W=l(f,U.value,null):W=l(f,U.value,w-1),W.indexOf(` `)>-1&&($?W=W.split(` `).map(function(Q){return" "+Q}).join(` `).substr(2):W=` `+W.split(` `).map(function(Q){return" "+Q}).join(` `))):W=f.stylize("[Circular]","special")),C(j)){if($&&z.match(/^\d+$/))return W;j=JSON.stringify(""+z),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.substr(1,j.length-2),j=f.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=f.stylize(j,"string"))}return j+": "+W}function v(f,m,w){var R=f.reduce(function(z,$){return $.indexOf(` `)>=0,z+$.replace(/\u001b\[\d\d?m/g,"").length+1},0);return R>60?w[0]+(m===""?"":m+` `)+" "+f.join(`, `)+" "+w[1]:w[0]+m+" "+f.join(", ")+" "+w[1]}function g(f){return Array.isArray(f)}e.isArray=g;function _(f){return typeof f=="boolean"}e.isBoolean=_;function b(f){return f===null}e.isNull=b;function T(f){return f==null}e.isNullOrUndefined=T;function D(f){return typeof f=="number"}e.isNumber=D;function L(f){return typeof f=="string"}e.isString=L;function k(f){return typeof f=="symbol"}e.isSymbol=k;function C(f){return f===void 0}e.isUndefined=C;function S(f){return A(f)&&ne(f)==="[object RegExp]"}e.isRegExp=S;function A(f){return typeof f=="object"&&f!==null}e.isObject=A;function E(f){return A(f)&&ne(f)==="[object Date]"}e.isDate=E;function M(f){return A(f)&&(ne(f)==="[object Error]"||f instanceof Error)}e.isError=M;function P(f){return typeof f=="function"}e.isFunction=P;function oe(f){return f===null||typeof f=="boolean"||typeof f=="number"||typeof f=="string"||typeof f=="symbol"||typeof f>"u"}e.isPrimitive=oe,e.isBuffer=$m;function ne(f){return Object.prototype.toString.call(f)}function N(f){return f<10?"0"+f.toString(10):f.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function x(){var f=new Date,m=[N(f.getHours()),N(f.getMinutes()),N(f.getSeconds())].join(":");return[f.getDate(),O[f.getMonth()],m].join(" ")}e.log=function(){console.log("%s - %s",x(),e.format.apply(e,arguments))},e.inherits=Nn.exports,e._extend=function(f,m){if(!m||!A(m))return f;for(var w=Object.keys(m),R=w.length;R--;)f[w[R]]=m[w[R]];return f};function I(f,m){return Object.prototype.hasOwnProperty.call(f,m)}}(No);var Im=No.format;function jm(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function zm(e,t){return function(){var r=this,n=[].slice.call(arguments);jm();var i=new AbortController;return n.push(i.signal),new Promise(function(s,o){var c=setTimeout(function(){var l=new fr(t);o(l),i.abort()},t);Promise.resolve(e.apply(r,n)).then(function(l){clearTimeout(c),s(l)},function(l){clearTimeout(c),o(l)})})}}class fr extends Error{constructor(t){super(),this.timeout=t,this.message=Im("timeout of %sms exceed",t),Error.captureStackTrace(this,fr)}}Ln.exports=zm,Ln.exports.TimeoutError=fr;const Do=Ln.exports,Wm=Do.TimeoutError;ur.exports=function(t,r){const n=t;r=r||{};const i=r.times||5,s=r.timeout;s&&(t=Do(t,s));const o=r.onerror;return async function(){const c=this,l=[].slice.call(arguments),a=new Array(i);for(let u=0;u<i;u++){let d,h;try{d=await t.apply(c,l)}catch(v){h=v}if(!h)return d;if(h instanceof TypeError)throw h;if(h instanceof Bm)throw h.originalError;a[u]=h,o&&o(h,u)}throw new Fo({times:i,timeout:s,fn:n,errors:a})}};class Fo extends Error{constructor(t){super(),this.times=t.times,this.timeout=t.timeout,this.fn=t.fn,this.errors=t.errors,this.name="RetryError",this.message=`tried function ${this.fn.name||"<anonymous>"} ${this.times} times`,this.timeout&&(this.message+=` with timeout = ${this.timeout}ms`),Error.captureStackTrace(this,this.constructor)}}class Bm 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 Hm=ur.exports.RetryError=Fo;ur.exports.TimeoutError=Wm;const Um="bilibili-app-recommend".toUpperCase();class Dn extends Error{constructor(r){super();gr(this,"json");Error.captureStackTrace(this,Dn),this.json=r}}async function Gm(){const t=(await sr.get(yo+"/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 Dn(t);return ue(`${Um}: \u672A\u77E5\u9519\u8BEF, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005 code=${t.code} message=${t.message||""}`,1e4),[]}return t.data}const Ym=ur.exports(Gm,{times:5,timeout:2e3});async function Km(){try{return await Ym()}catch(e){throw e instanceof Hm&&(console.error(e.errors),ue("\u8BF7\u6C42\u51FA\u9519, \u8BF7\u91CD\u8BD5 !!!")),e}}async function Vm(){return Fn(2)}async function Fn(e){const t=new Array(e).fill(0).map(i=>Km());let n=(await Promise.all(t)).reduce((i,s)=>i.concat(s||[]),[]);return n=Xm(n),n.map(i=>({...i,uniqId:i.param+"-"+crypto.randomUUID()}))}function Xm(e){const t=new Set;return e=e.filter(r=>{const{param:n}=r;return t.has(n)?(console.log("[bilibili-app-recommend]: [uniqRecList]: duplicate",r),!1):(t.add(n),!0)}),e}var se={exports:{}},Jm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Zm=Jm,Qm=Zm;function $o(){}function Io(){}Io.resetWarningCache=$o;var qm=function(){function e(n,i,s,o,c,l){if(l!==Qm){var a=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 a.name="Invariant Violation",a}}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:Io,resetWarningCache:$o};return r.PropTypes=r,r};se.exports=qm();class $n extends y.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<Number(this.props.threshold)&&t&&t.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(t,r){return t?this.calculateTopPosition(t)+(t.offsetHeight-r-window.innerHeight):0}calculateTopPosition(t){return t?t.offsetTop+this.calculateTopPosition(t.offsetParent):0}render(){const t=this.filterProps(this.props),{children:r,element:n,hasMore:i,initialLoad:s,isReverse:o,loader:c,loadMore:l,pageStart:a,ref:u,threshold:d,useCapture:h,useWindow:v,getScrollParent:g,..._}=t;_.ref=T=>{this.scrollComponent=T,u&&u(T)};const b=[r];return i&&(c?o?b.unshift(c):b.push(c):this.defaultLoader&&(o?b.unshift(this.defaultLoader):b.push(this.defaultLoader))),Ce.default.createElement(n,_,b)}}gr($n,"propTypes",{children:se.exports.node.isRequired,element:se.exports.node,hasMore:se.exports.bool,initialLoad:se.exports.bool,isReverse:se.exports.bool,loader:se.exports.node,loadMore:se.exports.func.isRequired,pageStart:se.exports.number,ref:se.exports.func,getScrollParent:se.exports.func,threshold:se.exports.number,useCapture:se.exports.bool,useWindow:se.exports.bool}),gr($n,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const In="_video-grid_14t5i_9",jo="_limit-two-lines_14t5i_19",jn="_internal-testing_14t5i_43",eg="_limit-one-line_14t5i_50",zo="_narrow-mode_14t5i_71",cy={videoGrid:In,limitTwoLines:jo,internalTesting:jn,limitOneLine:eg,narrowMode:zo};function tg({enabled:e,refresh:t,minIndex:r=0,maxIndex:n,containerRef:i,getScrollerRect:s}){const[o,c]=y.useState(null),l=Y(()=>{var P;if(o===null||!i.current)return!1;const E=s(),M=(P=i.current.querySelector(`.${qe.card}.${qe.cardActive}`))==null?void 0:P.getBoundingClientRect();return!(!E||!M||M.top-E.top<-(E.height+M.height)||M.top-E.top>E.height*2+M.height)}),a=Y((E,M)=>{if(!e)return;M==null||M.preventDefault();const P=l()?o+E:T();if(!(P<r)){if(P>n){C(n);return}c(P),C(P)}}),u=y.useCallback(E=>{a(-1,E)},[]),d=y.useCallback(E=>{a(1,E)},[]);We("leftarrow",u),We("rightarrow",d);const h=y.useCallback(E=>{a(-A(),E)},[]),v=y.useCallback(E=>{a(A(),E)},[]);We("uparrow",h),We("downarrow",v);const g=Y(()=>{!o||!e||S(o)}),_=Y(()=>{!e||c(null)});We("enter",g),We("esc",_);const b=Y(()=>{!e||t()});We("r",b,{exactMatch:!0});function T(){const E=s();if(!E)return 0;const M=L();for(let P=0;P<M.length;P++)if(M[P].getBoundingClientRect().top>=E.top)return P;return 0}const D=`.${qe.card}`;function L(){var E;return[...((E=i.current)==null?void 0:E.querySelectorAll(D))||[]]}function k(E){return L()[E]}function C(E){var P;const M=k(E);(P=M==null?void 0:M.scrollIntoViewIfNeeded)==null||P.call(M,!1)}function S(E){const M=k(E);if(!M)return;const P=M.querySelector(".bili-video-card__wrap > a");P==null||P.click()}function A(){if(he.useNarrowMode)return 2;let E=Wo.get(window.innerWidth);if(E)return E;const M=i.current;if(!M)return 0;const P=window.getComputedStyle(M);return P.display!=="grid"?0:(E=P.gridTemplateColumns.split(" ").length,Wo.set(window.innerWidth,E),E)}return{activeIndex:o,clearActiveIndex:_}}const Wo=new Map,qe={loader:an` text-align: center; line-height: 60px; font-size: 120%; `,card:an` 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:an` border-color: #fb7299; border-radius: 6px; overflow: hidden; `},Bo=y.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:r,className:n,scrollerRef:i},s)=>{const[o,c]=y.useState([]),[l,a]=y.useState(!1);y.useImperativeHandle(s,()=>({refresh:u}));const u=Y(async()=>{await(r==null?void 0:r());try{b(),a(!0),c(await Fn(2)),b()}finally{a(!1)}}),d=Y(async D=>{const L=await Fn(2);c(k=>[...k,...L])}),{useNarrowMode:h}=Me(),v=y.useRef(null),g=Y(()=>{var D;if(e){const L=Ys+50;return new DOMRect(0,L,window.innerWidth,window.innerHeight-L)}else return(D=i==null?void 0:i.current)==null?void 0:D.getBoundingClientRect()}),{activeIndex:_,clearActiveIndex:b}=tg({enabled:t,refresh:u,maxIndex:o.length-1,containerRef:v,getScrollerRect:g}),T=Us();return p($n,{pageStart:0,loadMore:d,hasMore:!0,useWindow:e,threshold:360,style:{minHeight:"100%"},loader:p("div",{className:qe.loader,children:"\u52A0\u8F7D\u4E2D..."},0),children:p("div",{ref:v,className:te(In,{[jn]:T},{[zo]:h},n),children:o.map((D,L)=>p(Rn,{loading:l,item:D,className:te(qe.card,{[qe.cardActive]:L===_})},D.uniqId))})})}),rg={checkbox:"_checkbox_5cp8u_1"};async function ng(){var l,a;const t=(await yr.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((l=t==null?void 0:t.data)!=null&&l.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((a=t==null?void 0:t.data)!=null&&a.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(u=>{window.addEventListener("message",d=>{if(d.origin!="https://www.mcbbs.net"||!d.data)return;const h=d.data.match(/access_key=([0-9a-z]{32})/);if(!h||!h[1])return u({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});u(h[1])}),n=setTimeout(()=>{u({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 c=await i;return o(),c}async function ig(){const e=await ng();if(typeof e=="object"&&"errmsg"in e){ue(e.errmsg);return}const t=e;return he.accessKey=t,ue("\u83B7\u53D6\u6210\u529F"),t}function sg(){he.accessKey="",ue("\u5DF2\u5220\u9664 access_key")}function zn(){const e=y.useRef(null),{accessKey:t}=Me(),r=io(ig,{manual:!0}),n=Y(async()=>{var c;await r.runAsync()&&((c=e.current)==null||c.set(!1))}),i=sg,s=Y(()=>{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 p(Re,{children:t?F(Re,{children:[p("button",{className:"primary-btn roll-btn",onClick:s,children:p("span",{children:"access_key \u8BF4\u660E"})}),p("button",{className:"primary-btn roll-btn",onClick:()=>n(),disabled:r.loading,children:p("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),p("button",{className:"primary-btn roll-btn",onClick:i,children:p("span",{children:"\u5220\u9664 access_key"})})]}):F(Re,{children:[p("button",{className:"primary-btn roll-btn",onClick:s,children:p("span",{children:"access_key \u8BF4\u660E"})}),p("button",{className:"primary-btn roll-btn",onClick:n,disabled:r.loading,children:p("span",{children:"\u83B7\u53D6 access_key"})})]})})}var Wn={};Object.defineProperty(Wn,"__esModule",{value:!0});var Bn=Wn.default=void 0,Hn=ag(Ce.default),og=we;function ag(e){return e&&e.__esModule?e:{default:e}}var cg=(0,og.IconWrapper)("config",!1,function(e){return Hn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Hn.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}),Hn.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}))});Bn=Wn.default=cg;const ee={modalMask:"_modal-mask_3m0r6_1",modal:"_modal_3m0r6_1",modalHeader:"_modal-header_3m0r6_23",modalTitle:"_modal-title_3m0r6_30",configIcon:"_config-icon_3m0r6_37",btnClose:"_btn-close_3m0r6_42",modalBody:"_modal-body_3m0r6_60",settingsGroup:"_settings-group_3m0r6_65",settingsGroupTitle:"_settings-group-title_3m0r6_68",settingsGroupContent:"_settings-group-content_3m0r6_71",row:"_row_3m0r6_77",check:"_check_3m0r6_81"},Un={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 dr({configKey:e,label:t,className:r}){const i=!!Me()[e],s=y.useCallback(c=>{const l=c.target.checked;Sd({[e]:l}),l&&e==="initialShowMore"&&ue("\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=y.useId();return F("span",{css:Un.container,className:r,children:[p("input",{type:"checkbox",id:o,checked:i,onChange:s,css:Un.checkbox}),p("label",{htmlFor:o,css:Un.label,children:t||e})]})}var lg={name:"1qkltea",styles:"margin-left:5px"};const ug=function(){const e=lg;return F(Re,{children:[p(dr,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",css:e}),p(dr,{configKey:"useNarrowMode",label:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F",css:e})]})};function fg({show:e,onHide:t}){const r=y.useId(),{pureRecommend:n}=Me(),i=cn();return F(vn,{show:e,onHide:t,clsModalMask:ee.modalMask,clsModal:ee.modal,hideWhenMaskOnClick:!0,children:[F("div",{className:ee.modalHeader,children:[F("div",{className:ee.modalTitle,children:[p(Bn,{theme:"outline",size:"24",fill:i?"#fff":"#333",className:ee.configIcon}),"\u8BBE\u7F6E\u9879"]}),p("div",{className:"space",style:{flex:1}}),F("button",{className:`primary-btn roll-btn ${ee.btnClose}`,onClick:t,children:[p("svg",{style:{transform:"rotate(0deg)"},children:p("use",{xlinkHref:"#widget-close"})}),p("span",{children:"\u5173\u95ED"})]})]}),F("main",{className:ee.modalBody,children:[F("div",{className:ee.settingsGroup,children:[p("div",{className:ee.settingsGroupTitle,children:"Auth"}),p("div",{className:te(ee.settingsGroupContent,ee.row),children:p(zn,{})})]}),F("div",{className:ee.settingsGroup,children:[p("div",{className:ee.settingsGroupTitle,children:"\u5F00\u5173"}),F("div",{className:te(ee.settingsGroupContent,ee.row),children:[p("input",{type:"checkbox",className:rg.checkbox,id:r,checked:n,onChange:async s=>{he.pureRecommend=s.target.checked,ue("\u5373\u5C06\u5237\u65B0\u7F51\u9875"),await ot.exports(500),location.reload()}}),p("label",{htmlFor:r,children:"\u5F00\u542F\u7EAF\u5206\u4EAB\u6A21\u5F0F"}),p(dr,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",className:ee.check}),p(dr,{configKey:"useNarrowMode",label:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F",className:ee.check})]})]})]})]})}const Ho={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},Uo=y.forwardRef(function({children:t},r){const[n,i]=so(!1);y.useImperativeHandle(r,()=>i,[i]);const s=p("button",{className:te("primary-btn",Ho.expandBtn),onClick:i.toggle,children:p("svg",{className:te({[Ho.expanded]:n}),children:p("use",{xlinkHref:"#widget-arrow"})})});return F(Re,{children:[s,n&&t]})}),Ne={modalMask:"_modal-mask_1f28q_1",narrowMode:"_narrow-mode_1f28q_13",modal:"_modal_1f28q_1",modalHeader:"_modal-header_1f28q_38",modalTitle:"_modal-title_1f28q_46",btnRefresh:"_btn-refresh_1f28q_51",btnClose:"_btn-close_1f28q_52",modalBody:"_modal-body_1f28q_68"},dg=y.memo(function({show:t,onHide:r}){const n=y.useRef(null),i=y.useRef(null),{useNarrowMode:s}=Me(),o=y.useMemo(()=>({[Ne.narrowMode]:s}),[s]),c=Y(()=>{var a;return(a=i.current)==null?void 0:a.refresh()}),l=Y(()=>{n.current&&(n.current.scrollTop=0)});return F(vn,{show:t,onHide:r,clsModalMask:te(Ne.modalMask,o),clsModal:te(Ne.modal,o),children:[F("div",{className:Ne.modalHeader,children:[p("div",{className:Ne.modalTitle,children:"\u63A8\u8350"}),p("div",{className:"space",style:{flex:1}}),p(Uo,{children:p(ug,{})}),F("button",{className:`primary-btn roll-btn ${Ne.btnRefresh}`,onClick:c,children:[p("svg",{children:p("use",{xlinkHref:"#widget-roll"})}),p("span",{children:"\u6362\u4E00\u6362"})]}),F("button",{className:`primary-btn roll-btn ${Ne.btnClose}`,onClick:r,children:[p("svg",{children:p("use",{xlinkHref:"#widget-close"})}),p("span",{children:"\u5173\u95ED"})]})]}),p("div",{className:Ne.modalBody,ref:n,children:p(Bo,{ref:i,shortcutEnabled:t,onScrollToTop:l,infiteScrollUseWindow:!1,scrollerRef:n})})]})});var Gn={};Object.defineProperty(Gn,"__esModule",{value:!0});var Go=Gn.useSticky=void 0;const Yn=Ce.default;function hg(){const e=(0,Yn.useRef)(null),[t,r]=(0,Yn.useState)(!1);return(0,Yn.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]}Go=Gn.useSticky=hg;const Yo={btn:Xe` padding: 0; width: 31px; height: 31px; border-radius: 50%; `,icon:Xe` svg { width: 14px; height: 14px; } `},hr=it({showMore:he.initialShowMore}),pg=function(){return st(hr)},mg=()=>{hr.showMore=!0},gg=()=>{hr.showMore=!1};function Ko({onRefresh:e}){const{accessKey:t,pureRecommend:r}=Me(),n=y.useRef(null),{showMore:i}=st(hr),[s,o]=y.useState(!1),c=y.useCallback(()=>{o(!0)},[]),l=y.useCallback(()=>{o(!1)},[]),[a,u]=Go(),d=cn();return F(Re,{children:[F("div",{ref:a,className:"area-header",css:[Xe` margin-bottom: 0; height: 50px; `,r&&Xe` position: sticky; top: ${Ys}px; z-index: 1000; `,r&&u&&Xe` background-color: var(--bg1_float); box-shadow: 0 2px 4px rgb(0 0 0 / 8%); `,"",""],children:[F("div",{className:"left",children:[p("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),p("svg",{className:"icon",children:p("use",{xlinkHref:"#channel-cinephile"})}),p("a",{className:"title",href:"#",children:p("span",{children:"\u63A8\u8350"})})]}),F("div",{className:"right",children:[p("button",{className:"primary-btn",css:Yo.btn,onClick:c,children:p(Bn,{theme:"outline",size:"24",fill:d?"#fff":"#333",css:Yo.icon})}),t?p(Uo,{ref:n,children:p(zn,{})}):p(zn,{}),F("button",{className:"primary-btn roll-btn",onClick:e,children:[p("svg",{style:{transform:"rotate(0deg)"},children:p("use",{xlinkHref:"#widget-roll"})}),p("span",{children:"\u6362\u4E00\u6362"})]}),F("button",{className:"primary-btn see-more",onClick:mg,children:[p("span",{children:"\u67E5\u770B\u66F4\u591A"}),p("svg",{children:p("use",{xlinkHref:"#widget-arrow"})})]})]})]}),p(dg,{show:i,onHide:gg}),p(fg,{show:s,onHide:l})]})}const yg={grid:Xe` /* card=299 col-gap=20 */ width: ${299*2+20}px; margin: 0 auto; `};function vg(){const{useNarrowMode:e}=Me(),{showMore:t}=pg(),r=y.useRef(null),n=Y(()=>{var s;return(s=r.current)==null?void 0:s.refresh()}),i=Y(()=>{document.documentElement.scrollTop=0});return F("section",{"data-area":"\u63A8\u8350",children:[p(Ko,{onRefresh:n}),p(Bo,{ref:r,css:[e&&yg.grid,"",""],shortcutEnabled:!t,infiteScrollUseWindow:!0,onScrollToTop:i})]})}function bg(){const e=y.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:t,loading:r,error:n,refresh:i}=io(Vm);n&&console.error(n.stack||n);const s=Us();return F("section",{"data-area":"\u63A8\u8350",children:[p(Ko,{onRefresh:i}),p("div",{className:te(In,jo,{[jn]:s}),style:{marginBottom:s?30:0},children:r||n?e.map(o=>p(Rn,{},o)):t.map(o=>p(Rn,{item:o},o.uniqId))})]})}const _g=10*1e3;async function Vo(e){let t=[];const r=()=>{t=Array.from(document.querySelectorAll(e))},n=performance.now();for(;!t.length&&performance.now()-n<_g;)await ot.exports(100),r();t.forEach(i=>{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 wg()})();async function wg(){return he.pureRecommend?Cg():Sg()}async function Sg(){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(Jt()&&document.querySelector(".recommended-container")){r=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await ot.exports(100)}if(!r){console.error("[bilibili-app-recommend]: init fail");return}const n=document.createElement("section");r.insertAdjacentElement("afterend",n),Mt(n).render(p(bg,{}))}async function Cg(){var i,s;Jt()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),Vo(".bili-feed4 .header-channel")):((s=document.querySelector(".bili-layout"))==null||s.remove(),Vo(".bili-footer"));const e=document.createElement("div");e.classList.add(Jt()?"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),Mt(r).render(p(vg,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);