Files
Archive/bb-evolved/registry/dist/components/feeds/extend-live.js
T
2026-03-28 19:56:50 +01:00

15 lines
25 KiB
JavaScript

!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={674:(e,t,n)=>{"use strict";n.d(t,{Q:()=>o,f:()=>s});var i=n(253);const o=-1,s=(0,i.defineOptionsMetadata)({pinnedListID:{defaultValue:o,displayName:"置顶列表 ID",hidden:!0},hiddenListID:{defaultValue:o,displayName:"隐藏列表 ID",hidden:!0}})},327:(e,t,n)=>{var i=n(904),o=n(955)(i);o.push([e.id,".extend-feeds-live-extra-options {\n margin-top: 8px;\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 12px;\n}\n.extend-feeds-live-extra-options .extend-feeds-live-extra-option {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 8px;\n}\n.extend-feeds-live-extra-options .extend-feeds-live-extra-option-header {\n font-weight: 600;\n}\n.extend-feeds-live-extra-options .extend-feeds-live-extra-option-description {\n font-size: 12px;\n opacity: 0.75;\n}","",{version:3,sources:["webpack://./registry/lib/components/feeds/extend-live/ExtraOptions.vue"],names:[],mappings:"AAAA;EACE,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,SAAS;AACX;AACA;EACE,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,QAAQ;AACV;AACA;EACE,gBAAgB;AAClB;AACA;EACE,eAAe;EACf,aAAa;AACf",sourcesContent:[".extend-feeds-live-extra-options {\n margin-top: 8px;\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 12px;\n}\n.extend-feeds-live-extra-options .extend-feeds-live-extra-option {\n display: flex;\n align-items: stretch;\n flex-direction: column;\n gap: 8px;\n}\n.extend-feeds-live-extra-options .extend-feeds-live-extra-option-header {\n font-weight: 600;\n}\n.extend-feeds-live-extra-options .extend-feeds-live-extra-option-description {\n font-size: 12px;\n opacity: 0.75;\n}"],sourceRoot:""}]),e.exports=o},901:(e,t,n)=>{var i=n(904),o=n(955)(i);o.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 color: var(--be-color-text-title, #eee);\n background-color: var(--be-color-popup-bg, #444);\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 var(--be-color-avatar-border, #8884);\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}","",{version:3,sources:["webpack://./registry/lib/components/feeds/extend-live/LiveList.vue"],names:[],mappings:"AAAA;EACE,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,SAAS;EACT,kBAAkB;EAClB,kBAAkB;EAClB,eAAe;EACf,WAAW;EACX,sBAAsB;AACxB;AACA;EACE,uCAAuC;EACvC,gDAAgD;AAClD;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,8BAA8B;AAChC;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;EACR,eAAe;AACjB;AACA;EACE,YAAY;EACZ,eAAe;AACjB;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;AACV;AACA;EACE,eAAe;EACf,YAAY;AACd;AACA;EACE,YAAY;EACZ,0BAA0B;AAC5B;AACA;EACE,yBAAyB;EACzB,UAAU;EACV,yBAAyB;AAC3B;AACA;EACE,YAAY;EACZ,YAAY;EACZ,eAAe;EACf,aAAa;EACb,mBAAmB;AACrB;AACA;EACE,UAAU;EACV,yBAAyB;AAC3B;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;AACV;AACA;EACE,YAAY;AACd;AACA;EACE,YAAY;AACd;AACA;EACE,cAAc;EACd,gCAAgC;EAChC,4BAA4B;EAC5B,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,QAAQ;EACR,+BAA+B;AACjC;AACA;EACE,oBAAoB;EACpB,mBAAmB;AACrB;AACA;EACE,+BAA+B;AACjC;AACA;EACE,+BAA+B;AACjC;AACA;EACE,aAAa;EACb,mBAAmB;EACnB,QAAQ;EACR,eAAe;AACjB;AACA;EACE,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;EACb,sDAAsD;AACxD;AACA;EACE,aAAa;EACb,oBAAoB;EACpB,sBAAsB;EACtB,QAAQ;EACR,YAAY;EACZ,QAAQ;AACV;AACA;EACE,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;AACrB;AACA;EACE,eAAe;EACf,yBAAyB;AAC3B;AACA;EACE,YAAY;AACd;AACA;EACE,yBAAyB;AAC3B",sourcesContent:[".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 color: var(--be-color-text-title, #eee);\n background-color: var(--be-color-popup-bg, #444);\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 var(--be-color-avatar-border, #8884);\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}"],sourceRoot:""}]),e.exports=o},560:(e,t,n)=>{var i=n(904),o=n(955)(i);o.push([e.id,".live-up-list,\n.bili-dyn-home--member .bili-dyn-live-users {\n display: none !important;\n}","",{version:3,sources:["webpack://./registry/lib/components/feeds/extend-live/extend-feeds-live.scss"],names:[],mappings:"AAAA;;EAEE,wBAAwB;AAC1B",sourcesContent:[".live-up-list,\n.bili-dyn-home--member .bili-dyn-live-users {\n display: none !important;\n}"],sourceRoot:""}]),e.exports=o},955: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 s=0;s<this.length;s++){
// eslint-disable-next-line prefer-destructuring
var r=this[s][0];null!=r&&(o[r]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);i&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},904:e=>{"use strict";function t(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null==n)return;var i,o,s=[],r=!0,a=!1;try{for(n=n.call(e);!(r=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);r=!0);}catch(e){a=!0,o=e}finally{try{r||null==n.return||n.return()}finally{if(a)throw o}}return s}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}e.exports=function(e){var n=t(e,4),i=n[1],o=n[3];if(!o)return i;if("function"==typeof btoa){
// eslint-disable-next-line no-undef
var s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),a="/*# ".concat(r," */"),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([a]).join("\n")}return[i].join("\n")}},991:(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},s=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]}}(),r=[];function a(e){for(var t=-1,n=0;n<r.length;n++)if(r[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},i=[],o=0;o<e.length;o++){var s=e[o],l=t.base?s[0]+t.base:s[0],c=n[l]||0,d="".concat(l," ").concat(c);n[l]=c+1;var A=a(d),p={css:s[1],media:s[2],sourceMap:s[3]};-1!==A?(r[A].references++,r[A].updater(p)):r.push({identifier:d,updater:m(p,t),references:1}),i.push(d)}return i}function c(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var o=n.nc;o&&(i.nonce=o)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var r=s(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var d,A=(d=[],function(e,t){return d[e]=t,d.filter(Boolean).join("\n")});function p(e,t,n,i){var o=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=A(t,o);else{var s=document.createTextNode(o),r=e.childNodes;r[t]&&e.removeChild(r[t]),r.length?e.insertBefore(s,r[t]):e.appendChild(s)}}function u(e,t,n){var i=n.css,o=n.media,s=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),s&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,v=0;function m(e,t){var n,i,o;if(t.singleton){var s=v++;n=f||(f=c(t)),i=p.bind(null,n,s,!1),o=p.bind(null,n,s,!0)}else n=c(t),i=u.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var o=a(n[i]);r[o].references--}for(var s=l(e,t),c=0;c<n.length;c++){var d=a(n[c]);0===r[d].references&&(r[d].updater(),r.splice(d,1))}n=s}}}},18:(e,t,n)=>{var i=n(560);i&&i.__esModule&&(i=i.default),e.exports="string"==typeof i?i:i.toString()},168:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>x});var i=function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t("div",{staticClass:"extend-feeds-live-extra-options"},[t("div",{staticClass:"extend-feeds-live-extra-option"},[t("div",{staticClass:"extend-feeds-live-extra-option-header"},[e._v("置顶列表")]),e._v(" "),t("div",{staticClass:"extend-feeds-live-extra-option-description"},[e._v("\n 配置直播信息扩充要展示的置顶列表,置顶列表中的用户会排序到上方。\n ")]),e._v(" "),t(n.FollowingListSelect,{attrs:{value:n.pinnedListID},on:{change:n.handlePinnedListChange}})],1),e._v(" "),t("div",{staticClass:"extend-feeds-live-extra-option"},[t("div",{staticClass:"extend-feeds-live-extra-option-header"},[e._v("隐藏列表")]),e._v(" "),t("div",{staticClass:"extend-feeds-live-extra-option-description"},[e._v("\n 配置直播信息扩充要展示的隐藏列表,隐藏列表中的用户会被隐藏,优先级高于置顶列表。\n ")]),e._v(" "),t(n.FollowingListSelect,{attrs:{value:n.hiddenListID},on:{change:n.handleHiddenListChange}})],1)])};i._withStripped=!0;var o=n(259),s=function(){var e=this,t=e._self._c,n=e._self._setupProxy;return t(n.VDropdown,{staticClass:"be-live-following-list-select",attrs:{items:n.followingList,"key-mapper":e=>e.id,value:n.selectedItem},on:{change:n.handleFollowingListChange},scopedSlots:e._u([{key:"item",fn:function({item:n}){return[t("span",{staticClass:"be-live-following-list-item"},[e._v(" "+e._s(n.displayName)+" ")])]}}])})};s._withStripped=!0;var r=n(164),a=n(416),l=n(674);const c=(0,o.defineComponent)({__name:"FollowingListSelect",props:{value:null},emits:["change"],setup(e,t){let{emit:n}=t;const i=e,s=(0,o.computed)((()=>i.value)),c=(0,o.reactive)({id:l.Q,displayName:"<未选择>",count:0}),d=(0,o.ref)([]),A=(0,o.computed)((()=>d.value.find((e=>e.id===s.value))??c)),p=async()=>{const e=await(0,a.bilibiliApi)((0,a.getJsonWithCredentials)("https://api.bilibili.com/x/relation/tags"));d.value=[c,...e.map((e=>({id:e.tagid,displayName:e.name,count:e.count})))],i.value===l.Q||d.value.some((e=>e.id===i.value))||d.value.unshift({id:i.value,displayName:"<已删除的分组>",count:0})};return p(),{__sfc:!0,props:i,emit:n,followingListID:s,handleFollowingListChange:e=>{n("change",e.id)},unselectedListItem:c,followingList:d,selectedItem:A,loadFollowingList:p,VDropdown:r.VDropdown}}});var d=n(678);const A=(0,d.A)(c,s,[],!1,null,null,null).exports;var p=n(905);const u=(0,o.defineComponent)({__name:"ExtraOptions",setup(e){const{options:t}=(0,p.getComponentSettings)("extendFeedsLive"),n=(0,o.ref)(t.pinnedListID),i=(0,o.ref)(t.hiddenListID);return{__sfc:!0,options:t,pinnedListID:n,handlePinnedListChange:e=>{t.pinnedListID=e,n.value=e},hiddenListID:i,handleHiddenListChange:e=>{t.hiddenListID=e,i.value=e},FollowingListSelect:A}}}),f=u;var v=n(991),m=n.n(v),h=n(327),C=n.n(h),b={insert:"head",singleton:!1};m()(C(),b);C().locals;const x=(0,d.A)(f,i,[],!1,null,null,null).exports},655:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var i=function(){var e=this,t=e._self._c,n=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(n.items.length)+")")])]),e._v(" "),t("div",{staticClass:"be-live-list-actions"},[n.loaded?t("div",{staticClass:"be-live-list-refresh",attrs:{title:"刷新"},on:{click:n.fetchLiveList}},[t(n.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(n.VIcon,{attrs:{icon:"right-arrow",size:14}})],1)])]),e._v(" "),t("div",{staticClass:"be-live-list-search"},[t(n.VIcon,{attrs:{icon:"search",size:18}}),e._v(" "),t(n.TextBox,{attrs:{placeholder:"搜索"},model:{value:n.keyword,callback:function(e){n.keyword=e},expression:"keyword"}})],1),e._v(" "),t("div",{staticClass:"be-live-list-content"},[n.loaded?e._e():t(n.VLoading),e._v(" "),n.loaded&&0===n.filteredItems.length?t(n.VEmpty):e._e(),e._v(" "),e._l(n.filteredItems,(function(i){return t("a",{key:i.roomid,staticClass:"be-live-list-item",attrs:{target:"_blank",href:i.link}},[t("div",{staticClass:"be-live-list-item-avatar"},[t(n.DpiImage,{attrs:{src:i.face,alt:i.title,size:36}})],1),e._v(" "),t("div",{staticClass:"be-live-list-item-info"},[t("div",{staticClass:"be-live-list-item-title",attrs:{title:i.title}},[e._v("\n "+e._s(n.decodeTitle(i.title))+"\n ")]),e._v(" "),t("div",{staticClass:"be-live-list-item-user",attrs:{title:i.uname}},[e._v("\n "+e._s(i.uname)+"\n ")])])])}))],2)])};i._withStripped=!0;var o=n(259),s=n(164),r=n(416),a=n(847),l=n(674),c=n(905);const d=(0,o.defineComponent)({__name:"LiveList",setup(e){const{options:t}=(0,c.getComponentSettings)("extendFeedsLive"),n=(0,o.ref)([]),i=(0,o.ref)([]),d=(0,o.ref)([]),A=(0,o.ref)(!1),p=(0,o.ref)(""),u=(0,o.computed)((()=>p.value?n.value.filter((e=>{const t=t=>e[t].toString().toLowerCase().includes(p.value.toLowerCase());return t("title")||t("uname")||t("roomid")||t("uid")})):n.value)),f=async()=>{const e=await(0,r.getJsonWithCredentials)("https://api.bilibili.com/x/polymer/web-dynamic/v1/portal");return e.data.live_users?.items?.map((e=>{const{jump_url:t,room_id:n,face:i,title:o,uname:s,mid:r}=e;return{cover:i,face:i,uname:s,title:o,roomid:n,pic:"",online:0,uid:r,link:t}}))??[]},v=(e,t)=>{const n=t.map((e=>e.roomid)),i=e.filter((e=>!n.includes(e.roomid)));return lodash.concat(t,i)},m=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(n,i)=>{const o=e.findIndex((e=>e.mid===n.uid)),s=e.findIndex((e=>e.mid===i.uid));return-1===s&&-1===o?0:-1===o?t?-1:1:-1===s?t?1:-1:o-s}},h=async()=>{const e=async e=>{if(e===l.Q||void 0===e)return[];const t=await(0,r.bilibiliApi)((0,r.getJsonWithCredentials)("https://api.bilibili.com/x/relation/tags"));if(!t.some((t=>t.tagid===e)))return[];return await(0,r.getPages)({api:t=>(0,r.getJsonWithCredentials)(`https://api.bilibili.com/x/relation/tag?tagid=${e}&pn=${t}&ps=500&mid=${(0,a.getUID)()}`),getList:e=>lodash.get(e,"data",[]),getTotal:()=>t.find((t=>t.tagid===e))?.count??0})};await Promise.all([e(t.pinnedListID).then((e=>{i.value=e})).catch((()=>{i.value=[]})),e(t.hiddenListID).then((e=>{d.value=e})).catch((()=>{d.value=[]}))])},C=async()=>{try{n.value=[],A.value=!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:s,online:r,uid:a,link:l}=e;return{cover:t,face:t,uname:n,title:i,roomid:o.toString(),pic:s,online:r,uid:a,link:l}})),getTotal:e=>lodash.get(e,"data.count",0)}),[t,o]=await Promise.all([e,f()]),s=v(t,o).sort(m(i.value,!1)).filter((e=>!d.value.some((t=>t.mid===e.uid))));n.value=s}finally{A.value=!0}},b=async()=>{await h(),await C()};return(0,c.addComponentListener)("extendFeedsLive.pinnedListID",b),(0,c.addComponentListener)("extendFeedsLive.hiddenListID",b),(0,o.onMounted)((()=>{b()})),(0,o.onBeforeUnmount)((()=>{(0,c.removeComponentListener)("extendFeedsLive.pinnedListID",b),(0,c.removeComponentListener)("extendFeedsLive.hiddenListID",b)})),{__sfc:!0,decodeTitle:e=>{const t=document.createElement("textarea");return t.innerHTML=e,t.value},FollowingListPageSize:500,options:t,items:n,pinnedUsers:i,hiddenUsers:d,loaded:A,keyword:p,filteredItems:u,fetchRecommendLiveInfos:f,mergeRecommendLiveInfos:v,sortByUsers:m,fetchFollowingLists:h,fetchLiveList:C,initializeLiveList:b,VIcon:s.VIcon,TextBox:s.TextBox,DpiImage:s.DpiImage,VEmpty:s.VEmpty,VLoading:s.VLoading}}}),A=d;var p=n(991),u=n.n(p),f=n(901),v=n.n(f),m={insert:"head",singleton:!1};u()(v(),m);v().locals;const h=(0,n(678).A)(A,i,[],!1,null,null,null).exports},678:(e,t,n)=>{"use strict";function i(e,t,n,i,o,s,r,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),s&&(c._scopeId="data-v-"+s),r?(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(r)},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 A=c.beforeCreate;c.beforeCreate=A?[].concat(A,l):[l]}return{exports:e,options:c}}n.d(t,{A:()=>i})},969: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=969,e.exports=t},246:e=>{"use strict";e.exports="替换动态的 `正在直播` 面板, 能够显示超过 10 个的直播间.\n"},259:e=>{"use strict";e.exports=globalThis.Vue},416:e=>{"use strict";e.exports=coreApis.ajax},253:e=>{"use strict";e.exports=coreApis.componentApis.define},905:e=>{"use strict";e.exports=coreApis.settings},164:e=>{"use strict";e.exports=coreApis.ui},847:e=>{"use strict";e.exports=coreApis.utils}},i={};function o(e){var t=i[e];if(void 0!==t)return t.exports;var s=i[e]={id:e,exports:{}};return n[e](s,s.exports,o),s.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 s=Object.create(null);o.r(s);var r={};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=>r[e]=()=>n[e]));return r.default=()=>n,o.d(s,r),s},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})},o.nc=void 0;var s={};return(()=>{"use strict";o.d(s,{component:()=>l});var e=o(253);const t=coreApis.componentApis.styledComponent,n=coreApis.spinQuery;var i=o(847);const r=coreApis.utils.log;var a=o(674);const l=(0,e.defineComponentMetadata)({name:"extendFeedsLive",displayName:"直播信息扩充",entry:(0,t.styledComponentEntry)((()=>Promise.resolve().then(o.t.bind(o,18,23))),(async()=>{const e=(0,r.useScopedConsole)("extendFeedsLive"),t=await(0,n.select)(".bili-dyn-home--member aside.left");let s;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"))s=await(0,n.select)((()=>dq(t,"section.sticky")));else{const e=document.createElement("section");e.classList.add("sticky"),t.appendChild(e),s=e}var a;s||e.error("container not found");const l=await Promise.resolve().then(o.bind(o,655)).then((e=>e.default)),c=(0,i.mountVueComponent)(l);s.appendChild(c.$el)})),tags:[componentsTags.feeds,componentsTags.live],urlInclude:[/^https:\/\/t\.bilibili\.com\/$/],extraOptions:()=>Promise.resolve().then(o.bind(o,168)).then((e=>e.default)),options:a.f,commitHash:"d87d69cfb9d7e0124bd90a06fec4569bd61e02c5",coreVersion:"2.10.7",description:(()=>{const e=o(969);return{...Object.fromEntries(e.keys().map((t=>[t.match(/index\.(.+)\.md$/)[1],e(t)]))),"zh-CN":()=>Promise.resolve().then(o.t.bind(o,246,17)).then((e=>e.default))}})()})})(),s=s.component})()));
//# sourceMappingURL=https://raw.githubusercontent.com/the1812/Bilibili-Evolved/master/registry/dist/components/feeds/extend-live.js.map