!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["feeds/extend-live"]=t():e["feeds/extend-live"]=t()}(globalThis,(()=>(()=>{var e,t,n={274:(e,t,n)=>{var i=n(218)((function(e){return e[1]}));i.push([e.id,".be-live-list {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 12px;\n padding: 12px 16px;\n border-radius: 4px;\n font-size: 12px;\n color: #000;\n background-color: #fff;\n}\nbody.dark .be-live-list {\n background-color: #444;\n color: #eee;\n}\n.be-live-list-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.be-live-list-title {\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 14px;\n}\n.be-live-list-count {\n opacity: 0.5;\n font-size: 12px;\n}\n.be-live-list-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n.be-live-list-refresh {\n cursor: pointer;\n padding: 2px;\n}\n.be-live-list-refresh .be-icon {\n opacity: 0.5;\n transition: 0.35s ease-out;\n}\n.be-live-list-refresh:hover .be-icon {\n transform: rotate(360deg);\n opacity: 1;\n color: var(--theme-color);\n}\n.be-live-list-more {\n opacity: 0.5;\n padding: 2px;\n cursor: pointer;\n display: flex;\n align-items: center;\n}\n.be-live-list-more:hover {\n opacity: 1;\n color: var(--theme-color);\n}\n.be-live-list-search {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.be-live-list-search .be-icon {\n opacity: 0.6;\n}\n.be-live-list-search .be-textbox {\n flex-grow: 1;\n}\n.be-live-list-content {\n overflow: auto;\n scrollbar-width: none !important;\n overscroll-behavior: contain;\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 8px;\n max-height: calc(100vh - 358px);\n}\n.be-live-list-content::-webkit-scrollbar {\n height: 0 !important;\n width: 0 !important;\n}\nbody.enable-feeds-filter .be-live-list-content {\n max-height: calc(100vh - 414px);\n}\nbody.feeds-filter-side-block-profile .be-live-list-content {\n max-height: calc(100vh - 218px);\n}\n.be-live-list-item {\n display: flex;\n align-items: center;\n gap: 8px;\n cursor: pointer;\n}\n.be-live-list-item-avatar {\n overflow: hidden;\n border-radius: 50%;\n display: flex;\n border: 1px solid rgba(136, 136, 136, 0.2666666667);\n}\n.be-live-list-item-info {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 2px;\n flex-grow: 1;\n width: 0;\n}\n.be-live-list-item-title, .be-live-list-item-user {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.be-live-list-item-title {\n font-size: 14px;\n transition: 0.2s ease-out;\n}\n.be-live-list-item-user {\n opacity: 0.6;\n}\n.be-live-list-item:hover .be-live-list-item-title {\n color: var(--theme-color);\n}",""]),e.exports=i},735:(e,t,n)=>{var i=n(218)((function(e){return e[1]}));i.push([e.id,".live-up-list,\n.bili-dyn-home--member .bili-dyn-live-users {\n display: none !important;\n}",""]),e.exports=i},218:e=>{"use strict"; // eslint-disable-next-line func-names e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")}, // eslint-disable-next-line func-names t.i=function(e,n,i){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var o={};if(i)for(var r=0;r{"use strict";n.r(t),n.d(t,{default:()=>f});var i=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"be-live-list"},[t("div",{staticClass:"be-live-list-header"},[t("div",{staticClass:"be-live-list-title"},[e._v("\n 正在直播\n "),t("div",{staticClass:"be-live-list-count"},[e._v("("+e._s(e.items.length)+")")])]),e._v(" "),t("div",{staticClass:"be-live-list-actions"},[e.loaded?t("div",{staticClass:"be-live-list-refresh",attrs:{title:"刷新"},on:{click:e.refresh}},[t("VIcon",{attrs:{icon:"mdi-refresh",size:16}})],1):e._e(),e._v(" "),t("a",{staticClass:"be-live-list-more",attrs:{target:"_blank",href:"https://link.bilibili.com/p/center/index#/user-center/follow/1"}},[e._v("\n 更多\n "),t("VIcon",{attrs:{icon:"right-arrow",size:14}})],1)])]),e._v(" "),t("div",{staticClass:"be-live-list-search"},[t("VIcon",{attrs:{icon:"search",size:18}}),e._v(" "),t("TextBox",{attrs:{placeholder:"搜索"},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}})],1),e._v(" "),t("div",{staticClass:"be-live-list-content"},[e.loaded?e._e():t("VLoading"),e._v(" "),e.loaded&&0===e.filteredItems.length?t("VEmpty"):e._e(),e._v(" "),e._l(e.filteredItems,(function(n){return t("a",{key:n.roomid,staticClass:"be-live-list-item",attrs:{target:"_blank",href:n.link}},[t("div",{staticClass:"be-live-list-item-avatar"},[t("DpiImage",{attrs:{src:n.face,alt:n.title,size:36}})],1),e._v(" "),t("div",{staticClass:"be-live-list-item-info"},[t("div",{staticClass:"be-live-list-item-title",attrs:{title:n.title}},[e._v("\n "+e._s(e.decodeTitle(n.title))+"\n ")]),e._v(" "),t("div",{staticClass:"be-live-list-item-user",attrs:{title:n.uname}},[e._v("\n "+e._s(n.uname)+"\n ")])])])}))],2)])};i._withStripped=!0;const o=coreApis.ui,r=coreApis.ajax,s=Vue.extend({components:{VIcon:o.VIcon,TextBox:o.TextBox,DpiImage:o.DpiImage,VEmpty:o.VEmpty,VLoading:o.VLoading},data:()=>({items:[],loaded:!1,keyword:""}),computed:{filteredItems(){return this.keyword?this.items.filter((e=>{const t=t=>e[t].toString().toLowerCase().includes(this.keyword.toLowerCase());return t("title")||t("uname")||t("roomid")||t("uid")})):this.items}},created(){this.refresh()},methods:{decodeTitle:e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},async refresh(){try{this.items=[],this.loaded=!1;const[,e]=(0,r.responsiveGetPages)({api:e=>(0,r.getJsonWithCredentials)(`https://api.live.bilibili.com/xlive/web-ucenter/v1/xfetter/GetWebList?page=${e}`),getList:e=>lodash.get(e,"data.list",[]).map((e=>{const{face:t,uname:n,title:i,room_id:o,cover_from_user:r,online:s,uid:a,link:l}=e;return{cover:t,face:t,uname:n,title:i,roomid:o,pic:r,online:s,uid:a,link:l}})),getTotal:e=>lodash.get(e,"data.count",0)}),[t,n]=await Promise.all([e,this.fetchRecommendItems()]);this.items=this.sortByRecommend(t,n)}finally{this.loaded=!0}},fetchRecommendItems:async()=>(await(0,r.getJsonWithCredentials)("https://api.bilibili.com/x/polymer/web-dynamic/v1/portal")).data.live_users.items.map((e=>{const{jump_url:t,room_id:n,face:i,title:o,uname:r,mid:s}=e;return{cover:i,face:i,uname:r,title:o,roomid:n,pic:"",online:0,uid:s,link:t}})),sortByRecommend(e,t){const n=t.map((e=>e.roomid)),i=e.filter((e=>!n.includes(e.roomid)));return lodash.concat(t,i)}}});var a=n(332),l=n.n(a),c=n(274),d=n.n(c),p={insert:"head",singleton:!1};l()(d(),p);d().locals;var u=function(e,t,n,i,o,r,s,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):o&&(l=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(e,t){return l.call(t),d(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}(s,i,[],!1,null,null,null);const f=u.exports},332:(e,t,n)=>{"use strict";var i,o=function(){return void 0===i&&( // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // @see https://github.com/webpack-contrib/style-loader/issues/177 i=Boolean(window&&document&&document.all&&!window.atob)),i},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;n{var i=n(735);i&&i.__esModule&&(i=i.default),e.exports="string"==typeof i?i:i.toString()},405:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=405,e.exports=t},478:e=>{"use strict";e.exports="替换动态的 `正在直播` 面板, 能够显示超过 10 个的直播间.\n"}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={id:e,exports:{}};return n[e](r,r.exports,o),r.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,i){if(1&i&&(n=this(n)),8&i)return n;if("object"==typeof n&&n){if(4&i&&n.__esModule)return n;if(16&i&&"function"==typeof n.then)return n}var r=Object.create(null);o.r(r);var s={};e=e||[null,t({}),t([]),t(t)];for(var a=2&i&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>s[e]=()=>n[e]));return s.default=()=>n,o.d(r,s),r},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";o.d(r,{component:()=>a});const e=coreApis.componentApis.define,t=coreApis.componentApis.styledComponent,n=coreApis.spinQuery,i=coreApis.utils,s=coreApis.utils.log,a=(0,e.defineComponentMetadata)({name:"extendFeedsLive",displayName:"直播信息扩充",entry:(0,t.styledComponentEntry)((()=>Promise.resolve().then(o.t.bind(o,399,23))),(async()=>{const e=(0,s.useScopedConsole)("extendFeedsLive"),t=await(0,n.select)(".bili-dyn-home--member aside.left");let r;t||e.error("aside not found");if((a=t.childNodes[t.childNodes.length-1]).nodeType!==Node.COMMENT_NODE&&a instanceof HTMLElement&&"section"===a.tagName.toLowerCase()&&a.classList.contains("sticky"))r=await(0,n.select)((()=>dq(t,"section.sticky")));else{const e=document.createElement("section");e.classList.add("sticky"),t.appendChild(e),r=e}var a;r||e.error("container not found");const l=await Promise.resolve().then(o.bind(o,749)).then((e=>e.default)),c=(0,i.mountVueComponent)(l);r.appendChild(c.$el)})),tags:[componentsTags.feeds,componentsTags.live],urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],commitHash:"29059634f05846e79b893a1326523355a3bdc9ae",coreVersion:"2.8.9",description:(()=>{const e=o(405);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(o.t.bind(o,478,17)).then((e=>e.default))}})()})})(),r=r.component})()));