import{a as P,b as w,c as M}from"./chunk-Z6RIFO2G.js";import{a as E}from"./chunk-JZ5MO76W.js";import{a as n}from"./chunk-VAQQHUM2.js";import"./chunk-FAALAPJ2.js";import"./chunk-AEQ2WRUU.js";import"./chunk-EQVMTYDO.js";import"./chunk-4LRKKRXP.js";import"./chunk-KKLZYJSH.js";import{c as F,g as C,h as A}from"./chunk-BIXQYXOG.js";import"./chunk-N6ZADJLM.js";import"./chunk-NUFYFH2P.js";import"./chunk-NRUVTQT6.js";import"./chunk-HYAZ5VYY.js";import"./chunk-HULXTCSO.js";import"./chunk-2W5IMV7F.js";import"./chunk-4JHTT2TB.js";import"./chunk-MJNR3U33.js";import"./chunk-VTD3G3TG.js";import"./chunk-ZO7KJMKI.js";import"./chunk-RIGXRZAX.js";import"./chunk-PLSTLZ4N.js";import"./chunk-FHJ4UG3C.js";import"./chunk-S3C4WSLV.js";import"./chunk-KJ7HRSLY.js";import{c as O}from"./chunk-YA2OBXRO.js";import"./chunk-KKQXMHTD.js";import"./chunk-F3BNQYRI.js";import"./chunk-7YP5LJ2H.js";import"./chunk-MX3KDVP3.js";import"./chunk-DZ6T7PS7.js";import"./chunk-QNPGAB3Y.js";import"./chunk-LJ6ZMOBM.js";import"./chunk-TPPCH2AE.js";import"./chunk-Z2LF35UH.js";import"./chunk-PB45VOJJ.js";import"./chunk-2SQVKV5D.js";import"./chunk-XKUQKVOV.js";import"./chunk-U4DRWDU7.js";import"./chunk-PBGQABKC.js";import"./chunk-QMQVDBEV.js";import"./chunk-5ZTU7T2J.js";import"./chunk-DL46GKS7.js";import"./chunk-HHXEF4AR.js";import{Da as S,Db as T,L as p,Na as f,Oh as I,R as u,T as m,ba as o,jh as k,mb as b,n as l,nb as v,ob as h,oh as y,pb as g,yh as _,zh as V}from"./chunk-OTZZLUAJ.js";import{a as c,b as a,i as d}from"./chunk-XYZYVFXE.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:"Manage",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="\u0412\u0456\u0434\u0435\u043E \u0437 \u0432\u0430\u0448\u0438\u0445 \u043F\u0456\u0434\u043F\u0438\u0441\u043E\u043A",[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:"\u041E\u0433\u043B\u044F\u0434 \u0432\u0456\u0434\u0435\u043E"},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:"\u041F\u0456\u0434\u043F\u0438\u0441\u043A\u0438"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:4caeb8e7a09648a9cf35d6229af8a685b503a6e2123779e5b0c4fb7602981338*///# sourceMappingURL=chunk-WOMWZ2MZ.js.map