import{a as P,b as M,c as w}from"./chunk-RZQXZVX6.js";import{a as A}from"./chunk-2TZLKID5.js";import{a as n}from"./chunk-MYFTNABR.js";import"./chunk-DKQLDJ2G.js";import"./chunk-WA5MCALD.js";import"./chunk-UGMSMKKS.js";import"./chunk-YXJMSNCK.js";import{b as O}from"./chunk-S4MDYP6B.js";import"./chunk-PPPAJSPF.js";import{c as F,g as C,h as E}from"./chunk-MYRYELAU.js";import"./chunk-57JZT5J7.js";import"./chunk-5HQDFGLY.js";import"./chunk-LYT443UU.js";import"./chunk-XWIFTIV4.js";import"./chunk-DISHWERV.js";import"./chunk-KY7NHI5V.js";import"./chunk-3OYXDC5G.js";import"./chunk-EWUAQE4Q.js";import"./chunk-RVVBPMZR.js";import"./chunk-CKX3O2YX.js";import"./chunk-UNWMYEQV.js";import"./chunk-E3LEGJ4Z.js";import"./chunk-GABZVP3T.js";import"./chunk-NDB3D6XX.js";import{c as I}from"./chunk-QU25C3ZM.js";import"./chunk-36KDLFTD.js";import"./chunk-P5HTY4MD.js";import"./chunk-JYE3ELTU.js";import"./chunk-V5ZUUTTD.js";import"./chunk-HTSGP64S.js";import"./chunk-67RJ5AZW.js";import"./chunk-ZY232QOZ.js";import"./chunk-X7U6PGMJ.js";import"./chunk-GBKT6RKB.js";import"./chunk-I3IWE72H.js";import"./chunk-XDDEZ66K.js";import"./chunk-DPLIPHIS.js";import"./chunk-RFITX4M7.js";import"./chunk-WUOPDINA.js";import"./chunk-5PBBE43T.js";import"./chunk-BXUK6RGB.js";import"./chunk-5FJ7S7BS.js";import"./chunk-ZIVZTBTN.js";import"./chunk-A62DV3ZS.js";import{Cg as _,Dg as k,Ha as m,S as p,Sa as S,U as u,ba as o,eg as T,gb as f,kg as y,m as l,pb as v,qb as b,rb as h,xg as V,zb as g}from"./chunk-OX24XL2F.js";import{a,b as c,i as d}from"./chunk-FQ4ILEWG.js";var D=(()=>{let r=class r{authService=o(T);userSubscription=o(n);hooks=o(V);videoService=o(I);scopedTokensService=o(y);getVideosObservableFunction=this.getVideosObservable.bind(this);getSyndicationItemsFunction=this.getSyndicationItems.bind(this);defaultSort="-publishedAt";actions=[{routerLink:"/my-library/subscriptions",label:"Hallinnoi",iconName:"cog"}];disabled=!1;feedToken;getVideosObservable(e,i){let t=c(a({},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(()=>this.scopedTokensService.getScopedTokens()),u(i=>this.feedToken=i.feedToken));return l(e);}};d(r,"\u0275fac",function(i){return new(i||r)();}),d(r,"\u0275cmp",S({type:r,selectors:[["my-videos-user-subscriptions"]],decls:3,vars:5,consts:()=>{let e;return e="Videoita tilauksistasi",[e,[1,"visually-hidden"],["displayFilters","false","displayModerationBlock","false","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(v(0,"h1",1),g(1,0),b(),h(2,"my-videos-list",2)),i&2&&(m(2),f("getVideosObservableFunction",t.getVideosObservableFunction)("getSyndicationItemsFunction",t.getSyndicationItemsFunction)("defaultSort",t.defaultSort)("disabled",t.disabled)("headerActions",t.actions));},dependencies:[A],encapsulation:2}));let s=r;return s;})();var te=[{path:"",providers:[P,n,O,F,E,C],children:[{path:"overview",component:M,data:{meta:{title:"L\xF6yd\xE4 videoita"},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:w,data:{reuse:{enabled:!0,key:"videos-list"}}},{path:"subscriptions",canActivate:[k],component:D,data:{meta:{title:"Tilaukset"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:93ef1b86561141301263c1f349fa8abb749523958c3a6dfaf46ed36d22b0a506*///# sourceMappingURL=chunk-U2NTLIY6.js.map