import{a as P,b as w,c as M}from"./chunk-V3JCNHXE.js";import{a as E}from"./chunk-4HUZOESR.js";import{a as n}from"./chunk-GWHJLMD5.js";import"./chunk-EX2G5KNL.js";import"./chunk-ZE7HDMWM.js";import"./chunk-LBNALXAE.js";import"./chunk-FKYSH5OG.js";import"./chunk-D6GDQA45.js";import{c as F,g as C,h as A}from"./chunk-CXGWN7ON.js";import"./chunk-VNTTMLNC.js";import"./chunk-REGRR3MN.js";import"./chunk-564SGFOD.js";import"./chunk-Q6HW2ZX6.js";import"./chunk-FIRXRUYQ.js";import"./chunk-EACVBS4T.js";import"./chunk-VHSLLESL.js";import"./chunk-SG7FO2VA.js";import"./chunk-EZJXLPFI.js";import"./chunk-X3FRSWEH.js";import"./chunk-UY2M6ZAU.js";import"./chunk-VQRYABX6.js";import"./chunk-H76VM5DD.js";import"./chunk-I35UNCSO.js";import"./chunk-MU35PJT3.js";import{c as O}from"./chunk-HH6BK2TC.js";import"./chunk-JDHBJ4AH.js";import"./chunk-YGLAXG55.js";import"./chunk-GQVSPSSP.js";import"./chunk-EDXPW7KK.js";import"./chunk-TQ5ESXAX.js";import"./chunk-IKBXTUTA.js";import"./chunk-WCQHH57V.js";import"./chunk-XTUMH3AE.js";import"./chunk-IWEJR7IZ.js";import"./chunk-F6VD4TQO.js";import"./chunk-D6HVHWLN.js";import"./chunk-XPENUXFT.js";import"./chunk-R4KH5TVT.js";import"./chunk-ECEY5IMS.js";import"./chunk-JZKJ6CBR.js";import"./chunk-GE7DWA6O.js";import"./chunk-LNDL2Z4K.js";import"./chunk-7HOLFPGE.js";import{Cb as T,Da as S,L as p,Mh as I,Na as f,R as u,T as m,ba as o,hh as k,lb as b,mb as v,mh as y,n as l,nb as h,ob as g,wh as _,xh as V}from"./chunk-MOXUT4EU.js";import{a as c,b as a,i as d}from"./chunk-QQ7SJNXU.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:"Administrer",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="Videoer fra dine abonnementer",[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:"Oppdag videoer"},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:"Abonnenter"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:5a85df092a135682c90bae008e37ec28160e04e5f445e29af2927333ba91ffa1*///# sourceMappingURL=chunk-DFJ6QCFY.js.map