import{a as P,b as w,c as M}from"./chunk-H27VYQHP.js";import{a as E}from"./chunk-QBVYWQ2A.js";import{a as n}from"./chunk-MFRCVAQN.js";import"./chunk-IPQEGA5G.js";import"./chunk-2JYGWF65.js";import"./chunk-Y25PA6LB.js";import"./chunk-D7AFZ4PH.js";import"./chunk-NDU4YC6K.js";import{c as F,g as C,h as A}from"./chunk-CL23WOH7.js";import"./chunk-QIUFPYFH.js";import"./chunk-D6SYNZK4.js";import"./chunk-QQEAIHHQ.js";import"./chunk-TGJYSDH6.js";import"./chunk-5TQL6IYG.js";import"./chunk-BICQJDQP.js";import"./chunk-NMCX6D7Z.js";import"./chunk-FCVC2ITM.js";import"./chunk-5247Y5WF.js";import"./chunk-3DBNKHSQ.js";import"./chunk-3AVQEWYZ.js";import"./chunk-QI6ZB7N4.js";import"./chunk-ICQDBBSV.js";import"./chunk-X6NJ2SDR.js";import{c as O}from"./chunk-7TPOLMSO.js";import"./chunk-RFDIS7RO.js";import"./chunk-VMPGITBT.js";import"./chunk-S5OPFI5G.js";import"./chunk-6ZSPPAUO.js";import"./chunk-X7R57V6U.js";import"./chunk-2FSVSJBK.js";import"./chunk-MANTIFUG.js";import"./chunk-AZPYKXFL.js";import"./chunk-XKHZ653L.js";import"./chunk-VUKFN2YQ.js";import"./chunk-4GMKSIW4.js";import"./chunk-KP34JQHZ.js";import"./chunk-CHJSFALA.js";import"./chunk-KKNPEIDS.js";import"./chunk-4ARSJVAF.js";import"./chunk-K6U64Q72.js";import"./chunk-KZ26MFAT.js";import"./chunk-Y4WF5HJS.js";import{Aa as S,Gh as k,K as p,Ka as f,Lh as y,Q as u,S as m,Vh as _,Wh as V,aa as o,eb as b,fb as v,gb as h,hb as g,ji as I,m as l,vb as T}from"./chunk-R4Z6ZI3L.js";import{a as c,b as a,i as d}from"./chunk-P6NJDXIL.js";var R=(()=>{let r=class r{authService=o(k);userSubscription=o(n);hooks=o(I);videoService=o(O);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"\u7BA1\u7406",iconName:"cog"}];disabled=!1;feedToken;getVideosObservable(e,i){let t=a(c({},i.toVideosAPIObject()),{videoPagination:e,skipCount:!0});return this.hooks.wrapObsFun(this.userSubscription.getUserSubscriptionVideos.bind(this.userSubscription),t,"common","filter:api.user-subscriptions-videos.videos.list.params","filter:api.user-subscriptions-videos.videos.list.result");}getSyndicationItems(){return this.loadFeedToken().then(()=>{let e=this.authService.getUser();return this.videoService.getVideoSubscriptionFeedUrls(e.account.id,this.feedToken);});}disableForReuse(){this.disabled=!0;}enabledForReuse(){this.disabled=!1;}loadFeedToken(){if(this.feedToken)return Promise.resolve(this.feedToken);let e=this.authService.userInformationLoaded.pipe(p(),u(()=>this.scopedTokensService.getScopedTokens()),m(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",f({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="\u5F9E\u60A8\u7684\u8A02\u95B1\u800C\u4F86\u7684\u5F71\u7247",[e,[1,"visually-hidden"],["displayFilters","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(v(0,"h1",1),T(1,0),h(),g(2,"my-videos-list",2)),i&2&&(S(2),b("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[E],encapsulation:2}));let s=r;return s;})();var te=[{path:"",providers:[P,n,F,A,C],children:[{path:"overview",component:w,data:{meta:{title:"\u63A2\u7D22\u5F71\u7247"},reuse:{enabled:!0,key:"videos-discover"}}},{path:"most-liked",redirectTo:"browse?scope=federated&sort=-likes"},{path:"trending",redirectTo:()=>"browse?scope=federated&sort=-"+o(_).getDefaultTrendingSort()},{path:"recently-added",redirectTo:"browse?scope=federated&sort=-publishedAt"},{path:"local",redirectTo:"browse?scope=local&sort=-publishedAt"},{path:"browse",component:M,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[V],component:R,data:{meta:{title:"\u8A02\u95B1"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:138e9aba5923606215625ab5641fbdc103d8a34cfe13ae910386f40f27aea675*///# sourceMappingURL=chunk-BRIYKDGY.js.map