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