import{a as P,b as w,c as M}from"./chunk-VCEFIOZM.js";import{a as E}from"./chunk-KXBKHFVP.js";import{a as n}from"./chunk-U6VVETAH.js";import"./chunk-KS7VDFD4.js";import"./chunk-XXYPOBWE.js";import"./chunk-GNAV67IP.js";import"./chunk-BHBCNFVT.js";import"./chunk-MMSRIWJW.js";import{c as F,g as C,h as A}from"./chunk-LYZL6OOU.js";import"./chunk-GR5H345L.js";import"./chunk-7UFIGXJN.js";import"./chunk-HR26KU6Y.js";import"./chunk-RY2YJPZB.js";import"./chunk-NHMA6PF3.js";import"./chunk-EJOAWHFA.js";import"./chunk-32FL733E.js";import"./chunk-EXAVYYI6.js";import"./chunk-YTP4376T.js";import"./chunk-C2XHZ3NA.js";import"./chunk-LNWIPI2J.js";import"./chunk-N47SO3LN.js";import"./chunk-XHO5WXLZ.js";import"./chunk-JGQ64Z77.js";import"./chunk-ZHAOO4KQ.js";import{c as O}from"./chunk-OORXVBP2.js";import"./chunk-PKQFNASJ.js";import"./chunk-FU5SUIXP.js";import"./chunk-Z75L764Q.js";import"./chunk-LNBH6JI7.js";import"./chunk-YCU6UMCW.js";import"./chunk-JB5HDI7N.js";import"./chunk-F7IDD2P7.js";import"./chunk-WX6PIOSD.js";import"./chunk-XOWLRMLJ.js";import"./chunk-Q3HVUH4M.js";import"./chunk-NQHICIP4.js";import"./chunk-4UU5GI7S.js";import"./chunk-H7MI4DGJ.js";import"./chunk-C2TWPNK3.js";import"./chunk-NTMP2ELD.js";import"./chunk-5Y6FVWZJ.js";import"./chunk-FUYX4JKG.js";import"./chunk-B54J7MIK.js";import{Da as S,Db as T,L as p,Na as f,Nh as I,R as u,T as m,ba as o,ih as k,mb as b,n as l,nb as v,nh as y,ob as h,pb as g,xh as _,yh as V}from"./chunk-7XPKW7E5.js";import{a as c,b as a,i as d}from"./chunk-SNJLK5AI.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="\u0645\u0642\u0627\u0637\u0639 \u0641\u064A\u062F\u064A\u0648 \u0645\u0646 \u0627\u0634\u062A\u0631\u0627\u0643\u0627\u062A\u0643",[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:"\u0627\u0643\u062A\u0634\u0641 \u0641\u064A\u062F\u064A\u0648\u0647\u0627\u062A"},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:"\u0627\u0644\u0627\u0634\u062A\u0631\u0627\u0643\u0627\u062A"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:8bbaae6e8f892c770558263409b04864bea4163b0f68bbe3358622c96ded4382*///# sourceMappingURL=chunk-B2ALCTNF.js.map