Greasy Fork

Greasy Fork is available in English.

bilibili-app-recommend

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

目前为 2022-11-18 提交的版本。查看 最新版本

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.5.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_deleteValue
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_xmlhttpRequest
// @grant        unsafeWindow
// ==/UserScript==

(o=>{const e=document.createElement("style");e.dataset.source="vite-plugin-monkey",e.innerText=o,document.head.appendChild(e)})(`._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}._modal-mask_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._bili-video-card_1a93a_1{position:relative}._image-wrapper_1a93a_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_1a93a_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._preview-card-wrapper_1a93a_8 ._preview-card-inner_1a93a_21{width:100%;height:100%}._watch-later_1a93a_25{z-index:3}._badge_1a93a_28{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_1a93a_36{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_1a93a_51{color:default}._btn-dislike_1a93a_54{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_1a93a_54 ._btn-dislike-icon_1a93a_69{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_1a93a_54 ._btn-dislike-tip_1a93a_76{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_1a93a_91{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_1a93a_91{border:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-icon_1a93a_122{margin-bottom:5px}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-reason_1a93a_125{font-size:20px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-cover_1a93a_105 ._dislike-content-cover-inner_1a93a_111 ._dislike-desc_1a93a_129{font-size:16px;text-align:center}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133{border-top:1px solid #333}._disliked-wrapper_1a93a_91 ._dislike-content-action_1a93a_133 button{font-size:16px;color:inherit;display:flex;align-items:center}._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_svuzk_1{color:default;margin-bottom:20px}@media (min-width: 2200px){._video-card-list_svuzk_6.is-full{grid-column:span 7!important}._video-card-list_svuzk_6.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_svuzk_6.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_svuzk_6.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_svuzk_20{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_svuzk_20 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_svuzk_20 svg._expanded_svuzk_31{transform:rotate(0)}.primary-btn[disabled]:active,.primary-btn[disabled]:hover{cursor:wait;background-color:inherit}
`);

var Hh=Object.defineProperty;var Uh=(b,ne,pe)=>ne in b?Hh(b,ne,{enumerable:!0,configurable:!0,writable:!0,value:pe}):b[ne]=pe;var ht=(b,ne,pe)=>(Uh(b,typeof ne!="symbol"?ne+"":ne,pe),pe);(function(b,ne,pe,Ms){"use strict";const $e=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Be=$e(b),Ls=$e(ne),pt=$e(pe),Rs=$e(Ms);var Ds=typeof global=="object"&&global&&global.Object===Object&&global;const xn=Ds;var Ns=typeof self=="object"&&self&&self.Object===Object&&self,Fs=xn||Ns||Function("return this")();const re=Fs;var js=re.Symbol;const ie=js;var kn=Object.prototype,Is=kn.hasOwnProperty,zs=kn.toString,xe=ie?ie.toStringTag:void 0;function $s(e){var t=Is.call(e,xe),n=e[xe];try{e[xe]=void 0;var r=!0}catch{}var i=zs.call(e);return r&&(t?e[xe]=n:delete e[xe]),i}var Bs=Object.prototype,Ws=Bs.toString;function Hs(e){return Ws.call(e)}var Us="[object Null]",Ys="[object Undefined]",Pn=ie?ie.toStringTag:void 0;function Se(e){return e==null?e===void 0?Ys:Us:Pn&&Pn in Object(e)?$s(e):Hs(e)}function Te(e){return e!=null&&typeof e=="object"}var Gs="[object Symbol]";function We(e){return typeof e=="symbol"||Te(e)&&Se(e)==Gs}function Ks(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 Xs=Array.isArray;const ae=Xs;var Vs=1/0,Mn=ie?ie.prototype:void 0,Ln=Mn?Mn.toString:void 0;function gt(e){if(typeof e=="string")return e;if(ae(e))return Ks(e,gt)+"";if(We(e))return Ln?Ln.call(e):"";var t=e+"";return t=="0"&&1/e==-Vs?"-0":t}var Js=/\s/;function Zs(e){for(var t=e.length;t--&&Js.test(e.charAt(t)););return t}var Qs=/^\s+/;function qs(e){return e&&e.slice(0,Zs(e)+1).replace(Qs,"")}function ue(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Rn=0/0,eo=/^[-+]0x[0-9a-f]+$/i,to=/^0b[01]+$/i,no=/^0o[0-7]+$/i,ro=parseInt;function mt(e){if(typeof e=="number")return e;if(We(e))return Rn;if(ue(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ue(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=qs(e);var n=to.test(e);return n||no.test(e)?ro(e.slice(2),n?2:8):eo.test(e)?Rn:+e}var Dn=1/0,io=17976931348623157e292;function so(e){if(!e)return e===0?e:0;if(e=mt(e),e===Dn||e===-Dn){var t=e<0?-1:1;return t*io}return e===e?e:0}function oo(e){var t=so(e),n=t%1;return t===t?n?t-n:t:0}function ao(e){return e}var co="[object AsyncFunction]",lo="[object Function]",uo="[object GeneratorFunction]",fo="[object Proxy]";function Nn(e){if(!ue(e))return!1;var t=Se(e);return t==lo||t==uo||t==co||t==fo}var ho=re["__core-js_shared__"];const vt=ho;var Fn=function(){var e=/[^.]+$/.exec(vt&&vt.keys&&vt.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function po(e){return!!Fn&&Fn in e}var go=Function.prototype,mo=go.toString;function ge(e){if(e!=null){try{return mo.call(e)}catch{}try{return e+""}catch{}}return""}var vo=/[\\^$.*+?()[\]{}|]/g,yo=/^\[object .+?Constructor\]$/,bo=Function.prototype,_o=Object.prototype,wo=bo.toString,So=_o.hasOwnProperty,To=RegExp("^"+wo.call(So).replace(vo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Co(e){if(!ue(e)||po(e))return!1;var t=Nn(e)?To:yo;return t.test(ge(e))}function Eo(e,t){return e==null?void 0:e[t]}function me(e,t){var n=Eo(e,t);return Co(n)?n:void 0}var Oo=me(re,"WeakMap");const yt=Oo;function Ao(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 xo=800,ko=16,Po=Date.now;function Mo(e){var t=0,n=0;return function(){var r=Po(),i=ko-(r-n);if(n=r,i>0){if(++t>=xo)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Lo(e){return function(){return e}}var Ro=function(){try{var e=me(Object,"defineProperty");return e({},"",{}),e}catch{}}();const He=Ro;var Do=He?function(e,t){return He(e,"toString",{configurable:!0,enumerable:!1,value:Lo(t),writable:!0})}:ao,No=Mo(Do);const Fo=No;var jo=9007199254740991,Io=/^(?:0|[1-9]\d*)$/;function bt(e,t){var n=typeof e;return t=t==null?jo:t,!!t&&(n=="number"||n!="symbol"&&Io.test(e))&&e>-1&&e%1==0&&e<t}function zo(e,t,n){t=="__proto__"&&He?He(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function _t(e,t){return e===t||e!==e&&t!==t}var $o=Object.prototype,Bo=$o.hasOwnProperty;function Wo(e,t,n){var r=e[t];(!(Bo.call(e,t)&&_t(r,n))||n===void 0&&!(t in e))&&zo(e,t,n)}var jn=Math.max;function Ho(e,t,n){return t=jn(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,s=jn(r.length-t,0),o=Array(s);++i<s;)o[i]=r[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=r[i];return c[t]=n(o),Ao(e,this,c)}}var Uo=9007199254740991;function wt(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Uo}function Yo(e){return e!=null&&wt(e.length)&&!Nn(e)}var Go=Object.prototype;function Ko(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Go;return e===n}function Xo(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Vo="[object Arguments]";function In(e){return Te(e)&&Se(e)==Vo}var zn=Object.prototype,Jo=zn.hasOwnProperty,Zo=zn.propertyIsEnumerable,Qo=In(function(){return arguments}())?In:function(e){return Te(e)&&Jo.call(e,"callee")&&!Zo.call(e,"callee")};const St=Qo;function qo(){return!1}var $n=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Bn=$n&&typeof module=="object"&&module&&!module.nodeType&&module,ea=Bn&&Bn.exports===$n,Wn=ea?re.Buffer:void 0,ta=Wn?Wn.isBuffer:void 0,na=ta||qo;const Tt=na;var ra="[object Arguments]",ia="[object Array]",sa="[object Boolean]",oa="[object Date]",aa="[object Error]",ca="[object Function]",la="[object Map]",ua="[object Number]",fa="[object Object]",da="[object RegExp]",ha="[object Set]",pa="[object String]",ga="[object WeakMap]",ma="[object ArrayBuffer]",va="[object DataView]",ya="[object Float32Array]",ba="[object Float64Array]",_a="[object Int8Array]",wa="[object Int16Array]",Sa="[object Int32Array]",Ta="[object Uint8Array]",Ca="[object Uint8ClampedArray]",Ea="[object Uint16Array]",Oa="[object Uint32Array]",H={};H[ya]=H[ba]=H[_a]=H[wa]=H[Sa]=H[Ta]=H[Ca]=H[Ea]=H[Oa]=!0,H[ra]=H[ia]=H[ma]=H[sa]=H[va]=H[oa]=H[aa]=H[ca]=H[la]=H[ua]=H[fa]=H[da]=H[ha]=H[pa]=H[ga]=!1;function Aa(e){return Te(e)&&wt(e.length)&&!!H[Se(e)]}function xa(e){return function(t){return e(t)}}var Hn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ke=Hn&&typeof module=="object"&&module&&!module.nodeType&&module,ka=ke&&ke.exports===Hn,Ct=ka&&xn.process,Pa=function(){try{var e=ke&&ke.require&&ke.require("util").types;return e||Ct&&Ct.binding&&Ct.binding("util")}catch{}}();const Un=Pa;var Yn=Un&&Un.isTypedArray,Ma=Yn?xa(Yn):Aa;const Gn=Ma;var La=Object.prototype,Ra=La.hasOwnProperty;function Da(e,t){var n=ae(e),r=!n&&St(e),i=!n&&!r&&Tt(e),s=!n&&!r&&!i&&Gn(e),o=n||r||i||s,c=o?Xo(e.length,String):[],u=c.length;for(var a in e)(t||Ra.call(e,a))&&!(o&&(a=="length"||i&&(a=="offset"||a=="parent")||s&&(a=="buffer"||a=="byteLength"||a=="byteOffset")||bt(a,u)))&&c.push(a);return c}function Na(e,t){return function(n){return e(t(n))}}var Fa=Na(Object.keys,Object);const ja=Fa;var Ia=Object.prototype,za=Ia.hasOwnProperty;function $a(e){if(!Ko(e))return ja(e);var t=[];for(var n in Object(e))za.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ba(e){return Yo(e)?Da(e):$a(e)}var Wa=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ha=/^\w*$/;function Ua(e,t){if(ae(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||We(e)?!0:Ha.test(e)||!Wa.test(e)||t!=null&&e in Object(t)}var Ya=me(Object,"create");const Pe=Ya;function Ga(){this.__data__=Pe?Pe(null):{},this.size=0}function Ka(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Xa="__lodash_hash_undefined__",Va=Object.prototype,Ja=Va.hasOwnProperty;function Za(e){var t=this.__data__;if(Pe){var n=t[e];return n===Xa?void 0:n}return Ja.call(t,e)?t[e]:void 0}var Qa=Object.prototype,qa=Qa.hasOwnProperty;function ec(e){var t=this.__data__;return Pe?t[e]!==void 0:qa.call(t,e)}var tc="__lodash_hash_undefined__";function nc(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pe&&t===void 0?tc:t,this}function ve(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])}}ve.prototype.clear=Ga,ve.prototype.delete=Ka,ve.prototype.get=Za,ve.prototype.has=ec,ve.prototype.set=nc;function rc(){this.__data__=[],this.size=0}function Ue(e,t){for(var n=e.length;n--;)if(_t(e[n][0],t))return n;return-1}var ic=Array.prototype,sc=ic.splice;function oc(e){var t=this.__data__,n=Ue(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():sc.call(t,n,1),--this.size,!0}function ac(e){var t=this.__data__,n=Ue(t,e);return n<0?void 0:t[n][1]}function cc(e){return Ue(this.__data__,e)>-1}function lc(e,t){var n=this.__data__,r=Ue(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ce(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])}}ce.prototype.clear=rc,ce.prototype.delete=oc,ce.prototype.get=ac,ce.prototype.has=cc,ce.prototype.set=lc;var uc=me(re,"Map");const Me=uc;function fc(){this.size=0,this.__data__={hash:new ve,map:new(Me||ce),string:new ve}}function dc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ye(e,t){var n=e.__data__;return dc(t)?n[typeof t=="string"?"string":"hash"]:n.map}function hc(e){var t=Ye(this,e).delete(e);return this.size-=t?1:0,t}function pc(e){return Ye(this,e).get(e)}function gc(e){return Ye(this,e).has(e)}function mc(e,t){var n=Ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function le(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])}}le.prototype.clear=fc,le.prototype.delete=hc,le.prototype.get=pc,le.prototype.has=gc,le.prototype.set=mc;var vc="Expected a function";function Et(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(vc);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(Et.Cache||le),n}Et.Cache=le;var yc=500;function bc(e){var t=Et(e,function(r){return n.size===yc&&n.clear(),r}),n=t.cache;return t}var _c=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wc=/\\(\\)?/g,Sc=bc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_c,function(n,r,i,s){t.push(i?s.replace(wc,"$1"):r||n)}),t});const Tc=Sc;function Kn(e){return e==null?"":gt(e)}function Ge(e,t){return ae(e)?e:Ua(e,t)?[e]:Tc(Kn(e))}var Cc=1/0;function Ot(e){if(typeof e=="string"||We(e))return e;var t=e+"";return t=="0"&&1/e==-Cc?"-0":t}function Ec(e,t){t=Ge(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Ot(t[n++])];return n&&n==r?e:void 0}function Xn(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var Vn=ie?ie.isConcatSpreadable:void 0;function Oc(e){return ae(e)||St(e)||!!(Vn&&e&&e[Vn])}function Jn(e,t,n,r,i){var s=-1,o=e.length;for(n||(n=Oc),i||(i=[]);++s<o;){var c=e[s];t>0&&n(c)?t>1?Jn(c,t-1,n,r,i):Xn(i,c):r||(i[i.length]=c)}return i}function Ac(e){var t=e==null?0:e.length;return t?Jn(e,1):[]}function xc(e){return Fo(Ho(e,void 0,Ac),e+"")}function kc(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 Pc(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:kc(e,t,n)}var Mc="\\ud800-\\udfff",Lc="\\u0300-\\u036f",Rc="\\ufe20-\\ufe2f",Dc="\\u20d0-\\u20ff",Nc=Lc+Rc+Dc,Fc="\\ufe0e\\ufe0f",jc="\\u200d",Ic=RegExp("["+jc+Mc+Nc+Fc+"]");function At(e){return Ic.test(e)}function zc(e){return e.split("")}var Zn="\\ud800-\\udfff",$c="\\u0300-\\u036f",Bc="\\ufe20-\\ufe2f",Wc="\\u20d0-\\u20ff",Hc=$c+Bc+Wc,Uc="\\ufe0e\\ufe0f",Yc="["+Zn+"]",xt="["+Hc+"]",kt="\\ud83c[\\udffb-\\udfff]",Gc="(?:"+xt+"|"+kt+")",Qn="[^"+Zn+"]",qn="(?:\\ud83c[\\udde6-\\uddff]){2}",er="[\\ud800-\\udbff][\\udc00-\\udfff]",Kc="\\u200d",tr=Gc+"?",nr="["+Uc+"]?",Xc="(?:"+Kc+"(?:"+[Qn,qn,er].join("|")+")"+nr+tr+")*",Vc=nr+tr+Xc,Jc="(?:"+[Qn+xt+"?",xt,qn,er,Yc].join("|")+")",Zc=RegExp(kt+"(?="+kt+")|"+Jc+Vc,"g");function Qc(e){return e.match(Zc)||[]}function qc(e){return At(e)?Qc(e):zc(e)}function el(){this.__data__=new ce,this.size=0}function tl(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function nl(e){return this.__data__.get(e)}function rl(e){return this.__data__.has(e)}var il=200;function sl(e,t){var n=this.__data__;if(n instanceof ce){var r=n.__data__;if(!Me||r.length<il-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new le(r)}return n.set(e,t),this.size=n.size,this}function fe(e){var t=this.__data__=new ce(e);this.size=t.size}fe.prototype.clear=el,fe.prototype.delete=tl,fe.prototype.get=nl,fe.prototype.has=rl,fe.prototype.set=sl;function ol(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 al(){return[]}var cl=Object.prototype,ll=cl.propertyIsEnumerable,rr=Object.getOwnPropertySymbols,ul=rr?function(e){return e==null?[]:(e=Object(e),ol(rr(e),function(t){return ll.call(e,t)}))}:al;const fl=ul;function dl(e,t,n){var r=t(e);return ae(e)?r:Xn(r,n(e))}function ir(e){return dl(e,Ba,fl)}var hl=me(re,"DataView");const Pt=hl;var pl=me(re,"Promise");const Mt=pl;var gl=me(re,"Set");const Lt=gl;var sr="[object Map]",ml="[object Object]",or="[object Promise]",ar="[object Set]",cr="[object WeakMap]",lr="[object DataView]",vl=ge(Pt),yl=ge(Me),bl=ge(Mt),_l=ge(Lt),wl=ge(yt),ye=Se;(Pt&&ye(new Pt(new ArrayBuffer(1)))!=lr||Me&&ye(new Me)!=sr||Mt&&ye(Mt.resolve())!=or||Lt&&ye(new Lt)!=ar||yt&&ye(new yt)!=cr)&&(ye=function(e){var t=Se(e),n=t==ml?e.constructor:void 0,r=n?ge(n):"";if(r)switch(r){case vl:return lr;case yl:return sr;case bl:return or;case _l:return ar;case wl:return cr}return t});const ur=ye;var Sl=re.Uint8Array;const fr=Sl;var Tl="__lodash_hash_undefined__";function Cl(e){return this.__data__.set(e,Tl),this}function El(e){return this.__data__.has(e)}function Ke(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new le;++t<n;)this.add(e[t])}Ke.prototype.add=Ke.prototype.push=Cl,Ke.prototype.has=El;function Ol(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 Al(e,t){return e.has(t)}var xl=1,kl=2;function dr(e,t,n,r,i,s){var o=n&xl,c=e.length,u=t.length;if(c!=u&&!(o&&u>c))return!1;var a=s.get(e),f=s.get(t);if(a&&f)return a==t&&f==e;var d=-1,p=!0,v=n&kl?new Ke:void 0;for(s.set(e,t),s.set(t,e);++d<c;){var g=e[d],w=t[d];if(r)var y=o?r(w,g,d,t,e,s):r(g,w,d,e,t,s);if(y!==void 0){if(y)continue;p=!1;break}if(v){if(!Ol(t,function(O,$){if(!Al(v,$)&&(g===O||i(g,O,n,r,s)))return v.push($)})){p=!1;break}}else if(!(g===w||i(g,w,n,r,s))){p=!1;break}}return s.delete(e),s.delete(t),p}function Pl(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function Ml(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var Ll=1,Rl=2,Dl="[object Boolean]",Nl="[object Date]",Fl="[object Error]",jl="[object Map]",Il="[object Number]",zl="[object RegExp]",$l="[object Set]",Bl="[object String]",Wl="[object Symbol]",Hl="[object ArrayBuffer]",Ul="[object DataView]",hr=ie?ie.prototype:void 0,Rt=hr?hr.valueOf:void 0;function Yl(e,t,n,r,i,s,o){switch(n){case Ul:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Hl:return!(e.byteLength!=t.byteLength||!s(new fr(e),new fr(t)));case Dl:case Nl:case Il:return _t(+e,+t);case Fl:return e.name==t.name&&e.message==t.message;case zl:case Bl:return e==t+"";case jl:var c=Pl;case $l:var u=r&Ll;if(c||(c=Ml),e.size!=t.size&&!u)return!1;var a=o.get(e);if(a)return a==t;r|=Rl,o.set(e,t);var f=dr(c(e),c(t),r,i,s,o);return o.delete(e),f;case Wl:if(Rt)return Rt.call(e)==Rt.call(t)}return!1}var Gl=1,Kl=Object.prototype,Xl=Kl.hasOwnProperty;function Vl(e,t,n,r,i,s){var o=n&Gl,c=ir(e),u=c.length,a=ir(t),f=a.length;if(u!=f&&!o)return!1;for(var d=u;d--;){var p=c[d];if(!(o?p in t:Xl.call(t,p)))return!1}var v=s.get(e),g=s.get(t);if(v&&g)return v==t&&g==e;var w=!0;s.set(e,t),s.set(t,e);for(var y=o;++d<u;){p=c[d];var O=e[p],$=t[p];if(r)var F=o?r($,O,p,t,e,s):r(O,$,p,e,t,s);if(!(F===void 0?O===$||i(O,$,n,r,s):F)){w=!1;break}y||(y=p=="constructor")}if(w&&!y){var A=e.constructor,T=t.constructor;A!=T&&"constructor"in e&&"constructor"in t&&!(typeof A=="function"&&A instanceof A&&typeof T=="function"&&T instanceof T)&&(w=!1)}return s.delete(e),s.delete(t),w}var Jl=1,pr="[object Arguments]",gr="[object Array]",Xe="[object Object]",Zl=Object.prototype,mr=Zl.hasOwnProperty;function Ql(e,t,n,r,i,s){var o=ae(e),c=ae(t),u=o?gr:ur(e),a=c?gr:ur(t);u=u==pr?Xe:u,a=a==pr?Xe:a;var f=u==Xe,d=a==Xe,p=u==a;if(p&&Tt(e)){if(!Tt(t))return!1;o=!0,f=!1}if(p&&!f)return s||(s=new fe),o||Gn(e)?dr(e,t,n,r,i,s):Yl(e,t,u,n,r,i,s);if(!(n&Jl)){var v=f&&mr.call(e,"__wrapped__"),g=d&&mr.call(t,"__wrapped__");if(v||g){var w=v?e.value():e,y=g?t.value():t;return s||(s=new fe),i(w,y,n,r,s)}}return p?(s||(s=new fe),Vl(e,t,n,r,i,s)):!1}function vr(e,t,n,r,i){return e===t?!0:e==null||t==null||!Te(e)&&!Te(t)?e!==e&&t!==t:Ql(e,t,n,r,vr,i)}function ql(e,t){return e!=null&&t in Object(e)}function eu(e,t,n){t=Ge(t,e);for(var r=-1,i=t.length,s=!1;++r<i;){var o=Ot(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&&wt(i)&&bt(o,i)&&(ae(e)||St(e)))}function tu(e,t){return e!=null&&eu(e,t,ql)}function nu(e){return function(t){return t==null?void 0:t[e]}}var ru=function(){return re.Date.now()};const Dt=ru;var iu="Expected a function",su=Math.max,ou=Math.min;function yr(e,t,n){var r,i,s,o,c,u,a=0,f=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(iu);t=mt(t)||0,ue(n)&&(f=!!n.leading,d="maxWait"in n,s=d?su(mt(n.maxWait)||0,t):s,p="trailing"in n?!!n.trailing:p);function v(S){var P=r,D=i;return r=i=void 0,a=S,o=e.apply(D,P),o}function g(S){return a=S,c=setTimeout(O,t),f?v(S):o}function w(S){var P=S-u,D=S-a,I=t-P;return d?ou(I,s-D):I}function y(S){var P=S-u,D=S-a;return u===void 0||P>=t||P<0||d&&D>=s}function O(){var S=Dt();if(y(S))return $(S);c=setTimeout(O,w(S))}function $(S){return c=void 0,p&&r?v(S):(r=i=void 0,o)}function F(){c!==void 0&&clearTimeout(c),a=0,r=u=i=c=void 0}function A(){return c===void 0?o:$(Dt())}function T(){var S=Dt(),P=y(S);if(r=arguments,i=this,u=S,P){if(c===void 0)return g(u);if(d)return clearTimeout(c),c=setTimeout(O,t),v(u)}return c===void 0&&(c=setTimeout(O,t)),o}return T.cancel=F,T.flush=A,T}function au(e,t){return vr(e,t)}function cu(e,t,n,r){if(!ue(e))return e;t=Ge(t,e);for(var i=-1,s=t.length,o=s-1,c=e;c!=null&&++i<s;){var u=Ot(t[i]),a=n;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(i!=o){var f=c[u];a=r?r(f,u,c):void 0,a===void 0&&(a=ue(f)?f:bt(t[i+1])?[]:{})}Wo(c,u,a),c=c[u]}return e}function lu(e,t,n){for(var r=-1,i=t.length,s={};++r<i;){var o=t[r],c=Ec(e,o);n(c,o)&&cu(s,Ge(o,e),c)}return s}var uu=9007199254740991,fu=Math.floor;function br(e,t){var n="";if(!e||t<1||t>uu)return n;do t%2&&(n+=e),t=fu(t/2),t&&(e+=e);while(t);return n}var du=nu("length");const hu=du;var _r="\\ud800-\\udfff",pu="\\u0300-\\u036f",gu="\\ufe20-\\ufe2f",mu="\\u20d0-\\u20ff",vu=pu+gu+mu,yu="\\ufe0e\\ufe0f",bu="["+_r+"]",Nt="["+vu+"]",Ft="\\ud83c[\\udffb-\\udfff]",_u="(?:"+Nt+"|"+Ft+")",wr="[^"+_r+"]",Sr="(?:\\ud83c[\\udde6-\\uddff]){2}",Tr="[\\ud800-\\udbff][\\udc00-\\udfff]",wu="\\u200d",Cr=_u+"?",Er="["+yu+"]?",Su="(?:"+wu+"(?:"+[wr,Sr,Tr].join("|")+")"+Er+Cr+")*",Tu=Er+Cr+Su,Cu="(?:"+[wr+Nt+"?",Nt,Sr,Tr,bu].join("|")+")",Or=RegExp(Ft+"(?="+Ft+")|"+Cu+Tu,"g");function Eu(e){for(var t=Or.lastIndex=0;Or.test(e);)++t;return t}function Ar(e){return At(e)?Eu(e):hu(e)}var Ou=Math.ceil;function Au(e,t){t=t===void 0?" ":gt(t);var n=t.length;if(n<2)return n?br(t,e):t;var r=br(t,Ou(e/Ar(t)));return At(t)?Pc(qc(r),0,e).join(""):r.slice(0,e)}function xu(e,t,n){e=Kn(e),t=oo(t);var r=t?Ar(e):0;return t&&r<t?Au(t-r,n)+e:e}function ku(e,t){return lu(e,t,function(n,r){return tu(e,r)})}var Pu=xc(function(e,t){return e==null?{}:ku(e,t)});const xr=Pu;var Mu="Expected a function";function Lu(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(Mu);return ue(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),yr(e,t,{leading:r,maxWait:t,trailing:i})}const jt=Symbol(),Ru=Symbol(),It=Symbol();let Du=(e,t)=>new Proxy(e,t);const zt=Object.getPrototypeOf,$t=new WeakMap,kr=e=>e&&($t.has(e)?$t.get(e):zt(e)===Object.prototype||zt(e)===Array.prototype),Pr=e=>typeof e=="object"&&e!==null,Mr=new WeakMap,Lr=e=>e[It]||e,Rr=(e,t,n)=>{if(!kr(e))return e;const r=Lr(e),i=(o=>Object.isFrozen(o)||Object.values(Object.getOwnPropertyDescriptors(o)).some(c=>!c.writable))(r);let s=n&&n.get(r);return s&&s[1].f===i||(s=((o,c)=>{const u={f:c};let a=!1;const f=(p,v)=>{if(!a){let g=u.a.get(o);g||(g=new Set,u.a.set(o,g)),v&&g.has(jt)||g.add(p)}},d={get:(p,v)=>v===It?o:(f(v),Rr(p[v],u.a,u.c)),has:(p,v)=>v===Ru?(a=!0,u.a.delete(o),!0):(f(v),v in p),getOwnPropertyDescriptor:(p,v)=>(f(v,!0),Object.getOwnPropertyDescriptor(p,v)),ownKeys:p=>(f(jt),Reflect.ownKeys(p))};return c&&(d.set=d.deleteProperty=()=>!1),[d,u]})(r,i),s[1].p=Du(i?(o=>{let c=Mr.get(o);if(!c){if(Array.isArray(o))c=Array.from(o);else{const u=Object.getOwnPropertyDescriptors(o);Object.values(u).forEach(a=>{a.configurable=!0}),c=Object.create(zt(o),u)}Mr.set(o,c)}return c})(r):r,s[0]),n&&n.set(r,s)),s[1].a=t,s[1].c=n,s[1].p},Nu=(e,t)=>{const n=Reflect.ownKeys(e),r=Reflect.ownKeys(t);return n.length!==r.length||n.some((i,s)=>i!==r[s])},Dr=(e,t,n,r)=>{if(Object.is(e,t))return!1;if(!Pr(e)||!Pr(t))return!0;const i=n.get(Lr(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 c=o===jt?Nu(e,t):Dr(e[o],t[o],n,r);if(c!==!0&&c!==!1||(s=c),s)break}return s===null&&(s=!0),r&&r.set(e,{n:t,g:s}),s},Nr=e=>kr(e)&&e[It]||null,Fr=(e,t=!0)=>{$t.set(e,t)};var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ir={exports:{}},zr={};/**
 * @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 Ce=Be.default;function ju(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Iu=typeof Object.is=="function"?Object.is:ju,zu=Ce.useState,$u=Ce.useEffect,Bu=Ce.useLayoutEffect,Wu=Ce.useDebugValue;function Hu(e,t){var n=t(),r=zu({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Bu(function(){i.value=n,i.getSnapshot=t,Bt(i)&&s({inst:i})},[e,n,t]),$u(function(){return Bt(i)&&s({inst:i}),e(function(){Bt(i)&&s({inst:i})})},[e]),Wu(n),n}function Bt(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Iu(e,n)}catch{return!0}}function Uu(e,t){return t()}var Yu=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Uu:Hu;zr.useSyncExternalStore=Ce.useSyncExternalStore!==void 0?Ce.useSyncExternalStore:Yu,function(e){e.exports=zr}(Ir);const Gu=Fu(Ir.exports),Wt=e=>typeof e=="object"&&e!==null,q=Symbol(),Ht=new WeakSet,Ku=(e=Object.is,t=(a,f)=>new Proxy(a,f),n=a=>Wt(a)&&!Ht.has(a)&&(Array.isArray(a)||!(Symbol.iterator in a))&&!(a instanceof WeakMap)&&!(a instanceof WeakSet)&&!(a instanceof Error)&&!(a instanceof Number)&&!(a instanceof Date)&&!(a instanceof String)&&!(a instanceof RegExp)&&!(a instanceof ArrayBuffer),r=a=>{switch(a.status){case"fulfilled":return a.value;case"rejected":throw a.reason;default:throw a}},i=new WeakMap,s=(a,f,d,p=r)=>{const v=i.get(f);if((v==null?void 0:v[0])===d)return v[1];const g=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a));return Fr(g,!0),i.set(f,[d,g]),Reflect.ownKeys(a).forEach(w=>{const y=Reflect.get(a,w,f);Ht.has(y)?(Fr(y,!1),g[w]=y):y instanceof Promise?Object.defineProperty(g,w,{get(){return p(y)}}):y!=null&&y[q]?g[w]=Ut(y,p):g[w]=y}),Object.freeze(g)},o=new WeakMap,c=[1],u=a=>{if(!Wt(a))throw new Error("object required");const f=o.get(a);if(f)return f;let d=c[0];const p=new Set,v=(A,T=++c[0])=>{d!==T&&(d=T,p.forEach(S=>S(A,T)))},g=new Map,w=A=>{let T=g.get(A);return T||(T=(S,P)=>{const D=[...S];D[1]=[A,...D[1]],v(D,P)},g.set(A,T)),T},y=A=>{const T=g.get(A);return g.delete(A),T},O=Array.isArray(a)?[]:Object.create(Object.getPrototypeOf(a)),F=t(O,{get(A,T,S){return T===q?[A,S,d,s,p]:Reflect.get(A,T,S)},deleteProperty(A,T){var S;const P=Reflect.get(A,T),D=(S=P==null?void 0:P[q])==null?void 0:S[4];D&&D.delete(y(T));const I=Reflect.deleteProperty(A,T);return I&&v(["delete",[T],P]),I},set(A,T,S,P){var D,I;const z=Reflect.has(A,T),Z=Reflect.get(A,T,P);if(z&&e(Z,S))return!0;const V=(D=Z==null?void 0:Z[q])==null?void 0:D[4];V&&V.delete(y(T)),Wt(S)&&(S=Nr(S)||S);let k=S;return(I=Object.getOwnPropertyDescriptor(A,T))!=null&&I.set||(S instanceof Promise?S.then(E=>{S.status="fulfilled",S.value=E,v(["resolve",[T],E])}).catch(E=>{S.status="rejected",S.reason=E,v(["reject",[T],E])}):(!(S!=null&&S[q])&&n(S)&&(k=Ve(S)),k!=null&&k[q]&&k[q][4].add(w(T)))),Reflect.set(A,T,k,P),v(["set",[T],S,Z]),!0}});return o.set(a,F),Reflect.ownKeys(a).forEach(A=>{const T=Object.getOwnPropertyDescriptor(a,A);T.get||T.set?Object.defineProperty(O,A,T):F[A]=a[A]}),F})=>[u,q,Ht,e,t,n,r,i,s,o,c],[Xu]=Ku();function Ve(e={}){return Xu(e)}function $r(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=e[q][4],o=c=>{if(i.push(c),n){t(i.splice(0));return}r||(r=Promise.resolve().then(()=>{r=void 0,s.has(o)&&t(i.splice(0))}))};return s.add(o),()=>s.delete(o)}function Ut(e,t){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(e!=null&&e[q])&&console.warn("Please use proxy object");const[n,r,i,s]=e[q];return s(n,r,i,t)}const{use:Br}=Be.default,{useSyncExternalStore:Vu}=Gu,Ju=(e,t)=>{const n=[],r=new WeakSet,i=(s,o)=>{if(r.has(s))return;let c;typeof s=="object"&&s!==null&&(r.add(s),c=t.get(Nr(s)||s)),c?c.forEach(u=>{"value"in(Object.getOwnPropertyDescriptor(s,u)||{})&&i(s[u],o?[...o,u]:[u])}):o&&n.push(o)};return i(e),n},Zu=(e,t)=>{const n=b.useRef();b.useEffect(()=>{n.current=Ju(e,t)}),b.useDebugValue(n.current)};function Yt(e,t){const n=t==null?void 0:t.sync,r=b.useRef(),i=b.useRef();let s=!0;const o=Vu(b.useCallback(a=>{const f=$r(e,a,n);return a(),f},[e,n]),()=>{const a=Ut(e,Br);try{if(!s&&r.current&&i.current&&!Dr(r.current,a,i.current,new WeakMap))return r.current}catch{}return a},()=>Ut(e,Br));s=!1;const c=new WeakMap;b.useEffect(()=>{r.current=o,i.current=c}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Zu(o,c);const u=b.useMemo(()=>new WeakMap,[]);return Rr(o,c,u)}const Wr={accessKey:"",useNarrowMode:!1,initialShowMore:!1},Hr=Object.keys(Wr),se=Ve(Wr),Gt=function(){return Yt(se)},Ur="bilibili-app-recommend.config";function Qu(){const e=GM_getValue(Ur);e&&typeof e=="object"&&Object.assign(se,xr(e,Hr)),$r(se,()=>{qu()})}function qu(){const e=xr(se,Hr);GM_setValue(Ur,e)}function Yr(e){Object.assign(se,e)}Qu();var Kt={exports:{}};const ef=(e,t)=>Math.floor(Math.random()*(t-e+1)+e),Gr=()=>{const e=new Error("Delay aborted");return e.name="AbortError",e},Kr=({clearTimeout:e,setTimeout:t,willResolve:n})=>(r,{value:i,signal:s}={})=>{if(s&&s.aborted)return Promise.reject(Gr());let o,c,u;const a=e||clearTimeout,f=()=>{a(o),u(Gr())},d=()=>{s&&s.removeEventListener("abort",f)},p=new Promise((v,g)=>{c=()=>{d(),n?v(i):g(i)},u=g,o=(t||setTimeout)(c,r)});return s&&s.addEventListener("abort",f,{once:!0}),p.clear=()=>{a(o),o=null,c()},p},Xr=e=>{const t=Kr({...e,willResolve:!0});return t.reject=Kr({...e,willResolve:!1}),t.range=(n,r,i)=>t(ef(n,r),i),t},Xt=Xr();Xt.createWithTimers=Xr,Kt.exports=Xt,Kt.exports.default=Xt;var Vt,Vr=Ls.default;Vt=Vr.createRoot,Vr.hydrateRoot;const Jr="_toast-container_9119l_1",Kh={toastContainer:Jr};function te(e,t=2e3){const n=document.createElement("div");n.className=Jr,n.innerText=e,document.body.appendChild(n),setTimeout(()=>n.remove(),t)}const tf="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",nf="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Zr(){return te(tf)}function Qr(){return te(nf)}const rf="https://api.bilibili.com",qr="https://app.bilibili.com",Jt=pt.default.create({baseURL:rf});Jt.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 Je=pt.default.create({adapter:Rs.default});Je.interceptors.request.use(function(e){return e.params={access_key:se.accessKey||"",...e.params},e},function(e){return Promise.reject(e)}),Je.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});var Ze={exports:{}},Zt={exports:{}},ei={},sf=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"},Qt={exports:{}};typeof Object.create=="function"?Qt.exports=function(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:Qt.exports=function(t,n){t.super_=n;var r=function(){};r.prototype=n.prototype,t.prototype=new r,t.prototype.constructor=t},function(e){var t=/%[sdj%]/g;e.format=function(l){if(!F(l)){for(var h=[],_=0;_<arguments.length;_++)h.push(i(arguments[_]));return h.join(" ")}for(var _=1,x=arguments,j=x.length,M=String(l).replace(t,function(B){if(B==="%%")return"%";if(_>=j)return B;switch(B){case"%s":return String(x[_++]);case"%d":return Number(x[_++]);case"%j":try{return JSON.stringify(x[_++])}catch{return"[Circular]"}default:return B}}),R=x[_];_<j;R=x[++_])y(R)||!P(R)?M+=" "+R:M+=" "+i(R);return M},e.deprecate=function(l,h){if(T(jr.process))return function(){return e.deprecate(l,h).apply(this,arguments)};if(process.noDeprecation===!0)return l;var _=!1;function x(){if(!_){if(process.throwDeprecation)throw new Error(h);process.traceDeprecation?console.trace(h):console.error(h),_=!0}return l.apply(this,arguments)}return x};var n={},r;e.debuglog=function(l){if(T(r)&&(r=process.env.NODE_DEBUG||""),l=l.toUpperCase(),!n[l])if(new RegExp("\\b"+l+"\\b","i").test(r)){var h=process.pid;n[l]=function(){var _=e.format.apply(e,arguments);console.error("%s %d: %s",l,h,_)}}else n[l]=function(){};return n[l]};function i(l,h){var _={seen:[],stylize:o};return arguments.length>=3&&(_.depth=arguments[2]),arguments.length>=4&&(_.colors=arguments[3]),w(h)?_.showHidden=h:h&&e._extend(_,h),T(_.showHidden)&&(_.showHidden=!1),T(_.depth)&&(_.depth=2),T(_.colors)&&(_.colors=!1),T(_.customInspect)&&(_.customInspect=!0),_.colors&&(_.stylize=s),u(_,l,_.depth)}e.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(l,h){var _=i.styles[h];return _?"\x1B["+i.colors[_][0]+"m"+l+"\x1B["+i.colors[_][1]+"m":l}function o(l,h){return l}function c(l){var h={};return l.forEach(function(_,x){h[_]=!0}),h}function u(l,h,_){if(l.customInspect&&h&&z(h.inspect)&&h.inspect!==e.inspect&&!(h.constructor&&h.constructor.prototype===h)){var x=h.inspect(_,l);return F(x)||(x=u(l,x,_)),x}var j=a(l,h);if(j)return j;var M=Object.keys(h),R=c(M);if(l.showHidden&&(M=Object.getOwnPropertyNames(h)),I(h)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return f(h);if(M.length===0){if(z(h)){var B=h.name?": "+h.name:"";return l.stylize("[Function"+B+"]","special")}if(S(h))return l.stylize(RegExp.prototype.toString.call(h),"regexp");if(D(h))return l.stylize(Date.prototype.toString.call(h),"date");if(I(h))return f(h)}var W="",G=!1,J=["{","}"];if(g(h)&&(G=!0,J=["[","]"]),z(h)){var oe=h.name?": "+h.name:"";W=" [Function"+oe+"]"}if(S(h)&&(W=" "+RegExp.prototype.toString.call(h)),D(h)&&(W=" "+Date.prototype.toUTCString.call(h)),I(h)&&(W=" "+f(h)),M.length===0&&(!G||h.length==0))return J[0]+W+J[1];if(_<0)return S(h)?l.stylize(RegExp.prototype.toString.call(h),"regexp"):l.stylize("[Object]","special");l.seen.push(h);var Y;return G?Y=d(l,h,_,R,M):Y=M.map(function(ee){return p(l,h,_,R,ee,G)}),l.seen.pop(),v(Y,W,J)}function a(l,h){if(T(h))return l.stylize("undefined","undefined");if(F(h)){var _="'"+JSON.stringify(h).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return l.stylize(_,"string")}if($(h))return l.stylize(""+h,"number");if(w(h))return l.stylize(""+h,"boolean");if(y(h))return l.stylize("null","null")}function f(l){return"["+Error.prototype.toString.call(l)+"]"}function d(l,h,_,x,j){for(var M=[],R=0,B=h.length;R<B;++R)L(h,String(R))?M.push(p(l,h,_,x,String(R),!0)):M.push("");return j.forEach(function(W){W.match(/^\d+$/)||M.push(p(l,h,_,x,W,!0))}),M}function p(l,h,_,x,j,M){var R,B,W;if(W=Object.getOwnPropertyDescriptor(h,j)||{value:h[j]},W.get?W.set?B=l.stylize("[Getter/Setter]","special"):B=l.stylize("[Getter]","special"):W.set&&(B=l.stylize("[Setter]","special")),L(x,j)||(R="["+j+"]"),B||(l.seen.indexOf(W.value)<0?(y(_)?B=u(l,W.value,null):B=u(l,W.value,_-1),B.indexOf(`
`)>-1&&(M?B=B.split(`
`).map(function(G){return"  "+G}).join(`
`).substr(2):B=`
`+B.split(`
`).map(function(G){return"   "+G}).join(`
`))):B=l.stylize("[Circular]","special")),T(R)){if(M&&j.match(/^\d+$/))return B;R=JSON.stringify(""+j),R.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(R=R.substr(1,R.length-2),R=l.stylize(R,"name")):(R=R.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),R=l.stylize(R,"string"))}return R+": "+B}function v(l,h,_){var x=l.reduce(function(j,M){return M.indexOf(`
`)>=0,j+M.replace(/\u001b\[\d\d?m/g,"").length+1},0);return x>60?_[0]+(h===""?"":h+`
 `)+" "+l.join(`,
  `)+" "+_[1]:_[0]+h+" "+l.join(", ")+" "+_[1]}function g(l){return Array.isArray(l)}e.isArray=g;function w(l){return typeof l=="boolean"}e.isBoolean=w;function y(l){return l===null}e.isNull=y;function O(l){return l==null}e.isNullOrUndefined=O;function $(l){return typeof l=="number"}e.isNumber=$;function F(l){return typeof l=="string"}e.isString=F;function A(l){return typeof l=="symbol"}e.isSymbol=A;function T(l){return l===void 0}e.isUndefined=T;function S(l){return P(l)&&V(l)==="[object RegExp]"}e.isRegExp=S;function P(l){return typeof l=="object"&&l!==null}e.isObject=P;function D(l){return P(l)&&V(l)==="[object Date]"}e.isDate=D;function I(l){return P(l)&&(V(l)==="[object Error]"||l instanceof Error)}e.isError=I;function z(l){return typeof l=="function"}e.isFunction=z;function Z(l){return l===null||typeof l=="boolean"||typeof l=="number"||typeof l=="string"||typeof l=="symbol"||typeof l>"u"}e.isPrimitive=Z,e.isBuffer=sf;function V(l){return Object.prototype.toString.call(l)}function k(l){return l<10?"0"+l.toString(10):l.toString(10)}var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var l=new Date,h=[k(l.getHours()),k(l.getMinutes()),k(l.getSeconds())].join(":");return[l.getDate(),E[l.getMonth()],h].join(" ")}e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=Qt.exports,e._extend=function(l,h){if(!h||!P(h))return l;for(var _=Object.keys(h),x=_.length;x--;)l[_[x]]=h[_[x]];return l};function L(l,h){return Object.prototype.hasOwnProperty.call(l,h)}}(ei);var of=ei.format;function af(){(typeof AbortController>"u"||typeof AbortSignal>"u")&&console.error("[promise.timeout] need global AbortController & AbortSingal")}function cf(e,t){return function(){var n=this,r=[].slice.call(arguments);af();var i=new AbortController;return r.push(i.signal),new Promise(function(s,o){var c=setTimeout(function(){var u=new Qe(t);o(u),i.abort()},t);Promise.resolve(e.apply(n,r)).then(function(u){clearTimeout(c),s(u)},function(u){clearTimeout(c),o(u)})})}}class Qe extends Error{constructor(t){super(),this.timeout=t,this.message=of("timeout of %sms exceed",t),Error.captureStackTrace(this,Qe)}}Zt.exports=cf,Zt.exports.TimeoutError=Qe;const ti=Zt.exports,lf=ti.TimeoutError;Ze.exports=function(t,n){const r=t;n=n||{};const i=n.times||5,s=n.timeout;s&&(t=ti(t,s));const o=n.onerror;return async function(){const c=this,u=[].slice.call(arguments),a=new Array(i);for(let f=0;f<i;f++){let d,p;try{d=await t.apply(c,u)}catch(v){p=v}if(!p)return d;if(p instanceof TypeError)throw p;if(p instanceof uf)throw p.originalError;a[f]=p,o&&o(p,f)}throw new ni({times:i,timeout:s,fn:r,errors:a})}};class ni extends Error{constructor(t){super(),this.times=t.times,this.timeout=t.timeout,this.fn=t.fn,this.errors=t.errors,this.name="RetryError",this.message=`tried function ${this.fn.name||"<anonymous>"} ${this.times} times`,this.timeout&&(this.message+=` with timeout = ${this.timeout}ms`),Error.captureStackTrace(this,this.constructor)}}class uf extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}var ff=Ze.exports.RetryError=ni;Ze.exports.TimeoutError=lf;const df="bilibili-app-recommend".toUpperCase();class qt extends Error{constructor(n){super();ht(this,"json");Error.captureStackTrace(this,qt),this.json=n}}async function hf(){const t=(await Je.get(qr+"/x/feed/index",{responseType:"json",params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)+"0"+(Math.random()*10).toFixed(0)}})).data;if(!t.data){if(t.code===-663)throw new qt(t);return te(`${df}: \u672A\u77E5\u9519\u8BEF, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005

  code=${t.code} message=${t.message||""}`,1e4),[]}return t.data}const pf=Ze.exports(hf,{times:5,timeout:2e3});async function gf(){try{return await pf()}catch(e){throw e instanceof ff&&(console.error(e.errors),te("\u8BF7\u6C42\u51FA\u9519, \u8BF7\u91CD\u8BD5 !!!")),e}}async function mf(){return en(2)}async function en(e){const t=new Array(e).fill(0).map(i=>gf());let r=(await Promise.all(t)).reduce((i,s)=>i.concat(s||[]),[]);return r=vf(r),r.map(i=>({...i,uniqId:i.param+"-"+crypto.randomUUID()}))}function vf(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}async function yf(){var u,a;const t=(await pt.default.get("https://passport.bilibili.com/login/app/third",{params:{appkey:"27eb53fc9058f8c3",api:"https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png",sign:"04224646d1fea004e79606d3b038c84a"},withCredentials:!0})).data;if(!((u=t==null?void 0:t.data)!=null&&u.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:t};if(!((a=t==null?void 0:t.data)!=null&&a.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(f=>{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 f({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});f(p[1])}),r=setTimeout(()=>{f({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},10*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 c=await i;return o(),c}async function bf(){const e=await yf();if(typeof e=="object"&&"errmsg"in e){te(e.errmsg);return}const t=e;return se.accessKey=t,te("\u83B7\u53D6\u6210\u529F"),t}function _f(){se.accessKey="",te("\u5DF2\u5220\u9664 access_key")}var wf=function(t){return function(n,r){var i=b.useRef(!1);t(function(){return function(){i.current=!1}},[]),t(function(){if(!i.current)i.current=!0;else return n()},r)}},Ee=function(t){return typeof t=="function"},Sf=function(t){return typeof t=="string"},ri=function(t){return typeof t=="number"},Tf=!1;const tn=Tf;function U(e){tn&&(Ee(e)||console.error("useMemoizedFn expected parameter is a function, got ".concat(typeof e)));var t=b.useRef(e);t.current=b.useMemo(function(){return e},[e]);var n=b.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 nn=wf(b.useEffect);var ii=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},si=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},oi=function(t,n){var r=n.manual,i=n.ready,s=i===void 0?!0:i,o=n.defaultParams,c=o===void 0?[]:o,u=n.refreshDeps,a=u===void 0?[]:u,f=n.refreshDepsAction,d=b.useRef(!1);return d.current=!1,nn(function(){!r&&s&&(d.current=!0,t.run.apply(t,si([],ii(c),!1)))},[s]),nn(function(){d.current||r||(d.current=!0,f?f():t.refresh())},si([],ii(a),!1)),{onBefore:function(){if(!s)return{stopNow:!0}}}};oi.onInit=function(e){var t=e.ready,n=t===void 0?!0:t,r=e.manual;return{loading:!r&&n}};const Cf=oi;function rn(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 ai(e,t){var n=b.useRef({deps:t,obj:void 0,initialized:!1}).current;return(n.initialized===!1||!rn(n.deps,t))&&(n.deps=t,n.obj=e(),n.initialized=!0),n.obj}function Le(e){var t=b.useRef(e);return t.current=e,t}var Ef=function(t){tn&&(Ee(t)||console.error("useUnmount expected parameter is a function, got ".concat(typeof t)));var n=Le(t);b.useEffect(function(){return function(){n.current()}},[])};const Re=Ef;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)},et=new Map,Of=function(t,n,r){var i=et.get(t);i!=null&&i.timer&&clearTimeout(i.timer);var s=void 0;n>-1&&(s=setTimeout(function(){et.delete(t)},n)),et.set(t,qe(qe({},r),{timer:s}))},Af=function(t){return et.get(t)},tt=new Map,xf=function(t){return tt.get(t)},kf=function(t,n){tt.set(t,n),n.then(function(r){return tt.delete(t),r}).catch(function(){tt.delete(t)})},be={},Pf=function(t,n){be[t]&&be[t].forEach(function(r){return r(n)})},sn=function(t,n){return be[t]||(be[t]=[]),be[t].push(n),function(){var i=be[t].indexOf(n);be[t].splice(i,1)}},Mf=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Lf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Rf=function(t,n){var r=n.cacheKey,i=n.cacheTime,s=i===void 0?5*60*1e3:i,o=n.staleTime,c=o===void 0?0:o,u=n.setCache,a=n.getCache,f=b.useRef(),d=b.useRef(),p=function(w,y){u?u(y):Of(w,s,y),Pf(w,y.data)},v=function(w,y){return y===void 0&&(y=[]),a?a(y):Af(w)};return ai(function(){if(!!r){var g=v(r);g&&Object.hasOwnProperty.call(g,"data")&&(t.state.data=g.data,t.state.params=g.params,(c===-1||new Date().getTime()-g.time<=c)&&(t.state.loading=!1)),f.current=sn(r,function(w){t.setState({data:w})})}},[]),Re(function(){var g;(g=f.current)===null||g===void 0||g.call(f)}),r?{onBefore:function(w){var y=v(r,w);return!y||!Object.hasOwnProperty.call(y,"data")?{}:c===-1||new Date().getTime()-y.time<=c?{loading:!1,data:y==null?void 0:y.data,error:void 0,returnNow:!0}:{data:y==null?void 0:y.data,error:void 0}},onRequest:function(w,y){var O=xf(r);return O&&O!==d.current?{servicePromise:O}:(O=w.apply(void 0,Lf([],Mf(y),!1)),d.current=O,kf(r,O),{servicePromise:O})},onSuccess:function(w,y){var O;r&&((O=f.current)===null||O===void 0||O.call(f),p(r,{data:w,params:y,time:new Date().getTime()}),f.current=sn(r,function($){t.setState({data:$})}))},onMutate:function(w){var y;r&&((y=f.current)===null||y===void 0||y.call(f),p(r,{data:w,params:t.state.params,time:new Date().getTime()}),f.current=sn(r,function(O){t.setState({data:O})}))}}:{}};const Df=Rf;var Nf=globalThis&&globalThis.__read||function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Ff=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},jf=function(t,n){var r=n.debounceWait,i=n.debounceLeading,s=n.debounceTrailing,o=n.debounceMaxWait,c=b.useRef(),u=b.useMemo(function(){var a={};return i!==void 0&&(a.leading=i),s!==void 0&&(a.trailing=s),o!==void 0&&(a.maxWait=o),a},[i,s,o]);return b.useEffect(function(){if(r){var a=t.runAsync.bind(t);return c.current=yr(function(f){f()},r,u),t.runAsync=function(){for(var f=[],d=0;d<arguments.length;d++)f[d]=arguments[d];return new Promise(function(p,v){var g;(g=c.current)===null||g===void 0||g.call(c,function(){a.apply(void 0,Ff([],Nf(f),!1)).then(p).catch(v)})})},function(){var f;(f=c.current)===null||f===void 0||f.cancel(),t.runAsync=a}}},[r,u]),r?{onCancel:function(){var f;(f=c.current)===null||f===void 0||f.cancel()}}:{}};const If=jf;var zf=function(t,n){var r=n.loadingDelay,i=b.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 $f=zf;var Bf=!!(typeof window<"u"&&window.document&&window.document.createElement);const De=Bf;function on(){return De?document.visibilityState!=="hidden":!0}var Ne=[];function Wf(e){return Ne.push(e),function(){var n=Ne.indexOf(e);Ne.splice(n,1)}}if(De){var Hf=function(){if(!!on())for(var t=0;t<Ne.length;t++){var n=Ne[t];n()}};window.addEventListener("visibilitychange",Hf,!1)}var Uf=function(t,n){var r=n.pollingInterval,i=n.pollingWhenHidden,s=i===void 0?!0:i,o=n.pollingErrorRetryCount,c=o===void 0?-1:o,u=b.useRef(),a=b.useRef(),f=b.useRef(0),d=function(){var v;u.current&&clearTimeout(u.current),(v=a.current)===null||v===void 0||v.call(a)};return nn(function(){r||d()},[r]),r?{onBefore:function(){d()},onError:function(){f.current+=1},onSuccess:function(){f.current=0},onFinally:function(){c===-1||c!==-1&&f.current<=c?u.current=setTimeout(function(){!s&&!on()?a.current=Wf(function(){t.refresh()}):t.refresh()},r):f.current=0},onCancel:function(){d()}}:{}};const Yf=Uf;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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Kf=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function Xf(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,Kf([],Gf(r),!1)),setTimeout(function(){n=!1},t))}}function Vf(){return De&&typeof navigator.onLine<"u"?navigator.onLine:!0}var Fe=[];function Jf(e){return Fe.push(e),function(){var n=Fe.indexOf(e);n>-1&&Fe.splice(n,1)}}if(De){var ci=function(){if(!(!on()||!Vf()))for(var t=0;t<Fe.length;t++){var n=Fe[t];n()}};window.addEventListener("visibilitychange",ci,!1),window.addEventListener("focus",ci,!1)}var Zf=function(t,n){var r=n.refreshOnWindowFocus,i=n.focusTimespan,s=i===void 0?5e3:i,o=b.useRef(),c=function(){var a;(a=o.current)===null||a===void 0||a.call(o)};return b.useEffect(function(){if(r){var u=Xf(t.refresh.bind(t),s);o.current=Jf(function(){u()})}return function(){c()}},[r,s]),Re(function(){c()}),{}};const Qf=Zf;var qf=function(t,n){var r=n.retryInterval,i=n.retryCount,s=b.useRef(),o=b.useRef(0),c=b.useRef(!1);return i?{onBefore:function(){c.current||(o.current=0),c.current=!1,s.current&&clearTimeout(s.current)},onSuccess:function(){o.current=0},onError:function(){if(o.current+=1,i===-1||o.current<=i){var a=r!=null?r:Math.min(1e3*Math.pow(2,o.current),3e4);s.current=setTimeout(function(){c.current=!0,t.refresh()},a)}else o.current=0},onCancel:function(){o.current=0,s.current&&clearTimeout(s.current)}}:{}};const ed=qf;var td=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},nd=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},rd=function(t,n){var r=n.throttleWait,i=n.throttleLeading,s=n.throttleTrailing,o=b.useRef(),c={};return i!==void 0&&(c.leading=i),s!==void 0&&(c.trailing=s),b.useEffect(function(){if(r){var u=t.runAsync.bind(t);return o.current=Lu(function(a){a()},r,c),t.runAsync=function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];return new Promise(function(d,p){var v;(v=o.current)===null||v===void 0||v.call(o,function(){u.apply(void 0,nd([],td(a),!1)).then(d).catch(p)})})},function(){var a;t.runAsync=u,(a=o.current)===null||a===void 0||a.cancel()}}},[r,i,s]),r?{onCancel:function(){var a;(a=o.current)===null||a===void 0||a.cancel()}}:{}};const id=rd;var sd=function(t){tn&&(Ee(t)||console.error('useMount: parameter `fn` expected to be a function, but got "'.concat(typeof t,'".'))),b.useEffect(function(){t==null||t()},[])};const od=sd;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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},cd=function(){var t=ad(b.useState({}),2),n=t[1];return b.useCallback(function(){return n({})},[])};const ld=cd;var de=globalThis&&globalThis.__assign||function(){return de=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},de.apply(this,arguments)},ud=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 c(f){try{a(r.next(f))}catch(d){o(d)}}function u(f){try{a(r.throw(f))}catch(d){o(d)}}function a(f){f.done?s(f.value):i(f.value).then(c,u)}a((r=r.apply(e,t||[])).next())})},fd=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:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(a){return function(f){return u([a,f])}}function u(a){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(s=a[0]&2?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[a[0]&2,s.value]),a[0]){case 0:case 1:s=a;break;case 4:return n.label++,{value:a[1],done:!1};case 5:n.label++,i=a[1],a=[0];continue;case 7:a=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){n.label=a[1];break}if(a[0]===6&&n.label<s[1]){n.label=s[1],s=a;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(a);break}s[2]&&n.ops.pop(),n.trys.pop();continue}a=t.call(e,n)}catch(f){a=[6,f],i=0}finally{r=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}},dd=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},Oe=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Ae=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},hd=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=de(de(de({},this.state),{loading:!n.manual}),i)}return e.prototype.setState=function(t){t===void 0&&(t={}),this.state=de(de({},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,Ae([s],Oe(n),!1))}).filter(Boolean);return Object.assign.apply(Object,Ae([{}],Oe(i),!1))},e.prototype.runAsync=function(){for(var t,n,r,i,s,o,c,u,a,f,d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];return ud(this,void 0,void 0,function(){var v,g,w,y,O,$,F,A,T,S,P;return fd(this,function(D){switch(D.label){case 0:if(this.count+=1,v=this.count,g=this.runPluginHandler("onBefore",d),w=g.stopNow,y=w===void 0?!1:w,O=g.returnNow,$=O===void 0?!1:O,F=dd(g,["stopNow","returnNow"]),y)return[2,new Promise(function(){})];if(this.setState(de({loading:!0,params:d},F)),$)return[2,Promise.resolve(F.data)];(n=(t=this.options).onBefore)===null||n===void 0||n.call(t,d),D.label=1;case 1:return D.trys.push([1,3,,4]),A=this.runPluginHandler("onRequest",this.serviceRef.current,d).servicePromise,A||(A=(P=this.serviceRef).current.apply(P,Ae([],Oe(d),!1))),[4,A];case 2:return T=D.sent(),v!==this.count?[2,new Promise(function(){})]:(this.setState({data:T,error:void 0,loading:!1}),(i=(r=this.options).onSuccess)===null||i===void 0||i.call(r,T,d),this.runPluginHandler("onSuccess",T,d),(o=(s=this.options).onFinally)===null||o===void 0||o.call(s,d,T,void 0),v===this.count&&this.runPluginHandler("onFinally",d,T,void 0),[2,T]);case 3:if(S=D.sent(),v!==this.count)return[2,new Promise(function(){})];throw this.setState({error:S,loading:!1}),(u=(c=this.options).onError)===null||u===void 0||u.call(c,S,d),this.runPluginHandler("onError",S,d),(f=(a=this.options).onFinally)===null||f===void 0||f.call(a,d,void 0,S),v===this.count&&this.runPluginHandler("onFinally",d,void 0,S),S;case 4:return[2]}})})},e.prototype.run=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];this.runAsync.apply(this,Ae([],Oe(n),!1)).catch(function(i){t.options.onError||console.error(i)})},e.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},e.prototype.refresh=function(){this.run.apply(this,Ae([],Oe(this.state.params||[]),!1))},e.prototype.refreshAsync=function(){return this.runAsync.apply(this,Ae([],Oe(this.state.params||[]),!1))},e.prototype.mutate=function(t){var n=Ee(t)?t(this.state.data):t;this.runPluginHandler("onMutate",n),this.setState({data:n})},e}();const pd=hd;var an=globalThis&&globalThis.__assign||function(){return an=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},an.apply(this,arguments)},gd=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},li=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},ui=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function md(e,t,n){t===void 0&&(t={}),n===void 0&&(n=[]);var r=t.manual,i=r===void 0?!1:r,s=gd(t,["manual"]),o=an({manual:i},s),c=Le(e),u=ld(),a=ai(function(){var f=n.map(function(d){var p;return(p=d==null?void 0:d.onInit)===null||p===void 0?void 0:p.call(d,o)}).filter(Boolean);return new pd(c,o,u,Object.assign.apply(Object,ui([{}],li(f),!1)))},[]);return a.options=o,a.pluginImpls=n.map(function(f){return f(a,o)}),od(function(){if(!i){var f=a.state.params||t.defaultParams||[];a.run.apply(a,ui([],li(f),!1))}}),Re(function(){a.cancel()}),{loading:a.state.loading,data:a.state.data,error:a.state.error,params:a.state.params||[],cancel:U(a.cancel.bind(a)),refresh:U(a.refresh.bind(a)),refreshAsync:U(a.refreshAsync.bind(a)),run:U(a.run.bind(a)),runAsync:U(a.runAsync.bind(a)),mutate:U(a.mutate.bind(a))}}var vd=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},fi=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))};function di(e,t,n){return md(e,t,fi(fi([],vd(n||[]),!1),[If,$f,Yf,Qf,id,Cf,Df,ed],!1))}var yd=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function hi(e,t){e===void 0&&(e=!1);var n=yd(b.useState(e),2),r=n[0],i=n[1],s=b.useMemo(function(){var o=t===void 0?!e:t,c=function(){return i(function(p){return p===e?o:e})},u=function(p){return i(p)},a=function(){return i(e)},f=function(){return i(o)};return{toggle:c,set:u,setLeft:a,setRight:f}},[]);return[r,s]}var bd=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function _d(e){e===void 0&&(e=!1);var t=bd(hi(e),2),n=t[0],r=t[1],i=r.toggle,s=r.set,o=b.useMemo(function(){var c=function(){return s(!0)},u=function(){return s(!1)};return{toggle:i,set:function(f){return s(!!f)},setTrue:c,setFalse:u}},[]);return[n,o]}function nt(e,t){if(!!De){if(!e)return t;var n;return Ee(e)?n=e():"current"in e?n=e.current:n=e,n}}var wd=function(t){var n=function(i,s,o){var c=b.useRef(!1),u=b.useRef([]),a=b.useRef([]),f=b.useRef();t(function(){var d,p=Array.isArray(o)?o:[o],v=p.map(function(g){return nt(g)});if(!c.current){c.current=!0,u.current=v,a.current=s,f.current=i();return}(v.length!==u.current.length||!rn(v,u.current)||!rn(s,a.current))&&((d=f.current)===null||d===void 0||d.call(f),u.current=v,a.current=s,f.current=i())}),Re(function(){var d;(d=f.current)===null||d===void 0||d.call(f),c.current=!1})};return n},Sd=wd(b.useEffect);const pi=Sd;var gi={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(jr,function(){var n=1e3,r=6e4,i=36e5,s="millisecond",o="second",c="minute",u="hour",a="day",f="week",d="month",p="quarter",v="year",g="date",w="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,$={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var E=["th","st","nd","rd"],C=k%100;return"["+k+(E[(C-20)%10]||E[C]||E[0])+"]"}},F=function(k,E,C){var L=String(k);return!L||L.length>=E?k:""+Array(E+1-L.length).join(C)+k},A={s:F,z:function(k){var E=-k.utcOffset(),C=Math.abs(E),L=Math.floor(C/60),l=C%60;return(E<=0?"+":"-")+F(L,2,"0")+":"+F(l,2,"0")},m:function k(E,C){if(E.date()<C.date())return-k(C,E);var L=12*(C.year()-E.year())+(C.month()-E.month()),l=E.clone().add(L,d),h=C-l<0,_=E.clone().add(L+(h?-1:1),d);return+(-(L+(C-l)/(h?l-_:_-l))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:d,y:v,w:f,d:a,D:g,h:u,m:c,s:o,ms:s,Q:p}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},T="en",S={};S[T]=$;var P=function(k){return k instanceof Z},D=function k(E,C,L){var l;if(!E)return T;if(typeof E=="string"){var h=E.toLowerCase();S[h]&&(l=h),C&&(S[h]=C,l=h);var _=E.split("-");if(!l&&_.length>1)return k(_[0])}else{var x=E.name;S[x]=E,l=x}return!L&&l&&(T=l),l||!L&&T},I=function(k,E){if(P(k))return k.clone();var C=typeof E=="object"?E:{};return C.date=k,C.args=arguments,new Z(C)},z=A;z.l=D,z.i=P,z.w=function(k,E){return I(k,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var Z=function(){function k(C){this.$L=D(C.locale,null,!0),this.parse(C)}var E=k.prototype;return E.parse=function(C){this.$d=function(L){var l=L.date,h=L.utc;if(l===null)return new Date(NaN);if(z.u(l))return new Date;if(l instanceof Date)return new Date(l);if(typeof l=="string"&&!/Z$/i.test(l)){var _=l.match(y);if(_){var x=_[2]-1||0,j=(_[7]||"0").substring(0,3);return h?new Date(Date.UTC(_[1],x,_[3]||1,_[4]||0,_[5]||0,_[6]||0,j)):new Date(_[1],x,_[3]||1,_[4]||0,_[5]||0,_[6]||0,j)}}return new Date(l)}(C),this.$x=C.x||{},this.init()},E.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},E.$utils=function(){return z},E.isValid=function(){return this.$d.toString()!==w},E.isSame=function(C,L){var l=I(C);return this.startOf(L)<=l&&l<=this.endOf(L)},E.isAfter=function(C,L){return I(C)<this.startOf(L)},E.isBefore=function(C,L){return this.endOf(L)<I(C)},E.$g=function(C,L,l){return z.u(C)?this[L]:this.set(l,C)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(C,L){var l=this,h=!!z.u(L)||L,_=z.p(C),x=function(oe,Y){var ee=z.w(l.$u?Date.UTC(l.$y,Y,oe):new Date(l.$y,Y,oe),l);return h?ee:ee.endOf(a)},j=function(oe,Y){return z.w(l.toDate()[oe].apply(l.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(Y)),l)},M=this.$W,R=this.$M,B=this.$D,W="set"+(this.$u?"UTC":"");switch(_){case v:return h?x(1,0):x(31,11);case d:return h?x(1,R):x(0,R+1);case f:var G=this.$locale().weekStart||0,J=(M<G?M+7:M)-G;return x(h?B-J:B+(6-J),R);case a:case g:return j(W+"Hours",0);case u:return j(W+"Minutes",1);case c:return j(W+"Seconds",2);case o:return j(W+"Milliseconds",3);default:return this.clone()}},E.endOf=function(C){return this.startOf(C,!1)},E.$set=function(C,L){var l,h=z.p(C),_="set"+(this.$u?"UTC":""),x=(l={},l[a]=_+"Date",l[g]=_+"Date",l[d]=_+"Month",l[v]=_+"FullYear",l[u]=_+"Hours",l[c]=_+"Minutes",l[o]=_+"Seconds",l[s]=_+"Milliseconds",l)[h],j=h===a?this.$D+(L-this.$W):L;if(h===d||h===v){var M=this.clone().set(g,1);M.$d[x](j),M.init(),this.$d=M.set(g,Math.min(this.$D,M.daysInMonth())).$d}else x&&this.$d[x](j);return this.init(),this},E.set=function(C,L){return this.clone().$set(C,L)},E.get=function(C){return this[z.p(C)]()},E.add=function(C,L){var l,h=this;C=Number(C);var _=z.p(L),x=function(R){var B=I(h);return z.w(B.date(B.date()+Math.round(R*C)),h)};if(_===d)return this.set(d,this.$M+C);if(_===v)return this.set(v,this.$y+C);if(_===a)return x(1);if(_===f)return x(7);var j=(l={},l[c]=r,l[u]=i,l[o]=n,l)[_]||1,M=this.$d.getTime()+C*j;return z.w(M,this)},E.subtract=function(C,L){return this.add(-1*C,L)},E.format=function(C){var L=this,l=this.$locale();if(!this.isValid())return l.invalidDate||w;var h=C||"YYYY-MM-DDTHH:mm:ssZ",_=z.z(this),x=this.$H,j=this.$m,M=this.$M,R=l.weekdays,B=l.months,W=function(Y,ee,ze,Q){return Y&&(Y[ee]||Y(L,h))||ze[ee].slice(0,Q)},G=function(Y){return z.s(x%12||12,Y,"0")},J=l.meridiem||function(Y,ee,ze){var Q=Y<12?"AM":"PM";return ze?Q.toLowerCase():Q},oe={YY:String(this.$y).slice(-2),YYYY:this.$y,M:M+1,MM:z.s(M+1,2,"0"),MMM:W(l.monthsShort,M,B,3),MMMM:W(B,M),D:this.$D,DD:z.s(this.$D,2,"0"),d:String(this.$W),dd:W(l.weekdaysMin,this.$W,R,2),ddd:W(l.weekdaysShort,this.$W,R,3),dddd:R[this.$W],H:String(x),HH:z.s(x,2,"0"),h:G(1),hh:G(2),a:J(x,j,!0),A:J(x,j,!1),m:String(j),mm:z.s(j,2,"0"),s:String(this.$s),ss:z.s(this.$s,2,"0"),SSS:z.s(this.$ms,3,"0"),Z:_};return h.replace(O,function(Y,ee){return ee||oe[Y]||_.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(C,L,l){var h,_=z.p(L),x=I(C),j=(x.utcOffset()-this.utcOffset())*r,M=this-x,R=z.m(this,x);return R=(h={},h[v]=R/12,h[d]=R,h[p]=R/3,h[f]=(M-j)/6048e5,h[a]=(M-j)/864e5,h[u]=M/i,h[c]=M/r,h[o]=M/n,h)[_]||M,l?R:z.a(R)},E.daysInMonth=function(){return this.endOf(d).$D},E.$locale=function(){return S[this.$L]},E.locale=function(C,L){if(!C)return this.$L;var l=this.clone(),h=D(C,L,!0);return h&&(l.$L=h),l},E.clone=function(){return z.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},k}(),V=Z.prototype;return I.prototype=V,[["$ms",s],["$s",o],["$m",c],["$H",u],["$W",a],["$M",d],["$y",v],["$D",g]].forEach(function(k){V[k[1]]=function(E){return this.$g(E,k[0],k[1])}}),I.extend=function(k,E){return k.$i||(k(E,Z,I),k.$i=!0),I},I.locale=D,I.isDayjs=P,I.unix=function(k){return I(1e3*k)},I.en=S[T],I.Ls=S,I.p={},I})})(gi);const mi=gi.exports;function rt(e,t,n){n===void 0&&(n={});var r=Le(t);pi(function(){var i=nt(n.target,window);if(!!(i!=null&&i.addEventListener)){var s=function(c){return r.current(c)};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 Td=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};const cn=function(e,t){var n=t||{},r=n.onEnter,i=n.onLeave,s=n.onChange,o=Td(_d(!1),2),c=o[0],u=o[1],a=u.setTrue,f=u.setFalse;return rt("mouseenter",function(){r==null||r(),a(),s==null||s(!0)},{target:e}),rt("mouseleave",function(){i==null||i(),f(),s==null||s(!1)},{target:e}),c};var Cd=function(t,n){return n===void 0&&(n=[]),au(t,n)},Ed=function(t,n,r){var i=b.useRef(),s=b.useRef(0);Cd(n,i.current)||(i.current=n,s.current+=1),pi(t,[s.current],r)};const Od=Ed;var ln=globalThis&&globalThis.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ad={0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pausebreak:19,capslock:20,esc:27,space:32,pageup:33,pagedown:34,end:35,home:36,leftarrow:37,uparrow:38,rightarrow:39,downarrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,leftwindowkey:91,rightwindowkey:92,selectkey:93,numpad0:96,numpad1:97,numpad2:98,numpad3:99,numpad4:100,numpad5:101,numpad6:102,numpad7:103,numpad8:104,numpad9:105,multiply:106,add:107,subtract:109,decimalpoint:110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,numlock:144,scrolllock:145,semicolon:186,equalsign:187,comma:188,dash:189,period:190,forwardslash:191,graveaccent:192,openbracket:219,backslash:220,closebracket:221,singlequote:222},un={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 xd(e){var t=Object.keys(un).reduce(function(n,r){return un[r](e)?n+1:n},0);return[16,17,18,91,92].includes(e.keyCode)?t:t+1}function vi(e,t,n){var r,i;if(!e.key)return!1;if(ri(t))return e.keyCode===t;var s=t.split("."),o=0;try{for(var c=ln(s),u=c.next();!u.done;u=c.next()){var a=u.value,f=un[a],d=Ad[a.toLowerCase()];(f&&f(e)||d&&d===e.keyCode)&&o++}}catch(p){r={error:p}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return n?o===s.length&&xd(e)===s.length:o===s.length}function kd(e,t){return Ee(e)?e:Sf(e)||ri(e)?function(n){return vi(n,e,t)}:Array.isArray(e)?function(n){return e.some(function(r){return vi(n,r,t)})}:e?function(){return!0}:function(){return!1}}var Pd=["keydown"];function _e(e,t,n){var r=n||{},i=r.events,s=i===void 0?Pd:i,o=r.target,c=r.exactMatch,u=c===void 0?!1:c,a=Le(t),f=Le(e);Od(function(){var d,p,v,g=nt(o,window);if(!!g){var w=function(A){var T,S=kd(f.current,u);if(S(A))return(T=a.current)===null||T===void 0?void 0:T.call(a,A)};try{for(var y=ln(s),O=y.next();!O.done;O=y.next()){var $=O.value;(v=g==null?void 0:g.addEventListener)===null||v===void 0||v.call(g,$,w)}}catch(F){d={error:F}}finally{try{O&&!O.done&&(p=y.return)&&p.call(y)}finally{if(d)throw d.error}}return function(){var F,A,T;try{for(var S=ln(s),P=S.next();!P.done;P=S.next()){var D=P.value;(T=g==null?void 0:g.removeEventListener)===null||T===void 0||T.call(g,D,w)}}catch(I){F={error:I}}finally{try{P&&!P.done&&(A=S.return)&&A.call(S)}finally{if(F)throw F.error}}}}},[s],o)}var Md=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s};function Ld(e){var t=b.useRef(0),n=Md(b.useState(e),2),r=n[0],i=n[1],s=b.useCallback(function(o){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){i(o)})},[]);return Re(function(){cancelAnimationFrame(t.current)}),[r,s]}var Rd=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(c){o={error:c}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},Dd={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 Nd=function(e){var t=Rd(Ld(Dd),2),n=t[0],r=t[1];return rt("mousemove",function(i){var s=i.screenX,o=i.screenY,c=i.clientX,u=i.clientY,a=i.pageX,f=i.pageY,d={screenX:s,screenY:o,clientX:c,clientY:u,pageX:a,pageY:f,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},p=nt(e);if(p){var v=p.getBoundingClientRect(),g=v.left,w=v.top,y=v.width,O=v.height;d.elementPosX=g+window.pageXOffset,d.elementPosY=w+window.pageYOffset,d.elementX=a-d.elementPosX,d.elementY=f-d.elementPosY,d.elementW=y,d.elementH=O}r(d)},{target:function(){return document}}),n};var yi={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 c=n.apply(null,s);c&&r.push(c)}}else if(o==="object"){if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]")){r.push(s.toString());continue}for(var u in s)t.call(s,u)&&s[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(yi);const K=yi.exports,bi="_expand-btn_wdzp9_1",_i="_expanded_wdzp9_12",Vh={expandBtn:bi,expanded:_i};var it={exports:{}},st={};/**
 * @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 Fd=Be.default,jd=Symbol.for("react.element"),Id=Symbol.for("react.fragment"),zd=Object.prototype.hasOwnProperty,$d=Fd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Bd={key:!0,ref:!0,__self:!0,__source:!0};function wi(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)zd.call(t,r)&&!Bd.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:jd,type:e,key:s,ref:o,props:i,_owner:$d.current}}st.Fragment=Id,st.jsx=wi,st.jsxs=wi,function(e){e.exports=st}(it);const ot=it.exports.Fragment,m=it.exports.jsx,N=it.exports.jsxs,Si=b.forwardRef(function({children:t},n){const[r,i]=hi(!1);b.useImperativeHandle(n,()=>i,[i]);const s=m("button",{className:K("primary-btn",bi),onClick:i.toggle,children:m("svg",{className:K({[_i]:r}),children:m("use",{xlinkHref:"#widget-arrow"})})});return N(ot,{children:[s,r&&t]})});var X={exports:{}},Wd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Hd=Wd,Ud=Hd;function Ti(){}function Ci(){}Ci.resetWarningCache=Ti;var Yd=function(){function e(r,i,s,o,c,u){if(u!==Ud){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}e.isRequired=e;function t(){return e}var 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:Ci,resetWarningCache:Ti};return n.PropTypes=n,n};X.exports=Yd();class fn extends b.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:c,loadMore:u,pageStart:a,ref:f,threshold:d,useCapture:p,useWindow:v,getScrollParent:g,...w}=t;w.ref=O=>{this.scrollComponent=O,f&&f(O)};const y=[n];return i&&(c?o?y.unshift(c):y.push(c):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),Be.default.createElement(r,w,y)}}ht(fn,"propTypes",{children:X.exports.node.isRequired,element:X.exports.node,hasMore:X.exports.bool,initialLoad:X.exports.bool,isReverse:X.exports.bool,loader:X.exports.node,loadMore:X.exports.func.isRequired,pageStart:X.exports.number,ref:X.exports.func,getScrollParent:X.exports.func,threshold:X.exports.number,useCapture:X.exports.bool,useWindow:X.exports.bool}),ht(fn,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});let je=0;const Gd=()=>{je++,document.body.style.overflow="hidden"},Kd=()=>{je--,je<0&&(je=0),je===0&&(document.body.style.overflow="overlay")},Ei=()=>document.body.classList.contains("dark"),Oi=Ve({value:Ei()}),Xd=function(){return Yt(Oi).value};new MutationObserver(function(){Oi.value=Ei()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});function Ai({show:e,onHide:t,children:n,clsModalMask:r,clsModal:i,hideWhenMaskOnClick:s=!1}){b.useLayoutEffect(()=>{e?Gd():Kd()},[e]);const o=b.useRef(null),c=Xd(),{bg:u,c:a}=b.useMemo(()=>{const g=window.getComputedStyle(document.body)["background-color"],w=window.getComputedStyle(document.body).color;return{bg:g,c:w}},[c]),f=b.useMemo(()=>c?{"--bg":u,"--c":a,backgroundColor:u,color:a}:{},[u,a,c]),d=b.useId(),p=b.useMemo(()=>{const g=document.createElement("div");return g.setAttribute("data-id","base-modal-"+d),document.body.appendChild(g),g},[]),v=U(g=>{var w;(w=o.current)!=null&&w.contains(g.target)||s&&t()});return e?ne.createPortal(m("div",{className:K(r),onClick:v,children:m("div",{className:K(i),style:f,ref:o,children:n})}),p):null}function Vd(e){const t=Ve({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 new Map(this.data)},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}function Jd(){var t;const e=(t=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:t[1];if(!e)throw te("\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 Ie=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,at=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new xi}abort(){this.signal.dispatchEvent("abort")}},Zd=typeof AbortSignal=="function",Qd=typeof at.AbortSignal=="function",xi=Zd?AbortSignal:Qd?at.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))}},dn=new Set,hn=(e,t)=>{const n=`LRU_CACHE_OPTION_${e}`;ct(n)&&gn(n,`${e} option`,`options.${t}`,we)},pn=(e,t)=>{const n=`LRU_CACHE_METHOD_${e}`;if(ct(n)){const{prototype:r}=we,{get:i}=Object.getOwnPropertyDescriptor(r,e);gn(n,`${e} method`,`cache.${t}()`,i)}},qd=(e,t)=>{const n=`LRU_CACHE_PROPERTY_${e}`;if(ct(n)){const{prototype:r}=we,{get:i}=Object.getOwnPropertyDescriptor(r,e);gn(n,`${e} property`,`cache.${t}`,i)}},ki=(...e)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...e):console.error(...e)},ct=e=>!dn.has(e),gn=(e,t,n,r)=>{dn.add(e);const i=`The ${t} is deprecated. Please use ${n} instead.`;ki(i,"DeprecationWarning",e,r)},he=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),Pi=e=>he(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?lt:null:null;class lt extends Array{constructor(t){super(t),this.fill(0)}}class eh{constructor(t){if(t===0)return[];const n=Pi(t);this.heap=new n(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}}class we{constructor(t={}){const{max:n=0,ttl:r,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:u,dispose:a,disposeAfter:f,noDisposeOnSet:d,noUpdateTTL:p,maxSize:v=0,maxEntrySize:g=0,sizeCalculation:w,fetchMethod:y,fetchContext:O,noDeleteOnFetchRejection:$,noDeleteOnStaleGet:F}=t,{length:A,maxAge:T,stale:S}=t instanceof we?{}:t;if(n!==0&&!he(n))throw new TypeError("max option must be a nonnegative integer");const P=n?Pi(n):Array;if(!P)throw new Error("invalid max value: "+n);if(this.max=n,this.maxSize=v,this.maxEntrySize=g||this.maxSize,this.sizeCalculation=w||A,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=O,!this.fetchMethod&&O!==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 P(n),this.prev=new P(n),this.head=0,this.tail=0,this.free=new eh(n),this.initialFill=1,this.size=0,typeof a=="function"&&(this.dispose=a),typeof f=="function"?(this.disposeAfter=f,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!p,this.noDeleteOnFetchRejection=!!$,this.maxEntrySize!==0){if(this.maxSize!==0&&!he(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!he(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!S,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=he(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=r||T||0,this.ttl){if(!he(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 D="LRU_CACHE_UNBOUNDED";ct(D)&&(dn.add(D),ki("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",D,we))}S&&hn("stale","allowStale"),T&&hn("maxAge","ttl"),A&&hn("length","sizeCalculation")}getRemainingTTL(t){return this.has(t,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new lt(this.max),this.starts=new lt(this.max),this.setItemTTL=(r,i,s=Ie.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?Ie.now():0};let t=0;const n=()=>{const r=Ie.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 lt(this.max),this.removeItemSize=t=>{this.calculatedSize-=this.sizes[t],this.sizes[t]=0},this.requireSize=(t,n,r,i)=>{if(this.isBackgroundFetch(n))return 0;if(!he(r))if(i){if(typeof i!="function")throw new TypeError("sizeCalculation must be a function");if(r=i(n,t),!he(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)=>{if(this.sizes[t]=n,this.maxSize){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 or maxEntrySize 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 pn("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 c=Ie.now()-this.starts[n];o.start=Math.floor(Date.now()-c)}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=Ie.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:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL}={}){if(o=this.requireSize(t,n,o,c),this.maxEntrySize&&o>this.maxEntrySize)return this.delete(t),this;let a=this.size===0?void 0:this.keyMap.get(t);if(a===void 0)a=this.newIndex(),this.keyList[a]=t,this.valList[a]=n,this.keyMap.set(t,a),this.next[this.tail]=a,this.prev[a]=this.tail,this.tail=a,this.size++,this.addItemSize(a,o),u=!1;else{const f=this.valList[a];n!==f&&(this.isBackgroundFetch(f)?f.__abortController.abort():s||(this.dispose(f,t,"set"),this.disposeAfter&&this.disposed.push([f,t,"set"])),this.removeItemSize(a),this.valList[a]=n,this.addItemSize(a,o)),this.moveToTail(a)}if(r!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(a,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 at,c={signal:o.signal,options:r,context:i},u=p=>(o.signal.aborted||this.set(t,p,c.options),p),a=p=>{if(this.valList[n]===d&&(!r.noDeleteOnFetchRejection||d.__staleWhileFetching===void 0?this.delete(t):this.valList[n]=d.__staleWhileFetching),d.__returned===d)throw p},f=p=>p(this.fetchMethod(t,s,c)),d=new Promise(f).then(u,a);return d.__abortController=o,d.__staleWhileFetching=s,d.__returned=null,n===void 0?(this.set(t,d,c.options),n=this.keyMap.get(t)):this.valList[n]=d,d}isBackgroundFetch(t){return t&&typeof t=="object"&&typeof t.then=="function"&&Object.prototype.hasOwnProperty.call(t,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(t,"__returned")&&(t.__returned===t||t.__returned===null)}async fetch(t,{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:c=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:a=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,fetchContext:d=this.fetchContext,forceRefresh:p=!1}={}){if(!this.fetchMethod)return this.get(t,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i});const v={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:i,ttl:s,noDisposeOnSet:o,size:c,sizeCalculation:u,noUpdateTTL:a,noDeleteOnFetchRejection:f};let g=this.keyMap.get(t);if(g===void 0){const w=this.backgroundFetch(t,g,v,d);return w.__returned=w}else{const w=this.valList[g];if(this.isBackgroundFetch(w))return n&&w.__staleWhileFetching!==void 0?w.__staleWhileFetching:w.__returned=w;if(!p&&!this.isStale(g))return this.moveToTail(g),r&&this.updateItemAge(g),w;const y=this.backgroundFetch(t,g,v,d);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],c=this.isBackgroundFetch(o);return this.isStale(s)?c?n?o.__staleWhileFetching:void 0:(i||this.delete(t),n?o:void 0):c?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 pn("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 pn("reset","clear"),this.clear}get length(){return qd("length","size"),this.size}static get AbortController(){return at}static get AbortSignal(){return xi}}var th=we;const nh=th;async function rh(e){return(await Jt.get("/pvideo",{params:{aid:e}})).data.data}async function ih(e){return[]}const mn=new nh({max:200});async function sh(e){if(mn.has(e))return mn.get(e);const[t,n]=await Promise.all([rh(e),ih()]);return mn.set(e,{pvideoData:t,dmData:n}),{pvideoData:t,dmData:n}}function Mi(e){return async function(n){const r=new FormData;r.append("aid",n),r.append("csrf",Jd());const s=(await Jt.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 oh=Mi("add"),ah=Mi("del"),Li=e=>{const t={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[e];return async function(n,r){var c;const s=(await Je.get(qr+t,{params:{goto:n.goto,id:n.param,mid:n.mid,rid:n.tid,tag_id:(c=n.tag)==null?void 0:c.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"}},ch=Li("dislike"),lh=Li("cancel"),Ri="_modal-mask_vh629_1",Di="_modal_vh629_1",Ni="_modal-header_vh629_23",Fi="_modal-title_vh629_30",ji="_title-desc_vh629_35",Ii="_btn-close_vh629_39",zi="_modal-body_vh629_57",$i="_reason-list_vh629_62",Bi="_reason_vh629_62",Qh={modalMask:Ri,modal:Di,modalHeader:Ni,modalTitle:Fi,titleDesc:ji,btnClose:Ii,modalBody:zi,reasonList:$i,reason:Bi},vn=Vd();function uh(){return Yt(vn)}function fh(e){const t=uh();if(!!e)return t.get(e)}function dh({show:e,onHide:t,item:n}){const[r,i]=b.useState(!1),s=U(async(c,u)=>{if(!n)return;let a=!1,f=null;try{i(!0),a=await ch(n,c)}catch(d){f=d}finally{i(!1)}if(f)return console.error(f.stack||f),Zr();a?te("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):Qr(),a&&(vn.set(n.param,{id:c,name:u}),t())}),o=b.useMemo(()=>{var c;return[...(c=n==null?void 0:n.dislike_reasons)!=null?c:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[n]);return N(Ai,{show:e,onHide:t,clsModalMask:Ri,clsModal:Di,hideWhenMaskOnClick:!0,children:[N("div",{className:Ni,children:[N("div",{className:Fi,children:["\u6211\u4E0D\u60F3\u770B",m("span",{className:ji,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),m("div",{className:"space",style:{flex:1}}),N("button",{className:`primary-btn roll-btn ${Ii}`,onClick:t,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:zi,children:m("div",{className:$i,children:o.map(c=>m("button",{className:Bi,"data-id":c.reason_id,onClick:()=>s(c.reason_id,c.reason_name),disabled:r,children:c.reason_name},c.reason_id))})})]})}const Wi={show:!1,onHide:Hi,item:null};function Hi(){Ui({show:!1,item:null})}function Ui(e){Object.assign(Wi,e),hh().render(m(dh,{...Wi,onHide:Hi}))}let yn;function hh(){if(!yn){const e=document.createElement("div");e.classList.add("show-dislike-container"),document.body.appendChild(e),yn=Vt(e)}return yn}function ph(e){Ui({show:!0,item:e})}function gh(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=>xu(o.toString(),2,"0")).join(":")}function bn(e){if(!e)return"";if(e<=9999)return e.toString();let t=(e/1e4).toFixed(1);return t=t.replace(/\.0$/,""),`${t}\u4E07`}var mh=["size","strokeWidth","strokeLinecap","strokeLinejoin","theme","fill","className","spin"];function Yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yi(Object(n),!0).forEach(function(r){vh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yi(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yh(e,t){if(e==null)return{};var n=bh(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function bh(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s<r.length;s++)i=r[s],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var _h={size:"1em",strokeWidth:4,strokeLinecap:"round",strokeLinejoin:"round",rtl:!1,theme:"outline",colors:{outline:{fill:"#333",background:"transparent"},filled:{fill:"#333",background:"#FFF"},twoTone:{fill:"#333",twoTone:"#2F88FF"},multiColor:{outStrokeColor:"#333",outFillColor:"#2F88FF",innerStrokeColor:"#FFF",innerFillColor:"#43CCF8"}},prefix:"i"};function wh(){return"icon-"+((1+Math.random())*4294967296|0).toString(16).substring(1)}function Sh(e,t,n){var r=typeof t.fill=="string"?[t.fill]:t.fill||[],i=[],s=t.theme||n.theme;switch(s){case"outline":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("none"),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("none");break;case"filled":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push("#FFF"),i.push("#FFF");break;case"two-tone":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.twoTone.twoTone),i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.twoTone.twoTone);break;case"multi-color":i.push(typeof r[0]=="string"?r[0]:"currentColor"),i.push(typeof r[1]=="string"?r[1]:n.colors.multiColor.outFillColor),i.push(typeof r[2]=="string"?r[2]:n.colors.multiColor.innerStrokeColor),i.push(typeof r[3]=="string"?r[3]:n.colors.multiColor.innerFillColor);break}return{size:t.size||n.size,strokeWidth:t.strokeWidth||n.strokeWidth,strokeLinecap:t.strokeLinecap||n.strokeLinecap,strokeLinejoin:t.strokeLinejoin||n.strokeLinejoin,colors:i,id:e}}var Ki=b.createContext(_h);Ki.Provider;function Xi(e,t,n){return function(r){var i=r.size,s=r.strokeWidth,o=r.strokeLinecap,c=r.strokeLinejoin,u=r.theme,a=r.fill,f=r.className,d=r.spin,p=yh(r,mh),v=b.useContext(Ki),g=b.useMemo(wh,[]),w=Sh(g,{size:i,strokeWidth:s,strokeLinecap:o,strokeLinejoin:c,theme:u,fill:a},v),y=[v.prefix+"-icon"];return y.push(v.prefix+"-icon-"+e),t&&v.rtl&&y.push(v.prefix+"-icon-rtl"),d&&y.push(v.prefix+"-icon-spin"),f&&y.push(f),m("span",{...Gi(Gi({},p),{},{className:y.join(" ")}),children:n(w)})}}const Th=Xi("distraught-face",!1,function(e){return N("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none",children:[m("path",{d:"M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",fill:e.colors[1],stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinejoin:e.strokeLinejoin}),m("path",{d:"M24 29C29 29 31 33 31 33H17C17 33 19 29 24 29Z",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),m("path",{d:"M32 17L29 20L32 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),m("path",{d:"M16 17L19 20L16 23",stroke:e.colors[2],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin})]})}),Ch=Xi("return",!0,function(e){return N("svg",{width:e.size,height:e.size,viewBox:"0 0 48 48",fill:"none",children:[m("path",{d:"M12.9998 8L6 14L12.9998 21",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin}),m("path",{d:"M6 14H28.9938C35.8768 14 41.7221 19.6204 41.9904 26.5C42.2739 33.7696 36.2671 40 28.9938 40H11.9984",stroke:e.colors[0],strokeWidth:e.strokeWidth,strokeLinecap:e.strokeLinecap,strokeLinejoin:e.strokeLinejoin})]})}),Vi="_bili-video-card_1a93a_1",Ji="_image-wrapper_1a93a_4",Zi="_preview-card-wrapper_1a93a_8",Qi="_preview-card-inner_1a93a_21",qi="_watch-later_1a93a_25",es="_badge_1a93a_28",ts="_recommend-reason_1a93a_36",ns="_bangumi-desc_1a93a_51",rs="_btn-dislike_1a93a_54",is="_btn-dislike-icon_1a93a_69",ss="_btn-dislike-tip_1a93a_76",os="_disliked-wrapper_1a93a_91",as="_dislike-content-cover_1a93a_105",cs="_dislike-content-cover-inner_1a93a_111",ls="_dislike-icon_1a93a_122",us="_dislike-reason_1a93a_125",fs="_dislike-desc_1a93a_129",ds="_dislike-content-action_1a93a_133",qh={biliVideoCard:Vi,imageWrapper:Ji,previewCardWrapper:Zi,previewCardInner:Qi,watchLater:qi,badge:es,recommendReason:ts,bangumiDesc:ns,btnDislike:rs,btnDislikeIcon:is,btnDislikeTip:ss,dislikedWrapper:os,dislikeContentCover:as,dislikeContentCoverInner:cs,dislikeIcon:ls,dislikeReason:us,dislikeDesc:fs,dislikeContentAction:ds};function _n(e,t){return isNaN(e)?t:e}function Eh({className:e,item:t,pvideo:n,enterCursorState:r}){const i=b.useRef(null),s=Nd(i),o={item:t,pvideo:n,cursorState:s,elWidth:_n(s.elementW,r.width),elHeight:_n(s.elementH,r.height),relativeX:_n(s.elementX,r.relativeX)};return m("div",{ref:i,className:K(Zi,e),children:n?m(Oh,{...o}):!1})}function Oh({item:e,pvideo:t,elWidth:n,elHeight:r,relativeX:i}){var S;let s=0,o=0;n&&i&&!isNaN(i)&&!isNaN(n)&&(s=i/n,s<0&&(s=0),s>1&&(s=1),o=Math.floor((e.duration||0)*s));let c=b.useMemo(()=>{const P=(t==null?void 0:t.index)||[];let D=xh(P,o);return D!==-1?D:o>P[P.length-1]?(D=Math.floor(P.length*s)-1,D<0&&(D=0),D):0},[t,o]);const{img_x_len:u,img_y_len:a,img_x_size:f,img_y_size:d}=t,p=a*u;c=c+1;const v=Math.floor(c/p),g=c-v*p,w=((S=t.image)==null?void 0:S[v])||"",y=Math.floor(g/u)+1,O=g-(y-1)*u,$=n*u,F=r*a,A=(y-1)*r,T=(O-1)*n;return m("div",{className:Qi,style:{backgroundColor:"black",backgroundImage:`url(${w})`,backgroundPosition:`-${T}px -${A}px`,backgroundSize:`${$}px ${F}px`},children:m(Ah,{progress:s})})}function Ah({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 xh(e,t){var c;let n=0,r=e.length-1,i=-1;for(;n<=r;){const u=Math.floor((n+r)/2),a=e[u];if(t===a)return u;a<t?(n=u+1,i=u):r=u-1}if(i===-1)return-1;const s=e[i],o=(c=e[i+1])!=null?c:0;return s<t&&t<o?i:-1}const kh=mi().format("YYYY"),Ph=e=>{if(!e)return"";const t=mi.unix(e);return t.format("YYYY")===kh?t.format("M-D"):t.format("YY-M-D")},Mh=e=>e.replace(/^http:\/\//,"https://"),wn=b.memo(function({style:t,className:n,item:r,loading:i}){i=i!=null?i:!r;const s=N("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:N("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=fh(r==null?void 0:r.param);return N("div",{style:t,className:K("bili-video-card",Vi,n),"data-report":"partition_recommend.content",children:[s,!i&&r&&(o?m(Lh,{item:r,dislikedReason:o}):m(Rh,{item:r}))]})}),Lh=b.memo(function({dislikedReason:t,item:n}){const r=U(async()=>{if(!(t!=null&&t.id))return;let i=!1,s=null;try{i=await lh(n,t.id)}catch(o){s=o}if(s)return console.error(s.stack||s),Zr();i?te("\u5DF2\u64A4\u9500"):Qr(),i&&vn.delete(n.param)});return N("div",{className:K(os),children:[m("div",{className:as,children:N("div",{className:cs,children:[m(Th,{theme:"outline",size:"32",fill:"#333",className:ls}),m("div",{className:us,children:t==null?void 0:t.name}),m("div",{className:fs,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),m("div",{className:ds,children:N("button",{onClick:r,children:[m(Ch,{theme:"outline",size:"16",fill:"#333",style:{marginRight:4,fontSize:0,marginTop:-2}}),"\u64A4\u9500"]})})]})}),Rh=b.memo(function({item:t}){const n=b.useRef(null),[r,i]=b.useState(()=>({width:0,height:0,relativeX:0}));rt("mouseenter",Q=>{var Ps;const ft=(Ps=n.current)==null?void 0:Ps.getBoundingClientRect();if(!ft)return;const{width:dt,height:An,x:Wh}=ft;i({width:dt,height:An,relativeX:Q.pageX-window.pageXOffset-Wh})},{target:n});const s=cn(n),o=b.useRef(null),c=cn(o),[u,a]=b.useState(!1),{accessKey:f}=Gt(),d=Boolean(f),{param:p,title:v,cover:g,goto:w,play:y,like:O,coin:$,desc:F,danmaku:A,ctime:T,duration:S,name:P,face:D,mid:I,favorite:z,badge:Z,rcmd_reason:V}=t,k=b.useMemo(()=>Ph(T),[T]),E=b.useMemo(()=>Mh(g),[g]),[C,L]=b.useState(null),[l,h]=b.useState(!1),_=U(async()=>{if(!C&&!l)try{h(!0);const Q=await sh(p);L(Q)}finally{h(!1)}});b.useEffect(()=>{s&&_()},[s]);let x=!1;const j=U(async Q=>{if(Q.preventDefault(),x)return;x=!0;const ft=u?ah:oh;let dt=!1;try{dt=await ft(p)}finally{x=!1}dt&&a(An=>!An)}),M=b.useRef(null),R=cn(M),B=U(Q=>{Q.stopPropagation(),Q.preventDefault(),ph(t)}),W=t.goto==="bangumi",G=t.goto==="av",J=G?`/video/av${p}`:t.uri,oe=b.useMemo(()=>gh(S),[S]),Y=b.useMemo(()=>bn(y),[y]),ee=b.useMemo(()=>bn(O),[O]),ze=b.useMemo(()=>bn(z),[z]);return N("div",{className:"bili-video-card__wrap __scale-wrap",children:[m("a",{href:J,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:N("div",{className:"bili-video-card__image __scale-player-wrap",ref:n,children:[N("div",{className:K("bili-video-card__image--wrap",Ji),children:[N("picture",{className:"v-img bili-video-card__cover",children:[m("source",{srcSet:`${E}@672w_378h_1c.webp`,type:"image/webp"}),m("img",{src:`${E}@672w_378h_1c.webp`,alt:v,loading:"lazy"})]}),s&&m(Eh,{item:t,pvideo:C==null?void 0:C.pvideoData,enterCursorState:r}),N("div",{className:`bili-watch-later ${qi}`,style:{display:s?"flex":"none"},ref:o,onClick:j,children:[m("svg",{className:"bili-watch-later__icon",children:m("use",{xlinkHref:u?"#widget-watch-save":"#widget-watch-later"})}),m("span",{className:"bili-watch-later__tip",style:{display:c?"block":"none"},children:u?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),d&&N("div",{ref:M,className:rs,onClick:B,style:{display:s?"flex":"none"},children:[m("svg",{className:is,children:m("use",{xlinkHref:"#widget-close"})}),m("span",{className:ss,style:{display:R?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),m("div",{className:"bili-video-card__mask",children:N("div",{className:"bili-video-card__stats",children:[N("div",{className:"bili-video-card__stats--left",children:[N("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:Y})]}),m("span",{className:"bili-video-card__stats--item",children:w==="av"?N(ot,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:ee})]}):N(ot,{children:[m("svg",{className:"bili-video-card__stats--icon",children:m("use",{xlinkHref:"#widget-agree"})}),m("span",{className:"bili-video-card__stats--text",children:ze})]})})]}),m("span",{className:"bili-video-card__stats__duration",children:G&&oe})]})})]})}),m("div",{className:"bili-video-card__info __scale-disable",children:N("div",{className:"bili-video-card__info--right",children:[m("a",{href:J,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:m("h3",{className:"bili-video-card__info--tit",title:v,children:v})}),N("p",{className:"bili-video-card__info--bottom",children:[G&&N("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${I}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[V!=null&&V.content?m("span",{className:ts,children:V.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:P}),k&&N("span",{className:"bili-video-card__info--date",children:["\xB7 ",k]})]}),W&&N("a",{className:"bili-video-card__info--owner",href:J,target:"_blank",children:[m("span",{className:es,children:Z}),m("span",{className:ns,children:F})]})]})]})})]})}),hs="_modal-mask_1urmj_1",ps="_narrow-mode_1urmj_13",gs="_modal_1urmj_1",ms="_modal-header_1urmj_38",vs="_modal-title_1urmj_46",ys="_btn-refresh_1urmj_51",bs="_btn-close_1urmj_52",ut="_modal-body_1urmj_68",Dh="_list_1urmj_74",Sn="_card_1urmj_77",Tn="_active_1urmj_85",_s="_video-card-list_1urmj_90",Cn="_video-card-body_1urmj_1",ws="_loader_1urmj_99",En="_checkbox_1urmj_104",ep={modalMask:hs,narrowMode:ps,modal:gs,modalHeader:ms,modalTitle:vs,btnRefresh:ys,btnClose:bs,modalBody:ut,list:Dh,card:Sn,active:Tn,videoCardList:_s,videoCardBody:Cn,loader:ws,checkbox:En};function Nh({show:e,refresh:t,minIndex:n=0,maxIndex:r}){const[i,s]=b.useState(null),o=U(()=>{if(i===null)return!1;const w=document.querySelector(`${On}.${Tn}`),y=document.querySelector(`.${ut}`);if(!w||!y)return!1;const O=y.getBoundingClientRect(),$=w.getBoundingClientRect();return!($.top-O.top<-(O.height+$.height)||$.top-O.top>O.height*2+$.height)}),c=U((w,y)=>{if(!e)return;y==null||y.preventDefault();const O=o()?i+w:Fh();if(!(O<n)){if(O>r){Cs(r);return}s(O),Cs(O)}}),u=b.useCallback(w=>{c(-1,w)},[]),a=b.useCallback(w=>{c(1,w)},[]);_e("leftarrow",u),_e("rightarrow",a);const f=b.useCallback(w=>{c(-Os(),w)},[]),d=b.useCallback(w=>{c(Os(),w)},[]);_e("uparrow",f),_e("downarrow",d);const p=U(()=>{!i||!e||jh(i)}),v=U(()=>{!e||s(null)});_e("enter",p),_e("esc",v);const g=U(()=>{!e||t()});return _e("r",g,{exactMatch:!0}),{activeIndex:i,clearActiveIndex:v}}function Fh(){const e=document.querySelector(`.${ut}`);if(!e)return 0;const t=e.getBoundingClientRect(),n=Ss();for(let r=0;r<n.length;r++)if(n[r].getBoundingClientRect().top>=t.top)return r;return 0}const On=`#${Cn} .${Sn}`;function Ss(){return[...document.querySelectorAll(On)]}function Ts(e){return Ss()[e]}function Cs(e){var n;const t=Ts(e);(n=t==null?void 0:t.scrollIntoViewIfNeeded)==null||n.call(t,!1)}function jh(e){const t=Ts(e);if(!t)return;const n=t.querySelector(".bili-video-card__wrap > a");n==null||n.click()}const Es=new Map;function Os(){if(se.useNarrowMode)return 2;let e=Es.get(window.innerWidth);if(e)return e;const t=document.querySelector(On);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 Es.set(window.innerWidth,e),e}function As(){return b.useMemo(()=>crypto.randomUUID(),[])}const Ih=b.memo(function({show:t,onHide:n}){const[r,i]=b.useState([]),[s,o]=b.useState(!1),c=b.useRef(null),u=U(async()=>{c.current&&(c.current.scrollTop=0);try{y(),o(!0),i(await en(2)),y()}finally{o(!1)}}),a=U(async F=>{const A=await en(2);i(T=>[...T,...A])}),{useNarrowMode:f,initialShowMore:d}=Gt(),p=b.useCallback(F=>{const A=F.target.checked;Yr({useNarrowMode:A})},[]),v=b.useCallback(F=>{const A=F.target.checked;Yr({initialShowMore:A}),A&&te("\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")},[]),g=b.useMemo(()=>({[ps]:f}),[f]),{activeIndex:w,clearActiveIndex:y}=Nh({show:t,refresh:u,maxIndex:r.length-1}),O=As(),$=As();return N(Ai,{show:t,onHide:n,clsModalMask:K(hs,g),clsModal:K(gs,g),children:[N("div",{className:ms,children:[m("div",{className:vs,children:"\u63A8\u8350"}),m("div",{className:"space",style:{flex:1}}),N(Si,{children:[m("input",{type:"checkbox",className:En,id:$,checked:d,onChange:v}),m("label",{htmlFor:$,children:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A"}),m("input",{type:"checkbox",className:En,id:O,checked:f,onChange:p}),m("label",{htmlFor:O,children:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F"})]}),N("button",{className:`primary-btn roll-btn ${ys}`,onClick:u,children:[m("svg",{children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),N("button",{className:`primary-btn roll-btn ${bs}`,onClick:n,children:[m("svg",{children:m("use",{xlinkHref:"#widget-close"})}),m("span",{children:"\u5173\u95ED"})]})]}),m("div",{className:ut,ref:c,children:m(fn,{pageStart:0,loadMore:a,hasMore:!0,useWindow:!1,threshold:360,style:{minHeight:"100%"},loader:m("div",{className:ws,children:"\u52A0\u8F7D\u4E2D..."},0),children:m("div",{className:`video-card-list is-full ${_s}`,children:m("div",{id:Cn,className:K("video-card-body",g),children:r.map((F,A)=>m(wn,{loading:s,item:F,className:K(Sn,{[Tn]:A===w})},F.uniqId))})})})})]})}),xs="_grid_svuzk_1",ks="_video-card-list_svuzk_6",rp={grid:xs,videoCardList:ks,expandBtn:"_expand-btn_svuzk_20",expanded:"_expanded_svuzk_31"};function zh({internalTesting:e=!1}){const t=b.useRef(null),{accessKey:n}=Gt(),r=di(bf,{manual:!0}),i=U(async()=>{var O;await r.runAsync()&&((O=t.current)==null||O.set(!1))}),s=_f,o=U(()=>{const y="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(y,"_blank")}),c=b.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:u,loading:a,error:f,refresh:d}=di(mf);f&&console.error(f.stack||f);const[p,v]=b.useState(()=>se.initialShowMore),g=b.useCallback(()=>{v(!0)},[]),w=b.useCallback(()=>{v(!1)},[]);return m("section",{className:K("bili-grid",{"no-margin":!e},xs),"data-area":"\u63A8\u8350",children:N("div",{className:`video-card-list is-full ${ks}`,children:[N("div",{className:"area-header",children:[N("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"})})]}),N("div",{className:"right",children:[n?N(Si,{ref:t,children:[m("button",{className:"primary-btn roll-btn",onClick:o,children:m("span",{children:"access_key \u8BF4\u660E"})}),m("button",{className:"primary-btn roll-btn",onClick:()=>i(),disabled:r.loading,children:m("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),m("button",{className:"primary-btn roll-btn",onClick:s,children:m("span",{children:"\u5220\u9664 access_key"})})]}):N(ot,{children:[m("button",{className:"primary-btn roll-btn",onClick:o,children:m("span",{children:"access_key \u8BF4\u660E"})}),m("button",{className:"primary-btn roll-btn",onClick:i,disabled:r.loading,children:m("span",{children:"\u83B7\u53D6 access_key"})})]}),N("button",{className:"primary-btn roll-btn",onClick:d,children:[m("svg",{style:{transform:"rotate(0deg)"},children:m("use",{xlinkHref:"#widget-roll"})}),m("span",{children:"\u6362\u4E00\u6362"})]}),N("button",{className:"primary-btn see-more",onClick:g,children:[m("span",{children:"\u67E5\u770B\u66F4\u591A"}),m("svg",{children:m("use",{xlinkHref:"#widget-arrow"})})]})]})]}),m(Ih,{show:p,onHide:w}),m("div",{className:"video-card-body more-class1 more-class2",children:a||f?c.map(y=>m(wn,{},y)):u.map(y=>m(wn,{item:y},y.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 $h()})();async function $h(){const t=Date.now()+1e4;let n=null,r=!1;for(;;){if(document.querySelector(".bili-layout > section.bili-grid")){n=document.querySelector(".bili-layout > section.bili-grid");break}if(Bh()&&document.querySelector(".recommended-container")){r=!0,n=document.querySelector(".recommended-container");break}if(Date.now()>t)break;await Kt.exports(100)}if(!n){console.error("[bilibili-app-recommend]: init fail");return}const i=document.createElement("section");n.insertAdjacentElement("afterend",i),Vt(i).render(m(zh,{internalTesting:r}))}function Bh(){var e;return((e=document.querySelector("button.go-back"))==null?void 0:e.innerText.trim())==="\u9000\u51FA\u5185\u6D4B"}})(React,ReactDOM,axios,axiosGmxhrAdapter);