import{a as P,b as M,c as w}from"./chunk-KYCDNCVO.js";import{a as A}from"./chunk-W64KEJYL.js";import{a as n}from"./chunk-VHSLWHJU.js";import"./chunk-JZ34DAMU.js";import"./chunk-E6R3I6DW.js";import"./chunk-G5TWMU73.js";import"./chunk-AZTITAZK.js";import{b as O}from"./chunk-JGXNWB3O.js";import"./chunk-Z4FMMGYV.js";import{c as F,g as C,h as E}from"./chunk-4M2TPW4Q.js";import"./chunk-IJWHVEJJ.js";import"./chunk-7XLQ7DQR.js";import"./chunk-QQDWEOKZ.js";import"./chunk-3KEKXE32.js";import"./chunk-OH7QWNNQ.js";import"./chunk-6TNBORET.js";import"./chunk-4O4CGNRW.js";import"./chunk-AL7IUBFQ.js";import"./chunk-YBZYVLBW.js";import"./chunk-6LSPATOC.js";import"./chunk-7DYVHRVH.js";import"./chunk-XZSIYFN4.js";import"./chunk-B56VQOIF.js";import"./chunk-BVEGELQ3.js";import{c as I}from"./chunk-SNLRONV5.js";import"./chunk-OZJFNCWW.js";import"./chunk-JGWYKTL3.js";import"./chunk-BOKN6H37.js";import"./chunk-7RAYZLJO.js";import"./chunk-ZCRCAJGI.js";import"./chunk-YL3WD24K.js";import"./chunk-UB4DMPIC.js";import"./chunk-LKNLGJM3.js";import"./chunk-THURTBNN.js";import"./chunk-KHGJ23AM.js";import"./chunk-2L7ERT5V.js";import"./chunk-WK3YSDBS.js";import"./chunk-I6WZ2POZ.js";import"./chunk-GHQGRKEZ.js";import"./chunk-UV7BDRMR.js";import"./chunk-FZLVSCIB.js";import"./chunk-UE3TNESI.js";import"./chunk-HZMHCW3T.js";import"./chunk-HQLPBHYW.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-XD25PYOU.js";import{a,b as c,i as d}from"./chunk-FPVLB6PA.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:"Manage",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="\u0641\u06CC\u0644\u0645\u200C\u0647\u0627\u06CC \u0645\u0648\u062C\u0648\u062F \u062F\u0631 \u0627\u0634\u062A\u0631\u0627\u06A9\u200C\u0647\u0627\u06CC \u0634\u0645\u0627",[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:"\u062C\u0633\u062A\u062C\u0648\u06CC \u0641\u06CC\u0644\u0645\u200C\u0647\u0627"},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:"\u0627\u0634\u062A\u0631\u0627\u06A9\u200C\u0647\u0627"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:fc817608a00477e18624cf8be5badc6c9afae12f0946c7c1548c95cf79bd0e7b*///# sourceMappingURL=chunk-SWWENTBK.js.map