Greasy Fork

Greasy Fork is available in English.

bilibili-app-recommend

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

当前为 2022-06-14 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         bilibili-app-recommend
// @namespace    https://magicdawn.fun
// @version      0.3.3
// @author       magicdawn
// @description  为B站首页添加像App一样的推荐
// @license      MIT
// @homepageURL  https://github.com/magicdawn/bilibili-app-recommend
// @supportURL   https://github.com/magicdawn/bilibili-app-recommend/issues
// @include      https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?*
// @match        *://www.bilibili.com/*
// @require      https://unpkg.com/[email protected]/dist/jquery.min.js
// @require      https://unpkg.com/[email protected]/dist/axios.min.js
// @require      https://unpkg.com/[email protected]/dist/axiosGmxhrAdapter.min.js
// @require      https://unpkg.com/[email protected]/umd/react.production.min.js
// @require      https://unpkg.com/[email protected]/umd/react-dom.production.min.js
// @connect      app.bilibili.com
// @connect      passport.bilibili.com
// @connect      link.acg.tv
// @connect      www.mcbbs.net
// @grant        GM.xmlHttpRequest
// @grant        GM_xmlhttpRequest
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        unsafeWindow
// ==/UserScript==

;(({ cssTextList = [] }) => {
  cssTextList.forEach((s) => {
    const style = document.createElement("style");
    style.innerText = s;
    style.dataset.source = "vite-plugin-monkey";
    document.head.appendChild(style);
  });
})({
  "cssTextList": [
    "._toast-container_9119l_1{position:fixed;top:50%;left:50%;z-index:999999;padding:12px 24px;font-size:14px;width:240px;margin-left:-120px;background:#ffb243;color:#fff;border-radius:6px}._expand-btn_wdzp9_1{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_wdzp9_1 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_wdzp9_1 svg._expanded_wdzp9_12{transform:rotate(0)}body.dark ._expand-btn_wdzp9_1{color:#eee!important;border-color:transparent!important;background-color:#333!important}body.dark ._expand-btn_wdzp9_1:hover{background-color:#555!important}._bili-video-card_14zjz_1{position:relative}._image-wrapper_14zjz_4{border-radius:6px;overflow:hidden}._preview-card-wrapper_14zjz_8{position:absolute;top:0;left:0;right:0;bottom:0;z-index:2;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit;border-bottom-left-radius:0;border-bottom-right-radius:0}._watch-later_14zjz_21{z-index:3}._badge_14zjz_24{color:#fa6a9d;border-radius:2px;border:1px #fa6a9d solid;line-height:20px;padding:0 10px;transform:scale(.8)}._recommend-reason_14zjz_32{text-overflow:ellipsis;overflow:hidden;white-space:nowrap;display:inline-block;color:var(--Or5);background-color:var(--Or1);border-radius:4px;margin-right:4px;font-size:var(--follow-icon-font-size);line-height:var(--follow-icon-line-height);height:var(--follow-icon-line-height);padding:0 4px;cursor:default}._bangumi-desc_14zjz_47{color:default}._btn-dislike_14zjz_50{display:flex;align-items:center;justify-content:center;position:absolute;top:8px;left:8px;width:28px;height:28px;border-radius:6px;cursor:pointer;background-color:#212121cc;z-index:9;transform:translateZ(0)}._btn-dislike_14zjz_50 ._btn-dislike-icon_14zjz_65{pointer-events:none;user-select:none;width:12px;height:12px;color:#fff}._btn-dislike_14zjz_50 ._btn-dislike-tip_14zjz_72{pointer-events:none;user-select:none;position:absolute;bottom:-6px;left:-5px;transform:translateY(100%);font-size:12px;color:#fff;border-radius:4px;line-height:18px;padding:4px 8px;background-color:#000c;white-space:nowrap}._disliked-wrapper_14zjz_87{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;border-radius:6px;border:1px solid #eee}body.dark ._disliked-wrapper_14zjz_87{border:1px solid #333}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101{border-top-left-radius:6px;border-top-right-radius:6px;padding-top:56.25%;position:relative}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-icon_14zjz_118{color:inherit}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-reason_14zjz_121{font-size:20px;text-align:center}._disliked-wrapper_14zjz_87 ._dislike-content-cover_14zjz_101 ._dislike-content-cover-inner_14zjz_107 ._dislike-desc_14zjz_125{font-size:16px;text-align:center}._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129{flex:1;width:100%;border-top:1px solid #eee;display:flex;align-items:center;justify-content:center}body.dark ._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129{border-top:1px solid #333}._disliked-wrapper_14zjz_87 ._dislike-content-action_14zjz_129 button{font-size:18px;color:inherit}._modal-mask_vh629_1{position:fixed;left:0;top:0;right:0;bottom:0;background-color:#00000080;z-index:11003;display:flex;align-items:center;justify-content:center}._modal_vh629_1{width:500px;max-height:calc(80vh - 50px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 15px 15px;display:flex;flex-direction:column}._modal_vh629_1 ._modal-header_vh629_23{padding-top:10px;padding-bottom:10px;border-bottom:none;display:flex;align-items:center}._modal_vh629_1 ._modal-header_vh629_23 ._modal-title_vh629_30{font-size:1.5rem;margin-bottom:0;line-height:1.5}._modal_vh629_1 ._modal-header_vh629_23 ._title-desc_vh629_35{margin-left:5px;font-size:40%}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{margin-left:10px}._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39 svg{width:10px;height:10px;margin-right:3px;margin-top:-1px}body.dark ._modal_vh629_1 ._modal-header_vh629_23 ._btn-close_vh629_39{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_vh629_1 ._modal-body_vh629_57{padding-top:0;flex-grow:1;overflow-y:scroll}._reason-list_vh629_62{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between}._reason_vh629_62{color:inherit;width:45%;text-align:center;line-height:20px;border:1px solid #eee;margin-top:8px;margin-bottom:8px;padding-top:5px;padding-bottom:5px}body.dark ._reason_vh629_62{border:1px solid #333}._modal-mask_1urmj_1{position:fixed;left:0;top:0;right:0;bottom:0;z-index:11000;background-color:#00000080;display:flex;align-items:center;justify-content:center}._modal-mask_1urmj_1._narrow-mode_1urmj_13{background-color:#000000e6}._modal_1urmj_1{width:calc(100vw - 30px);height:calc(100vh - 30px);border-radius:10px;overflow:hidden;background-color:#fff;padding:0 0 15px 15px;display:flex;flex-direction:column}body.dark ._modal_1urmj_1{border:1px solid #fb7299}._modal_1urmj_1._narrow-mode_1urmj_13{width:606px;height:calc(100vh - 10px);border:none}body.dark ._modal_1urmj_1._narrow-mode_1urmj_13{border:none}._modal_1urmj_1 ._modal-header_1urmj_38{padding-top:10px;padding-bottom:10px;border-bottom:none;padding-right:15px;display:flex;align-items:center}._modal_1urmj_1 ._modal-header_1urmj_38 ._modal-title_1urmj_46{font-size:1.5rem;margin-bottom:0;line-height:1.5}body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-refresh_1urmj_51,body.dark ._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{color:#eee!important;background-color:#333!important;border-color:transparent!important;height:auto;padding:8px 12px;line-height:16px;font-size:13px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52{margin-left:10px}._modal_1urmj_1 ._modal-header_1urmj_38 ._btn-close_1urmj_52 svg{width:10px;height:10px}._modal_1urmj_1 ._modal-body_1urmj_68{padding-top:0;flex-grow:1;overflow-y:scroll;padding-right:15px}._list_1urmj_74{color:inherit}._card_1urmj_77{border:2px solid transparent}._card_1urmj_77 .bili-video-card__info{padding-left:2px;padding-bottom:1px;margin-top:calc(var(--info-margin-top) - 1px)}._card_1urmj_77._active_1urmj_85{border-color:#fb7299;border-radius:6px;overflow:hidden}._video-card-list_1urmj_90{display:block!important}#_video-card-body_1urmj_1>*{display:block!important}#_video-card-body_1urmj_1._narrow-mode_1urmj_13{grid-template-columns:repeat(2,1fr)}._loader_1urmj_99{text-align:center;line-height:60px;font-size:120%}._checkbox_1urmj_104{margin-left:5px;margin-top:1px;cursor:pointer;outline:none}._checkbox_1urmj_104+label{margin-left:2px;user-select:none;cursor:pointer}._grid_p5dvw_1{color:default}@media (min-width: 2200px){._video-card-list_p5dvw_5.is-full{grid-column:span 7!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2{grid-column:span 7!important;grid-template-columns:repeat(7,1fr)!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*{display:block!important}._video-card-list_p5dvw_5.is-full .video-card-body.more-class1.more-class2>*:nth-of-type(1n + 15){display:none!important}}._expand-btn_p5dvw_19{padding:0;width:31px;height:31px;border-radius:50%}._expand-btn_p5dvw_19 svg{width:13px;height:13px;transform:rotate(180deg)}._expand-btn_p5dvw_19 svg._expanded_p5dvw_30{transform:rotate(0)}\n"
  ]
});

var QE=Object.defineProperty,qE=Object.defineProperties;var eO=Object.getOwnPropertyDescriptors;var Ri=Object.getOwnPropertySymbols;var lh=Object.prototype.hasOwnProperty,ch=Object.prototype.propertyIsEnumerable;var eo=(O,Re,De)=>Re in O?QE(O,Re,{enumerable:!0,configurable:!0,writable:!0,value:De}):O[Re]=De,vn=(O,Re)=>{for(var De in Re||(Re={}))lh.call(Re,De)&&eo(O,De,Re[De]);if(Ri)for(var De of Ri(Re))ch.call(Re,De)&&eo(O,De,Re[De]);return O},kn=(O,Re)=>qE(O,eO(Re));var fh=(O,Re)=>{var De={};for(var vt in O)lh.call(O,vt)&&Re.indexOf(vt)<0&&(De[vt]=O[vt]);if(O!=null&&Ri)for(var vt of Ri(O))Re.indexOf(vt)<0&&ch.call(O,vt)&&(De[vt]=O[vt]);return De};var to=(O,Re,De)=>(eo(O,typeof Re!="symbol"?Re+"":Re,De),De);(function(O,Re,De,vt,hh){"use strict";function Un(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}var Li=Un(O),zn=Un(Re),dh=Un(De),Pi=Un(vt),ph=Un(hh);const Mi=Symbol(),gh=Symbol(),Di=Symbol(),Ii=Object.getPrototypeOf,Ni=new WeakMap,no=i=>i&&(Ni.has(i)?Ni.get(i):Ii(i)===Object.prototype||Ii(i)===Array.prototype),$i=i=>typeof i=="object"&&i!==null,vh=(i,a)=>{let r=!1;const o=(c,d,g)=>{if(!r){let y=c.a.get(i);y||(y=new Set,c.a.set(i,y)),g&&y.has(Mi)||y.add(d)}},u={f:a,get(c,d){return d===Di?i:(o(this,d),ro(c[d],this.a,this.c))},has(c,d){return d===gh?(r=!0,this.a.delete(i),!0):(o(this,d),d in c)},getOwnPropertyDescriptor(c,d){return o(this,d,!0),Object.getOwnPropertyDescriptor(c,d)},ownKeys(c){return o(this,Mi),Reflect.ownKeys(c)}};return a&&(u.set=u.deleteProperty=()=>!1),u},ro=(i,a,r)=>{if(!no(i))return i;const o=i[Di]||i,u=(d=>Object.isFrozen(d)||Object.values(Object.getOwnPropertyDescriptors(d)).some(g=>!g.writable))(o);let c=r&&r.get(o);return c&&c.f===u||(c=vh(o,u),c.p=new Proxy(u?(d=>{if(Array.isArray(d))return Array.from(d);const g=Object.getOwnPropertyDescriptors(d);return Object.values(g).forEach(y=>{y.configurable=!0}),Object.create(Ii(d),g)})(o):o,c),r&&r.set(o,c)),c.a=a,c.c=r,c.p},_h=(i,a)=>{const r=Reflect.ownKeys(i),o=Reflect.ownKeys(a);return r.length!==o.length||r.some((u,c)=>u!==o[c])},io=(i,a,r,o)=>{if(Object.is(i,a))return!1;if(!$i(i)||!$i(a))return!0;const u=r.get(i);if(!u)return!0;if(o){const d=o.get(i);if(d&&d.n===a)return d.g;o.set(i,{n:a,g:!1})}let c=null;for(const d of u){const g=d===Mi?_h(i,a):io(i[d],a[d],r,o);if(g!==!0&&g!==!1||(c=g),c)break}return c===null&&(c=!0),o&&o.set(i,{n:a,g:c}),c},mh=i=>no(i)&&i[Di]||null,ao=(i,a)=>{Ni.set(i,a)},yh=(i,a)=>{const r=[],o=new WeakSet,u=(c,d)=>{if(o.has(c))return;$i(c)&&o.add(c);const g=a.get(c);g?g.forEach(y=>{u(c[y],d?[...d,y]:[y])}):d&&r.push(d)};return u(i),r};var xt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},so={exports:{}},oo={};/**
 * @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 _n=Li.default;function bh(i,a){return i===a&&(i!==0||1/i===1/a)||i!==i&&a!==a}var wh=typeof Object.is=="function"?Object.is:bh,Sh=_n.useState,xh=_n.useEffect,Th=_n.useLayoutEffect,Ah=_n.useDebugValue;function Ch(i,a){var r=a(),o=Sh({inst:{value:r,getSnapshot:a}}),u=o[0].inst,c=o[1];return Th(function(){u.value=r,u.getSnapshot=a,Fi(u)&&c({inst:u})},[i,r,a]),xh(function(){return Fi(u)&&c({inst:u}),i(function(){Fi(u)&&c({inst:u})})},[i]),Ah(r),r}function Fi(i){var a=i.getSnapshot;i=i.value;try{var r=a();return!wh(i,r)}catch{return!0}}function Eh(i,a){return a()}var Oh=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Eh:Ch;oo.useSyncExternalStore=_n.useSyncExternalStore!==void 0?_n.useSyncExternalStore:Oh,so.exports=oo;var Rh=so.exports;const Lh=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("VERSION"):Symbol(),Tt=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("LISTENERS"):Symbol(),yr=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("SNAPSHOT"):Symbol(),Ph=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("HANDLER"):Symbol(),Hn=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_RESULT"):Symbol(),uo=({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"?Symbol("PROMISE_ERROR"):Symbol(),lo=new WeakSet,Bi=i=>typeof i=="object"&&i!==null,Mh=i=>Bi(i)&&!lo.has(i)&&(Array.isArray(i)||!(Symbol.iterator in i))&&!(i instanceof WeakMap)&&!(i instanceof WeakSet)&&!(i instanceof Error)&&!(i instanceof Number)&&!(i instanceof Date)&&!(i instanceof String)&&!(i instanceof RegExp)&&!(i instanceof ArrayBuffer),co=new WeakMap;let fo=1;const ho=new WeakMap;function br(i={}){if(!Bi(i))throw new Error("object required");const a=co.get(i);if(a)return a;let r=fo;const o=new Set,u=(C,E=++fo)=>{r!==E&&(r=E,o.forEach(T=>T(C,E)))},c=new Map,d=C=>{let E=c.get(C);return E||(E=(T,I)=>{const M=[...T];M[1]=[C,...M[1]],u(M,I)},c.set(C,E)),E},g=C=>{const E=c.get(C);return c.delete(C),E},y=(C,E)=>{const T=ho.get(E);if((T==null?void 0:T[0])===r)return T[1];const I=Array.isArray(C)?[]:Object.create(Object.getPrototypeOf(C));return ao(I,!0),ho.set(E,[r,I]),Reflect.ownKeys(C).forEach(M=>{const N=Reflect.get(C,M,E);if(lo.has(N))ao(N,!1),I[M]=N;else if(N instanceof Promise)if(Hn in N)I[M]=N[Hn];else{const q=N[uo]||N;Object.defineProperty(I,M,{get(){if(Hn in N)return N[Hn];throw q}})}else N!=null&&N[Tt]?I[M]=N[yr]:I[M]=N}),Object.freeze(I),I},v=Array.isArray(i)?[]:Object.create(Object.getPrototypeOf(i)),w={get(C,E,T){return E===Lh?r:E===Tt?o:E===yr?y(C,T):E===Ph?w:Reflect.get(C,E,T)},deleteProperty(C,E){const T=Reflect.get(C,E),I=T==null?void 0:T[Tt];I&&I.delete(g(E));const M=Reflect.deleteProperty(C,E);return M&&u(["delete",[E],T]),M},is:Object.is,canProxy:Mh,set(C,E,T,I){var M;const N=Reflect.has(C,E),q=Reflect.get(C,E,I);if(N&&this.is(q,T))return!0;const X=q==null?void 0:q[Tt];X&&X.delete(g(E)),Bi(T)&&(T=mh(T)||T);let G;return(M=Object.getOwnPropertyDescriptor(C,E))!=null&&M.set?G=T:T instanceof Promise?G=T.then(H=>(G[Hn]=H,u(["resolve",[E],H]),H)).catch(H=>{G[uo]=H,u(["reject",[E],H])}):T!=null&&T[Tt]?(G=T,G[Tt].add(d(E))):this.canProxy(T)?(G=br(T),G[Tt].add(d(E))):G=T,Reflect.set(C,E,G,I),u(["set",[E],T,q]),!0}},S=new Proxy(v,w);return co.set(i,S),Reflect.ownKeys(i).forEach(C=>{const E=Object.getOwnPropertyDescriptor(i,C);E.get||E.set?Object.defineProperty(v,C,E):S[C]=i[C]}),S}function Dh(i,a,r){({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[Tt])&&console.warn("Please use proxy object");let o;const u=[],c=d=>{if(u.push(d),r){a(u.splice(0));return}o||(o=Promise.resolve().then(()=>{o=void 0,a(u.splice(0))}))};return i[Tt].add(c),()=>{i[Tt].delete(c)}}function po(i){return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&!(i!=null&&i[yr])&&console.warn("Please use proxy object"),i[yr]}const{useSyncExternalStore:Ih}=Rh,Nh=(i,a)=>{const r=O.useRef();O.useEffect(()=>{r.current=yh(i,a)}),O.useDebugValue(r.current)};function Wi(i,a){const r=a==null?void 0:a.sync,o=O.useRef(),u=O.useRef();let c=!0;const d=Ih(O.useCallback(v=>{const w=Dh(i,v,r);return v(),w},[i,r]),()=>{const v=po(i);try{if(!c&&o.current&&u.current&&!io(o.current,v,u.current,new WeakMap))return o.current}catch{}return v},()=>po(i));c=!1;const g=new WeakMap;O.useEffect(()=>{o.current=d,u.current=g}),({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&Nh(d,g);const y=O.useMemo(()=>new WeakMap,[]);return ro(d,g,y)}const qt=br({accessKey:"",useNarrowMode:!1,initialShowMore:!1}),ki=function(){return Wi(qt)},go="bilibili-app-recommend.config";function $h(){const i=GM_getValue(go);i&&typeof i=="object"&&Object.assign(qt,i)}function Fh(){GM_setValue(go,qt)}function wr(i){Object.assign(qt,i),Fh()}$h();var Ui={exports:{}};const Bh=(i,a)=>Math.floor(Math.random()*(a-i+1)+i),vo=()=>{const i=new Error("Delay aborted");return i.name="AbortError",i},_o=({clearTimeout:i,setTimeout:a,willResolve:r})=>(o,{value:u,signal:c}={})=>{if(c&&c.aborted)return Promise.reject(vo());let d,g,y;const v=i||clearTimeout,w=()=>{v(d),y(vo())},S=()=>{c&&c.removeEventListener("abort",w)},C=new Promise((E,T)=>{g=()=>{S(),r?E(u):T(u)},y=T,d=(a||setTimeout)(g,o)});return c&&c.addEventListener("abort",w,{once:!0}),C.clear=()=>{v(d),d=null,g()},C},mo=i=>{const a=_o(kn(vn({},i),{willResolve:!0}));return a.reject=_o(kn(vn({},i),{willResolve:!1})),a.range=(r,o,u)=>a(Bh(r,o),u),a},zi=mo();zi.createWithTimers=mo,Ui.exports=zi,Ui.exports.default=zi;var yo=Ui.exports,Hi,Wh=dh.default;Hi=Wh.createRoot;var kh=function(a){return function(r,o){var u=O.useRef(!1);a(function(){return function(){u.current=!1}},[]),a(function(){if(!u.current)u.current=!0;else return r()},o)}},Gi=function(a){return typeof a=="function"},Uh=function(a){return typeof a=="string"},bo=function(a){return typeof a=="number"};function Le(i){var a=O.useRef(i);a.current=O.useMemo(function(){return i},[i]);var r=O.useRef();return r.current||(r.current=function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];return a.current.apply(this,o)}),r.current}var ji=kh(O.useEffect),zh=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},wo=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(zh(arguments[a]));return i},So=function(a,r){var o=r.manual,u=r.ready,c=u===void 0?!0:u,d=r.defaultParams,g=d===void 0?[]:d,y=r.refreshDeps,v=y===void 0?[]:y,w=r.refreshDepsAction,S=O.useRef(!1);return S.current=!1,ji(function(){!o&&c&&(S.current=!0,a.run.apply(a,wo(g)))},[c]),ji(function(){S.current||o||(S.current=!0,w?w():a.refresh())},wo(v)),{onBefore:function(){if(!c)return{stopNow:!0}}}};So.onInit=function(i){var a=i.ready,r=a===void 0?!0:a,o=i.manual;return{loading:!o&&r}};var Hh=So;function Ki(i,a){if(i===a)return!0;for(var r=0;r<i.length;r++)if(!Object.is(i[r],a[r]))return!1;return!0}function xo(i,a){var r=O.useRef({deps:a,obj:void 0,initialized:!1}).current;return(r.initialized===!1||!Ki(r.deps,a))&&(r.deps=a,r.obj=i(),r.initialized=!0),r.obj}function Gn(i){var a=O.useRef(i);return a.current=i,a}var Gh=function(a){var r=Gn(a);O.useEffect(function(){return function(){r.current()}},[])},jn=Gh,Sr=globalThis&&globalThis.__assign||function(){return Sr=Object.assign||function(i){for(var a,r=1,o=arguments.length;r<o;r++){a=arguments[r];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}return i},Sr.apply(this,arguments)},xr=new Map,jh=function(a,r,o){var u=xr.get(a);u!=null&&u.timer&&clearTimeout(u.timer);var c=void 0;r>-1&&(c=setTimeout(function(){xr.delete(a)},r)),xr.set(a,Sr(Sr({},o),{timer:c}))},Kh=function(a){return xr.get(a)},Tr=new Map,Yh=function(a){return Tr.get(a)},Xh=function(a,r){Tr.set(a,r),r.then(function(o){return Tr.delete(a),o}).catch(function(){Tr.delete(a)})},en={},Zh=function(a,r){en[a]&&en[a].forEach(function(o){return o(r)})},Yi=function(a,r){return en[a]||(en[a]=[]),en[a].push(r),function(){var u=en[a].indexOf(r);en[a].splice(u,1)}},Jh=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Vh=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(Jh(arguments[a]));return i},Qh=function(a,r){var o=r.cacheKey,u=r.cacheTime,c=u===void 0?5*60*1e3:u,d=r.staleTime,g=d===void 0?0:d,y=r.setCache,v=r.getCache,w=O.useRef(),S=O.useRef(),C=function(I,M){y?y(M):jh(I,c,M),Zh(I,M.data)},E=function(I,M){return M===void 0&&(M=[]),v?v(M):Kh(I)};return xo(function(){if(!!o){var T=E(o);T&&Object.hasOwnProperty.call(T,"data")&&(a.state.data=T.data,a.state.params=T.params,(g===-1||new Date().getTime()-T.time<=g)&&(a.state.loading=!1)),w.current=Yi(o,function(I){a.setState({data:I})})}},[]),jn(function(){var T;(T=w.current)===null||T===void 0||T.call(w)}),o?{onBefore:function(I){var M=E(o,I);return!M||!Object.hasOwnProperty.call(M,"data")?{}:g===-1||new Date().getTime()-M.time<=g?{loading:!1,data:M==null?void 0:M.data,returnNow:!0}:{data:M==null?void 0:M.data}},onRequest:function(I,M){var N=Yh(o);return N&&N!==S.current?{servicePromise:N}:(N=I.apply(void 0,Vh(M)),S.current=N,Xh(o,N),{servicePromise:N})},onSuccess:function(I,M){var N;o&&((N=w.current)===null||N===void 0||N.call(w),C(o,{data:I,params:M,time:new Date().getTime()}),w.current=Yi(o,function(q){a.setState({data:q})}))},onMutate:function(I){var M;o&&((M=w.current)===null||M===void 0||M.call(w),C(o,{data:I,params:a.state.params,time:new Date().getTime()}),w.current=Yi(o,function(N){a.setState({data:N})}))}}:{}},qh=Qh;function ed(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}var Kn=ed,td=typeof xt=="object"&&xt&&xt.Object===Object&&xt,To=td,nd=To,rd=typeof self=="object"&&self&&self.Object===Object&&self,id=nd||rd||Function("return this")(),At=id,ad=At,sd=function(){return ad.Date.now()},od=sd,ud=/\s/;function ld(i){for(var a=i.length;a--&&ud.test(i.charAt(a)););return a}var cd=ld,fd=cd,hd=/^\s+/;function dd(i){return i&&i.slice(0,fd(i)+1).replace(hd,"")}var pd=dd,gd=At,vd=gd.Symbol,Xi=vd,Ao=Xi,Co=Object.prototype,_d=Co.hasOwnProperty,md=Co.toString,Yn=Ao?Ao.toStringTag:void 0;function yd(i){var a=_d.call(i,Yn),r=i[Yn];try{i[Yn]=void 0;var o=!0}catch{}var u=md.call(i);return o&&(a?i[Yn]=r:delete i[Yn]),u}var bd=yd,wd=Object.prototype,Sd=wd.toString;function xd(i){return Sd.call(i)}var Td=xd,Eo=Xi,Ad=bd,Cd=Td,Ed="[object Null]",Od="[object Undefined]",Oo=Eo?Eo.toStringTag:void 0;function Rd(i){return i==null?i===void 0?Od:Ed:Oo&&Oo in Object(i)?Ad(i):Cd(i)}var Xn=Rd;function Ld(i){return i!=null&&typeof i=="object"}var Zn=Ld,Pd=Xn,Md=Zn,Dd="[object Symbol]";function Id(i){return typeof i=="symbol"||Md(i)&&Pd(i)==Dd}var Nd=Id,$d=pd,Ro=Kn,Fd=Nd,Lo=0/0,Bd=/^[-+]0x[0-9a-f]+$/i,Wd=/^0b[01]+$/i,kd=/^0o[0-7]+$/i,Ud=parseInt;function zd(i){if(typeof i=="number")return i;if(Fd(i))return Lo;if(Ro(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=Ro(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=$d(i);var r=Wd.test(i);return r||kd.test(i)?Ud(i.slice(2),r?2:8):Bd.test(i)?Lo:+i}var Hd=zd,Gd=Kn,Zi=od,Po=Hd,jd="Expected a function",Kd=Math.max,Yd=Math.min;function Xd(i,a,r){var o,u,c,d,g,y,v=0,w=!1,S=!1,C=!0;if(typeof i!="function")throw new TypeError(jd);a=Po(a)||0,Gd(r)&&(w=!!r.leading,S="maxWait"in r,c=S?Kd(Po(r.maxWait)||0,a):c,C="trailing"in r?!!r.trailing:C);function E(j){var fe=o,_e=u;return o=u=void 0,v=j,d=i.apply(_e,fe),d}function T(j){return v=j,g=setTimeout(N,a),w?E(j):d}function I(j){var fe=j-y,_e=j-v,pe=a-fe;return S?Yd(pe,c-_e):pe}function M(j){var fe=j-y,_e=j-v;return y===void 0||fe>=a||fe<0||S&&_e>=c}function N(){var j=Zi();if(M(j))return q(j);g=setTimeout(N,I(j))}function q(j){return g=void 0,C&&o?E(j):(o=u=void 0,d)}function X(){g!==void 0&&clearTimeout(g),v=0,o=y=u=g=void 0}function G(){return g===void 0?d:q(Zi())}function H(){var j=Zi(),fe=M(j);if(o=arguments,u=this,y=j,fe){if(g===void 0)return T(y);if(S)return clearTimeout(g),g=setTimeout(N,a),E(y)}return g===void 0&&(g=setTimeout(N,a)),d}return H.cancel=X,H.flush=G,H}var Mo=Xd,Zd=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Jd=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(Zd(arguments[a]));return i},Vd=function(a,r){var o=r.debounceWait,u=r.debounceLeading,c=r.debounceTrailing,d=r.debounceMaxWait,g=O.useRef(),y=O.useMemo(function(){var v={};return u!==void 0&&(v.leading=u),c!==void 0&&(v.trailing=c),d!==void 0&&(v.maxWait=d),v},[u,c,d]);return O.useEffect(function(){if(o){var v=a.runAsync.bind(a);return g.current=Mo(function(w){w()},o,y),a.runAsync=function(){for(var w=[],S=0;S<arguments.length;S++)w[S]=arguments[S];return new Promise(function(C,E){var T;(T=g.current)===null||T===void 0||T.call(g,function(){v.apply(void 0,Jd(w)).then(C).catch(E)})})},function(){var w;(w=g.current)===null||w===void 0||w.cancel(),a.runAsync=v}}},[o,y]),o?{onCancel:function(){var w;(w=g.current)===null||w===void 0||w.cancel()}}:{}},Qd=Vd,qd=function(a,r){var o=r.loadingDelay,u=O.useRef();if(!o)return{};var c=function(){u.current&&clearTimeout(u.current)};return{onBefore:function(){return c(),u.current=setTimeout(function(){a.setState({loading:!0})},o),{loading:!1}},onFinally:function(){c()},onCancel:function(){c()}}},ep=qd;function Ar(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}function Ji(){return Ar()?document.visibilityState!=="hidden":!0}var Jn=[];function tp(i){return Jn.push(i),function(){var r=Jn.indexOf(i);Jn.splice(r,1)}}if(Ar()){var np=function(){if(!!Ji())for(var a=0;a<Jn.length;a++){var r=Jn[a];r()}};window.addEventListener("visibilitychange",np,!1)}var rp=function(a,r){var o=r.pollingInterval,u=r.pollingWhenHidden,c=u===void 0?!0:u,d=O.useRef(),g=O.useRef(),y=function(){var w;d.current&&clearTimeout(d.current),(w=g.current)===null||w===void 0||w.call(g)};return ji(function(){o||y()},[o]),o?{onBefore:function(){y()},onFinally:function(){if(!c&&!Ji()){g.current=tp(function(){a.refresh()});return}d.current=setTimeout(function(){a.refresh()},o)},onCancel:function(){y()}}:{}},ip=rp,ap=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},sp=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(ap(arguments[a]));return i};function op(i,a){var r=!1;return function(){for(var o=[],u=0;u<arguments.length;u++)o[u]=arguments[u];r||(r=!0,i.apply(void 0,sp(o)),setTimeout(function(){r=!1},a))}}function up(){return Ar()&&typeof navigator.onLine!="undefined"?navigator.onLine:!0}var Vn=[];function lp(i){return Vn.push(i),function(){var r=Vn.indexOf(i);Vn.splice(r,1)}}if(Ar()){var Do=function(){if(!(!Ji()||!up()))for(var a=0;a<Vn.length;a++){var r=Vn[a];r()}};window.addEventListener("visibilitychange",Do,!1),window.addEventListener("focus",Do,!1)}var cp=function(a,r){var o=r.refreshOnWindowFocus,u=r.focusTimespan,c=u===void 0?5e3:u,d=O.useRef(),g=function(){var v;(v=d.current)===null||v===void 0||v.call(d)};return O.useEffect(function(){if(o){var y=op(a.refresh.bind(a),c);d.current=lp(function(){y()})}return function(){g()}},[o,c]),jn(function(){g()}),{}},fp=cp,hp=function(a,r){var o=r.retryInterval,u=r.retryCount,c=O.useRef(),d=O.useRef(0),g=O.useRef(!1);return u?{onBefore:function(){g.current||(d.current=0),g.current=!1,c.current&&clearTimeout(c.current)},onSuccess:function(){d.current=0},onError:function(){if(d.current+=1,u===-1||d.current<=u){var v=o!=null?o:Math.min(1e3*Math.pow(2,d.current),3e4);c.current=setTimeout(function(){g.current=!0,a.refresh()},v)}else d.current=0},onCancel:function(){d.current=0,c.current&&clearTimeout(c.current)}}:{}},dp=hp,pp=Mo,gp=Kn,vp="Expected a function";function _p(i,a,r){var o=!0,u=!0;if(typeof i!="function")throw new TypeError(vp);return gp(r)&&(o="leading"in r?!!r.leading:o,u="trailing"in r?!!r.trailing:u),pp(i,a,{leading:o,maxWait:a,trailing:u})}var mp=_p,yp=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},bp=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(yp(arguments[a]));return i},wp=function(a,r){var o=r.throttleWait,u=r.throttleLeading,c=r.throttleTrailing,d=O.useRef(),g={};return u!==void 0&&(g.leading=u),c!==void 0&&(g.trailing=c),O.useEffect(function(){if(o){var y=a.runAsync.bind(a);return d.current=mp(function(v){v()},o,g),a.runAsync=function(){for(var v=[],w=0;w<arguments.length;w++)v[w]=arguments[w];return new Promise(function(S,C){var E;(E=d.current)===null||E===void 0||E.call(d,function(){y.apply(void 0,bp(v)).then(S).catch(C)})})},function(){var v;a.runAsync=y,(v=d.current)===null||v===void 0||v.cancel()}}},[o,u,c]),o?{onCancel:function(){var v;(v=d.current)===null||v===void 0||v.cancel()}}:{}},Sp=wp,xp=function(a){O.useEffect(function(){a==null||a()},[])},Tp=xp,Ap=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Cp=function(){var a=Ap(O.useState({}),2),r=a[1];return O.useCallback(function(){return r({})},[])},Ep=Cp,Ht=globalThis&&globalThis.__assign||function(){return Ht=Object.assign||function(i){for(var a,r=1,o=arguments.length;r<o;r++){a=arguments[r];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}return i},Ht.apply(this,arguments)},Op=globalThis&&globalThis.__awaiter||function(i,a,r,o){function u(c){return c instanceof r?c:new r(function(d){d(c)})}return new(r||(r=Promise))(function(c,d){function g(w){try{v(o.next(w))}catch(S){d(S)}}function y(w){try{v(o.throw(w))}catch(S){d(S)}}function v(w){w.done?c(w.value):u(w.value).then(g,y)}v((o=o.apply(i,a||[])).next())})},Rp=globalThis&&globalThis.__generator||function(i,a){var r={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},o,u,c,d;return d={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(d[Symbol.iterator]=function(){return this}),d;function g(v){return function(w){return y([v,w])}}function y(v){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,u&&(c=v[0]&2?u.return:v[0]?u.throw||((c=u.return)&&c.call(u),0):u.next)&&!(c=c.call(u,v[1])).done)return c;switch(u=0,c&&(v=[v[0]&2,c.value]),v[0]){case 0:case 1:c=v;break;case 4:return r.label++,{value:v[1],done:!1};case 5:r.label++,u=v[1],v=[0];continue;case 7:v=r.ops.pop(),r.trys.pop();continue;default:if(c=r.trys,!(c=c.length>0&&c[c.length-1])&&(v[0]===6||v[0]===2)){r=0;continue}if(v[0]===3&&(!c||v[1]>c[0]&&v[1]<c[3])){r.label=v[1];break}if(v[0]===6&&r.label<c[1]){r.label=c[1],c=v;break}if(c&&r.label<c[2]){r.label=c[2],r.ops.push(v);break}c[2]&&r.ops.pop(),r.trys.pop();continue}v=a.call(i,r)}catch(w){v=[6,w],u=0}finally{o=c=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},Lp=globalThis&&globalThis.__rest||function(i,a){var r={};for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.indexOf(o)<0&&(r[o]=i[o]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,o=Object.getOwnPropertySymbols(i);u<o.length;u++)a.indexOf(o[u])<0&&Object.prototype.propertyIsEnumerable.call(i,o[u])&&(r[o[u]]=i[o[u]]);return r},Pp=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},mn=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(Pp(arguments[a]));return i},Mp=function(){function i(a,r,o,u){u===void 0&&(u={}),this.serviceRef=a,this.options=r,this.subscribe=o,this.initState=u,this.count=0,this.state={loading:!1,params:void 0,data:void 0,error:void 0},this.state=Ht(Ht(Ht({},this.state),{loading:!r.manual}),u)}return i.prototype.setState=function(a){a===void 0&&(a={}),this.state=Ht(Ht({},this.state),a),this.subscribe()},i.prototype.runPluginHandler=function(a){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var u=this.pluginImpls.map(function(c){var d;return(d=c[a])===null||d===void 0?void 0:d.call.apply(d,mn([c],r))}).filter(Boolean);return Object.assign.apply(Object,mn([{}],u))},i.prototype.runAsync=function(){for(var a,r,o,u,c,d,g,y,v,w,S=[],C=0;C<arguments.length;C++)S[C]=arguments[C];return Op(this,void 0,void 0,function(){var E,T,I,M,N,q,X,G,H,j,fe;return Rp(this,function(_e){switch(_e.label){case 0:if(this.count+=1,E=this.count,T=this.runPluginHandler("onBefore",S),I=T.stopNow,M=I===void 0?!1:I,N=T.returnNow,q=N===void 0?!1:N,X=Lp(T,["stopNow","returnNow"]),M)return[2,new Promise(function(){})];if(this.setState(Ht({loading:!0,params:S},X)),q)return[2,Promise.resolve(X.data)];(r=(a=this.options).onBefore)===null||r===void 0||r.call(a,S),_e.label=1;case 1:return _e.trys.push([1,3,,4]),G=this.runPluginHandler("onRequest",this.serviceRef.current,S).servicePromise,G||(G=(fe=this.serviceRef).current.apply(fe,mn(S))),[4,G];case 2:return H=_e.sent(),E!==this.count?[2,new Promise(function(){})]:(this.setState({data:H,error:void 0,loading:!1}),(u=(o=this.options).onSuccess)===null||u===void 0||u.call(o,H,S),this.runPluginHandler("onSuccess",H,S),(d=(c=this.options).onFinally)===null||d===void 0||d.call(c,S,H,void 0),E===this.count&&this.runPluginHandler("onFinally",S,H,void 0),[2,H]);case 3:if(j=_e.sent(),E!==this.count)return[2,new Promise(function(){})];throw this.setState({error:j,loading:!1}),(y=(g=this.options).onError)===null||y===void 0||y.call(g,j,S),this.runPluginHandler("onError",j,S),(w=(v=this.options).onFinally)===null||w===void 0||w.call(v,S,void 0,j),E===this.count&&this.runPluginHandler("onFinally",S,void 0,j),j;case 4:return[2]}})})},i.prototype.run=function(){for(var a=this,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];this.runAsync.apply(this,mn(r)).catch(function(u){a.options.onError||console.error(u)})},i.prototype.cancel=function(){this.count+=1,this.setState({loading:!1}),this.runPluginHandler("onCancel")},i.prototype.refresh=function(){this.run.apply(this,mn(this.state.params||[]))},i.prototype.refreshAsync=function(){return this.runAsync.apply(this,mn(this.state.params||[]))},i.prototype.mutate=function(a){var r;Gi(a)?r=a(this.state.data):r=a,this.runPluginHandler("onMutate",r),this.setState({data:r})},i}(),Dp=Mp,Vi=globalThis&&globalThis.__assign||function(){return Vi=Object.assign||function(i){for(var a,r=1,o=arguments.length;r<o;r++){a=arguments[r];for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&(i[u]=a[u])}return i},Vi.apply(this,arguments)},Ip=globalThis&&globalThis.__rest||function(i,a){var r={};for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&a.indexOf(o)<0&&(r[o]=i[o]);if(i!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,o=Object.getOwnPropertySymbols(i);u<o.length;u++)a.indexOf(o[u])<0&&Object.prototype.propertyIsEnumerable.call(i,o[u])&&(r[o[u]]=i[o[u]]);return r},Np=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Io=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(Np(arguments[a]));return i};function $p(i,a,r){a===void 0&&(a={}),r===void 0&&(r=[]);var o=a.manual,u=o===void 0?!1:o,c=Ip(a,["manual"]),d=Vi({manual:u},c),g=Gn(i),y=Ep(),v=xo(function(){var w=r.map(function(S){var C;return(C=S==null?void 0:S.onInit)===null||C===void 0?void 0:C.call(S,d)}).filter(Boolean);return new Dp(g,d,y,Object.assign.apply(Object,Io([{}],w)))},[]);return v.options=d,v.pluginImpls=r.map(function(w){return w(v,d)}),Tp(function(){if(!u){var w=v.state.params||a.defaultParams||[];v.run.apply(v,Io(w))}}),jn(function(){v.cancel()}),{loading:v.state.loading,data:v.state.data,error:v.state.error,params:v.state.params||[],cancel:Le(v.cancel.bind(v)),refresh:Le(v.refresh.bind(v)),refreshAsync:Le(v.refreshAsync.bind(v)),run:Le(v.run.bind(v)),runAsync:Le(v.runAsync.bind(v)),mutate:Le(v.mutate.bind(v))}}var Fp=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},Bp=globalThis&&globalThis.__spread||function(){for(var i=[],a=0;a<arguments.length;a++)i=i.concat(Fp(arguments[a]));return i};function Wp(i,a,r){return $p(i,a,Bp(r||[],[Qd,ep,ip,fp,Sp,Hh,qh,dp]))}var kp=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c};function No(i,a){i===void 0&&(i=!1);var r=kp(O.useState(i),2),o=r[0],u=r[1],c=O.useMemo(function(){var d=a===void 0?!i:a,g=function(){return u(function(C){return C===i?d:i})},y=function(C){return u(C)},v=function(){return u(i)},w=function(){return u(d)};return{toggle:g,set:y,setLeft:v,setRight:w}},[]);return[o,c]}var Up=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c};function zp(i){i===void 0&&(i=!1);var a=Up(No(i),2),r=a[0],o=a[1],u=o.toggle,c=o.set,d=O.useMemo(function(){var g=function(){return c(!0)},y=function(){return c(!1)};return{toggle:u,set:function(w){return c(!!w)},setTrue:g,setFalse:y}},[]);return[r,d]}var Hp=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Gp=Hp;function Cr(i,a){if(!!Gp){if(!i)return a;var r;return Gi(i)?r=i():"current"in i?r=i.current:r=i,r}}var jp=function(a){var r=function(u,c,d){var g=O.useRef(!1),y=O.useRef([]),v=O.useRef([]),w=O.useRef();a(function(){var S,C=Array.isArray(d)?d:[d],E=C.map(function(T){return Cr(T)});if(!g.current){g.current=!0,y.current=E,v.current=c,w.current=u();return}(E.length!==y.current.length||!Ki(E,y.current)||!Ki(c,v.current))&&((S=w.current)===null||S===void 0||S.call(w),y.current=E,v.current=c,w.current=u())}),jn(function(){var S;(S=w.current)===null||S===void 0||S.call(w),g.current=!1})};return r},Kp=jp,Yp=Kp(O.useEffect),$o=Yp,Fo={exports:{}};(function(i,a){(function(r,o){i.exports=o()})(xt,function(){var r=1e3,o=6e4,u=36e5,c="millisecond",d="second",g="minute",y="hour",v="day",w="week",S="month",C="quarter",E="year",T="date",I="Invalid Date",M=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|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,q={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("_")},X=function(V,U,W){var Q=String(V);return!Q||Q.length>=U?V:""+Array(U+1-Q.length).join(W)+V},G={s:X,z:function(V){var U=-V.utcOffset(),W=Math.abs(U),Q=Math.floor(W/60),F=W%60;return(U<=0?"+":"-")+X(Q,2,"0")+":"+X(F,2,"0")},m:function V(U,W){if(U.date()<W.date())return-V(W,U);var Q=12*(W.year()-U.year())+(W.month()-U.month()),F=U.clone().add(Q,S),K=W-F<0,ee=U.clone().add(Q+(K?-1:1),S);return+(-(Q+(W-F)/(K?F-ee:ee-F))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:S,y:E,w,d:v,D:T,h:y,m:g,s:d,ms:c,Q:C}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},H="en",j={};j[H]=q;var fe=function(V){return V instanceof Ue},_e=function V(U,W,Q){var F;if(!U)return H;if(typeof U=="string"){var K=U.toLowerCase();j[K]&&(F=K),W&&(j[K]=W,F=K);var ee=U.split("-");if(!F&&ee.length>1)return V(ee[0])}else{var le=U.name;j[le]=U,F=le}return!Q&&F&&(H=F),F||!Q&&H},pe=function(V,U){if(fe(V))return V.clone();var W=typeof U=="object"?U:{};return W.date=V,W.args=arguments,new Ue(W)},se=G;se.l=_e,se.i=fe,se.w=function(V,U){return pe(V,{locale:U.$L,utc:U.$u,x:U.$x,$offset:U.$offset})};var Ue=function(){function V(W){this.$L=_e(W.locale,null,!0),this.parse(W)}var U=V.prototype;return U.parse=function(W){this.$d=function(Q){var F=Q.date,K=Q.utc;if(F===null)return new Date(NaN);if(se.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var ee=F.match(M);if(ee){var le=ee[2]-1||0,de=(ee[7]||"0").substring(0,3);return K?new Date(Date.UTC(ee[1],le,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,de)):new Date(ee[1],le,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,de)}}return new Date(F)}(W),this.$x=W.x||{},this.init()},U.init=function(){var W=this.$d;this.$y=W.getFullYear(),this.$M=W.getMonth(),this.$D=W.getDate(),this.$W=W.getDay(),this.$H=W.getHours(),this.$m=W.getMinutes(),this.$s=W.getSeconds(),this.$ms=W.getMilliseconds()},U.$utils=function(){return se},U.isValid=function(){return this.$d.toString()!==I},U.isSame=function(W,Q){var F=pe(W);return this.startOf(Q)<=F&&F<=this.endOf(Q)},U.isAfter=function(W,Q){return pe(W)<this.startOf(Q)},U.isBefore=function(W,Q){return this.endOf(Q)<pe(W)},U.$g=function(W,Q,F){return se.u(W)?this[Q]:this.set(F,W)},U.unix=function(){return Math.floor(this.valueOf()/1e3)},U.valueOf=function(){return this.$d.getTime()},U.startOf=function(W,Q){var F=this,K=!!se.u(Q)||Q,ee=se.p(W),le=function(Ie,Ee){var qe=se.w(F.$u?Date.UTC(F.$y,Ee,Ie):new Date(F.$y,Ee,Ie),F);return K?qe:qe.endOf(v)},de=function(Ie,Ee){return se.w(F.toDate()[Ie].apply(F.toDate("s"),(K?[0,0,0,0]:[23,59,59,999]).slice(Ee)),F)},be=this.$W,Ce=this.$M,st=this.$D,Fe="set"+(this.$u?"UTC":"");switch(ee){case E:return K?le(1,0):le(31,11);case S:return K?le(1,Ce):le(0,Ce+1);case w:var ot=this.$locale().weekStart||0,Pt=(be<ot?be+7:be)-ot;return le(K?st-Pt:st+(6-Pt),Ce);case v:case T:return de(Fe+"Hours",0);case y:return de(Fe+"Minutes",1);case g:return de(Fe+"Seconds",2);case d:return de(Fe+"Milliseconds",3);default:return this.clone()}},U.endOf=function(W){return this.startOf(W,!1)},U.$set=function(W,Q){var F,K=se.p(W),ee="set"+(this.$u?"UTC":""),le=(F={},F[v]=ee+"Date",F[T]=ee+"Date",F[S]=ee+"Month",F[E]=ee+"FullYear",F[y]=ee+"Hours",F[g]=ee+"Minutes",F[d]=ee+"Seconds",F[c]=ee+"Milliseconds",F)[K],de=K===v?this.$D+(Q-this.$W):Q;if(K===S||K===E){var be=this.clone().set(T,1);be.$d[le](de),be.init(),this.$d=be.set(T,Math.min(this.$D,be.daysInMonth())).$d}else le&&this.$d[le](de);return this.init(),this},U.set=function(W,Q){return this.clone().$set(W,Q)},U.get=function(W){return this[se.p(W)]()},U.add=function(W,Q){var F,K=this;W=Number(W);var ee=se.p(Q),le=function(Ce){var st=pe(K);return se.w(st.date(st.date()+Math.round(Ce*W)),K)};if(ee===S)return this.set(S,this.$M+W);if(ee===E)return this.set(E,this.$y+W);if(ee===v)return le(1);if(ee===w)return le(7);var de=(F={},F[g]=o,F[y]=u,F[d]=r,F)[ee]||1,be=this.$d.getTime()+W*de;return se.w(be,this)},U.subtract=function(W,Q){return this.add(-1*W,Q)},U.format=function(W){var Q=this,F=this.$locale();if(!this.isValid())return F.invalidDate||I;var K=W||"YYYY-MM-DDTHH:mm:ssZ",ee=se.z(this),le=this.$H,de=this.$m,be=this.$M,Ce=F.weekdays,st=F.months,Fe=function(Ee,qe,Ct,Mt){return Ee&&(Ee[qe]||Ee(Q,K))||Ct[qe].slice(0,Mt)},ot=function(Ee){return se.s(le%12||12,Ee,"0")},Pt=F.meridiem||function(Ee,qe,Ct){var Mt=Ee<12?"AM":"PM";return Ct?Mt.toLowerCase():Mt},Ie={YY:String(this.$y).slice(-2),YYYY:this.$y,M:be+1,MM:se.s(be+1,2,"0"),MMM:Fe(F.monthsShort,be,st,3),MMMM:Fe(st,be),D:this.$D,DD:se.s(this.$D,2,"0"),d:String(this.$W),dd:Fe(F.weekdaysMin,this.$W,Ce,2),ddd:Fe(F.weekdaysShort,this.$W,Ce,3),dddd:Ce[this.$W],H:String(le),HH:se.s(le,2,"0"),h:ot(1),hh:ot(2),a:Pt(le,de,!0),A:Pt(le,de,!1),m:String(de),mm:se.s(de,2,"0"),s:String(this.$s),ss:se.s(this.$s,2,"0"),SSS:se.s(this.$ms,3,"0"),Z:ee};return K.replace(N,function(Ee,qe){return qe||Ie[Ee]||ee.replace(":","")})},U.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},U.diff=function(W,Q,F){var K,ee=se.p(Q),le=pe(W),de=(le.utcOffset()-this.utcOffset())*o,be=this-le,Ce=se.m(this,le);return Ce=(K={},K[E]=Ce/12,K[S]=Ce,K[C]=Ce/3,K[w]=(be-de)/6048e5,K[v]=(be-de)/864e5,K[y]=be/u,K[g]=be/o,K[d]=be/r,K)[ee]||be,F?Ce:se.a(Ce)},U.daysInMonth=function(){return this.endOf(S).$D},U.$locale=function(){return j[this.$L]},U.locale=function(W,Q){if(!W)return this.$L;var F=this.clone(),K=_e(W,Q,!0);return K&&(F.$L=K),F},U.clone=function(){return se.w(this.$d,this)},U.toDate=function(){return new Date(this.valueOf())},U.toJSON=function(){return this.isValid()?this.toISOString():null},U.toISOString=function(){return this.$d.toISOString()},U.toString=function(){return this.$d.toUTCString()},V}(),sn=Ue.prototype;return pe.prototype=sn,[["$ms",c],["$s",d],["$m",g],["$H",y],["$W",v],["$M",S],["$y",E],["$D",T]].forEach(function(V){sn[V[1]]=function(U){return this.$g(U,V[0],V[1])}}),pe.extend=function(V,U){return V.$i||(V(U,Ue,pe),V.$i=!0),pe},pe.locale=_e,pe.isDayjs=fe,pe.unix=function(V){return pe(1e3*V)},pe.en=j[H],pe.Ls=j,pe.p={},pe})})(Fo);var Bo=Fo.exports;function Xp(){this.__data__=[],this.size=0}var Zp=Xp;function Jp(i,a){return i===a||i!==i&&a!==a}var Wo=Jp,Vp=Wo;function Qp(i,a){for(var r=i.length;r--;)if(Vp(i[r][0],a))return r;return-1}var Er=Qp,qp=Er,eg=Array.prototype,tg=eg.splice;function ng(i){var a=this.__data__,r=qp(a,i);if(r<0)return!1;var o=a.length-1;return r==o?a.pop():tg.call(a,r,1),--this.size,!0}var rg=ng,ig=Er;function ag(i){var a=this.__data__,r=ig(a,i);return r<0?void 0:a[r][1]}var sg=ag,og=Er;function ug(i){return og(this.__data__,i)>-1}var lg=ug,cg=Er;function fg(i,a){var r=this.__data__,o=cg(r,i);return o<0?(++this.size,r.push([i,a])):r[o][1]=a,this}var hg=fg,dg=Zp,pg=rg,gg=sg,vg=lg,_g=hg;function yn(i){var a=-1,r=i==null?0:i.length;for(this.clear();++a<r;){var o=i[a];this.set(o[0],o[1])}}yn.prototype.clear=dg,yn.prototype.delete=pg,yn.prototype.get=gg,yn.prototype.has=vg,yn.prototype.set=_g;var Or=yn,mg=Or;function yg(){this.__data__=new mg,this.size=0}var bg=yg;function wg(i){var a=this.__data__,r=a.delete(i);return this.size=a.size,r}var Sg=wg;function xg(i){return this.__data__.get(i)}var Tg=xg;function Ag(i){return this.__data__.has(i)}var Cg=Ag,Eg=Xn,Og=Kn,Rg="[object AsyncFunction]",Lg="[object Function]",Pg="[object GeneratorFunction]",Mg="[object Proxy]";function Dg(i){if(!Og(i))return!1;var a=Eg(i);return a==Lg||a==Pg||a==Rg||a==Mg}var ko=Dg,Ig=At,Ng=Ig["__core-js_shared__"],$g=Ng,Qi=$g,Uo=function(){var i=/[^.]+$/.exec(Qi&&Qi.keys&&Qi.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}();function Fg(i){return!!Uo&&Uo in i}var Bg=Fg,Wg=Function.prototype,kg=Wg.toString;function Ug(i){if(i!=null){try{return kg.call(i)}catch{}try{return i+""}catch{}}return""}var zo=Ug,zg=ko,Hg=Bg,Gg=Kn,jg=zo,Kg=/[\\^$.*+?()[\]{}|]/g,Yg=/^\[object .+?Constructor\]$/,Xg=Function.prototype,Zg=Object.prototype,Jg=Xg.toString,Vg=Zg.hasOwnProperty,Qg=RegExp("^"+Jg.call(Vg).replace(Kg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function qg(i){if(!Gg(i)||Hg(i))return!1;var a=zg(i)?Qg:Yg;return a.test(jg(i))}var ev=qg;function tv(i,a){return i==null?void 0:i[a]}var nv=tv,rv=ev,iv=nv;function av(i,a){var r=iv(i,a);return rv(r)?r:void 0}var bn=av,sv=bn,ov=At,uv=sv(ov,"Map"),qi=uv,lv=bn,cv=lv(Object,"create"),Rr=cv,Ho=Rr;function fv(){this.__data__=Ho?Ho(null):{},this.size=0}var hv=fv;function dv(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a}var pv=dv,gv=Rr,vv="__lodash_hash_undefined__",_v=Object.prototype,mv=_v.hasOwnProperty;function yv(i){var a=this.__data__;if(gv){var r=a[i];return r===vv?void 0:r}return mv.call(a,i)?a[i]:void 0}var bv=yv,wv=Rr,Sv=Object.prototype,xv=Sv.hasOwnProperty;function Tv(i){var a=this.__data__;return wv?a[i]!==void 0:xv.call(a,i)}var Av=Tv,Cv=Rr,Ev="__lodash_hash_undefined__";function Ov(i,a){var r=this.__data__;return this.size+=this.has(i)?0:1,r[i]=Cv&&a===void 0?Ev:a,this}var Rv=Ov,Lv=hv,Pv=pv,Mv=bv,Dv=Av,Iv=Rv;function wn(i){var a=-1,r=i==null?0:i.length;for(this.clear();++a<r;){var o=i[a];this.set(o[0],o[1])}}wn.prototype.clear=Lv,wn.prototype.delete=Pv,wn.prototype.get=Mv,wn.prototype.has=Dv,wn.prototype.set=Iv;var Nv=wn,Go=Nv,$v=Or,Fv=qi;function Bv(){this.size=0,this.__data__={hash:new Go,map:new(Fv||$v),string:new Go}}var Wv=Bv;function kv(i){var a=typeof i;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?i!=="__proto__":i===null}var Uv=kv,zv=Uv;function Hv(i,a){var r=i.__data__;return zv(a)?r[typeof a=="string"?"string":"hash"]:r.map}var Lr=Hv,Gv=Lr;function jv(i){var a=Gv(this,i).delete(i);return this.size-=a?1:0,a}var Kv=jv,Yv=Lr;function Xv(i){return Yv(this,i).get(i)}var Zv=Xv,Jv=Lr;function Vv(i){return Jv(this,i).has(i)}var Qv=Vv,qv=Lr;function e_(i,a){var r=qv(this,i),o=r.size;return r.set(i,a),this.size+=r.size==o?0:1,this}var t_=e_,n_=Wv,r_=Kv,i_=Zv,a_=Qv,s_=t_;function Sn(i){var a=-1,r=i==null?0:i.length;for(this.clear();++a<r;){var o=i[a];this.set(o[0],o[1])}}Sn.prototype.clear=n_,Sn.prototype.delete=r_,Sn.prototype.get=i_,Sn.prototype.has=a_,Sn.prototype.set=s_;var jo=Sn,o_=Or,u_=qi,l_=jo,c_=200;function f_(i,a){var r=this.__data__;if(r instanceof o_){var o=r.__data__;if(!u_||o.length<c_-1)return o.push([i,a]),this.size=++r.size,this;r=this.__data__=new l_(o)}return r.set(i,a),this.size=r.size,this}var h_=f_,d_=Or,p_=bg,g_=Sg,v_=Tg,__=Cg,m_=h_;function xn(i){var a=this.__data__=new d_(i);this.size=a.size}xn.prototype.clear=p_,xn.prototype.delete=g_,xn.prototype.get=v_,xn.prototype.has=__,xn.prototype.set=m_;var y_=xn,b_="__lodash_hash_undefined__";function w_(i){return this.__data__.set(i,b_),this}var S_=w_;function x_(i){return this.__data__.has(i)}var T_=x_,A_=jo,C_=S_,E_=T_;function Pr(i){var a=-1,r=i==null?0:i.length;for(this.__data__=new A_;++a<r;)this.add(i[a])}Pr.prototype.add=Pr.prototype.push=C_,Pr.prototype.has=E_;var O_=Pr;function R_(i,a){for(var r=-1,o=i==null?0:i.length;++r<o;)if(a(i[r],r,i))return!0;return!1}var L_=R_;function P_(i,a){return i.has(a)}var M_=P_,D_=O_,I_=L_,N_=M_,$_=1,F_=2;function B_(i,a,r,o,u,c){var d=r&$_,g=i.length,y=a.length;if(g!=y&&!(d&&y>g))return!1;var v=c.get(i),w=c.get(a);if(v&&w)return v==a&&w==i;var S=-1,C=!0,E=r&F_?new D_:void 0;for(c.set(i,a),c.set(a,i);++S<g;){var T=i[S],I=a[S];if(o)var M=d?o(I,T,S,a,i,c):o(T,I,S,i,a,c);if(M!==void 0){if(M)continue;C=!1;break}if(E){if(!I_(a,function(N,q){if(!N_(E,q)&&(T===N||u(T,N,r,o,c)))return E.push(q)})){C=!1;break}}else if(!(T===I||u(T,I,r,o,c))){C=!1;break}}return c.delete(i),c.delete(a),C}var Ko=B_,W_=At,k_=W_.Uint8Array,U_=k_;function z_(i){var a=-1,r=Array(i.size);return i.forEach(function(o,u){r[++a]=[u,o]}),r}var H_=z_;function G_(i){var a=-1,r=Array(i.size);return i.forEach(function(o){r[++a]=o}),r}var j_=G_,Yo=Xi,Xo=U_,K_=Wo,Y_=Ko,X_=H_,Z_=j_,J_=1,V_=2,Q_="[object Boolean]",q_="[object Date]",em="[object Error]",tm="[object Map]",nm="[object Number]",rm="[object RegExp]",im="[object Set]",am="[object String]",sm="[object Symbol]",om="[object ArrayBuffer]",um="[object DataView]",Zo=Yo?Yo.prototype:void 0,ea=Zo?Zo.valueOf:void 0;function lm(i,a,r,o,u,c,d){switch(r){case um:if(i.byteLength!=a.byteLength||i.byteOffset!=a.byteOffset)return!1;i=i.buffer,a=a.buffer;case om:return!(i.byteLength!=a.byteLength||!c(new Xo(i),new Xo(a)));case Q_:case q_:case nm:return K_(+i,+a);case em:return i.name==a.name&&i.message==a.message;case rm:case am:return i==a+"";case tm:var g=X_;case im:var y=o&J_;if(g||(g=Z_),i.size!=a.size&&!y)return!1;var v=d.get(i);if(v)return v==a;o|=V_,d.set(i,a);var w=Y_(g(i),g(a),o,u,c,d);return d.delete(i),w;case sm:if(ea)return ea.call(i)==ea.call(a)}return!1}var cm=lm;function fm(i,a){for(var r=-1,o=a.length,u=i.length;++r<o;)i[u+r]=a[r];return i}var hm=fm,dm=Array.isArray,ta=dm,pm=hm,gm=ta;function vm(i,a,r){var o=a(i);return gm(i)?o:pm(o,r(i))}var _m=vm;function mm(i,a){for(var r=-1,o=i==null?0:i.length,u=0,c=[];++r<o;){var d=i[r];a(d,r,i)&&(c[u++]=d)}return c}var ym=mm;function bm(){return[]}var wm=bm,Sm=ym,xm=wm,Tm=Object.prototype,Am=Tm.propertyIsEnumerable,Jo=Object.getOwnPropertySymbols,Cm=Jo?function(i){return i==null?[]:(i=Object(i),Sm(Jo(i),function(a){return Am.call(i,a)}))}:xm,Em=Cm;function Om(i,a){for(var r=-1,o=Array(i);++r<i;)o[r]=a(r);return o}var Rm=Om,Lm=Xn,Pm=Zn,Mm="[object Arguments]";function Dm(i){return Pm(i)&&Lm(i)==Mm}var Im=Dm,Vo=Im,Nm=Zn,Qo=Object.prototype,$m=Qo.hasOwnProperty,Fm=Qo.propertyIsEnumerable,Bm=Vo(function(){return arguments}())?Vo:function(i){return Nm(i)&&$m.call(i,"callee")&&!Fm.call(i,"callee")},Wm=Bm,Mr={exports:{}};function km(){return!1}var Um=km;(function(i,a){var r=At,o=Um,u=a&&!a.nodeType&&a,c=u&&!0&&i&&!i.nodeType&&i,d=c&&c.exports===u,g=d?r.Buffer:void 0,y=g?g.isBuffer:void 0,v=y||o;i.exports=v})(Mr,Mr.exports);var zm=9007199254740991,Hm=/^(?:0|[1-9]\d*)$/;function Gm(i,a){var r=typeof i;return a=a==null?zm:a,!!a&&(r=="number"||r!="symbol"&&Hm.test(i))&&i>-1&&i%1==0&&i<a}var jm=Gm,Km=9007199254740991;function Ym(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=Km}var qo=Ym,Xm=Xn,Zm=qo,Jm=Zn,Vm="[object Arguments]",Qm="[object Array]",qm="[object Boolean]",e0="[object Date]",t0="[object Error]",n0="[object Function]",r0="[object Map]",i0="[object Number]",a0="[object Object]",s0="[object RegExp]",o0="[object Set]",u0="[object String]",l0="[object WeakMap]",c0="[object ArrayBuffer]",f0="[object DataView]",h0="[object Float32Array]",d0="[object Float64Array]",p0="[object Int8Array]",g0="[object Int16Array]",v0="[object Int32Array]",_0="[object Uint8Array]",m0="[object Uint8ClampedArray]",y0="[object Uint16Array]",b0="[object Uint32Array]",Se={};Se[h0]=Se[d0]=Se[p0]=Se[g0]=Se[v0]=Se[_0]=Se[m0]=Se[y0]=Se[b0]=!0,Se[Vm]=Se[Qm]=Se[c0]=Se[qm]=Se[f0]=Se[e0]=Se[t0]=Se[n0]=Se[r0]=Se[i0]=Se[a0]=Se[s0]=Se[o0]=Se[u0]=Se[l0]=!1;function w0(i){return Jm(i)&&Zm(i.length)&&!!Se[Xm(i)]}var S0=w0;function x0(i){return function(a){return i(a)}}var T0=x0,na={exports:{}};(function(i,a){var r=To,o=a&&!a.nodeType&&a,u=o&&!0&&i&&!i.nodeType&&i,c=u&&u.exports===o,d=c&&r.process,g=function(){try{var y=u&&u.require&&u.require("util").types;return y||d&&d.binding&&d.binding("util")}catch{}}();i.exports=g})(na,na.exports);var A0=S0,C0=T0,eu=na.exports,tu=eu&&eu.isTypedArray,E0=tu?C0(tu):A0,nu=E0,O0=Rm,R0=Wm,L0=ta,P0=Mr.exports,M0=jm,D0=nu,I0=Object.prototype,N0=I0.hasOwnProperty;function $0(i,a){var r=L0(i),o=!r&&R0(i),u=!r&&!o&&P0(i),c=!r&&!o&&!u&&D0(i),d=r||o||u||c,g=d?O0(i.length,String):[],y=g.length;for(var v in i)(a||N0.call(i,v))&&!(d&&(v=="length"||u&&(v=="offset"||v=="parent")||c&&(v=="buffer"||v=="byteLength"||v=="byteOffset")||M0(v,y)))&&g.push(v);return g}var F0=$0,B0=Object.prototype;function W0(i){var a=i&&i.constructor,r=typeof a=="function"&&a.prototype||B0;return i===r}var k0=W0;function U0(i,a){return function(r){return i(a(r))}}var z0=U0,H0=z0,G0=H0(Object.keys,Object),j0=G0,K0=k0,Y0=j0,X0=Object.prototype,Z0=X0.hasOwnProperty;function J0(i){if(!K0(i))return Y0(i);var a=[];for(var r in Object(i))Z0.call(i,r)&&r!="constructor"&&a.push(r);return a}var V0=J0,Q0=ko,q0=qo;function e1(i){return i!=null&&q0(i.length)&&!Q0(i)}var t1=e1,n1=F0,r1=V0,i1=t1;function a1(i){return i1(i)?n1(i):r1(i)}var s1=a1,o1=_m,u1=Em,l1=s1;function c1(i){return o1(i,l1,u1)}var f1=c1,ru=f1,h1=1,d1=Object.prototype,p1=d1.hasOwnProperty;function g1(i,a,r,o,u,c){var d=r&h1,g=ru(i),y=g.length,v=ru(a),w=v.length;if(y!=w&&!d)return!1;for(var S=y;S--;){var C=g[S];if(!(d?C in a:p1.call(a,C)))return!1}var E=c.get(i),T=c.get(a);if(E&&T)return E==a&&T==i;var I=!0;c.set(i,a),c.set(a,i);for(var M=d;++S<y;){C=g[S];var N=i[C],q=a[C];if(o)var X=d?o(q,N,C,a,i,c):o(N,q,C,i,a,c);if(!(X===void 0?N===q||u(N,q,r,o,c):X)){I=!1;break}M||(M=C=="constructor")}if(I&&!M){var G=i.constructor,H=a.constructor;G!=H&&"constructor"in i&&"constructor"in a&&!(typeof G=="function"&&G instanceof G&&typeof H=="function"&&H instanceof H)&&(I=!1)}return c.delete(i),c.delete(a),I}var v1=g1,_1=bn,m1=At,y1=_1(m1,"DataView"),b1=y1,w1=bn,S1=At,x1=w1(S1,"Promise"),T1=x1,A1=bn,C1=At,E1=A1(C1,"Set"),O1=E1,R1=bn,L1=At,P1=R1(L1,"WeakMap"),M1=P1,ra=b1,ia=qi,aa=T1,sa=O1,oa=M1,iu=Xn,Tn=zo,au="[object Map]",D1="[object Object]",su="[object Promise]",ou="[object Set]",uu="[object WeakMap]",lu="[object DataView]",I1=Tn(ra),N1=Tn(ia),$1=Tn(aa),F1=Tn(sa),B1=Tn(oa),tn=iu;(ra&&tn(new ra(new ArrayBuffer(1)))!=lu||ia&&tn(new ia)!=au||aa&&tn(aa.resolve())!=su||sa&&tn(new sa)!=ou||oa&&tn(new oa)!=uu)&&(tn=function(i){var a=iu(i),r=a==D1?i.constructor:void 0,o=r?Tn(r):"";if(o)switch(o){case I1:return lu;case N1:return au;case $1:return su;case F1:return ou;case B1:return uu}return a});var W1=tn,ua=y_,k1=Ko,U1=cm,z1=v1,cu=W1,fu=ta,hu=Mr.exports,H1=nu,G1=1,du="[object Arguments]",pu="[object Array]",Dr="[object Object]",j1=Object.prototype,gu=j1.hasOwnProperty;function K1(i,a,r,o,u,c){var d=fu(i),g=fu(a),y=d?pu:cu(i),v=g?pu:cu(a);y=y==du?Dr:y,v=v==du?Dr:v;var w=y==Dr,S=v==Dr,C=y==v;if(C&&hu(i)){if(!hu(a))return!1;d=!0,w=!1}if(C&&!w)return c||(c=new ua),d||H1(i)?k1(i,a,r,o,u,c):U1(i,a,y,r,o,u,c);if(!(r&G1)){var E=w&&gu.call(i,"__wrapped__"),T=S&&gu.call(a,"__wrapped__");if(E||T){var I=E?i.value():i,M=T?a.value():a;return c||(c=new ua),u(I,M,r,o,c)}}return C?(c||(c=new ua),z1(i,a,r,o,u,c)):!1}var Y1=K1,X1=Y1,vu=Zn;function _u(i,a,r,o,u){return i===a?!0:i==null||a==null||!vu(i)&&!vu(a)?i!==i&&a!==a:X1(i,a,r,o,_u,u)}var Z1=_u,J1=Z1;function V1(i,a){return J1(i,a)}var Q1=V1;function la(i,a,r){r===void 0&&(r={});var o=Gn(a);$o(function(){var u=Cr(r.target,window);if(!!(u!=null&&u.addEventListener)){var c=function(g){return o.current(g)};return u.addEventListener(i,c,{capture:r.capture,once:r.once,passive:r.passive}),function(){u.removeEventListener(i,c,{capture:r.capture})}}},[i,r.capture,r.once,r.passive],r.target)}var q1=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},ca=function(i,a){var r=a||{},o=r.onEnter,u=r.onLeave,c=q1(zp(!1),2),d=c[0],g=c[1],y=g.setTrue,v=g.setFalse;return la("mouseenter",function(){o==null||o(),y()},{target:i}),la("mouseleave",function(){u==null||u(),v()},{target:i}),d},ey=function(a,r){return r===void 0&&(r=[]),Q1(a,r)},ty=function(a,r,o){var u=O.useRef(),c=O.useRef(0);ey(r,u.current)||(u.current=r,c.current+=1),$o(a,[c.current],o)},ny=ty,fa=globalThis&&globalThis.__values||function(i){var a=typeof Symbol=="function"&&Symbol.iterator,r=a&&i[a],o=0;if(r)return r.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&o>=i.length&&(i=void 0),{value:i&&i[o++],done:!i}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},ry={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},ha={ctrl:function(a){return a.ctrlKey},shift:function(a){return a.shiftKey},alt:function(a){return a.altKey},meta:function(a){return a.metaKey}};function iy(i){var a=Object.keys(ha).reduce(function(r,o){return ha[o](i)?r+1:r},0);return[16,17,18,91,92].includes(i.keyCode)?a:a+1}function mu(i,a,r){var o,u;if(!i.key)return!1;if(bo(a))return i.keyCode===a;var c=a.split("."),d=0;try{for(var g=fa(c),y=g.next();!y.done;y=g.next()){var v=y.value,w=ha[v],S=ry[v.toLowerCase()];(w&&w(i)||S&&S===i.keyCode)&&d++}}catch(C){o={error:C}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(o)throw o.error}}return r?d===c.length&&iy(i)===c.length:d===c.length}function ay(i,a){return Gi(i)?i:Uh(i)||bo(i)?function(r){return mu(r,i,a)}:Array.isArray(i)?function(r){return i.some(function(o){return mu(r,o,a)})}:i?function(){return!0}:function(){return!1}}var sy=["keydown"];function nn(i,a,r){var o=r||{},u=o.events,c=u===void 0?sy:u,d=o.target,g=o.exactMatch,y=g===void 0?!1:g,v=Gn(a),w=Gn(i);ny(function(){var S,C,E,T=Cr(d,window);if(!!T){var I=function(G){var H,j=ay(w.current,y);if(j(G))return(H=v.current)===null||H===void 0?void 0:H.call(v,G)};try{for(var M=fa(c),N=M.next();!N.done;N=M.next()){var q=N.value;(E=T==null?void 0:T.addEventListener)===null||E===void 0||E.call(T,q,I)}}catch(X){S={error:X}}finally{try{N&&!N.done&&(C=M.return)&&C.call(M)}finally{if(S)throw S.error}}return function(){var X,G,H;try{for(var j=fa(c),fe=j.next();!fe.done;fe=j.next()){var _e=fe.value;(H=T==null?void 0:T.removeEventListener)===null||H===void 0||H.call(T,_e,I)}}catch(pe){X={error:pe}}finally{try{fe&&!fe.done&&(G=j.return)&&G.call(j)}finally{if(X)throw X.error}}}}},[c],d)}var oy=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c};function uy(i){var a=O.useRef(0),r=oy(O.useState(i),2),o=r[0],u=r[1],c=O.useCallback(function(d){cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){u(d)})},[]);return jn(function(){cancelAnimationFrame(a.current)}),[o,c]}var ly=globalThis&&globalThis.__read||function(i,a){var r=typeof Symbol=="function"&&i[Symbol.iterator];if(!r)return i;var o=r.call(i),u,c=[],d;try{for(;(a===void 0||a-- >0)&&!(u=o.next()).done;)c.push(u.value)}catch(g){d={error:g}}finally{try{u&&!u.done&&(r=o.return)&&r.call(o)}finally{if(d)throw d.error}}return c},cy={screenX:NaN,screenY:NaN,clientX:NaN,clientY:NaN,pageX:NaN,pageY:NaN,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},fy=function(i){var a=ly(uy(cy),2),r=a[0],o=a[1];return la("mousemove",function(u){var c=u.screenX,d=u.screenY,g=u.clientX,y=u.clientY,v=u.pageX,w=u.pageY,S={screenX:c,screenY:d,clientX:g,clientY:y,pageX:v,pageY:w,elementX:NaN,elementY:NaN,elementH:NaN,elementW:NaN,elementPosX:NaN,elementPosY:NaN},C=Cr(i);if(C){var E=C.getBoundingClientRect(),T=E.left,I=E.top,M=E.width,N=E.height;S.elementPosX=T+window.pageXOffset,S.elementPosY=I+window.pageYOffset,S.elementX=v-S.elementPosX,S.elementY=w-S.elementPosY,S.elementW=M,S.elementH=N}o(S)},{target:function(){return document}}),r},yu={exports:{}};/*!
  Copyright (c) 2018 Jed Watson.
  Licensed under the MIT License (MIT), see
  http://jedwatson.github.io/classnames
*/(function(i){(function(){var a={}.hasOwnProperty;function r(){for(var o=[],u=0;u<arguments.length;u++){var c=arguments[u];if(!!c){var d=typeof c;if(d==="string"||d==="number")o.push(c);else if(Array.isArray(c)){if(c.length){var g=r.apply(null,c);g&&o.push(g)}}else if(d==="object")if(c.toString===Object.prototype.toString)for(var y in c)a.call(c,y)&&c[y]&&o.push(y);else o.push(c.toString())}}return o.join(" ")}i.exports?(r.default=r,i.exports=r):window.classNames=r})()})(yu);var Ve=yu.exports;const hy="https://api.bilibili.com",bu="https://app.bilibili.com",da=Pi.default.create({baseURL:hy});da.interceptors.request.use(function(i){var a;return(a=i.params)!=null&&a._||(i.params=kn(vn({},i.params),{_:Date.now()})),i},function(i){return Promise.reject(i)});const pa=Pi.default.create({adapter:ph.default});pa.interceptors.request.use(function(i){return i.params=vn({access_key:qt.accessKey||""},i.params),i},function(i){return Promise.reject(i)});async function dy(){return(await pa.get(bu+"/x/feed/index",{params:{build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data.data}async function py(){return ga(2)}async function ga(i){const a=new Array(i).fill(0).map(u=>dy());let o=(await Promise.all(a)).reduce((u,c)=>u.concat(c),[]);return o=gy(o),o.map(u=>kn(vn({},u),{uniqId:u.param+"-"+crypto.randomUUID()}))}function gy(i){const a=new Set;return i=i.filter(r=>{const{param:o}=r;return a.has(o)?(console.log("[bilibili-app-recommend]: [uniqRecList]: duplicate",r),!1):(a.add(o),!0)}),i}const wu="_toast-container_9119l_1";var nO={toastContainer:wu};function Lt(i,a=2e3){const r=zn.default(`<div class='${wu}'>${i}</div>`);r.appendTo(document.body),setTimeout(()=>r.remove(),a)}const vy="\u8BF7\u6C42\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!",_y="\u64CD\u4F5C\u5931\u8D25, \u8BF7\u91CD\u8BD5 !!!";function Su(){return Lt(vy)}function xu(){return Lt(_y)}async function my(){var y,v;const a=(await Pi.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(!((y=a==null?void 0:a.data)!=null&&y.has_login))return{errmsg:"\u4F60\u5FC5\u987B\u767B\u5F55B\u7AD9\u4E4B\u540E\u624D\u80FD\u4F7F\u7528\u6388\u6743",json:a};if(!((v=a==null?void 0:a.data)!=null&&v.confirm_uri))return{errmsg:"\u65E0\u6CD5\u83B7\u5F97\u6388\u6743\u7F51\u5740",json:a};const r=a.data.confirm_uri;let o;const u=new Promise(w=>{window.addEventListener("message",S=>{if(S.origin!="https://www.mcbbs.net"||!S.data)return;const C=S.data.match(/access_key=([0-9a-z]{32})/);if(!C||!C[1])return w({errmsg:"\u6CA1\u6709\u83B7\u5F97\u5339\u914D\u7684\u5BC6\u94A5"});w(C[1])}),o=setTimeout(()=>{w({errmsg:"\u83B7\u53D6\u6388\u6743\u8D85\u65F6"})},5e3)}),c=zn.default(`<iframe src='${r}' style="display: none;" />`);c.appendTo(document.body);function d(){c.remove(),o&&(clearTimeout(o),o=null)}const g=await u;return d(),g}async function yy(){const i=await my();if(typeof i=="object"&&"errmsg"in i){Lt(i.errmsg);return}const a=i;return wr({accessKey:a}),Lt("\u83B7\u53D6\u6210\u529F"),a}function by(){wr({accessKey:""}),Lt("\u5DF2\u5220\u9664 access_key")}const Tu="_expand-btn_wdzp9_1",Au="_expanded_wdzp9_12";var rO={expandBtn:Tu,expanded:Au},Ir={exports:{}},Nr={};/**
 * @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 wy=Li.default,Sy=Symbol.for("react.element"),xy=Symbol.for("react.fragment"),Ty=Object.prototype.hasOwnProperty,Ay=wy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Cy={key:!0,ref:!0,__self:!0,__source:!0};function Cu(i,a,r){var o,u={},c=null,d=null;r!==void 0&&(c=""+r),a.key!==void 0&&(c=""+a.key),a.ref!==void 0&&(d=a.ref);for(o in a)Ty.call(a,o)&&!Cy.hasOwnProperty(o)&&(u[o]=a[o]);if(i&&i.defaultProps)for(o in a=i.defaultProps,a)u[o]===void 0&&(u[o]=a[o]);return{$$typeof:Sy,type:i,key:c,ref:d,props:u,_owner:Ay.current}}Nr.Fragment=xy,Nr.jsx=Cu,Nr.jsxs=Cu,Ir.exports=Nr;const P=Ir.exports.jsx,ae=Ir.exports.jsxs,$r=Ir.exports.Fragment,Eu=O.forwardRef(function({children:a},r){const[o,u]=No(!1);O.useImperativeHandle(r,()=>u,[u]);const c=P("button",{className:Ve("primary-btn",Tu),onClick:u.toggle,children:P("svg",{className:Ve({[Au]:o}),children:P("use",{xlinkHref:"#widget-arrow"})})});return ae($r,{children:[c,o&&a]})});var Ou={exports:{}},Ey="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Oy=Ey,Ry=Oy;function Ru(){}function Lu(){}Lu.resetWarningCache=Ru;var Ly=function(){function i(o,u,c,d,g,y){if(y!==Ry){var v=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 v.name="Invariant Violation",v}}i.isRequired=i;function a(){return i}var r={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:a,element:i,elementType:i,instanceOf:a,node:i,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:Lu,resetWarningCache:Ru};return r.PropTypes=r,r};Ou.exports=Ly();var Qe=Ou.exports;class va extends O.Component{constructor(a){super(a),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 a=this.getParentElement(this.scrollComponent);a.scrollTop=a.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let a=!1;const r={get passive(){a=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch{}return a}eventListenerOptions(){let a=this.props.useCapture;return this.isPassiveSupported()?a={useCapture:this.props.useCapture,passive:!0}:a={passive:!1},a}setDefaultLoader(a){this.defaultLoader=a}detachMousewheelListener(){let a=window;this.props.useWindow===!1&&(a=this.scrollComponent.parentNode),a.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let a=window;this.props.useWindow===!1&&(a=this.getParentElement(this.scrollComponent)),a.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),a.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(a){const r=this.props.getScrollParent&&this.props.getScrollParent();return r!=null?r:a&&a.parentNode}filterProps(a){return a}attachScrollListener(){const a=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!a)return;let r=window;this.props.useWindow===!1&&(r=a),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(a){a.deltaY===1&&!this.isPassiveSupported()&&a.preventDefault()}scrollListener(){const a=this.scrollComponent,r=window,o=this.getParentElement(a);let u;if(this.props.useWindow){const c=document.documentElement||document.body.parentNode||document.body,d=r.pageYOffset!==void 0?r.pageYOffset:c.scrollTop;this.props.isReverse?u=d:u=this.calculateOffset(a,d)}else this.props.isReverse?u=o.scrollTop:u=a.scrollHeight-o.scrollTop-o.clientHeight;u<Number(this.props.threshold)&&a&&a.offsetParent!==null&&(this.detachScrollListener(),this.beforeScrollHeight=o.scrollHeight,this.beforeScrollTop=o.scrollTop,typeof this.props.loadMore=="function"&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}calculateOffset(a,r){return a?this.calculateTopPosition(a)+(a.offsetHeight-r-window.innerHeight):0}calculateTopPosition(a){return a?a.offsetTop+this.calculateTopPosition(a.offsetParent):0}render(){const N=this.filterProps(this.props),{children:r,element:o,hasMore:u,initialLoad:c,isReverse:d,loader:g,loadMore:y,pageStart:v,ref:w,threshold:S,useCapture:C,useWindow:E,getScrollParent:T}=N,I=fh(N,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]);I.ref=q=>{this.scrollComponent=q,w&&w(q)};const M=[r];return u&&(g?d?M.unshift(g):M.push(g):this.defaultLoader&&(d?M.unshift(this.defaultLoader):M.push(this.defaultLoader))),Li.default.createElement(o,I,M)}}to(va,"propTypes",{children:Qe.node.isRequired,element:Qe.node,hasMore:Qe.bool,initialLoad:Qe.bool,isReverse:Qe.bool,loader:Qe.node,loadMore:Qe.func.isRequired,pageStart:Qe.number,ref:Qe.func,getScrollParent:Qe.func,threshold:Qe.number,useCapture:Qe.bool,useWindow:Qe.bool}),to(va,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});let Qn=0;const Py=()=>{Qn++,document.body.style.overflow="hidden"},My=()=>{Qn--,Qn<0&&(Qn=0),Qn===0&&(document.body.style.overflow="overlay")},Pu=()=>document.body.classList.contains("dark"),Mu=br({value:Pu()}),Dy=function(){return Wi(Mu).value};new MutationObserver(function(){Mu.value=Pu()}).observe(document.body,{attributes:!0,attributeFilter:["class"]});function Du({show:i,onHide:a,children:r,clsModalMask:o,clsModal:u,hideWhenMaskOnClick:c=!1}){O.useLayoutEffect(()=>{i?Py():My()},[i]);const d=O.useRef(null),g=Dy(),{bg:y,c:v}=O.useMemo(()=>{const T=window.getComputedStyle(document.body)["background-color"],I=window.getComputedStyle(document.body).color;return{bg:T,c:I}},[g]),w=O.useMemo(()=>g?{"--bg":y,"--c":v,backgroundColor:y,color:v}:{},[y,v,g]),S=O.useId(),C=O.useMemo(()=>{const T=document.createElement("div");return T.setAttribute("data-id","base-modal-"+S),document.body.appendChild(T),T},[]),E=Le(T=>{var I;(I=d.current)!=null&&I.contains(T.target)||c&&a()});return i?De.createPortal(P("div",{className:Ve(o),onClick:E,children:P("div",{className:Ve(u),style:w,ref:d,children:r})}),C):null}var _a={exports:{}};/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */(function(i,a){(function(){var r,o="4.17.21",u=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",g="Invalid `variable` option passed into `_.template`",y="__lodash_hash_undefined__",v=500,w="__lodash_placeholder__",S=1,C=2,E=4,T=1,I=2,M=1,N=2,q=4,X=8,G=16,H=32,j=64,fe=128,_e=256,pe=512,se=30,Ue="...",sn=800,V=16,U=1,W=2,Q=3,F=1/0,K=9007199254740991,ee=17976931348623157e292,le=0/0,de=4294967295,be=de-1,Ce=de>>>1,st=[["ary",fe],["bind",M],["bindKey",N],["curry",X],["curryRight",G],["flip",pe],["partial",H],["partialRight",j],["rearg",_e]],Fe="[object Arguments]",ot="[object Array]",Pt="[object AsyncFunction]",Ie="[object Boolean]",Ee="[object Date]",qe="[object DOMException]",Ct="[object Error]",Mt="[object Function]",Pl="[object GeneratorFunction]",_t="[object Map]",qn="[object Number]",gb="[object Null]",Dt="[object Object]",Ml="[object Promise]",vb="[object Proxy]",er="[object RegExp]",mt="[object Set]",tr="[object String]",kr="[object Symbol]",_b="[object Undefined]",nr="[object WeakMap]",mb="[object WeakSet]",rr="[object ArrayBuffer]",An="[object DataView]",Da="[object Float32Array]",Ia="[object Float64Array]",Na="[object Int8Array]",$a="[object Int16Array]",Fa="[object Int32Array]",Ba="[object Uint8Array]",Wa="[object Uint8ClampedArray]",ka="[object Uint16Array]",Ua="[object Uint32Array]",yb=/\b__p \+= '';/g,bb=/\b(__p \+=) '' \+/g,wb=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Dl=/&(?:amp|lt|gt|quot|#39);/g,Il=/[&<>"']/g,Sb=RegExp(Dl.source),xb=RegExp(Il.source),Tb=/<%-([\s\S]+?)%>/g,Ab=/<%([\s\S]+?)%>/g,Nl=/<%=([\s\S]+?)%>/g,Cb=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eb=/^\w*$/,Ob=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,za=/[\\^$.*+?()[\]{}|]/g,Rb=RegExp(za.source),Ha=/^\s+/,Lb=/\s/,Pb=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Mb=/\{\n\/\* \[wrapped with (.+)\] \*/,Db=/,? & /,Ib=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Nb=/[()=,{}\[\]\/\s]/,$b=/\\(\\)?/g,Fb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,$l=/\w*$/,Bb=/^[-+]0x[0-9a-f]+$/i,Wb=/^0b[01]+$/i,kb=/^\[object .+?Constructor\]$/,Ub=/^0o[0-7]+$/i,zb=/^(?:0|[1-9]\d*)$/,Hb=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ur=/($^)/,Gb=/['\n\r\u2028\u2029\\]/g,zr="\\ud800-\\udfff",jb="\\u0300-\\u036f",Kb="\\ufe20-\\ufe2f",Yb="\\u20d0-\\u20ff",Fl=jb+Kb+Yb,Bl="\\u2700-\\u27bf",Wl="a-z\\xdf-\\xf6\\xf8-\\xff",Xb="\\xac\\xb1\\xd7\\xf7",Zb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Jb="\\u2000-\\u206f",Vb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kl="A-Z\\xc0-\\xd6\\xd8-\\xde",Ul="\\ufe0e\\ufe0f",zl=Xb+Zb+Jb+Vb,Ga="['\u2019]",Qb="["+zr+"]",Hl="["+zl+"]",Hr="["+Fl+"]",Gl="\\d+",qb="["+Bl+"]",jl="["+Wl+"]",Kl="[^"+zr+zl+Gl+Bl+Wl+kl+"]",ja="\\ud83c[\\udffb-\\udfff]",ew="(?:"+Hr+"|"+ja+")",Yl="[^"+zr+"]",Ka="(?:\\ud83c[\\udde6-\\uddff]){2}",Ya="[\\ud800-\\udbff][\\udc00-\\udfff]",Cn="["+kl+"]",Xl="\\u200d",Zl="(?:"+jl+"|"+Kl+")",tw="(?:"+Cn+"|"+Kl+")",Jl="(?:"+Ga+"(?:d|ll|m|re|s|t|ve))?",Vl="(?:"+Ga+"(?:D|LL|M|RE|S|T|VE))?",Ql=ew+"?",ql="["+Ul+"]?",nw="(?:"+Xl+"(?:"+[Yl,Ka,Ya].join("|")+")"+ql+Ql+")*",rw="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",iw="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ec=ql+Ql+nw,aw="(?:"+[qb,Ka,Ya].join("|")+")"+ec,sw="(?:"+[Yl+Hr+"?",Hr,Ka,Ya,Qb].join("|")+")",ow=RegExp(Ga,"g"),uw=RegExp(Hr,"g"),Xa=RegExp(ja+"(?="+ja+")|"+sw+ec,"g"),lw=RegExp([Cn+"?"+jl+"+"+Jl+"(?="+[Hl,Cn,"$"].join("|")+")",tw+"+"+Vl+"(?="+[Hl,Cn+Zl,"$"].join("|")+")",Cn+"?"+Zl+"+"+Jl,Cn+"+"+Vl,iw,rw,Gl,aw].join("|"),"g"),cw=RegExp("["+Xl+zr+Fl+Ul+"]"),fw=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hw=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],dw=-1,xe={};xe[Da]=xe[Ia]=xe[Na]=xe[$a]=xe[Fa]=xe[Ba]=xe[Wa]=xe[ka]=xe[Ua]=!0,xe[Fe]=xe[ot]=xe[rr]=xe[Ie]=xe[An]=xe[Ee]=xe[Ct]=xe[Mt]=xe[_t]=xe[qn]=xe[Dt]=xe[er]=xe[mt]=xe[tr]=xe[nr]=!1;var we={};we[Fe]=we[ot]=we[rr]=we[An]=we[Ie]=we[Ee]=we[Da]=we[Ia]=we[Na]=we[$a]=we[Fa]=we[_t]=we[qn]=we[Dt]=we[er]=we[mt]=we[tr]=we[kr]=we[Ba]=we[Wa]=we[ka]=we[Ua]=!0,we[Ct]=we[Mt]=we[nr]=!1;var pw={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},gw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},vw={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},_w={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},mw=parseFloat,yw=parseInt,tc=typeof xt=="object"&&xt&&xt.Object===Object&&xt,bw=typeof self=="object"&&self&&self.Object===Object&&self,We=tc||bw||Function("return this")(),Za=a&&!a.nodeType&&a,on=Za&&!0&&i&&!i.nodeType&&i,nc=on&&on.exports===Za,Ja=nc&&tc.process,ut=function(){try{var m=on&&on.require&&on.require("util").types;return m||Ja&&Ja.binding&&Ja.binding("util")}catch{}}(),rc=ut&&ut.isArrayBuffer,ic=ut&&ut.isDate,ac=ut&&ut.isMap,sc=ut&&ut.isRegExp,oc=ut&&ut.isSet,uc=ut&&ut.isTypedArray;function et(m,A,x){switch(x.length){case 0:return m.call(A);case 1:return m.call(A,x[0]);case 2:return m.call(A,x[0],x[1]);case 3:return m.call(A,x[0],x[1],x[2])}return m.apply(A,x)}function ww(m,A,x,k){for(var te=-1,ge=m==null?0:m.length;++te<ge;){var Ne=m[te];A(k,Ne,x(Ne),m)}return k}function lt(m,A){for(var x=-1,k=m==null?0:m.length;++x<k&&A(m[x],x,m)!==!1;);return m}function Sw(m,A){for(var x=m==null?0:m.length;x--&&A(m[x],x,m)!==!1;);return m}function lc(m,A){for(var x=-1,k=m==null?0:m.length;++x<k;)if(!A(m[x],x,m))return!1;return!0}function Gt(m,A){for(var x=-1,k=m==null?0:m.length,te=0,ge=[];++x<k;){var Ne=m[x];A(Ne,x,m)&&(ge[te++]=Ne)}return ge}function Gr(m,A){var x=m==null?0:m.length;return!!x&&En(m,A,0)>-1}function Va(m,A,x){for(var k=-1,te=m==null?0:m.length;++k<te;)if(x(A,m[k]))return!0;return!1}function Te(m,A){for(var x=-1,k=m==null?0:m.length,te=Array(k);++x<k;)te[x]=A(m[x],x,m);return te}function jt(m,A){for(var x=-1,k=A.length,te=m.length;++x<k;)m[te+x]=A[x];return m}function Qa(m,A,x,k){var te=-1,ge=m==null?0:m.length;for(k&&ge&&(x=m[++te]);++te<ge;)x=A(x,m[te],te,m);return x}function xw(m,A,x,k){var te=m==null?0:m.length;for(k&&te&&(x=m[--te]);te--;)x=A(x,m[te],te,m);return x}function qa(m,A){for(var x=-1,k=m==null?0:m.length;++x<k;)if(A(m[x],x,m))return!0;return!1}var Tw=es("length");function Aw(m){return m.split("")}function Cw(m){return m.match(Ib)||[]}function cc(m,A,x){var k;return x(m,function(te,ge,Ne){if(A(te,ge,Ne))return k=ge,!1}),k}function jr(m,A,x,k){for(var te=m.length,ge=x+(k?1:-1);k?ge--:++ge<te;)if(A(m[ge],ge,m))return ge;return-1}function En(m,A,x){return A===A?Bw(m,A,x):jr(m,fc,x)}function Ew(m,A,x,k){for(var te=x-1,ge=m.length;++te<ge;)if(k(m[te],A))return te;return-1}function fc(m){return m!==m}function hc(m,A){var x=m==null?0:m.length;return x?ns(m,A)/x:le}function es(m){return function(A){return A==null?r:A[m]}}function ts(m){return function(A){return m==null?r:m[A]}}function dc(m,A,x,k,te){return te(m,function(ge,Ne,ye){x=k?(k=!1,ge):A(x,ge,Ne,ye)}),x}function Ow(m,A){var x=m.length;for(m.sort(A);x--;)m[x]=m[x].value;return m}function ns(m,A){for(var x,k=-1,te=m.length;++k<te;){var ge=A(m[k]);ge!==r&&(x=x===r?ge:x+ge)}return x}function rs(m,A){for(var x=-1,k=Array(m);++x<m;)k[x]=A(x);return k}function Rw(m,A){return Te(A,function(x){return[x,m[x]]})}function pc(m){return m&&m.slice(0,mc(m)+1).replace(Ha,"")}function tt(m){return function(A){return m(A)}}function is(m,A){return Te(A,function(x){return m[x]})}function ir(m,A){return m.has(A)}function gc(m,A){for(var x=-1,k=m.length;++x<k&&En(A,m[x],0)>-1;);return x}function vc(m,A){for(var x=m.length;x--&&En(A,m[x],0)>-1;);return x}function Lw(m,A){for(var x=m.length,k=0;x--;)m[x]===A&&++k;return k}var Pw=ts(pw),Mw=ts(gw);function Dw(m){return"\\"+_w[m]}function Iw(m,A){return m==null?r:m[A]}function On(m){return cw.test(m)}function Nw(m){return fw.test(m)}function $w(m){for(var A,x=[];!(A=m.next()).done;)x.push(A.value);return x}function as(m){var A=-1,x=Array(m.size);return m.forEach(function(k,te){x[++A]=[te,k]}),x}function _c(m,A){return function(x){return m(A(x))}}function Kt(m,A){for(var x=-1,k=m.length,te=0,ge=[];++x<k;){var Ne=m[x];(Ne===A||Ne===w)&&(m[x]=w,ge[te++]=x)}return ge}function Kr(m){var A=-1,x=Array(m.size);return m.forEach(function(k){x[++A]=k}),x}function Fw(m){var A=-1,x=Array(m.size);return m.forEach(function(k){x[++A]=[k,k]}),x}function Bw(m,A,x){for(var k=x-1,te=m.length;++k<te;)if(m[k]===A)return k;return-1}function Ww(m,A,x){for(var k=x+1;k--;)if(m[k]===A)return k;return k}function Rn(m){return On(m)?Uw(m):Tw(m)}function yt(m){return On(m)?zw(m):Aw(m)}function mc(m){for(var A=m.length;A--&&Lb.test(m.charAt(A)););return A}var kw=ts(vw);function Uw(m){for(var A=Xa.lastIndex=0;Xa.test(m);)++A;return A}function zw(m){return m.match(Xa)||[]}function Hw(m){return m.match(lw)||[]}var Gw=function m(A){A=A==null?We:Ln.defaults(We.Object(),A,Ln.pick(We,hw));var x=A.Array,k=A.Date,te=A.Error,ge=A.Function,Ne=A.Math,ye=A.Object,ss=A.RegExp,jw=A.String,ct=A.TypeError,Yr=x.prototype,Kw=ge.prototype,Pn=ye.prototype,Xr=A["__core-js_shared__"],Zr=Kw.toString,me=Pn.hasOwnProperty,Yw=0,yc=function(){var e=/[^.]+$/.exec(Xr&&Xr.keys&&Xr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Jr=Pn.toString,Xw=Zr.call(ye),Zw=We._,Jw=ss("^"+Zr.call(me).replace(za,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vr=nc?A.Buffer:r,Yt=A.Symbol,Qr=A.Uint8Array,bc=Vr?Vr.allocUnsafe:r,qr=_c(ye.getPrototypeOf,ye),wc=ye.create,Sc=Pn.propertyIsEnumerable,ei=Yr.splice,xc=Yt?Yt.isConcatSpreadable:r,ar=Yt?Yt.iterator:r,un=Yt?Yt.toStringTag:r,ti=function(){try{var e=dn(ye,"defineProperty");return e({},"",{}),e}catch{}}(),Vw=A.clearTimeout!==We.clearTimeout&&A.clearTimeout,Qw=k&&k.now!==We.Date.now&&k.now,qw=A.setTimeout!==We.setTimeout&&A.setTimeout,ni=Ne.ceil,ri=Ne.floor,os=ye.getOwnPropertySymbols,eS=Vr?Vr.isBuffer:r,Tc=A.isFinite,tS=Yr.join,nS=_c(ye.keys,ye),$e=Ne.max,ze=Ne.min,rS=k.now,iS=A.parseInt,Ac=Ne.random,aS=Yr.reverse,us=dn(A,"DataView"),sr=dn(A,"Map"),ls=dn(A,"Promise"),Mn=dn(A,"Set"),or=dn(A,"WeakMap"),ur=dn(ye,"create"),ii=or&&new or,Dn={},sS=pn(us),oS=pn(sr),uS=pn(ls),lS=pn(Mn),cS=pn(or),ai=Yt?Yt.prototype:r,lr=ai?ai.valueOf:r,Cc=ai?ai.toString:r;function f(e){if(Oe(e)&&!ne(e)&&!(e instanceof ce)){if(e instanceof ft)return e;if(me.call(e,"__wrapped__"))return Of(e)}return new ft(e)}var In=function(){function e(){}return function(t){if(!Ae(t))return{};if(wc)return wc(t);e.prototype=t;var n=new e;return e.prototype=r,n}}();function si(){}function ft(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=r}f.templateSettings={escape:Tb,evaluate:Ab,interpolate:Nl,variable:"",imports:{_:f}},f.prototype=si.prototype,f.prototype.constructor=f,ft.prototype=In(si.prototype),ft.prototype.constructor=ft;function ce(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=de,this.__views__=[]}function fS(){var e=new ce(this.__wrapped__);return e.__actions__=Ye(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ye(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ye(this.__views__),e}function hS(){if(this.__filtered__){var e=new ce(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function dS(){var e=this.__wrapped__.value(),t=this.__dir__,n=ne(e),s=t<0,l=n?e.length:0,h=Ax(0,l,this.__views__),p=h.start,_=h.end,b=_-p,R=s?_:p-1,L=this.__iteratees__,D=L.length,B=0,z=ze(b,this.__takeCount__);if(!n||!s&&l==b&&z==b)return Jc(e,this.__actions__);var Z=[];e:for(;b--&&B<z;){R+=t;for(var ie=-1,J=e[R];++ie<D;){var ue=L[ie],he=ue.iteratee,it=ue.type,Ke=he(J);if(it==W)J=Ke;else if(!Ke){if(it==U)continue e;break e}}Z[B++]=J}return Z}ce.prototype=In(si.prototype),ce.prototype.constructor=ce;function ln(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function pS(){this.__data__=ur?ur(null):{},this.size=0}function gS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function vS(e){var t=this.__data__;if(ur){var n=t[e];return n===y?r:n}return me.call(t,e)?t[e]:r}function _S(e){var t=this.__data__;return ur?t[e]!==r:me.call(t,e)}function mS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ur&&t===r?y:t,this}ln.prototype.clear=pS,ln.prototype.delete=gS,ln.prototype.get=vS,ln.prototype.has=_S,ln.prototype.set=mS;function It(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function yS(){this.__data__=[],this.size=0}function bS(e){var t=this.__data__,n=oi(t,e);if(n<0)return!1;var s=t.length-1;return n==s?t.pop():ei.call(t,n,1),--this.size,!0}function wS(e){var t=this.__data__,n=oi(t,e);return n<0?r:t[n][1]}function SS(e){return oi(this.__data__,e)>-1}function xS(e,t){var n=this.__data__,s=oi(n,e);return s<0?(++this.size,n.push([e,t])):n[s][1]=t,this}It.prototype.clear=yS,It.prototype.delete=bS,It.prototype.get=wS,It.prototype.has=SS,It.prototype.set=xS;function Nt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var s=e[t];this.set(s[0],s[1])}}function TS(){this.size=0,this.__data__={hash:new ln,map:new(sr||It),string:new ln}}function AS(e){var t=yi(this,e).delete(e);return this.size-=t?1:0,t}function CS(e){return yi(this,e).get(e)}function ES(e){return yi(this,e).has(e)}function OS(e,t){var n=yi(this,e),s=n.size;return n.set(e,t),this.size+=n.size==s?0:1,this}Nt.prototype.clear=TS,Nt.prototype.delete=AS,Nt.prototype.get=CS,Nt.prototype.has=ES,Nt.prototype.set=OS;function cn(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Nt;++t<n;)this.add(e[t])}function RS(e){return this.__data__.set(e,y),this}function LS(e){return this.__data__.has(e)}cn.prototype.add=cn.prototype.push=RS,cn.prototype.has=LS;function bt(e){var t=this.__data__=new It(e);this.size=t.size}function PS(){this.__data__=new It,this.size=0}function MS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function DS(e){return this.__data__.get(e)}function IS(e){return this.__data__.has(e)}function NS(e,t){var n=this.__data__;if(n instanceof It){var s=n.__data__;if(!sr||s.length<u-1)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nt(s)}return n.set(e,t),this.size=n.size,this}bt.prototype.clear=PS,bt.prototype.delete=MS,bt.prototype.get=DS,bt.prototype.has=IS,bt.prototype.set=NS;function Ec(e,t){var n=ne(e),s=!n&&gn(e),l=!n&&!s&&Qt(e),h=!n&&!s&&!l&&Bn(e),p=n||s||l||h,_=p?rs(e.length,jw):[],b=_.length;for(var R in e)(t||me.call(e,R))&&!(p&&(R=="length"||l&&(R=="offset"||R=="parent")||h&&(R=="buffer"||R=="byteLength"||R=="byteOffset")||Wt(R,b)))&&_.push(R);return _}function Oc(e){var t=e.length;return t?e[bs(0,t-1)]:r}function $S(e,t){return bi(Ye(e),fn(t,0,e.length))}function FS(e){return bi(Ye(e))}function cs(e,t,n){(n!==r&&!wt(e[t],n)||n===r&&!(t in e))&&$t(e,t,n)}function cr(e,t,n){var s=e[t];(!(me.call(e,t)&&wt(s,n))||n===r&&!(t in e))&&$t(e,t,n)}function oi(e,t){for(var n=e.length;n--;)if(wt(e[n][0],t))return n;return-1}function BS(e,t,n,s){return Xt(e,function(l,h,p){t(s,l,n(l),p)}),s}function Rc(e,t){return e&&Ot(t,Be(t),e)}function WS(e,t){return e&&Ot(t,Ze(t),e)}function $t(e,t,n){t=="__proto__"&&ti?ti(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function fs(e,t){for(var n=-1,s=t.length,l=x(s),h=e==null;++n<s;)l[n]=h?r:js(e,t[n]);return l}function fn(e,t,n){return e===e&&(n!==r&&(e=e<=n?e:n),t!==r&&(e=e>=t?e:t)),e}function ht(e,t,n,s,l,h){var p,_=t&S,b=t&C,R=t&E;if(n&&(p=l?n(e,s,l,h):n(e)),p!==r)return p;if(!Ae(e))return e;var L=ne(e);if(L){if(p=Ex(e),!_)return Ye(e,p)}else{var D=He(e),B=D==Mt||D==Pl;if(Qt(e))return qc(e,_);if(D==Dt||D==Fe||B&&!l){if(p=b||B?{}:yf(e),!_)return b?vx(e,WS(p,e)):gx(e,Rc(p,e))}else{if(!we[D])return l?e:{};p=Ox(e,D,_)}}h||(h=new bt);var z=h.get(e);if(z)return z;h.set(e,p),Xf(e)?e.forEach(function(J){p.add(ht(J,t,n,J,e,h))}):Kf(e)&&e.forEach(function(J,ue){p.set(ue,ht(J,t,n,ue,e,h))});var Z=R?b?Ps:Ls:b?Ze:Be,ie=L?r:Z(e);return lt(ie||e,function(J,ue){ie&&(ue=J,J=e[ue]),cr(p,ue,ht(J,t,n,ue,e,h))}),p}function kS(e){var t=Be(e);return function(n){return Lc(n,e,t)}}function Lc(e,t,n){var s=n.length;if(e==null)return!s;for(e=ye(e);s--;){var l=n[s],h=t[l],p=e[l];if(p===r&&!(l in e)||!h(p))return!1}return!0}function Pc(e,t,n){if(typeof e!="function")throw new ct(d);return _r(function(){e.apply(r,n)},t)}function fr(e,t,n,s){var l=-1,h=Gr,p=!0,_=e.length,b=[],R=t.length;if(!_)return b;n&&(t=Te(t,tt(n))),s?(h=Va,p=!1):t.length>=u&&(h=ir,p=!1,t=new cn(t));e:for(;++l<_;){var L=e[l],D=n==null?L:n(L);if(L=s||L!==0?L:0,p&&D===D){for(var B=R;B--;)if(t[B]===D)continue e;b.push(L)}else h(t,D,s)||b.push(L)}return b}var Xt=af(Et),Mc=af(ds,!0);function US(e,t){var n=!0;return Xt(e,function(s,l,h){return n=!!t(s,l,h),n}),n}function ui(e,t,n){for(var s=-1,l=e.length;++s<l;){var h=e[s],p=t(h);if(p!=null&&(_===r?p===p&&!rt(p):n(p,_)))var _=p,b=h}return b}function zS(e,t,n,s){var l=e.length;for(n=re(n),n<0&&(n=-n>l?0:l+n),s=s===r||s>l?l:re(s),s<0&&(s+=l),s=n>s?0:Jf(s);n<s;)e[n++]=t;return e}function Dc(e,t){var n=[];return Xt(e,function(s,l,h){t(s,l,h)&&n.push(s)}),n}function ke(e,t,n,s,l){var h=-1,p=e.length;for(n||(n=Lx),l||(l=[]);++h<p;){var _=e[h];t>0&&n(_)?t>1?ke(_,t-1,n,s,l):jt(l,_):s||(l[l.length]=_)}return l}var hs=sf(),Ic=sf(!0);function Et(e,t){return e&&hs(e,t,Be)}function ds(e,t){return e&&Ic(e,t,Be)}function li(e,t){return Gt(t,function(n){return kt(e[n])})}function hn(e,t){t=Jt(t,e);for(var n=0,s=t.length;e!=null&&n<s;)e=e[Rt(t[n++])];return n&&n==s?e:r}function Nc(e,t,n){var s=t(e);return ne(e)?s:jt(s,n(e))}function Ge(e){return e==null?e===r?_b:gb:un&&un in ye(e)?Tx(e):Fx(e)}function ps(e,t){return e>t}function HS(e,t){return e!=null&&me.call(e,t)}function GS(e,t){return e!=null&&t in ye(e)}function jS(e,t,n){return e>=ze(t,n)&&e<$e(t,n)}function gs(e,t,n){for(var s=n?Va:Gr,l=e[0].length,h=e.length,p=h,_=x(h),b=1/0,R=[];p--;){var L=e[p];p&&t&&(L=Te(L,tt(t))),b=ze(L.length,b),_[p]=!n&&(t||l>=120&&L.length>=120)?new cn(p&&L):r}L=e[0];var D=-1,B=_[0];e:for(;++D<l&&R.length<b;){var z=L[D],Z=t?t(z):z;if(z=n||z!==0?z:0,!(B?ir(B,Z):s(R,Z,n))){for(p=h;--p;){var ie=_[p];if(!(ie?ir(ie,Z):s(e[p],Z,n)))continue e}B&&B.push(Z),R.push(z)}}return R}function KS(e,t,n,s){return Et(e,function(l,h,p){t(s,n(l),h,p)}),s}function hr(e,t,n){t=Jt(t,e),e=xf(e,t);var s=e==null?e:e[Rt(pt(t))];return s==null?r:et(s,e,n)}function $c(e){return Oe(e)&&Ge(e)==Fe}function YS(e){return Oe(e)&&Ge(e)==rr}function XS(e){return Oe(e)&&Ge(e)==Ee}function dr(e,t,n,s,l){return e===t?!0:e==null||t==null||!Oe(e)&&!Oe(t)?e!==e&&t!==t:ZS(e,t,n,s,dr,l)}function ZS(e,t,n,s,l,h){var p=ne(e),_=ne(t),b=p?ot:He(e),R=_?ot:He(t);b=b==Fe?Dt:b,R=R==Fe?Dt:R;var L=b==Dt,D=R==Dt,B=b==R;if(B&&Qt(e)){if(!Qt(t))return!1;p=!0,L=!1}if(B&&!L)return h||(h=new bt),p||Bn(e)?vf(e,t,n,s,l,h):Sx(e,t,b,n,s,l,h);if(!(n&T)){var z=L&&me.call(e,"__wrapped__"),Z=D&&me.call(t,"__wrapped__");if(z||Z){var ie=z?e.value():e,J=Z?t.value():t;return h||(h=new bt),l(ie,J,n,s,h)}}return B?(h||(h=new bt),xx(e,t,n,s,l,h)):!1}function JS(e){return Oe(e)&&He(e)==_t}function vs(e,t,n,s){var l=n.length,h=l,p=!s;if(e==null)return!h;for(e=ye(e);l--;){var _=n[l];if(p&&_[2]?_[1]!==e[_[0]]:!(_[0]in e))return!1}for(;++l<h;){_=n[l];var b=_[0],R=e[b],L=_[1];if(p&&_[2]){if(R===r&&!(b in e))return!1}else{var D=new bt;if(s)var B=s(R,L,b,e,t,D);if(!(B===r?dr(L,R,T|I,s,D):B))return!1}}return!0}function Fc(e){if(!Ae(e)||Mx(e))return!1;var t=kt(e)?Jw:kb;return t.test(pn(e))}function VS(e){return Oe(e)&&Ge(e)==er}function QS(e){return Oe(e)&&He(e)==mt}function qS(e){return Oe(e)&&Ci(e.length)&&!!xe[Ge(e)]}function Bc(e){return typeof e=="function"?e:e==null?Je:typeof e=="object"?ne(e)?Uc(e[0],e[1]):kc(e):oh(e)}function _s(e){if(!vr(e))return nS(e);var t=[];for(var n in ye(e))me.call(e,n)&&n!="constructor"&&t.push(n);return t}function ex(e){if(!Ae(e))return $x(e);var t=vr(e),n=[];for(var s in e)s=="constructor"&&(t||!me.call(e,s))||n.push(s);return n}function ms(e,t){return e<t}function Wc(e,t){var n=-1,s=Xe(e)?x(e.length):[];return Xt(e,function(l,h,p){s[++n]=t(l,h,p)}),s}function kc(e){var t=Ds(e);return t.length==1&&t[0][2]?wf(t[0][0],t[0][1]):function(n){return n===e||vs(n,e,t)}}function Uc(e,t){return Ns(e)&&bf(t)?wf(Rt(e),t):function(n){var s=js(n,e);return s===r&&s===t?Ks(n,e):dr(t,s,T|I)}}function ci(e,t,n,s,l){e!==t&&hs(t,function(h,p){if(l||(l=new bt),Ae(h))tx(e,t,p,n,ci,s,l);else{var _=s?s(Fs(e,p),h,p+"",e,t,l):r;_===r&&(_=h),cs(e,p,_)}},Ze)}function tx(e,t,n,s,l,h,p){var _=Fs(e,n),b=Fs(t,n),R=p.get(b);if(R){cs(e,n,R);return}var L=h?h(_,b,n+"",e,t,p):r,D=L===r;if(D){var B=ne(b),z=!B&&Qt(b),Z=!B&&!z&&Bn(b);L=b,B||z||Z?ne(_)?L=_:Pe(_)?L=Ye(_):z?(D=!1,L=qc(b,!0)):Z?(D=!1,L=ef(b,!0)):L=[]:mr(b)||gn(b)?(L=_,gn(_)?L=Vf(_):(!Ae(_)||kt(_))&&(L=yf(b))):D=!1}D&&(p.set(b,L),l(L,b,s,h,p),p.delete(b)),cs(e,n,L)}function zc(e,t){var n=e.length;if(!!n)return t+=t<0?n:0,Wt(t,n)?e[t]:r}function Hc(e,t,n){t.length?t=Te(t,function(h){return ne(h)?function(p){return hn(p,h.length===1?h[0]:h)}:h}):t=[Je];var s=-1;t=Te(t,tt(Y()));var l=Wc(e,function(h,p,_){var b=Te(t,function(R){return R(h)});return{criteria:b,index:++s,value:h}});return Ow(l,function(h,p){return px(h,p,n)})}function nx(e,t){return Gc(e,t,function(n,s){return Ks(e,s)})}function Gc(e,t,n){for(var s=-1,l=t.length,h={};++s<l;){var p=t[s],_=hn(e,p);n(_,p)&&pr(h,Jt(p,e),_)}return h}function rx(e){return function(t){return hn(t,e)}}function ys(e,t,n,s){var l=s?Ew:En,h=-1,p=t.length,_=e;for(e===t&&(t=Ye(t)),n&&(_=Te(e,tt(n)));++h<p;)for(var b=0,R=t[h],L=n?n(R):R;(b=l(_,L,b,s))>-1;)_!==e&&ei.call(_,b,1),ei.call(e,b,1);return e}function jc(e,t){for(var n=e?t.length:0,s=n-1;n--;){var l=t[n];if(n==s||l!==h){var h=l;Wt(l)?ei.call(e,l,1):xs(e,l)}}return e}function bs(e,t){return e+ri(Ac()*(t-e+1))}function ix(e,t,n,s){for(var l=-1,h=$e(ni((t-e)/(n||1)),0),p=x(h);h--;)p[s?h:++l]=e,e+=n;return p}function ws(e,t){var n="";if(!e||t<1||t>K)return n;do t%2&&(n+=e),t=ri(t/2),t&&(e+=e);while(t);return n}function oe(e,t){return Bs(Sf(e,t,Je),e+"")}function ax(e){return Oc(Wn(e))}function sx(e,t){var n=Wn(e);return bi(n,fn(t,0,n.length))}function pr(e,t,n,s){if(!Ae(e))return e;t=Jt(t,e);for(var l=-1,h=t.length,p=h-1,_=e;_!=null&&++l<h;){var b=Rt(t[l]),R=n;if(b==="__proto__"||b==="constructor"||b==="prototype")return e;if(l!=p){var L=_[b];R=s?s(L,b,_):r,R===r&&(R=Ae(L)?L:Wt(t[l+1])?[]:{})}cr(_,b,R),_=_[b]}return e}var Kc=ii?function(e,t){return ii.set(e,t),e}:Je,ox=ti?function(e,t){return ti(e,"toString",{configurable:!0,enumerable:!1,value:Xs(t),writable:!0})}:Je;function ux(e){return bi(Wn(e))}function dt(e,t,n){var s=-1,l=e.length;t<0&&(t=-t>l?0:l+t),n=n>l?l:n,n<0&&(n+=l),l=t>n?0:n-t>>>0,t>>>=0;for(var h=x(l);++s<l;)h[s]=e[s+t];return h}function lx(e,t){var n;return Xt(e,function(s,l,h){return n=t(s,l,h),!n}),!!n}function fi(e,t,n){var s=0,l=e==null?s:e.length;if(typeof t=="number"&&t===t&&l<=Ce){for(;s<l;){var h=s+l>>>1,p=e[h];p!==null&&!rt(p)&&(n?p<=t:p<t)?s=h+1:l=h}return l}return Ss(e,t,Je,n)}function Ss(e,t,n,s){var l=0,h=e==null?0:e.length;if(h===0)return 0;t=n(t);for(var p=t!==t,_=t===null,b=rt(t),R=t===r;l<h;){var L=ri((l+h)/2),D=n(e[L]),B=D!==r,z=D===null,Z=D===D,ie=rt(D);if(p)var J=s||Z;else R?J=Z&&(s||B):_?J=Z&&B&&(s||!z):b?J=Z&&B&&!z&&(s||!ie):z||ie?J=!1:J=s?D<=t:D<t;J?l=L+1:h=L}return ze(h,be)}function Yc(e,t){for(var n=-1,s=e.length,l=0,h=[];++n<s;){var p=e[n],_=t?t(p):p;if(!n||!wt(_,b)){var b=_;h[l++]=p===0?0:p}}return h}function Xc(e){return typeof e=="number"?e:rt(e)?le:+e}function nt(e){if(typeof e=="string")return e;if(ne(e))return Te(e,nt)+"";if(rt(e))return Cc?Cc.call(e):"";var t=e+"";return t=="0"&&1/e==-F?"-0":t}function Zt(e,t,n){var s=-1,l=Gr,h=e.length,p=!0,_=[],b=_;if(n)p=!1,l=Va;else if(h>=u){var R=t?null:bx(e);if(R)return Kr(R);p=!1,l=ir,b=new cn}else b=t?[]:_;e:for(;++s<h;){var L=e[s],D=t?t(L):L;if(L=n||L!==0?L:0,p&&D===D){for(var B=b.length;B--;)if(b[B]===D)continue e;t&&b.push(D),_.push(L)}else l(b,D,n)||(b!==_&&b.push(D),_.push(L))}return _}function xs(e,t){return t=Jt(t,e),e=xf(e,t),e==null||delete e[Rt(pt(t))]}function Zc(e,t,n,s){return pr(e,t,n(hn(e,t)),s)}function hi(e,t,n,s){for(var l=e.length,h=s?l:-1;(s?h--:++h<l)&&t(e[h],h,e););return n?dt(e,s?0:h,s?h+1:l):dt(e,s?h+1:0,s?l:h)}function Jc(e,t){var n=e;return n instanceof ce&&(n=n.value()),Qa(t,function(s,l){return l.func.apply(l.thisArg,jt([s],l.args))},n)}function Ts(e,t,n){var s=e.length;if(s<2)return s?Zt(e[0]):[];for(var l=-1,h=x(s);++l<s;)for(var p=e[l],_=-1;++_<s;)_!=l&&(h[l]=fr(h[l]||p,e[_],t,n));return Zt(ke(h,1),t,n)}function Vc(e,t,n){for(var s=-1,l=e.length,h=t.length,p={};++s<l;){var _=s<h?t[s]:r;n(p,e[s],_)}return p}function As(e){return Pe(e)?e:[]}function Cs(e){return typeof e=="function"?e:Je}function Jt(e,t){return ne(e)?e:Ns(e,t)?[e]:Ef(ve(e))}var cx=oe;function Vt(e,t,n){var s=e.length;return n=n===r?s:n,!t&&n>=s?e:dt(e,t,n)}var Qc=Vw||function(e){return We.clearTimeout(e)};function qc(e,t){if(t)return e.slice();var n=e.length,s=bc?bc(n):new e.constructor(n);return e.copy(s),s}function Es(e){var t=new e.constructor(e.byteLength);return new Qr(t).set(new Qr(e)),t}function fx(e,t){var n=t?Es(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function hx(e){var t=new e.constructor(e.source,$l.exec(e));return t.lastIndex=e.lastIndex,t}function dx(e){return lr?ye(lr.call(e)):{}}function ef(e,t){var n=t?Es(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function tf(e,t){if(e!==t){var n=e!==r,s=e===null,l=e===e,h=rt(e),p=t!==r,_=t===null,b=t===t,R=rt(t);if(!_&&!R&&!h&&e>t||h&&p&&b&&!_&&!R||s&&p&&b||!n&&b||!l)return 1;if(!s&&!h&&!R&&e<t||R&&n&&l&&!s&&!h||_&&n&&l||!p&&l||!b)return-1}return 0}function px(e,t,n){for(var s=-1,l=e.criteria,h=t.criteria,p=l.length,_=n.length;++s<p;){var b=tf(l[s],h[s]);if(b){if(s>=_)return b;var R=n[s];return b*(R=="desc"?-1:1)}}return e.index-t.index}function nf(e,t,n,s){for(var l=-1,h=e.length,p=n.length,_=-1,b=t.length,R=$e(h-p,0),L=x(b+R),D=!s;++_<b;)L[_]=t[_];for(;++l<p;)(D||l<h)&&(L[n[l]]=e[l]);for(;R--;)L[_++]=e[l++];return L}function rf(e,t,n,s){for(var l=-1,h=e.length,p=-1,_=n.length,b=-1,R=t.length,L=$e(h-_,0),D=x(L+R),B=!s;++l<L;)D[l]=e[l];for(var z=l;++b<R;)D[z+b]=t[b];for(;++p<_;)(B||l<h)&&(D[z+n[p]]=e[l++]);return D}function Ye(e,t){var n=-1,s=e.length;for(t||(t=x(s));++n<s;)t[n]=e[n];return t}function Ot(e,t,n,s){var l=!n;n||(n={});for(var h=-1,p=t.length;++h<p;){var _=t[h],b=s?s(n[_],e[_],_,n,e):r;b===r&&(b=e[_]),l?$t(n,_,b):cr(n,_,b)}return n}function gx(e,t){return Ot(e,Is(e),t)}function vx(e,t){return Ot(e,_f(e),t)}function di(e,t){return function(n,s){var l=ne(n)?ww:BS,h=t?t():{};return l(n,e,Y(s,2),h)}}function Nn(e){return oe(function(t,n){var s=-1,l=n.length,h=l>1?n[l-1]:r,p=l>2?n[2]:r;for(h=e.length>3&&typeof h=="function"?(l--,h):r,p&&je(n[0],n[1],p)&&(h=l<3?r:h,l=1),t=ye(t);++s<l;){var _=n[s];_&&e(t,_,s,h)}return t})}function af(e,t){return function(n,s){if(n==null)return n;if(!Xe(n))return e(n,s);for(var l=n.length,h=t?l:-1,p=ye(n);(t?h--:++h<l)&&s(p[h],h,p)!==!1;);return n}}function sf(e){return function(t,n,s){for(var l=-1,h=ye(t),p=s(t),_=p.length;_--;){var b=p[e?_:++l];if(n(h[b],b,h)===!1)break}return t}}function _x(e,t,n){var s=t&M,l=gr(e);function h(){var p=this&&this!==We&&this instanceof h?l:e;return p.apply(s?n:this,arguments)}return h}function of(e){return function(t){t=ve(t);var n=On(t)?yt(t):r,s=n?n[0]:t.charAt(0),l=n?Vt(n,1).join(""):t.slice(1);return s[e]()+l}}function $n(e){return function(t){return Qa(ah(ih(t).replace(ow,"")),e,"")}}function gr(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=In(e.prototype),s=e.apply(n,t);return Ae(s)?s:n}}function mx(e,t,n){var s=gr(e);function l(){for(var h=arguments.length,p=x(h),_=h,b=Fn(l);_--;)p[_]=arguments[_];var R=h<3&&p[0]!==b&&p[h-1]!==b?[]:Kt(p,b);if(h-=R.length,h<n)return hf(e,t,pi,l.placeholder,r,p,R,r,r,n-h);var L=this&&this!==We&&this instanceof l?s:e;return et(L,this,p)}return l}function uf(e){return function(t,n,s){var l=ye(t);if(!Xe(t)){var h=Y(n,3);t=Be(t),n=function(_){return h(l[_],_,l)}}var p=e(t,n,s);return p>-1?l[h?t[p]:p]:r}}function lf(e){return Bt(function(t){var n=t.length,s=n,l=ft.prototype.thru;for(e&&t.reverse();s--;){var h=t[s];if(typeof h!="function")throw new ct(d);if(l&&!p&&mi(h)=="wrapper")var p=new ft([],!0)}for(s=p?s:n;++s<n;){h=t[s];var _=mi(h),b=_=="wrapper"?Ms(h):r;b&&$s(b[0])&&b[1]==(fe|X|H|_e)&&!b[4].length&&b[9]==1?p=p[mi(b[0])].apply(p,b[3]):p=h.length==1&&$s(h)?p[_]():p.thru(h)}return function(){var R=arguments,L=R[0];if(p&&R.length==1&&ne(L))return p.plant(L).value();for(var D=0,B=n?t[D].apply(this,R):L;++D<n;)B=t[D].call(this,B);return B}})}function pi(e,t,n,s,l,h,p,_,b,R){var L=t&fe,D=t&M,B=t&N,z=t&(X|G),Z=t&pe,ie=B?r:gr(e);function J(){for(var ue=arguments.length,he=x(ue),it=ue;it--;)he[it]=arguments[it];if(z)var Ke=Fn(J),at=Lw(he,Ke);if(s&&(he=nf(he,s,l,z)),h&&(he=rf(he,h,p,z)),ue-=at,z&&ue<R){var Me=Kt(he,Ke);return hf(e,t,pi,J.placeholder,n,he,Me,_,b,R-ue)}var St=D?n:this,zt=B?St[e]:e;return ue=he.length,_?he=Bx(he,_):Z&&ue>1&&he.reverse(),L&&b<ue&&(he.length=b),this&&this!==We&&this instanceof J&&(zt=ie||gr(zt)),zt.apply(St,he)}return J}function cf(e,t){return function(n,s){return KS(n,e,t(s),{})}}function gi(e,t){return function(n,s){var l;if(n===r&&s===r)return t;if(n!==r&&(l=n),s!==r){if(l===r)return s;typeof n=="string"||typeof s=="string"?(n=nt(n),s=nt(s)):(n=Xc(n),s=Xc(s)),l=e(n,s)}return l}}function Os(e){return Bt(function(t){return t=Te(t,tt(Y())),oe(function(n){var s=this;return e(t,function(l){return et(l,s,n)})})})}function vi(e,t){t=t===r?" ":nt(t);var n=t.length;if(n<2)return n?ws(t,e):t;var s=ws(t,ni(e/Rn(t)));return On(t)?Vt(yt(s),0,e).join(""):s.slice(0,e)}function yx(e,t,n,s){var l=t&M,h=gr(e);function p(){for(var _=-1,b=arguments.length,R=-1,L=s.length,D=x(L+b),B=this&&this!==We&&this instanceof p?h:e;++R<L;)D[R]=s[R];for(;b--;)D[R++]=arguments[++_];return et(B,l?n:this,D)}return p}function ff(e){return function(t,n,s){return s&&typeof s!="number"&&je(t,n,s)&&(n=s=r),t=Ut(t),n===r?(n=t,t=0):n=Ut(n),s=s===r?t<n?1:-1:Ut(s),ix(t,n,s,e)}}function _i(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=gt(t),n=gt(n)),e(t,n)}}function hf(e,t,n,s,l,h,p,_,b,R){var L=t&X,D=L?p:r,B=L?r:p,z=L?h:r,Z=L?r:h;t|=L?H:j,t&=~(L?j:H),t&q||(t&=~(M|N));var ie=[e,t,l,z,D,Z,B,_,b,R],J=n.apply(r,ie);return $s(e)&&Tf(J,ie),J.placeholder=s,Af(J,e,t)}function Rs(e){var t=Ne[e];return function(n,s){if(n=gt(n),s=s==null?0:ze(re(s),292),s&&Tc(n)){var l=(ve(n)+"e").split("e"),h=t(l[0]+"e"+(+l[1]+s));return l=(ve(h)+"e").split("e"),+(l[0]+"e"+(+l[1]-s))}return t(n)}}var bx=Mn&&1/Kr(new Mn([,-0]))[1]==F?function(e){return new Mn(e)}:Vs;function df(e){return function(t){var n=He(t);return n==_t?as(t):n==mt?Fw(t):Rw(t,e(t))}}function Ft(e,t,n,s,l,h,p,_){var b=t&N;if(!b&&typeof e!="function")throw new ct(d);var R=s?s.length:0;if(R||(t&=~(H|j),s=l=r),p=p===r?p:$e(re(p),0),_=_===r?_:re(_),R-=l?l.length:0,t&j){var L=s,D=l;s=l=r}var B=b?r:Ms(e),z=[e,t,n,s,l,L,D,h,p,_];if(B&&Nx(z,B),e=z[0],t=z[1],n=z[2],s=z[3],l=z[4],_=z[9]=z[9]===r?b?0:e.length:$e(z[9]-R,0),!_&&t&(X|G)&&(t&=~(X|G)),!t||t==M)var Z=_x(e,t,n);else t==X||t==G?Z=mx(e,t,_):(t==H||t==(M|H))&&!l.length?Z=yx(e,t,n,s):Z=pi.apply(r,z);var ie=B?Kc:Tf;return Af(ie(Z,z),e,t)}function pf(e,t,n,s){return e===r||wt(e,Pn[n])&&!me.call(s,n)?t:e}function gf(e,t,n,s,l,h){return Ae(e)&&Ae(t)&&(h.set(t,e),ci(e,t,r,gf,h),h.delete(t)),e}function wx(e){return mr(e)?r:e}function vf(e,t,n,s,l,h){var p=n&T,_=e.length,b=t.length;if(_!=b&&!(p&&b>_))return!1;var R=h.get(e),L=h.get(t);if(R&&L)return R==t&&L==e;var D=-1,B=!0,z=n&I?new cn:r;for(h.set(e,t),h.set(t,e);++D<_;){var Z=e[D],ie=t[D];if(s)var J=p?s(ie,Z,D,t,e,h):s(Z,ie,D,e,t,h);if(J!==r){if(J)continue;B=!1;break}if(z){if(!qa(t,function(ue,he){if(!ir(z,he)&&(Z===ue||l(Z,ue,n,s,h)))return z.push(he)})){B=!1;break}}else if(!(Z===ie||l(Z,ie,n,s,h))){B=!1;break}}return h.delete(e),h.delete(t),B}function Sx(e,t,n,s,l,h,p){switch(n){case An:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case rr:return!(e.byteLength!=t.byteLength||!h(new Qr(e),new Qr(t)));case Ie:case Ee:case qn:return wt(+e,+t);case Ct:return e.name==t.name&&e.message==t.message;case er:case tr:return e==t+"";case _t:var _=as;case mt:var b=s&T;if(_||(_=Kr),e.size!=t.size&&!b)return!1;var R=p.get(e);if(R)return R==t;s|=I,p.set(e,t);var L=vf(_(e),_(t),s,l,h,p);return p.delete(e),L;case kr:if(lr)return lr.call(e)==lr.call(t)}return!1}function xx(e,t,n,s,l,h){var p=n&T,_=Ls(e),b=_.length,R=Ls(t),L=R.length;if(b!=L&&!p)return!1;for(var D=b;D--;){var B=_[D];if(!(p?B in t:me.call(t,B)))return!1}var z=h.get(e),Z=h.get(t);if(z&&Z)return z==t&&Z==e;var ie=!0;h.set(e,t),h.set(t,e);for(var J=p;++D<b;){B=_[D];var ue=e[B],he=t[B];if(s)var it=p?s(he,ue,B,t,e,h):s(ue,he,B,e,t,h);if(!(it===r?ue===he||l(ue,he,n,s,h):it)){ie=!1;break}J||(J=B=="constructor")}if(ie&&!J){var Ke=e.constructor,at=t.constructor;Ke!=at&&"constructor"in e&&"constructor"in t&&!(typeof Ke=="function"&&Ke instanceof Ke&&typeof at=="function"&&at instanceof at)&&(ie=!1)}return h.delete(e),h.delete(t),ie}function Bt(e){return Bs(Sf(e,r,Pf),e+"")}function Ls(e){return Nc(e,Be,Is)}function Ps(e){return Nc(e,Ze,_f)}var Ms=ii?function(e){return ii.get(e)}:Vs;function mi(e){for(var t=e.name+"",n=Dn[t],s=me.call(Dn,t)?n.length:0;s--;){var l=n[s],h=l.func;if(h==null||h==e)return l.name}return t}function Fn(e){var t=me.call(f,"placeholder")?f:e;return t.placeholder}function Y(){var e=f.iteratee||Zs;return e=e===Zs?Bc:e,arguments.length?e(arguments[0],arguments[1]):e}function yi(e,t){var n=e.__data__;return Px(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Ds(e){for(var t=Be(e),n=t.length;n--;){var s=t[n],l=e[s];t[n]=[s,l,bf(l)]}return t}function dn(e,t){var n=Iw(e,t);return Fc(n)?n:r}function Tx(e){var t=me.call(e,un),n=e[un];try{e[un]=r;var s=!0}catch{}var l=Jr.call(e);return s&&(t?e[un]=n:delete e[un]),l}var Is=os?function(e){return e==null?[]:(e=ye(e),Gt(os(e),function(t){return Sc.call(e,t)}))}:Qs,_f=os?function(e){for(var t=[];e;)jt(t,Is(e)),e=qr(e);return t}:Qs,He=Ge;(us&&He(new us(new ArrayBuffer(1)))!=An||sr&&He(new sr)!=_t||ls&&He(ls.resolve())!=Ml||Mn&&He(new Mn)!=mt||or&&He(new or)!=nr)&&(He=function(e){var t=Ge(e),n=t==Dt?e.constructor:r,s=n?pn(n):"";if(s)switch(s){case sS:return An;case oS:return _t;case uS:return Ml;case lS:return mt;case cS:return nr}return t});function Ax(e,t,n){for(var s=-1,l=n.length;++s<l;){var h=n[s],p=h.size;switch(h.type){case"drop":e+=p;break;case"dropRight":t-=p;break;case"take":t=ze(t,e+p);break;case"takeRight":e=$e(e,t-p);break}}return{start:e,end:t}}function Cx(e){var t=e.match(Mb);return t?t[1].split(Db):[]}function mf(e,t,n){t=Jt(t,e);for(var s=-1,l=t.length,h=!1;++s<l;){var p=Rt(t[s]);if(!(h=e!=null&&n(e,p)))break;e=e[p]}return h||++s!=l?h:(l=e==null?0:e.length,!!l&&Ci(l)&&Wt(p,l)&&(ne(e)||gn(e)))}function Ex(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&me.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function yf(e){return typeof e.constructor=="function"&&!vr(e)?In(qr(e)):{}}function Ox(e,t,n){var s=e.constructor;switch(t){case rr:return Es(e);case Ie:case Ee:return new s(+e);case An:return fx(e,n);case Da:case Ia:case Na:case $a:case Fa:case Ba:case Wa:case ka:case Ua:return ef(e,n);case _t:return new s;case qn:case tr:return new s(e);case er:return hx(e);case mt:return new s;case kr:return dx(e)}}function Rx(e,t){var n=t.length;if(!n)return e;var s=n-1;return t[s]=(n>1?"& ":"")+t[s],t=t.join(n>2?", ":" "),e.replace(Pb,`{
/* [wrapped with `+t+`] */
`)}function Lx(e){return ne(e)||gn(e)||!!(xc&&e&&e[xc])}function Wt(e,t){var n=typeof e;return t=t==null?K:t,!!t&&(n=="number"||n!="symbol"&&zb.test(e))&&e>-1&&e%1==0&&e<t}function je(e,t,n){if(!Ae(n))return!1;var s=typeof t;return(s=="number"?Xe(n)&&Wt(t,n.length):s=="string"&&t in n)?wt(n[t],e):!1}function Ns(e,t){if(ne(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||rt(e)?!0:Eb.test(e)||!Cb.test(e)||t!=null&&e in ye(t)}function Px(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $s(e){var t=mi(e),n=f[t];if(typeof n!="function"||!(t in ce.prototype))return!1;if(e===n)return!0;var s=Ms(n);return!!s&&e===s[0]}function Mx(e){return!!yc&&yc in e}var Dx=Xr?kt:qs;function vr(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Pn;return e===n}function bf(e){return e===e&&!Ae(e)}function wf(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==r||e in ye(n))}}function Ix(e){var t=Ti(e,function(s){return n.size===v&&n.clear(),s}),n=t.cache;return t}function Nx(e,t){var n=e[1],s=t[1],l=n|s,h=l<(M|N|fe),p=s==fe&&n==X||s==fe&&n==_e&&e[7].length<=t[8]||s==(fe|_e)&&t[7].length<=t[8]&&n==X;if(!(h||p))return e;s&M&&(e[2]=t[2],l|=n&M?0:q);var _=t[3];if(_){var b=e[3];e[3]=b?nf(b,_,t[4]):_,e[4]=b?Kt(e[3],w):t[4]}return _=t[5],_&&(b=e[5],e[5]=b?rf(b,_,t[6]):_,e[6]=b?Kt(e[5],w):t[6]),_=t[7],_&&(e[7]=_),s&fe&&(e[8]=e[8]==null?t[8]:ze(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}function $x(e){var t=[];if(e!=null)for(var n in ye(e))t.push(n);return t}function Fx(e){return Jr.call(e)}function Sf(e,t,n){return t=$e(t===r?e.length-1:t,0),function(){for(var s=arguments,l=-1,h=$e(s.length-t,0),p=x(h);++l<h;)p[l]=s[t+l];l=-1;for(var _=x(t+1);++l<t;)_[l]=s[l];return _[t]=n(p),et(e,this,_)}}function xf(e,t){return t.length<2?e:hn(e,dt(t,0,-1))}function Bx(e,t){for(var n=e.length,s=ze(t.length,n),l=Ye(e);s--;){var h=t[s];e[s]=Wt(h,n)?l[h]:r}return e}function Fs(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Tf=Cf(Kc),_r=qw||function(e,t){return We.setTimeout(e,t)},Bs=Cf(ox);function Af(e,t,n){var s=t+"";return Bs(e,Rx(s,Wx(Cx(s),n)))}function Cf(e){var t=0,n=0;return function(){var s=rS(),l=V-(s-n);if(n=s,l>0){if(++t>=sn)return arguments[0]}else t=0;return e.apply(r,arguments)}}function bi(e,t){var n=-1,s=e.length,l=s-1;for(t=t===r?s:t;++n<t;){var h=bs(n,l),p=e[h];e[h]=e[n],e[n]=p}return e.length=t,e}var Ef=Ix(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ob,function(n,s,l,h){t.push(l?h.replace($b,"$1"):s||n)}),t});function Rt(e){if(typeof e=="string"||rt(e))return e;var t=e+"";return t=="0"&&1/e==-F?"-0":t}function pn(e){if(e!=null){try{return Zr.call(e)}catch{}try{return e+""}catch{}}return""}function Wx(e,t){return lt(st,function(n){var s="_."+n[0];t&n[1]&&!Gr(e,s)&&e.push(s)}),e.sort()}function Of(e){if(e instanceof ce)return e.clone();var t=new ft(e.__wrapped__,e.__chain__);return t.__actions__=Ye(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function kx(e,t,n){(n?je(e,t,n):t===r)?t=1:t=$e(re(t),0);var s=e==null?0:e.length;if(!s||t<1)return[];for(var l=0,h=0,p=x(ni(s/t));l<s;)p[h++]=dt(e,l,l+=t);return p}function Ux(e){for(var t=-1,n=e==null?0:e.length,s=0,l=[];++t<n;){var h=e[t];h&&(l[s++]=h)}return l}function zx(){var e=arguments.length;if(!e)return[];for(var t=x(e-1),n=arguments[0],s=e;s--;)t[s-1]=arguments[s];return jt(ne(n)?Ye(n):[n],ke(t,1))}var Hx=oe(function(e,t){return Pe(e)?fr(e,ke(t,1,Pe,!0)):[]}),Gx=oe(function(e,t){var n=pt(t);return Pe(n)&&(n=r),Pe(e)?fr(e,ke(t,1,Pe,!0),Y(n,2)):[]}),jx=oe(function(e,t){var n=pt(t);return Pe(n)&&(n=r),Pe(e)?fr(e,ke(t,1,Pe,!0),r,n):[]});function Kx(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===r?1:re(t),dt(e,t<0?0:t,s)):[]}function Yx(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===r?1:re(t),t=s-t,dt(e,0,t<0?0:t)):[]}function Xx(e,t){return e&&e.length?hi(e,Y(t,3),!0,!0):[]}function Zx(e,t){return e&&e.length?hi(e,Y(t,3),!0):[]}function Jx(e,t,n,s){var l=e==null?0:e.length;return l?(n&&typeof n!="number"&&je(e,t,n)&&(n=0,s=l),zS(e,t,n,s)):[]}function Rf(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var l=n==null?0:re(n);return l<0&&(l=$e(s+l,0)),jr(e,Y(t,3),l)}function Lf(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var l=s-1;return n!==r&&(l=re(n),l=n<0?$e(s+l,0):ze(l,s-1)),jr(e,Y(t,3),l,!0)}function Pf(e){var t=e==null?0:e.length;return t?ke(e,1):[]}function Vx(e){var t=e==null?0:e.length;return t?ke(e,F):[]}function Qx(e,t){var n=e==null?0:e.length;return n?(t=t===r?1:re(t),ke(e,t)):[]}function qx(e){for(var t=-1,n=e==null?0:e.length,s={};++t<n;){var l=e[t];s[l[0]]=l[1]}return s}function Mf(e){return e&&e.length?e[0]:r}function eT(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var l=n==null?0:re(n);return l<0&&(l=$e(s+l,0)),En(e,t,l)}function tT(e){var t=e==null?0:e.length;return t?dt(e,0,-1):[]}var nT=oe(function(e){var t=Te(e,As);return t.length&&t[0]===e[0]?gs(t):[]}),rT=oe(function(e){var t=pt(e),n=Te(e,As);return t===pt(n)?t=r:n.pop(),n.length&&n[0]===e[0]?gs(n,Y(t,2)):[]}),iT=oe(function(e){var t=pt(e),n=Te(e,As);return t=typeof t=="function"?t:r,t&&n.pop(),n.length&&n[0]===e[0]?gs(n,r,t):[]});function aT(e,t){return e==null?"":tS.call(e,t)}function pt(e){var t=e==null?0:e.length;return t?e[t-1]:r}function sT(e,t,n){var s=e==null?0:e.length;if(!s)return-1;var l=s;return n!==r&&(l=re(n),l=l<0?$e(s+l,0):ze(l,s-1)),t===t?Ww(e,t,l):jr(e,fc,l,!0)}function oT(e,t){return e&&e.length?zc(e,re(t)):r}var uT=oe(Df);function Df(e,t){return e&&e.length&&t&&t.length?ys(e,t):e}function lT(e,t,n){return e&&e.length&&t&&t.length?ys(e,t,Y(n,2)):e}function cT(e,t,n){return e&&e.length&&t&&t.length?ys(e,t,r,n):e}var fT=Bt(function(e,t){var n=e==null?0:e.length,s=fs(e,t);return jc(e,Te(t,function(l){return Wt(l,n)?+l:l}).sort(tf)),s});function hT(e,t){var n=[];if(!(e&&e.length))return n;var s=-1,l=[],h=e.length;for(t=Y(t,3);++s<h;){var p=e[s];t(p,s,e)&&(n.push(p),l.push(s))}return jc(e,l),n}function Ws(e){return e==null?e:aS.call(e)}function dT(e,t,n){var s=e==null?0:e.length;return s?(n&&typeof n!="number"&&je(e,t,n)?(t=0,n=s):(t=t==null?0:re(t),n=n===r?s:re(n)),dt(e,t,n)):[]}function pT(e,t){return fi(e,t)}function gT(e,t,n){return Ss(e,t,Y(n,2))}function vT(e,t){var n=e==null?0:e.length;if(n){var s=fi(e,t);if(s<n&&wt(e[s],t))return s}return-1}function _T(e,t){return fi(e,t,!0)}function mT(e,t,n){return Ss(e,t,Y(n,2),!0)}function yT(e,t){var n=e==null?0:e.length;if(n){var s=fi(e,t,!0)-1;if(wt(e[s],t))return s}return-1}function bT(e){return e&&e.length?Yc(e):[]}function wT(e,t){return e&&e.length?Yc(e,Y(t,2)):[]}function ST(e){var t=e==null?0:e.length;return t?dt(e,1,t):[]}function xT(e,t,n){return e&&e.length?(t=n||t===r?1:re(t),dt(e,0,t<0?0:t)):[]}function TT(e,t,n){var s=e==null?0:e.length;return s?(t=n||t===r?1:re(t),t=s-t,dt(e,t<0?0:t,s)):[]}function AT(e,t){return e&&e.length?hi(e,Y(t,3),!1,!0):[]}function CT(e,t){return e&&e.length?hi(e,Y(t,3)):[]}var ET=oe(function(e){return Zt(ke(e,1,Pe,!0))}),OT=oe(function(e){var t=pt(e);return Pe(t)&&(t=r),Zt(ke(e,1,Pe,!0),Y(t,2))}),RT=oe(function(e){var t=pt(e);return t=typeof t=="function"?t:r,Zt(ke(e,1,Pe,!0),r,t)});function LT(e){return e&&e.length?Zt(e):[]}function PT(e,t){return e&&e.length?Zt(e,Y(t,2)):[]}function MT(e,t){return t=typeof t=="function"?t:r,e&&e.length?Zt(e,r,t):[]}function ks(e){if(!(e&&e.length))return[];var t=0;return e=Gt(e,function(n){if(Pe(n))return t=$e(n.length,t),!0}),rs(t,function(n){return Te(e,es(n))})}function If(e,t){if(!(e&&e.length))return[];var n=ks(e);return t==null?n:Te(n,function(s){return et(t,r,s)})}var DT=oe(function(e,t){return Pe(e)?fr(e,t):[]}),IT=oe(function(e){return Ts(Gt(e,Pe))}),NT=oe(function(e){var t=pt(e);return Pe(t)&&(t=r),Ts(Gt(e,Pe),Y(t,2))}),$T=oe(function(e){var t=pt(e);return t=typeof t=="function"?t:r,Ts(Gt(e,Pe),r,t)}),FT=oe(ks);function BT(e,t){return Vc(e||[],t||[],cr)}function WT(e,t){return Vc(e||[],t||[],pr)}var kT=oe(function(e){var t=e.length,n=t>1?e[t-1]:r;return n=typeof n=="function"?(e.pop(),n):r,If(e,n)});function Nf(e){var t=f(e);return t.__chain__=!0,t}function UT(e,t){return t(e),e}function wi(e,t){return t(e)}var zT=Bt(function(e){var t=e.length,n=t?e[0]:0,s=this.__wrapped__,l=function(h){return fs(h,e)};return t>1||this.__actions__.length||!(s instanceof ce)||!Wt(n)?this.thru(l):(s=s.slice(n,+n+(t?1:0)),s.__actions__.push({func:wi,args:[l],thisArg:r}),new ft(s,this.__chain__).thru(function(h){return t&&!h.length&&h.push(r),h}))});function HT(){return Nf(this)}function GT(){return new ft(this.value(),this.__chain__)}function jT(){this.__values__===r&&(this.__values__=Zf(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function KT(){return this}function YT(e){for(var t,n=this;n instanceof si;){var s=Of(n);s.__index__=0,s.__values__=r,t?l.__wrapped__=s:t=s;var l=s;n=n.__wrapped__}return l.__wrapped__=e,t}function XT(){var e=this.__wrapped__;if(e instanceof ce){var t=e;return this.__actions__.length&&(t=new ce(this)),t=t.reverse(),t.__actions__.push({func:wi,args:[Ws],thisArg:r}),new ft(t,this.__chain__)}return this.thru(Ws)}function ZT(){return Jc(this.__wrapped__,this.__actions__)}var JT=di(function(e,t,n){me.call(e,n)?++e[n]:$t(e,n,1)});function VT(e,t,n){var s=ne(e)?lc:US;return n&&je(e,t,n)&&(t=r),s(e,Y(t,3))}function QT(e,t){var n=ne(e)?Gt:Dc;return n(e,Y(t,3))}var qT=uf(Rf),eA=uf(Lf);function tA(e,t){return ke(Si(e,t),1)}function nA(e,t){return ke(Si(e,t),F)}function rA(e,t,n){return n=n===r?1:re(n),ke(Si(e,t),n)}function $f(e,t){var n=ne(e)?lt:Xt;return n(e,Y(t,3))}function Ff(e,t){var n=ne(e)?Sw:Mc;return n(e,Y(t,3))}var iA=di(function(e,t,n){me.call(e,n)?e[n].push(t):$t(e,n,[t])});function aA(e,t,n,s){e=Xe(e)?e:Wn(e),n=n&&!s?re(n):0;var l=e.length;return n<0&&(n=$e(l+n,0)),Ei(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&En(e,t,n)>-1}var sA=oe(function(e,t,n){var s=-1,l=typeof t=="function",h=Xe(e)?x(e.length):[];return Xt(e,function(p){h[++s]=l?et(t,p,n):hr(p,t,n)}),h}),oA=di(function(e,t,n){$t(e,n,t)});function Si(e,t){var n=ne(e)?Te:Wc;return n(e,Y(t,3))}function uA(e,t,n,s){return e==null?[]:(ne(t)||(t=t==null?[]:[t]),n=s?r:n,ne(n)||(n=n==null?[]:[n]),Hc(e,t,n))}var lA=di(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function cA(e,t,n){var s=ne(e)?Qa:dc,l=arguments.length<3;return s(e,Y(t,4),n,l,Xt)}function fA(e,t,n){var s=ne(e)?xw:dc,l=arguments.length<3;return s(e,Y(t,4),n,l,Mc)}function hA(e,t){var n=ne(e)?Gt:Dc;return n(e,Ai(Y(t,3)))}function dA(e){var t=ne(e)?Oc:ax;return t(e)}function pA(e,t,n){(n?je(e,t,n):t===r)?t=1:t=re(t);var s=ne(e)?$S:sx;return s(e,t)}function gA(e){var t=ne(e)?FS:ux;return t(e)}function vA(e){if(e==null)return 0;if(Xe(e))return Ei(e)?Rn(e):e.length;var t=He(e);return t==_t||t==mt?e.size:_s(e).length}function _A(e,t,n){var s=ne(e)?qa:lx;return n&&je(e,t,n)&&(t=r),s(e,Y(t,3))}var mA=oe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&je(e,t[0],t[1])?t=[]:n>2&&je(t[0],t[1],t[2])&&(t=[t[0]]),Hc(e,ke(t,1),[])}),xi=Qw||function(){return We.Date.now()};function yA(e,t){if(typeof t!="function")throw new ct(d);return e=re(e),function(){if(--e<1)return t.apply(this,arguments)}}function Bf(e,t,n){return t=n?r:t,t=e&&t==null?e.length:t,Ft(e,fe,r,r,r,r,t)}function Wf(e,t){var n;if(typeof t!="function")throw new ct(d);return e=re(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=r),n}}var Us=oe(function(e,t,n){var s=M;if(n.length){var l=Kt(n,Fn(Us));s|=H}return Ft(e,s,t,n,l)}),kf=oe(function(e,t,n){var s=M|N;if(n.length){var l=Kt(n,Fn(kf));s|=H}return Ft(t,s,e,n,l)});function Uf(e,t,n){t=n?r:t;var s=Ft(e,X,r,r,r,r,r,t);return s.placeholder=Uf.placeholder,s}function zf(e,t,n){t=n?r:t;var s=Ft(e,G,r,r,r,r,r,t);return s.placeholder=zf.placeholder,s}function Hf(e,t,n){var s,l,h,p,_,b,R=0,L=!1,D=!1,B=!0;if(typeof e!="function")throw new ct(d);t=gt(t)||0,Ae(n)&&(L=!!n.leading,D="maxWait"in n,h=D?$e(gt(n.maxWait)||0,t):h,B="trailing"in n?!!n.trailing:B);function z(Me){var St=s,zt=l;return s=l=r,R=Me,p=e.apply(zt,St),p}function Z(Me){return R=Me,_=_r(ue,t),L?z(Me):p}function ie(Me){var St=Me-b,zt=Me-R,uh=t-St;return D?ze(uh,h-zt):uh}function J(Me){var St=Me-b,zt=Me-R;return b===r||St>=t||St<0||D&&zt>=h}function ue(){var Me=xi();if(J(Me))return he(Me);_=_r(ue,ie(Me))}function he(Me){return _=r,B&&s?z(Me):(s=l=r,p)}function it(){_!==r&&Qc(_),R=0,s=b=l=_=r}function Ke(){return _===r?p:he(xi())}function at(){var Me=xi(),St=J(Me);if(s=arguments,l=this,b=Me,St){if(_===r)return Z(b);if(D)return Qc(_),_=_r(ue,t),z(b)}return _===r&&(_=_r(ue,t)),p}return at.cancel=it,at.flush=Ke,at}var bA=oe(function(e,t){return Pc(e,1,t)}),wA=oe(function(e,t,n){return Pc(e,gt(t)||0,n)});function SA(e){return Ft(e,pe)}function Ti(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new ct(d);var n=function(){var s=arguments,l=t?t.apply(this,s):s[0],h=n.cache;if(h.has(l))return h.get(l);var p=e.apply(this,s);return n.cache=h.set(l,p)||h,p};return n.cache=new(Ti.Cache||Nt),n}Ti.Cache=Nt;function Ai(e){if(typeof e!="function")throw new ct(d);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function xA(e){return Wf(2,e)}var TA=cx(function(e,t){t=t.length==1&&ne(t[0])?Te(t[0],tt(Y())):Te(ke(t,1),tt(Y()));var n=t.length;return oe(function(s){for(var l=-1,h=ze(s.length,n);++l<h;)s[l]=t[l].call(this,s[l]);return et(e,this,s)})}),zs=oe(function(e,t){var n=Kt(t,Fn(zs));return Ft(e,H,r,t,n)}),Gf=oe(function(e,t){var n=Kt(t,Fn(Gf));return Ft(e,j,r,t,n)}),AA=Bt(function(e,t){return Ft(e,_e,r,r,r,t)});function CA(e,t){if(typeof e!="function")throw new ct(d);return t=t===r?t:re(t),oe(e,t)}function EA(e,t){if(typeof e!="function")throw new ct(d);return t=t==null?0:$e(re(t),0),oe(function(n){var s=n[t],l=Vt(n,0,t);return s&&jt(l,s),et(e,this,l)})}function OA(e,t,n){var s=!0,l=!0;if(typeof e!="function")throw new ct(d);return Ae(n)&&(s="leading"in n?!!n.leading:s,l="trailing"in n?!!n.trailing:l),Hf(e,t,{leading:s,maxWait:t,trailing:l})}function RA(e){return Bf(e,1)}function LA(e,t){return zs(Cs(t),e)}function PA(){if(!arguments.length)return[];var e=arguments[0];return ne(e)?e:[e]}function MA(e){return ht(e,E)}function DA(e,t){return t=typeof t=="function"?t:r,ht(e,E,t)}function IA(e){return ht(e,S|E)}function NA(e,t){return t=typeof t=="function"?t:r,ht(e,S|E,t)}function $A(e,t){return t==null||Lc(e,t,Be(t))}function wt(e,t){return e===t||e!==e&&t!==t}var FA=_i(ps),BA=_i(function(e,t){return e>=t}),gn=$c(function(){return arguments}())?$c:function(e){return Oe(e)&&me.call(e,"callee")&&!Sc.call(e,"callee")},ne=x.isArray,WA=rc?tt(rc):YS;function Xe(e){return e!=null&&Ci(e.length)&&!kt(e)}function Pe(e){return Oe(e)&&Xe(e)}function kA(e){return e===!0||e===!1||Oe(e)&&Ge(e)==Ie}var Qt=eS||qs,UA=ic?tt(ic):XS;function zA(e){return Oe(e)&&e.nodeType===1&&!mr(e)}function HA(e){if(e==null)return!0;if(Xe(e)&&(ne(e)||typeof e=="string"||typeof e.splice=="function"||Qt(e)||Bn(e)||gn(e)))return!e.length;var t=He(e);if(t==_t||t==mt)return!e.size;if(vr(e))return!_s(e).length;for(var n in e)if(me.call(e,n))return!1;return!0}function GA(e,t){return dr(e,t)}function jA(e,t,n){n=typeof n=="function"?n:r;var s=n?n(e,t):r;return s===r?dr(e,t,r,n):!!s}function Hs(e){if(!Oe(e))return!1;var t=Ge(e);return t==Ct||t==qe||typeof e.message=="string"&&typeof e.name=="string"&&!mr(e)}function KA(e){return typeof e=="number"&&Tc(e)}function kt(e){if(!Ae(e))return!1;var t=Ge(e);return t==Mt||t==Pl||t==Pt||t==vb}function jf(e){return typeof e=="number"&&e==re(e)}function Ci(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=K}function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Oe(e){return e!=null&&typeof e=="object"}var Kf=ac?tt(ac):JS;function YA(e,t){return e===t||vs(e,t,Ds(t))}function XA(e,t,n){return n=typeof n=="function"?n:r,vs(e,t,Ds(t),n)}function ZA(e){return Yf(e)&&e!=+e}function JA(e){if(Dx(e))throw new te(c);return Fc(e)}function VA(e){return e===null}function QA(e){return e==null}function Yf(e){return typeof e=="number"||Oe(e)&&Ge(e)==qn}function mr(e){if(!Oe(e)||Ge(e)!=Dt)return!1;var t=qr(e);if(t===null)return!0;var n=me.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zr.call(n)==Xw}var Gs=sc?tt(sc):VS;function qA(e){return jf(e)&&e>=-K&&e<=K}var Xf=oc?tt(oc):QS;function Ei(e){return typeof e=="string"||!ne(e)&&Oe(e)&&Ge(e)==tr}function rt(e){return typeof e=="symbol"||Oe(e)&&Ge(e)==kr}var Bn=uc?tt(uc):qS;function eC(e){return e===r}function tC(e){return Oe(e)&&He(e)==nr}function nC(e){return Oe(e)&&Ge(e)==mb}var rC=_i(ms),iC=_i(function(e,t){return e<=t});function Zf(e){if(!e)return[];if(Xe(e))return Ei(e)?yt(e):Ye(e);if(ar&&e[ar])return $w(e[ar]());var t=He(e),n=t==_t?as:t==mt?Kr:Wn;return n(e)}function Ut(e){if(!e)return e===0?e:0;if(e=gt(e),e===F||e===-F){var t=e<0?-1:1;return t*ee}return e===e?e:0}function re(e){var t=Ut(e),n=t%1;return t===t?n?t-n:t:0}function Jf(e){return e?fn(re(e),0,de):0}function gt(e){if(typeof e=="number")return e;if(rt(e))return le;if(Ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pc(e);var n=Wb.test(e);return n||Ub.test(e)?yw(e.slice(2),n?2:8):Bb.test(e)?le:+e}function Vf(e){return Ot(e,Ze(e))}function aC(e){return e?fn(re(e),-K,K):e===0?e:0}function ve(e){return e==null?"":nt(e)}var sC=Nn(function(e,t){if(vr(t)||Xe(t)){Ot(t,Be(t),e);return}for(var n in t)me.call(t,n)&&cr(e,n,t[n])}),Qf=Nn(function(e,t){Ot(t,Ze(t),e)}),Oi=Nn(function(e,t,n,s){Ot(t,Ze(t),e,s)}),oC=Nn(function(e,t,n,s){Ot(t,Be(t),e,s)}),uC=Bt(fs);function lC(e,t){var n=In(e);return t==null?n:Rc(n,t)}var cC=oe(function(e,t){e=ye(e);var n=-1,s=t.length,l=s>2?t[2]:r;for(l&&je(t[0],t[1],l)&&(s=1);++n<s;)for(var h=t[n],p=Ze(h),_=-1,b=p.length;++_<b;){var R=p[_],L=e[R];(L===r||wt(L,Pn[R])&&!me.call(e,R))&&(e[R]=h[R])}return e}),fC=oe(function(e){return e.push(r,gf),et(qf,r,e)});function hC(e,t){return cc(e,Y(t,3),Et)}function dC(e,t){return cc(e,Y(t,3),ds)}function pC(e,t){return e==null?e:hs(e,Y(t,3),Ze)}function gC(e,t){return e==null?e:Ic(e,Y(t,3),Ze)}function vC(e,t){return e&&Et(e,Y(t,3))}function _C(e,t){return e&&ds(e,Y(t,3))}function mC(e){return e==null?[]:li(e,Be(e))}function yC(e){return e==null?[]:li(e,Ze(e))}function js(e,t,n){var s=e==null?r:hn(e,t);return s===r?n:s}function bC(e,t){return e!=null&&mf(e,t,HS)}function Ks(e,t){return e!=null&&mf(e,t,GS)}var wC=cf(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Jr.call(t)),e[t]=n},Xs(Je)),SC=cf(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Jr.call(t)),me.call(e,t)?e[t].push(n):e[t]=[n]},Y),xC=oe(hr);function Be(e){return Xe(e)?Ec(e):_s(e)}function Ze(e){return Xe(e)?Ec(e,!0):ex(e)}function TC(e,t){var n={};return t=Y(t,3),Et(e,function(s,l,h){$t(n,t(s,l,h),s)}),n}function AC(e,t){var n={};return t=Y(t,3),Et(e,function(s,l,h){$t(n,l,t(s,l,h))}),n}var CC=Nn(function(e,t,n){ci(e,t,n)}),qf=Nn(function(e,t,n,s){ci(e,t,n,s)}),EC=Bt(function(e,t){var n={};if(e==null)return n;var s=!1;t=Te(t,function(h){return h=Jt(h,e),s||(s=h.length>1),h}),Ot(e,Ps(e),n),s&&(n=ht(n,S|C|E,wx));for(var l=t.length;l--;)xs(n,t[l]);return n});function OC(e,t){return eh(e,Ai(Y(t)))}var RC=Bt(function(e,t){return e==null?{}:nx(e,t)});function eh(e,t){if(e==null)return{};var n=Te(Ps(e),function(s){return[s]});return t=Y(t),Gc(e,n,function(s,l){return t(s,l[0])})}function LC(e,t,n){t=Jt(t,e);var s=-1,l=t.length;for(l||(l=1,e=r);++s<l;){var h=e==null?r:e[Rt(t[s])];h===r&&(s=l,h=n),e=kt(h)?h.call(e):h}return e}function PC(e,t,n){return e==null?e:pr(e,t,n)}function MC(e,t,n,s){return s=typeof s=="function"?s:r,e==null?e:pr(e,t,n,s)}var th=df(Be),nh=df(Ze);function DC(e,t,n){var s=ne(e),l=s||Qt(e)||Bn(e);if(t=Y(t,4),n==null){var h=e&&e.constructor;l?n=s?new h:[]:Ae(e)?n=kt(h)?In(qr(e)):{}:n={}}return(l?lt:Et)(e,function(p,_,b){return t(n,p,_,b)}),n}function IC(e,t){return e==null?!0:xs(e,t)}function NC(e,t,n){return e==null?e:Zc(e,t,Cs(n))}function $C(e,t,n,s){return s=typeof s=="function"?s:r,e==null?e:Zc(e,t,Cs(n),s)}function Wn(e){return e==null?[]:is(e,Be(e))}function FC(e){return e==null?[]:is(e,Ze(e))}function BC(e,t,n){return n===r&&(n=t,t=r),n!==r&&(n=gt(n),n=n===n?n:0),t!==r&&(t=gt(t),t=t===t?t:0),fn(gt(e),t,n)}function WC(e,t,n){return t=Ut(t),n===r?(n=t,t=0):n=Ut(n),e=gt(e),jS(e,t,n)}function kC(e,t,n){if(n&&typeof n!="boolean"&&je(e,t,n)&&(t=n=r),n===r&&(typeof t=="boolean"?(n=t,t=r):typeof e=="boolean"&&(n=e,e=r)),e===r&&t===r?(e=0,t=1):(e=Ut(e),t===r?(t=e,e=0):t=Ut(t)),e>t){var s=e;e=t,t=s}if(n||e%1||t%1){var l=Ac();return ze(e+l*(t-e+mw("1e-"+((l+"").length-1))),t)}return bs(e,t)}var UC=$n(function(e,t,n){return t=t.toLowerCase(),e+(n?rh(t):t)});function rh(e){return Ys(ve(e).toLowerCase())}function ih(e){return e=ve(e),e&&e.replace(Hb,Pw).replace(uw,"")}function zC(e,t,n){e=ve(e),t=nt(t);var s=e.length;n=n===r?s:fn(re(n),0,s);var l=n;return n-=t.length,n>=0&&e.slice(n,l)==t}function HC(e){return e=ve(e),e&&xb.test(e)?e.replace(Il,Mw):e}function GC(e){return e=ve(e),e&&Rb.test(e)?e.replace(za,"\\$&"):e}var jC=$n(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),KC=$n(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),YC=of("toLowerCase");function XC(e,t,n){e=ve(e),t=re(t);var s=t?Rn(e):0;if(!t||s>=t)return e;var l=(t-s)/2;return vi(ri(l),n)+e+vi(ni(l),n)}function ZC(e,t,n){e=ve(e),t=re(t);var s=t?Rn(e):0;return t&&s<t?e+vi(t-s,n):e}function JC(e,t,n){e=ve(e),t=re(t);var s=t?Rn(e):0;return t&&s<t?vi(t-s,n)+e:e}function VC(e,t,n){return n||t==null?t=0:t&&(t=+t),iS(ve(e).replace(Ha,""),t||0)}function QC(e,t,n){return(n?je(e,t,n):t===r)?t=1:t=re(t),ws(ve(e),t)}function qC(){var e=arguments,t=ve(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var eE=$n(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function tE(e,t,n){return n&&typeof n!="number"&&je(e,t,n)&&(t=n=r),n=n===r?de:n>>>0,n?(e=ve(e),e&&(typeof t=="string"||t!=null&&!Gs(t))&&(t=nt(t),!t&&On(e))?Vt(yt(e),0,n):e.split(t,n)):[]}var nE=$n(function(e,t,n){return e+(n?" ":"")+Ys(t)});function rE(e,t,n){return e=ve(e),n=n==null?0:fn(re(n),0,e.length),t=nt(t),e.slice(n,n+t.length)==t}function iE(e,t,n){var s=f.templateSettings;n&&je(e,t,n)&&(t=r),e=ve(e),t=Oi({},t,s,pf);var l=Oi({},t.imports,s.imports,pf),h=Be(l),p=is(l,h),_,b,R=0,L=t.interpolate||Ur,D="__p += '",B=ss((t.escape||Ur).source+"|"+L.source+"|"+(L===Nl?Fb:Ur).source+"|"+(t.evaluate||Ur).source+"|$","g"),z="//# sourceURL="+(me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++dw+"]")+`
`;e.replace(B,function(J,ue,he,it,Ke,at){return he||(he=it),D+=e.slice(R,at).replace(Gb,Dw),ue&&(_=!0,D+=`' +
__e(`+ue+`) +
'`),Ke&&(b=!0,D+=`';
`+Ke+`;
__p += '`),he&&(D+=`' +
((__t = (`+he+`)) == null ? '' : __t) +
'`),R=at+J.length,J}),D+=`';
`;var Z=me.call(t,"variable")&&t.variable;if(!Z)D=`with (obj) {
`+D+`
}
`;else if(Nb.test(Z))throw new te(g);D=(b?D.replace(yb,""):D).replace(bb,"$1").replace(wb,"$1;"),D="function("+(Z||"obj")+`) {
`+(Z?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(_?", __e = _.escape":"")+(b?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+D+`return __p
}`;var ie=sh(function(){return ge(h,z+"return "+D).apply(r,p)});if(ie.source=D,Hs(ie))throw ie;return ie}function aE(e){return ve(e).toLowerCase()}function sE(e){return ve(e).toUpperCase()}function oE(e,t,n){if(e=ve(e),e&&(n||t===r))return pc(e);if(!e||!(t=nt(t)))return e;var s=yt(e),l=yt(t),h=gc(s,l),p=vc(s,l)+1;return Vt(s,h,p).join("")}function uE(e,t,n){if(e=ve(e),e&&(n||t===r))return e.slice(0,mc(e)+1);if(!e||!(t=nt(t)))return e;var s=yt(e),l=vc(s,yt(t))+1;return Vt(s,0,l).join("")}function lE(e,t,n){if(e=ve(e),e&&(n||t===r))return e.replace(Ha,"");if(!e||!(t=nt(t)))return e;var s=yt(e),l=gc(s,yt(t));return Vt(s,l).join("")}function cE(e,t){var n=se,s=Ue;if(Ae(t)){var l="separator"in t?t.separator:l;n="length"in t?re(t.length):n,s="omission"in t?nt(t.omission):s}e=ve(e);var h=e.length;if(On(e)){var p=yt(e);h=p.length}if(n>=h)return e;var _=n-Rn(s);if(_<1)return s;var b=p?Vt(p,0,_).join(""):e.slice(0,_);if(l===r)return b+s;if(p&&(_+=b.length-_),Gs(l)){if(e.slice(_).search(l)){var R,L=b;for(l.global||(l=ss(l.source,ve($l.exec(l))+"g")),l.lastIndex=0;R=l.exec(L);)var D=R.index;b=b.slice(0,D===r?_:D)}}else if(e.indexOf(nt(l),_)!=_){var B=b.lastIndexOf(l);B>-1&&(b=b.slice(0,B))}return b+s}function fE(e){return e=ve(e),e&&Sb.test(e)?e.replace(Dl,kw):e}var hE=$n(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Ys=of("toUpperCase");function ah(e,t,n){return e=ve(e),t=n?r:t,t===r?Nw(e)?Hw(e):Cw(e):e.match(t)||[]}var sh=oe(function(e,t){try{return et(e,r,t)}catch(n){return Hs(n)?n:new te(n)}}),dE=Bt(function(e,t){return lt(t,function(n){n=Rt(n),$t(e,n,Us(e[n],e))}),e});function pE(e){var t=e==null?0:e.length,n=Y();return e=t?Te(e,function(s){if(typeof s[1]!="function")throw new ct(d);return[n(s[0]),s[1]]}):[],oe(function(s){for(var l=-1;++l<t;){var h=e[l];if(et(h[0],this,s))return et(h[1],this,s)}})}function gE(e){return kS(ht(e,S))}function Xs(e){return function(){return e}}function vE(e,t){return e==null||e!==e?t:e}var _E=lf(),mE=lf(!0);function Je(e){return e}function Zs(e){return Bc(typeof e=="function"?e:ht(e,S))}function yE(e){return kc(ht(e,S))}function bE(e,t){return Uc(e,ht(t,S))}var wE=oe(function(e,t){return function(n){return hr(n,e,t)}}),SE=oe(function(e,t){return function(n){return hr(e,n,t)}});function Js(e,t,n){var s=Be(t),l=li(t,s);n==null&&!(Ae(t)&&(l.length||!s.length))&&(n=t,t=e,e=this,l=li(t,Be(t)));var h=!(Ae(n)&&"chain"in n)||!!n.chain,p=kt(e);return lt(l,function(_){var b=t[_];e[_]=b,p&&(e.prototype[_]=function(){var R=this.__chain__;if(h||R){var L=e(this.__wrapped__),D=L.__actions__=Ye(this.__actions__);return D.push({func:b,args:arguments,thisArg:e}),L.__chain__=R,L}return b.apply(e,jt([this.value()],arguments))})}),e}function xE(){return We._===this&&(We._=Zw),this}function Vs(){}function TE(e){return e=re(e),oe(function(t){return zc(t,e)})}var AE=Os(Te),CE=Os(lc),EE=Os(qa);function oh(e){return Ns(e)?es(Rt(e)):rx(e)}function OE(e){return function(t){return e==null?r:hn(e,t)}}var RE=ff(),LE=ff(!0);function Qs(){return[]}function qs(){return!1}function PE(){return{}}function ME(){return""}function DE(){return!0}function IE(e,t){if(e=re(e),e<1||e>K)return[];var n=de,s=ze(e,de);t=Y(t),e-=de;for(var l=rs(s,t);++n<e;)t(n);return l}function NE(e){return ne(e)?Te(e,Rt):rt(e)?[e]:Ye(Ef(ve(e)))}function $E(e){var t=++Yw;return ve(e)+t}var FE=gi(function(e,t){return e+t},0),BE=Rs("ceil"),WE=gi(function(e,t){return e/t},1),kE=Rs("floor");function UE(e){return e&&e.length?ui(e,Je,ps):r}function zE(e,t){return e&&e.length?ui(e,Y(t,2),ps):r}function HE(e){return hc(e,Je)}function GE(e,t){return hc(e,Y(t,2))}function jE(e){return e&&e.length?ui(e,Je,ms):r}function KE(e,t){return e&&e.length?ui(e,Y(t,2),ms):r}var YE=gi(function(e,t){return e*t},1),XE=Rs("round"),ZE=gi(function(e,t){return e-t},0);function JE(e){return e&&e.length?ns(e,Je):0}function VE(e,t){return e&&e.length?ns(e,Y(t,2)):0}return f.after=yA,f.ary=Bf,f.assign=sC,f.assignIn=Qf,f.assignInWith=Oi,f.assignWith=oC,f.at=uC,f.before=Wf,f.bind=Us,f.bindAll=dE,f.bindKey=kf,f.castArray=PA,f.chain=Nf,f.chunk=kx,f.compact=Ux,f.concat=zx,f.cond=pE,f.conforms=gE,f.constant=Xs,f.countBy=JT,f.create=lC,f.curry=Uf,f.curryRight=zf,f.debounce=Hf,f.defaults=cC,f.defaultsDeep=fC,f.defer=bA,f.delay=wA,f.difference=Hx,f.differenceBy=Gx,f.differenceWith=jx,f.drop=Kx,f.dropRight=Yx,f.dropRightWhile=Xx,f.dropWhile=Zx,f.fill=Jx,f.filter=QT,f.flatMap=tA,f.flatMapDeep=nA,f.flatMapDepth=rA,f.flatten=Pf,f.flattenDeep=Vx,f.flattenDepth=Qx,f.flip=SA,f.flow=_E,f.flowRight=mE,f.fromPairs=qx,f.functions=mC,f.functionsIn=yC,f.groupBy=iA,f.initial=tT,f.intersection=nT,f.intersectionBy=rT,f.intersectionWith=iT,f.invert=wC,f.invertBy=SC,f.invokeMap=sA,f.iteratee=Zs,f.keyBy=oA,f.keys=Be,f.keysIn=Ze,f.map=Si,f.mapKeys=TC,f.mapValues=AC,f.matches=yE,f.matchesProperty=bE,f.memoize=Ti,f.merge=CC,f.mergeWith=qf,f.method=wE,f.methodOf=SE,f.mixin=Js,f.negate=Ai,f.nthArg=TE,f.omit=EC,f.omitBy=OC,f.once=xA,f.orderBy=uA,f.over=AE,f.overArgs=TA,f.overEvery=CE,f.overSome=EE,f.partial=zs,f.partialRight=Gf,f.partition=lA,f.pick=RC,f.pickBy=eh,f.property=oh,f.propertyOf=OE,f.pull=uT,f.pullAll=Df,f.pullAllBy=lT,f.pullAllWith=cT,f.pullAt=fT,f.range=RE,f.rangeRight=LE,f.rearg=AA,f.reject=hA,f.remove=hT,f.rest=CA,f.reverse=Ws,f.sampleSize=pA,f.set=PC,f.setWith=MC,f.shuffle=gA,f.slice=dT,f.sortBy=mA,f.sortedUniq=bT,f.sortedUniqBy=wT,f.split=tE,f.spread=EA,f.tail=ST,f.take=xT,f.takeRight=TT,f.takeRightWhile=AT,f.takeWhile=CT,f.tap=UT,f.throttle=OA,f.thru=wi,f.toArray=Zf,f.toPairs=th,f.toPairsIn=nh,f.toPath=NE,f.toPlainObject=Vf,f.transform=DC,f.unary=RA,f.union=ET,f.unionBy=OT,f.unionWith=RT,f.uniq=LT,f.uniqBy=PT,f.uniqWith=MT,f.unset=IC,f.unzip=ks,f.unzipWith=If,f.update=NC,f.updateWith=$C,f.values=Wn,f.valuesIn=FC,f.without=DT,f.words=ah,f.wrap=LA,f.xor=IT,f.xorBy=NT,f.xorWith=$T,f.zip=FT,f.zipObject=BT,f.zipObjectDeep=WT,f.zipWith=kT,f.entries=th,f.entriesIn=nh,f.extend=Qf,f.extendWith=Oi,Js(f,f),f.add=FE,f.attempt=sh,f.camelCase=UC,f.capitalize=rh,f.ceil=BE,f.clamp=BC,f.clone=MA,f.cloneDeep=IA,f.cloneDeepWith=NA,f.cloneWith=DA,f.conformsTo=$A,f.deburr=ih,f.defaultTo=vE,f.divide=WE,f.endsWith=zC,f.eq=wt,f.escape=HC,f.escapeRegExp=GC,f.every=VT,f.find=qT,f.findIndex=Rf,f.findKey=hC,f.findLast=eA,f.findLastIndex=Lf,f.findLastKey=dC,f.floor=kE,f.forEach=$f,f.forEachRight=Ff,f.forIn=pC,f.forInRight=gC,f.forOwn=vC,f.forOwnRight=_C,f.get=js,f.gt=FA,f.gte=BA,f.has=bC,f.hasIn=Ks,f.head=Mf,f.identity=Je,f.includes=aA,f.indexOf=eT,f.inRange=WC,f.invoke=xC,f.isArguments=gn,f.isArray=ne,f.isArrayBuffer=WA,f.isArrayLike=Xe,f.isArrayLikeObject=Pe,f.isBoolean=kA,f.isBuffer=Qt,f.isDate=UA,f.isElement=zA,f.isEmpty=HA,f.isEqual=GA,f.isEqualWith=jA,f.isError=Hs,f.isFinite=KA,f.isFunction=kt,f.isInteger=jf,f.isLength=Ci,f.isMap=Kf,f.isMatch=YA,f.isMatchWith=XA,f.isNaN=ZA,f.isNative=JA,f.isNil=QA,f.isNull=VA,f.isNumber=Yf,f.isObject=Ae,f.isObjectLike=Oe,f.isPlainObject=mr,f.isRegExp=Gs,f.isSafeInteger=qA,f.isSet=Xf,f.isString=Ei,f.isSymbol=rt,f.isTypedArray=Bn,f.isUndefined=eC,f.isWeakMap=tC,f.isWeakSet=nC,f.join=aT,f.kebabCase=jC,f.last=pt,f.lastIndexOf=sT,f.lowerCase=KC,f.lowerFirst=YC,f.lt=rC,f.lte=iC,f.max=UE,f.maxBy=zE,f.mean=HE,f.meanBy=GE,f.min=jE,f.minBy=KE,f.stubArray=Qs,f.stubFalse=qs,f.stubObject=PE,f.stubString=ME,f.stubTrue=DE,f.multiply=YE,f.nth=oT,f.noConflict=xE,f.noop=Vs,f.now=xi,f.pad=XC,f.padEnd=ZC,f.padStart=JC,f.parseInt=VC,f.random=kC,f.reduce=cA,f.reduceRight=fA,f.repeat=QC,f.replace=qC,f.result=LC,f.round=XE,f.runInContext=m,f.sample=dA,f.size=vA,f.snakeCase=eE,f.some=_A,f.sortedIndex=pT,f.sortedIndexBy=gT,f.sortedIndexOf=vT,f.sortedLastIndex=_T,f.sortedLastIndexBy=mT,f.sortedLastIndexOf=yT,f.startCase=nE,f.startsWith=rE,f.subtract=ZE,f.sum=JE,f.sumBy=VE,f.template=iE,f.times=IE,f.toFinite=Ut,f.toInteger=re,f.toLength=Jf,f.toLower=aE,f.toNumber=gt,f.toSafeInteger=aC,f.toString=ve,f.toUpper=sE,f.trim=oE,f.trimEnd=uE,f.trimStart=lE,f.truncate=cE,f.unescape=fE,f.uniqueId=$E,f.upperCase=hE,f.upperFirst=Ys,f.each=$f,f.eachRight=Ff,f.first=Mf,Js(f,function(){var e={};return Et(f,function(t,n){me.call(f.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),f.VERSION=o,lt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){f[e].placeholder=f}),lt(["drop","take"],function(e,t){ce.prototype[e]=function(n){n=n===r?1:$e(re(n),0);var s=this.__filtered__&&!t?new ce(this):this.clone();return s.__filtered__?s.__takeCount__=ze(n,s.__takeCount__):s.__views__.push({size:ze(n,de),type:e+(s.__dir__<0?"Right":"")}),s},ce.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),lt(["filter","map","takeWhile"],function(e,t){var n=t+1,s=n==U||n==Q;ce.prototype[e]=function(l){var h=this.clone();return h.__iteratees__.push({iteratee:Y(l,3),type:n}),h.__filtered__=h.__filtered__||s,h}}),lt(["head","last"],function(e,t){var n="take"+(t?"Right":"");ce.prototype[e]=function(){return this[n](1).value()[0]}}),lt(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");ce.prototype[e]=function(){return this.__filtered__?new ce(this):this[n](1)}}),ce.prototype.compact=function(){return this.filter(Je)},ce.prototype.find=function(e){return this.filter(e).head()},ce.prototype.findLast=function(e){return this.reverse().find(e)},ce.prototype.invokeMap=oe(function(e,t){return typeof e=="function"?new ce(this):this.map(function(n){return hr(n,e,t)})}),ce.prototype.reject=function(e){return this.filter(Ai(Y(e)))},ce.prototype.slice=function(e,t){e=re(e);var n=this;return n.__filtered__&&(e>0||t<0)?new ce(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==r&&(t=re(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},ce.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ce.prototype.toArray=function(){return this.take(de)},Et(ce.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),s=/^(?:head|last)$/.test(t),l=f[s?"take"+(t=="last"?"Right":""):t],h=s||/^find/.test(t);!l||(f.prototype[t]=function(){var p=this.__wrapped__,_=s?[1]:arguments,b=p instanceof ce,R=_[0],L=b||ne(p),D=function(ue){var he=l.apply(f,jt([ue],_));return s&&B?he[0]:he};L&&n&&typeof R=="function"&&R.length!=1&&(b=L=!1);var B=this.__chain__,z=!!this.__actions__.length,Z=h&&!B,ie=b&&!z;if(!h&&L){p=ie?p:new ce(this);var J=e.apply(p,_);return J.__actions__.push({func:wi,args:[D],thisArg:r}),new ft(J,B)}return Z&&ie?e.apply(this,_):(J=this.thru(D),Z?s?J.value()[0]:J.value():J)})}),lt(["pop","push","shift","sort","splice","unshift"],function(e){var t=Yr[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",s=/^(?:pop|shift)$/.test(e);f.prototype[e]=function(){var l=arguments;if(s&&!this.__chain__){var h=this.value();return t.apply(ne(h)?h:[],l)}return this[n](function(p){return t.apply(ne(p)?p:[],l)})}}),Et(ce.prototype,function(e,t){var n=f[t];if(n){var s=n.name+"";me.call(Dn,s)||(Dn[s]=[]),Dn[s].push({name:t,func:n})}}),Dn[pi(r,N).name]=[{name:"wrapper",func:r}],ce.prototype.clone=fS,ce.prototype.reverse=hS,ce.prototype.value=dS,f.prototype.at=zT,f.prototype.chain=HT,f.prototype.commit=GT,f.prototype.next=jT,f.prototype.plant=YT,f.prototype.reverse=XT,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=ZT,f.prototype.first=f.prototype.head,ar&&(f.prototype[ar]=KT),f},Ln=Gw();on?((on.exports=Ln)._=Ln,Za._=Ln):We._=Ln}).call(xt)})(_a,_a.exports);function Iy(i){if(!i)return"00:00";const a=Math.trunc(i/3600);i-=a*3600;const r=Math.trunc(i/60);i-=r*60;const u=[a,r,i];return u[0]===0&&u.shift(),u.map(d=>_a.exports.padStart(d.toString(),2,"0")).join(":")}function ma(i){if(!i)return"";if(i<=9999)return i.toString();let a=(i/1e4).toFixed(1);return a=a.replace(/\.0$/,""),`${a}\u4E07`}function Ny({className:i,item:a,pvideo:r}){var pe;const o=O.useRef(null),u=fy(o.current),{elementW:c,elementH:d,elementX:g}=u;let y=0,v=0;c&&g&&!isNaN(g)&&!isNaN(c)&&(y=g/c,y<0&&(y=0),y>1&&(y=1),v=Math.floor((a.duration||0)*y));let w=O.useMemo(()=>{const se=(r==null?void 0:r.index)||[];let Ue=Fy(se,v);return Ue!==-1?Ue:v>se[se.length-1]?(Ue=Math.floor(se.length*y)-1,Ue<0&&(Ue=0),Ue):0},[r,v]);const{img_x_len:S,img_y_len:C,img_x_size:E,img_y_size:T}=r,I=C*S;w=w+1;const M=Math.floor(w/I),N=w-M*I,q=((pe=r.image)==null?void 0:pe[M])||"",X=Math.floor(N/S)+1,G=N-(X-1)*S,H=c*S,j=d*C;let fe=(X-1)*d,_e=(G-1)*c;return P("div",{ref:o,className:i,style:{backgroundColor:"black",backgroundImage:`url(${q})`,backgroundPosition:`-${_e}px -${fe}px`,backgroundSize:`${H}px ${j}px`},children:P($y,{progress:y})})}function $y({progress:i}){return P("div",{className:"track",style:{position:"absolute",bottom:0,left:0,backgroundColor:"#eee",width:"100%",height:2},children:P("div",{className:"bar",style:{backgroundColor:"#fa6a9d",height:"100%",width:`${i*100}%`}})})}function Fy(i,a){var g;let r=0,o=i.length-1,u=-1;for(;r<=o;){const y=Math.floor((r+o)/2),v=i[y];if(a===v)return y;v<a?(r=y+1,u=y):o=y-1}if(u===-1)return-1;const c=i[u],d=(g=i[u+1])!=null?g:0;return c<a&&a<d?u:-1}function By(){var a;const i=(a=document.cookie.match(/bili_jct=([0-9a-fA-F]{32})/))==null?void 0:a[1];if(!i)throw Lt("\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 i}const ya=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Iu=typeof AbortController=="function",Nu=Iu?AbortController:class{constructor(){this.signal=new $u}abort(){this.signal.dispatchEvent("abort")}},$u=Iu?AbortSignal:class{constructor(){this.aborted=!1,this._listeners=[]}dispatchEvent(a){if(a==="abort"){this.aborted=!0;const r={type:a,target:this};this.onabort(r),this._listeners.forEach(o=>o(r),this)}}onabort(){}addEventListener(a,r){a==="abort"&&this._listeners.push(r)}removeEventListener(a,r){a==="abort"&&(this._listeners=this._listeners.filter(o=>o!==r))}},ba=new Set,wa=(i,a)=>{const r=`LRU_CACHE_OPTION_${i}`;Fr(r)&&xa(r,`${i} option`,`options.${a}`,an)},Sa=(i,a)=>{const r=`LRU_CACHE_METHOD_${i}`;if(Fr(r)){const{prototype:o}=an,{get:u}=Object.getOwnPropertyDescriptor(o,i);xa(r,`${i} method`,`cache.${a}()`,u)}},Wy=(i,a)=>{const r=`LRU_CACHE_PROPERTY_${i}`;if(Fr(r)){const{prototype:o}=an,{get:u}=Object.getOwnPropertyDescriptor(o,i);xa(r,`${i} property`,`cache.${a}`,u)}},Fu=(...i)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...i):console.error(...i)},Fr=i=>!ba.has(i),xa=(i,a,r,o)=>{ba.add(i);const u=`The ${a} is deprecated. Please use ${r} instead.`;Fu(u,"DeprecationWarning",i,o)},rn=i=>i&&i===Math.floor(i)&&i>0&&isFinite(i),Bu=i=>rn(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Br:null:null;class Br extends Array{constructor(a){super(a),this.fill(0)}}class ky{constructor(a){if(a===0)return[];const r=Bu(a);this.heap=new r(a),this.length=0}push(a){this.heap[this.length++]=a}pop(){return this.heap[--this.length]}}class an{constructor(a={}){const{max:r=0,ttl:o,ttlResolution:u=1,ttlAutopurge:c,updateAgeOnGet:d,updateAgeOnHas:g,allowStale:y,dispose:v,disposeAfter:w,noDisposeOnSet:S,noUpdateTTL:C,maxSize:E=0,sizeCalculation:T,fetchMethod:I,noDeleteOnFetchRejection:M}=a,{length:N,maxAge:q,stale:X}=a instanceof an?{}:a;if(r!==0&&!rn(r))throw new TypeError("max option must be a nonnegative integer");const G=r?Bu(r):Array;if(!G)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=E,this.sizeCalculation=T||N,this.sizeCalculation){if(!this.maxSize)throw new TypeError("cannot set sizeCalculation without setting maxSize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=I||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new G(r),this.prev=new G(r),this.head=0,this.tail=0,this.free=new ky(r),this.initialFill=1,this.size=0,typeof v=="function"&&(this.dispose=v),typeof w=="function"?(this.disposeAfter=w,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!S,this.noUpdateTTL=!!C,this.noDeleteOnFetchRejection=!!M,this.maxSize!==0){if(!rn(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!y||!!X,this.updateAgeOnGet=!!d,this.updateAgeOnHas=!!g,this.ttlResolution=rn(u)||u===0?u:1,this.ttlAutopurge=!!c,this.ttl=o||q||0,this.ttl){if(!rn(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 H="LRU_CACHE_UNBOUNDED";Fr(H)&&(ba.add(H),Fu("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",H,an))}X&&wa("stale","allowStale"),q&&wa("maxAge","ttl"),N&&wa("length","sizeCalculation")}getRemainingTTL(a){return this.has(a,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new Br(this.max),this.starts=new Br(this.max),this.setItemTTL=(o,u)=>{if(this.starts[o]=u!==0?ya.now():0,this.ttls[o]=u,u!==0&&this.ttlAutopurge){const c=setTimeout(()=>{this.isStale(o)&&this.delete(this.keyList[o])},u+1);c.unref&&c.unref()}},this.updateItemAge=o=>{this.starts[o]=this.ttls[o]!==0?ya.now():0};let a=0;const r=()=>{const o=ya.now();if(this.ttlResolution>0){a=o;const u=setTimeout(()=>a=0,this.ttlResolution);u.unref&&u.unref()}return o};this.getRemainingTTL=o=>{const u=this.keyMap.get(o);return u===void 0?0:this.ttls[u]===0||this.starts[u]===0?1/0:this.starts[u]+this.ttls[u]-(a||r())},this.isStale=o=>this.ttls[o]!==0&&this.starts[o]!==0&&(a||r())-this.starts[o]>this.ttls[o]}updateItemAge(a){}setItemTTL(a,r){}isStale(a){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new Br(this.max),this.removeItemSize=a=>this.calculatedSize-=this.sizes[a],this.requireSize=(a,r,o,u)=>{if(!rn(o))if(u){if(typeof u!="function")throw new TypeError("sizeCalculation must be a function");if(o=u(r,a),!rn(o))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer)");return o},this.addItemSize=(a,r,o,u)=>{this.sizes[a]=u;const c=this.maxSize-this.sizes[a];for(;this.calculatedSize>c;)this.evict(!0);this.calculatedSize+=this.sizes[a]}}removeItemSize(a){}addItemSize(a,r,o,u){}requireSize(a,r,o,u){if(o||u)throw new TypeError("cannot set size without setting maxSize on cache")}*indexes({allowStale:a=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((a||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:a=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((a||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(a){return this.keyMap.get(this.keyList[a])===a}*entries(){for(const a of this.indexes())yield[this.keyList[a],this.valList[a]]}*rentries(){for(const a of this.rindexes())yield[this.keyList[a],this.valList[a]]}*keys(){for(const a of this.indexes())yield this.keyList[a]}*rkeys(){for(const a of this.rindexes())yield this.keyList[a]}*values(){for(const a of this.indexes())yield this.valList[a]}*rvalues(){for(const a of this.rindexes())yield this.valList[a]}[Symbol.iterator](){return this.entries()}find(a,r={}){for(const o of this.indexes())if(a(this.valList[o],this.keyList[o],this))return this.get(this.keyList[o],r)}forEach(a,r=this){for(const o of this.indexes())a.call(r,this.valList[o],this.keyList[o],this)}rforEach(a,r=this){for(const o of this.rindexes())a.call(r,this.valList[o],this.keyList[o],this)}get prune(){return Sa("prune","purgeStale"),this.purgeStale}purgeStale(){let a=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),a=!0);return a}dump(){const a=[];for(const r of this.indexes()){const o=this.keyList[r],c={value:this.valList[r]};this.ttls&&(c.ttl=this.ttls[r]),this.sizes&&(c.size=this.sizes[r]),a.unshift([o,c])}return a}load(a){this.clear();for(const[r,o]of a)this.set(r,o.value,o)}dispose(a,r,o){}set(a,r,{ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:d=this.sizeCalculation,noUpdateTTL:g=this.noUpdateTTL}={}){c=this.requireSize(a,r,c,d);let y=this.size===0?void 0:this.keyMap.get(a);if(y===void 0)y=this.newIndex(),this.keyList[y]=a,this.valList[y]=r,this.keyMap.set(a,y),this.next[this.tail]=y,this.prev[y]=this.tail,this.tail=y,this.size++,this.addItemSize(y,r,a,c),g=!1;else{const v=this.valList[y];r!==v&&(this.isBackgroundFetch(v)?v.__abortController.abort():u||(this.dispose(v,a,"set"),this.disposeAfter&&this.disposed.push([v,a,"set"])),this.removeItemSize(y),this.valList[y]=r,this.addItemSize(y,r,a,c)),this.moveToTail(y)}if(o!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),g||this.setItemTTL(y,o),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 a=this.valList[this.head];return this.evict(!0),a}}evict(a){const r=this.head,o=this.keyList[r],u=this.valList[r];return this.isBackgroundFetch(u)?u.__abortController.abort():(this.dispose(u,o,"evict"),this.disposeAfter&&this.disposed.push([u,o,"evict"])),this.removeItemSize(r),a&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(o),this.size--,r}has(a,{updateAgeOnHas:r=this.updateAgeOnHas}={}){const o=this.keyMap.get(a);return o!==void 0&&!this.isStale(o)?(r&&this.updateItemAge(o),!0):!1}peek(a,{allowStale:r=this.allowStale}={}){const o=this.keyMap.get(a);if(o!==void 0&&(r||!this.isStale(o)))return this.valList[o]}backgroundFetch(a,r,o){const u=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(u))return u;const c=new Nu,d={signal:c.signal,options:o},g=S=>(c.signal.aborted||this.set(a,S,d.options),S),y=S=>{if(this.valList[r]===w&&(!o.noDeleteOnFetchRejection||w.__staleWhileFetching===void 0?this.delete(a):this.valList[r]=w.__staleWhileFetching),w.__returned===w)throw S},v=S=>S(this.fetchMethod(a,u,d)),w=new Promise(v).then(g,y);return w.__abortController=c,w.__staleWhileFetching=u,w.__returned=null,r===void 0?(this.set(a,w,d.options),r=this.keyMap.get(a)):this.valList[r]=w,w}isBackgroundFetch(a){return a&&typeof a=="object"&&typeof a.then=="function"&&Object.prototype.hasOwnProperty.call(a,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(a,"__returned")&&(a.__returned===a||a.__returned===null)}async fetch(a,{allowStale:r=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet,ttl:u=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:d=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:y=this.noUpdateTTL,noDeleteOnFetchRejection:v=this.noDeleteOnFetchRejection}={}){if(!this.fetchMethod)return this.get(a,{allowStale:r,updateAgeOnGet:o});const w={allowStale:r,updateAgeOnGet:o,ttl:u,noDisposeOnSet:c,size:d,sizeCalculation:g,noUpdateTTL:y,noDeleteOnFetchRejection:v};let S=this.keyMap.get(a);if(S===void 0){const C=this.backgroundFetch(a,S,w);return C.__returned=C}else{const C=this.valList[S];if(this.isBackgroundFetch(C))return r&&C.__staleWhileFetching!==void 0?C.__staleWhileFetching:C.__returned=C;if(!this.isStale(S))return this.moveToTail(S),o&&this.updateItemAge(S),C;const E=this.backgroundFetch(a,S,w);return r&&E.__staleWhileFetching!==void 0?E.__staleWhileFetching:E.__returned=E}}get(a,{allowStale:r=this.allowStale,updateAgeOnGet:o=this.updateAgeOnGet}={}){const u=this.keyMap.get(a);if(u!==void 0){const c=this.valList[u],d=this.isBackgroundFetch(c);return this.isStale(u)?d?r?c.__staleWhileFetching:void 0:(this.delete(a),r?c:void 0):d?void 0:(this.moveToTail(u),o&&this.updateItemAge(u),c)}}connect(a,r){this.prev[r]=a,this.next[a]=r}moveToTail(a){a!==this.tail&&(a===this.head?this.head=this.next[a]:this.connect(this.prev[a],this.next[a]),this.connect(this.tail,a),this.tail=a)}get del(){return Sa("del","delete"),this.delete}delete(a){let r=!1;if(this.size!==0){const o=this.keyMap.get(a);if(o!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(o);const u=this.valList[o];this.isBackgroundFetch(u)?u.__abortController.abort():(this.dispose(u,a,"delete"),this.disposeAfter&&this.disposed.push([u,a,"delete"])),this.keyMap.delete(a),this.keyList[o]=null,this.valList[o]=null,o===this.tail?this.tail=this.prev[o]:o===this.head?this.head=this.next[o]:(this.next[this.prev[o]]=this.next[o],this.prev[this.next[o]]=this.prev[o]),this.size--,this.free.push(o)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const a of this.rindexes({allowStale:!0})){const r=this.valList[a];if(this.isBackgroundFetch(r))r.__abortController.abort();else{const o=this.keyList[a];this.dispose(r,o,"delete"),this.disposeAfter&&this.disposed.push([r,o,"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 Sa("reset","clear"),this.clear}get length(){return Wy("length","size"),this.size}static get AbortController(){return Nu}static get AbortSignal(){return $u}}var Uy=an;async function zy(i){return(await da.get("/pvideo",{params:{aid:i}})).data.data}async function Hy(i){return[]}const Ta=new Uy({max:200});async function Gy(i){if(Ta.has(i))return Ta.get(i);const[a,r]=await Promise.all([zy(i),Hy()]);return Ta.set(i,{pvideoData:a,dmData:r}),{pvideoData:a,dmData:r}}function Wu(i){return async function(r){const o=new FormData;o.append("aid",r),o.append("csrf",By());const c=(await da.post("/x/v2/history/toview/"+i,o,{withCredentials:!0})).data;return(c==null?void 0:c.code)===0&&(c==null?void 0:c.message)==="0"}}const jy=Wu("add"),Ky=Wu("del"),ku=i=>{const a={dislike:"/x/feed/dislike",cancel:"/x/feed/dislike/cancel"}[i];return async function(r,o){var g;const c=(await pa.get(bu+a,{params:{goto:r.goto,id:r.param,mid:r.mid,rid:r.tid,tag_id:(g=r.tag)==null?void 0:g.tag_id,reason_id:o,build:"1",mobi_app:"android",idx:(Date.now()/1e3).toFixed(0)}})).data;return(c==null?void 0:c.code)===0&&(c==null?void 0:c.message)==="0"}},Yy=ku("dislike"),Xy=ku("cancel"),Uu="_bili-video-card_14zjz_1",zu="_image-wrapper_14zjz_4",Hu="_preview-card-wrapper_14zjz_8",Gu="_watch-later_14zjz_21",ju="_badge_14zjz_24",Ku="_recommend-reason_14zjz_32",Yu="_bangumi-desc_14zjz_47",Xu="_btn-dislike_14zjz_50",Zu="_btn-dislike-icon_14zjz_65",Ju="_btn-dislike-tip_14zjz_72",Vu="_disliked-wrapper_14zjz_87",Qu="_dislike-content-cover_14zjz_101",qu="_dislike-content-cover-inner_14zjz_107",Zy="_dislike-icon_14zjz_118",el="_dislike-reason_14zjz_121",tl="_dislike-desc_14zjz_125",nl="_dislike-content-action_14zjz_129";var aO={biliVideoCard:Uu,imageWrapper:zu,previewCardWrapper:Hu,watchLater:Gu,badge:ju,recommendReason:Ku,bangumiDesc:Yu,btnDislike:Xu,btnDislikeIcon:Zu,btnDislikeTip:Ju,dislikedWrapper:Vu,dislikeContentCover:Qu,dislikeContentCoverInner:qu,dislikeIcon:Zy,dislikeReason:el,dislikeDesc:tl,dislikeContentAction:nl};function Jy(i){const a=br({data:Array.from(i||[]),has(r){return this.data.some(o=>o[0]===r)},set(r,o){const u=this.data.find(c=>c[0]===r);return u?u[1]=o:this.data.push([r,o]),this},get(r){var o;return(o=this.data.find(u=>u[0]===r))==null?void 0:o[1]},delete(r){const o=this.data.findIndex(u=>u[0]===r);return o===-1?!1:(this.data.splice(o,1),!0)},clear(){this.data.splice(0)},get size(){return this.data.length},toJSON(){return{}},forEach(r){this.data.forEach(o=>{r(o[1],o[0],this)})},keys(){return this.data.map(r=>r[0]).values()},values(){return this.data.map(r=>r[1]).values()},entries(){return new Map(this.data).entries()},get[Symbol.toStringTag](){return"Map"},[Symbol.iterator](){return this.entries()}});return Object.defineProperties(a,{data:{enumerable:!1},size:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(a),a}const rl="_modal-mask_vh629_1",il="_modal_vh629_1",al="_modal-header_vh629_23",sl="_modal-title_vh629_30",ol="_title-desc_vh629_35",ul="_btn-close_vh629_39",ll="_modal-body_vh629_57",cl="_reason-list_vh629_62",fl="_reason_vh629_62";var sO={modalMask:rl,modal:il,modalHeader:al,modalTitle:sl,titleDesc:ol,btnClose:ul,modalBody:ll,reasonList:cl,reason:fl};const Aa=Jy();function Vy(){return Wi(Aa)}function Qy(i){const a=Vy();if(!!i)return a.get(i)}function qy({show:i,onHide:a,item:r}){const[o,u]=O.useState(!1),c=Le(async(g,y)=>{if(!r)return;let v=!1,w=null;try{u(!0),v=await Yy(r,g)}catch(S){w=S}finally{u(!1)}if(w)return console.error(w.stack||w),Su();v?Lt("\u5DF2\u6807\u8BB0\u4E0D\u60F3\u770B"):xu(),v&&(Aa.set(r.param,{id:g,name:y}),a())}),d=O.useMemo(()=>{var g;return[...(g=r==null?void 0:r.dislike_reasons)!=null?g:[],{reason_id:12,reason_name:"\u6B64\u7C7B\u5185\u5BB9\u8FC7\u591A"},{reason_id:13,reason_name:"\u63A8\u8350\u8FC7"}]},[r]);return ae(Du,{show:i,onHide:a,clsModalMask:rl,clsModal:il,hideWhenMaskOnClick:!0,children:[ae("div",{className:al,children:[ae("div",{className:sl,children:["\u6211\u4E0D\u60F3\u770B",P("span",{className:ol,children:"(\u9009\u62E9\u540E\u5C06\u51CF\u5C11\u76F8\u4F3C\u5185\u5BB9\u63A8\u8350)"})]}),P("div",{className:"space",style:{flex:1}}),ae("button",{className:`primary-btn roll-btn ${ul}`,onClick:a,children:[P("svg",{style:{transform:"rotate(0deg)"},children:P("use",{xlinkHref:"#widget-close"})}),P("span",{children:"\u5173\u95ED"})]})]}),P("div",{className:ll,children:P("div",{className:cl,children:d.map(g=>P("button",{className:fl,"data-id":g.reason_id,onClick:()=>c(g.reason_id,g.reason_name),disabled:o,children:g.reason_name},g.reason_id))})})]})}let hl={show:!1,onHide:dl,item:null};function dl(){pl({show:!1,item:null})}function pl(i){Object.assign(hl,i),eb().render(P(qy,kn(vn({},hl),{onHide:dl})))}let Ca;function eb(){if(!Ca){const i=document.createElement("div");i.classList.add("show-dislike-container"),document.body.appendChild(i),Ca=Hi(i)}return Ca}function tb(i){pl({show:!0,item:i})}const nb=Bo().format("YYYY"),rb=i=>{if(!i)return"";const a=Bo.unix(i);return a.format("YYYY")===nb?a.format("M-D"):a.format("YY-M-D")},ib=i=>i.replace(/^http:\/\//,"https://"),Ea=O.memo(function({style:a,className:r,item:o,loading:u}){u=u!=null?u:!Boolean(o);const c=ae("div",{className:Ve("bili-video-card__skeleton",{hide:!u}),children:[P("div",{className:"bili-video-card__skeleton--cover"}),P("div",{className:"bili-video-card__skeleton--info",children:ae("div",{className:"bili-video-card__skeleton--right",children:[P("p",{className:"bili-video-card__skeleton--text"}),P("p",{className:"bili-video-card__skeleton--text short"}),P("p",{className:"bili-video-card__skeleton--light"})]})})]}),d=Qy(o==null?void 0:o.param);return ae("div",{style:a,className:Ve("bili-video-card",Uu,r),"data-report":"partition_recommend.content",children:[c,!u&&o&&(d?P(ab,{item:o,dislikedReason:d}):P(sb,{item:o}))]})}),ab=O.memo(function({dislikedReason:a,item:r}){const o=Le(async()=>{if(!(a!=null&&a.id))return;let u=!1,c=null;try{u=await Xy(r,a.id)}catch(d){c=d}if(c)return console.error(c.stack||c),Su();u?Lt("\u5DF2\u64A4\u9500"):xu(),u&&Aa.delete(r.param)});return ae("div",{className:Ve(Vu),children:[P("div",{className:Qu,children:ae("div",{className:qu,children:[P("div",{className:"icon"}),P("div",{className:el,children:a==null?void 0:a.name}),P("div",{className:tl,children:"\u5C06\u51CF\u5C11\u6B64\u7C7B\u5185\u5BB9\u63A8\u8350"})]})}),P("div",{className:nl,children:P("button",{onClick:o,children:"\u64A4\u9500"})})]})}),sb=O.memo(function({item:a}){const r=O.useRef(null),o=ca(r),u=O.useRef(null),c=ca(u),[d,g]=O.useState(!1),{accessKey:y}=ki(),v=Boolean(y),{param:w,title:S,cover:C,goto:E,play:T,like:I,coin:M,desc:N,danmaku:q,ctime:X,duration:G,name:H,face:j,mid:fe,favorite:_e,badge:pe,rcmd_reason:se}=a,Ue=O.useMemo(()=>rb(X),[X]),sn=O.useMemo(()=>ib(C),[C]),[V,U]=O.useState(null),[W,Q]=O.useState(!1),F=Le(async()=>{if(!V&&!W)try{Q(!0);const Ie=await Gy(w);U(Ie)}finally{Q(!1)}});O.useEffect(()=>{o&&F()},[o]);let K=!1;const ee=Le(async Ie=>{if(Ie.preventDefault(),K)return;K=!0;const Ee=d?Ky:jy;let qe=!1;try{qe=await Ee(w)}finally{K=!1}qe&&g(Ct=>!Ct)}),le=O.useRef(null),de=ca(le),be=Le(Ie=>{Ie.stopPropagation(),Ie.preventDefault(),tb(a)}),Ce=a.goto==="av"?`/video/av${w}`:a.uri,st=O.useMemo(()=>Iy(G),[G]),Fe=O.useMemo(()=>ma(T),[T]),ot=O.useMemo(()=>ma(I),[I]),Pt=O.useMemo(()=>ma(_e),[_e]);return ae("div",{className:"bili-video-card__wrap __scale-wrap",children:[P("a",{href:Ce,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:ae("div",{className:"bili-video-card__image __scale-player-wrap",ref:r,children:[ae("div",{className:Ve("bili-video-card__image--wrap",zu),children:[ae("picture",{className:"v-img bili-video-card__cover",children:[P("source",{srcSet:`${sn}@672w_378h_1c.webp`,type:"image/webp"}),P("img",{src:`${sn}@672w_378h_1c.webp`,alt:S,loading:"lazy"})]}),o&&(V==null?void 0:V.pvideoData)&&P(Ny,{className:Hu,item:a,pvideo:V==null?void 0:V.pvideoData}),ae("div",{className:`bili-watch-later ${Gu}`,style:{display:o?"flex":"none"},ref:u,onClick:ee,children:[P("svg",{className:"bili-watch-later__icon",children:P("use",{xlinkHref:d?"#widget-watch-save":"#widget-watch-later"})}),P("span",{className:"bili-watch-later__tip",style:{display:c?"block":"none"},children:d?"\u79FB\u9664":"\u7A0D\u540E\u518D\u770B"})]}),v&&ae("div",{ref:le,className:Xu,onClick:be,style:{display:o?"flex":"none"},children:[P("svg",{className:Zu,children:P("use",{xlinkHref:"#widget-close"})}),P("span",{className:Ju,style:{display:de?"block":"none"},children:"\u6211\u4E0D\u60F3\u770B"})]})]}),P("div",{className:"bili-video-card__mask",children:ae("div",{className:"bili-video-card__stats",children:[ae("div",{className:"bili-video-card__stats--left",children:[ae("span",{className:"bili-video-card__stats--item",children:[P("svg",{className:"bili-video-card__stats--icon",children:P("use",{xlinkHref:"#widget-play-count"})}),P("span",{className:"bili-video-card__stats--text",children:Fe})]}),P("span",{className:"bili-video-card__stats--item",children:E==="av"?ae($r,{children:[P("svg",{className:"bili-video-card__stats--icon",children:P("use",{xlinkHref:"#widget-agree"})}),P("span",{className:"bili-video-card__stats--text",children:ot})]}):ae($r,{children:[P("svg",{className:"bili-video-card__stats--icon",children:P("use",{xlinkHref:"#widget-agree"})}),P("span",{className:"bili-video-card__stats--text",children:Pt})]})})]}),P("span",{className:"bili-video-card__stats__duration",children:st})]})})]})}),P("div",{className:"bili-video-card__info __scale-disable",children:ae("div",{className:"bili-video-card__info--right",children:[P("a",{href:Ce,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:P("h3",{className:"bili-video-card__info--tit",title:S,children:S})}),ae("p",{className:"bili-video-card__info--bottom",children:[E==="av"&&ae("a",{className:"bili-video-card__info--owner",href:`//space.bilibili.com/${fe}`,target:"_blank","data-mod":"partition_recommend","data-idx":"content","data-ext":"click",children:[se!=null&&se.content?P("span",{className:Ku,children:se.content}):P("svg",{className:"bili-video-card__info--owner__up",children:P("use",{xlinkHref:"#widget-up"})}),P("span",{className:"bili-video-card__info--author",children:H}),Ue&&ae("span",{className:"bili-video-card__info--date",children:["\xB7 ",Ue]})]}),E==="bangumi"&&ae("a",{className:"bili-video-card__info--owner",href:Ce,target:"_blank",children:[P("span",{className:ju,children:pe}),P("span",{className:Yu,children:N})]})]})]})})]})}),gl="_modal-mask_1urmj_1",vl="_narrow-mode_1urmj_13",_l="_modal_1urmj_1",ml="_modal-header_1urmj_38",yl="_modal-title_1urmj_46",bl="_btn-refresh_1urmj_51",wl="_btn-close_1urmj_52",Wr="_modal-body_1urmj_68",ob="_list_1urmj_74",Oa="_card_1urmj_77",Ra="_active_1urmj_85",Sl="_video-card-list_1urmj_90",La="_video-card-body_1urmj_1",xl="_loader_1urmj_99",Pa="_checkbox_1urmj_104";var oO={modalMask:gl,narrowMode:vl,modal:_l,modalHeader:ml,modalTitle:yl,btnRefresh:bl,btnClose:wl,modalBody:Wr,list:ob,card:Oa,active:Ra,videoCardList:Sl,videoCardBody:La,loader:xl,checkbox:Pa};function ub({show:i,refresh:a,minIndex:r=0,maxIndex:o}){const[u,c]=O.useState(null),d=Le(()=>{if(u===null)return!1;const I=document.querySelector(`${Ma}.${Ra}`),M=document.querySelector(`.${Wr}`);if(!I||!M)return!1;const N=M.getBoundingClientRect(),q=I.getBoundingClientRect();return!(q.top-N.top<-(N.height+q.height)||q.top-N.top>N.height*2+q.height)}),g=Le((I,M)=>{if(!i)return;M==null||M.preventDefault();let N=d()?u+I:lb();N<r||N>o||(c(N),cb(N))}),y=O.useCallback(I=>{g(-1,I)},[]),v=O.useCallback(I=>{g(1,I)},[]);nn("leftarrow",y),nn("rightarrow",v);const w=O.useCallback(I=>{g(-El(),I)},[]),S=O.useCallback(I=>{g(El(),I)},[]);nn("uparrow",w),nn("downarrow",S);const C=Le(()=>{!u||!i||fb(u)}),E=Le(()=>{!i||c(null)});nn("enter",C),nn("esc",E);const T=Le(()=>{!i||a()});return nn("r",T,{exactMatch:!0}),{activeIndex:u,clearActiveIndex:E}}function lb(){const i=document.querySelector(`.${Wr}`);if(!i)return 0;const a=i.getBoundingClientRect(),r=Tl();for(let o=0;o<r.length;o++)if(r[o].getBoundingClientRect().top>=a.top)return o;return 0}const Ma=`#${La} .${Oa}`;function Tl(){return[...document.querySelectorAll(Ma)]}function Al(i){return Tl()[i]}function cb(i){var r;const a=Al(i);(r=a==null?void 0:a.scrollIntoViewIfNeeded)==null||r.call(a,!1)}function fb(i){const a=Al(i);if(!a)return;const r=a.querySelector(".bili-video-card__wrap > a");r==null||r.click()}const Cl=new Map;function El(){if(qt.useNarrowMode)return 2;let i=Cl.get(window.innerWidth);if(i)return i;const a=document.querySelector(Ma);if(!a)throw new Error("expect found first card");i=1;let r=a.getBoundingClientRect().top,o=a.nextElementSibling;for(;o&&o.getBoundingClientRect().top===r;)i++,o=o.nextElementSibling;return Cl.set(window.innerWidth,i),i}function Ol(){return O.useMemo(()=>crypto.randomUUID(),[])}const hb=O.memo(function({show:a,onHide:r}){const[o,u]=O.useState([]),[c,d]=O.useState(!1),g=O.useRef(null),y=Le(async()=>{g.current&&(g.current.scrollTop=0),await yo(50);try{d(!0),M(),u(await ga(2)),M()}finally{d(!1)}}),v=Le(async X=>{const G=await ga(2);u(H=>[...H,...G])}),{useNarrowMode:w,initialShowMore:S}=ki(),C=O.useCallback(X=>{const G=X.target.checked;wr({useNarrowMode:G})},[]),E=O.useCallback(X=>{const G=X.target.checked;wr({initialShowMore:G}),G&&Lt("\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")},[]),T=O.useMemo(()=>({[vl]:w}),[w]),{activeIndex:I,clearActiveIndex:M}=ub({show:a,refresh:y,maxIndex:o.length-1}),N=Ol(),q=Ol();return ae(Du,{show:a,onHide:r,clsModalMask:Ve(gl,T),clsModal:Ve(_l,T),children:[ae("div",{className:ml,children:[P("div",{className:yl,children:"\u63A8\u8350"}),P("div",{className:"space",style:{flex:1}}),ae(Eu,{children:[P("input",{type:"checkbox",className:Pa,id:q,checked:S,onChange:E}),P("label",{htmlFor:q,children:"\u81EA\u52A8\u67E5\u770B\u66F4\u591A"}),P("input",{type:"checkbox",className:Pa,id:N,checked:w,onChange:C}),P("label",{htmlFor:N,children:"\u542F\u7528\u7A84\u5C4F\u6A21\u5F0F"})]}),ae("button",{className:`primary-btn roll-btn ${bl}`,onClick:y,children:[P("svg",{children:P("use",{xlinkHref:"#widget-roll"})}),P("span",{children:"\u6362\u4E00\u6362"})]}),ae("button",{className:`primary-btn roll-btn ${wl}`,onClick:r,children:[P("svg",{children:P("use",{xlinkHref:"#widget-close"})}),P("span",{children:"\u5173\u95ED"})]})]}),P("div",{className:Wr,ref:g,children:P(va,{pageStart:0,loadMore:v,hasMore:!0,useWindow:!1,threshold:360,style:{minHeight:"100%"},loader:P("div",{className:xl,children:"\u52A0\u8F7D\u4E2D..."},0),children:P("div",{className:`video-card-list is-full ${Sl}`,children:P("div",{id:La,className:Ve("video-card-body",T),children:o.map((X,G)=>P(Ea,{loading:c,item:X,className:Ve(Oa,{[Ra]:G===I})},X.uniqId))})})})})]})}),Rl="_grid_p5dvw_1",Ll="_video-card-list_p5dvw_5";var cO={grid:Rl,videoCardList:Ll,expandBtn:"_expand-btn_p5dvw_19",expanded:"_expanded_p5dvw_30"};function db(){const i=O.useRef(null),{accessKey:a}=ki(),r=Le(async(T=!1)=>{var M;await yy()&&((M=i.current)==null||M.set(!1))}),o=by,u=Le(()=>{const T="https://github.com/indefined/UserScripts/tree/master/bilibiliHome#%E6%8E%88%E6%9D%83%E8%AF%B4%E6%98%8E";window.open(T,"_blank")}),c=O.useMemo(()=>new Array(20).fill(0).map(()=>crypto.randomUUID()),[]),{data:d,loading:g,error:y,refresh:v}=Wp(py);y&&console.error(y.stack||y);const[w,S]=O.useState(()=>qt.initialShowMore),C=O.useCallback(()=>{S(!0)},[]),E=O.useCallback(()=>{S(!1)},[]);return P("section",{className:Ve("bili-grid no-margin",Rl),"data-area":"\u63A8\u8350",children:ae("div",{className:`video-card-list is-full ${Ll}`,children:[ae("div",{className:"area-header",children:[ae("div",{className:"left",children:[P("a",{id:"\u5F71\u89C6",className:"the-world area-anchor","data-id":"25"}),P("svg",{className:"icon",children:P("use",{xlinkHref:"#channel-cinephile"})}),P("a",{className:"title",href:"#",children:P("span",{children:"\u63A8\u8350"})})]}),ae("div",{className:"right",children:[a?ae(Eu,{ref:i,children:[P("button",{className:"primary-btn roll-btn",onClick:u,children:P("span",{children:"access_key \u8BF4\u660E"})}),P("button",{className:"primary-btn roll-btn",onClick:()=>r(!0),children:P("span",{children:"\u91CD\u65B0\u83B7\u53D6 access_key"})}),P("button",{className:"primary-btn roll-btn",onClick:o,children:P("span",{children:"\u5220\u9664 access_key"})})]}):ae($r,{children:[P("button",{className:"primary-btn roll-btn",onClick:u,children:P("span",{children:"access_key \u8BF4\u660E"})}),P("button",{className:"primary-btn roll-btn",onClick:r,children:P("span",{children:"\u83B7\u53D6 access_key"})})]}),ae("button",{className:"primary-btn roll-btn",onClick:v,children:[P("svg",{style:{transform:"rotate(0deg)"},children:P("use",{xlinkHref:"#widget-roll"})}),P("span",{children:"\u6362\u4E00\u6362"})]}),ae("button",{className:"primary-btn see-more",onClick:C,children:[P("span",{children:"\u67E5\u770B\u66F4\u591A"}),P("svg",{children:P("use",{xlinkHref:"#widget-arrow"})})]})]})]}),P(hb,{show:w,onHide:E}),P("div",{className:"video-card-body more-class1 more-class2",children:g||y?c.map(T=>P(Ea,{},T)):d.map(T=>P(Ea,{item:T},T.uniqId))})]})})}(function(){var a;if(location.href.startsWith("https://www.mcbbs.net/template/mcbbs/image/special_photo_bg.png?"))return window.stop(),(a=window.top)==null?void 0:a.postMessage(location.href,"https://www.bilibili.com");if(location.pathname==="/")return pb()})();async function pb(){const i=Date.now(),a=10*1e3,r=()=>zn.default(".bili-layout > section.bili-grid").length>0;for(;!r()&&Date.now()-i<a;)await yo(100);if(!r()){console.error("[bilibili-app-recommend]: init fail");return}const o=zn.default(".bili-layout > section.bili-grid").eq(0),u=zn.default("<section></section>");u.insertAfter(o);const c=u[0];Hi(c).render(P(db,{}))}})(React,$,ReactDOM,axios,axiosGmxhrAdapter);