bilibili-app-recommend

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

目前為 2022-11-22 提交的版本,檢視 最新版本

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.6.1
// @author       magicdawn
// @description  为B站首页添加像App一样的推荐
// @license      MIT
// @homepageURL  https://github.com/magicdawn/bilibili-app-recommend
// @supportURL   https://github.com/magicdawn/bilibili-app-recommend/issues
// @match        *://www.bilibili.com/
// @match        *://www.bilibili.com/?*
// @match        https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png
// @match        https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?*
// @require      https://unpkg.com/[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}._modal-mask_1fjgs_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_1fjgs_1{width:500px;max-height:calc(80vh - 50px);background-color:#fff;border-radius:10px;padding:0 15px 15px;display:flex;flex-direction:column;overflow:hidden}._modal-header_1fjgs_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal-body_1fjgs_30{padding-top:0;flex-grow:1;overflow-y:scroll}._modal-title_1fjgs_35{font-size:1.5rem;margin-bottom:0;line-height:1.5;display:flex;align-items:center}._btn-close_1fjgs_42{margin-left:10px}._btn-close_1fjgs_42 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._btn-close_1fjgs_42{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._toast-container_mcbuq_1{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:999999;padding:12px 24px;font-size:14px;min-width:200px;width:max-content;max-width:450px;background:#ffb243;color:#fff;border-radius:6px;white-space:pre-wrap}._toast-container_mcbuq_1._single-line_mcbuq_17{text-align:center}._modal_pfmut_1{width:500px}._title-desc_pfmut_4{margin-left:5px;font-size:40%}._reason-list_pfmut_8{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_pfmut_8{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_pfmut_8{border:1px solid #333}._bili-video-card_1a93a_1{position:relative}._image-wrapper_1a93a_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_1a93a_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._preview-card-wrapper_1a93a_8 ._preview-card-inner_1a93a_21{width:100%;height:100%}._watch-later_1a93a_25{z-index:3}._badge_1a93a_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_1a93a_36{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_1a93a_51{color:default}._btn-dislike_1a93a_54{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_1a93a_54 ._btn-dislike-icon_1a93a_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_1a93a_54 ._btn-dislike-tip_1a93a_76{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_1a93a_91{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_1a93a_91{border:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-icon_1a93a_122{margin-bottom:5px}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-reason_1a93a_125{font-size:20px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-desc_1a93a_129{font-size:16px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{border-top:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._video-grid_14t5i_9{display:grid;position:relative;width:100%;grid-gap:20px 12px}@media (max-width: 1099.9px){._video-grid_14t5i_9{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1100px) and (max-width: 1700.9px){._video-grid_14t5i_9{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}@media (min-width: 1701px){._video-grid_14t5i_9{grid-template-columns:repeat(6,1fr)}._video-grid_14t5i_9._limit-two-lines_14t5i_19>*:nth-of-type(1n + 13){display:none!important}}._video-grid_14t5i_9._internal-testing_14t5i_43{grid-gap:20px 20px}@media (max-width: 1399.9px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(4,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 5){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 9){display:none!important}}@media (min-width: 1400px){._video-grid_14t5i_9._internal-testing_14t5i_43{grid-template-columns:repeat(5,1fr)}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-one-line_14t5i_50>*:nth-of-type(1n + 6){display:none!important}._video-grid_14t5i_9._internal-testing_14t5i_43._limit-two-lines_14t5i_19>*:nth-of-type(1n + 11){display:none!important}}._narrow-mode_14t5i_71{grid-template-columns:repeat(2,1fr)!important}._checkbox_5cp8u_1{margin-top:1px;cursor:pointer;outline:none}._checkbox_5cp8u_1+label{margin-left:2px;user-select:none;cursor:pointer}._config-icon_1jab1_1{line-height:1;margin-right:5px;font-size:0}._settings-group_1jab1_6{margin-bottom:10px}._settings-group_1jab1_6 ._settings-group-title_1jab1_9{font-size:2em}._settings-group_1jab1_6 ._settings-group-content_1jab1_12{color:default}._settings-group_1jab1_6 ._settings-group-content_1jab1_12 button:first-child{margin-left:0}._row_1jab1_18{display:flex;align-items:center}._check_1jab1_22{margin-left:20px}._check_1jab1_22:first-child{margin-left:0}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._modal-mask_1as61_1._narrow-mode_1as61_1{background-color:#000000e6}._modal_1as61_1{width:calc(100vw - 30px);height:calc(100vh - 30px);max-height:unset;padding-right:0}body.dark ._modal_1as61_1{border:1px solid #fb7299}._modal_1as61_1._narrow-mode_1as61_1{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1as61_1._narrow-mode_1as61_1{border:none}._modal-header_1as61_21,._modal-body_1as61_22{padding-right:15px}body.dark ._btn-refresh_1as61_25{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}
`);

var ay=Object.defineProperty;var cy=(p,me,He)=>me in p?ay(p,me,{enumerable:!0,configurable:!0,writable:!0,value:He}):p[me]=He;var Vr=(p,me,He)=>(cy(p,typeof me!="symbol"?me+"":me,He),He);(function(p,me,He,sc){"use strict";const Gt=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function oc(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ue=Gt(p),$i=oc(p),ac=Gt(me),Kr=Gt(He),cc=Gt(sc);var uc=typeof global=="object"&&global&&global.Object===Object&&global;const Hi=uc;var lc=typeof self=="object"&&self&&self.Object===Object&&self,fc=Hi||lc||Function("return this")();const ge=fc;var dc=ge.Symbol;const ve=dc;var Ui=Object.prototype,hc=Ui.hasOwnProperty,pc=Ui.toString,vt=ve?ve.toStringTag:void 0;function mc(e){var t=hc.call(e,vt),r=e[vt];try{e[vt]=void 0;var n=!0}catch{}var i=pc.call(e);return n&&(t?e[vt]=r:delete e[vt]),i}var gc=Object.prototype,vc=gc.toString;function yc(e){return vc.call(e)}var bc="[object Null]",wc="[object Undefined]",Gi=ve?ve.toStringTag:void 0;function qe(e){return e==null?e===void 0?wc:bc:Gi&&Gi in Object(e)?mc(e):yc(e)}function et(e){return e!=null&&typeof e=="object"}var _c="[object Symbol]";function Yt(e){return typeof e=="symbol"||et(e)&&qe(e)==_c}function Sc(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var Cc=Array.isArray;const Oe=Cc;var kc=1/0,Yi=ve?ve.prototype:void 0,Vi=Yi?Yi.toString:void 0;function Xr(e){if(typeof e=="string")return e;if(Oe(e))return Sc(e,Xr)+"";if(Yt(e))return Vi?Vi.call(e):"";var t=e+"";return t=="0"&&1/e==-kc?"-0":t}var Tc=/\s/;function Ec(e){for(var t=e.length;t--&&Tc.test(e.charAt(t)););return t}var xc=/^\s+/;function Oc(e){return e&&e.slice(0,Ec(e)+1).replace(xc,"")}function Fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ki=0/0,Ac=/^[-+]0x[0-9a-f]+$/i,Lc=/^0b[01]+$/i,Mc=/^0o[0-7]+$/i,Pc=parseInt;function Jr(e){if(typeof e=="number")return e;if(Yt(e))return Ki;if(Fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Oc(e);var r=Lc.test(e);return r||Mc.test(e)?Pc(e.slice(2),r?2:8):Ac.test(e)?Ki:+e}var Xi=1/0,Rc=17976931348623157e292;function Dc(e){if(!e)return e===0?e:0;if(e=Jr(e),e===Xi||e===-Xi){var t=e<0?-1:1;return t*Rc}return e===e?e:0}function Ji(e){var t=Dc(e),r=t%1;return t===t?r?t-r:t:0}function Nc(e){return e}var Fc="[object AsyncFunction]",jc="[object Function]",Ic="[object GeneratorFunction]",Wc="[object Proxy]";function Zi(e){if(!Fe(e))return!1;var t=qe(e);return t==jc||t==Ic||t==Fc||t==Wc}var zc=ge["__core-js_shared__"];const Zr=zc;var Qi=function(){var e=/[^.]+$/.exec(Zr&&Zr.keys&&Zr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Bc(e){return!!Qi&&Qi in e}var $c=Function.prototype,Hc=$c.toString;function Ue(e){if(e!=null){try{return Hc.call(e)}catch{}try{return e+""}catch{}}return""}var Uc=/[\\^$.*+?()[\]{}|]/g,Gc=/^\[object .+?Constructor\]$/,Yc=Function.prototype,Vc=Object.prototype,Kc=Yc.toString,Xc=Vc.hasOwnProperty,Jc=RegExp("^"+Kc.call(Xc).replace(Uc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Zc(e){if(!Fe(e)||Bc(e))return!1;var t=Zi(e)?Jc:Gc;return t.test(Ue(e))}function Qc(e,t){return e==null?void 0:e[t]}function Ge(e,t){var r=Qc(e,t);return Zc(r)?r:void 0}var qc=Ge(ge,"WeakMap");const Qr=qc;function eu(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 tu=800,ru=16,nu=Date.now;function iu(e){var t=0,r=0;return function(){var n=nu(),i=ru-(n-r);if(r=n,i>0){if(++t>=tu)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function su(e){return function(){return e}}var ou=function(){try{var e=Ge(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Vt=ou;var au=Vt?function(e,t){return Vt(e,"toString",{configurable:!0,enumerable:!1,value:su(t),writable:!0})}:Nc,cu=iu(au);const uu=cu;var lu=9007199254740991,fu=/^(?:0|[1-9]\d*)$/;function qr(e,t){var r=typeof e;return t=t==null?lu:t,!!t&&(r=="number"||r!="symbol"&&fu.test(e))&&e>-1&&e%1==0&&e<t}function du(e,t,r){t=="__proto__"&&Vt?Vt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function en(e,t){return e===t||e!==e&&t!==t}var hu=Object.prototype,pu=hu.hasOwnProperty;function mu(e,t,r){var n=e[t];(!(pu.call(e,t)&&en(n,r))||r===void 0&&!(t in e))&&du(e,t,r)}var qi=Math.max;function gu(e,t,r){return t=qi(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=qi(n.length-t,0),o=Array(s);++i<s;)o[i]=n[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=n[i];return a[t]=r(o),eu(e,this,a)}}var vu=9007199254740991;function tn(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=vu}function yu(e){return e!=null&&tn(e.length)&&!Zi(e)}var bu=Object.prototype;function wu(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||bu;return e===r}function _u(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Su="[object Arguments]";function es(e){return et(e)&&qe(e)==Su}var ts=Object.prototype,Cu=ts.hasOwnProperty,ku=ts.propertyIsEnumerable,Tu=es(function(){return arguments}())?es:function(e){return et(e)&&Cu.call(e,"callee")&&!ku.call(e,"callee")};const rn=Tu;function Eu(){return!1}var rs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ns=rs&&typeof module=="object"&&module&&!module.nodeType&&module,xu=ns&&ns.exports===rs,is=xu?ge.Buffer:void 0,Ou=is?is.isBuffer:void 0,Au=Ou||Eu;const nn=Au;var Lu="[object Arguments]",Mu="[object Array]",Pu="[object Boolean]",Ru="[object Date]",Du="[object Error]",Nu="[object Function]",Fu="[object Map]",ju="[object Number]",Iu="[object Object]",Wu="[object RegExp]",zu="[object Set]",Bu="[object String]",$u="[object WeakMap]",Hu="[object ArrayBuffer]",Uu="[object DataView]",Gu="[object Float32Array]",Yu="[object Float64Array]",Vu="[object Int8Array]",Ku="[object Int16Array]",Xu="[object Int32Array]",Ju="[object Uint8Array]",Zu="[object Uint8ClampedArray]",Qu="[object Uint16Array]",qu="[object Uint32Array]",U={};U[Gu]=U[Yu]=U[Vu]=U[Ku]=U[Xu]=U[Ju]=U[Zu]=U[Qu]=U[qu]=!0,U[Lu]=U[Mu]=U[Hu]=U[Pu]=U[Uu]=U[Ru]=U[Du]=U[Nu]=U[Fu]=U[ju]=U[Iu]=U[Wu]=U[zu]=U[Bu]=U[$u]=!1;function el(e){return et(e)&&tn(e.length)&&!!U[qe(e)]}function tl(e){return function(t){return e(t)}}var ss=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yt=ss&&typeof module=="object"&&module&&!module.nodeType&&module,rl=yt&&yt.exports===ss,sn=rl&&Hi.process,nl=function(){try{var e=yt&&yt.require&&yt.require("util").types;return e||sn&&sn.binding&&sn.binding("util")}catch{}}();const os=nl;var as=os&&os.isTypedArray,il=as?tl(as):el;const cs=il;var sl=Object.prototype,ol=sl.hasOwnProperty;function al(e,t){var r=Oe(e),n=!r&&rn(e),i=!r&&!n&&nn(e),s=!r&&!n&&!i&&cs(e),o=r||n||i||s,a=o?_u(e.length,String):[],u=a.length;for(var c in e)(t||ol.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||s&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||qr(c,u)))&&a.push(c);return a}function cl(e,t){return function(r){return e(t(r))}}var ul=cl(Object.keys,Object);const ll=ul;var fl=Object.prototype,dl=fl.hasOwnProperty;function hl(e){if(!wu(e))return ll(e);var t=[];for(var r in Object(e))dl.call(e,r)&&r!="constructor"&&t.push(r);return t}function pl(e){return yu(e)?al(e):hl(e)}var ml=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gl=/^\w*$/;function vl(e,t){if(Oe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Yt(e)?!0:gl.test(e)||!ml.test(e)||t!=null&&e in Object(t)}var yl=Ge(Object,"create");const bt=yl;function bl(){this.__data__=bt?bt(null):{},this.size=0}function wl(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _l="__lodash_hash_undefined__",Sl=Object.prototype,Cl=Sl.hasOwnProperty;function kl(e){var t=this.__data__;if(bt){var r=t[e];return r===_l?void 0:r}return Cl.call(t,e)?t[e]:void 0}var Tl=Object.prototype,El=Tl.hasOwnProperty;function xl(e){var t=this.__data__;return bt?t[e]!==void 0:El.call(t,e)}var Ol="__lodash_hash_undefined__";function Al(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bt&&t===void 0?Ol:t,this}function Ye(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])}}Ye.prototype.clear=bl,Ye.prototype.delete=wl,Ye.prototype.get=kl,Ye.prototype.has=xl,Ye.prototype.set=Al;function Ll(){this.__data__=[],this.size=0}function Kt(e,t){for(var r=e.length;r--;)if(en(e[r][0],t))return r;return-1}var Ml=Array.prototype,Pl=Ml.splice;function Rl(e){var t=this.__data__,r=Kt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Pl.call(t,r,1),--this.size,!0}function Dl(e){var t=this.__data__,r=Kt(t,e);return r<0?void 0:t[r][1]}function Nl(e){return Kt(this.__data__,e)>-1}function Fl(e,t){var r=this.__data__,n=Kt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function Ae(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Ae.prototype.clear=Ll,Ae.prototype.delete=Rl,Ae.prototype.get=Dl,Ae.prototype.has=Nl,Ae.prototype.set=Fl;var jl=Ge(ge,"Map");const wt=jl;function Il(){this.size=0,this.__data__={hash:new Ye,map:new(wt||Ae),string:new Ye}}function Wl(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 Wl(t)?r[typeof t=="string"?"string":"hash"]:r.map}function zl(e){var t=Xt(this,e).delete(e);return this.size-=t?1:0,t}function Bl(e){return Xt(this,e).get(e)}function $l(e){return Xt(this,e).has(e)}function Hl(e,t){var r=Xt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Le(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])}}Le.prototype.clear=Il,Le.prototype.delete=zl,Le.prototype.get=Bl,Le.prototype.has=$l,Le.prototype.set=Hl;var Ul="Expected a function";function on(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Ul);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(on.Cache||Le),r}on.Cache=Le;var Gl=500;function Yl(e){var t=on(e,function(n){return r.size===Gl&&r.clear(),n}),r=t.cache;return t}var Vl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kl=/\\(\\)?/g,Xl=Yl(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Vl,function(r,n,i,s){t.push(i?s.replace(Kl,"$1"):n||r)}),t});const Jl=Xl;function us(e){return e==null?"":Xr(e)}function Jt(e,t){return Oe(e)?e:vl(e,t)?[e]:Jl(us(e))}var Zl=1/0;function an(e){if(typeof e=="string"||Yt(e))return e;var t=e+"";return t=="0"&&1/e==-Zl?"-0":t}function Ql(e,t){t=Jt(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[an(t[r++])];return r&&r==n?e:void 0}function ls(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var fs=ve?ve.isConcatSpreadable:void 0;function ql(e){return Oe(e)||rn(e)||!!(fs&&e&&e[fs])}function ds(e,t,r,n,i){var s=-1,o=e.length;for(r||(r=ql),i||(i=[]);++s<o;){var a=e[s];t>0&&r(a)?t>1?ds(a,t-1,r,n,i):ls(i,a):n||(i[i.length]=a)}return i}function ef(e){var t=e==null?0:e.length;return t?ds(e,1):[]}function tf(e){return uu(gu(e,void 0,ef),e+"")}var rf="Expected a function";function nf(e,t){var r;if(typeof t!="function")throw new TypeError(rf);return e=Ji(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=void 0),r}}function sf(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var s=Array(i);++n<i;)s[n]=e[n+t];return s}function of(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:sf(e,t,r)}var af="\\ud800-\\udfff",cf="\\u0300-\\u036f",uf="\\ufe20-\\ufe2f",lf="\\u20d0-\\u20ff",ff=cf+uf+lf,df="\\ufe0e\\ufe0f",hf="\\u200d",pf=RegExp("["+hf+af+ff+df+"]");function cn(e){return pf.test(e)}function mf(e){return e.split("")}var hs="\\ud800-\\udfff",gf="\\u0300-\\u036f",vf="\\ufe20-\\ufe2f",yf="\\u20d0-\\u20ff",bf=gf+vf+yf,wf="\\ufe0e\\ufe0f",_f="["+hs+"]",un="["+bf+"]",ln="\\ud83c[\\udffb-\\udfff]",Sf="(?:"+un+"|"+ln+")",ps="[^"+hs+"]",ms="(?:\\ud83c[\\udde6-\\uddff]){2}",gs="[\\ud800-\\udbff][\\udc00-\\udfff]",Cf="\\u200d",vs=Sf+"?",ys="["+wf+"]?",kf="(?:"+Cf+"(?:"+[ps,ms,gs].join("|")+")"+ys+vs+")*",Tf=ys+vs+kf,Ef="(?:"+[ps+un+"?",un,ms,gs,_f].join("|")+")",xf=RegExp(ln+"(?="+ln+")|"+Ef+Tf,"g");function Of(e){return e.match(xf)||[]}function Af(e){return cn(e)?Of(e):mf(e)}function Lf(){this.__data__=new Ae,this.size=0}function Mf(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Pf(e){return this.__data__.get(e)}function Rf(e){return this.__data__.has(e)}var Df=200;function Nf(e,t){var r=this.__data__;if(r instanceof Ae){var n=r.__data__;if(!wt||n.length<Df-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Le(n)}return r.set(e,t),this.size=r.size,this}function je(e){var t=this.__data__=new Ae(e);this.size=t.size}je.prototype.clear=Lf,je.prototype.delete=Mf,je.prototype.get=Pf,je.prototype.has=Rf,je.prototype.set=Nf;function Ff(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 jf(){return[]}var If=Object.prototype,Wf=If.propertyIsEnumerable,bs=Object.getOwnPropertySymbols,zf=bs?function(e){return e==null?[]:(e=Object(e),Ff(bs(e),function(t){return Wf.call(e,t)}))}:jf;const Bf=zf;function $f(e,t,r){var n=t(e);return Oe(e)?n:ls(n,r(e))}function ws(e){return $f(e,pl,Bf)}var Hf=Ge(ge,"DataView");const fn=Hf;var Uf=Ge(ge,"Promise");const dn=Uf;var Gf=Ge(ge,"Set");const hn=Gf;var _s="[object Map]",Yf="[object Object]",Ss="[object Promise]",Cs="[object Set]",ks="[object WeakMap]",Ts="[object DataView]",Vf=Ue(fn),Kf=Ue(wt),Xf=Ue(dn),Jf=Ue(hn),Zf=Ue(Qr),Ve=qe;(fn&&Ve(new fn(new ArrayBuffer(1)))!=Ts||wt&&Ve(new wt)!=_s||dn&&Ve(dn.resolve())!=Ss||hn&&Ve(new hn)!=Cs||Qr&&Ve(new Qr)!=ks)&&(Ve=function(e){var t=qe(e),r=t==Yf?e.constructor:void 0,n=r?Ue(r):"";if(n)switch(n){case Vf:return Ts;case Kf:return _s;case Xf:return Ss;case Jf:return Cs;case Zf:return ks}return t});const Es=Ve;var Qf=ge.Uint8Array;const xs=Qf;var qf="__lodash_hash_undefined__";function ed(e){return this.__data__.set(e,qf),this}function td(e){return this.__data__.has(e)}function Zt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Le;++t<r;)this.add(e[t])}Zt.prototype.add=Zt.prototype.push=ed,Zt.prototype.has=td;function rd(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 nd(e,t){return e.has(t)}var id=1,sd=2;function Os(e,t,r,n,i,s){var o=r&id,a=e.length,u=t.length;if(a!=u&&!(o&&u>a))return!1;var c=s.get(e),l=s.get(t);if(c&&l)return c==t&&l==e;var f=-1,d=!0,m=r&sd?new Zt:void 0;for(s.set(e,t),s.set(t,e);++f<a;){var g=e[f],y=t[f];if(n)var v=o?n(y,g,f,t,e,s):n(g,y,f,e,t,s);if(v!==void 0){if(v)continue;d=!1;break}if(m){if(!rd(t,function(_,M){if(!nd(m,M)&&(g===_||i(g,_,r,n,s)))return m.push(M)})){d=!1;break}}else if(!(g===y||i(g,y,r,n,s))){d=!1;break}}return s.delete(e),s.delete(t),d}function od(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function ad(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var cd=1,ud=2,ld="[object Boolean]",fd="[object Date]",dd="[object Error]",hd="[object Map]",pd="[object Number]",md="[object RegExp]",gd="[object Set]",vd="[object String]",yd="[object Symbol]",bd="[object ArrayBuffer]",wd="[object DataView]",As=ve?ve.prototype:void 0,pn=As?As.valueOf:void 0;function _d(e,t,r,n,i,s,o){switch(r){case wd:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case bd:return!(e.byteLength!=t.byteLength||!s(new xs(e),new xs(t)));case ld:case fd:case pd:return en(+e,+t);case dd:return e.name==t.name&&e.message==t.message;case md:case vd:return e==t+"";case hd:var a=od;case gd:var u=n&cd;if(a||(a=ad),e.size!=t.size&&!u)return!1;var c=o.get(e);if(c)return c==t;n|=ud,o.set(e,t);var l=Os(a(e),a(t),n,i,s,o);return o.delete(e),l;case yd:if(pn)return pn.call(e)==pn.call(t)}return!1}var Sd=1,Cd=Object.prototype,kd=Cd.hasOwnProperty;function Td(e,t,r,n,i,s){var o=r&Sd,a=ws(e),u=a.length,c=ws(t),l=c.length;if(u!=l&&!o)return!1;for(var f=u;f--;){var d=a[f];if(!(o?d in t:kd.call(t,d)))return!1}var m=s.get(e),g=s.get(t);if(m&&g)return m==t&&g==e;var y=!0;s.set(e,t),s.set(t,e);for(var v=o;++f<u;){d=a[f];var _=e[d],M=t[d];if(n)var A=o?n(M,_,d,t,e,s):n(_,M,d,e,t,s);if(!(A===void 0?_===M||i(_,M,r,n,s):A)){y=!1;break}v||(v=d=="constructor")}if(y&&!v){var x=e.constructor,w=t.constructor;x!=w&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof w=="function"&&w instanceof w)&&(y=!1)}return s.delete(e),s.delete(t),y}var Ed=1,Ls="[object Arguments]",Ms="[object Array]",Qt="[object Object]",xd=Object.prototype,Ps=xd.hasOwnProperty;function Od(e,t,r,n,i,s){var o=Oe(e),a=Oe(t),u=o?Ms:Es(e),c=a?Ms:Es(t);u=u==Ls?Qt:u,c=c==Ls?Qt:c;var l=u==Qt,f=c==Qt,d=u==c;if(d&&nn(e)){if(!nn(t))return!1;o=!0,l=!1}if(d&&!l)return s||(s=new je),o||cs(e)?Os(e,t,r,n,i,s):_d(e,t,u,r,n,i,s);if(!(r&Ed)){var m=l&&Ps.call(e,"__wrapped__"),g=f&&Ps.call(t,"__wrapped__");if(m||g){var y=m?e.value():e,v=g?t.value():t;return s||(s=new je),i(y,v,r,n,s)}}return d?(s||(s=new je),Td(e,t,r,n,i,s)):!1}function Rs(e,t,r,n,i){return e===t?!0:e==null||t==null||!et(e)&&!et(t)?e!==e&&t!==t:Od(e,t,r,n,Rs,i)}function Ad(e,t){return e!=null&&t in Object(e)}function Ld(e,t,r){t=Jt(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var o=an(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&&tn(i)&&qr(o,i)&&(Oe(e)||rn(e)))}function Md(e,t){return e!=null&&Ld(e,t,Ad)}function Pd(e){return function(t){return t==null?void 0:t[e]}}var Rd=function(){return ge.Date.now()};const mn=Rd;var Dd="Expected a function",Nd=Math.max,Fd=Math.min;function Ds(e,t,r){var n,i,s,o,a,u,c=0,l=!1,f=!1,d=!0;if(typeof e!="function")throw new TypeError(Dd);t=Jr(t)||0,Fe(r)&&(l=!!r.leading,f="maxWait"in r,s=f?Nd(Jr(r.maxWait)||0,t):s,d="trailing"in r?!!r.trailing:d);function m(b){var k=n,N=i;return n=i=void 0,c=b,o=e.apply(N,k),o}function g(b){return c=b,a=setTimeout(_,t),l?m(b):o}function y(b){var k=b-u,N=b-c,j=t-k;return f?Fd(j,s-N):j}function v(b){var k=b-u,N=b-c;return u===void 0||k>=t||k<0||f&&N>=s}function _(){var b=mn();if(v(b))return M(b);a=setTimeout(_,y(b))}function M(b){return a=void 0,d&&n?m(b):(n=i=void 0,o)}function A(){a!==void 0&&clearTimeout(a),c=0,n=u=i=a=void 0}function x(){return a===void 0?o:M(mn())}function w(){var b=mn(),k=v(b);if(n=arguments,i=this,u=b,k){if(a===void 0)return g(u);if(f)return clearTimeout(a),a=setTimeout(_,t),m(u)}return a===void 0&&(a=setTimeout(_,t)),o}return w.cancel=A,w.flush=x,w}function jd(e,t){return Rs(e,t)}function Id(e,t,r,n){if(!Fe(e))return e;t=Jt(t,e);for(var i=-1,s=t.length,o=s-1,a=e;a!=null&&++i<s;){var u=an(t[i]),c=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var l=a[u];c=n?n(l,u,a):void 0,c===void 0&&(c=Fe(l)?l:qr(t[i+1])?[]:{})}mu(a,u,c),a=a[u]}return e}function Wd(e,t,r){for(var n=-1,i=t.length,s={};++n<i;){var o=t[n],a=Ql(e,o);r(a,o)&&Id(s,Jt(o,e),a)}return s}function zd(e){return nf(2,e)}var Bd=9007199254740991,$d=Math.floor;function Ns(e,t){var r="";if(!e||t<1||t>Bd)return r;do t%2&&(r+=e),t=$d(t/2),t&&(e+=e);while(t);return r}var Hd=Pd("length");const Ud=Hd;var Fs="\\ud800-\\udfff",Gd="\\u0300-\\u036f",Yd="\\ufe20-\\ufe2f",Vd="\\u20d0-\\u20ff",Kd=Gd+Yd+Vd,Xd="\\ufe0e\\ufe0f",Jd="["+Fs+"]",gn="["+Kd+"]",vn="\\ud83c[\\udffb-\\udfff]",Zd="(?:"+gn+"|"+vn+")",js="[^"+Fs+"]",Is="(?:\\ud83c[\\udde6-\\uddff]){2}",Ws="[\\ud800-\\udbff][\\udc00-\\udfff]",Qd="\\u200d",zs=Zd+"?",Bs="["+Xd+"]?",qd="(?:"+Qd+"(?:"+[js,Is,Ws].join("|")+")"+Bs+zs+")*",eh=Bs+zs+qd,th="(?:"+[js+gn+"?",gn,Is,Ws,Jd].join("|")+")",$s=RegExp(vn+"(?="+vn+")|"+th+eh,"g");function rh(e){for(var t=$s.lastIndex=0;$s.test(e);)++t;return t}function Hs(e){return cn(e)?rh(e):Ud(e)}var nh=Math.ceil;function ih(e,t){t=t===void 0?" ":Xr(t);var r=t.length;if(r<2)return r?Ns(t,e):t;var n=Ns(t,nh(e/Hs(t)));return cn(t)?of(Af(n),0,e).join(""):n.slice(0,e)}function sh(e,t,r){e=us(e),t=Ji(t);var n=t?Hs(e):0;return t&&n<t?ih(t-n,r)+e:e}function oh(e,t){return Wd(e,t,function(r,n){return Md(e,n)})}var ah=tf(function(e,t){return e==null?{}:oh(e,t)});const Us=ah;var ch="Expected a function";function uh(e,t,r){var n=!0,i=!0;if(typeof e!="function")throw new TypeError(ch);return Fe(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ds(e,t,{leading:n,maxWait:t,trailing:i})}const yn=Symbol(),lh=Symbol(),bn=Symbol();let fh=(e,t)=>new Proxy(e,t);const wn=Object.getPrototypeOf,_n=new WeakMap,Gs=e=>e&&(_n.has(e)?_n.get(e):wn(e)===Object.prototype||wn(e)===Array.prototype),Ys=e=>typeof e=="object"&&e!==null,Vs=new WeakMap,Ks=e=>e[bn]||e,Xs=(e,t,r)=>{if(!Gs(e))return e;const n=Ks(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(a=>!a.writable))(n);let s=r&&r.get(n);return s&&s[1].f===i||(s=((o,a)=>{const u={f:a};let c=!1;const l=(d,m)=>{if(!c){let g=u.a.get(o);g||(g=new Set,u.a.set(o,g)),m&&g.has(yn)||g.add(d)}},f={get:(d,m)=>m===bn?o:(l(m),Xs(d[m],u.a,u.c)),has:(d,m)=>m===lh?(c=!0,u.a.delete(o),!0):(l(m),m in d),getOwnPropertyDescriptor:(d,m)=>(l(m,!0),Object.getOwnPropertyDescriptor(d,m)),ownKeys:d=>(l(yn),Reflect.ownKeys(d))};return a&&(f.set=f.deleteProperty=()=>!1),[f,u]})(n,i),s[1].p=fh(i?(o=>{let a=Vs.get(o);if(!a){if(Array.isArray(o))a=Array.from(o);else{const u=Object.getOwnPropertyDescriptors(o);Object.values(u).forEach(c=>{c.configurable=!0}),a=Object.create(wn(o),u)}Vs.set(o,a)}return a})(n):n,s[0]),r&&r.set(n,s)),s[1].a=t,s[1].c=r,s[1].p},dh=(e,t)=>{const r=Reflect.ownKeys(e),n=Reflect.ownKeys(t);return r.length!==n.length||r.some((i,s)=>i!==n[s])},Js=(e,t,r,n)=>{if(Object.is(e,t))return!1;if(!Ys(e)||!Ys(t))return!0;const i=r.get(Ks(e));if(!i)return!0;if(n){const o=n.get(e);if(o&&o.n===t)return o.g;n.set(e,{n:t,g:!1})}let s=null;for(const o of i){const a=o===yn?dh(e,t):Js(e[o],t[o],r,n);if(a!==!0&&a!==!1||(s=a),s)break}return s===null&&(s=!0),n&&n.set(e,{n:t,g:s}),s},Zs=e=>Gs(e)&&e[bn]||null,Qs=(e,t=!0)=>{_n.set(e,t)};var hh=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ph(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function mh(e){var t=e.default;if(typeof t=="function"){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}var qs={exports:{}},eo={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var tt=ue.default;function gh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vh=typeof Object.is=="function"?Object.is:gh,yh=tt.useState,bh=tt.useEffect,wh=tt.useLayoutEffect,_h=tt.useDebugValue;function Sh(e,t){var r=t(),n=yh({inst:{value:r,getSnapshot:t}}),i=n[0].inst,s=n[1];return wh(function(){i.value=r,i.getSnapshot=t,Sn(i)&&s({inst:i})},[e,r,t]),bh(function(){return Sn(i)&&s({inst:i}),e(function(){Sn(i)&&s({inst:i})})},[e]),_h(r),r}function Sn(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!vh(e,r)}catch{return!0}}function Ch(e,t){return t()}var kh=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Ch:Sh;eo.useSyncExternalStore=tt.useSyncExternalStore!==void 0?tt.useSyncExternalStore:kh,function(e){e.exports=eo}(qs);const Th=ph(qs.exports),Cn=e=>typeof e=="object"&&e!==null,le=Symbol(),kn=new WeakSet,Eh=(e=Object.is,t=(c,l)=>new Proxy(c,l),r=c=>Cn(c)&&!kn.has(c)&&(Array.isArray(c)||!(Symbol.iterator in c))&&!(c instanceof WeakMap)&&!(c instanceof WeakSet)&&!(c instanceof Error)&&!(c instanceof Number)&&!(c instanceof Date)&&!(c instanceof String)&&!(c instanceof RegExp)&&!(c instanceof ArrayBuffer),n=c=>{switch(c.status){case"fulfilled":return c.value;case"rejected":throw c.reason;default:throw c}},i=new WeakMap,s=(c,l,f,d=n)=>{const m=i.get(l);if((m==null?void 0:m[0])===f)return m[1];const g=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c));return Qs(g,!0),i.set(l,[f,g]),Reflect.ownKeys(c).forEach(y=>{const v=Reflect.get(c,y,l);kn.has(v)?(Qs(v,!1),g[y]=v):v instanceof Promise?Object.defineProperty(g,y,{get(){return d(v)}}):v!=null&&v[le]?g[y]=Tn(v,d):g[y]=v}),Object.freeze(g)},o=new WeakMap,a=[1],u=c=>{if(!Cn(c))throw new Error("object required");const l=o.get(c);if(l)return l;let f=a[0];const d=new Set,m=(x,w=++a[0])=>{f!==w&&(f=w,d.forEach(b=>b(x,w)))},g=new Map,y=x=>{let w=g.get(x);return w||(w=(b,k)=>{const N=[...b];N[1]=[x,...N[1]],m(N,k)},g.set(x,w)),w},v=x=>{const w=g.get(x);return g.delete(x),w},_=Array.isArray(c)?[]:Object.create(Object.getPrototypeOf(c)),A=t(_,{get(x,w,b){return w===le?[x,b,f,s,d]:Reflect.get(x,w,b)},deleteProperty(x,w){var b;const k=Reflect.get(x,w),N=(b=k==null?void 0:k[le])==null?void 0:b[4];N&&N.delete(v(w));const j=Reflect.deleteProperty(x,w);return j&&m(["delete",[w],k]),j},set(x,w,b,k){var N,j;const E=Reflect.has(x,w),F=Reflect.get(x,w,k);if(E&&e(F,b))return!0;const I=(N=F==null?void 0:F[le])==null?void 0:N[4];I&&I.delete(v(w)),Cn(b)&&(b=Zs(b)||b);let O=b;return(j=Object.getOwnPropertyDescriptor(x,w))!=null&&j.set||(b instanceof Promise?b.then(C=>{b.status="fulfilled",b.value=C,m(["resolve",[w],C])}).catch(C=>{b.status="rejected",b.reason=C,m(["reject",[w],C])}):(!(b!=null&&b[le])&&r(b)&&(O=rt(b)),O!=null&&O[le]&&O[le][4].add(y(w)))),Reflect.set(x,w,O,k),m(["set",[w],b,F]),!0}});return o.set(c,A),Reflect.ownKeys(c).forEach(x=>{const w=Object.getOwnPropertyDescriptor(c,x);w.get||w.set?Object.defineProperty(_,x,w):A[x]=c[x]}),A})=>[u,le,kn,e,t,r,n,i,s,o,a],[xh]=Eh();function rt(e={}){return xh(e)}function to(e,t,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[le])&&console.warn("Please use proxy object");let n;const i=[],s=e[le][4],o=a=>{if(i.push(a),r){t(i.splice(0));return}n||(n=Promise.resolve().then(()=>{n=void 0,s.has(o)&&t(i.splice(0))}))};return s.add(o),()=>s.delete(o)}function Tn(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[le])&&console.warn("Please use proxy object");const[r,n,i,s]=e[le];return s(r,n,i,t)}const{use:ro}=ue.default,{useSyncExternalStore:Oh}=Th,Ah=(e,t)=>{const r=[],n=new WeakSet,i=(s,o)=>{if(n.has(s))return;let a;typeof s=="object"&&s!==null&&(n.add(s),a=t.get(Zs(s)||s)),a?a.forEach(u=>{"value"in(Object.getOwnPropertyDescriptor(s,u)||{})&&i(s[u],o?[...o,u]:[u])}):o&&r.push(o)};return i(e),r},Lh=(e,t)=>{const r=p.useRef();p.useEffect(()=>{r.current=Ah(e,t)}),p.useDebugValue(r.current)};function nt(e,t){const r=t==null?void 0:t.sync,n=p.useRef(),i=p.useRef();let s=!0;const o=Oh(p.useCallback(c=>{const l=to(e,c,r);return c(),l},[e,r]),()=>{const c=Tn(e,ro);try{if(!s&&n.current&&i.current&&!Js(n.current,c,i.current,new WeakMap))return n.current}catch{}return c},()=>Tn(e,ro));s=!1;const a=new WeakMap;p.useEffect(()=>{n.current=o,i.current=a}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Lh(o,a);const u=p.useMemo(()=>new WeakMap,[]);return Xs(o,a,u)}const no={accessKey:"",useNarrowMode:!1,initialShowMore:!1,pureRecommend:!1},fe=rt(no),io=Object.keys(no),Ie=function(){return nt(fe)},so="bilibili-app-recommend.config";function Mh(){const e=GM_getValue(so);e&&typeof e=="object"&&Object.assign(fe,Us(e,io)),to(fe,()=>{Ph()})}function Ph(){const e=Us(fe,io);GM_setValue(so,e)}function Rh(e){Object.assign(fe,e)}Mh();var _t={exports:{}};const Dh=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),oo=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},ao=({clearTimeout:e,setTimeout:t,willResolve:r})=>(n,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(oo());let o,a,u;const c=e||clearTimeout,l=()=>{c(o),u(oo())},f=()=>{s&&s.removeEventListener("abort",l)},d=new Promise((m,g)=>{a=()=>{f(),r?m(i):g(i)},u=g,o=(t||setTimeout)(a,n)});return s&&s.addEventListener("abort",l,{once:!0}),d.clear=()=>{c(o),o=null,a()},d},co=e=>{const t=ao({...e,willResolve:!0});return t.reject=ao({...e,willResolve:!1}),t.range=(r,n,i)=>t(Dh(r,n),i),t},En=co();En.createWithTimers=co,_t.exports=En,_t.exports.default=En;var qt,uo=ac.default;qt=uo.createRoot,uo.hydrateRoot;const fy="",er=zd(()=>!!document.querySelectorAll(".bili-feed4").length),lo=function(){return p.useMemo(()=>er(),[])},fo=document.querySelector(".bili-header__bar"),ho=Boolean(fo&&window.getComputedStyle(fo).display==="none")?50:64,po=()=>document.body.classList.contains("dark"),mo=rt({value:po()});function xn(){return nt(mo).value}const tr=new MutationObserver(function(){mo.value=po()});tr.observe(document.body,{attributes:!0,attributeFilter:["class"]}),window.addEventListener("unload",()=>{tr==null||tr.disconnect()});var On={},ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.DEFAULT_ICON_CONFIGS=void 0,ie.IconConverter=wo,ie.IconProvider=void 0,ie.IconWrapper=$h;var rr=Nh(ue.default);function go(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(go=function(n){return n?r:t})(e)}function Nh(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=go(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}var Fh=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function vo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function yo(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vo(Object(r),!0).forEach(function(n){jh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vo(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ih(e,t){if(e==null)return{};var r=Wh(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 Wh(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 bo={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};ie.DEFAULT_ICON_CONFIGS=bo;function zh(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function wo(e,t,r){var n=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||r.theme;switch(s){case"outline":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone),i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof n[0]=="string"?n[0]:"currentColor"),i.push(typeof n[1]=="string"?n[1]:r.colors.multiColor.outFillColor),i.push(typeof n[2]=="string"?n[2]:r.colors.multiColor.innerStrokeColor),i.push(typeof n[3]=="string"?n[3]:r.colors.multiColor.innerFillColor);break}return{size:t.size||r.size,strokeWidth:t.strokeWidth||r.strokeWidth,strokeLinecap:t.strokeLinecap||r.strokeLinecap,strokeLinejoin:t.strokeLinejoin||r.strokeLinejoin,colors:i,id:e}}var _o=(0,rr.createContext)(bo),Bh=_o.Provider;ie.IconProvider=Bh;function $h(e,t,r){return function(n){var i=n.size,s=n.strokeWidth,o=n.strokeLinecap,a=n.strokeLinejoin,u=n.theme,c=n.fill,l=n.className,f=n.spin,d=Ih(n,Fh),m=(0,rr.useContext)(_o),g=(0,rr.useMemo)(zh,[]),y=wo(g,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:a,theme:u,fill:c},m),v=[m.prefix+"-icon"];return v.push(m.prefix+"-icon-"+e),t&&m.rtl&&v.push(m.prefix+"-icon-rtl"),f&&v.push(m.prefix+"-icon-spin"),l&&v.push(l),rr.default.createElement("span",yo(yo({},d),{},{className:v.join(" ")}),r(y))}}Object.defineProperty(On,"__esModule",{value:!0});var So=On.default=void 0,An=Uh(ue.default),Hh=ie;function Uh(e){return e&&e.__esModule?e:{default:e}}var Gh=(0,Hh.IconWrapper)("close",!1,function(e){return An.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},An.default.createElement("path",{d:"M8 8L40 40",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),An.default.createElement("path",{d:"M8 40L40 8",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});So=On.default=Gh;var Ln={};Object.defineProperty(Ln,"__esModule",{value:!0});var Co=Ln.default=void 0,Mn=Vh(ue.default),Yh=ie;function Vh(e){return e&&e.__esModule?e:{default:e}}var Kh=(0,Yh.IconWrapper)("config",!1,function(e){return Mn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Mn.default.createElement("path",{d:"M24 4L18 10H10V18L4 24L10 30V38H18L24 44L30 38H38V30L44 24L38 18V10H30L24 4Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),Mn.default.createElement("path",{d:"M24 30C27.3137 30 30 27.3137 30 24C30 20.6863 27.3137 18 24 18C20.6863 18 18 20.6863 18 24C18 27.3137 20.6863 30 24 30Z",fill:e.colors[3],stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}))});Co=Ln.default=Kh;var Pn={};Object.defineProperty(Pn,"__esModule",{value:!0});var ko=Pn.default=void 0,St=Jh(ue.default),Xh=ie;function Jh(e){return e&&e.__esModule?e:{default:e}}var Zh=(0,Xh.IconWrapper)("distraught-face",!1,function(e){return St.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},St.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),St.default.createElement("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),St.default.createElement("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),St.default.createElement("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});ko=Pn.default=Zh;var Rn={};Object.defineProperty(Rn,"__esModule",{value:!0});var To=Rn.default=void 0,Dn=qh(ue.default),Qh=ie;function qh(e){return e&&e.__esModule?e:{default:e}}var ep=(0,Qh.IconWrapper)("return",!0,function(e){return Dn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},Dn.default.createElement("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),Dn.default.createElement("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});To=Rn.default=ep;var Nn={};Object.defineProperty(Nn,"__esModule",{value:!0});var Eo=Nn.default=void 0,ye=rp(ue.default),tp=ie;function rp(e){return e&&e.__esModule?e:{default:e}}var np=(0,tp.IconWrapper)("loading-three",!1,function(e){return ye.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},ye.default.createElement("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M24 12V15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M32.4852 15.5147L30.3639 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M36 24H33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M32.4852 32.4853L30.3639 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M24 36V33",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M15.5148 32.4853L17.6361 30.364",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M12 24H15",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),ye.default.createElement("path",{d:"M15.5148 15.5147L17.6361 17.636",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});Eo=Nn.default=np;var Fn={};Object.defineProperty(Fn,"__esModule",{value:!0});var xo=Fn.default=void 0,jn=sp(ue.default),ip=ie;function sp(e){return e&&e.__esModule?e:{default:e}}var op=(0,ip.IconWrapper)("loading",!0,function(e){return jn.default.createElement("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none"},jn.default.createElement("path",{d:"M4 24C4 35.0457 12.9543 44 24 44V44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),jn.default.createElement("path",{d:"M36 24C36 17.3726 30.6274 12 24 12C17.3726 12 12 17.3726 12 24C12 30.6274 17.3726 36 24 36V36",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}))});xo=Fn.default=op;function ap(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function cp(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 up=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(cp(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var s=ap(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}(),ee="-ms-",nr="-moz-",z="-webkit-",Oo="comm",In="rule",Wn="decl",lp="@import",Ao="@keyframes",fp=Math.abs,ir=String.fromCharCode,dp=Object.assign;function hp(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 Lo(e){return e.trim()}function pp(e,t){return(e=t.exec(e))?e[0]:e}function B(e,t,r){return e.replace(t,r)}function zn(e,t){return e.indexOf(t)}function q(e,t){return e.charCodeAt(t)|0}function Ct(e,t,r){return e.slice(t,r)}function be(e){return e.length}function Bn(e){return e.length}function sr(e,t){return t.push(e),e}function mp(e,t){return e.map(t).join("")}var or=1,it=1,Mo=0,re=0,K=0,st="";function ar(e,t,r,n,i,s,o){return{value:e,root:t,parent:r,type:n,props:i,children:s,line:or,column:it,length:o,return:""}}function kt(e,t){return dp(ar("",null,null,"",null,null,0),e,{length:-e.length},t)}function gp(){return K}function vp(){return K=re>0?q(st,--re):0,it--,K===10&&(it=1,or--),K}function se(){return K=re<Mo?q(st,re++):0,it++,K===10&&(it=1,or++),K}function we(){return q(st,re)}function cr(){return re}function Tt(e,t){return Ct(st,e,t)}function Et(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 Po(e){return or=it=1,Mo=be(st=e),re=0,[]}function Ro(e){return st="",e}function ur(e){return Lo(Tt(re-1,$n(e===91?e+2:e===40?e+1:e)))}function yp(e){for(;(K=we())&&K<33;)se();return Et(e)>2||Et(K)>3?"":" "}function bp(e,t){for(;--t&&se()&&!(K<48||K>102||K>57&&K<65||K>70&&K<97););return Tt(e,cr()+(t<6&&we()==32&&se()==32))}function $n(e){for(;se();)switch(K){case e:return re;case 34:case 39:e!==34&&e!==39&&$n(K);break;case 40:e===41&&$n(e);break;case 92:se();break}return re}function wp(e,t){for(;se()&&e+K!==47+10;)if(e+K===42+42&&we()===47)break;return"/*"+Tt(t,re-1)+"*"+ir(e===47?e:se())}function _p(e){for(;!Et(we());)se();return Tt(e,re)}function Sp(e){return Ro(lr("",null,null,null,[""],e=Po(e),0,[0],e))}function lr(e,t,r,n,i,s,o,a,u){for(var c=0,l=0,f=o,d=0,m=0,g=0,y=1,v=1,_=1,M=0,A="",x=i,w=s,b=n,k=A;v;)switch(g=M,M=se()){case 40:if(g!=108&&q(k,f-1)==58){zn(k+=B(ur(M),"&","&\f"),"&\f")!=-1&&(_=-1);break}case 34:case 39:case 91:k+=ur(M);break;case 9:case 10:case 13:case 32:k+=yp(g);break;case 92:k+=bp(cr()-1,7);continue;case 47:switch(we()){case 42:case 47:sr(Cp(wp(se(),cr()),t,r),u);break;default:k+="/"}break;case 123*y:a[c++]=be(k)*_;case 125*y:case 59:case 0:switch(M){case 0:case 125:v=0;case 59+l:m>0&&be(k)-f&&sr(m>32?No(k+";",n,r,f-1):No(B(k," ","")+";",n,r,f-2),u);break;case 59:k+=";";default:if(sr(b=Do(k,t,r,c,l,i,a,A,x=[],w=[],f),s),M===123)if(l===0)lr(k,t,b,b,x,s,f,a,w);else switch(d===99&&q(k,3)===110?100:d){case 100:case 109:case 115:lr(e,b,b,n&&sr(Do(e,b,b,0,0,i,a,A,i,x=[],f),w),i,w,f,a,n?x:w);break;default:lr(k,b,b,b,[""],w,0,a,w)}}c=l=m=0,y=_=1,A=k="",f=o;break;case 58:f=1+be(k),m=g;default:if(y<1){if(M==123)--y;else if(M==125&&y++==0&&vp()==125)continue}switch(k+=ir(M),M*y){case 38:_=l>0?1:(k+="\f",-1);break;case 44:a[c++]=(be(k)-1)*_,_=1;break;case 64:we()===45&&(k+=ur(se())),d=we(),l=f=be(A=k+=_p(cr())),M++;break;case 45:g===45&&be(k)==2&&(y=0)}}return s}function Do(e,t,r,n,i,s,o,a,u,c,l){for(var f=i-1,d=i===0?s:[""],m=Bn(d),g=0,y=0,v=0;g<n;++g)for(var _=0,M=Ct(e,f+1,f=fp(y=o[g])),A=e;_<m;++_)(A=Lo(y>0?d[_]+" "+M:B(M,/&\f/g,d[_])))&&(u[v++]=A);return ar(e,t,r,i===0?In:a,u,c,l)}function Cp(e,t,r){return ar(e,t,r,Oo,ir(gp()),Ct(e,2,-2),0)}function No(e,t,r,n){return ar(e,t,r,Wn,Ct(e,0,n),Ct(e,n+1,-1),n)}function ot(e,t){for(var r="",n=Bn(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function kp(e,t,r,n){switch(e.type){case lp:case Wn:return e.return=e.return||e.value;case Oo:return"";case Ao:return e.return=e.value+"{"+ot(e.children,n)+"}";case In:e.value=e.props.join(",")}return be(r=ot(e.children,n))?e.return=e.value+"{"+r+"}":""}function Tp(e){var t=Bn(e);return function(r,n,i,s){for(var o="",a=0;a<t;a++)o+=e[a](r,n,i,s)||"";return o}}function Ep(e){return function(t){t.root||(t=t.return)&&e(t)}}function xp(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Op=function(t,r,n){for(var i=0,s=0;i=s,s=we(),i===38&&s===12&&(r[n]=1),!Et(s);)se();return Tt(t,re)},Ap=function(t,r){var n=-1,i=44;do switch(Et(i)){case 0:i===38&&we()===12&&(r[n]=1),t[n]+=Op(re-1,r,n);break;case 2:t[n]+=ur(i);break;case 4:if(i===44){t[++n]=we()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=ir(i)}while(i=se());return t},Lp=function(t,r){return Ro(Ap(Po(t),r))},Fo=new WeakMap,Mp=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&&!Fo.get(n))&&!i){Fo.set(t,!0);for(var s=[],o=Lp(r,s),a=n.props,u=0,c=0;u<o.length;u++)for(var l=0;l<a.length;l++,c++)t.props[c]=s[u]?o[u].replace(/&\f/g,a[l]):a[l]+" "+o[u]}}},Pp=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function jo(e,t){switch(hp(e,t)){case 5103:return z+"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 z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+nr+e+ee+e+e;case 6828:case 4268:return z+e+ee+e+e;case 6165:return z+e+ee+"flex-"+e+e;case 5187:return z+e+B(e,/(\w+).+(:[^]+)/,z+"box-$1$2"+ee+"flex-$1$2")+e;case 5443:return z+e+ee+"flex-item-"+B(e,/flex-|-self/,"")+e;case 4675:return z+e+ee+"flex-line-pack"+B(e,/align-content|flex-|-self/,"")+e;case 5548:return z+e+ee+B(e,"shrink","negative")+e;case 5292:return z+e+ee+B(e,"basis","preferred-size")+e;case 6060:return z+"box-"+B(e,"-grow","")+z+e+ee+B(e,"grow","positive")+e;case 4554:return z+B(e,/([^-])(transform)/g,"$1"+z+"$2")+e;case 6187:return B(B(B(e,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),e,"")+e;case 5495:case 3959:return B(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return B(B(e,/(.+:)(flex-)?(.*)/,z+"box-pack:$3"+ee+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+z+e+e;case 4095:case 3583:case 4068:case 2532:return B(e,/(.+)-inline(.+)/,z+"$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(be(e)-1-t>6)switch(q(e,t+1)){case 109:if(q(e,t+4)!==45)break;case 102:return B(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+nr+(q(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zn(e,"stretch")?jo(B(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(q(e,t+1)!==115)break;case 6444:switch(q(e,be(e)-3-(~zn(e,"!important")&&10))){case 107:return B(e,":",":"+z)+e;case 101:return B(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(q(e,14)===45?"inline-":"")+"box$3$1"+z+"$2$3$1"+ee+"$2box$3")+e}break;case 5936:switch(q(e,t+11)){case 114:return z+e+ee+B(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+ee+B(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+ee+B(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+ee+e+e}return e}var Rp=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case Wn:t.return=jo(t.value,t.length);break;case Ao:return ot([kt(t,{value:B(t.value,"@","@"+z)})],i);case In:if(t.length)return mp(t.props,function(s){switch(pp(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ot([kt(t,{props:[B(s,/:(read-\w+)/,":"+nr+"$1")]})],i);case"::placeholder":return ot([kt(t,{props:[B(s,/:(plac\w+)/,":"+z+"input-$1")]}),kt(t,{props:[B(s,/:(plac\w+)/,":"+nr+"$1")]}),kt(t,{props:[B(s,/:(plac\w+)/,ee+"input-$1")]})],i)}return""})}},Dp=[Rp],Io=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var v=y.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var i=t.stylisPlugins||Dp,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var v=y.getAttribute("data-emotion").split(" "),_=1;_<v.length;_++)s[v[_]]=!0;a.push(y)});var u,c=[Mp,Pp];{var l,f=[kp,Ep(function(y){l.insert(y)})],d=Tp(c.concat(i,f)),m=function(v){return ot(Sp(v),d)};u=function(v,_,M,A){l=M,m(v?v+"{"+_.styles+"}":_.styles),A&&(g.inserted[_.name]=!0)}}var g={key:r,sheet:new up({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:u};return g.sheet.hydrate(a),g},Wo={exports:{}},$={};/** @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 X=typeof Symbol=="function"&&Symbol.for,Hn=X?Symbol.for("react.element"):60103,Un=X?Symbol.for("react.portal"):60106,fr=X?Symbol.for("react.fragment"):60107,dr=X?Symbol.for("react.strict_mode"):60108,hr=X?Symbol.for("react.profiler"):60114,pr=X?Symbol.for("react.provider"):60109,mr=X?Symbol.for("react.context"):60110,Gn=X?Symbol.for("react.async_mode"):60111,gr=X?Symbol.for("react.concurrent_mode"):60111,vr=X?Symbol.for("react.forward_ref"):60112,yr=X?Symbol.for("react.suspense"):60113,Np=X?Symbol.for("react.suspense_list"):60120,br=X?Symbol.for("react.memo"):60115,wr=X?Symbol.for("react.lazy"):60116,Fp=X?Symbol.for("react.block"):60121,jp=X?Symbol.for("react.fundamental"):60117,Ip=X?Symbol.for("react.responder"):60118,Wp=X?Symbol.for("react.scope"):60119;function oe(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Hn:switch(e=e.type,e){case Gn:case gr:case fr:case hr:case dr:case yr:return e;default:switch(e=e&&e.$$typeof,e){case mr:case vr:case wr:case br:case pr:return e;default:return t}}case Un:return t}}}function zo(e){return oe(e)===gr}$.AsyncMode=Gn,$.ConcurrentMode=gr,$.ContextConsumer=mr,$.ContextProvider=pr,$.Element=Hn,$.ForwardRef=vr,$.Fragment=fr,$.Lazy=wr,$.Memo=br,$.Portal=Un,$.Profiler=hr,$.StrictMode=dr,$.Suspense=yr,$.isAsyncMode=function(e){return zo(e)||oe(e)===Gn},$.isConcurrentMode=zo,$.isContextConsumer=function(e){return oe(e)===mr},$.isContextProvider=function(e){return oe(e)===pr},$.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Hn},$.isForwardRef=function(e){return oe(e)===vr},$.isFragment=function(e){return oe(e)===fr},$.isLazy=function(e){return oe(e)===wr},$.isMemo=function(e){return oe(e)===br},$.isPortal=function(e){return oe(e)===Un},$.isProfiler=function(e){return oe(e)===hr},$.isStrictMode=function(e){return oe(e)===dr},$.isSuspense=function(e){return oe(e)===yr},$.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fr||e===gr||e===hr||e===dr||e===yr||e===Np||typeof e=="object"&&e!==null&&(e.$$typeof===wr||e.$$typeof===br||e.$$typeof===pr||e.$$typeof===mr||e.$$typeof===vr||e.$$typeof===jp||e.$$typeof===Ip||e.$$typeof===Wp||e.$$typeof===Fp)},$.typeOf=oe,function(e){e.exports=$}(Wo);var Bo=Wo.exports,zp={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Bp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},$o={};$o[Bo.ForwardRef]=zp,$o[Bo.Memo]=Bp;var $p=!0;function Yn(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):n+=i+" "}),n}var Ho=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||$p===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},Uo=function(t,r,n){Ho(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 Hp(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 Up={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Gp=/[A-Z]|^ms/g,Yp=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Go=function(t){return t.charCodeAt(1)===45},Yo=function(t){return t!=null&&typeof t!="boolean"},Vn=xp(function(e){return Go(e)?e:e.replace(Gp,"-$&").toLowerCase()}),Vo=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Yp,function(n,i,s){return _e={name:i,styles:s,next:_e},i})}return Up[t]!==1&&!Go(t)&&typeof r=="number"&&r!==0?r+"px":r},hy="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function xt(e,t,r){if(r==null)return"";if(r.__emotion_styles!==void 0)return r;switch(typeof r){case"boolean":return"";case"object":{if(r.anim===1)return _e={name:r.name,styles:r.styles,next:_e},r.name;if(r.styles!==void 0){var n=r.next;if(n!==void 0)for(;n!==void 0;)_e={name:n.name,styles:n.styles,next:_e},n=n.next;var i=r.styles+";";return i}return Vp(e,t,r)}case"function":{if(e!==void 0){var s=_e,o=r(e);return _e=s,xt(e,t,o)}break}}if(t==null)return r;var a=t[r];return a!==void 0?a:r}function Vp(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=xt(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]+"}":Yo(o)&&(n+=Vn(s)+":"+Vo(s,o)+";");else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var a=0;a<o.length;a++)Yo(o[a])&&(n+=Vn(s)+":"+Vo(s,o[a])+";");else{var u=xt(e,t,o);switch(s){case"animation":case"animationName":{n+=Vn(s)+":"+u+";";break}default:n+=s+"{"+u+"}"}}}return n}var Ko=/label:\s*([^\s;\n{]+)\s*(;|$)/g,_e,Ot=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+=xt(n,r,o)):s+=o[0];for(var a=1;a<t.length;a++)s+=xt(n,r,t[a]),i&&(s+=o[a]);Ko.lastIndex=0;for(var u="",c;(c=Ko.exec(s))!==null;)u+="-"+c[1];var l=Hp(s)+u;return{name:l,styles:s,next:_e}},Kp=function(t){return t()},Xp=$i["useInsertionEffect"]?$i["useInsertionEffect"]:!1,Jp=Xp||Kp,_r={}.hasOwnProperty,Xo=p.createContext(typeof HTMLElement<"u"?Io({key:"css"}):null);Xo.Provider;var Zp=function(t){return p.forwardRef(function(r,n){var i=p.useContext(Xo);return t(r,i,n)})},Qp=p.createContext({}),Kn="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Jo=function(t,r){var n={};for(var i in r)_r.call(r,i)&&(n[i]=r[i]);return n[Kn]=t,n},qp=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return Ho(r,n,i),Jp(function(){return Uo(r,n,i)}),null},Zo=Zp(function(e,t,r){var n=e.css;typeof n=="string"&&t.registered[n]!==void 0&&(n=t.registered[n]);var i=e[Kn],s=[n],o="";typeof e.className=="string"?o=Yn(t.registered,s,e.className):e.className!=null&&(o=e.className+" ");var a=Ot(s,void 0,p.useContext(Qp));o+=t.key+"-"+a.name;var u={};for(var c in e)_r.call(e,c)&&c!=="css"&&c!==Kn&&(u[c]=e[c]);return u.ref=r,u.className=o,p.createElement(p.Fragment,null,p.createElement(qp,{cache:t,serialized:a,isStringTag:typeof i=="string"}),p.createElement(i,u))}),Sr={exports:{}},Cr={};/**
 * @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 em=ue.default,tm=Symbol.for("react.element"),rm=Symbol.for("react.fragment"),nm=Object.prototype.hasOwnProperty,im=em.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,sm={key:!0,ref:!0,__self:!0,__source:!0};function Qo(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)nm.call(t,n)&&!sm.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:tm,type:e,key:s,ref:o,props:i,_owner:im.current}}Cr.Fragment=rm,Cr.jsx=Qo,Cr.jsxs=Qo,function(e){e.exports=Cr}(Sr);const om=Sr.exports.Fragment,qo=Sr.exports.jsx,ea=Sr.exports.jsxs;var We=om;function h(e,t,r){return _r.call(t,"css")?qo(Zo,Jo(e,t),r):qo(e,t,r)}function L(e,t,r){return _r.call(t,"css")?ea(Zo,Jo(e,t),r):ea(e,t,r)}const am={Close:So,Config:Co,DistraughtFace:ko,Return:To,Loading:xo,LoadingThree:Eo};function At({name:e,theme:t,size:r,fill:n,...i}){t||(t="outline"),r||(r=24);const s=xn();n||(n=s?"#fff":"#333");const o=am[e];return h(o,{theme:t,size:r,fill:n,...i,style:{fontSize:0,...i.style}})}var ta={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 a=r.apply(null,s);a&&n.push(a)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){n.push(s.toString());continue}for(var u in s)t.call(s,u)&&s[u]&&n.push(u)}}}return n.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ta);const J=ta.exports;function at(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Ot(t)}function ra(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function na(e,t,r){var n=[],i=Yn(e,n,r);return n.length<2?r:i+t(n)}var cm=function(t){var r=Io(t);r.sheet.speedy=function(a){this.isSpeedy=a},r.compat=!0;var n=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Ot(c,r.registered,void 0);return Uo(r,f,!1),r.key+"-"+f.name},i=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Ot(c,r.registered),d="animation-"+f.name;return ra(r,{name:f.name,styles:"@keyframes "+d+"{"+f.styles+"}"}),d},s=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];var f=Ot(c,r.registered);ra(r,f)},o=function(){for(var u=arguments.length,c=new Array(u),l=0;l<u;l++)c[l]=arguments[l];return na(r.registered,n,um(c))};return{css:n,cx:o,injectGlobal:s,keyframes:i,hydrate:function(u){u.forEach(function(c){r.inserted[c]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:Yn.bind(null,r.registered),merge:na.bind(null,r.registered,n)}},um=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},lm=cm({key:"css"}),Xn=lm.css,fm=function(t){return function(r,n){var i=p.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return r()},n)}},ct=function(t){return typeof t=="function"},dm=function(t){return typeof t=="string"},ia=function(t){return typeof t=="number"},hm=!1;const Jn=hm;function H(e){Jn&&(ct(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=p.useRef(e);t.current=p.useMemo(function(){return e},[e]);var r=p.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 Zn=fm(p.useEffect);var sa=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},oa=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))},aa=function(t,r){var n=r.manual,i=r.ready,s=i===void 0?!0:i,o=r.defaultParams,a=o===void 0?[]:o,u=r.refreshDeps,c=u===void 0?[]:u,l=r.refreshDepsAction,f=p.useRef(!1);return f.current=!1,Zn(function(){!n&&s&&(f.current=!0,t.run.apply(t,oa([],sa(a),!1)))},[s]),Zn(function(){f.current||n||(f.current=!0,l?l():t.refresh())},oa([],sa(c),!1)),{onBefore:function(){if(!s)return{stopNow:!0}}}};aa.onInit=function(e){var t=e.ready,r=t===void 0?!0:t,n=e.manual;return{loading:!n&&r}};const pm=aa;function Qn(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 ca(e,t){var r=p.useRef({deps:t,obj:void 0,initialized:!1}).current;return(r.initialized===!1||!Qn(r.deps,t))&&(r.deps=t,r.obj=e(),r.initialized=!0),r.obj}function Lt(e){var t=p.useRef(e);return t.current=e,t}var mm=function(t){Jn&&(ct(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var r=Lt(t);p.useEffect(function(){return function(){r.current()}},[])};const Mt=mm;var kr=globalThis&&globalThis.__assign||function(){return kr=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},kr.apply(this,arguments)},Tr=new Map,gm=function(t,r,n){var i=Tr.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;r>-1&&(s=setTimeout(function(){Tr.delete(t)},r)),Tr.set(t,kr(kr({},n),{timer:s}))},vm=function(t){return Tr.get(t)},Er=new Map,ym=function(t){return Er.get(t)},bm=function(t,r){Er.set(t,r),r.then(function(n){return Er.delete(t),n}).catch(function(){Er.delete(t)})},Ke={},wm=function(t,r){Ke[t]&&Ke[t].forEach(function(n){return n(r)})},qn=function(t,r){return Ke[t]||(Ke[t]=[]),Ke[t].push(r),function(){var i=Ke[t].indexOf(r);Ke[t].splice(i,1)}},_m=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Sm=globalThis&&globalThis.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,s;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))},Cm=function(t,r){var n=r.cacheKey,i=r.cacheTime,s=i===void 0?5*60*1e3:i,o=r.staleTime,a=o===void 0?0:o,u=r.setCache,c=r.getCache,l=p.useRef(),f=p.useRef(),d=function(y,v){u?u(v):gm(y,s,v),wm(y,v.data)},m=function(y,v){return v===void 0&&(v=[]),c?c(v):vm(y)};return ca(function(){if(!!n){var g=m(n);g&&Object.hasOwnProperty.call(g,"data")&&(t.state.data=g.data,t.state.params=g.params,(a===-1||new Date().getTime()-g.time<=a)&&(t.state.loading=!1)),l.current=qn(n,function(y){t.setState({data:y})})}},[]),Mt(function(){var g;(g=l.current)===null||g===void 0||g.call(l)}),n?{onBefore:function(y){var v=m(n,y);return!v||!Object.hasOwnProperty.call(v,"data")?{}:a===-1||new Date().getTime()-v.time<=a?{loading:!1,data:v==null?void 0:v.data,error:void 0,returnNow:!0}:{data:v==null?void 0:v.data,error:void 0}},onRequest:function(y,v){var _=ym(n);return _&&_!==f.current?{servicePromise:_}:(_=y.apply(void 0,Sm([],_m(v),!1)),f.current=_,bm(n,_),{servicePromise:_})},onSuccess:function(y,v){var _;n&&((_=l.current)===null||_===void 0||_.call(l),d(n,{data:y,params:v,time:new Date().getTime()}),l.current=qn(n,function(M){t.setState({data:M})}))},onMutate:function(y){var v;n&&((v=l.current)===null||v===void 0||v.call(l),d(n,{data:y,params:t.state.params,time:new Date().getTime()}),l.current=qn(n,function(_){t.setState({data:_})}))}}:{}};const km=Cm;var Tm=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Em=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))},xm=function(t,r){var n=r.debounceWait,i=r.debounceLeading,s=r.debounceTrailing,o=r.debounceMaxWait,a=p.useRef(),u=p.useMemo(function(){var c={};return i!==void 0&&(c.leading=i),s!==void 0&&(c.trailing=s),o!==void 0&&(c.maxWait=o),c},[i,s,o]);return p.useEffect(function(){if(n){var c=t.runAsync.bind(t);return a.current=Ds(function(l){l()},n,u),t.runAsync=function(){for(var l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];return new Promise(function(d,m){var g;(g=a.current)===null||g===void 0||g.call(a,function(){c.apply(void 0,Em([],Tm(l),!1)).then(d).catch(m)})})},function(){var l;(l=a.current)===null||l===void 0||l.cancel(),t.runAsync=c}}},[n,u]),n?{onCancel:function(){var l;(l=a.current)===null||l===void 0||l.cancel()}}:{}};const Om=xm;var Am=function(t,r){var n=r.loadingDelay,i=p.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 Lm=Am;var Mm=!!(typeof window<"u"&&window.document&&window.document.createElement);const Pt=Mm;function ei(){return Pt?document.visibilityState!=="hidden":!0}var Rt=[];function Pm(e){return Rt.push(e),function(){var r=Rt.indexOf(e);Rt.splice(r,1)}}if(Pt){var Rm=function(){if(!!ei())for(var t=0;t<Rt.length;t++){var r=Rt[t];r()}};window.addEventListener("visibilitychange",Rm,!1)}var Dm=function(t,r){var n=r.pollingInterval,i=r.pollingWhenHidden,s=i===void 0?!0:i,o=r.pollingErrorRetryCount,a=o===void 0?-1:o,u=p.useRef(),c=p.useRef(),l=p.useRef(0),f=function(){var m;u.current&&clearTimeout(u.current),(m=c.current)===null||m===void 0||m.call(c)};return Zn(function(){n||f()},[n]),n?{onBefore:function(){f()},onError:function(){l.current+=1},onSuccess:function(){l.current=0},onFinally:function(){a===-1||a!==-1&&l.current<=a?u.current=setTimeout(function(){!s&&!ei()?c.current=Pm(function(){t.refresh()}):t.refresh()},n):l.current=0},onCancel:function(){f()}}:{}};const Nm=Dm;var Fm=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},jm=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 Im(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,jm([],Fm(n),!1)),setTimeout(function(){r=!1},t))}}function Wm(){return Pt&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Dt=[];function zm(e){return Dt.push(e),function(){var r=Dt.indexOf(e);r>-1&&Dt.splice(r,1)}}if(Pt){var ua=function(){if(!(!ei()||!Wm()))for(var t=0;t<Dt.length;t++){var r=Dt[t];r()}};window.addEventListener("visibilitychange",ua,!1),window.addEventListener("focus",ua,!1)}var Bm=function(t,r){var n=r.refreshOnWindowFocus,i=r.focusTimespan,s=i===void 0?5e3:i,o=p.useRef(),a=function(){var c;(c=o.current)===null||c===void 0||c.call(o)};return p.useEffect(function(){if(n){var u=Im(t.refresh.bind(t),s);o.current=zm(function(){u()})}return function(){a()}},[n,s]),Mt(function(){a()}),{}};const $m=Bm;var Hm=function(t,r){var n=r.retryInterval,i=r.retryCount,s=p.useRef(),o=p.useRef(0),a=p.useRef(!1);return i?{onBefore:function(){a.current||(o.current=0),a.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,i===-1||o.current<=i){var c=n!=null?n:Math.min(1e3*Math.pow(2,o.current),3e4);s.current=setTimeout(function(){a.current=!0,t.refresh()},c)}else o.current=0},onCancel:function(){o.current=0,s.current&&clearTimeout(s.current)}}:{}};const Um=Hm;var Gm=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Ym=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))},Vm=function(t,r){var n=r.throttleWait,i=r.throttleLeading,s=r.throttleTrailing,o=p.useRef(),a={};return i!==void 0&&(a.leading=i),s!==void 0&&(a.trailing=s),p.useEffect(function(){if(n){var u=t.runAsync.bind(t);return o.current=uh(function(c){c()},n,a),t.runAsync=function(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];return new Promise(function(f,d){var m;(m=o.current)===null||m===void 0||m.call(o,function(){u.apply(void 0,Ym([],Gm(c),!1)).then(f).catch(d)})})},function(){var c;t.runAsync=u,(c=o.current)===null||c===void 0||c.cancel()}}},[n,i,s]),n?{onCancel:function(){var c;(c=o.current)===null||c===void 0||c.cancel()}}:{}};const Km=Vm;var Xm=function(t){Jn&&(ct(t)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t,'".'))),p.useEffect(function(){t==null||t()},[])};const Jm=Xm;var Zm=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},Qm=function(){var t=Zm(p.useState({}),2),r=t[1];return p.useCallback(function(){return r({})},[])};const qm=Qm;var ze=globalThis&&globalThis.__assign||function(){return ze=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ze.apply(this,arguments)},eg=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 a(l){try{c(n.next(l))}catch(f){o(f)}}function u(l){try{c(n.throw(l))}catch(f){o(f)}}function c(l){l.done?s(l.value):i(l.value).then(a,u)}c((n=n.apply(e,t||[])).next())})},tg=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:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=c[0]&2?i.return:c[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,c[1])).done)return s;switch(i=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){r.label=c[1];break}if(c[0]===6&&r.label<s[1]){r.label=s[1],s=c;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(c);break}s[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],i=0}finally{n=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},rg=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},ut=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},lt=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))},ng=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=ze(ze(ze({},this.state),{loading:!r.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=ze(ze({},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,lt([s],ut(r),!1))}).filter(Boolean);return Object.assign.apply(Object,lt([{}],ut(i),!1))},e.prototype.runAsync=function(){for(var t,r,n,i,s,o,a,u,c,l,f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];return eg(this,void 0,void 0,function(){var m,g,y,v,_,M,A,x,w,b,k;return tg(this,function(N){switch(N.label){case 0:if(this.count+=1,m=this.count,g=this.runPluginHandler("onBefore",f),y=g.stopNow,v=y===void 0?!1:y,_=g.returnNow,M=_===void 0?!1:_,A=rg(g,["stopNow","returnNow"]),v)return[2,new Promise(function(){})];if(this.setState(ze({loading:!0,params:f},A)),M)return[2,Promise.resolve(A.data)];(r=(t=this.options).onBefore)===null||r===void 0||r.call(t,f),N.label=1;case 1:return N.trys.push([1,3,,4]),x=this.runPluginHandler("onRequest",this.serviceRef.current,f).servicePromise,x||(x=(k=this.serviceRef).current.apply(k,lt([],ut(f),!1))),[4,x];case 2:return w=N.sent(),m!==this.count?[2,new Promise(function(){})]:(this.setState({data:w,error:void 0,loading:!1}),(i=(n=this.options).onSuccess)===null||i===void 0||i.call(n,w,f),this.runPluginHandler("onSuccess",w,f),(o=(s=this.options).onFinally)===null||o===void 0||o.call(s,f,w,void 0),m===this.count&&this.runPluginHandler("onFinally",f,w,void 0),[2,w]);case 3:if(b=N.sent(),m!==this.count)return[2,new Promise(function(){})];throw this.setState({error:b,loading:!1}),(u=(a=this.options).onError)===null||u===void 0||u.call(a,b,f),this.runPluginHandler("onError",b,f),(l=(c=this.options).onFinally)===null||l===void 0||l.call(c,f,void 0,b),m===this.count&&this.runPluginHandler("onFinally",f,void 0,b),b;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,lt([],ut(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,lt([],ut(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,lt([],ut(this.state.params||[]),!1))},e.prototype.mutate=function(t){var r=ct(t)?t(this.state.data):t;this.runPluginHandler("onMutate",r),this.setState({data:r})},e}();const ig=ng;var ti=globalThis&&globalThis.__assign||function(){return ti=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},ti.apply(this,arguments)},sg=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},la=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},fa=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 og(e,t,r){t===void 0&&(t={}),r===void 0&&(r=[]);var n=t.manual,i=n===void 0?!1:n,s=sg(t,["manual"]),o=ti({manual:i},s),a=Lt(e),u=qm(),c=ca(function(){var l=r.map(function(f){var d;return(d=f==null?void 0:f.onInit)===null||d===void 0?void 0:d.call(f,o)}).filter(Boolean);return new ig(a,o,u,Object.assign.apply(Object,fa([{}],la(l),!1)))},[]);return c.options=o,c.pluginImpls=r.map(function(l){return l(c,o)}),Jm(function(){if(!i){var l=c.state.params||t.defaultParams||[];c.run.apply(c,fa([],la(l),!1))}}),Mt(function(){c.cancel()}),{loading:c.state.loading,data:c.state.data,error:c.state.error,params:c.state.params||[],cancel:H(c.cancel.bind(c)),refresh:H(c.refresh.bind(c)),refreshAsync:H(c.refreshAsync.bind(c)),run:H(c.run.bind(c)),runAsync:H(c.runAsync.bind(c)),mutate:H(c.mutate.bind(c))}}var ag=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},da=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 ha(e,t,r){return og(e,t,da(da([],ag(r||[]),!1),[Om,Lm,Nm,$m,Km,pm,km,Um],!1))}var cg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function pa(e,t){e===void 0&&(e=!1);var r=cg(p.useState(e),2),n=r[0],i=r[1],s=p.useMemo(function(){var o=t===void 0?!e:t,a=function(){return i(function(d){return d===e?o:e})},u=function(d){return i(d)},c=function(){return i(e)},l=function(){return i(o)};return{toggle:a,set:u,setLeft:c,setRight:l}},[]);return[n,s]}var ug=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function lg(e){e===void 0&&(e=!1);var t=ug(pa(e),2),r=t[0],n=t[1],i=n.toggle,s=n.set,o=p.useMemo(function(){var a=function(){return s(!0)},u=function(){return s(!1)};return{toggle:i,set:function(l){return s(!!l)},setTrue:a,setFalse:u}},[]);return[r,o]}function xr(e,t){if(!!Pt){if(!e)return t;var r;return ct(e)?r=e():"current"in e?r=e.current:r=e,r}}var fg=function(t){var r=function(i,s,o){var a=p.useRef(!1),u=p.useRef([]),c=p.useRef([]),l=p.useRef();t(function(){var f,d=Array.isArray(o)?o:[o],m=d.map(function(g){return xr(g)});if(!a.current){a.current=!0,u.current=m,c.current=s,l.current=i();return}(m.length!==u.current.length||!Qn(m,u.current)||!Qn(s,c.current))&&((f=l.current)===null||f===void 0||f.call(l),u.current=m,c.current=s,l.current=i())}),Mt(function(){var f;(f=l.current)===null||f===void 0||f.call(l),a.current=!1})};return r},dg=fg(p.useEffect);const ma=dg;var ga={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(hh,function(){var r=1e3,n=6e4,i=36e5,s="millisecond",o="second",a="minute",u="hour",c="day",l="week",f="month",d="quarter",m="year",g="date",y="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,_=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(O){var C=["th","st","nd","rd"],S=O%100;return"["+O+(C[(S-20)%10]||C[S]||C[0])+"]"}},A=function(O,C,S){var P=String(O);return!P||P.length>=C?O:""+Array(C+1-P.length).join(S)+O},x={s:A,z:function(O){var C=-O.utcOffset(),S=Math.abs(C),P=Math.floor(S/60),T=S%60;return(C<=0?"+":"-")+A(P,2,"0")+":"+A(T,2,"0")},m:function O(C,S){if(C.date()<S.date())return-O(S,C);var P=12*(S.year()-C.year())+(S.month()-C.month()),T=C.clone().add(P,f),R=S-T<0,D=C.clone().add(P+(R?-1:1),f);return+(-(P+(S-T)/(R?T-D:D-T))||0)},a:function(O){return O<0?Math.ceil(O)||0:Math.floor(O)},p:function(O){return{M:f,y:m,w:l,d:c,D:g,h:u,m:a,s:o,ms:s,Q:d}[O]||String(O||"").toLowerCase().replace(/s$/,"")},u:function(O){return O===void 0}},w="en",b={};b[w]=M;var k=function(O){return O instanceof F},N=function O(C,S,P){var T;if(!C)return w;if(typeof C=="string"){var R=C.toLowerCase();b[R]&&(T=R),S&&(b[R]=S,T=R);var D=C.split("-");if(!T&&D.length>1)return O(D[0])}else{var W=C.name;b[W]=C,T=W}return!P&&T&&(w=T),T||!P&&w},j=function(O,C){if(k(O))return O.clone();var S=typeof C=="object"?C:{};return S.date=O,S.args=arguments,new F(S)},E=x;E.l=N,E.i=k,E.w=function(O,C){return j(O,{locale:C.$L,utc:C.$u,x:C.$x,$offset:C.$offset})};var F=function(){function O(S){this.$L=N(S.locale,null,!0),this.parse(S)}var C=O.prototype;return C.parse=function(S){this.$d=function(P){var T=P.date,R=P.utc;if(T===null)return new Date(NaN);if(E.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var D=T.match(v);if(D){var W=D[2]-1||0,Y=(D[7]||"0").substring(0,3);return R?new Date(Date.UTC(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,Y)):new Date(D[1],W,D[3]||1,D[4]||0,D[5]||0,D[6]||0,Y)}}return new Date(T)}(S),this.$x=S.x||{},this.init()},C.init=function(){var S=this.$d;this.$y=S.getFullYear(),this.$M=S.getMonth(),this.$D=S.getDate(),this.$W=S.getDay(),this.$H=S.getHours(),this.$m=S.getMinutes(),this.$s=S.getSeconds(),this.$ms=S.getMilliseconds()},C.$utils=function(){return E},C.isValid=function(){return this.$d.toString()!==y},C.isSame=function(S,P){var T=j(S);return this.startOf(P)<=T&&T<=this.endOf(P)},C.isAfter=function(S,P){return j(S)<this.startOf(P)},C.isBefore=function(S,P){return this.endOf(P)<j(S)},C.$g=function(S,P,T){return E.u(S)?this[P]:this.set(T,S)},C.unix=function(){return Math.floor(this.valueOf()/1e3)},C.valueOf=function(){return this.$d.getTime()},C.startOf=function(S,P){var T=this,R=!!E.u(P)||P,D=E.p(S),W=function($e,te){var xe=E.w(T.$u?Date.UTC(T.$y,te,$e):new Date(T.$y,te,$e),T);return R?xe:xe.endOf(c)},Y=function($e,te){return E.w(T.toDate()[$e].apply(T.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(te)),T)},G=this.$W,Q=this.$M,Ee=this.$D,pe="set"+(this.$u?"UTC":"");switch(D){case m:return R?W(1,0):W(31,11);case f:return R?W(1,Q):W(0,Q+1);case l:var De=this.$locale().weekStart||0,Ne=(G<De?G+7:G)-De;return W(R?Ee-Ne:Ee+(6-Ne),Q);case c:case g:return Y(pe+"Hours",0);case u:return Y(pe+"Minutes",1);case a:return Y(pe+"Seconds",2);case o:return Y(pe+"Milliseconds",3);default:return this.clone()}},C.endOf=function(S){return this.startOf(S,!1)},C.$set=function(S,P){var T,R=E.p(S),D="set"+(this.$u?"UTC":""),W=(T={},T[c]=D+"Date",T[g]=D+"Date",T[f]=D+"Month",T[m]=D+"FullYear",T[u]=D+"Hours",T[a]=D+"Minutes",T[o]=D+"Seconds",T[s]=D+"Milliseconds",T)[R],Y=R===c?this.$D+(P-this.$W):P;if(R===f||R===m){var G=this.clone().set(g,1);G.$d[W](Y),G.init(),this.$d=G.set(g,Math.min(this.$D,G.daysInMonth())).$d}else W&&this.$d[W](Y);return this.init(),this},C.set=function(S,P){return this.clone().$set(S,P)},C.get=function(S){return this[E.p(S)]()},C.add=function(S,P){var T,R=this;S=Number(S);var D=E.p(P),W=function(Q){var Ee=j(R);return E.w(Ee.date(Ee.date()+Math.round(Q*S)),R)};if(D===f)return this.set(f,this.$M+S);if(D===m)return this.set(m,this.$y+S);if(D===c)return W(1);if(D===l)return W(7);var Y=(T={},T[a]=n,T[u]=i,T[o]=r,T)[D]||1,G=this.$d.getTime()+S*Y;return E.w(G,this)},C.subtract=function(S,P){return this.add(-1*S,P)},C.format=function(S){var P=this,T=this.$locale();if(!this.isValid())return T.invalidDate||y;var R=S||"YYYY-MM-DDTHH:mm:ssZ",D=E.z(this),W=this.$H,Y=this.$m,G=this.$M,Q=T.weekdays,Ee=T.months,pe=function(te,xe,Ut,ce){return te&&(te[xe]||te(P,R))||Ut[xe].slice(0,ce)},De=function(te){return E.s(W%12||12,te,"0")},Ne=T.meridiem||function(te,xe,Ut){var ce=te<12?"AM":"PM";return Ut?ce.toLowerCase():ce},$e={YY:String(this.$y).slice(-2),YYYY:this.$y,M:G+1,MM:E.s(G+1,2,"0"),MMM:pe(T.monthsShort,G,Ee,3),MMMM:pe(Ee,G),D:this.$D,DD:E.s(this.$D,2,"0"),d:String(this.$W),dd:pe(T.weekdaysMin,this.$W,Q,2),ddd:pe(T.weekdaysShort,this.$W,Q,3),dddd:Q[this.$W],H:String(W),HH:E.s(W,2,"0"),h:De(1),hh:De(2),a:Ne(W,Y,!0),A:Ne(W,Y,!1),m:String(Y),mm:E.s(Y,2,"0"),s:String(this.$s),ss:E.s(this.$s,2,"0"),SSS:E.s(this.$ms,3,"0"),Z:D};return R.replace(_,function(te,xe){return xe||$e[te]||D.replace(":","")})},C.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},C.diff=function(S,P,T){var R,D=E.p(P),W=j(S),Y=(W.utcOffset()-this.utcOffset())*n,G=this-W,Q=E.m(this,W);return Q=(R={},R[m]=Q/12,R[f]=Q,R[d]=Q/3,R[l]=(G-Y)/6048e5,R[c]=(G-Y)/864e5,R[u]=G/i,R[a]=G/n,R[o]=G/r,R)[D]||G,T?Q:E.a(Q)},C.daysInMonth=function(){return this.endOf(f).$D},C.$locale=function(){return b[this.$L]},C.locale=function(S,P){if(!S)return this.$L;var T=this.clone(),R=N(S,P,!0);return R&&(T.$L=R),T},C.clone=function(){return E.w(this.$d,this)},C.toDate=function(){return new Date(this.valueOf())},C.toJSON=function(){return this.isValid()?this.toISOString():null},C.toISOString=function(){return this.$d.toISOString()},C.toString=function(){return this.$d.toUTCString()},O}(),I=F.prototype;return j.prototype=I,[["$ms",s],["$s",o],["$m",a],["$H",u],["$W",c],["$M",f],["$y",m],["$D",g]].forEach(function(O){I[O[1]]=function(C){return this.$g(C,O[0],O[1])}}),j.extend=function(O,C){return O.$i||(O(C,F,j),O.$i=!0),j},j.locale=N,j.isDayjs=k,j.unix=function(O){return j(1e3*O)},j.en=b[w],j.Ls=b,j.p={},j})})(ga);const va=ga.exports;function Or(e,t,r){r===void 0&&(r={});var n=Lt(t);ma(function(){var i=xr(r.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(a){return n.current(a)};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 hg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};const ri=function(e,t){var r=t||{},n=r.onEnter,i=r.onLeave,s=r.onChange,o=hg(lg(!1),2),a=o[0],u=o[1],c=u.setTrue,l=u.setFalse;return Or("mouseenter",function(){n==null||n(),c(),s==null||s(!0)},{target:e}),Or("mouseleave",function(){i==null||i(),l(),s==null||s(!1)},{target:e}),a};var pg=function(t,r){return r===void 0&&(r=[]),jd(t,r)},mg=function(t,r,n){var i=p.useRef(),s=p.useRef(0);pg(r,i.current)||(i.current=r,s.current+=1),ma(t,[s.current],n)};const gg=mg;var ni=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vg={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},ii={ctrl:function(t){return t.ctrlKey},shift:function(t){return t.shiftKey},alt:function(t){return t.altKey},meta:function(t){return t.metaKey}};function yg(e){var t=Object.keys(ii).reduce(function(r,n){return ii[n](e)?r+1:r},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function ya(e,t,r){var n,i;if(!e.key)return!1;if(ia(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var a=ni(s),u=a.next();!u.done;u=a.next()){var c=u.value,l=ii[c],f=vg[c.toLowerCase()];(l&&l(e)||f&&f===e.keyCode)&&o++}}catch(d){n={error:d}}finally{try{u&&!u.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r?o===s.length&&yg(e)===s.length:o===s.length}function bg(e,t){return ct(e)?e:dm(e)||ia(e)?function(r){return ya(r,e,t)}:Array.isArray(e)?function(r){return e.some(function(n){return ya(r,n,t)})}:e?function(){return!0}:function(){return!1}}var wg=["keydown"];function Me(e,t,r){var n=r||{},i=n.events,s=i===void 0?wg:i,o=n.target,a=n.exactMatch,u=a===void 0?!1:a,c=Lt(t),l=Lt(e);gg(function(){var f,d,m,g=xr(o,window);if(!!g){var y=function(x){var w,b=bg(l.current,u);if(b(x))return(w=c.current)===null||w===void 0?void 0:w.call(c,x)};try{for(var v=ni(s),_=v.next();!_.done;_=v.next()){var M=_.value;(m=g==null?void 0:g.addEventListener)===null||m===void 0||m.call(g,M,y)}}catch(A){f={error:A}}finally{try{_&&!_.done&&(d=v.return)&&d.call(v)}finally{if(f)throw f.error}}return function(){var A,x,w;try{for(var b=ni(s),k=b.next();!k.done;k=b.next()){var N=k.value;(w=g==null?void 0:g.removeEventListener)===null||w===void 0||w.call(g,N,y)}}catch(j){A={error:j}}finally{try{k&&!k.done&&(x=b.return)&&x.call(b)}finally{if(A)throw A.error}}}}},[s],o)}var _g=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s};function Sg(e){var t=p.useRef(0),r=_g(p.useState(e),2),n=r[0],i=r[1],s=p.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return Mt(function(){cancelAnimationFrame(t.current)}),[n,s]}var Cg=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return s},kg={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN};const Tg=function(e){var t=Cg(Sg(kg),2),r=t[0],n=t[1];return Or("mousemove",function(i){var s=i.screenX,o=i.screenY,a=i.clientX,u=i.clientY,c=i.pageX,l=i.pageY,f={screenX:s,screenY:o,clientX:a,clientY:u,pageX:c,pageY:l,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},d=xr(e);if(d){var m=d.getBoundingClientRect(),g=m.left,y=m.top,v=m.width,_=m.height;f.elementPosX=g+window.pageXOffset,f.elementPosY=y+window.pageYOffset,f.elementX=c-f.elementPosX,f.elementY=l-f.elementPosY,f.elementW=v,f.elementH=_}n(f)},{target:function(){return document}}),r},de={modalMask:"_modal-mask_1fjgs_1",modal:"_modal_1fjgs_1",modalHeader:"_modal-header_1fjgs_23",modalBody:"_modal-body_1fjgs_30",modalTitle:"_modal-title_1fjgs_35",btnClose:"_btn-close_1fjgs_42"};let Nt=0;const Eg=()=>{Nt++,document.body.style.overflow="hidden"},xg=()=>{Nt--,Nt<0&&(Nt=0),Nt===0&&(document.body.style.overflow="overlay")};function si({show:e,onHide:t,children:r,clsModalMask:n,clsModal:i,hideWhenMaskOnClick:s=!1,hideWhenEsc:o=!1}){p.useLayoutEffect(()=>{e?Eg():xg()},[e]);const a=p.useRef(null),u=xn(),{bg:c,c:l}=p.useMemo(()=>{const y=window.getComputedStyle(document.body)["background-color"],v=window.getComputedStyle(document.body).color;return{bg:y,c:v}},[u]),f=p.useMemo(()=>u?{"--bg":c,"--c":l,backgroundColor:c,color:l}:{},[c,l,u]),d=p.useId(),m=p.useMemo(()=>{const y=document.createElement("div");return y.setAttribute("data-id","base-modal-"+d),document.body.appendChild(y),y},[]),g=H(y=>{var v;(v=a.current)!=null&&v.contains(y.target)||s&&t()});return Me("esc",()=>{!e||o&&t()}),e?me.createPortal(h("div",{className:J(de.modalMask,n),onClick:g,children:h("div",{className:J(de.modal,i),style:f,ref:a,children:r})}),m):null}const oi=e=>h(At,{...e,name:"Close",size:18,style:{cursor:"pointer",marginLeft:10,...e.style}});var ft=1e3,dt=ft*60,ht=dt*60,Xe=ht*24,Og=Xe*7,Ag=Xe*365.25,Lg=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return Mg(e);if(r==="number"&&isFinite(e))return t.long?Rg(e):Pg(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function Mg(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!!t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Ag;case"weeks":case"week":case"w":return r*Og;case"days":case"day":case"d":return r*Xe;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ht;case"minutes":case"minute":case"mins":case"min":case"m":return r*dt;case"seconds":case"second":case"secs":case"sec":case"s":return r*ft;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Pg(e){var t=Math.abs(e);return t>=Xe?Math.round(e/Xe)+"d":t>=ht?Math.round(e/ht)+"h":t>=dt?Math.round(e/dt)+"m":t>=ft?Math.round(e/ft)+"s":e+"ms"}function Rg(e){var t=Math.abs(e);return t>=Xe?Ar(e,t,Xe,"day"):t>=ht?Ar(e,t,ht,"hour"):t>=dt?Ar(e,t,dt,"minute"):t>=ft?Ar(e,t,ft,"second"):e+" ms"}function Ar(e,t,r,n){var i=t>=r*1.5;return Math.round(e/r)+" "+n+(i?"s":"")}const ba="_toast-container_mcbuq_1",wa="_single-line_mcbuq_17",_y={toastContainer:ba,singleLine:wa};function ae(e,t=2e3){let r=typeof t=="number"?t:Lg(t);const n=document.createElement("div");n.className=ba,n.innerText=e,!e.includes(`
`)&&!e.includes("<br")&&n.classList.add(wa),document.body.appendChild(n),setTimeout(()=>n.remove(),r)}const Dg="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",Ng="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function _a(){return ae(Dg)}function Sa(){return ae(Ng)}function Fg(e){const t=rt({data:Array.from(e||[]),has(r){return this.data.some(n=>n[0]===r)},set(r,n){const i=this.data.find(s=>s[0]===r);return i?i[1]=n:this.data.push([r,n]),this},get(r){var n;return(n=this.data.find(i=>i[0]===r))==null?void 0:n[1]},delete(r){const n=this.data.findIndex(i=>i[0]===r);return n===-1?!1:(this.data.splice(n,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return new Map(this.data)},forEach(r){this.data.forEach(n=>{r(n[1],n[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(t,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(t),t}const jg="https://api.bilibili.com",Ca="https://app.bilibili.com",ai=Kr.default.create({baseURL:jg});ai.interceptors.request.use(function(e){var t;return(t=e.params)!=null&&t._||(e.params={...e.params,_:Date.now()}),e},function(e){return Promise.reject(e)});const Lr=Kr.default.create({adapter:cc.default});Lr.interceptors.request.use(function(e){return e.params={access_key:fe.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),Lr.interceptors.response.use(e=>{if(e.config.responseType==="json"&&e.data&&e.data instanceof ArrayBuffer){const t=new TextDecoder,r=new Uint8Array(e.data),n=t.decode(r);e.data=n;try{e.data=JSON.parse(n)}catch{}}return e});function Ig(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw ae("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55"),new Error("\u627E\u4E0D\u5230 csrf token, \u8BF7\u68C0\u67E5\u662F\u5426\u767B\u5F55");return e}const Ft=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Mr=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new ka}abort(){this.signal.dispatchEvent("abort")}},Wg=typeof AbortSignal=="function",zg=typeof Mr.AbortSignal=="function",ka=Wg?AbortSignal:zg?Mr.AbortController:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(t){if(t==="abort"){this.aborted=!0;const r={type:t,target:this};this.onabort(r),this._listeners.forEach(n=>n(r),this)}}onabort(){}addEventListener(t,r){t==="abort"&&this._listeners.push(r)}removeEventListener(t,r){t==="abort"&&(this._listeners=this._listeners.filter(n=>n!==r))}},ci=new Set,ui=(e,t)=>{const r=`LRU_CACHE_OPTION_${e}`;Pr(r)&&fi(r,`${e} option`,`options.${t}`,Je)},li=(e,t)=>{const r=`LRU_CACHE_METHOD_${e}`;if(Pr(r)){const{prototype:n}=Je,{get:i}=Object.getOwnPropertyDescriptor(n,e);fi(r,`${e} method`,`cache.${t}()`,i)}},Bg=(e,t)=>{const r=`LRU_CACHE_PROPERTY_${e}`;if(Pr(r)){const{prototype:n}=Je,{get:i}=Object.getOwnPropertyDescriptor(n,e);fi(r,`${e} property`,`cache.${t}`,i)}},Ta=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},Pr=e=>!ci.has(e),fi=(e,t,r,n)=>{ci.add(e);const i=`The ${t} is deprecated. Please use ${r} instead.`;Ta(i,"DeprecationWarning",e,n)},Be=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Ea=e=>Be(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?Rr:null:null;class Rr extends Array{constructor(t){super(t),this.fill(0)}}class $g{constructor(t){if(t===0)return[];const r=Ea(t);this.heap=new r(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class Je{constructor(t={}){const{max:r=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:u,dispose:c,disposeAfter:l,noDisposeOnSet:f,noUpdateTTL:d,maxSize:m=0,maxEntrySize:g=0,sizeCalculation:y,fetchMethod:v,fetchContext:_,noDeleteOnFetchRejection:M,noDeleteOnStaleGet:A}=t,{length:x,maxAge:w,stale:b}=t instanceof Je?{}:t;if(r!==0&&!Be(r))throw new TypeError("max option must be a nonnegative integer");const k=r?Ea(r):Array;if(!k)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=m,this.maxEntrySize=g||this.maxSize,this.sizeCalculation=y||x,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=v||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=_,!this.fetchMethod&&_!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new k(r),this.prev=new k(r),this.head=0,this.tail=0,this.free=new $g(r),this.initialFill=1,this.size=0,typeof c=="function"&&(this.dispose=c),typeof l=="function"?(this.disposeAfter=l,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!d,this.noDeleteOnFetchRejection=!!M,this.maxEntrySize!==0){if(this.maxSize!==0&&!Be(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!Be(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!b,this.noDeleteOnStaleGet=!!A,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Be(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||w||0,this.ttl){if(!Be(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const N="LRU_CACHE_UNBOUNDED";Pr(N)&&(ci.add(N),Ta("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",N,Je))}b&&ui("stale","allowStale"),w&&ui("maxAge","ttl"),x&&ui("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Rr(this.max),this.starts=new Rr(this.max),this.setItemTTL=(n,i,s=Ft.now())=>{if(this.starts[n]=i!==0?s:0,this.ttls[n]=i,i!==0&&this.ttlAutopurge){const o=setTimeout(()=>{this.isStale(n)&&this.delete(this.keyList[n])},i+1);o.unref&&o.unref()}},this.updateItemAge=n=>{this.starts[n]=this.ttls[n]!==0?Ft.now():0};let t=0;const r=()=>{const n=Ft.now();if(this.ttlResolution>0){t=n;const i=setTimeout(()=>t=0,this.ttlResolution);i.unref&&i.unref()}return n};this.getRemainingTTL=n=>{const i=this.keyMap.get(n);return i===void 0?0:this.ttls[i]===0||this.starts[i]===0?1/0:this.starts[i]+this.ttls[i]-(t||r())},this.isStale=n=>this.ttls[n]!==0&&this.starts[n]!==0&&(t||r())-this.starts[n]>this.ttls[n]}updateItemAge(t){}setItemTTL(t,r,n){}isStale(t){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Rr(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,r,n,i)=>{if(this.isBackgroundFetch(r))return 0;if(!Be(n))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(n=i(r,t),!Be(n))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return n},this.addItemSize=(t,r)=>{if(this.sizes[t]=r,this.maxSize){const n=this.maxSize-this.sizes[t];for(;this.calculatedSize>n;)this.evict(!0)}this.calculatedSize+=this.sizes[t]}}removeItemSize(t){}addItemSize(t,r){}requireSize(t,r,n,i){if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:t=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((t||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(t){return this.keyMap.get(this.keyList[t])===t}*entries(){for(const t of this.indexes())yield[this.keyList[t],this.valList[t]]}*rentries(){for(const t of this.rindexes())yield[this.keyList[t],this.valList[t]]}*keys(){for(const t of this.indexes())yield this.keyList[t]}*rkeys(){for(const t of this.rindexes())yield this.keyList[t]}*values(){for(const t of this.indexes())yield this.valList[t]}*rvalues(){for(const t of this.rindexes())yield this.valList[t]}[Symbol.iterator](){return this.entries()}find(t,r={}){for(const n of this.indexes())if(t(this.valList[n],this.keyList[n],this))return this.get(this.keyList[n],r)}forEach(t,r=this){for(const n of this.indexes())t.call(r,this.valList[n],this.keyList[n],this)}rforEach(t,r=this){for(const n of this.rindexes())t.call(r,this.valList[n],this.keyList[n],this)}get prune(){return li("prune","purgeStale"),this.purgeStale}purgeStale(){let t=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),t=!0);return t}dump(){const t=[];for(const r of this.indexes({allowStale:!0})){const n=this.keyList[r],i=this.valList[r],o={value:this.isBackgroundFetch(i)?i.__staleWhileFetching:i};if(this.ttls){o.ttl=this.ttls[r];const a=Ft.now()-this.starts[r];o.start=Math.floor(Date.now()-a)}this.sizes&&(o.size=this.sizes[r]),t.unshift([n,o])}return t}load(t){this.clear();for(const[r,n]of t){if(n.start){const i=Date.now()-n.start;n.start=Ft.now()-i}this.set(r,n.value,n)}}dispose(t,r,n){}set(t,r,{ttl:n=this.ttl,start:i,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:a=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(o=this.requireSize(t,r,o,a),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(t),this;let c=this.size===0?void 0:this.keyMap.get(t);if(c===void 0)c=this.newIndex(),this.keyList[c]=t,this.valList[c]=r,this.keyMap.set(t,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,o),u=!1;else{const l=this.valList[c];r!==l&&(this.isBackgroundFetch(l)?l.__abortController.abort():s||(this.dispose(l,t,"set"),this.disposeAfter&&this.disposed.push([l,t,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,o)),this.moveToTail(c)}if(n!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,n,i),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const t=this.valList[this.head];return this.evict(!0),t}}evict(t){const r=this.head,n=this.keyList[r],i=this.valList[r];return this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,n,"evict"),this.disposeAfter&&this.disposed.push([i,n,"evict"])),this.removeItemSize(r),t&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(n),this.size--,r}has(t,{updateAgeOnHas:r=this.updateAgeOnHas}={}){const n=this.keyMap.get(t);return n!==void 0&&!this.isStale(n)?(r&&this.updateItemAge(n),!0):!1}peek(t,{allowStale:r=this.allowStale}={}){const n=this.keyMap.get(t);if(n!==void 0&&(r||!this.isStale(n))){const i=this.valList[n];return this.isBackgroundFetch(i)?i.__staleWhileFetching:i}}backgroundFetch(t,r,n,i){const s=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(s))return s;const o=new Mr,a={signal:o.signal,options:n,context:i},u=d=>(o.signal.aborted||this.set(t,d,a.options),d),c=d=>{if(this.valList[r]===f&&(!n.noDeleteOnFetchRejection||f.__staleWhileFetching===void 0?this.delete(t):this.valList[r]=f.__staleWhileFetching),f.__returned===f)throw d},l=d=>d(this.fetchMethod(t,s,a)),f=new Promise(l).then(u,c);return f.__abortController=o,f.__staleWhileFetching=s,f.__returned=null,r===void 0?(this.set(t,f,a.options),r=this.keyMap.get(t)):this.valList[r]=f,f}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,fetchContext:f=this.fetchContext,forceRefresh:d=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i});const m={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:u,noUpdateTTL:c,noDeleteOnFetchRejection:l};let g=this.keyMap.get(t);if(g===void 0){const y=this.backgroundFetch(t,g,m,f);return y.__returned=y}else{const y=this.valList[g];if(this.isBackgroundFetch(y))return r&&y.__staleWhileFetching!==void 0?y.__staleWhileFetching:y.__returned=y;if(!d&&!this.isStale(g))return this.moveToTail(g),n&&this.updateItemAge(g),y;const v=this.backgroundFetch(t,g,m,f);return r&&v.__staleWhileFetching!==void 0?v.__staleWhileFetching:v.__returned=v}}get(t,{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet}={}){const s=this.keyMap.get(t);if(s!==void 0){const o=this.valList[s],a=this.isBackgroundFetch(o);return this.isStale(s)?a?r?o.__staleWhileFetching:void 0:(i||this.delete(t),r?o:void 0):a?void 0:(this.moveToTail(s),n&&this.updateItemAge(s),o)}}connect(t,r){this.prev[r]=t,this.next[t]=r}moveToTail(t){t!==this.tail&&(t===this.head?this.head=this.next[t]:this.connect(this.prev[t],this.next[t]),this.connect(this.tail,t),this.tail=t)}get del(){return li("del","delete"),this.delete}delete(t){let r=!1;if(this.size!==0){const n=this.keyMap.get(t);if(n!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(n);const i=this.valList[n];this.isBackgroundFetch(i)?i.__abortController.abort():(this.dispose(i,t,"delete"),this.disposeAfter&&this.disposed.push([i,t,"delete"])),this.keyMap.delete(t),this.keyList[n]=null,this.valList[n]=null,n===this.tail?this.tail=this.prev[n]:n===this.head?this.head=this.next[n]:(this.next[this.prev[n]]=this.next[n],this.prev[this.next[n]]=this.prev[n]),this.size--,this.free.push(n)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const t of this.rindexes({allowStale:!0})){const r=this.valList[t];if(this.isBackgroundFetch(r))r.__abortController.abort();else{const n=this.keyList[t];this.dispose(r,n,"delete"),this.disposeAfter&&this.disposed.push([r,n,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return li("reset","clear"),this.clear}get length(){return Bg("length","size"),this.size}static get AbortController(){return Mr}static get AbortSignal(){return ka}}var Hg=Je;const Ug=Hg;async function Gg(e){return(await ai.get("/pvideo",{params:{aid:e}})).data.data}async function Yg(e){return[]}const di=new Ug({max:200});async function Vg(e){if(di.has(e))return di.get(e);const[t,r]=await Promise.all([Gg(e),Yg()]);return di.set(e,{pvideoData:t,dmData:r}),{pvideoData:t,dmData:r}}function xa(e){return async function(r){const n=new FormData;n.append("aid",r),n.append("csrf",Ig());const s=(await ai.post("/x/v2/history/toview/"+e,n,{withCredentials:!0})).data,o=(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0";return o||ae((s==null?void 0:s.message)||"\u51FA\u9519\u4E86"),o}}const Kg=xa("add"),Xg=xa("del"),Oa=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(r,n){var a;const s=(await Lr.get(Ca+t,{params:{goto:r.goto,id:r.param,mid:r.mid,rid:r.tid,tag_id:(a=r.tag)==null?void 0:a.tag_id,reason_id:n,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data;return(s==null?void 0:s.code)===0&&(s==null?void 0:s.message)==="0"}},Jg=Oa("dislike"),Zg=Oa("cancel"),Dr={modal:"_modal_pfmut_1",titleDesc:"_title-desc_pfmut_4",reasonList:"_reason-list_pfmut_8",reason:"_reason_pfmut_8"},hi=Fg();function Qg(){return nt(hi)}function qg(e){const t=Qg();if(!!e)return t.get(e)}function ev({show:e,onHide:t,item:r}){const[n,i]=p.useState(!1),s=H(async(a,u)=>{if(!r)return;let c=!1,l=null;try{i(!0),c=await Jg(r,a)}catch(f){l=f}finally{i(!1)}if(l)return console.error(l.stack||l),_a();c?ae("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Sa(),c&&(hi.set(r.param,{id:a,name:u}),t())}),o=p.useMemo(()=>{var a;return[...(a=r==null?void 0:r.dislike_reasons)!=null?a:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[r]);return L(si,{show:e,onHide:t,clsModal:Dr.modal,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[L("div",{className:de.modalHeader,children:[L("div",{className:de.modalTitle,children:["\u6211\u4E0D\u60F3\u770B",h("span",{className:Dr.titleDesc,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),h("div",{className:"space",style:{flex:1}}),h(oi,{onClick:t})]}),h("div",{className:de.modalBody,children:h("div",{className:Dr.reasonList,children:o.map(a=>h("button",{className:Dr.reason,"data-id":a.reason_id,onClick:()=>s(a.reason_id,a.reason_name),disabled:n,children:a.reason_name},a.reason_id))})})]})}const Nr={show:!1,onHide:La,item:null},Aa=rt({value:Nr.show}),tv=function(){return nt(Aa).value};function La(){Ma({show:!1,item:null})}function Ma(e){Object.assign(Nr,e),Aa.value=Nr.show,rv().render(h(ev,{...Nr,onHide:La}))}let pi;function rv(){if(!pi){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),pi=qt(e)}return pi}function Pa(e){Ma({show:!0,item:e})}function nv(e){if(!e)return"00:00";const t=Math.trunc(e/3600);e-=t*3600;const r=Math.trunc(e/60);e-=r*60;const i=[t,r,e];return i[0]===0&&i.shift(),i.map(o=>sh(o.toString(),2,"0")).join(":")}function mi(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}const Z={biliVideoCard:"_bili-video-card_1a93a_1",imageWrapper:"_image-wrapper_1a93a_4",previewCardWrapper:"_preview-card-wrapper_1a93a_8",previewCardInner:"_preview-card-inner_1a93a_21",watchLater:"_watch-later_1a93a_25",badge:"_badge_1a93a_28",recommendReason:"_recommend-reason_1a93a_36",bangumiDesc:"_bangumi-desc_1a93a_51",btnDislike:"_btn-dislike_1a93a_54",btnDislikeIcon:"_btn-dislike-icon_1a93a_69",btnDislikeTip:"_btn-dislike-tip_1a93a_76",dislikedWrapper:"_disliked-wrapper_1a93a_91",dislikeContentCover:"_dislike-content-cover_1a93a_105",dislikeContentCoverInner:"_dislike-content-cover-inner_1a93a_111",dislikeIcon:"_dislike-icon_1a93a_122",dislikeReason:"_dislike-reason_1a93a_125",dislikeDesc:"_dislike-desc_1a93a_129",dislikeContentAction:"_dislike-content-action_1a93a_133"};function gi(e,t){return isNaN(e)?t:e}function iv({className:e,item:t,pvideo:r,enterCursorState:n}){const i=p.useRef(null),s=Tg(i),o={item:t,pvideo:r,cursorState:s,elWidth:gi(s.elementW,n.width),elHeight:gi(s.elementH,n.height),relativeX:gi(s.elementX,n.relativeX)};return h("div",{ref:i,className:J(Z.previewCardWrapper,e),children:r?h(sv,{...o}):!1})}function sv({item:e,pvideo:t,elWidth:r,elHeight:n,relativeX:i}){var b;let s=0,o=0;r&&i&&!isNaN(i)&&!isNaN(r)&&(s=i/r,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e.duration||0)*s));let a=p.useMemo(()=>{const k=(t==null?void 0:t.index)||[];let N=av(k,o);return N!==-1?N:o>k[k.length-1]?(N=Math.floor(k.length*s)-1,N<0&&(N=0),N):0},[t,o]);const{img_x_len:u,img_y_len:c,img_x_size:l,img_y_size:f}=t,d=c*u;a=a+1;const m=Math.floor(a/d),g=a-m*d,y=((b=t.image)==null?void 0:b[m])||"",v=Math.floor(g/u)+1,_=g-(v-1)*u,M=r*u,A=n*c,x=(v-1)*n,w=(_-1)*r;return h("div",{className:Z.previewCardInner,style:{backgroundColor:"black",backgroundImage:`url(${y})`,backgroundPosition:`-${w}px -${x}px`,backgroundSize:`${M}px ${A}px`},children:h(ov,{progress:s})})}function ov({progress:e}){return h("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:h("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${e*100}%`}})})}function av(e,t){var a;let r=0,n=e.length-1,i=-1;for(;r<=n;){const u=Math.floor((r+n)/2),c=e[u];if(t===c)return u;c<t?(r=u+1,i=u):n=u-1}if(i===-1)return-1;const s=e[i],o=(a=e[i+1])!=null?a:0;return s<t&&t<o?i:-1}const cv=va().format("YYYY"),uv=e=>{if(!e)return"";const t=va.unix(e);return t.format("YYYY")===cv?t.format("M-D"):t.format("YY-M-D")},lv=e=>e.replace(/^http:\/\//,"https://"),vi=p.memo(function({style:t,className:r,item:n,loading:i}){i=i!=null?i:!n;const s=L("div",{className:J("bili-video-card__skeleton",{hide:!i}),children:[h("div",{className:"bili-video-card__skeleton--cover"}),h("div",{className:"bili-video-card__skeleton--info",children:L("div",{className:"bili-video-card__skeleton--right",children:[h("p",{className:"bili-video-card__skeleton--text"}),h("p",{className:"bili-video-card__skeleton--text short"}),h("p",{className:"bili-video-card__skeleton--light"})]})})]}),o=qg(n==null?void 0:n.param);return L("div",{style:t,className:J("bili-video-card",Z.biliVideoCard,r),"data-report":"partition_recommend.content",children:[s,!i&&n&&(o?h(fv,{item:n,dislikedReason:o}):h(dv,{item:n}))]})}),fv=p.memo(function({dislikedReason:t,item:r}){const n=H(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await Zg(r,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),_a();i?ae("\u5DF2\u64A4\u9500"):Sa(),i&&hi.delete(r.param)});return L("div",{className:J(Z.dislikedWrapper),children:[h("div",{className:Z.dislikeContentCover,children:L("div",{className:Z.dislikeContentCoverInner,children:[h(At,{name:"DistraughtFace",size:32,className:Z.dislikeIcon}),h("div",{className:Z.dislikeReason,children:t==null?void 0:t.name}),h("div",{className:Z.dislikeDesc,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),h("div",{className:Z.dislikeContentAction,children:L("button",{onClick:n,children:[h(At,{name:"Return",size:"16",style:{marginRight:4,marginTop:-2}}),"\u64A4\u9500"]})})]})}),dv=p.memo(function({item:t}){const r=p.useRef(null),[n,i]=p.useState(()=>({width:0,height:0,relativeX:0}));Or("mouseenter",ce=>{var ic;const Gr=(ic=r.current)==null?void 0:ic.getBoundingClientRect();if(!Gr)return;const{width:Yr,height:Bi,x:oy}=Gr;i({width:Yr,height:Bi,relativeX:ce.pageX-window.pageXOffset-oy})},{target:r});const s=ri(r),o=p.useRef(null),a=ri(o),[u,c]=p.useState(!1),{accessKey:l}=Ie(),f=Boolean(l),{param:d,title:m,cover:g,goto:y,play:v,like:_,coin:M,desc:A,danmaku:x,ctime:w,duration:b,name:k,face:N,mid:j,favorite:E,badge:F,rcmd_reason:I}=t,O=p.useMemo(()=>uv(w),[w]),C=p.useMemo(()=>lv(g),[g]),[S,P]=p.useState(null),[T,R]=p.useState(!1),D=H(async()=>{if(!S&&!T)try{R(!0);const ce=await Vg(d);P(ce)}finally{R(!1)}});p.useEffect(()=>{s&&D()},[s]);let W=!1;const Y=H(async ce=>{if(ce.preventDefault(),W)return;W=!0;const Gr=u?Xg:Kg;let Yr=!1;try{Yr=await Gr(d)}finally{W=!1}Yr&&c(Bi=>!Bi)}),G=p.useRef(null),Q=ri(G),Ee=H(ce=>{ce.stopPropagation(),ce.preventDefault(),Pa(t)}),pe=t.goto==="bangumi",De=t.goto==="av",Ne=De?`/video/av${d}`:t.uri,$e=p.useMemo(()=>nv(b),[b]),te=p.useMemo(()=>mi(v),[v]),xe=p.useMemo(()=>mi(_),[_]),Ut=p.useMemo(()=>mi(E),[E]);return L("div",{className:"bili-video-card__wrap __scale-wrap",children:[h("a",{href:Ne,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:L("div",{className:"bili-video-card__image __scale-player-wrap",ref:r,children:[L("div",{className:J("bili-video-card__image--wrap",Z.imageWrapper),children:[L("picture",{className:"v-img bili-video-card__cover",children:[h("source",{srcSet:`${C}@672w_378h_1c.webp`,type:"image/webp"}),h("img",{src:`${C}@672w_378h_1c.webp`,alt:m,loading:"lazy"})]}),s&&h(iv,{item:t,pvideo:S==null?void 0:S.pvideoData,enterCursorState:n}),L("div",{className:`bili-watch-later ${Z.watchLater}`,style:{display:s?"flex":"none"},ref:o,onClick:Y,children:[h("svg",{className:"bili-watch-later__icon",children:h("use",{xlinkHref:u?"#widget-watch-save":"#widget-watch-later"})}),h("span",{className:"bili-watch-later__tip",style:{display:a?"block":"none"},children:u?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),f&&L("div",{ref:G,className:Z.btnDislike,onClick:Ee,style:{display:s?"flex":"none"},children:[h("svg",{className:Z.btnDislikeIcon,children:h("use",{xlinkHref:"#widget-close"})}),h("span",{className:Z.btnDislikeTip,style:{display:Q?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),h("div",{className:"bili-video-card__mask",children:L("div",{className:"bili-video-card__stats",children:[L("div",{className:"bili-video-card__stats--left",children:[L("span",{className:"bili-video-card__stats--item",children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-play-count"})}),h("span",{className:"bili-video-card__stats--text",children:te})]}),h("span",{className:"bili-video-card__stats--item",children:y==="av"?L(We,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:xe})]}):L(We,{children:[h("svg",{className:"bili-video-card__stats--icon",children:h("use",{xlinkHref:"#widget-agree"})}),h("span",{className:"bili-video-card__stats--text",children:Ut})]})})]}),h("span",{className:"bili-video-card__stats__duration",children:De&&$e})]})})]})}),h("div",{className:"bili-video-card__info __scale-disable",children:L("div",{className:"bili-video-card__info--right",children:[h("a",{href:Ne,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:h("h3",{className:"bili-video-card__info--tit",title:m,children:m})}),L("p",{className:"bili-video-card__info--bottom",children:[De&&L("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${j}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[I!=null&&I.content?h("span",{className:Z.recommendReason,children:I.content}):h("svg",{className:"bili-video-card__info--owner__up",children:h("use",{xlinkHref:"#widget-up"})}),h("span",{className:"bili-video-card__info--author",children:k}),O&&L("span",{className:"bili-video-card__info--date",children:["\xB7 ",O]})]}),pe&&L("a",{className:"bili-video-card__info--owner",href:Ne,target:"_blank",children:[h("span",{className:Z.badge,children:F}),h("span",{className:Z.bangumiDesc,children:A})]})]})]})})]})});var Fr={exports:{}},yi={exports:{}},jt={exports:{}},V=jt.exports={},Se,Ce;function bi(){throw new Error("setTimeout has not been defined")}function wi(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Se=setTimeout:Se=bi}catch{Se=bi}try{typeof clearTimeout=="function"?Ce=clearTimeout:Ce=wi}catch{Ce=wi}})();function Ra(e){if(Se===setTimeout)return setTimeout(e,0);if((Se===bi||!Se)&&setTimeout)return Se=setTimeout,setTimeout(e,0);try{return Se(e,0)}catch{try{return Se.call(null,e,0)}catch{return Se.call(this,e,0)}}}function hv(e){if(Ce===clearTimeout)return clearTimeout(e);if((Ce===wi||!Ce)&&clearTimeout)return Ce=clearTimeout,clearTimeout(e);try{return Ce(e)}catch{try{return Ce.call(null,e)}catch{return Ce.call(this,e)}}}var Pe=[],pt=!1,Ze,jr=-1;function pv(){!pt||!Ze||(pt=!1,Ze.length?Pe=Ze.concat(Pe):jr=-1,Pe.length&&Da())}function Da(){if(!pt){var e=Ra(pv);pt=!0;for(var t=Pe.length;t;){for(Ze=Pe,Pe=[];++jr<t;)Ze&&Ze[jr].run();jr=-1,t=Pe.length}Ze=null,pt=!1,hv(e)}}V.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];Pe.push(new Na(e,t)),Pe.length===1&&!pt&&Ra(Da)};function Na(e,t){this.fun=e,this.array=t}Na.prototype.run=function(){this.fun.apply(null,this.array)},V.title="browser",V.browser=!0,V.env={},V.argv=[],V.version="",V.versions={};function Re(){}V.on=Re,V.addListener=Re,V.once=Re,V.off=Re,V.removeListener=Re,V.removeAllListeners=Re,V.emit=Re,V.prependListener=Re,V.prependOnceListener=Re,V.listeners=function(e){return[]},V.binding=function(e){throw new Error("process.binding is not supported")},V.cwd=function(){return"/"},V.chdir=function(e){throw new Error("process.chdir is not supported")},V.umask=function(){return 0};var _i;typeof Object.create=="function"?_i=function(t,r){t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:_i=function(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t};const Fa=_i;var mv=/%[sdj%]/g;function mt(e){if(!Wt(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(ke(arguments[r]));return t.join(" ")}for(var r=1,n=arguments,i=n.length,s=String(e).replace(mv,function(a){if(a==="%%")return"%";if(r>=i)return a;switch(a){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch{return"[Circular]"}default:return a}}),o=n[r];r<i;o=n[++r])It(o)||!Qe(o)?s+=" "+o:s+=" "+ke(o);return s}function Si(e,t){if(Te(global.process))return function(){return Si(e,t).apply(this,arguments)};if(jt.exports.noDeprecation===!0)return e;var r=!1;function n(){if(!r){if(jt.exports.throwDeprecation)throw new Error(t);jt.exports.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n}var Ir={},Ci;function ja(e){if(Te(Ci)&&(Ci=jt.exports.env.NODE_DEBUG||""),e=e.toUpperCase(),!Ir[e])if(new RegExp("\\b"+e+"\\b","i").test(Ci)){var t=0;Ir[e]=function(){var r=mt.apply(null,arguments);console.error("%s %d: %s",e,t,r)}}else Ir[e]=function(){};return Ir[e]}function ke(e,t){var r={seen:[],stylize:vv};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),zr(t)?r.showHidden=t:t&&Li(r,t),Te(r.showHidden)&&(r.showHidden=!1),Te(r.depth)&&(r.depth=2),Te(r.colors)&&(r.colors=!1),Te(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=gv),Wr(r,e,r.depth)}ke.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},ke.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function gv(e,t){var r=ke.styles[t];return r?"\x1B["+ke.colors[r][0]+"m"+e+"\x1B["+ke.colors[r][1]+"m":e}function vv(e,t){return e}function yv(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Wr(e,t,r){if(e.customInspect&&t&&$t(t.inspect)&&t.inspect!==ke&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return Wt(n)||(n=Wr(e,n,r)),n}var i=bv(e,t);if(i)return i;var s=Object.keys(t),o=yv(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),Bt(t)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return ki(t);if(s.length===0){if($t(t)){var a=t.name?": "+t.name:"";return e.stylize("[Function"+a+"]","special")}if(zt(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Br(t))return e.stylize(Date.prototype.toString.call(t),"date");if(Bt(t))return ki(t)}var u="",c=!1,l=["{","}"];if(Ei(t)&&(c=!0,l=["[","]"]),$t(t)){var f=t.name?": "+t.name:"";u=" [Function"+f+"]"}if(zt(t)&&(u=" "+RegExp.prototype.toString.call(t)),Br(t)&&(u=" "+Date.prototype.toUTCString.call(t)),Bt(t)&&(u=" "+ki(t)),s.length===0&&(!c||t.length==0))return l[0]+u+l[1];if(r<0)return zt(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var d;return c?d=wv(e,t,r,o,s):d=s.map(function(m){return Ti(e,t,r,o,m,c)}),e.seen.pop(),_v(d,u,l)}function bv(e,t){if(Te(t))return e.stylize("undefined","undefined");if(Wt(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(xi(t))return e.stylize(""+t,"number");if(zr(t))return e.stylize(""+t,"boolean");if(It(t))return e.stylize("null","null")}function ki(e){return"["+Error.prototype.toString.call(e)+"]"}function wv(e,t,r,n,i){for(var s=[],o=0,a=t.length;o<a;++o)Ha(t,String(o))?s.push(Ti(e,t,r,n,String(o),!0)):s.push("");return i.forEach(function(u){u.match(/^\d+$/)||s.push(Ti(e,t,r,n,u,!0))}),s}function Ti(e,t,r,n,i,s){var o,a,u;if(u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},u.get?u.set?a=e.stylize("[Getter/Setter]","special"):a=e.stylize("[Getter]","special"):u.set&&(a=e.stylize("[Setter]","special")),Ha(n,i)||(o="["+i+"]"),a||(e.seen.indexOf(u.value)<0?(It(r)?a=Wr(e,u.value,null):a=Wr(e,u.value,r-1),a.indexOf(`
`)>-1&&(s?a=a.split(`
`).map(function(c){return"  "+c}).join(`
`).substr(2):a=`
`+a.split(`
`).map(function(c){return"   "+c}).join(`
`))):a=e.stylize("[Circular]","special")),Te(o)){if(s&&i.match(/^\d+$/))return a;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+a}function _v(e,t,r){var n=e.reduce(function(i,s){return s.indexOf(`
`)>=0,i+s.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(t===""?"":t+`
 `)+" "+e.join(`,
  `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function Ei(e){return Array.isArray(e)}function zr(e){return typeof e=="boolean"}function It(e){return e===null}function Ia(e){return e==null}function xi(e){return typeof e=="number"}function Wt(e){return typeof e=="string"}function Wa(e){return typeof e=="symbol"}function Te(e){return e===void 0}function zt(e){return Qe(e)&&Oi(e)==="[object RegExp]"}function Qe(e){return typeof e=="object"&&e!==null}function Br(e){return Qe(e)&&Oi(e)==="[object Date]"}function Bt(e){return Qe(e)&&(Oi(e)==="[object Error]"||e instanceof Error)}function $t(e){return typeof e=="function"}function za(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e>"u"}function Ba(e){return Buffer.isBuffer(e)}function Oi(e){return Object.prototype.toString.call(e)}function Ai(e){return e<10?"0"+e.toString(10):e.toString(10)}var Sv=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Cv(){var e=new Date,t=[Ai(e.getHours()),Ai(e.getMinutes()),Ai(e.getSeconds())].join(":");return[e.getDate(),Sv[e.getMonth()],t].join(" ")}function $a(){console.log("%s - %s",Cv(),mt.apply(null,arguments))}function Li(e,t){if(!t||!Qe(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function Ha(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var kv=mh(Object.freeze(Object.defineProperty({__proto__:null,format:mt,deprecate:Si,debuglog:ja,inspect:ke,isArray:Ei,isBoolean:zr,isNull:It,isNullOrUndefined:Ia,isNumber:xi,isString:Wt,isSymbol:Wa,isUndefined:Te,isRegExp:zt,isObject:Qe,isDate:Br,isError:Bt,isFunction:$t,isPrimitive:za,isBuffer:Ba,log:$a,inherits:Fa,_extend:Li,default:{inherits:Fa,_extend:Li,log:$a,isBuffer:Ba,isPrimitive:za,isFunction:$t,isError:Bt,isDate:Br,isObject:Qe,isRegExp:zt,isUndefined:Te,isSymbol:Wa,isString:Wt,isNumber:xi,isNullOrUndefined:Ia,isNull:It,isBoolean:zr,isArray:Ei,inspect:ke,deprecate:Si,format:mt,debuglog:ja}},Symbol.toStringTag,{value:"Module"}))).format;function Tv(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function Ev(e,t){return function(){var r=this,n=[].slice.call(arguments);Tv();var i=new AbortController;return n.push(i.signal),new Promise(function(s,o){var a=setTimeout(function(){var u=new $r(t);o(u),i.abort()},t);Promise.resolve(e.apply(r,n)).then(function(u){clearTimeout(a),s(u)},function(u){clearTimeout(a),o(u)})})}}class $r extends Error{constructor(t){super(),this.timeout=t,this.message=kv("timeout of %sms exceed",t),Error.captureStackTrace(this,$r)}}yi.exports=Ev,yi.exports.TimeoutError=$r;const Ua=yi.exports,xv=Ua.TimeoutError;Fr.exports=function(t,r){const n=t;r=r||{};const i=r.times||5,s=r.timeout;s&&(t=Ua(t,s));const o=r.onerror;return async function(){const a=this,u=[].slice.call(arguments),c=new Array(i);for(let l=0;l<i;l++){let f,d;try{f=await t.apply(a,u)}catch(m){d=m}if(!d)return f;if(d instanceof TypeError)throw d;if(d instanceof Ov)throw d.originalError;c[l]=d,o&&o(d,l)}throw new Ga({times:i,timeout:s,fn:n,errors:c})}};class Ga 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 Ov extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}var Av=Fr.exports.RetryError=Ga;Fr.exports.TimeoutError=xv;const Mi="bilibili-app-recommend";class Pi extends Error{constructor(r){super();Vr(this,"json");Error.captureStackTrace(this,Pi),this.json=r,this.message=r.message||JSON.stringify(r)}}async function Lv(){const t=(await Lr.get(Ca+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data;if(!t.data){if(t.code===-663)throw new Pi(t);return ae(`${Mi}: \u672A\u77E5\u9519\u8BEF, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005

  code=${t.code} message=${t.message||""}`,"5s"),[]}return t.data}const Mv=Fr.exports(Lv,{times:5,timeout:2e3,onerror(e,t){console.info("[%s] tryGetRecommend onerror: index=%s",Mi,t,e)}});async function Pv(){try{return await Mv()}catch(e){if(e instanceof Av){console.error(e.errors);const t=[mt("\u8BF7\u6C42\u51FA\u9519, \u5DF2\u91CD\u8BD5%s\u6B21:",e.times),...e.errors.map((r,n)=>mt("  %s) %s",n+1,r.message)),"","\u8BF7\u91CD\u65B0\u83B7\u53D6 access_key \u540E\u91CD\u8BD5~"].join(`
`);ae(t,"5s")}throw e}}async function Rv(){return Ri(2)}async function Ri(e){const t=new Array(e).fill(0).map(i=>Pv());let n=(await Promise.all(t)).reduce((i,s)=>i.concat(s||[]),[]);return n=Dv(n),n.map(i=>({...i,uniqId:i.param+"-"+crypto.randomUUID()}))}function Dv(e){const t=new Set;return e=e.filter(r=>{const{param:n}=r;return t.has(n)?(console.log("[%s]: [uniqRecList]: duplicate",Mi,r),!1):(t.add(n),!0)}),e}var ne={exports:{}},Nv="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Fv=Nv,jv=Fv;function Ya(){}function Va(){}Va.resetWarningCache=Ya;var Iv=function(){function e(n,i,s,o,a,u){if(u!==jv){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Va,resetWarningCache:Ya};return r.PropTypes=r,r};ne.exports=Iv();class Di extends p.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const r=this.props.getScrollParent&&this.props.getScrollParent();return r!=null?r:t&&t.parentNode}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,r=window,n=this.getParentElement(t);let i;if(this.props.useWindow){const s=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:s.scrollTop;this.props.isReverse?i=o:i=this.calculateOffset(t,o)}else this.props.isReverse?i=n.scrollTop:i=t.scrollHeight-n.scrollTop-n.clientHeight;i<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:a,loadMore:u,pageStart:c,ref:l,threshold:f,useCapture:d,useWindow:m,getScrollParent:g,...y}=t;y.ref=_=>{this.scrollComponent=_,l&&l(_)};const v=[r];return i&&(a?o?v.unshift(a):v.push(a):this.defaultLoader&&(o?v.unshift(this.defaultLoader):v.push(this.defaultLoader))),ue.default.createElement(n,y,v)}}Vr(Di,"propTypes",{children:ne.exports.node.isRequired,element:ne.exports.node,hasMore:ne.exports.bool,initialLoad:ne.exports.bool,isReverse:ne.exports.bool,loader:ne.exports.node,loadMore:ne.exports.func.isRequired,pageStart:ne.exports.number,ref:ne.exports.func,getScrollParent:ne.exports.func,threshold:ne.exports.number,useCapture:ne.exports.bool,useWindow:ne.exports.bool}),Vr(Di,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});const Ni="_video-grid_14t5i_9",Ka="_limit-two-lines_14t5i_19",Fi="_internal-testing_14t5i_43",Wv="_limit-one-line_14t5i_50",Xa="_narrow-mode_14t5i_71",Ky={videoGrid:Ni,limitTwoLines:Ka,internalTesting:Fi,limitOneLine:Wv,narrowMode:Xa};function zv({enabled:e,refresh:t,minIndex:r=0,maxIndex:n,containerRef:i,getScrollerRect:s,openDislikeAt:o}){const[a,u]=p.useState(null),c=H(()=>{var I;if(a===null||!i.current)return!1;const E=s(),F=(I=i.current.querySelector(`.${gt.card}.${gt.cardActive}`))==null?void 0:I.getBoundingClientRect();return!(!E||!F||F.top-E.top<-(E.height+F.height)||F.top-E.top>E.height*2+F.height)}),l=H((E,F)=>{if(!e)return;F==null||F.preventDefault();const I=c()?a+E:A();if(!(I<r)){if(I>n){k(n);return}u(I),k(I)}}),f=p.useCallback(E=>{l(-1,E)},[]),d=p.useCallback(E=>{l(1,E)},[]);Me("leftarrow",f),Me("rightarrow",d);const m=p.useCallback(E=>{l(-j(),E)},[]),g=p.useCallback(E=>{l(j(),E)},[]);Me("uparrow",m),Me("downarrow",g);const y=H(()=>{!e||u(null)}),v=H(()=>{!e||typeof a!="number"||N(a)}),_=H(()=>{!e||typeof a!="number"||o(a)});Me("esc",y),Me("enter",v),Me("backspace",_);const M=H(()=>{!e||t()});Me("r",M,{exactMatch:!0});function A(){const E=s();if(!E)return 0;const F=w();for(let I=0;I<F.length;I++)if(F[I].getBoundingClientRect().top>=E.top)return I;return 0}const x=`.${gt.card}`;function w(){var E;return[...((E=i.current)==null?void 0:E.querySelectorAll(x))||[]]}function b(E){return w()[E]}function k(E){var I;const F=b(E);(I=F==null?void 0:F.scrollIntoViewIfNeeded)==null||I.call(F,!1)}function N(E){const F=b(E);if(!F)return;const I=F.querySelector(".bili-video-card__wrap > a");I==null||I.click()}function j(){if(fe.useNarrowMode)return 2;let E=Ja.get(window.innerWidth);if(E)return E;const F=i.current;if(!F)return 0;const I=window.getComputedStyle(F);return I.display!=="grid"?0:(E=I.gridTemplateColumns.split(" ").length,Ja.set(window.innerWidth,E),E)}return{activeIndex:a,clearActiveIndex:y}}const Ja=new Map,gt={loader:Xn`
    text-align: center;
    line-height: 60px;
    font-size: 120%;
  `,card:Xn`
    border: 2px solid transparent;

    /* global class under .card */
    .bili-video-card__info {
      padding-left: 2px;
      padding-bottom: 1px;
      margin-top: calc(var(--info-margin-top) - 1px);
    }
  `,cardActive:Xn`
    border-color: #fb7299;
    border-radius: 6px;
    overflow: hidden;
  `},Za=p.forwardRef(({infiteScrollUseWindow:e,shortcutEnabled:t,onScrollToTop:r,className:n,scrollerRef:i},s)=>{const[o,a]=p.useState([]),[u,c]=p.useState(!1);p.useImperativeHandle(s,()=>({refresh:l}));const l=H(async()=>{await(r==null?void 0:r());try{_(),c(!0),a(await Ri(2)),_()}finally{c(!1)}}),f=H(async A=>{const x=await Ri(2);a(w=>[...w,...x])}),{useNarrowMode:d}=Ie(),m=p.useRef(null),g=H(()=>{var A;if(e){const x=ho+50;return new DOMRect(0,x,window.innerWidth,window.innerHeight-x)}else return(A=i==null?void 0:i.current)==null?void 0:A.getBoundingClientRect()}),y=tv(),{activeIndex:v,clearActiveIndex:_}=zv({enabled:t&&!y,refresh:l,maxIndex:o.length-1,containerRef:m,getScrollerRect:g,openDislikeAt(A){Pa(o[A])}}),M=lo();return h(Di,{pageStart:0,loadMore:f,hasMore:!0,useWindow:e,threshold:360,style:{minHeight:"100%"},loader:h("div",{className:gt.loader,children:"\u52A0\u8F7D\u4E2D..."},0),children:h("div",{ref:m,className:J(Ni,{[Fi]:M},{[Xa]:d},n),children:o.map((A,x)=>h(vi,{loading:u,item:A,className:J(gt.card,{[gt.cardActive]:x===v})},A.uniqId))})})}),Bv={checkbox:"_checkbox_5cp8u_1"};async function $v(){var u,c;const t=(await Kr.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((u=t==null?void 0:t.data)!=null&&u.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((c=t==null?void 0:t.data)!=null&&c.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:t};const r=t.data.confirm_uri;let n;const i=new Promise(l=>{window.addEventListener("message",f=>{if(f.origin!="https://www.mcbbs.net"||!f.data)return;const d=f.data.match(/access_key=([0-9a-z]{32})/);if(!d||!d[1])return l({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});l(d[1])}),n=setTimeout(()=>{l({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},10*1e3)}),s=document.createElement("iframe");s.src=r,s.style.display="none",document.body.appendChild(s);function o(){s.remove(),n&&(clearTimeout(n),n=null)}const a=await i;return o(),a}async function Hv(){const e=await $v();if(typeof e=="object"&&"errmsg"in e){ae(e.errmsg);return}const t=e;return fe.accessKey=t,ae("\u83B7\u53D6\u6210\u529F"),t}function Uv(){fe.accessKey="",ae("\u5DF2\u5220\u9664 access_key")}function ji(){const e=p.useRef(null),{accessKey:t}=Ie(),r=ha(Hv,{manual:!0}),n=H(async()=>{var a;await r.runAsync()&&((a=e.current)==null||a.set(!1))}),i=Uv,s=H(()=>{const o="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(o,"_blank")});return h(We,{children:t?L(We,{children:[h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:()=>n(),disabled:r.loading,children:h("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),h("button",{className:"primary-btn roll-btn",onClick:i,children:h("span",{children:"\u5220\u9664 access_key"})})]}):L(We,{children:[h("button",{className:"primary-btn roll-btn",onClick:s,children:h("span",{children:"access_key \u8BF4\u660E"})}),h("button",{className:"primary-btn roll-btn",onClick:n,disabled:r.loading,children:h("span",{children:"\u83B7\u53D6 access_key"})})]})})}const Ii={container:{name:"8irbms",styles:"display:inline-flex;align-items:center"},checkbox:{name:"4l4ubo",styles:"cursor:pointer;outline:none"},label:{name:"side0b",styles:"margin-left:2px;user-select:none;cursor:pointer"}};function Hr({configKey:e,label:t,className:r}){const i=!!Ie()[e],s=p.useCallback(a=>{const u=a.target.checked;Rh({[e]:u}),u&&e==="initialShowMore"&&ae("\u5DF2\u5F00\u542F\u81EA\u52A8\u67E5\u770B\u66F4\u591A: \u4E0B\u6B21\u6253\u5F00\u9996\u9875\u65F6\u5C06\u76F4\u63A5\u5C55\u793A\u63A8\u8350\u5F39\u6846")},[]),o=p.useId();return L("span",{css:Ii.container,className:r,children:[h("input",{type:"checkbox",id:o,checked:i,onChange:s,css:Ii.checkbox}),h("label",{htmlFor:o,css:Ii.label,children:t||e})]})}var Gv={name:"1qkltea",styles:"margin-left:5px"};const Yv=function(){const e=Gv;return L(We,{children:[h(Hr,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",css:e}),h(Hr,{configKey:"useNarrowMode",label:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F",css:e})]})},he={configIcon:"_config-icon_1jab1_1",settingsGroup:"_settings-group_1jab1_6",settingsGroupTitle:"_settings-group-title_1jab1_9",settingsGroupContent:"_settings-group-content_1jab1_12",row:"_row_1jab1_18",check:"_check_1jab1_22"};function Vv({show:e,onHide:t}){const r=p.useId(),{pureRecommend:n}=Ie();return L(si,{show:e,onHide:t,hideWhenMaskOnClick:!0,hideWhenEsc:!0,children:[L("div",{className:de.modalHeader,children:[L("div",{className:de.modalTitle,children:[h(At,{name:"Config",className:he.configIcon}),"\u8BBE\u7F6E\u9879"]}),h("div",{className:"space",style:{flex:1}}),h(oi,{onClick:t})]}),L("main",{className:de.modalBody,children:[L("div",{className:he.settingsGroup,children:[h("div",{className:he.settingsGroupTitle,children:"Auth"}),h("div",{className:J(he.settingsGroupContent,he.row),children:h(ji,{})})]}),L("div",{className:he.settingsGroup,children:[h("div",{className:he.settingsGroupTitle,children:"\u5F00\u5173"}),L("div",{className:J(he.settingsGroupContent,he.row),children:[h("input",{type:"checkbox",className:Bv.checkbox,id:r,checked:n,onChange:async i=>{fe.pureRecommend=i.target.checked,ae("\u5373\u5C06\u5237\u65B0\u7F51\u9875"),await _t.exports(500),location.reload()}}),h("label",{htmlFor:r,children:"\u5F00\u542F\u7EAF\u5206\u4EAB\u6A21\u5F0F"}),h(Hr,{configKey:"initialShowMore",label:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A",className:he.check}),h(Hr,{configKey:"useNarrowMode",label:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F",className:he.check})]})]})]})]})}const Qa={expandBtn:"_expand-btn_wdzp9_1",expanded:"_expanded_wdzp9_12"},qa=p.forwardRef(function({children:t},r){const[n,i]=pa(!1);p.useImperativeHandle(r,()=>i,[i]);const s=h("button",{className:J("primary-btn",Qa.expandBtn),onClick:i.toggle,children:h("svg",{className:J({[Qa.expanded]:n}),children:h("use",{xlinkHref:"#widget-arrow"})})});return L(We,{children:[s,n&&t]})}),Ht={modalMask:"_modal-mask_1as61_1",narrowMode:"_narrow-mode_1as61_1",modal:"_modal_1as61_1",modalHeader:"_modal-header_1as61_21",modalBody:"_modal-body_1as61_22",btnRefresh:"_btn-refresh_1as61_25"},Kv=p.memo(function({show:t,onHide:r}){const n=p.useRef(null),i=p.useRef(null),{useNarrowMode:s}=Ie(),o=p.useMemo(()=>({[Ht.narrowMode]:s}),[s]),a=H(()=>{var c;return(c=i.current)==null?void 0:c.refresh()}),u=H(()=>{n.current&&(n.current.scrollTop=0)});return L(si,{show:t,onHide:r,clsModalMask:J(o),clsModal:J(Ht.modal,o),children:[L("div",{className:J(de.modalHeader,Ht.modalHeader),children:[h("div",{className:de.modalTitle,children:"\u63A8\u8350"}),h("div",{className:"space",style:{flex:1}}),h(qa,{children:h(Yv,{})}),L("button",{className:`primary-btn roll-btn ${Ht.btnRefresh}`,onClick:a,children:[h("svg",{children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),h(oi,{onClick:r})]}),h("div",{className:J(de.modalBody,Ht.modalBody),ref:n,children:h(Za,{ref:i,shortcutEnabled:t,onScrollToTop:u,infiteScrollUseWindow:!1,scrollerRef:n})})]})});var Wi={};Object.defineProperty(Wi,"__esModule",{value:!0});var ec=Wi.useSticky=void 0;const zi=ue.default;function Xv(){const e=(0,zi.useRef)(null),[t,r]=(0,zi.useState)(!1);return(0,zi.useEffect)(()=>{function n(){if(!e.current)return;const i=e.current.getBoundingClientRect().top,s=parseInt(getComputedStyle(e.current).top),o=i<=s;o&&!t?r(!0):!o&&t&&r(!1)}return n(),document.addEventListener("scroll",n),window.addEventListener("resize",n),window.addEventListener("orientationchange",n),()=>{document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)}},[t]),[e,t]}ec=Wi.useSticky=Xv;const tc={btn:at`
    padding: 0;
    width: 31px;
    height: 31px;
    border-radius: 50%;
  `,icon:at`
    svg {
      width: 14px;
      height: 14px;
    }
  `},Ur=rt({showMore:fe.initialShowMore}),Jv=function(){return nt(Ur)},Zv=()=>{Ur.showMore=!0},Qv=()=>{Ur.showMore=!1};function rc({onRefresh:e}){const{accessKey:t,pureRecommend:r}=Ie(),n=p.useRef(null),{showMore:i}=nt(Ur),[s,o]=p.useState(!1),a=p.useCallback(()=>{o(!0)},[]),u=p.useCallback(()=>{o(!1)},[]),[c,l]=ec();return xn(),L(We,{children:[L("div",{ref:c,className:"area-header",css:[at`
            margin-bottom: 0;
            height: 50px;
          `,r&&at`
              position: sticky;
              top: ${ho}px;
              z-index: 1000;
            `,r&&l&&at`
              background-color: var(--bg1_float);
              box-shadow: 0 2px 4px rgb(0 0 0 / 8%);
            `,"",""],children:[L("div",{className:"left",children:[h("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),h("svg",{className:"icon",children:h("use",{xlinkHref:"#channel-cinephile"})}),h("a",{className:"title",href:"#",children:h("span",{children:"\u63A8\u8350"})})]}),L("div",{className:"right",children:[h("button",{className:"primary-btn",css:tc.btn,onClick:a,children:h(At,{name:"Config",css:tc.icon})}),t?h(qa,{ref:n,children:h(ji,{})}):h(ji,{}),L("button",{className:"primary-btn roll-btn",onClick:e,children:[h("svg",{style:{transform:"rotate(0deg)"},children:h("use",{xlinkHref:"#widget-roll"})}),h("span",{children:"\u6362\u4E00\u6362"})]}),L("button",{className:"primary-btn see-more",onClick:Zv,children:[h("span",{children:"\u67E5\u770B\u66F4\u591A"}),h("svg",{children:h("use",{xlinkHref:"#widget-arrow"})})]})]})]}),h(Kv,{show:i,onHide:Qv}),h(Vv,{show:s,onHide:u})]})}const qv={grid:at`
    /* card=299 col-gap=20  */
    width: ${299*2+20}px;
    margin: 0 auto;
  `};function ey(){const{useNarrowMode:e}=Ie(),{showMore:t}=Jv(),r=p.useRef(null),n=H(()=>{var s;return(s=r.current)==null?void 0:s.refresh()}),i=H(()=>{document.documentElement.scrollTop=0});return L("section",{"data-area":"\u63A8\u8350",children:[h(rc,{onRefresh:n}),h(Za,{ref:r,css:[e&&qv.grid,"",""],shortcutEnabled:!t,infiteScrollUseWindow:!0,onScrollToTop:i})]})}function ty(){const e=p.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:t,loading:r,error:n,refresh:i}=ha(Rv);n&&console.error(n.stack||n);const s=lo();return L("section",{"data-area":"\u63A8\u8350",children:[h(rc,{onRefresh:i}),h("div",{className:J(Ni,Ka,{[Fi]:s}),style:{marginBottom:s?30:0},children:r||n?e.map(o=>h(vi,{},o)):t.map(o=>h(vi,{item:o},o.uniqId))})]})}const ry=10*1e3;async function nc(e){let t=[];const r=()=>{t=Array.from(document.querySelectorAll(e))},n=performance.now();for(;!t.length&&performance.now()-n<ry;)await _t.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 ny()})();async function ny(){return fe.pureRecommend?sy():iy()}async function iy(){const t=Date.now()+1e4;let r=null;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){r=document.querySelector(".bili-layout > section.bili-grid");break}if(er()&&document.querySelector(".recommended-container")){r=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await _t.exports(100)}if(!r){console.error("[bilibili-app-recommend]: init fail");return}const n=document.createElement("section");r.insertAdjacentElement("afterend",n),qt(n).render(h(ty,{}))}async function sy(){var i,s;er()?((i=document.querySelector(".bili-feed4 .bili-feed4-layout"))==null||i.remove(),nc(".bili-feed4 .header-channel")):((s=document.querySelector(".bili-layout"))==null||s.remove(),nc(".bili-footer"));const e=document.createElement("div");e.classList.add(er()?"bili-feed4-layout":"bili-layout","pure-recommend");const t=document.querySelector(".bili-header");t==null||t.insertAdjacentElement("afterend",e);const r=document.createElement("section");e==null||e.appendChild(r),qt(r).render(h(ey,{}))}})(React,ReactDOM,axios,axiosGmxhrAdapter);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址