import{a as P,b as w,c as M}from"./chunk-LUT7OCYO.js";import{a as E}from"./chunk-B5JBC766.js";import{a as n}from"./chunk-HLCGCXOF.js";import"./chunk-DIXEORHR.js";import"./chunk-I2QYJB3R.js";import{b as O}from"./chunk-F5WKJ6DQ.js";import"./chunk-5GSL7KQK.js";import{d as F,h as C,i as A}from"./chunk-AOIDTFQF.js";import"./chunk-Y27JC4RP.js";import"./chunk-SVVPH7EA.js";import"./chunk-DUFNITWK.js";import"./chunk-FWHL545W.js";import"./chunk-XNXRO3QV.js";import"./chunk-CRCUANV5.js";import"./chunk-WDJ2CXEX.js";import"./chunk-JFKFZOAL.js";import"./chunk-KDC2ZVHD.js";import"./chunk-5WHIBE26.js";import"./chunk-4YI6M52T.js";import{c as I}from"./chunk-CD6LKOJX.js";import"./chunk-NNPNYAL2.js";import"./chunk-575M5XIS.js";import"./chunk-VTWEWKDW.js";import"./chunk-SGGHB2SK.js";import"./chunk-HEETNPYT.js";import"./chunk-UXUNYBCM.js";import"./chunk-VMNZR6KW.js";import"./chunk-DEP2WUV6.js";import"./chunk-PGFP7J7F.js";import"./chunk-WEFHHX6T.js";import"./chunk-EVSP32E6.js";import"./chunk-NQRZPYWN.js";import"./chunk-3YTPZVZT.js";import"./chunk-BM2X3LA7.js";import"./chunk-GT4XZXGJ.js";import"./chunk-PIPCW6JA.js";import"./chunk-BNT47SCO.js";import"./chunk-URVKOLVP.js";import"./chunk-CHNQDHBM.js";import"./chunk-XKS44PWE.js";import"./chunk-Q77MC6OX.js";import"./chunk-BAXSUHKY.js";import{Ha as m,Hh as k,Ih as V,Q as p,S as u,Sa as S,Xh as _,aa as o,eb as v,m as l,nb as b,ob as f,pb as h,th as T,xb as g,yh as y}from"./chunk-GM43ZGTR.js";import{a as c,b as a,i as d}from"./chunk-SLIYHYWC.js";var R=(()=>{let r=class r{authService=o(T);userSubscription=o(n);hooks=o(_);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=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(()=>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","loadUserVideoPreferences","false","groupByDate","true","highlightLives","false",3,"getVideosObservableFunction","getSyndicationItemsFunction","defaultSort","disabled","headerActions"]];},template:function(i,t){i&1&&(b(0,"h1",1),g(1,0),f(),h(2,"my-videos-list",2)),i&2&&(m(2),v("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,O,F,A,C],children:[{path:"overview",component:w,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(k).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\u0634\u062A\u0631\u0627\u06A9\u200C\u0647\u0627"},reuse:{enabled:!0,key:"subscription-videos-list"}}}]}];export{te as default};/**i18n:aa38438cfc6bb6877c9985433629bf5f310ba8cfd6183982ad2c0c8f601d3935*///# sourceMappingURL=chunk-HRUZZ6GW.js.map