1import{g as qe,j as He}from"./chunk-WMHBLRGJ.js";import{C as ce,I as Ue,Ka as U,L as w,Ma as V,Na as G,P as ve,Qa as L,R as Y,S as K,Sa as je,T,U as h,V as X,W as Q,X as J,Y as Z,Z as ee,_ as te,a as O,aa as Ge,ba as Le,bb as ie,cb as ne,d as k,db as $e,h as z,ia as R,l as Re,m as ye,ma as N,qa as Fe,tb as Be,y as W}from"./chunk-OPRI43SY.js";import{$b as Oe,Ba as P,Cb as Ve,Db as De,Ea as i,Fa as t,Ga as p,K as be,Ka as S,Ma as _,Na as d,R as v,S as x,Va as r,Wa as b,Xa as u,Ya as we,Yb as Me,Za as Ne,_b as se,a as E,ac as ke,b as $,ca as D,d as Pe,db as I,dc as Ae,fa as l,fb as B,hb as C,ib as y,jb as q,ka as g,ma as A,na as Ee,ra as f,vb as H,wa as c,wb as M,za as le,zb as F}from"./chunk-X7ZAHRI3.js";var ze=()=>[],mt=(a,m)=>({itemsPerPage:a,currentPage:m});function pt(a,m){if(a&1&&(i(0,"option",27),r(1),C(2,"titlecase"),t()),a&2){let e=m.$implicit,o=d();c("value",e),l(),b(y(2,2,o.formatType(e)))}}function dt(a,m){a&1&&p(0,"loading-icon")}function ut(a,m){a&1&&p(0,"app-page-loader",28),a&2&&c("noPadding",!0)}function gt(a,m){a&1&&(i(0,"div",29)(1,"div")(2,"h4"),r(3,"No Complaints found"),t()()())}function ft(a,m){if(a&1&&p(0,"img",42),a&2){let e=d().$implicit,o=d(2);c("src",o.getURL(e.creator==null?null:e.creator.avatar),D)}}function ht(a,m){if(a&1&&p(0,"img",42),a&2){let e=d(3);c("src",e.defaultAvatar,D)}}function _t(a,m){a&1&&p(0,"iconify",43),a&2&&le("color: green;")}function vt(a,m){if(a&1){let e=S();i(0,"button",41),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Un-flag Creator"),t()}}function xt(a,m){if(a&1){let e=S();i(0,"button",44),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Flag Creator"),t()}}function St(a,m){if(a&1){let e=S();i(0,"tr")(1,"td",36),r(2),t(),i(3,"td",36),r(4),C(5,"titlecase"),t(),i(6,"td",36),r(7),t(),i(8,"td"),r(9),t(),i(10,"td",36),f(11,ft,1,1,"img",37)(12,ht,1,1,"img",37),r(13),C(14,"titlecase"),f(15,_t,1,2,"iconify",38),t(),i(16,"td",36),r(17),t(),i(18,"td"),r(19),t(),i(20,"td",36),r(21),t(),i(22,"td",36),f(23,vt,2,0,"button",39)(24,xt,2,0,"button",40),t(),i(25,"td",36)(26,"button",41),_("click",function(){let n=v(e).$implicit,s=d(2);return x(s.viewComplaint(n))}),r(27,"Manage"),t()()()}if(a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),u(" ",y(5,19,n.formatType(e.type))," "),l(3),u(" ",n.trimText(e.description)," "),l(),P("bg-dark ",e.complaintStatus=="TREATED"?"text-success":"text-danger",""),l(),u(" ",n.formatType(e.complaintStatus)," "),l(2),c("ngIf",e.creator==null?null:e.creator.avatar),l(),c("ngIf",!(e.creator!=null&&e.creator.avatar)),l(),u(" ",y(14,21,e.creator==null?null:e.creator.name)," "),l(2),c("ngIf",e.creator==null?null:e.creator.verified),l(2),u(" ",(e.creator==null?null:e.creator.userName)||"-N/A-"," "),l(),P("bg-dark ",(e.creator==null?null:e.creator.status)=="ACTIVE"?"text-success":"text-danger",""),l(),u(" ",e.creator==null?null:e.creator.status," "),l(2),u(" ",n.getDateTime(e.creator==null?null:e.creator.createdAt)," "),l(2),c("ngIf",(e.creator==null?null:e.creator.status)!="ACTIVE"),l(),c("ngIf",(e.creator==null?null:e.creator.status)=="ACTIVE")}}function Ct(a,m){if(a&1){let e=S();i(0,"div",30)(1,"table",31)(2,"thead",32)(3,"th",33),r(4," S/N "),t(),i(5,"th",33),r(6," Type "),t(),i(7,"th",33),r(8," Description "),t(),i(9,"th",33),r(10," Status "),t(),i(11,"th",33),r(12," Creator Profile "),t(),i(13,"th",33),r(14," X username "),t(),i(15,"th",33),r(16," Creator Status "),t(),i(17,"th",33),r(18," Registered On "),t(),i(19,"th",33),r(20," Flag Account "),t(),i(21,"th",33),r(22," Actions "),t()(),i(23,"tbody"),f(24,St,28,23,"tr",34),C(25,"paginate"),t()(),i(26,"pagination-controls",35),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}if(a&2){let e=d();l(24),c("ngForOf",q(25,1,e.complaints||I(4,ze),B(5,mt,e.itemsOnPage,e.p)))}}var We=(()=>{class a{authService;complaintService;bsModalService;toastrService;adminService;pageManager;router;user;complaints;complaintTypes;p;form=new T({type:new h(""),complaintStatus:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_CREATOR_COMPLAINT_SEARCH";storedFilterData;defaultAvatar=O;constructor(e,o,n,s,j,ae,oe){this.authService=e,this.complaintService=o,this.bsModalService=n,this.toastrService=s,this.adminService=j,this.pageManager=ae,this.router=oe}ngOnInit(){this.getComplaintTypes(),this.initializeSearch()}getUser(){return this.authService.user?this.authService.user.account:void 0}getComplaintTypes(){this.complaintService.getComplaintTypes().subscribe({next:e=>this.complaintTypes=e})}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.complaintService.findAllCreatorComplaints(this.removeEmpty(o)).subscribe({next:n=>{this.complaints=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.complaints=[]}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}
1getDateTime(e){return new Date(e).toLocaleString()}flagCreator(e,o){this.adminService.updateCreatorStatus({id:Number(e.creator?.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.creator?.name}'s account`),this.search(!1)},error:n=>{this.toastrService.error(`Failed to complete action for ${e.creator?.name}'s account`)}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"activate this creator account":"flag this creator account"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.flagCreator(o,e)})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}formatType(e){return String(e).replaceAll("_"," ")}trimText(e){return e?e.length<=10?e:e.slice(0,10)+"...":null}viewComplaint(e){this.router.navigateByUrl(`/admin/complaint/view/${e?.id}`,{state:e})}static \u0275fac=function(o){return new(o||a)(g(w),g(ce),g(U),g(R),g(W),g(z),g(se))};static \u0275cmp=A({type:a,selectors:[["app-creator-complaints"]],standalone:!1,decls:51,vars:8,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:check-circle-bold"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["formControlName","type","value","",1,"form-control"],["value","",1,"bg-dark"],["class","bg-dark",3,"value",4,"ngFor","ngForOf"],["formControlName","complaintStatus","value","",1,"form-control"],["value","TREATED",1,"bg-dark"],["value","NOT_TREATED",1,"bg-dark"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[1,"bg-dark",3,"value"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1px"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["height","30","width","30","style","object-fit: cover; border-radius: 50%;","alt","",3,"src",4,"ngIf"],["icon","solar:verified-check-bold",3,"style",4,"ngIf"],["class","btn btn-success py-1 px-2",3,"click",4,"ngIf"],["class","btn btn-danger py-1 px-2",3,"click",4,"ngIf"],[1,"btn","btn-success","py-1","px-2",3,"click"],["height","30","width","30","alt","",2,"object-fit","cover","border-radius","50%",3,"src"],["icon","solar:verified-check-bold"],[1,"btn","btn-danger","py-1","px-2",3,"click"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search Creator Complaints"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"Complaint Type"),t(),i(20,"select",12)(21,"option",13),r(22,"Select Classification"),t(),f(23,pt,3,4,"option",14),t()()(),i(24,"div",10)(25,"div",11)(26,"label"),r(27,"Complaint Status"),t(),i(28,"select",15)(29,"option",13),r(30,"Select Complaint Status"),t(),i(31,"option",16),r(32,"Treated"),t(),i(33,"option",17),r(34," Not treated"),t()()()(),i(35,"div",10)(36,"div",11)(37,"label"),r(38,"Order"),t(),i(39,"select",18)(40,"option",19),r(41,"Descending"),t(),i(42,"option",20),r(43," Ascending"),t()()()()(),i(44,"button",21),r(45,"Search "),f(46,dt,1,0,"loading-icon",22),t()()(),i(47,"div",23),f(48,ut,1,1,"app-page-loader",24)(49,gt,4,0,"div",25)(50,Ct,27,8,"div",26),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage creator complaints."),l(8),c("formGroup",n.form),l(9),c("ngForOf",n.complaintTypes||I(7,ze)),l(23),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(),c("ngIf",(!n.complaints||(n.complaints==null?null:n.complaints.length)==0)&&!n.searching),l(
1),c("ngIf",n.complaints&&n.complaints.length!=0&&!n.searching)}},dependencies:[X,ee,te,Z,Y,K,H,M,Q,J,ne,N,L,G,F,ie],encapsulation:2})}return a})();var Ye=Pe(Fe());var Ke=()=>[],bt=(a,m)=>({itemsPerPage:a,currentPage:m});function Et(a,m){if(a&1&&(i(0,"option",27),r(1),C(2,"titlecase"),t()),a&2){let e=m.$implicit,o=d();c("value",e),l(),b(y(2,2,o.formatType(e)))}}function yt(a,m){a&1&&p(0,"loading-icon")}function It(a,m){a&1&&p(0,"app-page-loader",28),a&2&&c("noPadding",!0)}function Tt(a,m){a&1&&(i(0,"div",29)(1,"div")(2,"h4"),r(3,"No Complaints found"),t()()())}function Pt(a,m){if(a&1){let e=S();i(0,"button",39),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Un-flag"),t()}}function At(a,m){if(a&1){let e=S();i(0,"button",40),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Flag"),t()}}function Ft(a,m){if(a&1){let e=S();i(0,"tr")(1,"td",36),r(2),t(),i(3,"td",36),r(4),C(5,"titlecase"),t(),i(6,"td",36),r(7),t(),i(8,"td"),r(9),t(),i(10,"td",36),r(11),C(12,"titlecase"),t(),i(13,"td",36),r(14),t(),i(15,"td"),r(16),t(),i(17,"td",36),r(18),t(),i(19,"td",36),f(20,Pt,2,0,"button",37)(21,At,2,0,"button",38),t(),i(22,"td",36)(23,"button",39),_("click",function(){let n=v(e).$implicit,s=d(2);return x(s.viewComplaint(n))}),r(24,"Manage"),t()()()}if(a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),u(" ",y(5,16,n.formatType(e.type))," "),l(3),u(" ",n.trimText(e.description)," "),l(),P("bg-dark ",e.complaintStatus=="TREATED"?"text-success":"text-danger",""),l(),u(" ",n.formatType(e.complaintStatus)," "),l(2),u(" ",y(12,18,e.collection==null?null:e.collection.name)," "),l(3),u(" ",n.formatNumber(e.collection==null?null:e.collection.views)||0," "),l(),P("bg-dark ",(e.collection==null?null:e.collection.status)=="ACTIVE"?"text-success":"text-danger",""),l(),u(" ",e.collection==null?null:e.collection.status," "),l(2),u(" ",n.getDateTime(e.collection==null?null:e.collection.publishedAt)," "),l(2),c("ngIf",(e.collection==null?null:e.collection.status)!="ACTIVE"),l(),c("ngIf",(e.collection==null?null:e.collection.status)=="ACTIVE")}}function wt(a,m){if(a&1){let e=S();i(0,"div",30)(1,"table",31)(2,"thead",32)(3,"th",33),r(4," S/N "),t(),i(5,"th",33),r(6," Type "),t(),i(7,"th",33),r(8," Description "),t(),i(9,"th",33),r(10," Status "),t(),i(11,"th",33),r(12," Collection Title "),t(),i(13,"th",33),r(14," Views "),t(),i(15,"th",33),r(16," Collection Status "),t(),i(17,"th",33),r(18," Published On "),t(),i(19,"th",33),r(20," Flag Collection "),t(),i(21,"th",33),r(22," Actions "),t()(),i(23,"tbody"),f(24,Ft,25,20,"tr",34),C(25,"paginate"),t()(),i(26,"pagination-controls",35),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}if(a&2){let e=d();l(24),c("ngForOf",q(25,1,e.complaints||I(4,Ke),B(5,bt,e.itemsOnPage,e.p)))}}var Xe=(()=>{class a{authService;complaintService;bsModalService;toastrService;adminService;pageManager;router;browserRef;user;complaints;complaintTypes;p;form=new T({type:new h(""),complaintStatus:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_COLLECTION_COMPLAINT_SEARCH";storedFilterData;defaultAvatar=O;constructor(e,o,n,s,j,ae,oe,Te){this.authService=e,this.complaintService=o,this.bsModalService=n,this.toastrService=s,this.adminService=j,this.pageManager=ae,this.router=oe,this.browserRef=Te}ngOnInit(){this.getComplaintTypes(),this.initializeSearch()}getUser(){return this.authService.user?this.authService.user.account:void 0}getComplaintTypes(){this.complaintService.getComplaintTypes().subscribe({next:e=>this.complaintTypes=e})}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.complaintService.findAllCollectionComplaints(this.removeEmpty(o)).subscribe({next:n=>{this.complaints=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.complaints=[]}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}
1getDateTime(e){return new Date(e).toLocaleString()}flagCollection(e,o){this.adminService.updateCollectionsStatus({id:Number(e.collection?.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.collection?.name}`),this.search(!1)},error:n=>{this.toastrService.error(`Failed to complete action for ${e.collection?.name}`)}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"un-flag this collection":"flag this collection"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.flagCollection(o,e)})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}formatType(e){return String(e).replaceAll("_"," ")}trimText(e){return e?e.length<=10?e:e.slice(0,10)+"...":null}viewComplaint(e){this.router.navigateByUrl(`/admin/complaint/view/${e?.id}`,{state:e})}formatNumber(e){return(0,Ye.default)(Number(e),{precision:2})}static \u0275fac=function(o){return new(o||a)(g(w),g(ce),g(U),g(R),g(W),g(z),g(se),g(je))};static \u0275cmp=A({type:a,selectors:[["app-collection-complaints"]],standalone:!1,decls:51,vars:8,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:check-circle-bold"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["formControlName","type","value","",1,"form-control"],["value","",1,"bg-dark"],["class","bg-dark",3,"value",4,"ngFor","ngForOf"],["formControlName","complaintStatus","value","",1,"form-control"],["value","TREATED",1,"bg-dark"],["value","NOT_TREATED",1,"bg-dark"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[1,"bg-dark",3,"value"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1px"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["class","btn btn-success py-1 px-2",3,"click",4,"ngIf"],["class","btn btn-danger py-1 px-2",3,"click",4,"ngIf"],[1,"btn","btn-success","py-1","px-2",3,"click"],[1,"btn","btn-danger","py-1","px-2",3,"click"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search Collection Complaints"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"Complaint Type"),t(),i(20,"select",12)(21,"option",13),r(22,"Select Classification"),t(),f(23,Et,3,4,"option",14),t()()(),i(24,"div",10)(25,"div",11)(26,"label"),r(27,"Complaint Status"),t(),i(28,"select",15)(29,"option",13),r(30,"Select Complaint Status"),t(),i(31,"option",16),r(32,"Treated"),t(),i(33,"option",17),r(34," Not treated"),t()()()(),i(35,"div",10)(36,"div",11)(37,"label"),r(38,"Order"),t(),i(39,"select",18)(40,"option",19),r(41,"Descending"),t(),i(42,"option",20),r(43," Ascending"),t()()()()(),i(44,"button",21),r(45,"Search "),f(46,yt,1,0,"loading-icon",22),t()()(),i(47,"div",23),f(48,It,1,1,"app-page-loader",24)(49,Tt,4,0,"div",25)(50,wt,27,8,"div",26),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage collection complaints."),l(8),c("formGroup",n.form),l(9),c("ngForOf",n.complaintTypes||I(7,Ke)),l(23),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(),c("ngIf",(!n.complaints||(n.complaints==null?null:n.complaints.length)==0)&&!n.searching),l(),c("ngIf",n.complaints&&n.complaints.length!=0&&!n.searching)}},dependencies:[X,ee,te,Z,Y,K,H,M,Q,J,ne,N,L,G,F,ie],encapsulation:2})}return a})();var Qe=Pe(Fe());var Je=()=>[],Nt=(a,m)=>({itemsPerPage:a,currentPage:m});function Vt(a,m){if(a&1&&(i(0,"option",27),r(1),C(2,"titlecase"),t()),a&2){let e=m.$implicit,o=d();c("value",e),l(),b(y(2,2,o.formatType(e)))}}function Dt(a,m){a&1&&p(0,"loading-icon")}function Mt(a,m){a&1&&p(0,"app-page-loader",28),a&2&&c("noPadding",!0)}function Ot(a,m){a&1&&(i(0,"div",29)(1,"div")(2,"h4"),r(3,"No Complaints found"),t()()())}function kt(a,m){if(a&1){let e=S();i(0,"button",39),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Un-flag Film"),t()}}function Rt(a,m){if(a&1){let e=S();i(0,"button",40),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Flag Film"),t()}}function Ut(a,m){if(a&1){let e=S();i(0,"tr")(1,"td",36),r(2),t(),i(3,"td",36),r(4),C(5,"titlecase"),t(),i(6,"td",36),r(7),t(),i(8,"td"),r(9),t(),i(10,"td",36),r(11),C(12,"titlecase"),t(),i(13,"td",36),r(14),t(),i(15,"td"),r(16),t(),i(17,"td",36),r(18),t(),i(19,"td",36),f(20,kt,2,0,"button",37)(21,Rt,2,0,"button",38),t(),i(22,"td",36)(23,"button",39),_("click",function(){let n=v(e).$implicit,s=d(2);return x(s.viewComplaint(n))}),r(24,"Manage"),t()()()}if(a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),u(" ",y(5,16,n.formatType(e.type))," "),l(3),u(" ",n.trimText(e.description)," "),l(),P("bg-dark ",e.complaintStatus=="TREATED"?"text-success":"text-danger",""),l(),u(" ",n.formatType(e.complaintStatus)," "),l(2),u(" ",y(12,18,e.flix==null?null:e.flix.title)," "),l(3),u(" ",n.formatNumber(e.flix==null?null:e.flix.views)||0," "),l(),P("bg-dark ",(e.flix==null?null:e.flix.status)=="ACTIVE"?"text-success":"text-danger",""),l(),u(" ",e.flix==null?null:e.flix.status," "),l(2),u(" ",n.getDateTime(e.flix==null?null:e.flix.publishedAt)," "),l(2),c("ngIf",(e.flix==null?null:e.flix.status)!="ACTIVE"),l(
1),c("ngIf",(e.flix==null?null:e.flix.status)=="ACTIVE")}}function Gt(a,m){if(a&1){let e=S();i(0,"div",30)(1,"table",31)(2,"thead",32)(3,"th",33),r(4," S/N "),t(),i(5,"th",33),r(6," Type "),t(),i(7,"th",33),r(8," Description "),t(),i(9,"th",33),r(10," Status "),t(),i(11,"th",33),r(12," Film Title "),t(),i(13,"th",33),r(14," Views "),t(),i(15,"th",33),r(16," Film Status "),t(),i(17,"th",33),r(18," Published On "),t(),i(19,"th",33),r(20," Flag Film "),t(),i(21,"th",33),r(22," Actions "),t()(),i(23,"tbody"),f(24,Ut,25,20,"tr",34),C(25,"paginate"),t()(),i(26,"pagination-controls",35),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}if(a&2){let e=d();l(24),c("ngForOf",q(25,1,e.complaints||I(4,Je),B(5,Nt,e.itemsOnPage,e.p)))}}var Ze=(()=>{class a{authService;complaintService;bsModalService;toastrService;adminService;pageManager;router;user;complaints;complaintTypes;p;form=new T({type:new h(""),complaintStatus:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_FLIX_COMPLAINT_SEARCH";storedFilterData;defaultAvatar=O;constructor(e,o,n,s,j,ae,oe){this.authService=e,this.complaintService=o,this.bsModalService=n,this.toastrService=s,this.adminService=j,this.pageManager=ae,this.router=oe}ngOnInit(){this.getComplaintTypes(),this.initializeSearch()}getUser(){return this.authService.user?this.authService.user.account:void 0}getComplaintTypes(){this.complaintService.getComplaintTypes().subscribe({next:e=>this.complaintTypes=e})}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.complaintService.findAllFlixComplaints(this.removeEmpty(o)).subscribe({next:n=>{this.complaints=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.complaints=[]}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}getDateTime(e){return new Date(e).toLocaleString()}flagVideo(e,o){this.adminService.updateFlixStatus({id:Number(e.flix?.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.flix?.title}`),this.search(!1)},error:n=>{this.toastrService.error(`Failed to complete action for ${e.flix?.title}`)}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"un-flag this film":"flag this film"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.flagVideo(o,e)})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}formatType(e){return String(e).replaceAll("_"," ")}trimText(e){return e?e.length<=10?e:e.slice(0,10)+"...":null}viewComplaint(e){this.router.navigateByUrl(`/admin/complaint/view/${e?.id}`,{state:e})}formatNumber(e){return(0,Qe.default)(Number(e),{precision:2})}static \u0275fac=function(o){return new(o||a)(g(w),g(ce),g(U),g(R),g(W),g(z),g(se))};static \u0275cmp=A({type:a,selectors:[["app-flix-complaints"]],standalone:!1,decls:51,vars:8,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:check-circle-bold"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["formControlName","type","value","",1,"form-control"],["value","",1,"bg-dark"],["class","bg-dark",3,"value",4,"ngFor","ngForOf"],["formControlName","complaintStatus","value","",1,"form-control"],["value","TREATED",1,"bg-dark"],["value","NOT_TREATED",1,"bg-dark"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[1,"bg-dark",3,"value"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1p
1x"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["class","btn btn-success py-1 px-2",3,"click",4,"ngIf"],["class","btn btn-danger py-1 px-2",3,"click",4,"ngIf"],[1,"btn","btn-success","py-1","px-2",3,"click"],[1,"btn","btn-danger","py-1","px-2",3,"click"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search FIlm Complaints"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"Complaint Type"),t(),i(20,"select",12)(21,"option",13),r(22,"Select Classification"),t(),f(23,Vt,3,4,"option",14),t()()(),i(24,"div",10)(25,"div",11)(26,"label"),r(27,"Complaint Status"),t(),i(28,"select",15)(29,"option",13),r(30,"Select Complaint Status"),t(),i(31,"option",16),r(32,"Treated"),t(),i(33,"option",17),r(34," Not treated"),t()()()(),i(35,"div",10)(36,"div",11)(37,"label"),r(38,"Order"),t(),i(39,"select",18)(40,"option",19),r(41,"Descending"),t(),i(42,"option",20),r(43," Ascending"),t()()()()(),i(44,"button",21),r(45,"Search "),f(46,Dt,1,0,"loading-icon",22),t()()(),i(47,"div",23),f(48,Mt,1,1,"app-page-loader",24)(49,Ot,4,0,"div",25)(50,Gt,27,8,"div",26),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage film complaints."),l(8),c("formGroup",n.form),l(9),c("ngForOf",n.complaintTypes||I(7,Je)),l(23),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(),c("ngIf",(!n.complaints||(n.complaints==null?null:n.complaints.length)==0)&&!n.searching),l(),c("ngIf",n.complaints&&n.complaints.length!=0&&!n.searching)}},dependencies:[X,ee,te,Z,Y,K,H,M,Q,J,ne,N,L,G,F,ie],encapsulation:2})}return a})();var et=Pe(Fe());function Lt(a,m){a&1&&p(0,"app-page-loader")}function jt(a,m){a&1&&(i(0,"p")(1,"span",12),p(2,"iconify",13),r(3," PREMIUM"),t()())}function $t(a,m){if(a&1){let e=S();i(0,"button",18),_("click",function(){v(e);let n=d(3);return x(n.viewCollection(n.complaint.collection))}),r(1,"View Collection >"),t()}}function Bt(a,m){if(a&1){let e=S();i(0,"button",18),_("click",function(){v(e);let n=d(3);return x(n.viewVideo(n.complaint.flix))}),r(1,"View Film >"),t()}}function qt(a,m){if(a&1&&(i(0,"div")(1,"p",14),r(2),t(),p(3,"br"),i(4,"h4",15),r(5),t(),p(6,"br"),i(7,"p")(8,"span",9),r(9,"Synopsis:"),t(),p(10,"br"),i(11,"span",10),r(12),t()(),p(13,"br"),i(14,"p")(15,"span",9),r(16,"Views:"),t(),p(17,"br"),i(18,"span",16),r(19),t()(),p(20,"br"),i(21,"p")(22,"span",9),r(23,"Status:"),t(),p(24,"br"),i(25,"span",16),r(26),t()(),p(27,"br"),i(28,"p")(29,"span",9),r(30,"Published Date:"),t(),p(31,"br"),i(32,"span",16),r(33),t()(),p(34,"br"),f(35,$t,2,0,"button",17)(36,Bt,2,0,"button",17),p(37,"br")(38,"br")(39,"br"),t()),a&2){let e=d(2);l(2),Ne("",e.complaint.collection?"Collection":"Film"," / ",e.getGenre(e.complaint.collection?e.complaint.collection.genreId:e.complaint.flix==null?null:e.complaint.flix.genreId)," / ",e.getYear(e.complaint.collection?e.complaint.collection.publishedAt:e.complaint.flix==null?null:e.complaint.flix.publishedAt),""),l(3),b(e.complaint.collection?e.complaint.collection.name:e.complaint.flix==null?null:e.complaint.flix.title),l(7),b(e.complaint.collection?e.complaint.collection.plot:e.complaint.flix==null?null:e.complaint.flix.plot),l(7),b(e.formatNumber(e.complaint.collection?e.complaint.collection.views:e.complaint.flix==null?null:e.complaint.flix.views)),l(7),b(e.complaint.collection?e.complaint.collection.status:e.complaint.flix==null?null:e.complaint.flix.status),l(7),b(e.getDateTime(e.complaint.collection?e.complaint.collection.publishedAt:e.complaint.flix==null?null:e.complaint.flix.publishedAt)),l(2),c("ngIf",e.complaint.collection),l(),c("ngIf",e.complaint.flix)}}function Ht(a,m){if(a&1&&p(0,"img",21),a&2){let e=d(3);c("src",e.getURL(e.complaint.creator.avatar),D)}}function zt(a,m){if(a&1&&p(0,"img",21),a&2){let e=d(3);c("src",e.defaultAvatar,D)}}function Wt(a,m){a&1&&p(0,"iconify",22),a&2&&le("color: green;")}function Yt(a,m){if(a&1){let e=S();i(0,"button",18),_("click",function(){v(e);let n=d(3);return x(n.viewCreator(n.complaint.creator))}),r(1,"View Creator >"),t()}}function Kt(a,m){if(a&1&&(i(0,"div")(1,"h4",15),f(2,Ht,1,1,"img",19)(3,zt,1,1,"img",19),r(4),C(5,"titlecase"),f(6,Wt,1,2,"iconify",20),t(),p(7,"br"),i(8,"p")(9,"span",9),r(10,"Followers:"),t(),p(11,"br"),i(12,"span",16),r(13),t()(),p(14,"br"),i(15,"p")(16,"span",9),r(17,"Subscribers:"),t(),p(18,"br"),i(19,"span",16),r(20),t()(),p(21,"br"),i(22,"p")(23,"span",9),r(24,"Views:"),t(),p(25,"br"),i(26,"span",16),r(27),t()(),p(28,"br"),i(29,"p")(30,"span",9),r(31,"Status:"),t(),p(32,"br"),i(33,"span",16),r(34),t()(),p(35,"br"),i(36,"p")(37,"span",9),r(38,"Created On:"),t(),p(39,"br"),i(40,"span",16),r(41),t()(),p(42,"br"),f(43,Yt,2,0,"button",17),p(44,"br")(45,"br")(46,"br"),t()),a&2){let e=d(2);l(2),c("ngIf",e.complaint.creator.avatar),l(),c("ngIf",!e.complaint.creator.avatar),l(),u(" ",y(5,10,e.complaint.creator.name)," "),l(2),c("ngIf",e.complaint.creator.verified),l(7),b(e.formatNumber(e.complaint.creator.followerCount)),l(7),b(e.formatNumber(e.complaint.creator.subscriberCount)),l(7),b(e.formatNumber(e.complaint.creator.totalViews)),l(7),b(e.complaint.creator.status),l(7),b(e.getDateTime(e.complaint.creator.createdAt)),l(2),c("ngIf",e.complaint.creator)}}function Xt(a,m){if(a&1&&p(0,"img",21),a&2){let e=d(3);c("src",e.getURL(e.complaint.reportedBy.avatar),D)}}function Qt(a,m){if(a&1&&p(0,"img",21),a&2){let e=d(3);c("src",e.defaultAvatar,D)}}function Jt(a,m){if(a&1&&(i(0,"div")(1,"h5",15),f(2,Xt,1,1,"img",19)(3,Qt,1,1,"img",19),r(4),C(5,"titlecase"),t(),p(6,"br"),i(7,"p")(8,"span",9),r(9,"Email:"),t(),p(10,"br"),i(11,"span",16),r(12),t()(),p(13,"br"),i(14,"p")(15,"span",9),r(16,"Status:"),t(),p(17,"br"),i(18,"span",16),r(19),t()(),p(20,"br"),i(21,"p")(22,"span",9),r(23,"Registered On:"),t(),p(24,"br"),i(25,"span",16),r(26),t()(),p(27,"br"),t()),a&2){let e=d(2);l(2),c("ngIf",e.complaint.reportedBy.avatar),l(),c("ngIf",!e.complaint.reportedBy.avatar),l(),u(" ",y(5,6,e.complaint.reportedBy.firstName+" "+e.complaint.reportedBy.lastName)," "),l(8),b(e.complaint.reportedBy.email),l(7),b(e.complaint.reportedBy.status),l(7),b(e.getDateTime(e.complaint.reportedBy.createdAt))}}function Zt(a,m){a&1&&p(0,"loading-icon")}function ei(a,m){a&1&&p(0,"loading-icon")}function ti(a,m){if(a&1){let e=S();i(0,"section",2),p(1,"br"),i(2,"div",3)(3,"div",4)(4,"div",5)(5,"h2"),r(6,"Manage Complaint"),t()()(),p(7,"br"),t(),i(8,"section",6)(9,"div",4)(10,"div",7)(11,"div",8)(12,"p")(13,"span",9),r(14,"Complaint Type:"),t(),p(15,"br"),r(16),C(17,"titlecase"),t(),p(18,"br"),i(19,"p")(20,"span",9),r(21,"Complaint Description:"),t(),p(22,"br"),i(23,"span",10),r(24),t()(),p(25,"br"),i(26,"p")(27,"span",9),r(28,"Complaint Status:"),t(),p(29,"br"),i(30,"span"),r(31),t()(),p(32,"br")(33,"br"),i(34,"h3"),r(35,"Complaint Subject/Reason"),t(),p(36,"br"),f(37,jt,4,0,"p",0)(38,qt,40,10,"div",0)(39,Kt,47,12,"div",0),i(40,"h3"),r(41,"Reported By"),t(),p(42,"br"),f(43,Jt,28,8,"div",0),t()(),i(44,"button",11),_("click",function(){v(e);let n=d();return x(n.confirmAction(!1))}),r(45," Flag and Treat Complaint "),f(46,Zt,1,0,"loading-icon",0),t(),i(47,"button",11),_("click",function(){v(e);let n=d();return x(n.confirmTreat())}),r(48," Treat Complaint "),f(49,ei,1,0,"loading-icon",0),t()()()()}if(a&2){let e=d();l(16),b(y(17,14,e.formatType(e.complaint.type))),l(8),b(e.complaint.description),l(6),P("bg-dark ",e.complaint.complaintStatus=="TREATED"?"text-success":"text-danger",""),l(),u(" ",e.formatType(e.complaint.complaintStatus)," "),l(6),c("ngIf",(e.complaint.collection==null?null:e.complaint.collection.paidContent)||(e.complaint.flix==null?null:e.complaint.flix.paidContent)),l(),c("ngIf",e.complaint.collection||e.complaint.flix),l(),c("ngIf",e.complaint.creator),l(4),c("ngIf",e.complaint.reportedBy),l(),c("disabled",e.submitting||e.complaint.complaintStatus=="TREATED"),l(2),c("ngIf",e.submitting),l(),c("disabled",e.submitting||e.complaint.complaintStatus=="TREATED"),l(2),c("ngIf",e.submitting)}}var tt=(()=>{class a{authService;complaintService;activatedRoute;bsModalService;toastrService;adminService;genreService;router;complaintId;complaint;submitting=!1;genres;defaultAvatar=O;constructor(e,o,n,s,j,ae,oe,Te){this.authService=e,this.complaintService=o,this.activatedRoute=n,this.bsModalService=s,this.toastrService=j,this.adminService=ae,this.genreService=oe,this.router=Te}ngOnInit(){this.getGenres(),this.getComplaintId()}getComplaintId(){this.activatedRoute.params.subscribe(e=>{if(!e.id){history.back();return}this.complaintId=e.id,this.loadComplaint()})}getUser(){return this.authService.user?this.authService.user.account:void 0}getGenres(){this.genreService.getAll().subscribe({next:e=>{this.genres=e}})}getYear(e){return new Date(e).getFullYear()}getGenre(e){let o=this.genres?.find(n=>Number(e)==Number(n.id));return o?o.name:""}loadComplaint(){history.state.uuid&&(this.complaint=history.state),this.getComplaint()}getComplaint(){this.complaintService.getComplaint({id:Number(this.complaintId)}).subscribe({next:e=>this.complaint=e,error:e=>{this.toastrService.error("Failed to retrieve complaint")}})}treatComplaint(){this.submitting=!0,this.complaintService.treatComplaint({id:Number(this.complaint?.id)}).subscribe({next:e=>{this.toastrService.success("Complaint treated"),this.getComplaint(),this.submitting=!1},error:e=>{this.toastrService.error("Failed to treat complaint"),this.submitting=!1}})}confirmAction(e){this.bsModalService.show(V,{initialState:{message:"Are you sure you want to proceed with this operation?"},ignoreBackdropClick:!0}).content.onClose.subscribe(n=>{n&&(this.complaint?.flix&&this.flagVideo(this.complaint,e),this.complaint?.creator&&this.flagCreator(this.complaint,e),this.complaint?.collection&&this.flagCollection(this.complaint,e))})}confirmTreat(){this.bsModalService.show(V,{initialState:{message:"Are you sure you want to proceed with this operation?"},ignoreBackdropClick:!0}).content.onClose.subscribe(o=>{o&&this.treatComplaint()})}flagCollection(e,o){this.submitting=!0,this.adminService.updateCollectionsStatus({id:Number(e.collection?.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.collection?.name}`),this.treatComplaint()},error:n=>{this.toastrService.error(`Failed to complete action for ${e.collection?.name}`)}})}flagCreator(e,o){this.submitting=!0,this.adminService.updateCreatorStatus({id:Number(e.creator?.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.creator?.name}'s profile`),this.treatComplaint()},error:n=>{this.toastrService.error(`Failed to complete action for ${e.creator?.name}'s profile`)}})}flagVideo(e,o){this.submitting=!0,this.adminService.updateFlixStatus({id:Number(e.flix?.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.flix?.title}`),this.treatComplaint()},error:n=>{this.toastrService.error(`Failed to complete action for ${e.flix?.title}`)}})}formatType(e){return String(e).replaceAll("_"," ")}viewCollection(e){this.router.navigateByUrl(`/collection/${e.uuid}`,{state:e})}viewVideo(e){this.router.navigateByUrl(`/watch/${e.uuid}`,{state:e})}viewCreator(e){this.router.navigateByUrl(`/creator/${e.uuid}`,{state:e})}
1getDateTime(e){return new Date(e).toLocaleString()}formatNumber(e){return(0,et.default)(Number(e),{precision:2})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}static \u0275fac=function(o){return new(o||a)(g(w),g(ce),g(Me),g(U),g(R),g(W),g(ye),g(se))};static \u0275cmp=A({type:a,selectors:[["app-view-complaint"]],standalone:!1,decls:2,vars:2,consts:[[4,"ngIf"],["style","padding-bottom: 100px;",4,"ngIf"],[2,"padding-bottom","100px"],[1,"breadcrumbs"],[1,"container"],[1,"",2,"padding-bottom","30px"],[1,"sample-page"],[1,"col-lg-8","col-md-12"],[1,"movie-info-container"],[1,"font-weight-bold"],[1,"synopsis",2,"font-style","italic"],[1,"btn","btn-success","pull-right","mt-4","m-1",2,"float","right",3,"click","disabled"],[1,"premium-tag"],["icon","solar:crown-bold"],[1,"genre","mb-2","pb-1"],[1,"title"],[1,"synopsis"],["class","btn btn-default",3,"click",4,"ngIf"],[1,"btn","btn-default",3,"click"],["height","30","width","30","style","object-fit: cover; border-radius: 50%;","alt","",3,"src",4,"ngIf"],["icon","solar:verified-check-bold",3,"style",4,"ngIf"],["height","30","width","30","alt","",2,"object-fit","cover","border-radius","50%",3,"src"],["icon","solar:verified-check-bold"]],template:function(o,n){o&1&&f(0,Lt,1,0,"app-page-loader",0)(1,ti,50,16,"section",1),o&2&&(c("ngIf",!n.complaint),l(),c("ngIf",n.complaint))},dependencies:[M,N,L,G,F],encapsulation:2})}return a})();var ii=()=>[],ni=(a,m)=>({itemsPerPage:a,currentPage:m});function ri(a,m){a&1&&p(0,"loading-icon")}function ai(a,m){a&1&&p(0,"app-page-loader",24),a&2&&c("noPadding",!0)}function oi(a,m){a&1&&(i(0,"div",25)(1,"div")(2,"h4"),r(3,"No User found"),t()()())}function li(a,m){if(a&1&&p(0,"img",36),a&2){let e=d().$implicit,o=d(2);c("src",o.getURL(e.avatar),D)}}function si(a,m){if(a&1&&p(0,"img",36),a&2){let e=d(3);c("src",e.defaultAvatar,D)}}function ci(a,m){if(a&1){let e=S();i(0,"button",37),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Un-flag User"),t()}if(a&2){let e,o=d().$implicit,n=d(2);c("disabled",o.id==((e=n.getUser())==null?null:e.id))}}function mi(a,m){if(a&1){let e=S();i(0,"button",38),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Flag User"),t()}if(a&2){let e,o=d().$implicit,n=d(2);c("disabled",o.id==((e=n.getUser())==null?null:e.id))}}function pi(a,m){if(a&1&&(i(0,"tr")(1,"td",32),r(2),t(),i(3,"td",32),f(4,li,1,1,"img",33)(5,si,1,1,"img",33),r(6),C(7,"titlecase"),C(8,"titlecase"),t(),i(9,"td",32),r(10),t(),i(11,"td",32),r(12),t(),i(13,"td"),r(14),t(),i(15,"td",32),r(16),t(),i(17,"td",32),f(18,ci,2,1,"button",34)(19,mi,2,1,"button",35),t()()),a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),c("ngIf",e.avatar),l(),c("ngIf",!e.avatar),l(),we(" ",y(7,14,e.firstName)," ",y(8,16,e.lastName)," "),l(4),u(" ",e.email," "),l(2),u(" ",e.role," "),l(),P("bg-dark ",e.status=="ACTIVE"?"text-success":"text-danger",""),l(),u(" ",e.status," "),l(2),u(" ",n.getDateTime(e.createdAt)," "),l(2),c("ngIf",e.status!="ACTIVE"),l(),c("ngIf",e.status=="ACTIVE")}}function di(a,m){if(a&1){let e=S();i(0,"div",26)(1,"table",27)(2,"thead",28)(3,"th",29),r(4," S/N "),t(),i(5,"th",29),r(6," Name "),t(),i(7,"th",29),r(8," Email "),t(),i(9,"th",29),r(10," Role "),t(),i(11,"th",29),r(12," Account Status "),t(),i(13,"th",29),r(14," Registered On "),t(),i(15,"th",29),r(16," Action "),t()(),i(17,"tbody"),f(18,pi,20,18,"tr",30),C(19,"paginate"),t()(),i(20,"pagination-controls",31),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}if(a&2){let e=d();l(18),c("ngForOf",q(19,1,e.users||I(4,ii),B(5,ni,e.itemsOnPage,e.p)))}}var it=(()=>{class a{authService;bsModalService;toastrService;adminService;pageManager;user;users;p;form=new T({firstName:new h(""),lastName:new h(""),email:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_USER_SEARCH";storedFilterData;defaultAvatar=O;constructor(e,o,n,s,j){this.authService=e,this.bsModalService=o,this.toastrService=n,this.adminService=s,this.pageManager=j}ngOnInit(){this.initializeSearch()}getUser(){return this.authService.user?this.authService.user.account:void 0}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.adminService.searchUser(this.removeEmpty(o)).subscribe({next:n=>{this.users=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.users=[]}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}
1getDateTime(e){return new Date(e).toLocaleString()}flagAccount(e,o){this.adminService.updateUserStatus({id:e.id,status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.firstName}'s account`),this.search(!1)},error:n=>{this.toastrService.error(`Failed to complete action for ${e.firstName}'s account`)}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"activate this user account":"deactivate this user account"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.flagAccount(o,e)})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}static \u0275fac=function(o){return new(o||a)(g(w),g(U),g(R),g(W),g(z))};static \u0275cmp=A({type:a,selectors:[["app-search-user"]],standalone:!1,decls:47,vars:6,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:check-circle-bold"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["type","text","formControlName","firstName","placeholder","first name","value","",1,"form-control"],["type","text","formControlName","lastName","placeholder","last name","value","",1,"form-control"],["type","text","formControlName","email","placeholder","email","value","",1,"form-control"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1px"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["height","30","width","30","style","object-fit: cover; border-radius: 50%;","alt","",3,"src",4,"ngIf"],["class","btn btn-success py-1 px-2",3,"disabled","click",4,"ngIf"],["class","btn btn-danger py-1 px-2",3,"disabled","click",4,"ngIf"],["height","30","width","30","alt","",2,"object-fit","cover","border-radius","50%",3,"src"],[1,"btn","btn-success","py-1","px-2",3,"click","disabled"],[1,"btn","btn-danger","py-1","px-2",3,"click","disabled"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search Users"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"First Name"),t(),p(20,"input",12),t()(),i(21,"div",10)(22,"div",11)(23,"label"),r(24,"Last Name"),t(),p(25,"input",13),t()(),i(26,"div",10)(27,"div",11)(28,"label"),r(29,"Email"),t(),p(30,"input",14),t()(),i(31,"div",10)(32,"div",11)(33,"label"),r(34,"Order"),t(),i(35,"select",15)(36,"option",16),r(37,"De
1scending"),t(),i(38,"option",17),r(39," Ascending"),t()()()()(),i(40,"button",18),r(41,"Search "),f(42,ri,1,0,"loading-icon",19),t()()(),i(43,"div",20),f(44,ai,1,1,"app-page-loader",21)(45,oi,4,0,"div",22)(46,di,21,8,"div",23),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage user profiles."),l(8),c("formGroup",n.form),l(28),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(),c("ngIf",(!n.users||(n.users==null?null:n.users.length)==0)&&!n.searching),l(),c("ngIf",n.users&&n.users.length!=0&&!n.searching)}},dependencies:[X,ee,te,ve,Z,Y,K,H,M,Q,J,ne,N,L,G,F,ie],encapsulation:2})}return a})();var ui=()=>[],gi=(a,m)=>({itemsPerPage:a,currentPage:m});function fi(a,m){a&1&&p(0,"loading-icon")}function hi(a,m){a&1&&p(0,"app-page-loader",34),a&2&&c("noPadding",!0)}function _i(a,m){a&1&&(i(0,"div",35)(1,"div")(2,"h4"),r(3,"No Creator found"),t()()())}function vi(a,m){if(a&1&&p(0,"img",47),a&2){let e=d().$implicit,o=d(2);c("src",o.getURL(e.avatar),D)}}function xi(a,m){if(a&1&&p(0,"img",47),a&2){let e=d(3);c("src",e.defaultAvatar,D)}}function Si(a,m){a&1&&p(0,"iconify",48),a&2&&le("color: green;")}function Ci(a,m){if(a&1){let e=S();i(0,"button",49),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Un-flag Creator"),t()}}function bi(a,m){if(a&1){let e=S();i(0,"button",50),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Flag Creator"),t()}}function Ei(a,m){if(a&1&&(i(0,"tr")(1,"td",42),r(2),t(),i(3,"td",42),f(4,vi,1,1,"img",43)(5,xi,1,1,"img",43),r(6),C(7,"titlecase"),f(8,Si,1,2,"iconify",44),t(),i(9,"td",42),r(10),t(),i(11,"td"),r(12),t(),i(13,"td",42),r(14),t(),i(15,"td",42),r(16),t(),i(17,"td",42),r(18),t(),i(19,"td",42),r(20),t(),i(21,"td",42),f(22,Ci,2,0,"button",45)(23,bi,2,0,"button",46),t()()),a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),c("ngIf",e.avatar),l(),c("ngIf",!e.avatar),l(),u(" ",y(7,16,e.name)," "),l(2),c("ngIf",e.verified),l(2),u(" ",e.userName||"-N/A-"," "),l(),P("bg-dark ",e.status=="ACTIVE"?"text-success":"text-danger",""),l(),u(" ",e.status," "),l(2),u(" ",e.followerCount||0," "),l(2),u(" ",e.subscriberCount||0," "),l(2),u(" ",e.videoCount||0," "),l(2),u(" ",n.getDateTime(e.createdAt)," "),l(2),c("ngIf",e.status!="ACTIVE"),l(),c("ngIf",e.status=="ACTIVE")}}function yi(a,m){if(a&1){let e=S();i(0,"div",36)(1,"table",37)(2,"thead",38)(3,"th",39),r(4," S/N "),t(),i(5,"th",39),r(6," Name "),t(),i(7,"th",39),r(8," X username "),t(),i(9,"th",39),r(10," Account Status "),t(),i(11,"th",39),r(12," Followers "),t(),i(13,"th",39),r(14," Subscribers "),t(),i(15,"th",39),r(16," Films "),t(),i(17,"th",39),r(18," Registered On "),t(),i(19,"th",39),r(20," Action "),t()(),i(21,"tbody"),f(22,Ei,24,18,"tr",40),C(23,"paginate"),t()(),i(24,"pagination-controls",41),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}if(a&2){let e=d();l(22),c("ngForOf",q(23,1,e.creators||I(4,ui),B(5,gi,e.itemsOnPage,e.p)))}}var nt=(()=>{class a{authService;bsModalService;toastrService;adminService;pageManager;user;creators;p;form=new T({name:new h(""),rating:new h(""),status:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_CREATOR_SEARCH";storedFilterData;defaultAvatar=O;constructor(e,o,n,s,j){this.authService=e,this.bsModalService=o,this.toastrService=n,this.adminService=s,this.pageManager=j}ngOnInit(){this.initializeSearch()}getUser(){return this.authService.user?this.authService.user.account:void 0}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.adminService.searchCreator(this.removeEmpty(o)).subscribe({next:n=>{this.creators=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.creators=[]}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}
1getDateTime(e){return new Date(e).toLocaleString()}flagAccount(e,o){this.adminService.updateCreatorStatus({id:e.id,status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.name}'s account`),this.search(!1)},error:n=>{this.toastrService.error(`Failed to complete action for ${e.name}'s account`)}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"activate this creator account":"deactivate this creator account"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.flagAccount(o,e)})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}static \u0275fac=function(o){return new(o||a)(g(w),g(U),g(R),g(W),g(z))};static \u0275cmp=A({type:a,selectors:[["app-search-creator"]],standalone:!1,decls:69,vars:6,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:check-circle-bold"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["type","text","formControlName","name","placeholder","creator name","value","",1,"form-control"],["formControlName","rating","value","",1,"form-control"],["value","",1,"bg-dark"],["value","5",1,"bg-dark"],["value","4",1,"bg-dark"],["value","3",1,"bg-dark"],["value","2",1,"bg-dark"],["value","1",1,"bg-dark"],["formControlName","status","value","",1,"form-control"],["value","ACTIVE",1,"bg-dark"],["value","INACTIVE",1,"bg-dark"],["value","FLAGGED",1,"bg-dark"],["value","DELETED",1,"bg-dark"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1px"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["height","30","width","30","style","object-fit: cover; border-radius: 50%;","alt","",3,"src",4,"ngIf"],["icon","solar:verified-check-bold",3,"style",4,"ngIf"],["class","btn btn-success py-1 px-2",3,"click",4,"ngIf"],["class","btn btn-danger py-1 px-2",3,"click",4,"ngIf"],["height","30","width","30","alt","",2,"object-fit","cover","border-radius","50%",3,"src"],["icon","solar:verified-check-bold"],[1,"btn","btn-success","py-1","px-2",3,"click"],[1,"btn","btn-danger","py-1","px-2",3,"click"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search Creators"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"Creator Name"),t(),p(20,"input",12),t()(),i(21,"div",10)(22,"div",11)(23,"label"),r(24,"Rating"),t(),i(25,"select",13)(26,"option",14),r(27,"Select rating"),t(),i(28,"option",15),r(29,"5"),t(),i(30,"option",16),r(31,"4"),t(),i(32,"option",17),r(33,"3"),t(),i(34,"option",18),r(35,"2"),t(),i(36,"option",19),r(37,"1"),t()()()(),i(38,"div",10)(39,"div",11)(40,"label"),r(41,"Account Status"),t(),i(42,"select",20)(43,"option",14),r(44,"Select status"),t(),i(45,"option",21),r(46,"Active"),t(),i(47,"option",22),r(48," Inactive"),t(),i(49,"option",23),r(50,"Flagged"),t(),i(51,"option",24),r(52,"Deleted"),t()()()(),i(53,"div",10)(54,"div",11)(55,"label"),r(56,"Order"),t(),i(57,"select",25)(58,"option",26),r(59,"Descending"),t(),i(60,"option",27),r(61," Ascending"),t()()()()(),i(62,"button",28),r(63,"Search "),f(64,fi,1,0,"loading-icon",29),t()()(),i(65,"div",30),f(66,hi,1,1,"app-page-loader",31)(67,_i,4,0,"div",32)(68,yi,25,8,"div",33),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage creator profiles."),l(8),c("formGroup",n.form),l(50),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(
1),c("ngIf",(!n.creators||(n.creators==null?null:n.creators.length)==0)&&!n.searching),l(),c("ngIf",n.creators&&n.creators.length!=0&&!n.searching)}},dependencies:[X,ee,te,ve,Z,Y,K,H,M,Q,J,ne,N,L,G,F,ie],encapsulation:2})}return a})();var Ii=()=>["/admin/search/user"],Ti=()=>["/admin/search/creator"],Pi=()=>["/admin/search/flick"],Ai=()=>["/admin/complaint/video"],Fi=()=>["/admin/complaint/collection"],wi=()=>["/admin/complaint/creator"],rt=(()=>{class a{authService;constructor(e){this.authService=e}ngOnInit(){}getUser(){return this.authService.user?this.authService.user.account:void 0}static \u0275fac=function(o){return new(o||a)(g(w))};static \u0275cmp=A({type:a,selectors:[["app-admin-home"]],standalone:!1,decls:41,vars:15,consts:[[1,"py-5"],[1,"section-title","pb-2"],["icon","solar:graph-up-bold"],[1,"row"],[1,"col-lg-12"],[1,"col-lg-4","col-md-12","p-1"],["routerLinkActive","router-link-active",1,"card","text-white","bg-darker","p-1",2,"text-decoration","none",3,"routerLink"],[1,"card-body"],[1,"card-title"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"h2",1),p(2,"iconify",2),r(3,"Admin Home"),t(),i(4,"p"),r(5),C(6,"titlecase"),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",3)(11,"div",5)(12,"a",6)(13,"div",7)(14,"h5",8),r(15,"Search / Manage Users"),t()()()(),i(16,"div",5)(17,"a",6)(18,"div",7)(19,"h5",8),r(20,"Search / Manage Creators"),t()()()(),i(21,"div",5)(22,"a",6)(23,"div",7)(24,"h5",8),r(25,"Search / Manage Films"),t()()()(),i(26,"div",5)(27,"a",6)(28,"div",7)(29,"h5",8),r(30,"Manage Film Complaints"),t()()()(),i(31,"div",5)(32,"a",6)(33,"div",7)(34,"h5",8),r(35,"Manage Collection Complaints"),t()()()(),i(36,"div",5)(37,"a",6)(38,"div",7)(39,"h5",8),r(40,"Manage Creator Complaints"),t()()()()()()()()),o&2){let s;l(5),u("Welcome back ",y(6,7,(s=n.getUser())==null?null:s.firstName),"."),l(7),c("routerLink",I(9,Ii)),l(5),c("routerLink",I(10,Ti)),l(5),c("routerLink",I(11,Pi)),l(5),c("routerLink",I(12,Ai)),l(5),c("routerLink",I(13,Fi)),l(5),c("routerLink",I(14,wi))}},dependencies:[Oe,ke,N,F],encapsulation:2})}return a})();var at=()=>[],Ni=(a,m)=>({itemsPerPage:a,currentPage:m});function Vi(a,m){if(a&1&&(i(0,"option",31),r(1),t()),a&2){let e=m.$implicit;c("value",e.id),l(),u(" ",e.name,"")}}function Di(a,m){a&1&&p(0,"loading-icon")}function Mi(a,m){a&1&&p(0,"app-page-loader",32),a&2&&c("noPadding",!0)}function Oi(a,m){a&1&&(i(0,"div",33)(1,"div")(2,"h4"),r(3,"No Film found"),t()()())}function ki(a,m){if(a&1){let e=S();i(0,"button",44),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Activate Film"),t()}}function Ri(a,m){if(a&1){let e=S();i(0,"button",45),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Flag Film"),t()}}function Ui(a,m){if(a&1){let e=S();i(0,"tr")(1,"td",40),r(2),t(),i(3,"td",40),r(4),C(5,"titlecase"),t(),i(6,"td",40),r(7),t(),i(8,"td"),r(9),t(),i(10,"td",40),r(11),t(),i(12,"td",40),f(13,ki,2,0,"button",41)(14,Ri,2,0,"button",42),t(),i(15,"td",40)(16,"button",43),_("click",function(){let n=v(e).$implicit,s=d(2);return x(s.confirmUnpublish(!1,n==null?null:n.id))}),r(17,"Unpublish"),t()()()}if(a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),u(" ",y(5,11,e==null?null:e.title)," "),l(3),u(" ",(e==null?null:e.rating)||"N/A"," "),l(),P("bg-dark ",(e==null?null:e.status)=="ACTIVE"?"text-success":"text-danger",""),l(),u(" ",e==null?null:e.status," "),l(2),u(" ",n.getDateTime(e==null?null:e.publishedAt)," "),l(2),c("ngIf",e.status!="ACTIVE"),l(),c("ngIf",e.status=="ACTIVE"),l(2),c("disabled",(e==null?null:e.status)!="ACTIVE")}}function Gi(a,m){if(a&1){let e=S();i(0,"div",34)(1,"table",35)(2,"thead",36)(3,"th",37),r(4," S/N "),t(),i(5,"th",37),r(6," Title "),t(),i(7,"th",37),r(8," Ratings "),t(),i(9,"th",37),r(10," Status "),t(),i(11,"th",37),r(12," Published On "),t(),i(13,"th",37),r(14," Flag Film "),t(),i(15,"th",37),r(16," Action "),t()(),i(17,"tbody"),f(18,Ui,18,13,"tr",38),C(19,"paginate"),t()(),i(20,"pagination-controls",39),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}
1if(a&2){let e=d();l(18),c("ngForOf",q(19,1,e.flicks||I(4,at),B(5,Ni,e.itemsOnPage,e.p)))}}var ot=(()=>{class a{authService;bsModalService;toastrService;genreService;adminService;pageManager;flixService;user;flicks;p;form=new T({title:new h(""),rating:new h(""),genreId:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_FLIX_SEARCH";storedFilterData;defaultAvatar=O;processing=!1;genres;constructor(e,o,n,s,j,ae,oe){this.authService=e,this.bsModalService=o,this.toastrService=n,this.genreService=s,this.adminService=j,this.pageManager=ae,this.flixService=oe}ngOnInit(){this.initializeSearch(),this.getGenres()}getGenres(){this.genreService.getAll().subscribe({next:e=>this.genres=e})}getUser(){return this.authService.user?this.authService.user.account:void 0}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.flixService.searchFlix(this.removeEmpty(o)).subscribe({next:n=>{this.flicks=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.flicks=[]}})}confirmUnpublish(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"publish this film":"unpublish this film"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.unpublish(o)})}unpublish(e){this.processing=!0,this.adminService.unpublishFlick({id:e}).subscribe({next:o=>{this.processing=!1,this.toastrService.success(o.message),this.search(!1)},error:o=>{this.processing=!1,this.toastrService.error(o)}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}getDateTime(e){return new Date(e).toLocaleString()}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}flagVideo(e,o){this.adminService.updateFlixStatus({id:Number(e.id),status:o?"ACTIVE":"FLAGGED"}).subscribe({next:n=>{this.toastrService.success(`Operation successful for ${e.title}`),this.search(!1)},error:n=>{this.toastrService.error(`Failed to complete action for ${e.title}`)}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"un-flag this film":"flag this film"}?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.flagVideo(o,e)})}static \u0275fac=function(o){return new(o||a)(g(w),g(U),g(R),g(ye),g(W),g(z),g(Re))};static \u0275cmp=A({type:a,selectors:[["app-search-flix"]],standalone:!1,decls:62,vars:8,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:check-circle-bold"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["type","text","formControlName","title","placeholder","Title","value","",1,"form-control"],["formControlName","rating","value","",1,"form-control"],["value","",1,"bg-dark"],["value","1",1,"bg-dark"],["value","2",1,"bg-dark"],["value","3",1,"bg-dark"],["value","4",1,"bg-dark"],["value","5",1,"bg-dark"],["formControlName","genreId","value","",1,"form-control"],["class","bg-dark",3,"value",4,"ngFor","ngForOf"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[1,"bg-dark",3,"value"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1p
1x"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["class","btn btn-success py-1 px-2",3,"click",4,"ngIf"],["class","btn btn-danger py-1 px-2",3,"click",4,"ngIf"],[1,"btn","btn-success","py-1","px-2",3,"click","disabled"],[1,"btn","btn-success","py-1","px-2",3,"click"],[1,"btn","btn-danger","py-1","px-2",3,"click"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search Films"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"Title"),t(),p(20,"input",12),t()(),i(21,"div",10)(22,"div",11)(23,"label"),r(24,"Rating"),t(),i(25,"select",13)(26,"option",14),r(27,"Select Rating"),t(),i(28,"option",15),r(29," 1"),t(),i(30,"option",16),r(31," 2"),t(),i(32,"option",17),r(33," 3"),t(),i(34,"option",18),r(35," 4"),t(),i(36,"option",19),r(37," 5"),t()()()(),i(38,"div",10)(39,"div",11)(40,"label"),r(41,"Genre"),t(),i(42,"select",20)(43,"option",14),r(44,"Select Genre"),t(),f(45,Vi,2,2,"option",21),t()()(),i(46,"div",10)(47,"div",11)(48,"label"),r(49,"Order"),t(),i(50,"select",22)(51,"option",23),r(52,"Descending"),t(),i(53,"option",24),r(54," Ascending"),t()()()()(),i(55,"button",25),r(56,"Search "),f(57,Di,1,0,"loading-icon",26),t()()(),i(58,"div",27),f(59,Mi,1,1,"app-page-loader",28)(60,Oi,4,0,"div",29)(61,Gi,21,8,"div",30),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage published films."),l(8),c("formGroup",n.form),l(31),c("ngForOf",n.genres||I(7,at)),l(12),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(),c("ngIf",(!n.flicks||(n.flicks==null?null:n.flicks.length)==0)&&!n.searching),l(),c("ngIf",n.flicks&&n.flicks.length!=0&&!n.searching)}},dependencies:[X,ee,te,ve,Z,Y,K,H,M,Q,J,ne,N,L,G,F,ie],encapsulation:2})}return a})();var Li=()=>[],ji=(a,m)=>({itemsPerPage:a,currentPage:m}),lt=()=>["FAILED","PENDING"];function $i(a,m){a&1&&p(0,"loading-icon")}function Bi(a,m){a&1&&p(0,"app-page-loader",31),a&2&&c("noPadding",!0)}function qi(a,m){a&1&&(i(0,"div",32)(1,"div")(2,"h4"),r(3,"No Payout Request found"),t()()())}function Hi(a,m){if(a&1&&p(0,"img",44),a&2){let e=d().$implicit,o=d(2);c("src",o.getURL(e.creator==null?null:e.creator.avatar),D)}}function zi(a,m){if(a&1&&p(0,"img",44),a&2){let e=d(3);c("src",e.defaultAvatar,D)}}function Wi(a,m){a&1&&p(0,"iconify",45),a&2&&le("color: green;")}function Yi(a,m){if(a&1){let e=S();i(0,"button",46),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!0,n))}),r(1,"Approve Payout"),t()}if(a&2){let e=d().$implicit;c("disabled",I(1,lt).includes(e.paymentStatus))}}function Ki(a,m){if(a&1){let e=S();i(0,"button",47),_("click",function(){v(e);let n=d().$implicit,s=d(2);return x(s.confirmAction(!1,n))}),r(1,"Reject Payout"),t()}if(a&2){let e=d().$implicit;c("disabled",I(1,lt).includes(e.paymentStatus))}}function Xi(a,m){if(a&1&&(i(0,"tr")(1,"td",39),r(2),t(),i(3,"td",39),r(4),C(5,"number"),t(),i(6,"td",39),r(7),t(),i(8,"td"),r(9),t(),i(10,"td",39),f(11,Hi,1,1,"img",40)(12,zi,1,1,"img",40),r(13),C(14,"titlecase"),f(15,Wi,1,2,"iconify",41),t(),i(16,"td",39),r(17),t(),i(18,"td",39),f(19,Yi,2,2,"button",42)(20,Ki,2,2,"button",43),r(21),t()()),a&2){let e=m.$implicit,o=m.index,n=d(2);l(2),b(o+1+(n.p-1)*n.itemsOnPage),l(2),u(" ",y(5,15,e.amount)," "),l(3),u(" ",e.currency," "),l(),P("bg-dark ",e.paymentStatus.includes("PAID_WITH")?"text-success":e.paymentStatus=="FAILED"?"text-danger":"text-light",""),l(),u(" ",e.paymentStatus," "),l(2),c("ngIf",e.creator==null?null:e.creator.avatar),l(),c("ngIf",!(e.creator!=null&&e.creator.avatar)),l(),u(" ",y(14,17,e.creator==null?null:e.creator.name)," "),l(2),c("ngIf",e.creator==null?null:e.creator.verified),l(2),u(" ",n.getDateTime(e.createdAt)," "),l(2),c("ngIf",e.paymentStatus==="UNPAID"),l(),c("ngIf",e.paymentStatus==="UNPAID"),l(),u(" ",e.paymentStatus!=="UNPAID"?"N/A":""," ")}}function Qi(a,m){if(a&1){let e=S();i(0,"div",33)(1,"table",34)(2,"thead",35)(3,"th",36),r(4," S/N "),t(),i(5,"th",36),r(6," Amount "),t(),i(7,"th",36),r(8," Currency "),t(),i(9,"th",36),r(10," Status "),t(),i(11,"th",36),r(12," Creator "),t(),i(13,"th",36),r(14," Requested On "),t(),i(15,"th",36),r(16," Action "),t()(),i(17,"tbody"),f(18,Xi,22,19,"tr",37),C(19,"paginate"),t()(),i(20,"pagination-controls",38),_("pageChange",function(n){v(e);let s=d();return x(s.setCurrentPage(n))}),t()()}
1if(a&2){let e=d();l(18),c("ngForOf",q(19,1,e.payouts||I(4,Li),B(5,ji,e.itemsOnPage,e.p)))}}var st=(()=>{class a{authService;bsModalService;toastrService;payoutRequestService;pageManager;user;payouts;p;form=new T({paymentStatus:new h(""),creatorId:new h(""),currency:new h(""),limit:new h(""),direction:new h("DESC")});itemsForm=new T({itemsPerPage:new h("")});itemsOnPage=10;searching=!1;scope="ADMIN_PAYOUT_REQUEST_SEARCH";storedFilterData;defaultAvatar=O;constructor(e,o,n,s,j){this.authService=e,this.bsModalService=o,this.toastrService=n,this.payoutRequestService=s,this.pageManager=j}ngOnInit(){this.initializeSearch()}getUser(){return this.authService.user?this.authService.user.account:void 0}initializeSearch(){this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.storedFilterData=this.getFilter(),this.storedFilterData&&(this.p=this.pageManager.getData(this.scope,"PAGINATION"),this.pageManager.getData(this.scope,"ITEMSONPAGE")&&(this.itemsOnPage=this.pageManager.getData(this.scope,"ITEMSONPAGE"),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage})),this.patchFilter(this.storedFilterData)),this.storedFilterData||this.form.patchValue({limit:100})}search(e){this.searching=!0,e&&(this.p=1,this.setCurrentPage(1),this.form.patchValue({limit:100}));let o=E({},this.form.value);this.payoutRequestService.searchPayoutRequests(this.removeEmpty(o)).subscribe({next:n=>{this.payouts=n,this.searching=!1,this.saveFilter()},error:n=>{this.searching=!1,this.payouts=[]}})}setItemsPerPage(e){this.itemsOnPage=Number(e.target.value),this.itemsForm.patchValue({itemsPerPage:this.itemsOnPage}),this.pageManager.storeData(this.scope,"ITEMSONPAGE",this.itemsOnPage)}patchFilter(e){this.form.patchValue(e),this.form.get("limit")?.value||this.form.patchValue({limit:1e3}),this.search(!1)}setCurrentPage(e){this.p=e,Number(this.p*this.itemsOnPage)>=Number(this.form.get("limit")?.value)&&(this.form.patchValue({limit:this.p*this.itemsOnPage+1e3}),this.search(!1)),this.pageManager.storeData(this.scope,"PAGINATION",this.p)}saveFilter(){let e=E({},this.form.value);this.pageManager.storeData(this.scope,"SEARCH_FILTER_KEY",e)}getFilter(){return this.pageManager.getData(this.scope,"SEARCH_FILTER_KEY")}removeEmpty(e){return Object.entries(e).filter(([o,n])=>n!=null&&n!=""&&n!=null).reduce((o,[n,s])=>$(E({},o),{[n]:s===Object(s)?this.removeEmpty(s):s}),{})}getDateTime(e){return new Date(e).toLocaleString()}processPayout(e,o){this.searching=!0,this.payoutRequestService.processPayoutRequest({id:e.id,approved:o}).subscribe({next:n=>{this.searching=!1,this.toastrService.success(`Operation successful for payment request with ID = ${n.id}`),this.search(!1)},error:n=>{this.searching=!1,this.search(!1),this.toastrService.error("Failed to complete action for payment request")}})}confirmAction(e,o){this.bsModalService.show(V,{initialState:{message:`Are you sure you want to ${e?"initiate":"cancel"} this payout?`},ignoreBackdropClick:!0}).content.onClose.subscribe(s=>{s&&this.processPayout(o,e)})}getURL(e){return String(e).startsWith("avatar")?k.getCdnURL(String(e)):e}static \u0275fac=function(o){return new(o||a)(g(w),g(U),g(R),g(Ue),g(z))};static \u0275cmp=A({type:a,selectors:[["app-payout-requests"]],standalone:!1,decls:60,vars:6,consts:[[1,"py-5"],[1,"section-title","pt-2","pb-2"],["icon","solar:wallet-money"],[1,"row"],[1,"col-lg-12"],[1,"row","justify-content-center"],[1,"col-lg-12","col-md-12","p-1"],[1,"card","text-white",2,"background-color","#2b2c35"],[1,"card-header"],[3,"submit","formGroup"],[1,"col-md-3","my-1"],[1,"form-group"],["formControlName","paymentStatus","value","",1,"form-control"],["value","",1,"bg-dark"],["value","PENDING",1,"bg-dark"],["value","UNPAID",1,"bg-dark"],["value","FAILED",1,"bg-dark"],["value","PAID_WITH_WALLET",1,"bg-dark"],["value","PAID_WITH_PAYSTACK",1,"bg-dark"],["formControlName","currency","value","",1,"form-control"],["value","USDT",1,"bg-dark"],["value","NGN",1,"bg-dark"],["formControlName","direction","value","",1,"form-control"],["value","DESC",1,"bg-dark"],["value","ASC",1,"bg-dark"],["type","submit",1,"btn","btn-info","m-1","my-2",2,"float","right"],[4,"ngIf"],[1,"card-body"],[3,"noPadding",4,"ngIf"],["class","py-5 px-1 text-center",4,"ngIf"],["style","overflow: hidden;overflow-x: auto; width: 100%;",4,"ngIf"],[3,"noPadding"],[1,"py-5","px-1","text-center"],[2,"overflow","hidden","overflow-x","auto","width","100%"],[1,"table"],[1,"bg-dark",2,"border","1p
1x"],[1,"px-2"],[4,"ngFor","ngForOf"],[3,"pageChange"],[1,"bg-dark","text-light"],["height","30","width","30","style","object-fit: cover; border-radius: 50%;","alt","",3,"src",4,"ngIf"],["icon","solar:verified-check-bold",3,"style",4,"ngIf"],["class","btn btn-success py-1 px-2 mx-2 my-1",3,"disabled","click",4,"ngIf"],["class","btn btn-danger py-1 px-2 mx-2 my-1",3,"disabled","click",4,"ngIf"],["height","30","width","30","alt","",2,"object-fit","cover","border-radius","50%",3,"src"],["icon","solar:verified-check-bold"],[1,"btn","btn-success","py-1","px-2","mx-2","my-1",3,"click","disabled"],[1,"btn","btn-danger","py-1","px-2","mx-2","my-1",3,"click","disabled"]],template:function(o,n){if(o&1&&(i(0,"section",0)(1,"div")(2,"h2",1),p(3,"iconify",2),r(4,"Search Payout Request"),t(),i(5,"p"),r(6),t(),p(7,"br"),i(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"div",8)(14,"form",9),_("submit",function(){return n.search(!0)}),i(15,"div",3)(16,"div",10)(17,"div",11)(18,"label"),r(19,"Payment Status"),t(),i(20,"select",12)(21,"option",13),r(22,"Select Payment Status"),t(),i(23,"option",14),r(24,"Pending"),t(),i(25,"option",15),r(26," Unpaid"),t(),i(27,"option",16),r(28," Failed"),t(),i(29,"option",17),r(30," Paid with wallet"),t(),i(31,"option",18),r(32," Paid with paystack"),t()()()(),i(33,"div",10)(34,"div",11)(35,"label"),r(36,"Currency"),t(),i(37,"select",19)(38,"option",13),r(39,"Select Currency"),t(),i(40,"option",20),r(41,"USDT"),t(),i(42,"option",21),r(43," NGN"),t()()()(),i(44,"div",10)(45,"div",11)(46,"label"),r(47,"Order"),t(),i(48,"select",22)(49,"option",23),r(50,"Descending"),t(),i(51,"option",24),r(52," Ascending"),t()()()()(),i(53,"button",25),r(54,"Search "),f(55,$i,1,0,"loading-icon",26),t()()(),i(56,"div",27),f(57,Bi,1,1,"app-page-loader",28)(58,qi,4,0,"div",29)(59,Qi,21,8,"div",30),t()()()()()()()()),o&2){let s;l(6),u("Welcome ",(s=n.getUser())==null?null:s.firstName,", search and manage payout requests."),l(8),c("formGroup",n.form),l(41
1),c("ngIf",n.searching),l(2),c("ngIf",n.searching),l(),c("ngIf",(!n.payouts||(n.payouts==null?null:n.payouts.length)==0)&&!n.searching),l(),c("ngIf",n.payouts&&n.payouts.length!=0&&!n.searching)}},dependencies:[X,ee,te,Z,Y,K,H,M,Q,J,ne,N,L,G,Ve,F,ie],encapsulation:2})}return a})();var Ji=[{component:qe,path:"",data:{showFooter:!1},children:[{component:rt,path:"home",title:"Admin Console Home \u2022 Minflix"},{component:Ze,path:"complaint/video",title:"Film Complaints - Admin \u2022 Minflix"},{component:We,path:"complaint/creator",title:"Creator Complaints - Admin \u2022 Minflix"},{component:Xe,path:"complaint/collection",title:"Collection Complaints - Admin \u2022 Minflix"},{component:it,path:"search/user",title:"Search/Manage User - Admin \u2022 Minflix"},{component:nt,path:"search/creator",title:"Search/Manage Creator - Admin \u2022 Minflix"},{component:ot,path:"search/flick",title:"Search/Manage Flick - Admin \u2022 Minflix"},{component:tt,path:"complaint/view/:id",title:"View Complaint - Admin \u2022 Minflix"},{component:st,path:"search/payout",title:"Search/Manage Payout Requests - Admin \u2022 Minflix"},{path:"",redirectTo:"home",pathMatch:"full"}]}],ct=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=Ee({type:a});static \u0275inj=be({imports:[Ae.forChild(Ji),Ae]})}return a})();var wr=(()=>{class a{static \u0275fac=function(o){return new(o||a)};static \u0275mod=Ee({type:a});static \u0275inj=be({imports:[Ge,De,He,ct,Le,$e,Be]})}return a})();export{wr as AdminModule};
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.