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