PageSourceSearch

https://ifasttv.com/11.f520f3fb54a4b700bb86.js

js ifasttv.com collected 2026-10-03 23:57:30 UTC 32,253 bytes, 1 lines download raw bytes

1(self.webpackChunkangular_project=self.webpackChunkangular_project||[]).push([[11],{1011:(t,i,e)=>{"use strict";e.r(i),e.d(i,{LibraryModule:()=>bt});var s=e(7111),n=e(3623),a=e(8864),l=e(8909),o=e(4542),r=e(6401),d=e(7716),c=e(2435),u=e(2743),h=e(7511),g=e(8583),y=e(4453),p=e(9374),v=e(4514);let m=(()=>{class t{constructor(t){this.router=t}ngOnInit(){}goToLogin(){this.router.navigate([o.o.SIGN_IN])}}return t.\u0275fac=function(i){return new(i||t)(d.Y36(l.F0))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-library-prelogin"]],decls:12,vars:0,consts:[[1,"text-center","py-36","px-12"],["src","/assets/images/dev/video-clipart.png","alt","no-video-icon",1,"mx-auto","mb-4"],[1,"text-xl","mb-4"],[1,"text-md","text-black-2","mb-8","xl:mx-72"],["nz-button","","nzSize","default","nzType","primary",1,"text-center",3,"click"],[1,"material-icons-outlined","-mt-1"],[1,"text-sm"]],template:function(t,i){1&t&&(d.TgZ(0,"div",0),d._UZ(1,"img",1),d.TgZ(2,"h1",2),d._uU(3,"Keep track of what you watch"),d.qZA(),d.TgZ(4,"p",3),d._uU(5," Sign in to save videos and track your watch history! "),d.qZA(),d.TgZ(6,"button",4),d.NdJ("click",function(){return i.goToLogin()}),d.TgZ(7,"span",5),d._uU(8,"person"),d.qZA(),d._uU(9," \xa0\xa0 "),d.TgZ(10,"span",6),d._uU(11,"Sign In"),d.qZA(),d.qZA(),d.qZA())},directives:[y.ix,p.dQ,v.w],styles:[""]}),t})();var f=e(3109);function L(t,i){1&t&&(d.TgZ(0,"div",4),d._UZ(1,"app-library-prelogin"),d.qZA())}function P(t,i){if(1&t&&(d.TgZ(0,"div",5),d.TgZ(1,"h1",6),d._uU(2,"Library"),d.qZA(),d.TgZ(3,"div",7),d._UZ(4,"ui-chipbar",8),d._UZ(5,"ui-chipbar",9),d._UZ(6,"ui-chipbar",10),d.qZA(),d.qZA()),2&t){const t=d.oxw();
1d.xp6(4),d.Q6J("nzSelected","saved-videos"===t.currentPage),d.xp6(1),d.Q6J("nzSelected","playlist"===t.currentPage),d.xp6(1),d.Q6J("nzSelected","watch-history"===t.currentPage)}}let b=(()=>{class t{constructor(t,i,e,s){this.activatedRoute=t,this.userRestService=i,this.router=e,this.store=s,this.isAuthenticated=!1,this.isActive=!1}ngOnInit(){this.isLoggedIn(),this.isAuthenticated&&this.initLibrary()}isLoggedIn(){this.isAuthenticated=!!this.store.selectSnapshot(r.jq.getAccessToken)}initLibrary(){this.router.navigate([o.o.LIBRARY+"/"+o.o.SAVED_VIDEOS]),this.currentPage=this.activatedRoute.snapshot.firstChild.url[0].path,this.router.events.subscribe(t=>{t instanceof l.m2&&(this.currentPage=this.activatedRoute.snapshot.firstChild.url[0].path)})}}return t.\u0275fac=function(i){return new(i||t)(d.Y36(l.gz),d.Y36(c.F),d.Y36(l.F0),d.Y36(u.yh))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-library-page"]],decls:6,vars:2,consts:[[1,"main-nav-placeholder","bg-theme"],[1,"bg-black-7"],["class","container",4,"ngIf"],["class","",4,"ngIf"],[1,"container"],[1,""],[1,"text-xl"],[1,"mb-6"],["nzText","Saved Videos","nzLink","/library/saved-videos",1,"mr-3",3,"nzSelected"],["nzText","Playlists","nzLink","/library/playlist",1,"mr-3",3,"nzSelected"],["nzText","Watch History","nzLink","/library/watch-history",3,"nzSelected"]],template:function(t,i){1&t&&(d._UZ(0,"div",0),d.TgZ(1,"div",1),d.TgZ(2,"ui-page"),d.YNc(3,L,2,0,"div",2),d.YNc(4,P,7,3,"div",3),d._UZ(5,"router-outlet"),d.qZA(),d.qZA()),2&t&&(d.xp6(3),d.Q6J("ngIf",!i.isAuthenticated),d.xp6(1),d.Q6J("ngIf",i.isAuthenticated))},directives:[h.N,g.O5,l.lC,m,f.G],styles:[""]}),t})();var A=e(7397),T=e(4395),z=e(9765),S=e(905),Z=e(7688),x=e(2340),w=e(6665),V=e(1644),C=e(8058),M=e(6704),I=e(5887),N=e(7674),k=e(8542),_=e(3679),R=e(9376),U=e(6790);const q=["searchForm"];function J(t,i){if(1&t){const t=d.EpF();d.TgZ(0,"input",14,15),d.NdJ("ngModelChange",function(i){return d.CHM(t),d.oxw().inputChanged(i)})("ngModelChange",function(i){return d.CHM(t),d.oxw().searchText=i}),d.qZA()}if(2&t){const t=d.oxw();d.Q6J("ngModel",t.searchText)}}function H(t,i){1&t&&(d.TgZ(0,"span",16),d._uU(1," search "),d.qZA())}function Y(t,i){if(1&t){const t=d.EpF();d.TgZ(0,"button",17),d.NdJ("click",function(){return d.CHM(t),d.oxw().clearInput()}),d.TgZ(1,"span",18),d._uU(2," cancel "),d.qZA(),d.qZA()}if(2&t){const t=d.oxw();d.Q6J("hidden",!t.searchText)}}function D(t,i){if(1&t){const t=d.EpF();d.ynx(0),d.TgZ(1,"ui-video-card",24),d.NdJ("outputAction",function(){const i=d.CHM(t).$implicit;return d.oxw(3).emitClickAction(i)})("outputRemoveVideoAction",function(i){return d.CHM(t),d.oxw(3).removeFromHistory(i)}),d.qZA(),d.BQk()}if(2&t){const t=i.$implicit,e=d.oxw(3);d.xp6(1),d.Q6J("nzCategoryLink",e.routeConstant.VIDEOS+e.routeConstant.LIST+(null==t?null:t.videoId))("nzImage",e.appConstant.JWPLAYER_URL_THUMBNAIL_URL_CONTENT_PATH+t.videoId+e.appConstant.THUMBNAIL_RESOLUTION_FORMAT)("nzCategory",null==t||null==t.categoryModel?null:t.categoryModel.displayName)("nzTitle",null==t?null:t.title)("video",t)("nzDate",null!=t&&t.onDemandDate?null==t?null:t.onDemandDate:null==t?null:t.createdDate)("nzDuration",null==t?null:t.duration)("nzView",null==t?null:t.views)}}function F(t,i){if(1&t&&(d.TgZ(0,"div"),d.TgZ(1,"div",22),d.YNc(2,D,2,8,"ng-container",23),d.qZA(),d.qZA()),2&t){const t=d.oxw(2);d.xp6(2),d.Q6J("ngForOf",t.watchHistory)}}function O(t,i){if(1&t&&(d.TgZ(0,"div",26),d._UZ(1,"img",27),d.TgZ(2,"h1",28),d._uU(3,"Oopss..."),d.qZA(),d.TgZ(4,"p",29),d._uU(5),d.qZA(),d.qZA()),2&t){const t=d.oxw(3);d.xp6(5),d.hij("No result is found with keyword '",t.searchText,"'.")}}function E(t,i){if(1&t&&d.YNc(0,O,6,1,"div",25),2&t){const t=d.oxw(2);d.Q6J("ngIf",!t.isLoading)}}function Q(t,i){if(1&t&&(d.TgZ(0,"div"),d.TgZ(1,"p",19),d._uU(2,"Results"),d.qZA(),d.YNc(3,F,3,1,"div",20),d.YNc(4,E,1,1,"ng-template",null,21,d.W1O),d.qZA()),2&t){const t=d.MAs(5),i=d.oxw();d.xp6(3),d.Q6J("ngIf",0!=i.watchHistory.length)("ngIfElse",t)}}function B(t,i){if(1&t){const t=d.EpF();d.ynx(0),d.TgZ(1,"ui-video-card",24),d.NdJ("outputAction",function(){const i=d.CHM(t).$implicit;return d.oxw(4).emitClickAction(i)})("outputRemoveVideoAction",function(i){return d.CHM(t),d.oxw(4).removeFromHistory(i)}),d.qZA(),d.BQk()}if(2&t){const t=i.$implicit,e=d.oxw(4);d.xp6(1),d.Q6J("nzCategoryLink",e.routeConstant.VIDEOS+e.routeConstant.LIST+(null==t?null:t.videoId))("nzImage",e.appConstant.JWPLAYER_URL_THUMBNAIL_URL_CONTENT_PATH+t.videoId+e.appConstant.THUMBNAIL_RESOLUTION_FORMAT)("nzCategory",null==t||null==t.categoryModel?null:t.categoryModel.displayName)("nzTitle",null==t?null:t.title)("video",t)("nzDate",null!=t&&t.onDemandDate?null==t?null:t.onDemandDate:null==t?null:t.createdDate)("nzDuration",null==t?null:t.duration)("nzView",null==t?null:t.views)}}function $(t,i){if(1&t&&(d.ynx(0),d.TgZ(1,"p",31),d._uU(2),d.qZA(),d.YNc(3,B,2,8,"ng-container",23),d.BQk()),2&t){const t=i.$implicit;d.xp6(2),d.Oqu(t.periodName),d.xp6(1),d.Q6J("ngForOf",null==t?null:t.videos)}}function W(t,i){if(1&t&&(d.TgZ(0,"div"),d.TgZ(1,"div",22),d.YNc(2,$,4,2,"ng-container",23),d.qZA(),d.qZA()),2&t){const t=d.oxw(2);d.xp6(2),d.Q6J("ngForOf",t.watchHistoryByPeriod)}}function j(t,i){1&t&&(d.TgZ(0,"div",26),d._UZ(1,"img",27),d.TgZ(2,"h1",28),d._uU(3,"No viewing history"),d.qZA(),d.TgZ(4,"p",29),d._uU(5,"Try watching some videos!"),d.qZA(),d.qZA())}function X(t,i){if(1&t&&d.YNc(0,j,6,0,"div",25),2&t){const t=d.oxw(2);d.Q6J("ngIf",!t.isLoading)}}function G(t,i){if(1&t&&(d.TgZ(0,"div"),d.YNc(1,W,3,1,"div",20),d.YNc(2,X,1,1,"ng-template",null,30,d.W1O),d.qZA()),2&t){const t=d.MAs(3),i=d.oxw();d.xp6(1),d.Q6J("ngIf",0!=i.watchHistoryByPeriod.length)("ngIfElse",t)}}function K(t,i){1&t&&d._UZ(0,"nz-skeleton",32),2&t&&d.Q6J("nzActive",!0)}function tt(t,i){if(1&t){const t=d.EpF();d.ynx(0),d.TgZ(1,"div",33),d.TgZ(2,"div",34),d._uU(3," Clear watch history? "),d.qZA(),d.TgZ(4,"div",35),d._uU(5," Your iFAST TV watch history will be cleared from your account. "),d.qZA(),d.TgZ(6,"div",36),d.TgZ(7,"button",37),d.NdJ("click",function(){return d.CHM(t),d.oxw().handleRemoveCancel()}),d._uU(8,"Cancel"),d.qZA(),d._uU(9," \xa0\xa0\xa0 "),d.TgZ(10,"button",38),d.NdJ("click",function(){return d.CHM(t),d.oxw().handleRemoveOk()}),d._uU(11,"Yes"),d.qZA(),d.qZA(),d.qZA(),d.BQk()}}let it=(()=>{class t{constructor(t,i,e,s,n){this.socialRestService=t,this.userRestService=i,this.router=e,this.store=s,this.nzMessageService=n,this.routeConstant=o.o,this.appConstant=A.$,this.watchHistory=[],this.watchHistoryByPeriod=[],this.isLoading=!1,this.isRefreshed=!1,this.searchText="",this.currentPage=0,this.searchTextChanged=new z.xQ,this.debounceTime=500,this.pageSize=10,this.isLastPage=!1,this.environment=x.N,this.datePeriodList=[],this.isClearLoading=!1,this.isRemoveModalVisible=!1,this.isAuthenticated=!1,this.fulldays=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],this.months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],this.totalDaysInMthCommon=[31,28,31,30,31,30,31,31,30,31,30,31],this.totalDaysInMthLeap=[31,29,31,30,31,30,31,31,30,31,30,31]}ngOnInit(){this.isLoggedIn()?(this.getWatchHistory(),setTimeout(()=>this.isRefreshed=!0,10),this.getSearchText()):this.router.navigate([o.o.LIBRARY])}isLoggedIn(){return this.store.selectSnapshot(r.jq.getAccessToken)}getWatchHistory(t=!1){this.isLastPage=!1,this.isLoading=!0,this.socialRestService.getWatchedHistoryList(this.currentPage,this.pageSize,this.searchText).subscribe(i=>{i.data&&i.status===A.$.STATUS_SUCCESS&&(this.watchHistory=(0,S.p)((0,Z.o)(this.watchHistory.concat(i.data.result),"videoId")),t||this.groupWatchHistoryByPeriod(i.data.result),this.currentPage++,i.data.result.length<this.pageSize&&(this.isLastPage=!0)),this.isLoading=!1})}emitClickAction(t){this.router.navigate(["../"+o.o.VIDEOS+o.o.LIST,t.videoId,(0,w.b)(t.title)])}getSearchText(){this.searchTextChanged.pipe((0,T.b)(this.debounceTime)).subscribe(()=>{this.watchHistory=[],this.currentPage=0,this.isLastPage=!1,""!=this.searchText?this.getWatchHistory(!0):(this.datePeriodList=[],this.watchHistoryByPeriod=[],this.getWatchHistory())})}inputChanged(t){this.searchTextChanged.next(t)}clearInput(){this.searchText="",this.searchForm.nativeElement.focus(),this.watchHistory=[],this.watchHistoryByPeriod=[],this.datePeriodList=[],this.currentPage=0,this.isLastPage=!1,this.getWatchHistory()}removeFromHistory(t){this.socialRestService.deleteHistory(t.videoId).subscribe(i=>{i.data&&i.status===A.$.STATUS_SUCCESS?(this.nzMessageService.success("Video removed from watched history successfully"),this.removeVideoCard(t.videoId)):this.nzMessageService.error("Failed to remove video from watched history")})}removeVideoCard(t){this.watchHistory=this.watchHistory.filter(i=>i.videoId!==t);for(let i of this.watchHistoryByPeriod)i.videos=i.videos.filter(i=>i.videoId!==t)}findPeriod(t){let i=new Date(t),e=i.getDate(),s=new Date,n=this.months[i.getMonth()],a=s.getDate()-e,l=s.getMonth()-i.getMonth(),o=s.getFullYear()-i.getFullYear();return 0===o&&0===a&&0===l?"Today":0===o&&0===l&&1===a||1===o&&-11===l&&-30===a||0===o&&1===l&&a+this.getLastMthTotalDays(s)===1?"Yesterday":0===o&&0===l&&a>1&&a<7||1===o&&-11===l&&a>-30&&a<-24||0===o&&1===l&&a+this.getLastMthTotalDays(s)>1&&a+this.getLastMthTotalDays(s)<7?this.fulldays[i.getDay()]:e+" "+n+" "+new Date(t).getFullYear()}checkSameDatePeriod(t,i){return t.day===i.day&&t.month===i.month&&t.year===i.year}groupWatchHistoryByPeriod(t){for(let i of t){let t={day:new Date(i.watchedDate).getDate(),month:new Date(i.watchedDate).getMonth()+1,year:new Date(i.watchedDate).getFullYear()};if(!this.datePeriodList.some(i=>i.day===t.day&&i.month===t.month&&i.year===t.year)){this.datePeriodList.push(t);let e={datePeriod:t,periodName:this.findPeriod(i.watchedDate),videos:[]};this.watchHistoryByPeriod.push(e)}this.watchHistoryByPeriod.filter(i=>this.checkSameDatePeriod(i.datePeriod,t))[0].videos.push(i)}}showRemoveModal(){this.isRemoveModalVisible=!0}handleRemoveOk(){this.removeAllHistory(),this.isRemoveModalVisible=!1}handleRemoveCancel(){this.isRemoveModalVisible=!1}removeAllHistory(){this.isClearLoading=!0,this.socialRestService.deleteAllHistory().subscribe(t=>{t.data&&t.status===A.$.STATUS_SUCCESS?(this.watchHistory=[],this.watchHistoryByPeriod=[],this.datePeriodList=[],this.currentPage=0,this.isLastPage=!1,this.nzMessageService.success("All history cleared successfully")):this.nzMessageService.error("Failed to clear all history"),this.isClearLoading=!1})}onWindowScrollAndResize(){let t,i=(document.documentElement.scrollTop||document.body.scrollTop)+document.documentElement.offsetHeight,e=document.documentElement.scrollHeight;t=window.innerWidth>1197?450:window.innerWidth>770?620:850,i>=e-t&&(this.isLastPage||this.isLoading||this.getWatchHistory())}checkIsLeapYear(t){return t%4==0&&t%100!=0||t%400==0}getLastMthTotalDays(t){return this.checkIsLeapYear(t.getFullYear())?this.totalDaysInMthLeap[t.getMonth()-1]:this.totalDaysInMthCommon[t.getMonth()-1]}}return t.\u0275fac=function(i){return new(i||t)(d.Y36(V.w),d.Y36(c.F),d.Y36(l.F0),d.Y36(u.yh),d.Y36(C.dD))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-watch-history"]],viewQuery:function(t,i){if(1&t&&d.Gf(q,5),2&t){let t;d.iGM(t=d.CRH())&&(i.searchForm=t.first)}},hostBindings:function(t,i){1&t&&d.NdJ("scroll",function(t){return i.onWindowScrollAndResize(t)}
1,!1,d.Jf7)("resize",function(t){return i.onWindowScrollAndResize(t)},!1,d.Jf7)},decls:20,vars:10,consts:[[1,"grid","grid-cols-24"],[1,"col-span-24","lg:col-span-20","mb-4"],[1,"w-full","lg:w-7/12",3,"nzSuffix","nzPrefix"],["name","searchForm","autocomplete","off","nz-input","","nz-input","","placeholder","Search watch history","ui-autofocus","",3,"ngModel","ngModelChange",4,"ngIf"],["prefixTemplate",""],["suffixTemplate",""],[1,"flex","justify-end","col-span-24","mb-4","lg:mb-0","lg:block","lg:justify-start","lg:col-span-4"],["nz-button","","nzType","default",1,"text-xs","font-bold",3,"nzLoading","disabled","click"],[1,"material-icons-outlined","-mt-1"],[1,"w-full","lg:w-9/12"],[4,"ngIf"],["class","py-4",3,"nzActive",4,"ngIf"],["nzClosable","false",3,"nzVisible","nzFooter","nzVisibleChange","nzOnCancel","nzOnOk"],[4,"nzModalContent"],["name","searchForm","autocomplete","off","nz-input","","nz-input","","placeholder","Search watch history","ui-autofocus","",3,"ngModel","ngModelChange"],["searchForm",""],[1,"material-icons-outlined","text-primary-200"],[3,"hidden","click"],[1,"material-icons-outlined","text-black-3"],[1,"text-md","text-black-2","font-bold"],[4,"ngIf","ngIfElse"],["noResult",""],[1,"mb-0"],[4,"ngFor","ngForOf"],["nzType","history",3,"nzCategoryLink","nzImage","nzCategory","nzTitle","video","nzDate","nzDuration","nzView","outputAction","outputRemoveVideoAction"],["class","text-center py-8",4,"ngIf"],[1,"text-center","py-8"],["src","/assets/images/dev/video-clipart.png","alt","no-video-icon",1,"mx-auto","mb-4"],[1,"text-xl"],[1,"text-md","text-black-2"],["noHistory",""],[1,"text-md","text-black-2","font-bold","mt-12"],[1,"py-4",3,"nzActive"],[1,"text-center"],[1,"text-md","font-bold","mt-8","mb-2"],[1,"mb-5"],[1,"text-xs","font-bold","mb-2"],["nz-button","","nzType","default",1,"mb-5","w-28",3,"click"],["nz-button","","nzType","primary",1,"mb-5","w-28",3,"click"]],template:function(t,i){if(1&t&&(d.TgZ(0,"div",0),d.TgZ(1,"nz-form-control",1),d.TgZ(2,"nz-input-group",2),d.YNc(3,J,2,1,"input",3),d.qZA(),d.YNc(4,H,2,0,"ng-template",null,4,d.W1O),d.YNc(6,Y,3,1,"ng-template",null,5,d.W1O),d.qZA(),d.TgZ(8,"div",6),d.TgZ(9,"button",7),d.NdJ("click",function(){return i.showRemoveModal()}),d.TgZ(10,"span",8),d._uU(11,"delete_forever"),d.qZA(),d._uU(12," \xa0Clear All History "),d.qZA(),d.qZA(),d.qZA(),d._UZ(13,"hr"),d.TgZ(14,"div",9),d.YNc(15,Q,6,2,"div",10),d.YNc(16,G,4,2,"div",10),d.YNc(17,K,1,1,"nz-skeleton",11),d.qZA(),d.TgZ(18,"nz-modal",12),d.NdJ("nzVisibleChange",function(t){return i.isRemoveModalVisible=t})("nzOnCancel",function(){return i.handleRemoveCancel()})("nzOnOk",function(){return i.handleRemoveOk()}),d.YNc(19,tt,12,0,"ng-container",13),d.qZA()),2&t){const t=d.MAs(5),e=d.MAs(7);d.xp6(2),d.Q6J("nzSuffix",e)("nzPrefix",t),d.xp6(1),d.Q6J("ngIf",i.isRefreshed),d.xp6(6),d.Q6J("nzLoading",i.isClearLoading)("disabled",i.isLoading||0===i.watchHistoryByPeriod.length),d.xp6(6),d.Q6J("ngIf",""!==i.searchText),d.xp6(1),d.Q6J("ngIf",""===i.searchText),d.xp6(1),d.Q6J("ngIf",i.isLoading),d.xp6(1),d.Q6J("nzVisible",i.isRemoveModalVisible)("nzFooter",null)}},directives:[M.t3,I.Fd,v.w,N.gB,N.ke,g.O5,y.ix,p.dQ,k.du,k.Hf,N.Zp,_.Fj,_.JJ,_.On,g.sg,R.r,U.ng],styles:[""]}),t})();var et=e(1571),st=e(9484),nt=e(3203);function at(t,i){1&t&&(d.TgZ(0,"div",7),d._UZ(1,"img",8),d.TgZ(2,"h1",9),d._uU(3,"No videos saved yet"),d.qZA(),d.TgZ(4,"p",10),d._uU(5,"Select the 'Save' button under each video to add them to this list!"),d.qZA(),d.qZA())}function lt(t,i){if(1&t){const t=d.EpF();d.ynx(0),d.TgZ(1,"ui-video-card",11),d.NdJ("outputAction",function(){const i=d.CHM(t).$implicit;return d.oxw().emitClickAction(i)})("outputRemoveVideoAction",function(i){return d.CHM(t),d.oxw().removeFromSavedVideolist(i)})("outputAddIntoPlaylistModalAction",function(i){return d.CHM(t),d.oxw().openAddPlaylistModal(i)}),d.qZA(),d.BQk()}if(2&t){const t=i.$implicit,e=d.oxw();d.xp6(1),d.Q6J("nzCategoryLink",e.routeConstant.VIDEOS+e.routeConstant.LIST+(null==t?null:t.videoId))("nzImage",e.appConstant.JWPLAYER_URL_THUMBNAIL_URL_CONTENT_PATH+(null==t?null:t.videoId)+e.appConstant.THUMBNAIL_RESOLUTION_FORMAT)("nzCategory",null==t||null==t.categoryModel?null:t.categoryModel.displayName)("nzTitle",null==t?null:t.title)("video",t)("nzDuration",null==t?null:t.duration)("nzDate",null!=t&&t.onDemandDate?null==t?null:t.onDemandDate:null==t?null:t.createdDate)("nzView",null==t?null:t.views)}}function ot(t,i){1&t&&d._UZ(0,"nz-skeleton",12),2&t&&d.Q6J("nzActive",!0)}function rt(t,i){if(1&t){const t=d.EpF();d.TgZ(0,"div",13),d.TgZ(1,"a",14),d.NdJ("click",function(){return d.CHM(t),d.oxw().getSavedVideos()}),d.TgZ(2,"a",15),d._uU(3," See All "),d.TgZ(4,"span",16),d._uU(5," keyboard_arrow_down "),d.qZA(),d.qZA(),d.qZA(),d.qZA()}}let dt=(()=>{class t{constructor(t,i,e,s,n){this.socialRestService=t,this.userRestService=i,this.router=e,this.store=s,this.nzMessageService=n,this.playlists=[],this.tickedPlaylists=[],this.appConstant=A.$,this.routeConstant=o.o,this.isLoading=!0,this.isAddPlaylistModalVisible=!1,this.createNewPlayListModalVisible=!1,this.renamePlayListModalVisible=!1,this.savedVideoList=[],this.isLastPage=!1,this.currentPage=0,this.pageSize=8,this.environment=x.N,this.isPlaylistLoading=!1,this.isPlaylistLastPage=!1,this.currentPlaylistPage=0,this.fallbackThumbnailUrl="/assets/images/fallback/default-fallback.jpg",this.isAuthenticated=!1}ngOnInit(){this.isLoggedIn()?(this.getSavedVideos(),this.initPlayList()):this.router.navigate([o.o.LIBRARY])}initPlayList(){this.playlists=[],this.isPlaylistLastPage=!1;let t=[];this.isPlaylistLoading=!0;let i=[];this.socialRestService.readPlaylist(0,this.pageSize).subscribe(e=>{var s,n;t=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.result,t&&(t.forEach(t=>{i.push(this.socialRestService.readVideosInPlaylistV2(t.playListId))}),0===(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.result.length)&&(this.isPlaylistLoading=!1),(0,et.$R)(...i).subscribe(i=>{this.isPlaylistLoading=!1;for(let e=0;e<t.length;e++)t[e].playListVideos=i[e].data,this.playlists=(0,S.p)(t)}))})}
1readMorePlayList(){this.currentPlaylistPage++;let t=[];this.isPlaylistLoading=!0;let i=[];this.socialRestService.readPlaylist(this.currentPlaylistPage,this.pageSize).subscribe(e=>{var s,n,a,l,o;t=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.result,this.isPlaylistLastPage=(null===(a=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.result)||void 0===a?void 0:a.length)<this.pageSize,null===(o=null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.result)||void 0===o||o.forEach(t=>{i.push(this.socialRestService.readVideosInPlaylistV2(t.playListId))}),0===i.length?this.isPlaylistLoading=!1:(0,et.$R)(...i).subscribe(i=>{var e;this.isPlaylistLoading=!1;for(let s=0;s<t.length;s++)t[s].playListVideos=null===(e=i[s])||void 0===e?void 0:e.data;this.playlists=(0,S.p)(this.playlists.concat(t))})})}isLoggedIn(){return this.store.selectSnapshot(r.jq.getAccessToken)}getSavedVideos(){this.isLoading=!0,this.socialRestService.getSavedVideoList(this.currentPage,this.pageSize).subscribe(t=>{t.data&&t.status===A.$.STATUS_SUCCESS&&(this.savedVideoList=(0,S.p)((0,Z.o)(this.savedVideoList.concat(t.data.result),"videoId")),this.isLastPage=t.data.result.length<this.pageSize,this.isLoading=!1,this.currentPage++)})}reloadSavedVideo(){this.isLoading=!0,this.savedVideoList=[],this.socialRestService.getSavedVideoList(0,this.pageSize).subscribe(t=>{t.data&&t.status===A.$.STATUS_SUCCESS&&(this.savedVideoList=t.data.result,this.isLastPage=t.data.result.length<this.pageSize,this.isLoading=!1,this.currentPage++)}),this.initPlayList()}emitClickAction(t){console.log(t),this.router.navigate(["../"+o.o.VIDEOS+o.o.LIST,t.videoId,(0,w.b)(t.title)])}removeFromSavedVideolist(t){this.socialRestService.deleteSaved(t.videoId).subscribe(i=>{i.data&&i.status===A.$.STATUS_SUCCESS?(this.nzMessageService.remove(),this.nzMessageService.success("Video removed from saved videos successfully"),this.removeVideoCard(t.videoId)):this.nzMessageService.error("Failed to remove video from saved videos")})}removeVideoCard(t){this.savedVideoList=this.savedVideoList.filter(i=>i.videoId!==t)}removePlaylistCard(t){this.playlists=this.playlists.filter(i=>i.playListId!=t)}openAddPlaylistModal(t){this.selectedVideo=(0,S.p)(t),this.isAddPlaylistModalVisible=!0}createNewPlaylistModalVisibleChg(){this.createNewPlayListModalVisible=!0,this.isAddPlaylistModalVisible=!1,this.initPlayList()}tickPlaylists(t){this.tickedPlaylists=(0,S.p)(t)}addToPlaylistModalVisibleChg(t){this.createNewPlayListModalVisible=!1,this.isAddPlaylistModalVisible=t}}return t.\u0275fac=function(i){return new(i||t)(d.Y36(V.w),d.Y36(c.F),d.Y36(l.F0),d.Y36(u.yh),d.Y36(C.dD))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-library-page"]],decls:7,vars:9,consts:[["class","text-center py-8",4,"ngIf"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-4","gap-8","px-6","md:px-0","sm:gap-4"],[4,"ngFor","ngForOf"],["class","py-4",3,"nzActive",4,"ngIf"],["class","flex justify-center py-6",4,"ngIf"],[3,"nzVisible","video","nzVisibleChange","nzAddNewPlayListModalVisibleChange","tickPlaylistsEvent"],[3,"nzVisible","video","playlists","createPlaylistEmitter","nzVisibleChange","nzAddToPlayListModalVisibleChange"],[1,"text-center","py-8"],["src","/assets/images/dev/video-clipart.png","alt","no-video-icon",1,"mx-auto","mb-4"],[1,"text-xl"],[1,"text-md","text-black-2"],["nzType","share",3,"nzCategoryLink","nzImage","nzCategory","nzTitle","video","nzDuration","nzDate","nzView","outputAction","outputRemoveVideoAction","outputAddIntoPlaylistModalAction"],[1,"py-4",3,"nzActive"],[1,"flex","justify-center","py-6"],[1,"link",3,"click"],[1,"text-sm"],[1,"material-icons-outlined","text-md"]],template:function(t,i){1&t&&(d.YNc(0,at,6,0,"div",0),d.TgZ(1,"div",1),d.YNc(2,lt,2,8,"ng-container",2),d.qZA(),d.YNc(3,ot,1,1,"nz-skeleton",3),d.YNc(4,rt,6,0,"div",4),d.TgZ(5,"ui-add-to-playlist-modal",5),d.NdJ("nzVisibleChange",function(t){return i.isAddPlaylistModalVisible=t})("nzVisibleChange",function(){return i.reloadSavedVideo()})("nzAddNewPlayListModalVisibleChange",function(){return i.createNewPlaylistModalVisibleChg()})("tickPlaylistsEvent",function(t){return i.tickPlaylists(t)}),d.qZA(),d.TgZ(6,"ui-create-new-playlist-modal",6),d.NdJ("createPlaylistEmitter",function(){return i.initPlayList()})("nzVisibleChange",function(t){return i.createNewPlayListModalVisible=t})("nzAddToPlayListModalVisibleChange",function(t){return i.addToPlaylistModalVisibleChg(t)}),d.qZA()),2&t&&(d.Q6J("ngIf",!i.isLoading&&0===i.savedVideoList.length),d.xp6(2),d.Q6J("ngForOf",i.savedVideoList),d.xp6(1),d.Q6J("ngIf",i.isLoading),d.xp6(1),d.Q6J("ngIf",!i.isLastPage&&!i.isLoading),d.xp6(1),d.Q6J("nzVisible",i.isAddPlaylistModalVisible)("video",i.selectedVideo),d.xp6(1),d.Q6J("nzVisible",i.createNewPlayListModalVisible)("video",i.selectedVideo)("playlists",i.tickedPlaylists))},directives:[g.O5,g.sg,st.B,nt.p,R.r,U.ng],styles:[""]}),t})();var ct=e(7707);function ut(t,i){1&t&&d._UZ(0,"nz-skeleton",12),2&t&&d.Q6J("nzActive",!0)}function ht(t,i){if(1&t){const t=d.EpF();d.ynx(0),d.TgZ(1,"ui-video-card",13),d.NdJ("outputClickPlaylistAction",function(){const i=d.CHM(t).$implicit;return d.oxw().emitClickPlaylistAction(i)})("renamePlaylistAction",function(i){const e=d.CHM(t).$implicit;return d.oxw().renamePlaylist(e,i)})("removePlaylistAction",function(){const i=d.CHM(t).$implicit;return d.oxw().removePlaylist(i)}),d.qZA(),d.BQk()}if(2&t){const t=i.$implicit,e=d.oxw();d.xp6(1),d.Q6J("playlistThumbnail",null!=t&&t.playListVideos?e.appConstant.JWPLAYER_URL_THUMBNAIL_URL_CONTENT_PATH+(null==t||null==t.playListVideos[0]?null:t.playListVideos[0].videoId)+e.appConstant.THUMBNAIL_RESOLUTION_FORMAT:e.fallbackThumbnailUrl)("playlist",t)("nzTitle",null==t?null:t.playListName)}}function gt(t,i){if(1&t){const t=d.EpF();d.TgZ(0,"button",14),d.NdJ("click",function(){return d.CHM(t),d.oxw().readMorePlayList()}),d._uU(1,"Load more "),d.qZA()}}function yt(t,i){1&t&&(d.TgZ(0,"div",15),d._UZ(1,"img",16),d.TgZ(2,"h1",17),d._uU(3,"No playlist created yet"),d.qZA(),d.TgZ(4,"p",18),d._uU(5,"Playlists you created or saved will be shown here."),d.qZA(),d.qZA())}let pt=(()=>{class t{constructor(t,i,e,s,n){this.socialRestService=t,this.userRestService=i,this.router=e,this.store=s,this.nzMessageService=n,this.playlists=[],this.appConstant=A.$,this.routeConstant=o.o,this.isLoading=!0,this.isAddPlaylistModalVisible=!1,this.createNewPlayListModalVisible=!1,this.renamePlayListModalVisible=!1,this.savedVideoList=[],this.isLastPage=!1,this.currentPage=0,this.pageSize=8,this.environment=x.N,this.isPlaylistLoading=!1,this.isPlaylistLastPage=!1,this.currentPlaylistPage=0,this.fallbackThumbnailUrl="/assets/images/fallback/default-fallback.jpg",this.isAuthenticated=!1}ngOnInit(){this.isLoggedIn()?this.initPlayList():this.router.navigate([o.o.LIBRARY])}initPlayList(){this.playlists=[],this.isPlaylistLastPage=!1;let t=[];this.isPlaylistLoading=!0;let i=[];this.socialRestService.readPlaylist(0,this.pageSize).subscribe(e=>{var s,n;t=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.result,t&&(t.forEach(t=>{i.push(this.socialRestService.readVideosInPlaylistV2(t.playListId))}),0===(null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.result.length)&&(this.isPlaylistLoading=!1),(0,et.$R)(...i).subscribe(i=>{this.isPlaylistLoading=!1;for(let e=0;e<t.length;e++)t[e].playListVideos=i[e].data,this.playlists=(0,S.p)(t)}))})}
1readMorePlayList(){this.currentPlaylistPage++;let t=[];this.isPlaylistLoading=!0;let i=[];this.socialRestService.readPlaylist(this.currentPlaylistPage,this.pageSize).subscribe(e=>{var s,n,a,l,o;t=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s.result,this.isPlaylistLastPage=(null===(a=null===(n=null==e?void 0:e.data)||void 0===n?void 0:n.result)||void 0===a?void 0:a.length)<this.pageSize,null===(o=null===(l=null==e?void 0:e.data)||void 0===l?void 0:l.result)||void 0===o||o.forEach(t=>{i.push(this.socialRestService.readVideosInPlaylistV2(t.playListId))}),0===i.length?this.isPlaylistLoading=!1:(0,et.$R)(...i).subscribe(i=>{var e;this.isPlaylistLoading=!1;for(let s=0;s<t.length;s++)t[s].playListVideos=null===(e=i[s])||void 0===e?void 0:e.data;this.playlists=(0,S.p)(this.playlists.concat(t))})})}isLoggedIn(){return this.store.selectSnapshot(r.jq.getAccessToken)}reloadSavedVideo(){this.isLoading=!0,this.savedVideoList=[],this.socialRestService.getSavedVideoList(0,this.pageSize).subscribe(t=>{t.data&&t.status===A.$.STATUS_SUCCESS&&(this.savedVideoList=t.data.result,this.isLastPage=t.data.result.length<this.pageSize,this.isLoading=!1,this.currentPage++)}),this.initPlayList()}emitClickAction(t){console.log(t),this.router.navigate(["../"+o.o.VIDEOS+o.o.LIST,t.videoId,(0,w.b)(t.title)])}emitClickPlaylistAction(t){var i;if((null===(i=null==t?void 0:t.playListVideos)||void 0===i?void 0:i.length)>0){const i=t.playListVideos[0];this.router.navigate(["../"+o.o.VIDEOS+o.o.LIST,i.videoId,(0,w.b)(i.title)],{queryParams:{playListId:t.playListId}})}else this.nzMessageService.remove(),this.nzMessageService.info("The playlist is empty")}removePlaylist(t){this.socialRestService.deletePlaylist(t.playListId).subscribe(t=>{t.data&&t.status===A.$.STATUS_SUCCESS?(this.nzMessageService.remove(),this.nzMessageService.success("Playlist was removed successfully"),this.initPlayList()):(this.nzMessageService.remove(),this.nzMessageService.error("Failed to remove playlist"),this.initPlayList())})}renamePlaylist(t,i){this.selectedPlaylist=t,this.renamePlayListModalVisible=!0,console.log(this.selectedPlaylist)}removePlaylistCard(t){this.playlists=this.playlists.filter(i=>i.playListId!=t)}createNewPlaylistModalVisibleChg(){this.createNewPlayListModalVisible=!0,this.isAddPlaylistModalVisible=!1,this.initPlayList()}}return t.\u0275fac=function(i){return new(i||t)(d.Y36(V.w),d.Y36(c.F),d.Y36(l.F0),d.Y36(u.yh),d.Y36(C.dD))},t.\u0275cmp=d.Xpm({type:t,selectors:[["app-playlist-page"]],decls:16,vars:11,consts:[[3,"nzJustify"],["nz-button","","nzBlock","",1,"btn-outline","mb-5",3,"click"],[1,"material-icons-outlined","mr-3"],[3,"nzActive",4,"ngIf"],[1,"grid","grid-cols-1","md:grid-cols-2","lg:grid-cols-4","gap-8","px-6","md:px-0","sm:gap-4"],[4,"ngFor","ngForOf"],[1,"text-center","mt-7"],["class","btn-outline","nz-button","","nzSize","small",3,"click",4,"ngIf"],["class","text-center py-8",4,"ngIf"],[3,"nzVisible","video","nzVisibleChange","nzAddNewPlayListModalVisibleChange"],[3,"nzVisible","video","createPlaylistEmitter","nzVisibleChange"],[3,"nzVisible","playlist","renamePlaylistEmitter","nzVisibleChange"],[3,"nzActive"],["nzType","playlist",3,"playlistThumbnail","playlist","nzTitle","outputClickPlaylistAction","renamePlaylistAction","removePlaylistAction"],["nz-button","","nzSize","small",1,"btn-outline",3,"click"],[1,"text-center","py-8"],["src","/assets/images/dev/video-clipart.png","alt","no-video-icon",1,"mx-auto","mb-4"],[1,"text-xl"],[1,"text-md","text-black-2"]],template:function(t,i){1&t&&(d.TgZ(0,"nz-row",0),d._UZ(1,"nz-col"),d.TgZ(2,"nz-col"),d.TgZ(3,"button",1),d.NdJ("click",function(){return i.createNewPlaylistModalVisibleChg()}),d.TgZ(4,"span",2),d._uU(5," add "),d.qZA(),d._uU(6," Create New Playlist "),d.qZA(),d.qZA(),d.qZA(),d.YNc(7,ut,1,1,"nz-skeleton",3),d.TgZ(8,"div",4),d.YNc(9,ht,2,3,"ng-container",5),d.qZA(),d.TgZ(10,"div",6),d.YNc(11,gt,2,0,"button",7),d.qZA(),d.YNc(12,yt,6,0,"div",8),d.TgZ(13,"ui-add-to-playlist-modal",9),d.NdJ("nzVisibleChange",function(t){return i.isAddPlaylistModalVisible=t})("nzVisibleChange",function(){return i.reloadSavedVideo()})("nzAddNewPlayListModalVisibleChange",function(){return i.createNewPlaylistModalVisibleChg()}),d.qZA(),d.TgZ(14,"ui-create-new-playlist-modal",10),d.NdJ("createPlaylistEmitter",function(){return i.initPlayList()})("nzVisibleChange",function(t){return i.createNewPlayListModalVisible=t}),d.qZA(),d.TgZ(15,"ui-rename-playlist-modal",11),d.NdJ("renamePlaylistEmitter",function(){return i.initPlayList()})("nzVisibleChange",function(t){return i.renamePlayListModalVisible=t}),d.qZA()),2&t&&(d.Q6J("nzJustify","space-between"),d.xp6(7),d.Q6J("ngIf",i.isPlaylistLoading),d.xp6(2),d.Q6J("ngForOf",i.playlists),d.xp6(2),d.Q6J("ngIf",!i.isPlaylistLastPage&&!i.isPlaylistLoading&&i.playlists.length>7),d.xp6(1),d.Q6J("ngIf",0===i.playlists.length&&!i.isPlaylistLoading),d.xp6(1),d.Q6J("nzVisible",i.isAddPlaylistModalVisible)("video",i.selectedVideo),d.xp6(1),d.Q6J("nzVisible",i.createNewPlayListModalVisible)("video",i.selectedVideo),d.xp6(1),d.Q6J("nzVisible",i.renamePlayListModalVisible)("playlist",i.selectedPlaylist))}
1,directives:[M.SK,M.t3,y.ix,p.dQ,v.w,g.O5,g.sg,st.B,nt.p,ct.S,U.ng,R.r],styles:[""]}),t})();var vt=e(6933);const mt=[{path:o.o.LIBRARY,component:b,canActivate:[vt.u],data:{title:"iFAST TV - Library"},children:[{path:o.o.SAVED_VIDEOS,component:dt},{path:o.o.WATCH_HISTORY,component:it},{path:o.o.PLAYLIST_ROUTE,component:pt}]}];let ft=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=d.oAB({type:t}),t.\u0275inj=d.cJS({imports:[[l.Bz.forChild(mt)],l.Bz]}),t})();var Lt=e(8068),Pt=e(3464);let bt=(()=>{class t{}return t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=d.oAB({type:t}),t.\u0275inj=d.cJS({imports:[[a.m,ft,n.U,s.e,I.U5,Lt.c,Pt.r]]}),t})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.