PageSourceSearch

https://midlandsoccerclub.com/chunk-DKJUCICJ.js

js midlandsoccerclub.com collected 2026-10-09 22:39:56 UTC 993,031 bytes, 8,137 lines download raw bytes

1import{a as lo}from"./chunk-YYKWMCMZ.js";import"./chunk-7JPX6E7O.js";import{a as Ot}from"./chunk-XDSB64N2.js";import{b as ro,c as so}from"./chunk-D5WNKLON.js";import{a as Yi}from"./chunk-FLFERWGO.js";import{b as ao}from"./chunk-FZWSN3O2.js";import{a as ei}from"./chunk-XTQNEHPV.js";import{a as ct}from"./chunk-HETGIIFW.js";import{a as Ui}from"./chunk-VSK3DNK7.js";import{h as an,i as Bi,j as mt}from"./chunk-U6LIWGMP.js";import{a as Wi}from"./chunk-EMQ6BLJB.js";import{a as M}from"./chunk-GDA2ORYV.js";import{a as P,b as F}from"./chunk-WQIYR2AT.js";import{a as qe}from"./chunk-QUG4HHXZ.js";import{a as no,b as oo}from"./chunk-PSOULVZL.js";import"./chunk-XAXLMUF6.js";import{j as eo,k as ki}from"./chunk-O3BD2LYL.js";import"./chunk-6ORYOOUQ.js";import"./chunk-ZB44PIZA.js";import{c as Zn,f as Qn}from"./chunk-YBFQQSLW.js";import{a as Se}from"./chunk-BT6MT7GL.js";import{c as to}from"./chunk-DB7NBNZQ.js";import{a as Qt,b as io}from"./chunk-NE22VKN5.js";import"./chunk-AEK7Z5QZ.js";import{a as Nn}from"./chunk-BFPYKIIC.js";import{a as st}from"./chunk-4CVZBQNN.js";import{a as si}from"./chunk-VFXJ4ZBD.js";import{a as Ln}from"./chunk-QLTRNXEK.js";import"./chunk-ZB64W4XA.js";import{a as et}from"./chunk-SVABVB5X.js";import"./chunk-CMY6WAF3.js";import{a as Ue}from"./chunk-BROSYERN.js";import{a as Zt}from"./chunk-3IFGWXMA.js";import{a as $t}from"./chunk-JKMNVQUA.js";import{b as rn}from"./chunk-4D5SN44G.js";import"./chunk-VVVN3YIZ.js";import{b as Pt}from"./chunk-FWW3IJT2.js";import{a as Vi}from"./chunk-B6LCWWQX.js";import"./chunk-HYGNXZJR.js";import{a as At}from"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import"./chunk-U22BTVEZ.js";import{$b as Ct,$c as Gn,Ac as Un,C as Fi,Cc as yt,Ce as Kn,Ec as H,Ed as jn,Ff as ve,Gb as ft,Gc as $,Hc as K,Hd as Xt,Je as Pi,Kb as ht,Lc as Ai,Le as Oi,Mb as We,Mc as Yn,Ne as Li,Pe as Ni,Qc as nt,Qd as Hn,Sc as Kt,Sd as se,Se as Jn,Td as zn,Wc as Ze,Xc as ie,Zc as ne,b as fe,c as tt,cc as St,d as U,e as bi,fc as Vn,id as Ce,jb as ze,jc as te,k as Y,kd as Jt,kh as Xn,l as vi,lc as Q,m as Gt,mb as Mi,oa as On,r as Ti,re as dt,s as Ei,sc as kn,se as pt,ta as gt,ve as Qe,w as wi,x as jt,xa as Ne,xb as q,y as vn,yc as Bn,ye as qn,zc as Wn,ze as $n}from"./chunk-X5J6QTCG.js";import{$ as hi,$a as _,$c as bn,Aa as xn,Ac as Dt,Ad as nn,Db as ue,E as Ft,Eb as ai,Eg as Ht,Fa as s,Fb as lt,G as pn,Gb as _t,H as gi,Hb as Je,Hg as Ae,Ib as e,Ig as En,Jb as c,Jg as Mt,Ka as w,Kb as I,Kg as wn,Lb as Ye,Lc as Ge,Le as Rt,Ma as A,Mg as Ri,Na as Si,Ng as Fn,Oa as gn,Og as Dn,Pf as Tn,Pg as In,Q as mn,Qb as C,Rb as S,Rg as Rn,Rh as on,Sa as R,Sb as y,Sc as yi,Sg as Mn,T as cn,Tg as An,Th as ee,U as Z,Vc as yn,Vg as zt,W as Bt,Wb as en,Wc as de,Xa as J,Xg as qt,Yc as Be,Yg as Pn,Zb as hn,_ as fi,ba as ri,bb as x,be as z,bg as X,cb as fn,cc as Le,d as ge,db as W,dc as re,di as Pe,eb as N,ec as je,ef as Ii,fa as f,fb as V,fc as tn,fj as O,ga as h,gb as m,hb as n,ib as i,jb as g,k as wt,lc as v,lf as Ie,ma as Ci,mc as E,mf as Re,nb as rt,nc as B,nf as Me,ob as at,oc as Cn,pb as ke,pc as Sn,pj as k,q as dn,qb as D,qc as Fe,ra as Ve,sb as T,se as li,ta as un,tb as p,u as oe,vd as It,xb as Wt,xd as it,ya as _n,yb as Ut,yd as pe,zb as Yt,zd as Di,zg as le}from"./chunk-SMW7PHYX.js";import{a as vt,b as Tt}from"./chunk-BMIYOSOG.js";function ma(o,d){if(o&1){let t=D();e(0,`
2      `),n(1,"div",5),e(2,`
3        `),n(3,"div",3),e(4,`
4          `),n(5,"label"),e(6,"Club"),i(),e(7,`
5          `),n(8,"p-multiSelect",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),r.getTeams(),h(r.updateRegistrations())}),e(9,`
6          `),i(),e(10,`
7        `),i(),e(11,`
8      `),i(),e(12,`
9    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function ca(o,d){if(o&1){let t=D();e(0,`
10          `),n(1,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
11          `),i(),e(3,`
12        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected")}}function ua(o,d){if(o&1){let t=D();e(0,`
13            `),n(1,"p-datepicker",23,0),y("ngModelChange",function(r){f(t);let a=p(2);
13return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
14            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
15            `),n(7,"p-datepicker",24),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),i(),e(8,`
16          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function _a(o,d){if(o&1){let t=D();e(0,`
17            `),n(1,"p-datepicker",25),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
18            `),i(),e(3,`
19            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
20            `),n(7,"p-datepicker",26),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
21            `),i(),e(9,`
22          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function xa(o,d){if(o&1){let t=D();e(0,`
23  `),n(1,"div",1),e(2,`
24    `),_(3,ma,13,7),n(4,"div",2),e(5,`
25      `),n(6,"div",3),e(7,`
26        `),n(8,"label"),e(9,"Program Type"),i(),e(10,`
27        `),n(11,"p-multiSelect",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),h(r.updateRegistrations())}),e(12,`
28        `),i(),e(13,`
29      `),i(),e(14,`
30    `),i(),e(15,`
31    `),n(16,"div",5),e(17,`
32      `),n(18,"div",3),e(19,`
33        `),n(20,"label"),e(21,"Program"),i(),e(22,`
34        `),_(23,ca,4,7),i(),e(24,`
35    `),i(),e(25,`
36    `),n(26,"div",6),e(27,`
37      `),n(28,"div",3),e(29,`
38        `),n(30,"label"),e(31,"Gender"),i(),e(32,`
39        `),n(33,"p-select",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(34,`
40      `),i(),e(35,`
41    `),i(),e(36,`
42    `),n(37,"div",8),e(38,`
43      `),n(39,"div",9),e(40,`
44        `),n(41,"label"),e(42,"Birth Date"),i(),e(43,`
45        `),n(44,"p-select",10),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(45,`
46        `),n(46,"span",11)(47,"p-inputgroup"),e(48,`
47          `),_(49,ua,9,8)(50,_a,10,2),i(),e(51,`
48          `),n(52,"a",12),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(53,`
49            `),g(54,"i",13),e(55,`
50          `),i(),e(56,`
51        `),i(),e(57,`
52      `),i(),e(58,`
53    `),i(),e(59,`
54    `),n(60,"div",14),e(61,`
55      `),n(62,"div",3),e(63,`
56        `),n(64,"label"),e(65,"Test Players"),i(),e(66,`
57        `),n(67,"p-select",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),i(),e(68,`
58      `),i(),e(69,`
59    `),i(),e(70,`
60    `),n(71,"div",8),e(72,`
61      `),n(73,"div",3),e(74,`
62        `),n(75,"label"),e(76,"Registration Date"),i(),e(77,`
63        `),n(78,"span",11)(79,"p-inputgroup"),e(80,`
64          `),n(81,"p-datepicker",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(82,`
65          `),i(),e(83,`
66          `),n(84,"p-inputgroup-addon"),e(85,"to"),i(),e(86,`
67          `),n(87,"p-datepicker",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(88,`
68          `),i(),e(89,`
69          `),i(),e(90,`
70          `),n(91,"a",12),T("click",function(){f(t);let r=p();return r.filters.regFrom=r.reportService.defaultDate,r.filters.regTo=void 0,h(r.updateRegistrations())}),e(92,`
71            `),g(93,"i",13),e(94,`
72          `),i(),e(95,`
73        `),i(),e(96,`
74      `),i(),e(97,`
75    `),i(),e(98,`
76    `),n(99,"div",2),e(100,`
77      `),n(101,"div",3),e(102,`
78        `),n(103,"label"),e(104,"Registration"),i(),e(105,`
79        `),n(106,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(107,`
80        `),i(),e(108,`
81      `),i(),e(109,`
82    `),i(),e(110,`
83    `),n(111,"div",2),e(112,`
84      `),n(113,"div",3),e(114,`
85        `),n(115,"label"),e(116,"Season"),i(),e(117,`
86        `),n(118,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(119,`
87        `),i(),e(120,`
88      `),i(),e(121,`
89    `),i(),e(122,`
90    `),n(123,"div",2),e(124,`
91      `),n(125,"div",3),e(126,`
92        `),n(127,"label"),e(128,"Team"),i(),e(129,`
93        `),n(130,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(131,`
94        `),i(),e(132,`
95      `),i(),e(133,`
96    `),i(),e(134,`
97    `),n(135,"div",5),e(136,`
98      `),n(137,"div",3),e(138,`
99        `),n(139,"label"),e(140,"Include Cancelled Registrations"),i(),e(141,`
100        `),n(142,"p-checkbox",20),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.includeCancelledRegistrations,r)||(a.filters.includeCancelledRegistrations=r),h(r)}),i(),e(143,`
101      `),i(),e(144,`
102    `),i(),e(145,`
103  `),i(),e(146,`
104`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("filter",!0)("maxSelectedLabels",1)("showToggleAll",!0)("selectedItemsLabel","{0} program types selected"),s(12),x(t.programs?23:-1),s(10),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?49:50),s(18),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(14),C("ngModel",t.filters.regFrom),s(6),C("ngModel",t.filters.regTo),s(19),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0}
104 teams selected"),s(12),m("binary",!0),C("ngModel",t.filters.includeCancelledRegistrations)}}var po=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.registrationService=r,this.teamService=a,this.loading=!0,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testUserOptions=le,this.genderOptions=Ae}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes()]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.reportService.reportFilters[F.REGISTRATION_SUMMARY]===void 0&&(this.reportService.reportFilters[F.REGISTRATION_SUMMARY]=new P,this.reportService.reportFilters[F.REGISTRATION_SUMMARY].programTypes=this.programTypes.filter(r=>r.value!==Ne.OTHER)),this.filters=this.reportService.reportFilters[F.REGISTRATION_SUMMARY],this.filterPrograms(),this.updateRegistrations(),this.getTeams(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0),this.loading=!1}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REGISTRATION_SUMMARY],this.filterPrograms(),this.updateRegistrations()})}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name})}):this.teams=void 0}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve))},d.\u0275cmp=A({type:d,selectors:[["app-registration-summary-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","maxSelectedLabels","showToggleAll","selectedItemsLabel"],[1,"col-md-5","col-lg-3"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2","col-lg-2"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[3,"ngModelChange","binary","ngModel"],["optionLabel","name","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["o
104ptionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"]],template:function(r,a){r&1&&_(0,xa,147,41),r&2&&x(a.loading?-1:0)},dependencies:[U,Y,ie,ne,te,St,q,Q],encapsulation:2});let o=d;return o})();function fa(o,d){if(o&1&&(e(0,`
105          `),n(1,"th",9),e(2),g(3,"p-sortIcon",10),e(4,`
106          `),i(),e(5,`
107        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
108            `,t.header,`
109            `),s(),m("field",t.field)}}function ha(o,d){o&1&&(e(0,`
110          `),g(1,"td"),e(2,`
111        `))}function Ca(o,d){if(o&1&&(e(0,`
112      `),n(1,"tr"),e(2,`
113        `),N(3,fa,6,4,null,null,W),i(),e(5,`
114      `),n(6,"tr",5),e(7,`
115        `),_(8,ha,3,0),g(9,"td"),e(10,`
116        `),g(11,"td"),e(12,`
117        `),g(13,"td"),e(14,`
118        `),n(15,"td")(16,"span",6),e(17),i(),e(18," / "),n(19,"span",7),e(20),i(),e(21,`
119    `),i(),e(22,`
120    `),n(23,"td"),e(24),v(25,"accountingCurrency"),i(),e(26,`
121    `),n(27,"td"),e(28),v(29,"accountingCurrency"),i(),e(30,`
122    `),n(31,"td"),e(32),v(33,"accountingCurrency"),i(),e(34,`
123    `),n(35,"td"),e(36),v(37,"accountingCurrency"),i(),e(38,`
124    `),n(39,"td",8),e(40),v(41,"accountingCurrency"),i(),e(42,`
125    `),n(43,"td"),e(44),v(45,"accountingCurrency"),i(),e(46,`
126    `),n(47,"td"),e(48),v(49,"accountingCurrency"),i(),e(50,`
127    `),n(51,"td"),e(52),v(53,"accountingCurrency"),i(),e(54,`
128    `),n(55,"td"),e(56),v(57,"accountingCurrency"),i(),e(58,`
129  `),i(),e(59,`
130`)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(9),c(t.reportService.getTotal("regCount",t.reportData)),s(3),c(t.reportService.getTotal("assignedCount",t.reportData)),s(4),c(E(25,12,t.reportService.getTotal("price",t.reportData))),s(4),c(E(29,14,t.reportService.getTotal("discountAmount",t.reportData))),s(4),c(E(33,16,t.reportService.getTotal("finAidAmount",t.reportData))),s(4),c(E(37,18,t.reportService.getTotal("adminFee",t.reportData))),s(4),c(E(41,20,t.reportService.getTotal("amountDue",t.reportData))),s(4),c(E(45,22,t.reportService.getTotal("amountPaid",t.reportData))),s(4),c(E(49,24,t.reportService.getTotal("creditUsed",t.reportData))),s(4),c(E(53,26,t.reportService.getTotal("totalPaid",t.reportData))),s(4),c(E(57,28,t.reportService.getTotal("amountOutstanding",t.reportData)))}}function Sa(o,d){if(o&1&&(e(0,`
131      `),n(1,"td"),e(2),i(),e(3,`
132    `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function ya(o,d){if(o&1&&(e(0,`
133      / `),n(1,"span",7),e(2),i(),e(3,`
134  `)),o&2){let t=p().$implicit;s(2),c(t.assignedCount)}}function ba(o,d){if(o&1){let t=D();e(0,`
135  `),n(1,"tr"),e(2,`
136    `),_(3,Sa,4,1),n(4,"td")(5,"a",11),T("click",function(){let r=f(t).$implicit,a=p();return h(a.showDetails(r.programID))}),e(6),i()(),e(7,`
137    `),n(8,"td"),e(9),i(),e(10,`
138    `),n(11,"td"),e(12),i(),e(13,`
139    `),n(14,"td")(15,"span",6),e(16),i(),e(17,`
140    `),_(18,ya,4,1),i(),e(19,`
141`),n(20,"td"),e(21),v(22,"accountingCurrency"),i(),e(23,`
142`),n(24,"td"),e(25),v(26,"accountingCurrency"),i(),e(27,`
143`),n(28,"td"),e(29),v(30,"accountingCurrency"),i(),e(31,`
144`),n(32,"td"),e(33),v(34,"accountingCurrency"),i(),e(35,`
145`),n(36,"td"),e(37),v(38,"accountingCurrency"),i(),e(39,`
146`),n(40,"td"),e(41),v(42,"accountingCurrency"),i(),e(43,`
147`),n(44,"td"),e(45),v(46,"accountingCurrency"),i(),e(47,`
148`),n(48,"td"),e(49),v(50,"accountingCurrency"),i(),e(51,`
149`),n(52,"td"),e(53),v(54,"accountingCurrency"),i(),e(55,`
150`),i(),e(56,`
151`)}if(o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(3),c(t.programName),s(3),c(t.regName),s(3),I("",t.status===1?"Open":t.status===2?"Pending":"Closed",`
152    `),s(4),c(t.regCount),s(2),x(t.programTypeID===1?18:-1),s(3),c(E(22,15,t.price)),s(4),c(E(26,17,t.discountAmount)),s(4),c(E(30,19,t.finAidAmount)),s(4),c(E(34,21,t.adminFee)),s(4),c(E(38,23,t.amountDue)),s(4),c(E(42,25,t.amountPaid)),s(4),c(E(46,27,t.creditUsed)),s(4),c(E(50,29,t.totalPaid)),s(4),c(E(54,31,t.amountOutstanding))}}var mo=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.siteDataService=r,this.router=a,this.AriaLabels=X,this.loading=!0,this.showClubName=!1}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.getReportData(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData()})}getReportColumns(){return[{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"status",header:"Status"},{field:"regCount",header:"Registered / Open"},{field:"price",header:"Program List Price"},{field:"discountAmount",header:"Total Discount Amount"},{field:"finAidAmount",header:"Total Financial Aid Amount"},{field:"adminFee",header:"Total Fee Adjustment"},{field:"amountDue",header:"Total Fee"},{field:"amountPaid",header:"Paid (Cash)"},{field:"creditUsed",header:"Paid (Credit)"},{field:"totalPaid",header:"Total Paid"},{field:"amountOutstanding",header:"Outstanding"}]}getReportData(){this.loading=!0,this.reportService.getRegistrationSummaryData().subscribe(l=>{this.reportData=l,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}
152showDetails(l){this.reportService.reportFilters[F.REGISTRATION_DETAILS]=new P;let r=this.reportService.reportFilters[F.REGISTRATION_DETAILS];r.programs=[this.reportService.programs.find(a=>a.programID===l)],this.reportService.changeReportType.next(F.REGISTRATION_DETAILS)}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(it))},d.\u0275cmp=A({type:d,selectors:[["app-registration-summary-table"]],standalone:!1,decls:10,vars:2,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"columns","value"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"registered-number"],[1,"registered-total"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"click"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
153  `),n(2,"p-table",2,0),e(4,`
154    `),R(5,Ca,60,30,"ng-template",3),e(6,`
155`),R(7,ba,57,33,"ng-template",4),e(8,`
156`),i(),e(9,`
157`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData))},dependencies:[z,H,$,K,se],encapsulation:2});let o=d;return o}
157)();function Ta(o,d){if(o&1){let t=D();e(0,`
158    `),n(1,"div",4),e(2,`
159      `),n(3,"div",2),e(4,`
160        `),n(5,"label"),e(6,"Club"),i(),e(7,`
161        `),n(8,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),r.getTeams(),h(r.updateRegistrations())}),e(9,`
162        `),i(),e(10,`
163      `),i(),e(11,`
164    `),i(),e(12,`
165  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var co=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.registrationService=r,this.teamService=a,this.sitePaymentTypes=Dn,this.testUserOptions=le,this.daysOverdueOptions=Ri}ngOnInit(){this.reportService.reportFilters[F.OUTSTANDING_FEES]===void 0&&(this.reportService.reportFilters[F.OUTSTANDING_FEES]=new P),this.filters=this.reportService.reportFilters[F.OUTSTANDING_FEES],oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(!0)]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.filterPrograms(),this.getTeams()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.OUTSTANDING_FEES]})}filterPrograms(){this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.OUTSTANDING_FEES],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypeID=+this.reportService.state.programTypeID:this.filters.programTypeID=null,this.reportService.state.activePrograms?(this.filters.activePrograms=this.reportService.state.activePrograms,this.filters.activeFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.activeTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.filters.regFrom=void 0):this.filters.regFrom=this.reportService.state.regFrom?new Date(this.reportService.state.regFrom):void 0,this.reportService.state.includePayments&&(this.filters.includePayments=!0),this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.state.sitePaymentTypeID?this.filters.sitePaymentTypeID=+this.reportService.state.sitePaymentTypeID:this.filters.sitePaymentTypeID=null),this.programs=this.reportService.filterPrograms(this.filters)}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state?(this.filters.daysOverdue=this.reportService.state.pastDue??null,this.updateRegistrations(),this.reportService.showReportData=!0,this.reportService.state=void 0):this.updateRegistrations()}):this.teams=void 0}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve))},d.\u0275cmp=A({type:d,selectors:[["app-outstanding-fees-filters"]],standalone:!1,decls:165,vars:44,consts:[[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["o
165ptionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-2"],[3,"ngModelChange","binary","ngModel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
166  `),_(2,Ta,13,7),n(3,"div",1),e(4,`
167    `),n(5,"div",2),e(6,`
168      `),n(7,"label"),e(8,"Program Type"),i(),e(9,`
169      `),n(10,"p-select",3),y("ngModelChange",function(u){return S(a.filters.programTypeID,u)||(a.filters.programTypeID=u),u}),T("onChange",function(){return a.filterPrograms(),a.updateRegistrations()}),i(),e(11,`
170    `),i(),e(12,`
171  `),i(),e(13,`
172  `),n(14,"div",4),e(15,`
173    `),n(16,"div",2),e(17,`
174      `),n(18,"label"),e(19,"Program"),i(),e(20,`
175      `),n(21,"p-multiSelect",5),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),T("onChange",function(){return a.updateRegistrations()}),e(22,`
176      `),i(),e(23,`
177    `),i(),e(24,`
178  `),i(),e(25,`
179  `),n(26,"div",6),e(27,`
180    `),n(28,"div",2),e(29,`
181      `),n(30,"label"),e(31,"Revenue Transaction Date"),i(),e(32,`
182      `),n(33,"span",7)(34,"p-inputgroup"),e(35,`
183        `),n(36,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.regFrom,u)||(a.filters.regFrom=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(37,`
184        `),i(),e(38,`
185        `),n(39,"p-inputgroup-addon"),e(40,"to"),i(),e(41,`
186        `),n(42,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.regTo,u)||(a.filters.regTo=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(43,`
187        `),i(),e(44,`
188        `),i(),e(45,`
189        `),n(46,"a",10),T("click",function(){return a.filters.regFrom=a.reportService.defaultDate,a.filters.regTo=void 0,a.updateRegistrations()}),e(47,`
190          `),g(48,"i",11),e(49,`
191        `),i(),e(50,`
192      `),i(),e(51,`
193    `),i(),e(52,`
194  `),i(),e(53,`
195  `),n(54,"div",6),e(55,`
196    `),n(56,"div",2),e(57,`
197      `),n(58,"label"),e(59,"Due Date"),i(),e(60,`
198      `),n(61,"span",7)(62,"p-inputgroup"),e(63,`
199        `),n(64,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(65,`
200        `),i(),e(66,`
201        `),n(67,"p-inputgroup-addon"),e(68,"to"),i(),e(69,`
202        `),n(70,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(71,`
203        `),i(),e(72,`
204        `),i(),e(73,`
205        `),n(74,"a",10),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0,a.updateRegistrations()}),e(75,`
206          `),g(76,"i",11),e(77,`
207        `),i(),e(78,`
208      `),i(),e(79,`
209    `),i(),e(80,`
210  `),i(),e(81,`
211  `),n(82,"div",1),e(83,`
212    `),n(84,"div",2),e(85,`
213      `),n(86,"label"),e(87,"Registration"),i(),e(88,`
214      `),n(89,"p-multiSelect",12),y("ngModelChange",function(u){return S(a.filters.registrations,u)||(a.filters.registrations=u),u}),e(90,`
215      `),i(),e(91,`
216    `),i(),e(92,`
217  `),i(),e(93,`
218  `),n(94,"div",1),e(95,`
219    `),n(96,"div",2),e(97,`
220      `),n(98,"label"),e(99,"Season"),i(),e(100,`
221      `),n(101,"p-multiSelect",13),y("ngModelChange",function(u){return S(a.filters.seasons,u)||(a.filters.seasons=u),u}),e(102,`
222      `),i(),e(103,`
223    `),i(),e(104,`
224  `),i(),e(105,`
225  `),n(106,"div",1),e(107,`
226    `),n(108,"div",2),e(109,`
227      `),n(110,"label"),e(111,"Team"),i(),e(112,`
228      `),n(113,"p-multiSelect",14),y("ngModelChange",function(u){return S(a.filters.teams,u)||(a.filters.teams=u),u}),e(114,`
229      `),i(),e(115,`
230    `),i(),e(116,`
231  `),i(),e(117,`
232  `),n(118,"div",1),e(119,`
233    `),n(120,"div",2),e(121,`
234      `),n(122,"label"),e(123,"Type"),i(),e(124,`
235      `),n(125,"p-select",15),y("ngModelChange",function(u){return S(a.filters.sitePaymentTypeID,u)||(a.filters.sitePaymentTypeID=u),u}),i(),e(126,`
236    `),i(),e(127,`
237  `),i(),e(128,`
238  `),n(129,"div",16),e(130,`
239    `),n(131,"div",2),e(132,`
240      `),n(133,"label"),e(134,"Days Overdue"),i(),e(135,`
241      `),n(136,"p-select",15),y("ngModelChange",function(u){return S(a.filters.daysOverdue,u)||(a.filters.daysOverdue=u),u}),e(137,`
242      `),i(),e(138,`
243    `),i(),e(139,`
244  `),i(),e(140,`
245  `),n(141,"div",16),e(142,`
246    `),n(143,"div",2),e(144,`
247      `),n(145,"label"),e(146,"Test Users/Players"),i(),e(147,`
248      `),n(148,"p-select",15),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),e(149,`
249      `),i(),e(150,`
250    `),i(),e(151,`
251  `),i(),e(152,`
252  `),n(153,"div",4),e(154,`
253    `),n(155,"div",2),e(156,`
254      `),n(157,"label"),e(158,"Include Payments Paid After Revenue Transaction End Date"),i(),e(159,`
255      `),n(160,"p-checkbox",17),y("ngModelChange",function(u){return S(a.filters.includePayments,u)||(a.filters.includePayments=u),u}),i(),e(161,`
256    `),i(),e(162,`
257  `),i(),e(163,`
258`),i(),e(164,`
259`)),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.programTypeID),m("options",a.programTypes),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected"),s(15),C("ngModel",a.filters.regFrom),s(6),C("ngModel",a.filters.regTo),s(22),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),m("autofocusFilter",!0),C("ngModel",a.filters.registrations),m("options",a.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registrations selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.seasons),m("options",a.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.teams),m("options",a.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0}
259 teams selected"),s(12),C("ngModel",a.filters.sitePaymentTypeID),m("options",a.sitePaymentTypes),s(11),C("ngModel",a.filters.daysOverdue),m("options",a.daysOverdueOptions),s(12),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(12),m("binary",!0),C("ngModel",a.filters.includePayments))},dependencies:[U,Y,ie,ne,te,St,q,Q],encapsulation:2});let o=d;return o})();var wa=o=>["/admin/users",o,"profile"],Fa=o=>["/admin/players",o,"overview"];function Da(o,d){if(o&1&&(e(0,`
260          `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
261          `),i(),e(5,`
262        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
263            `,t.header,`
264            `),s(),m("field",t.field)}}function Ia(o,d){o&1&&(e(0,`
265          `),g(1,"td"),e(2,`
266        `))}function Ra(o,d){if(o&1&&(e(0,`
267      `),n(1,"tr"),e(2,`
268        `),N(3,Da,6,4,null,null,W),i(),e(5,`
269      `),n(6,"tr",5),e(7,`
270        `),_(8,Ia,3,0),g(9,"td"),e(10,`
271        `),g(11,"td"),e(12,`
272        `),g(13,"td"),e(14,`
273        `),g(15,"td"),e(16,`
274        `),g(17,"td"),e(18,`
275        `),g(19,"td"),e(20,`
276        `),g(21,"td"),e(22,`
277        `),n(23,"td",6),e(24),v(25,"accountingCurrency"),i(),e(26,`
278        `),n(27,"td"),e(28),v(29,"accountingCurrency"),i(),e(30,`
279        `),n(31,"td"),e(32),v(33,"accountingCurrency"),i(),e(34,`
280        `),n(35,"td"),e(36),v(37,"accountingCurrency"),i(),e(38,`
281        `),n(39,"td"),e(40),v(41,"accountingCurrency"),i(),e(42,`
282        `),g(43,"td"),e(44,`
283        `),g(45,"td"),e(46,`
284      `),i(),e(47,`
285    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(16),c(E(25,6,t.totalAmountDue)),s(4),c(E(29,8,t.totalAmountPaid)),s(4),c(E(33,10,t.totalCreditUsed)),s(4),c(E(37,12,t.totalAmountPaid+t.totalCreditUsed)),s(4),c(E(41,14,t.totalAmountDue-t.totalAmountPaid-t.totalCreditUsed))}}function Ma(o,d){if(o&1&&(e(0,`
286          `),n(1,"td"),e(2),i(),e(3,`
287        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Aa(o,d){if(o&1&&(e(0,`
288            `),n(1,"a",9),e(2),i(),e(3,`
289          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,wa,t.clubUserID)),s(),c(t.teamName)}}function Pa(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
290            `,t.teamName,`
291          `)}}function Oa(o,d){if(o&1&&(e(0,`
292            `),n(1,"a",9),e(2),i(),e(3,`
293          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Fa,t.playerID)),s(),c(t.playerName)}}function La(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
294            `,t.playerName,`
295          `)}}function Na(o,d){if(o&1&&(e(0,`
296      `),n(1,"tr"),e(2,`
297        `),_(3,Ma,4,1),n(4,"td"),e(5),i(),e(6,`
298        `),n(7,"td"),e(8,`
299          `),_(9,Aa,4,4)(10,Pa,1,1),i(),e(11,`
300        `),n(12,"td"),e(13),i(),e(14,`
301        `),n(15,"td"),e(16),i(),e(17,`
302        `),n(18,"td"),e(19),i(),e(20,`
303        `),n(21,"td"),e(22),i(),e(23,`
304        `),n(24,"td"),e(25,`
305          `),_(26,Oa,4,4)(27,La,1,1),i(),e(28,`
306        `),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
307        `),n(33,"td"),e(34),v(35,"accountingCurrency"),i(),e(36,`
308        `),n(37,"td"),e(38),v(39,"accountingCurrency"),i(),e(40,`
309        `),n(41,"td"),e(42),v(43,"accountingCurrency"),i(),e(44,`
310        `),n(45,"td"),e(46),v(47,"accountingCurrency"),i(),e(48,`
311        `),n(49,"td"),e(50),v(51,"date"),i(),e(52,`
312        `),n(53,"td"),e(54),i(),e(55,`
313      `),i(),e(56,`
314    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.programName),s(4),x(!t.playerName&&l.reportService.profile[l.Permission.UserProfile]?9:10),s(4),c(t.uniqueInvoiceID),s(3),c(t.shortDescription),s(3),c(t.userEmail),s(3),c(t.userName),s(4),x(l.reportService.profile[l.Permission.Profile]?26:27),s(4),c(E(31,15,t.amountDue)),s(4),c(E(35,17,t.amountPaid)),s(4),c(E(39,19,t.creditUsed)),s(4),c(E(43,21,t.totalPaid)),s(4),c(E(47,23,t.outstanding)),s(4),c(B(51,25,t.dueDate,"M/d/y")),s(4),c(t.isRestricted?"Yes":"")}}var uo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.showClubName=!1,this.loading=!0,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"programName",header:"Program"},{field:"teamName",header:"Team"},{field:"uniqueInvoiceID",header:"Invoice ID"},{field:"shortDescription",header:"Invoice Description"},{field:"userEmail",header:"User Email"},{field:"userName",header:"User Name"},{field:"playerName",header:"Player Name"},{field:"amountDue",header:"Total Fee"},{field:"amountPaid",header:"Paid (Cash)"},{field:"creditUsed",header:"Paid (Credit)"},{field:"totalPaid",header:"Total Paid"},{field:"amountOutstanding",header:"Outstanding"},{field:"dueDate",header:"Due Date"},{field:"isRestricted",header:"Is Restricted"}]}getReportData(l){let r=this.reportService.reportFilters[F.OUTSTANDING_FEES];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getOutstandingFeesData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalAmountDue=a.totalAmountDue,this.totalAmountPaid=a.totalAmountPaid,this.totalCreditUsed=a.totalCreditUsed,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-outstanding-fees-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
315  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
316    `),R(5,Ra,48,16,"ng-template",3),e(6,`
317    `),R(7,Na,57,28,"ng-template",4),e(8,`
318  `),i(),e(9,`
319`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de,se],encapsulation:2});let o=d;return o}
319)();function Ba(o,d){if(o&1){let t=D();e(0,`
320    `),n(1,"div",10),e(2,`
321      `),n(3,"div",2),e(4,`
322        `),n(5,"label"),e(6,"Club"),i(),e(7,`
323        `),n(8,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),h(r.filterDonations())}),e(9,`
324        `),i(),e(10,`
325      `),i(),e(11,`
326    `),i(),e(12,`
327  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var _o=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.donationsService=r,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.DONATIONS]===void 0&&(this.reportService.reportFilters[F.DONATIONS]=new P),this.filters=this.reportService.reportFilters[F.DONATIONS],oe([this.donationsService.getClubDonationOptionsTitles(),this.reportService.getPrograms()]).subscribe(l=>{this.reportService.state&&(this.filters.dateFrom=this.reportService.state.dateFrom,this.filters.dateTo=this.reportService.state.dateTo,this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(r=>r.clubID===this.reportService.state.clubID)]),this.reportService.showReportData=!0),this.donations=l[0],this.reportService.programs=l[1],this.filterPrograms(),this.filterDonations()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.DONATIONS]})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}filterDonations(){if(this.filters.clubs||this.reportService.clubs.length===1){let l=this.filters.clubs?this.filters.clubs.map(r=>r.clubID):[this.reportService.clubs[0].clubID];this.filteredDonations=this.donations.filter(r=>l.includes(r.clubID)),this.filters.donations&&(this.filters.donations=this.filters.donations.filter(r=>l.includes(r.clubID))),this.filteredDonations.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.reportService.clubs.find(a=>a.clubID===r.clubID).name} - ${r.title}`:r.displayName=r.title})}}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Zt))},d.\u0275cmp=A({type:d,selectors:[["app-donations-filters"]],standalone:!1,decls:66,vars:19,consts:[[1,"row"],[1,"col-md-2","col-lg-3"],[1,"form-group"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-5","col-lg-3"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
328  `),_(2,Ba,13,7),n(3,"div",1),e(4,`
329    `),n(5,"div",2),e(6,`
330      `),n(7,"label"),e(8,"Donation Option"),i(),e(9,`
331      `),n(10,"p-multiSelect",3),y("ngModelChange",function(u){return S(a.filters.donations,u)||(a.filters.donations=u),u}),e(11,`
332      `),i(),e(12,`
333    `),i(),e(13,`
334  `),i(),e(14,`
335  `),n(15,"div",4),e(16,`
336    `),n(17,"div",2),e(18,`
337      `),n(19,"label"),e(20,"Donation Date"),i(),e(21,`
338      `),n(22,"span",5)(23,"p-inputgroup"),e(24,`
339        `),n(25,"p-datepicker",6),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(26,`
340        `),i(),e(27,`
341        `),n(28,"p-inputgroup-addon"),e(29,"to"),i(),e(30,`
342        `),n(31,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(32,`
343        `),i(),e(33,`
344        `),i(),e(34,`
345        `),n(35,"a",8),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(36,`
346          `),g(37,"i",9),e(38,`
347        `),i(),e(39,`
348      `),i(),e(40,`
349    `),i(),e(41,`
350  `),i(),e(42,`
351  `),n(43,"div",10),e(44,`
352    `),n(45,"div",2),e(46,`
353      `),n(47,"label"),e(48,"Program"),i(),e(49,`
354      `),n(50,"p-multiSelect",3),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),e(51,`
355      `),i(),e(52,`
356    `),i(),e(53,`
357  `),i(),e(54,`
358  `),n(55,"div",11),e(56,`
359    `),n(57,"div",2),e(58,`
360      `),n(59,"label"),e(60,"Test Users"),i(),e(61,`
361      `),n(62,"p-select",12),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(63,`
362    `),i(),e(64,`
363  `),i(),e(65,`
364`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),m("autofocusFilter",!0),C("ngModel",a.filters.donations),m("options",a.filteredDonations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} donation options selected"),s(15),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected"),s(12),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
364)();function Ua(o,d){if(o&1&&(e(0,`
365          `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
366          `),i(),e(5,`
367        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
368            `,t.header,`
369            `),s(),m("field",t.field)}}function Ya(o,d){o&1&&(e(0,`
370          `),g(1,"td"),e(2,`
371        `))}function Ga(o,d){if(o&1&&(e(0,`
372      `),n(1,"tr"),e(2,`
373        `),N(3,Ua,6,4,null,null,W),i(),e(5,`
374      `),n(6,"tr",5),e(7,`
375        `),_(8,Ya,3,0),g(9,"td"),e(10,`
376        `),g(11,"td"),e(12,`
377        `),g(13,"td"),e(14,`
378        `),g(15,"td"),e(16,`
379        `),g(17,"td"),e(18,`
380        `),n(19,"td",6),e(20),v(21,"accountingCurrency"),i(),e(22,`
381      `),i(),e(23,`
382    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(12),c(E(21,2,t.totalAmount))}}function ja(o,d){if(o&1&&(e(0,`
383          `),n(1,"td"),e(2),i(),e(3,`
384        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Ha(o,d){if(o&1&&(e(0,`
385      `),n(1,"tr"),e(2,`
386        `),_(3,ja,4,1),n(4,"td"),e(5),v(6,"utcDate"),i(),e(7,`
387        `),n(8,"td"),e(9),i(),e(10,`
388        `),n(11,"td"),e(12),i(),e(13,`
389        `),n(14,"td"),e(15),i(),e(16,`
390        `),n(17,"td"),e(18),i(),e(19,`
391        `),n(20,"td"),e(21),v(22,"accountingCurrency"),i(),e(23,`
392      `),i(),e(24,`
393    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,7,t.submittedDate,"M/d/y")),s(4),c(t.userName),s(3),c(t.programName),s(3),c(t.playerName),s(3),c(t.donationTitle),s(3),c(E(22,10,t.amount))}}var xo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"submittedDate",header:"Date"},{field:"userName",header:"User Name"},{field:"programName",header:"Program"},{field:"playerName",header:"Player Name"},{field:"donationTitle",header:"Donation"},{field:"amount",header:"Amount"}]}getReportData(l){let r=this.reportService.reportFilters[F.DONATIONS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getDonationsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalAmount=a.totalAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-donations-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","submittedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
394  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
395    `),R(5,Ga,24,4,"ng-template",3),e(6,`
396    `),R(7,Ha,25,12,"ng-template",4),e(8,`
397  `),i(),e(9,`
398`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,Ce,se],encapsulation:2});let o=d;return o}
398)();var go=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.donationsService=r,this.donationsOptions=[{label:"All",value:null}],this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.VOLUNTEERS]===void 0&&(this.reportService.reportFilters[F.VOLUNTEERS]=new P),this.filters=this.reportService.reportFilters[F.VOLUNTEERS],this.donationsService.getClubDonationOptionsTitles().subscribe(l=>{this.donations=l,this.donations.forEach(r=>{this.donationsOptions.push({label:r.title,value:r.id})})}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.VOLUNTEERS]}),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Zt))},d.\u0275cmp=A({type:d,selectors:[["app-volunteers-filters"]],standalone:!1,decls:70,vars:13,consts:[[1,"row"],[1,"col-md-2","col-lg-2"],[1,"form-group"],["for","volunteers-donation-type"],["styleClass","full-width","inputId","volunteers-donation-type","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-4"],["for","volunteers-donation-date-from",1,"sr-only"],["for","volunteers-donation-date-to",1,"sr-only"],[1,"d-flex","align-items-center"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","volunteers-donation-date-from","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","volunteers-donation-date-to","appendTo","body",3,"ngModelChange","ngModel"],["role","button",1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-5","col-lg-4"],["for","volunteers-program"],["optionLabel","name","inputId","volunteers-program","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-2"],["for","volunteers-test-users"],["styleClass","full-width","inputId","volunteers-test-users","appendTo","body",3,"ngModelChange","ngModel","options"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
399     `),n(2,"div",1),e(3,`
400          `),n(4,"div",2),e(5,`
401               `),n(6,"label",3),e(7,"Donation Type"),i(),e(8,`
402               `),n(9,"p-select",4),y("ngModelChange",function(u){return S(a.filters.donationID,u)||(a.filters.donationID=u),u}),i(),e(10,`
403          `),i(),e(11,`
404     `),i(),e(12,`
405     `),n(13,"div",5),e(14,`
406          `),n(15,"div",2),e(16,`
407               `),n(17,"label"),e(18,"Donation Date"),i(),e(19,`
408               `),n(20,"label",6),e(21,"Donation Date From"),i(),e(22,`
409               `),n(23,"label",7),e(24,"Donation Date To"),i(),e(25,`
410               `),n(26,"span",8)(27,"p-inputgroup"),e(28,`
411                    `),n(29,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(30,`
412                    `),i(),e(31,`
413                    `),n(32,"p-inputgroup-addon"),e(33,"to"),i(),e(34,`
414                    `),n(35,"p-datepicker",10),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(36,`
415                    `),i(),e(37,`
416                    `),i(),e(38,`
417                    `),n(39,"a",11),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(40,`
418                         `),g(41,"i",12),e(42,`
419                    `),i(),e(43,`
420               `),i(),e(44,`
421          `),i(),e(45,`
422     `),i(),e(46,`
423     `),n(47,"div",13),e(48,`
424          `),n(49,"div",2),e(50,`
425               `),n(51,"label",14),e(52,"Program"),i(),e(53,`
426               `),n(54,"p-multiSelect",15),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),e(55,`
427               `),i(),e(56,`
428          `),i(),e(57,`
429     `),i(),e(58,`
430     `),n(59,"div",16),e(60,`
431          `),n(61,"div",2),e(62,`
432               `),n(63,"label",17),e(64,"Test Users"),i(),e(65,`
433               `),n(66,"p-select",18),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(67,` 
434          `),i(),e(68,`
435     `),i(),e(69,`
436`),i()),r&2&&(s(9),C("ngModel",a.filters.donationID),m("options",a.donationsOptions),s(20),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.reportService.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected"),s(12),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
436)();function $a(o,d){if(o&1&&(e(0,`
437          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
438          `),i(),e(5,`
439        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
440            `,t.header,`
441            `),s(),m("field",t.field)}}function Ka(o,d){if(o&1&&(e(0,`
442      `),n(1,"tr"),e(2,`
443        `),N(3,$a,6,4,null,null,W),i(),e(5,`
444    `)),o&2){let t=p();s(3),V(t.columns)}}function Ja(o,d){if(o&1&&(e(0,`
445      `),n(1,"tr"),e(2,`
446        `),n(3,"td"),e(4),v(5,"utcDate"),i(),e(6,`
447        `),n(7,"td"),e(8),i(),e(9,`
448        `),n(10,"td"),e(11),i(),e(12,`
449        `),n(13,"td"),e(14),i(),e(15,`
450        `),n(16,"td"),e(17),i(),e(18,`
451        `),n(19,"td"),e(20),i(),e(21,`
452      `),i(),e(22,`
453    `)),o&2){let t=d.$implicit;s(4),c(B(5,6,t.submittedDate,"M/d/y")),s(4),c(t.userName),s(3),c(t.programName),s(3),c(t.playerName),s(3),c(t.donationTitle),s(3),c(t.label)}}var fo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"submittedDate",header:"Date"},{field:"userName",header:"User Name"},{field:"programName",header:"Program"},{field:"playerName",header:"Player Name"},{field:"donationTitle",header:"Donation"},{field:"label",header:"Option"}]}getReportData(l){let r=this.reportService.reportFilters[F.VOLUNTEERS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getVolunteersData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-volunteers-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","submittedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
454  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
455    `),R(5,Ka,6,0,"ng-template",3),e(6,`
456    `),R(7,Ja,23,9,"ng-template",4),e(8,`
457  `),i(),e(9,`
458`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,Ce],encapsulation:2});let o=d;return o}
458)();function Za(o,d){if(o&1){let t=D();e(0,`
459    `),n(1,"div",18),e(2,`
460      `),n(3,"div",2),e(4,`
461        `),n(5,"label",19),e(6,"Club"),i(),e(7,`
462        `),n(8,"p-select",20),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubID,r)||(a.filters.clubID=r),h(r)}),i(),e(9,`
463      `),i(),e(10,`
464    `),i(),e(11,`
465  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.clubID),m("options",t.clubOptions)}}function Qa(o,d){if(o&1){let t=D();e(0,`
466    `),n(1,"div",18),e(2,`
467      `),n(3,"div",2),e(4,`
468        `),n(5,"label",19),e(6,"Club"),i(),e(7,`
469        `),n(8,"p-multiSelect",21),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
470        `),i(),e(10,`
471      `),i(),e(11,`
472    `),i(),e(12,`
473  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function el(o,d){if(o&1){let t=D();e(0,`
474    `),n(1,"div",1),e(2,`
475      `),n(3,"div",2),e(4,`
476        `),n(5,"label"),e(6,"Reimbursement Date"),i(),e(7,`
477        `),n(8,"label",22),e(9,"Reimbursement Date From"),i(),e(10,`
478        `),n(11,"label",23),e(12,"Reimbursement Date To"),i(),e(13,`
479        `),n(14,"span",5)(15,"p-inputgroup"),e(16,`
480          `),n(17,"p-datepicker",24),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(18,`
481          `),i(),e(19,`
482          `),n(20,"p-inputgroup-addon"),e(21,"to"),i(),e(22,`
483          `),n(23,"p-datepicker",25),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(24,`
484          `),i(),e(25,`
485          `),i(),e(26,`
486          `),n(27,"a",8),T("click",function(){f(t);let r=p();return h(r.resetReimbursementDates())}),e(28,`
487            `),g(29,"i",9),e(30,`
488          `),i(),e(31,`
489        `),i(),e(32,`
490      `),i(),e(33,`
491    `),i(),e(34,`
492  `)}if(o&2){let t=p();s(17),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo)}}function tl(o,d){if(o&1){let t=D();e(0,`
493    `),n(1,"div",13),e(2,`
494      `),n(3,"div",2),e(4,`
495        `),n(5,"label",26),e(6,"Type"),i(),e(7,`
496        `),n(8,"p-select",27),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.sitePaymentTypeID,r)||(a.filters.sitePaymentTypeID=r),h(r)}),i(),e(9,`
497      `),i(),e(10,`
498    `),i(),e(11,`
499  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.sitePaymentTypeID),m("options",t.sitePaymentTypes)}}function il(o,d){if(o&1){let t=D();e(0,`
500    `),n(1,"div",10),e(2,`
501      `),n(3,"div",2),e(4,`
502        `),n(5,"label",28),e(6,"Inactive Players"),i(),e(7,`
503        `),n(8,"p-select",29),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.inactivePlayerOption,r)||(a.filters.inactivePlayerOption=r),h(r)}),i(),e(9,`
504      `),i(),e(10,`
505    `),i(),e(11,`
506  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.inactivePlayerOption),m("options",t.inactivePlayerOptions)}}function nl(o,d){if(o&1){let t=D();e(0,`
507    `),n(1,"div",30),e(2,`
508      `),n(3,"div",2),e(4,`
509        `),n(5,"label",31),e(6,"Accounting Transaction ID"),i(),e(7,`
510        `),n(8,"input",32),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.transactionID,r)||(a.filters.transactionID=r),h(r)}),i(),e(9,`
511      `),i(),e(10,`
512    `),i(),e(11,`
513  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.transactionID)}}function ol(o,d){if(o&1){let t=D();e(0,`
514    `),n(1,"div",13),e(2,`
515      `),n(3,"div",2),e(4,`
516        `),n(5,"label"),e(6,"Connected Account"),i(),e(7,`
517        `),n(8,"p-multiSelect",33),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.connectedAccounts,r)||(a.filters.connectedAccounts=r),h(r)}),e(9,`
518        `),i(),e(10,`
519      `),i(),e(11,`
520    `),i(),e(12,`
521  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.connectedAccounts),m("options",t.connectedAccounts)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.connectedAccounts?"All":"Select account(s)")("selectedItemsLabel","{0} accounts selected")}}var ho=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.paymentService=r,this.ReportType=F,this.testUserOptions=le,this.reimbursedOptions=Mt,this.inactivePlayerOptions=Ht,this.clubOptions=[],this.connectedAccounts=[]}ngOnInit(){this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[this.reportService.reportType]}),this.reportService.setClubID(this.filters),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0),this.reportService.clubs.forEac
521h(l=>{this.clubOptions.push({label:l.name,value:l.clubID})})}ngOnChanges(l){l&&l.reportType&&this.setFilters()}setFilters(){this.reportService.reportFilters[this.reportService.reportType]===void 0&&(this.reportService.reportFilters[this.reportService.reportType]=new P),this.filters=this.reportService.reportFilters[this.reportService.reportType];let l=[];this.paymentTypes||l.push(this.paymentService.getPaymentTypes()),this.sitePaymentTypes||l.push(this.paymentService.getSitePaymentTypes()),l.push(this.reportService.getConnectedAccounts()),l.length>0&&oe(l).subscribe(r=>{this.paymentTypes||(this.paymentTypes=[],this.paymentTypes.push({label:"All",value:null}),r[0].forEach(a=>{this.paymentTypes.push(a)})),this.sitePaymentTypes||(this.sitePaymentTypes=[],this.sitePaymentTypes.push({label:"All",value:null}),r[1].forEach(a=>{this.sitePaymentTypes.push(a)})),this.connectedAccountOptions=r[2].filter(a=>a.accountTypeID!==Ot.TEAM_ACCOUNT),this.connectedAccounts=this.connectedAccountOptions.map(a=>({label:a.name,value:a.clubStripeConnectedAccountID}))}),this.reportService.reportType===F.CLUB_TRANSACTION_DETAILS&&(this.filters.transFrom=new Date(new Date().setDate(new Date().getDate()-30)),this.filters.dateFrom=void 0)}resetReimbursementDates(){this.reportService.reportType===F.CLUB_TRANSACTION_DETAILS?this.filters.dateFrom=void 0:this.filters.dateFrom=this.reportService.defaultDate,this.filters.dateTo=void 0}resetTransactionsDates(){this.reportService.reportType===F.CLUB_TRANSACTION_DETAILS?this.filters.transFrom=new Date(new Date().setDate(new Date().getDate()-30)):this.filters.transFrom=this.reportService.defaultDate,this.filters.transTo=void 0}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Ue))},d.\u0275cmp=A({type:d,selectors:[["app-club-transactions-filters"]],inputs:{reportType:"reportType"},standalone:!1,features:[Ve],decls:76,vars:15,consts:[[1,"row"],[1,"col-md-6","col-lg-4"],[1,"form-group"],["for","club-transactions-transaction-date-from",1,"sr-only"],["for","club-transactions-transaction-date-to",1,"sr-only"],[1,"d-flex","align-items-center"],["id","transFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","club-transactions-transaction-date-from","appendTo","body",3,"ngModelChange","ngModel"],["id","transTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","club-transactions-transaction-date-to","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2"],["for","club-transactions-reimbursed-filter"],["styleClass","full-width","inputId","club-transactions-reimbursed-filter","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-2"],["for","club-transactions-payment-type-filter"],["styleClass","full-width","inputId","club-transactions-payment-type-filter","appendTo","body",3,"ngModelChange","ngModel","options"],["for","club-transactions-test-users-filter"],["styleClass","full-width","inputId","club-transactions-test-users-filter","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["for","club-transactions-club-filter"],["styleClass","full-width","inputId","club-transactions-club-filter","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","placeholder","All","inputId","club-transactions-club-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["for","club-transactions-reimbursement-date-from",1,"sr-only"],["for","club-transactions-reimbursement-date-to",1,"sr-only"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","club-transactions-reimbursement-date-from","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","club-transactions-reimbursement-date-to","appendTo","body",3,"ngModelChange","ngModel"],["for","club-transactions-type-filter"],["styleClass","full-width","inputId","club-transactions-type-filter","appendTo","body",3,"ngModelChange","ngModel","options"],["for","club-transactions-inactive-players-filter"],["styleClass","full-width","inputId","club-transactions-inactive-players-filter","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5"],["for","club-transactions-accounting-transaction-id-filter"],["id","playerName","type","text","id","club-transactions-accounting-transaction-id-filter",3,"ngModelChange","ngModel"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
522  `),_(2,Za,12,2),_(3,Qa,13,7),n(4,"div",1),e(5,`
523    `),n(6,"div",2),e(7,`
524      `),n(8,"label"),e(9,"Transaction Date"),i(),e(10,`
525      `),n(11,"label",3),e(12,"Transaction Date From"),i(),e(13,`
526      `),n(14,"label",4),e(15,"Transaction Date To"),i(),e(16,`
527      `),n(17,"span",5)(18,"p-inputgroup"),e(19,`
528        `),n(20,"p-datepicker",6),y("ngModelChange",function(u){return S(a.filters.transFrom,u)||(a.filters.transFrom=u),u}),e(21,`
529        `),i(),e(22,`
530        `),n(23,"p-inputgroup-addon"),e(24,"to"),i(),e(25,`
531        `),n(26,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.transTo,u)||(a.filters.transTo=u),u}),e(27,`
532        `),i(),e(28,`
533        `),i(),e(29,`
534        `),n(30,"a",8),T("click",function(){return a.resetTransactionsDates()}),e(31,`
535          `),g(32,"i",9),e(33,`
536        `),i(),e(34,`
537      `),i(),e(35,`
538    `),i(),e(36,`
539  `),i(),e(37,`
540  `),_(38,el,35,2),n(39,"div",10),e(40,`
541    `),n(41,"div",2),e(42,`
542      `),n(43,"label",11),e(44,"Reimbursed"),i(),e(45,`
543      `),n(46,"p-select",12),y("ngModelChange",function(u){return S(a.filters.reimbursed,u)||(a.filters.reimbursed=u),u}),i(),e(47,`
544    `),i(),e(48,`
545  `),i(),e(49,`
546  `),_(50,tl,12,2),n(51,"div",13),e(52,`
547    `),n(53,"div",2),e(54,`
548      `),n(55,"label",14),e(56,"Payment Type"),i(),e(57,`
549      `),n(58,"p-select",15),y("ngModelChange",function(u){return S(a.filters.paymentTypeID,u)||(a.filters.paymentTypeID=u),u}),i(),e(59,`
550    `),i(),e(60,`
551  `),i(),e(61,`
552  `),n(62,"div",10),e(63,`
553    `),n(64,"div",2),e(65,`
554      `),n(66,"label",16),e(67,"Test Users"),i(),e(68,`
555      `),n(69,"p-select",17),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(70,`
556    `),i(),e(71,`
557  `),i(),e(72,`
558  `),_(73,il,12,2),_(74,nl,12,1),_(75,ol,13,8),i()),r&2&&(s(2),x(a.reportService.reportType===a.ReportType.REIMBURSE_CLUB_TRANSACTIONS?2:-1),s(),x(a.reportService.reportType===a.ReportType.CLUB_TRANSACTION_DETAILS||a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS&&a.reportService.clubs&&a.reportService.clubs.length>1?3:-1),s(17),C("ngModel",a.filters.transFrom),s(6),C("ngModel",a.filters.transTo),s(12),x(a.reportService.reportType===a.ReportType.CLUB_TRANSACTION_DETAILS||a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS?38:-1),s(8),C("ngModel",a.filters.reimbursed),m("options",a.reimbursedOptions),s(4),x(a.reportService.reportType===a.ReportType.CLUB_TRANSACTION_DETAILS||a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS?50:-1),s(8),C("ngModel",a.filters.paymentTypeID),m("options",a.paymentTypes),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(4),x(a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS?73:-1),s(),x(a.reportService.reportType===a.ReportType.CLUB_TRANSACTION_DETAILS||a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS?74:-1),s(),x(a.reportService.reportType===a.ReportType.CLUB_TRANSACTION_DETAILS?75:-1))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
558)();var Ke=(o,d)=>[o,d],ji=o=>[o];function al(o,d){if(o&1){let t=D();e(0,`
559  `),n(1,"button",11),T("click",function(){f(t);let r=p();return h(r.setupModal())}),e(2,`Reimburse
560  Payments`),i(),e(3,`
561  `)}if(o&2){let t=p();s(),m("disabled",!t.selectedPayments||t.selectedPayments.length===0)}}function ll(o,d){if(o&1){let t=D();e(0,`
562  `),n(1,"button",11),T("click",function(){f(t);let r=p();return h(r.showFailPaymentConfirm=!0)}),e(2,`Fail
563  Payments`),i(),e(3,`
564`)}if(o&2){let t=p();s(),m("disabled",!t.selectedPayments||t.selectedPayments.length===0)}}function sl(o,d){o&1&&(e(0,`
565          `),g(1,"th"),e(2,`
566        `))}function dl(o,d){if(o&1&&(e(0,`
567          `),n(1,"th",14),e(2),g(3,"p-sortIcon",15),e(4,`
568          `),i(),e(5,`
569        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
570            `,t.header,`
571            `),s(),m("field",t.field)}}function pl(o,d){o&1&&(e(0,`
572          `),g(1,"td"),e(2,`
573        `))}function ml(o,d){o&1&&(e(0,`
574          `),n(1,"td"),e(2,`
575          `),i(),e(3,`
576        `))}function cl(o,d){o&1&&(e(0,`
577          `),n(1,"td"),e(2,`
578          `),i(),e(3,`
579        `))}function ul(o,d){if(o&1&&(e(0,`
580          `),n(1,"td",13),e(2),v(3,"accountingCurrency"),i(),e(4,`
581        `)),o&2){let t=p(2);s(2),I(`
582            `,E(3,1,t.totalPaymentFee),`
583          `)}}function _l(o,d){if(o&1&&(e(0,`
584          `),n(1,"td",13),e(2),v(3,"accountingCurrency"),i(),e(4,`
585        `)),o&2){let t=p(2);s(2),I(`
586            `,E(3,1,t.totalPaymentAmount+t.totalPaymentFee),`
587          `)}}function xl(o,d){if(o&1&&(e(0,`
588          `),n(1,"td",13),e(2),v(3,"accountingCurrency"),i(),e(4,`
589        `)),o&2){let t=p(2);s(2),I(`
590            `,E(3,1,t.totalProcessorFee),`
591          `)}}function gl(o,d){if(o&1&&(e(0,`
592          `),n(1,"td",13),e(2),v(3,"accountingCurrency"),i(),e(4,`
593        `)),o&2){let t=p(2);s(2),I(`
594            `,E(3,1,t.totalReimbursementAmount),`
595          `)}}function fl(o,d){if(o&1&&(e(0,`
596          `),n(1,"td",13),e(2),v(3,"accountingCurrency"),i(),e(4,`
597        `)),o&2){let t=p(2);s(2),I(`
598            `,E(3,1,t.totalReimbursementFeeAmount),`
599          `)}}function hl(o,d){if(o&1&&(e(0,`
600          `),n(1,"td",13),e(2),v(3,"accountingCurrency"),i(),e(4,`
601        `)),o&2){let t=p(2);s(2),I(`
602            `,E(3,1,t.totalReimbursementAmount+t.totalReimbursementFeeAmount),`
603          `)}}function Cl(o,d){o&1&&(e(0,`
604          `),n(1,"td"),e(2,`
605          `),i(),e(3,`
606        `))}function Sl(o,d){o&1&&(e(0,`
607          `),n(1,"td"),e(2,`
608          `),i(),e(3,`
609        `))}function yl(o,d){o&1&&(e(0,`
610          `),n(1,"td"),e(2,`
611          `),i(),e(3,`
612        `))}function bl(o,d){o&1&&(e(0,`
613          `),n(1,"td"),e(2,`
614          `),i(),e(3,`
615        `))}function vl(o,d){o&1&&(e(0,`
616          `),g(1,"td"),e(2,`
617        `))}function Tl(o,d){if(o&1&&(e(0,`
618      `),n(1,"tr"),e(2,`
619        `),_(3,sl,3,0),N(4,dl,6,4,null,null,W),i(),e(6,`
620      `),n(7,"tr",12),e(8,`
621        `),_(9,pl,3,0),n(10,"td"),e(11,"Totals:"),i(),e(12,`
622        `),_(13,ml,4,0),_(14,cl,4,0),g(15,"td"),e(16,`
623        `),g(17,"td"),e(18,`
624        `),g(19,"td"),e(20,`
625        `),g(21,"td"),e(22,`
626        `),g(23,"td"),e(24,`
627        `),n(25,"td",13),e(26),v(27,"accountingCurrency"),i(),e(28,`
628        `),_(29,ul,5,3),_(30,_l,5,3),_(31,xl,5,3),g(32,"td"),e(33,`
629        `),_(34,gl,5,3),_(35,fl,5,3),_(36,hl,5,3),_(37,Cl,4,0),_(38,Sl,4,0),_(39,yl,4,0),_(40,bl,4,0),_(41,vl,3,0),i(),e(42,`
630    `)),o&2){let t=p();s(3),x(t.reportService.reportType===t.ReportType.REIMBURSE_CLUB_TRANSACTIONS?3:-1),s(),V(t.columns),s(5),x(t.reportService.reportType===t.ReportType.REIMBURSE_CLUB_TRANSACTIONS?9:-1),s(4),x(t.showClubName||je(18,Ke,t.ReportType.REIMBURSE_CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?13:-1),s(),x(je(21,Ke,t.ReportType.CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)&&t.showStripeField?14:-1),s(12),c(E(27,16,t.totalPaymentAmount)),s(3),x(je(24,Ke,t.ReportType.REIMBURSE_CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?29:-1),s(),x(je(27,Ke,t.ReportType.REIMBURSE_CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?30:-1),s(),x(t.reportService.reportType===t.ReportType.CLUB_TRANSACTION_DETAILS?31:-1),s(3),x(re(30,ji,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?34:-1),s(),x(re(32,ji,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?35:-1),s(),x(je(34,Ke,t.ReportType.CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?36:-1),s(),x(je(37,Ke,t.ReportType.CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?37:-1),s(),x(je(40,Ke,t.ReportType.CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?38:-1),s(),x(je(43,Ke,t.ReportType.CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?39:-1),s(),x(je(46,Ke,t.ReportType.CLUB_TRANSACTIONS,t.ReportType.CLUB_TRANSACTION_DETAILS).includes(t.reportService.reportType)?40:-1),s(),x(t.showingInactivePlayers()?41:-1)}}function El(o,d){if(o&1&&(e(0,`
631              `),g(1,"p-tableCheckbox",16),e(2,`
632            `)),o&2){let t=p(2).$implicit;s(),m("value",t)}}function wl(o,d){if(o&1&&(e(0,`
633          `),n(1,"td"),e(2,`
634            `),_(3,El,3,1),i(),e(4,`
635        `)),o&2){let t=p().$implicit;s(3),x(t.reimbursed==="No"?3:-1)}}function Fl(o,d){if(o&1&&(e(0,`
636          `),n(1,"td"),e(2),i(),e(3,`
637        `)),o&2){let t=p().$implicit;s(2),I(`
638          `,t.clubName)}}function Dl(o,d){if(o&1&&(e(0,`
639          `),n(1,"td"),e(2),i(),e(3,`
640        `)),o&2){let t=p().$implicit;s(2),I(`
641          `,t.connectedAccountName)}}function Il(o,d){if(o&1&&(e(0,`
642          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
643        `)),o&2){let t=p().$implicit;s(2),I(`
644          `,E(3,1,t.paymentAmount))}}function Rl(o,d){if(o&1&&(e(0,`
645          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
646        `)),o&2){let t=p().$implicit;s(2),I(`
647          `,E(3,1,t.paymentFee))}}function Ml(o,d){if(o&1&&(e(0,`
648          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
649        `)),o&2){let t=p().$implicit;s(2),I(`
650          `,E(3,1,t.processorFee))}}function Al(o,d){if(o&1&&(e(0,`
651          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
652        `)),o&2){let t=p().$implicit;s(2),I(`
653          `,E(3,1,t.reimbursementAmount))}}function Pl(o,d){if(o&1&&(e(0,`
654          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
655        `)),o&2){let t=p().$implicit;s(2),I(`
656          `,E(3,1,t.reimbursementFEEAmount))}}function Ol(o,d){if(o&1&&(e(0,`
657          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
658        `)),o&2){let t=p().$implicit;s(2),I(`
659          `,E(3,1,t.totalDisbursement))}}function Ll(o,d){if(o&1&&(e(0,`
660          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
661        `)),o&2){let t=p().$implicit;s(2),I(`
662          `,E(3,1,t.checkAmount))}}function Nl(o,d){if(o&1&&(e(0,`
663          `),n(1,"td"),e(2),v(3,"date"),i(),e(4,`
664        `)),o&2){let t=p().$implicit;s(2),I(`
665          `,B(3,1,t.reimbursementDate,"M/d/y"))}}function Vl(o,d){if(o&1&&(e(0,`
666          `),n(1,"td"),e(2),i(),e(3,`
667        `)),o&2){let t=p().$implicit;s(2),I(`
668          `,t.accountingTransactionID)}}function kl(o,d){if(o&1&&(e(0,`
669          `),n(1,"td"),e(2),i(),e(3,`
670        `)),o&2){let t=p().$implicit;s(2),I(`
671          `,t.status)}}function Bl(o,d){if(o&1&&(e(0,`
672          `),n(1,"td"),e(2),i(),e(3,`
673        `)),o&2){let t=p().$implicit;s(2),I(`
674          `,t.inactivePlayer?"Inactive":"")}}function Wl(o,d){if(o&1&&(e(0,`
675      `),n(1,"tr"),e(2,`
676        `),_(3,wl,5,1),n(4,"td"),e(5),v(6,"utcDate"),i(),e(7,`
677        `),_(8,Fl,4,1),_(9,Dl,4,1),n(10,"td"),e(11),i(),e(12,`
678        `),n(13,"td"),e(14),i(),e(15,`
679        `),n(16,"td"),e(17),i(),e(18,`
680        `),n(19,"td"),e(20),i(),e(21,`
681        `),n(22,"td"),e(23),i(),e(24,`
682        `),_(25,Il,5,3),_(26,Rl,5,3),n(27,"td"),e(28),v(29,"accountingCurrency"),i(),e(30,`
683        `),_(31,Ml,5,3),n(32,"td"),e(33),i(),e(34,`
684        `),_(35,Al,5,3),_(36,Pl,5,3),_(37,Ol,5,3),_(38,Ll,5,3),_(39,Nl,5,4),_(40,Vl,4,1),_(41,kl,4,1),_(42,Bl,4,1),i(),e(43,`
685    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.reportService.reportType===l.ReportType.REIMBURSE_CLUB_TRANSACTIONS?3:-1),s(2),I(" ",B(6,22,t.submittedDate,"M/d/y")),s(3),x(l.showClubName||je(27,Ke,l.ReportType.REIMBURSE_CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?8:-1),s(),x(je(30,Ke,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)&&l.showStripeField?9:-1),s(2),c(t.userName),s(3),c(t.sitePaymentType),s(3),c(t.programType),s(3),c(t.paymentMethod),s(3),c(t.transactionID),s(2),x(je(33,Ke,l.ReportType.REIMBURSE_CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?25:-1),s(),x(je(36,Ke,l.ReportType.REIMBURSE_CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?26:-1),s(2),c(E(29,25,t.paymentAmount+t.paymentFee)),s(3),x(l.reportService.reportType===l.ReportType.CLUB_TRANSACTION_DETAILS?31:-1),s(2),c(t.reimbursed),s(2),x(re(39,ji,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?35:-1),s(),x(re(41,ji,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?36:-1),s(),x(je(43,Ke,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?37:-1),s(),x(je(46,Ke,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?38:-1),s(),x(je(49,Ke,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?39:-1),s(),x(je(52,Ke,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?40:-1),s(),x(je(55,Ke,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.CLUB_TRANSACTION_DETAILS).includes(l.reportService.reportType)?41:-1),s(),x(l.showingInactivePlayers()?42:-1)}}function Ul(o,d){if(o&1){let t=D();e(0,`
686    `),n(1,"button",11),T("click",function(){f(t);let r=p();return h(r.setupModal())}),e(2,`Reimburse
687    Payments`),i(),e(3,`
688    `)}if(o&2){let t=p();s(),m("disabled",!t.selectedPayments||t.selectedPayments.length===0)}}function Yl(o,d){if(o&1){let t=D();e(0,`
689    `),n(1,"button",11),T("click",function(){f(t);let r=p();return h(r.showFailPaymentConfirm=!0)}),e(2,`Fail
690    Payments`),i(),e(3,`
691  `)}if(o&2){let t=p();s(),m("disabled",!t.selectedPayments||t.selectedPayments.length===0)}}function Gl(o,d){if(o&1){let t=D();e(0,`
692      `),n(1,"app-dynamic-form",17),T("onSubmit",function(r){f(t);let a=p();return h(a.reimbursePayments(r))})("onCancel",function(){f(t);let r=p();return h(r.cancel())}),e(2,`
693        `),n(3,"div",18),e(4,`
694          `),g(5,"app-dynamic-form-field",19),e(6,`
695        `),i(),e(7,`
696        `),n(8,"div",18),e(9,`
697          `),g(10,"app-dynamic-form-field",20),e(11,`
698        `),i(),e(12,`
699        `),n(13,"div",18),e(14,`
700          `),n(15,"app-dynamic-form-field",21),T("onChange",function(r){f(t);let a=p();return h(a.setShowACHFields(r))}),e(16,`
701          `),i(),e(17,`
702        `),i(),e(18,`
703        `),n(19,"div",18),e(20,`
704          `),g(21,"app-dynamic-form-field",22),e(22,`
705        `),i(),e(23,`
706        `),n(24,"div",18),e(25,`
707          `),g(26,"app-dynamic-form-field",23),e(27,`
708        `),i(),e(28,`
709        `),n(29,"div",18),e(30,`
710          `),g(31,"app-dynamic-form-field",24),e(32,`
711        `),i(),e(33,`
712        `),n(34,"div",18),e(35,`
713          `),g(36,"app-dynamic-form-field",25),e(37,`
714        `),i(),e(38,`
715        `),n(39,"div",18),e(40,`
716          `),g(41,"app-dynamic-form-field",26),e(42,`
717        `),i(),e(43,`
718        `),n(44,"div",18),e(45,`
719          `),g(46,"app-dynamic-form-field",27),e(47,`
720        `),i(),e(48,`
721        `),n(49,"div",18),e(50,`
722          `),g(51,"app-dynamic-form-field",28),e(52,`
723        `),i(),e(53,`
724        `),n(54,"div",18),e(55,`
725          `),g(56,"app-dynamic-form-field",29),e(57,`
726        `),i(),e(58,`
727        `),n(59,"div",18),e(60,`
728          `),g(61,"app-dynamic-form-field",30),e(62,`
729        `),i(),e(63,`
730      `),i(),e(64,`
731    `)}if(o&2){let t=p();
731s(),m("fields",t.fields)("entity",t.reimbursementDetails)("horizontalForm",!0)("contentFieldsMode",!0)}}function jl(o,d){if(o&1){let t=D();e(0,`
732    `),n(1,"app-dialog-footer"),e(2,`
733      `),rt(3,31),e(4,`
734        `),n(5,"button",32),T("click",function(){f(t);let r=p();return h(r.showFailPaymentConfirm=!1)}),e(6,"No"),i(),e(7,`
735      `),at(),e(8,`
736      `),rt(9,33),e(10,`
737        `),n(11,"button",34),T("click",function(){f(t);let r=p();return h(r.markAsFailed())}),e(12,"Yes"),i(),e(13,`
738      `),at(),e(14,`
739    `),i(),e(15,`
740  `)}}var bo=(()=>{let d=class d{constructor(l,r,a,b,u){this.reportService=l,this.siteDataService=r,this.paymentService=a,this.formService=b,this.ref=u,this.AriaLabels=X,this.loading=!0,this.ReportType=F,this.showModal=!1,this.showFailPaymentConfirm=!1,this.showClubName=!1,this.showStripeField=!1}ngOnInit(){this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showStripeField=this.reportService.clubs&&this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID).paymentVendorID===gt.STRIPE,this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||(this.columns=this.getReportColumns(),this.getReportData(null))})}getReportColumns(){let l=[{field:"submittedDate",header:"Transaction Date"}];return(this.showClubName||[F.CLUB_TRANSACTION_DETAILS,F.REIMBURSE_CLUB_TRANSACTIONS].includes(this.reportService.reportType))&&(l.push({field:"clubName",header:"Club"}),this.showStripeField&&l.push({field:"connectedAccountName",header:"Connected Account"})),l.push({field:"userName",header:"User Name"},{field:"sitePaymentType",header:"Type"},{field:"programType",header:"Program Type"},{field:"paymentMethod",header:"Payment Method"},{field:"transactionID",header:"Transaction ID"}),[F.CLUB_TRANSACTION_DETAILS,F.REIMBURSE_CLUB_TRANSACTIONS].includes(this.reportService.reportType)&&l.push({field:"paymentAmount",header:"Amount"},{field:"paymentFee",header:"Transaction Fee"},{field:"total",header:"Total"}),this.reportService.reportType===F.CLUB_TRANSACTIONS&&l.push({field:"total",header:"Total"}),this.reportService.reportType===F.CLUB_TRANSACTION_DETAILS&&l.push({field:"processorFee",header:"Processor Fee"}),l.push({field:"reimbursed",header:"Reimbursed"}),this.reportService.reportType===F.CLUB_TRANSACTION_DETAILS&&l.push({field:"reimbursementAmount",header:"Reimbursement Amount"},{field:"reimbursementFEEAmount",header:"Reimbursement Fee"}),[F.CLUB_TRANSACTION_DETAILS,F.CLUB_TRANSACTIONS].includes(this.reportService.reportType)&&l.push({field:"reimbursementTotal",header:"Reimbursement Total"},{field:"checkAmount",header:"Transfer Total"},{field:"reimbursementDate",header:"Reimbursement Date"},{field:"accountingTransactionID",header:"Accounting Transaction ID"},{field:"status",header:"Status"}),this.showingInactivePlayers()&&l.push({field:"inactivePlayer",header:"Player Status"}),l}showingInactivePlayers(){return+this.reportService.reportFilters[this.reportService.reportType].inactivePlayerOption==2&&[F.CLUB_TRANSACTION_DETAILS,F.CLUB_TRANSACTIONS].includes(this.reportService.reportType)}getReportData(l){let r=this.reportService.reportFilters[this.reportService.reportType];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getClubTransactionsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalPaymentAmount=a.totalPaymentAmount,this.totalPaymentFee=a.totalPaymentFee,this.totalReimbursementAmount=a.totalReimbursementAmount,this.totalReimbursementFeeAmount=a.totalReimbursementFEEAmount,this.reportService.reportType===F.CLUB_TRANSACTION_DETAILS&&(this.totalProcessorFee=a.totalProcessorFee),this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}setupModal(){let l=this.reportService.clubs.find(r=>r.clubID===+this.reportService.reportFilters[this.reportService.reportType].clubID).name;!this.reimbursementDetails||this.reimbursementDetails.clubName!==l?(this.reimbursementDetails=new On,this.reimbursementDetails.clubName=l,this.reimbursementDetails.reimbursementOption=1):this.reimbursementDetails=JSON.parse(JSON.stringify(this.reimbursementDetails)),this.reimbursementDetails.amountToReimburse=0,this.selectedPayments.forEac
740h(r=>this.reimbursementDetails.amountToReimburse+=r.paymentAmount),this.fields?(this.reimbursementDetails.reimbursementOption===1?this.fields=this.achFields:this.fields=this.noachFields,this.showModal=!0):this.paymentService.getACHPaymentMetadata().subscribe(r=>{this.fields=r.fields,this.achFields=r.fields,this.noachFields=r.fields.filter(a=>["clubName","amountToReimburse","reimbursementOption"].includes(a.key)),this.showModal=!0},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}cancel(){this.showModal=!1}reimbursePayments(l){this.reimbursementDetails=l;let r=+this.reportService.reportFilters[this.reportService.reportType].clubID;this.paymentService.reimbursePayments(r,l,this.selectedPayments.map(a=>+a.clubUserPaymentID)).subscribe(a=>{this.selectedPayments=void 0,this.getReportData(null),this.showModal=!1,this.formService.hideFormLoader(),this.siteDataService.showSiteSuccessAlert("Payment(s) reimbursed successfully.")},a=>{this.showModal=!1,this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert(`There was a problem running this report. Response: ${a.error[0].code}. ${a.error[0].text}`)})}markAsFailed(){let l=+this.reportService.reportFilters[this.reportService.reportType].clubID;this.paymentService.failPayments(l,this.selectedPayments.map(r=>+r.clubUserPaymentID)).subscribe(()=>{this.selectedPayments=void 0,this.getReportData(null),this.showFailPaymentConfirm=!1,this.siteDataService.showSiteSuccessAlert("Payment(s) mark as failed successfully.")},r=>{this.showFailPaymentConfirm=!1,this.siteDataService.showSiteErrorAlert(`There was a problem running this report. Response: ${r.error[0].code}. ${r.error[0].text}`)})}getSortField(){return this.reportService.reportType===F.CLUB_TRANSACTIONS?"submittedDate":"clubName"}setShowACHFields(l){this.reimbursementDetails.reimbursementOption=l,this.reimbursementDetails=this.reimbursementDetails,this.reimbursementDetails.reimbursementOption===1?this.fields=[...this.achFields]:this.fields=[...this.noachFields]}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(Ue),w(Ct),w(Dt))},d.\u0275cmp=A({type:d,selectors:[["app-club-transactions-table"]],standalone:!1,decls:32,vars:19,consts:[["reportTable",""],[1,"pb-3"],[1,"report-table","table-responsive"],["responsiveLayout","scroll","dataKey","clubUserPaymentID","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","selectionChange","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortField","rows","loading","selection"],["pTemplate","header"],["pTemplate","body"],[1,"pt-3"],["header","Reimburse Payments",3,"visibleChange","visible","closable","modal"],[1,"horizontal-form",2,"padding","15px"],["header","Fail Payments","preMaximizeContainerWidth","200",3,"visibleChange","visible"],["pTemplate","footer"],[1,"btn",3,"click","disabled"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"value"],["formID","user-form","submitButtonText","Submit","buttonsPosition","left",3,"onSubmit","onCancel","fields","entity","horizontalForm","contentFieldsMode"],[1,"form-row"],["fieldName","clubName"],["fieldName","amountToReimburse"],["fieldName","reimbursementOption",3,"onChange"],["fieldName","firstName"],["fieldName","lastName"],["fieldName","email"],["fieldName","nameOnAccount"],["fieldName","routingNumber"],["fieldName","confirmRoutingNumber"],["fieldName","accountNumber"],["fieldName","confirmAccountNumber"],["fieldName","confirmAmountToReimburse"],["slot","secondary"],[1,"btn","btn-secondary",3,"click"],["slot","primary"],[1,"btn","btn-primary",3,"click"]],template:function(r,a){if(r&1){let b=D();n(0,"div",1),_(1,al,4,1),_(2,ll,4,1),i(),e(3,`
741`),n(4,"div",2),e(5,`
742  `),n(6,"p-table",3,0),T("onLazyLoad",function(L){return a.getReportData(L)}),y("selectionChange",function(L){return f(b),S(a.selectedPayments,L)||(a.selectedPayments=L),h(L)}),e(8,`
743    `),R(9,Tl,43,49,"ng-template",4),e(10,`
744    `),R(11,Wl,44,58,"ng-template",5),e(12,`
745  `),i(),e(13,`
746`),i(),e(14,`
747`),n(15,"div",6),e(16,`
748  `),_(17,Ul,4,1),_(18,Yl,4,1),i(),e(19,`
749`),n(20,"p-dialog",7),y("visibleChange",function(L){return f(b),S(a.showModal,L)||(a.showModal=L),h(L)}),e(21,`
750  `),n(22,"section",8),e(23,`
751    `),_(24,Gl,65,4),i(),e(25,`
752`),i(),e(26,`
753`),n(27,"p-dialog",9),y("visibleChange",function(L){return f(b),S(a.showFailPaymentConfirm,L)||(a.showFailPaymentConfirm=L),h(L)}),e(28,`
754  Are you sure you want to mark these payments as failed?
755  `),R(29,jl,16,0,"ng-template",10),e(30,`
756`),i(),e(31,`
757`)}r&2&&(s(),x(a.reportService.reportType===a.ReportType.REIMBURSE_CLUB_TRANSACTIONS?1:-1),s(),x(a.reportService.reportType===a.ReportType.REIMBURSE_CLUB_TRANSACTIONS?2:-1),s(4),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortField",a.getSortField())("rows",100)("loading",a.loading),C("selection",a.selectedPayments),s(11),x(a.reportService.reportType===a.ReportType.REIMBURSE_CLUB_TRANSACTIONS?17:-1),s(),x(a.reportService.reportType===a.ReportType.REIMBURSE_CLUB_TRANSACTIONS?18:-1),s(2),C("visible",a.showModal),m("closable",!1)("modal",!0),s(4),x(a.fields?24:-1),s(3),C("visible",a.showFailPaymentConfirm))},dependencies:[Xt,Jt,z,Kt,H,$,K,Ai,ft,de,Ce,se],encapsulation:2});let o=d;return o}
757)();function zl(o,d){if(o&1){let t=D();e(0,`
758    `),n(1,"div",13),e(2,`
759      `),n(3,"div",2),e(4,`
760        `),n(5,"label",19),e(6,"Club"),i(),e(7,`
761        `),n(8,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
762        `),i(),e(10,`
763      `),i(),e(11,`
764    `),i(),e(12,`
765  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var vo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.paymentService=r,this.paymentTypes=[{label:"All",value:null}],this.testUserOptions=le,this.paidOptions=En}ngOnInit(){this.reportService.reportFilters[F.PAYMENT_PROCESSOR_DETAILS]===void 0&&(this.reportService.reportFilters[F.PAYMENT_PROCESSOR_DETAILS]=new P),this.filters=this.reportService.reportFilters[F.PAYMENT_PROCESSOR_DETAILS],this.reportService.clubs?.length>1&&!this.filters.clubs&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID)]),this.paymentService.getPaymentTypes().subscribe(l=>{l.forEach(r=>{this.paymentTypes.push(r)}),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.PAYMENT_PROCESSOR_DETAILS]})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Ue))},d.\u0275cmp=A({type:d,selectors:[["app-payment-processor-details-filters"]],standalone:!1,decls:70,vars:9,consts:[[1,"row"],[1,"col-md-6","col-lg-4"],[1,"form-group"],["for","ppd-payment-date-from",1,"sr-only"],["for","ppd-payment-date-to",1,"sr-only"],[1,"d-flex","align-items-center"],["id","dateFrom","dateFormat","mm/dd/yy","inputId","ppd-payment-date-from","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","ppd-payment-date-to","appendTo","body",3,"ngModelChange","ngModel"],["role","button",1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-3"],["for","ppd-payment-successful-filter"],["inputId","ppd-payment-successful-filter","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["for","ppd-payment-method"],["inputId","ppd-payment-method","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-2"],["for","ppd-test-users"],["inputId","ppd-test-users","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["for","ppd-club-filter"],["optionLabel","name","placeholder","All","inputId","ppd-club-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
766  `),_(2,zl,13,7),n(3,"div",1),e(4,`
767    `),n(5,"div",2),e(6,`
768      `),n(7,"label"),e(8,"Payment Date"),i(),e(9,`
769      `),n(10,"label",3),e(11,"Payment Date From"),i(),e(12,`
770      `),n(13,"label",4),e(14,"Payment Date To"),i(),e(15,`
771      `),n(16,"span",5)(17,"p-inputgroup"),e(18,`
772        `),n(19,"p-datepicker",6),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(20,`
773        `),i(),e(21,`
774        `),n(22,"p-inputgroup-addon"),e(23,"to"),i(),e(24,`
775        `),n(25,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(26,`
776        `),i(),e(27,`
777        `),i(),e(28,`
778        `),n(29,"a",8),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(30,`
779          `),g(31,"i",9),e(32,`
780        `),i(),e(33,`
781      `),i(),e(34,`
782    `),i(),e(35,`
783  `),i(),e(36,`
784  `),n(37,"div",10),e(38,`
785    `),n(39,"div",2),e(40,`
786      `),n(41,"label",11),e(42,"Payment Successful"),i(),e(43,`
787      `),n(44,"p-select",12),y("ngModelChange",function(u){return S(a.filters.paid,u)||(a.filters.paid=u),u}),i(),e(45,`
788    `),i(),e(46,`
789  `),i(),e(47,`
790  `),n(48,"div",13),e(49,`
791    `),n(50,"div",2),e(51,`
792      `),n(52,"label",14),e(53,"Payment Method"),i(),e(54,`
793      `),n(55,"p-select",15),y("ngModelChange",function(u){return S(a.filters.paymentTypeID,u)||(a.filters.paymentTypeID=u),u}),i(),e(56,`
794    `),i(),e(57,`
795  `),i(),e(58,`
796  `),n(59,"div",16),e(60,`
797    `),n(61,"div",2),e(62,`
798      `),n(63,"label",17),e(64,"Test Users"),i(),e(65,`
799      `),n(66,"p-select",18),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(67,`
800    `),i(),e(68,`
801  `),i(),e(69,`
802`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(17),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.paid),m("options",a.paidOptions),s(11),C("ngModel",a.filters.paymentTypeID),m("options",a.paymentTypes),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
802)();function $l(o,d){if(o&1&&(e(0,`
803          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
804          `),i(),e(5,`
805        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
806            `,t.header,`
807            `),s(),m("field",t.field)}}function Kl(o,d){if(o&1&&(e(0,`
808      `),n(1,"tr"),e(2,`
809        `),N(3,$l,6,4,null,null,W),n(5,"th"),e(6,"Error Details"),i(),e(7,`
810      `),i(),e(8,`
811    `)),o&2){let t=p();s(3),V(t.columns)}}function Jl(o,d){if(o&1&&(e(0,`
812          `),n(1,"td"),e(2),i(),e(3,`
813        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Xl(o,d){if(o&1&&(e(0,`
814      `),n(1,"tr"),e(2,`
815        `),_(3,Jl,4,1),n(4,"td"),e(5),v(6,"date"),i(),e(7,`
816        `),n(8,"td"),e(9),i(),e(10,`
817        `),n(11,"td"),e(12),i(),e(13,`
818        `),n(14,"td"),e(15),i(),e(16,`
819        `),n(17,"td"),e(18),i(),e(19,`
820        `),n(20,"td"),e(21),v(22,"accountingCurrency"),i(),e(23,`
821        `),n(24,"td"),e(25),i(),e(26,`
822        `),n(27,"td"),e(28),i(),e(29,`
823      `),i(),e(30,`
824    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,9,t.logDate,"M/d/y")),s(4),c(t.userName),s(3),c(t.payerName),s(3),c(t.paymentMethod),s(3),c(t.transactionID),s(3),c(E(22,12,t.amount)),s(4),c(t.result),s(3),c(t.errorDetails)}}var To=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"logDate",header:"Date"},{field:"userName",header:"User Name"},{field:"payerName",header:"Payer Name"},{field:"paymentMethod",header:"Payment Method"},{field:"transactionID",header:"Transaction ID"},{field:"amount",header:"Amount"},{field:"result",header:"Result"}]}getReportData(l){let r=this.reportService.reportFilters[F.PAYMENT_PROCESSOR_DETAILS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getPaymentProcessorDetailsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-payment-processor-details-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","logDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
825  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
826    `),R(5,Kl,9,0,"ng-template",3),e(6,`
827    `),R(7,Xl,31,14,"ng-template",4),e(8,`
828  `),i(),e(9,`
829`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,de,se],encapsulation:2});let o=d;return o}
829)();var Eo=(()=>{let d=class d{constructor(l){this.reportService=l,this.types=[{label:"All",value:null}]}ngOnInit(){this.reportService.reportFilters[F.ACCOUNTING_TRANSACTIONS]===void 0&&(this.reportService.reportFilters[F.ACCOUNTING_TRANSACTIONS]=new P),this.filters=this.reportService.reportFilters[F.ACCOUNTING_TRANSACTIONS],this.reportService.getAccountingTypes().subscribe(l=>{l&&l.forEach(r=>{this.types.push(r)}),this.reportService.setClubID(this.filters),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.ACCOUNTING_TRANSACTIONS]})}selectChanged(l){console.log(l),console.log(this.reportService.reportFilters)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-accounting-transactions-filters"]],standalone:!1,decls:59,vars:11,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],["for","accounting-transactions-club-filter"],["optionLabel","name","placeholder","All","inputId","accounting-transactions-club-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-6","col-lg-4"],["for","accounting-transactions-transaction-date-from-filter",1,"sr-only"],["for","accounting-transactions-transaction-date-to-filter",1,"sr-only"],[1,"d-flex","align-items-center"],["id","dobFrom","dateFormat","mm/dd/yy","inputId","accounting-transactions-transaction-date-from-filter","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","accounting-transactions-transaction-date-to-filter","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["for","accounting-transactions-type-filter"],["styleClass","full-width","inputId","accounting-transactions-type-filter","placeholder","All","appendTo","body",3,"ngModelChange","ngModel","options"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
830     `),n(2,"div",1),e(3,`
831          `),n(4,"div",2),e(5,`
832               `),n(6,"label",3),e(7,"Club"),i(),e(8,`
833               `),n(9,"p-multiSelect",4),y("ngModelChange",function(u){return S(a.filters.clubs,u)||(a.filters.clubs=u),u}),e(10,`
834               `),i(),e(11,`
835          `),i(),e(12,`
836     `),i(),e(13,`
837     `),n(14,"div",5),e(15,`
838          `),n(16,"div",2),e(17,`
839               `),n(18,"label"),e(19,"Transaction Date"),i(),e(20,`
840               `),n(21,"label",6),e(22,"Transaction Date From"),i(),e(23,`
841               `),n(24,"label",7),e(25,"Transaction Date To"),i(),e(26,`
842               `),n(27,"span",8)(28,"p-inputgroup"),e(29,`
843                    `),n(30,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(31,`
844                    `),i(),e(32,`
845                    `),n(33,"p-inputgroup-addon"),e(34,"to"),i(),e(35,`
846                    `),n(36,"p-datepicker",10),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(37,`
847                    `),i(),e(38,`
848                    `),i(),e(39,`
849                    `),n(40,"a",11),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(41,`
850                         `),g(42,"i",12),e(43,`
851                    `),i(),e(44,`
852               `),i(),e(45,`
853          `),i(),e(46,`
854     `),i(),e(47,`
855     `),n(48,"div",1),e(49,`
856          `),n(50,"div",2),e(51,`
857               `),n(52,"label",13),e(53,"Type"),i(),e(54,`
858               `),n(55,"p-select",14),y("ngModelChange",function(u){return S(a.filters.accountingTransactionTypeID,u)||(a.filters.accountingTransactionTypeID=u),u}),i(),e(56,`
859          `),i(),e(57,`
860     `),i(),e(58,`
861`),i()),r&2&&(s(9),m("autofocusFilter",!0),C("ngModel",a.filters.clubs),m("options",a.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected"),s(21),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.accountingTransactionTypeID),m("options",a.types))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
861)();var es=()=>({});function ts(o,d){if(o&1&&(e(0,`
862          `),n(1,"th",12),e(2),g(3,"p-sortIcon",13),e(4,`
863          `),i(),e(5,`
864        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
865            `,t.header,`
866            `),s(),m("field",t.field)}}function is(o,d){if(o&1&&(e(0,`
867      `),n(1,"tr"),e(2,`
868        `),N(3,ts,6,4,null,null,W),i(),e(5,`
869      `),n(6,"tr",10),e(7,`
870        `),g(8,"td"),e(9,`
871        `),g(10,"td"),e(11,`
872        `),g(12,"td"),e(13,`
873        `),g(14,"td"),e(15,`
874        `),g(16,"td"),e(17,`
875        `),g(18,"td"),e(19,`
876        `),n(20,"td",11),e(21),v(22,"accountingCurrency"),i(),e(23,`
877      `),i(),e(24,`
878    `)),o&2){let t=p();s(3),V(t.columns),s(18),c(E(22,1,t.totalAmount))}}function ns(o,d){if(o&1&&(e(0,`
879      `),n(1,"tr"),e(2,`
880        `),n(3,"td"),e(4),v(5,"date"),i(),e(6,`
881        `),n(7,"td"),e(8),i(),e(9,`
882        `),n(10,"td"),e(11),i(),e(12,`
883        `),n(13,"td"),e(14),i(),e(15,`
884        `),n(16,"td"),e(17),i(),e(18,`
885        `),n(19,"td"),e(20),i(),e(21,`
886        `),n(22,"td"),e(23),v(24,"accountingCurrency"),i(),e(25,`
887      `),i(),e(26,`
888    `)),o&2){let t=d.$implicit;s(4),c(B(5,7,t.submittedDate,"M/d/y")),s(4),c(t.description),s(3),c(t.clubName),s(3),c(t.type),s(3),c(t.achTransactionID),s(3),c(t.userName),s(3),c(E(24,10,t.amount))}}function os(o,d){if(o&1){let t=D();e(0,`
889      `),n(1,"app-dynamic-form",14),T("onSubmit",function(r){f(t);let a=p();return h(a.saveTransaction(r))})("onCancel",function(){f(t);let r=p();return h(r.cancel())}),e(2,`
890        `),n(3,"div",15),e(4,`
891          `),g(5,"app-dynamic-form-field",16),e(6,`
892        `),i(),e(7,`
893        `),n(8,"div",15),e(9,`
894          `),g(10,"app-dynamic-form-field",17),e(11,`
895        `),i(),e(12,`
896        `),n(13,"div",15),e(14,`
897          `),g(15,"app-dynamic-form-field",18),e(16,`
898        `),i(),e(17,`
899        `),n(18,"div",15),e(19,`
900          `),g(20,"app-dynamic-form-field",19),e(21,`
901        `),i(),e(22,`
902      `),i(),e(23,`
903    `)}if(o&2){let t=p();s(),m("fields",t.fields)("entity",Le(4,es))("horizontalForm",!0)("contentFieldsMode",!0)}}var wo=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.siteDataService=r,this.formService=a,this.paymentService=b,this.AriaLabels=X,this.loading=!0,this.showModal=!1}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"submittedDate",header:"Date"},{field:"description",header:"Description"},{field:"clubName",header:"Club Name"},{field:"type",header:"Type"},{field:"achTransactionID",header:"Transaction ID"},{field:"userName",header:"User Name"},{field:"amount",header:"Amount"}]}getReportData(l){let r=this.reportService.reportFilters[F.ACCOUNTING_TRANSACTIONS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getAccountingTransactionsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalAmount=a.totalAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}setupModal(){this.fields?this.showModal=!0:this.paymentService.getAccountingTransactionMetadata().subscribe(l=>{this.fields=l.fields,this.showModal=!0},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}saveTransaction(l){this.paymentService.saveAccountingTransaction(l).subscribe(r=>{this.getReportData(null),this.showModal=!1,this.formService.hideFormLoader()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}cancel(){this.showModal=!1}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(Ct),w(Ue))},d.\u0275cmp=A({type:d,selectors:[["app-accounting-transactions-table"]],standalone:!1,decls:26,vars:13,consts:[["reportTable",""],[1,"pb-3"],[1,"btn",3,"click"],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","
903submittedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"pt-3"],["header","Add Transaction",3,"visibleChange","visible","closable","modal"],[1,"card","horizontal-form"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],["formID","user-form","submitButtonText","Submit","buttonsPosition","left",3,"onSubmit","onCancel","fields","entity","horizontalForm","contentFieldsMode"],[1,"form-row"],["fieldName","accountingTransactionTypeID"],["fieldName","clubID"],["fieldName","description"],["fieldName","amount"]],template:function(r,a){if(r&1){let b=D();n(0,"div",1)(1,"button",2),T("click",function(){return a.setupModal()}),e(2,"Add Transaction"),i()(),e(3,`
904`),n(4,"div",3),e(5,`
905  `),n(6,"p-table",4,0),T("onLazyLoad",function(L){return a.getReportData(L)}),e(8,`
906    `),R(9,is,25,3,"ng-template",5),e(10,`
907    `),R(11,ns,27,12,"ng-template",6),e(12,`
908  `),i(),e(13,`
909`),i(),e(14,`
910`),n(15,"div",7)(16,"button",2),T("click",function(){return a.setupModal()}),e(17,"Add Transaction"),i()(),e(18,`
911`),n(19,"p-dialog",8),y("visibleChange",function(L){return f(b),S(a.showModal,L)||(a.showModal=L),h(L)}),e(20,`
912  `),n(21,"section",9),e(22,`
913    `),_(23,os,24,5),i(),e(24,`
914`),i(),e(25,`
915`)}r&2&&(s(6),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading),s(13),C("visible",a.showModal),m("closable",!1)("modal",!0),s(4),x(a.fields&&a.showModal?23:-1))},dependencies:[Xt,Jt,z,H,$,K,ft,de,se],encapsulation:2});let o=d;return o}
915)();function as(o,d){if(o&1){let t=D();e(0,`
916    `),n(1,"div",3),e(2,`
917      `),n(3,"div",2),e(4,`
918        `),n(5,"label"),e(6,"Club"),i(),e(7,`
919        `),n(8,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
920        `),i(),e(10,`
921      `),i(),e(11,`
922    `),i(),e(12,`
923  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function ls(o,d){if(o&1){let t=D();e(0,`
924        `),n(1,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.filterPrograms())}),e(2,`
925        `),i(),e(3,`
926      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} issue types selected")}}function ss(o,d){if(o&1){let t=D();e(0,`
927        `),n(1,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),e(2,`
928        `),i(),e(3,`
929      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} issue programs selected")}}var Fo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.creditService=r,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.CREDIT_SUMMARY]===void 0&&(this.reportService.reportFilters[F.CREDIT_SUMMARY]=new P),this.filters=this.reportService.reportFilters[F.CREDIT_SUMMARY],oe([this.reportService.getPrograms(),this.reportService.getProgramTypes()]).subscribe(l=>{this.reportService.programs=l[0],this.programTypes=l[1],this.filterPrograms()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CREDIT_SUMMARY]})}filterPrograms(){this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CREDIT_SUMMARY],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypes=this.programTypes.filter(l=>l.value===+this.reportService.state.programTypeID):this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.showReportData=!0,this.reportService.state=void 0),this.programs=this.reportService.filterPrograms(this.filters)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(ct))},d.\u0275cmp=A({type:d,selectors:[["app-credit-summary-filters"]],standalone:!1,decls:101,vars:10,consts:[[1,"row"],[1,"col-md-5"],[1,"form-group"],[1,"col-md-5","col-lg-3"],["id","creditName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2","col-lg-2"],["styleClass","full-width","placeholder","All","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["placeholder","All","optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
930  `),_(2,as,13,7),n(3,"div",1),e(4,`
931    `),n(5,"div",2),e(6,`
932      `),n(7,"label"),e(8,"Issue Program Type"),i(),e(9,`
933      `),_(10,ls,4,7),i(),e(11,`
934  `),i(),e(12,`
935  `),n(13,"div",3),e(14,`
936    `),n(15,"div",2),e(16,`
937      `),n(17,"label"),e(18,"Issue Program"),i(),e(19,`
938      `),_(20,ss,4,7),i(),e(21,`
939  `),i(),e(22,`
940  `),n(23,"div",3),e(24,`
941    `),n(25,"div",2),e(26,`
942      `),n(27,"label"),e(28,"Credit/Discount Name"),i(),e(29,`
943      `),n(30,"input",4),y("ngModelChange",function(u){return S(a.filters.creditName,u)||(a.filters.creditName=u),u}),i(),e(31,`
944    `),i(),e(32,`
945  `),i(),e(33,`
946  `),n(34,"div",5),e(35,`
947    `),n(36,"div",2),e(37,`
948      `),n(38,"label"),e(39,"Issued Date"),i(),e(40,`
949      `),n(41,"span",6)(42,"p-inputgroup"),e(43,`
950        `),n(44,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(45,`
951        `),i(),e(46,`
952        `),n(47,"p-inputgroup-addon"),e(48,"to"),i(),e(49,`
953        `),n(50,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(51,`
954        `),i(),e(52,`
955        `),i(),e(53,`
956        `),n(54,"a",9),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(55,`
957          `),g(56,"i",10),e(57,`
958        `),i(),e(58,`
959      `),i(),e(59,`
960    `),i(),e(60,`
961  `),i(),e(61,`
962  `),n(62,"div",5),e(63,`
963    `),n(64,"div",2),e(65,`
964      `),n(66,"label"),e(67,"Expiration Date"),i(),e(68,`
965      `),n(69,"span",6)(70,"p-inputgroup"),e(71,`
966        `),n(72,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.dateFrom2,u)||(a.filters.dateFrom2=u),u}),e(73,`
967        `),i(),e(74,`
968        `),n(75,"p-inputgroup-addon"),e(76,"to"),i(),e(77,`
969        `),n(78,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.dateTo2,u)||(a.filters.dateTo2=u),u}),e(79,`
970        `),i(),e(80,`
971        `),i(),e(81,`
972        `),n(82,"a",9),T("click",function(){return a.filters.dateFrom2=void 0,a.filters.dateTo2=void 0}),e(83,`
973          `),g(84,"i",10),e(85,`
974        `),i(),e(86,`
975      `),i(),e(87,`
976    `),i(),e(88,`
977  `),i(),e(89,`
978  `),n(90,"div",11),e(91,`
979      `),n(92,"div",2),e(93,`
980      `),n(94,"label"),e(95,"Test Players"),i(),e(96,`
981      `),n(97,"p-select",12),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(98,`
982    `),i(),e(99,`
983  `),i(),e(100,`
984`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),x(a.programTypes?10:-1),s(10),x(a.programs?20:-1),s(10),C("ngModel",a.filters.creditName),s(14),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(22),C("ngModel",a.filters.dateFrom2),s(6),C("ngModel",a.filters.dateTo2),s(19),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o})();var ps=o=>["/admin/players",o,"overview"];function ms(o,d){if(o&1&&(e(0,`
985          `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
986          `),i(),e(5,`
987        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
988            `,t.header,`
989            `),s(),m("field",t.field)}}function cs(o,d){o&1&&(e(0,`
990          `),g(1,"td"),e(2,`
991        `))}function us(o,d){if(o&1&&(e(0,`
992      `),n(1,"tr"),e(2,`
993        `),N(3,ms,6,4,null,null,W),i(),e(5,`
994      `),n(6,"tr",5),e(7,`
995        `),_(8,cs,3,0),g(9,"td"),e(10,`
996        `),g(11,"td"),e(12,`
997        `),n(13,"td"),e(14),v(15,"accountingCurrency"),i(),e(16,`
998        `),n(17,"td"),e(18),v(19,"accountingCurrency"),i(),e(20,`
999        `),n(21,"td"),e(22),v(23,"accountingCurrency"),i(),e(24,`
1000        `),g(25,"td"),e(26,`
1001        `),g(27,"td"),e(28,`
1002      `),i(),e(29,`
1003    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(6),c(E(15,4,t.totalCreditAmount)),s(4),c(E(19,6,t.totalCreditUsed)),s(4),c(E(23,8,t.totalCreditAmount-t.totalCreditUsed))}}function _s(o,d){if(o&1&&(e(0,`
1004          `),n(1,"td"),e(2),i(),e(3,`
1005        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function xs(o,d){if(o&1&&(e(0,`
1006            `),n(1,"a",8),e(2),i(),e(3,`
1007          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,ps,t.playerID)),s(),c(t.playerName)}}function gs(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
1008            `,t.playerName,`
1009          `)}}function fs(o,d){if(o&1&&(e(0,`
1010      `),n(1,"tr"),e(2,`
1011        `),_(3,_s,4,1),n(4,"td"),e(5,`
1012          `),_(6,xs,4,4)(7,gs,1,1),i(),e(8,`
1013        `),n(9,"td"),e(10),i(),e(11,`
1014        `),n(12,"td"),e(13),v(14,"accountingCurrency"),i(),e(15,`
1015        `),n(16,"td"),e(17),v(18,"accountingCurrency"),i(),e(19,`
1016        `),n(20,"td"),e(21),v(22,"accountingCurrency"),i(),e(23,`
1017        `),n(24,"td"),e(25),v(26,"utcDate"),i(),e(27,`
1018        `),n(28,"td"),e(29),v(30,"utcDate"),i(),e(31,`
1019      `),i(),e(32,`
1020    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(3),x(l.reportService.profile[l.Permission.Profile]?6:7),s(4),c(t.creditName),s(3),c(E(14,8,t.creditValue)),s(4),c(E(18,10,t.creditUsed)),s(4),c(E(22,12,t.remaining)),s(4),c(B(26,14,t.effectiveDate,"M/d/y")),s(4),c(B(30,17,t.expirationDate,"M/d/y"))}}var Do=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"playerName",header:"Player Name"},{field:"creditName",header:"Credit/Discount Name"},{field:"creditValue",header:"Credit Value"},{field:"creditUsed",header:"Credit Used"},{field:"remaining",header:"Remaining"},{field:"effectiveDate",header:"Issued Date"},{field:"expirationDate",header:"Expiration Date"}]}getReportData(l){let r=this.reportService.reportFilters[F.CREDIT_SUMMARY];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getCreditSummaryData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalCreditAmount=a.totalCreditAmount,this.totalCreditUsed=a.totalCreditUsed,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-credit-summary-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1021  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
1022    `),R(5,us,30,10,"ng-template",3),e(6,`
1023    `),R(7,fs,33,20,"ng-template",4),e(8,`
1024  `),i(),e(9,`
1025`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,Ce,se],encapsulation:2});let o=d;return o}
1025)();function Ss(o,d){if(o&1){let t=D();e(0,`
1026    `),n(1,"div",12),e(2,`
1027      `),n(3,"div",3),e(4,`
1028        `),n(5,"label"),e(6,"Club"),i(),e(7,`
1029        `),n(8,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),r.getPledgesWaivers(),h(r.updateRegistrations())}),e(9,`
1030        `),i(),e(10,`
1031      `),i(),e(11,`
1032    `),i(),e(12,`
1033  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function ys(o,d){if(o&1){let t=D();e(0,`
1034          `),n(1,"p-datepicker",21,0),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
1035          `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1036          `),n(7,"p-datepicker",22),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
1037          `),i(),e(9,`
1038        `)}if(o&2){let t=ue(2),l=p();s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function bs(o,d){if(o&1){let t=D();e(0,`
1039          `),n(1,"p-datepicker",23),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
1040          `),i(),e(3,`
1041          `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1042          `),n(7,"p-datepicker",24),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
1043          `),i(),e(9,`
1044        `)}if(o&2){let t=p();s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function vs(o,d){if(o&1){let t=D();e(0,`
1045        `),n(1,"p-multiSelect",25),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
1046        `),i(),e(3,`
1047      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}var Io=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.registrationService=r,this.waiverService=a,this.sharedPlayerService=b,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testUserOptions=le,this.genderOptions=Ae}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.reportService.reportFilters[F.PLEDGES_WAIVERS]===void 0&&(this.reportService.reportFilters[F.PLEDGES_WAIVERS]=new P),this.filters=this.reportService.reportFilters[F.PLEDGES_WAIVERS],oe({programs:this.reportService.getPrograms(),grades:this.sharedPlayerService.getGrades()}).subscribe(l=>{this.reportService.programs=l.programs,this.grades=l.grades,this.filterPrograms(),this.updateRegistrations(),this.getPledgesWaivers(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.PLEDGES_WAIVERS]})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}getPledgesWaivers(){this.filters.clubs||this.reportService.clubs.length===1?this.waiverService.getWaivers(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.pledgesWaivers=l.sort((r,a)=>r.label<a.label?-1:r.label>a.label?1:0)}):this.pledgesWaivers=void 0}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ei),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-pledges-waivers-filters"]],standalone:!1,decls:123,vars:35,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-4"],[1,"form-group"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["o
1047ptionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-5","col-lg-3"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"col-md-5","col-lg-2"],["for","credit-budgeting-grade-filter"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["placeholder","All","optionLabel","label","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1048  `),_(2,Ss,13,7),n(3,"div",2),e(4,`
1049    `),n(5,"div",3),e(6,`
1050      `),n(7,"label"),e(8,"Pledge/Waiver"),i(),e(9,`
1051      `),n(10,"p-multiSelect",4),y("ngModelChange",function(u){return S(a.filters.pledgesWaivers,u)||(a.filters.pledgesWaivers=u),u}),e(11,`
1052      `),i(),e(12,`
1053    `),i(),e(13,`
1054  `),i(),e(14,`
1055  `),n(15,"div",2),e(16,`
1056    `),n(17,"div",3),e(18,`
1057      `),n(19,"label"),e(20,"Program"),i(),e(21,`
1058      `),n(22,"p-multiSelect",5),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),T("onChange",function(){return a.updateRegistrations()}),e(23,`
1059      `),i(),e(24,`
1060    `),i(),e(25,`
1061  `),i(),e(26,`
1062  `),n(27,"div",6),e(28,`
1063    `),n(29,"div",3),e(30,`
1064      `),n(31,"label"),e(32,"Registration Date"),i(),e(33,`
1065      `),n(34,"span",7)(35,"p-inputgroup"),e(36,`
1066        `),n(37,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.regFrom,u)||(a.filters.regFrom=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(38,`
1067        `),i(),e(39,`
1068        `),n(40,"p-inputgroup-addon"),e(41,"to"),i(),e(42,`
1069        `),n(43,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.regTo,u)||(a.filters.regTo=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(44,`
1070        `),i(),e(45,`
1071        `),i(),e(46,`
1072        `),n(47,"a",10),T("click",function(){return a.filters.regFrom=a.reportService.defaultDate,a.filters.regTo=void 0,a.updateRegistrations()}),e(48,`
1073          `),g(49,"i",11),e(50,`
1074        `),i(),e(51,`
1075      `),i(),e(52,`
1076    `),i(),e(53,`
1077  `),i(),e(54,`
1078  `),n(55,"div",12),e(56,`
1079    `),n(57,"div",3),e(58,`
1080      `),n(59,"label"),e(60,"Registration"),i(),e(61,`
1081      `),n(62,"p-multiSelect",13),y("ngModelChange",function(u){return S(a.filters.registrations,u)||(a.filters.registrations=u),u}),e(63,`
1082      `),i(),e(64,`
1083    `),i(),e(65,`
1084  `),i(),e(66,`
1085  `),n(67,"div",14),e(68,`
1086    `),n(69,"div",3),e(70,`
1087      `),n(71,"label"),e(72,"Gender"),i(),e(73,`
1088      `),n(74,"p-select",15),y("ngModelChange",function(u){return S(a.filters.genderID,u)||(a.filters.genderID=u),u}),i(),e(75,`
1089    `),i(),e(76,`
1090  `),i(),e(77,`
1091  `),n(78,"div",6),e(79,`
1092    `),n(80,"div",16),e(81,`
1093      `),n(82,"label"),e(83,"Birth Date"),i(),e(84,`
1094      `),n(85,"p-select",17),T("onChange",function(){return a.filters.dobFrom
1094=void 0,a.filters.dobTo=void 0}),y("ngModelChange",function(u){return S(a.filters.dobType,u)||(a.filters.dobType=u),u}),i(),e(86,`
1095      `),n(87,"span",7)(88,"p-inputgroup"),e(89,`
1096        `),_(90,ys,10,8)(91,bs,10,2),i(),e(92,`
1097        `),n(93,"a",10),T("click",function(){return a.filters.dobFrom=void 0,a.filters.dobTo=void 0}),e(94,`
1098          `),g(95,"i",11),e(96,`
1099        `),i(),e(97,`
1100      `),i(),e(98,`
1101    `),i(),e(99,`
1102  `),i(),e(100,`
1103  `),n(101,"div",18),e(102,`
1104    `),n(103,"div",3),e(104,`
1105      `),n(105,"label",19),e(106,"Grade"),i(),e(107,`
1106      `),_(108,vs,4,7),i(),e(109,`
1107  `),i(),e(110,`
1108  `),n(111,"div",14),e(112,`
1109    `),n(113,"div",3),e(114,`
1110      `),n(115,"label"),e(116,"Test Users/Players"),i(),e(117,`
1111      `),n(118,"p-select",15),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),e(119,`
1112      `),i(),e(120,`
1113    `),i(),e(121,`
1114  `),i(),e(122,`
1115`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),m("autofocusFilter",!0),C("ngModel",a.filters.pledgesWaivers),m("options",a.pledgesWaivers)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.pledgesWaivers?"All":"Select option(s)")("selectedItemsLabel","{0} waivers selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.programs?"All":"Select club(s)")("selectedItemsLabel","{0} programs selected"),s(15),C("ngModel",a.filters.regFrom),s(6),C("ngModel",a.filters.regTo),s(19),m("autofocusFilter",!0),C("ngModel",a.filters.registrations),m("options",a.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registrations selected"),s(12),C("ngModel",a.filters.genderID),m("options",a.genderOptions),s(11),m("options",a.yearTypes),C("ngModel",a.filters.dobType),s(5),x(a.filters.dobType===1?90:91),s(18),x(a.grades?108:-1),s(10),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
1115)();function Es(o,d){if(o&1&&(e(0,`
1116          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
1117          `),i(),e(5,`
1118        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
1119            `,t.header,`
1120            `),s(),m("field",t.field)}}function ws(o,d){if(o&1&&(e(0,`
1121      `),n(1,"tr"),e(2,`
1122        `),N(3,Es,6,4,null,null,W),n(5,"th"),e(6,"Parent Signature"),i(),e(7,`
1123        `),n(8,"th"),e(9,"Player Signature"),i(),e(10,`
1124        `),n(11,"th"),e(12,"Completed On"),i(),e(13,`
1125      `),i(),e(14,`
1126    `)),o&2){let t=p();s(3),V(t.columns)}}function Fs(o,d){if(o&1&&(e(0,`
1127          `),n(1,"td"),e(2),i(),e(3,`
1128        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Ds(o,d){if(o&1&&(e(0,`
1129      `),n(1,"tr"),e(2,`
1130        `),_(3,Fs,4,1),n(4,"td"),e(5),i(),e(6,`
1131        `),n(7,"td"),e(8),i(),e(9,`
1132        `),n(10,"td"),e(11),i(),e(12,`
1133        `),n(13,"td"),e(14),v(15,"date"),i(),e(16,`
1134        `),n(17,"td"),e(18),i(),e(19,`
1135        `),n(20,"td"),e(21),i(),e(22,`
1136        `),n(23,"td"),e(24),i(),e(25,`
1137        `),n(26,"td"),e(27),v(28,"date"),i(),e(29,`
1138        `),n(30,"td"),e(31),i(),e(32,`
1139        `),n(33,"td"),e(34),i(),e(35,`
1140        `),n(36,"td"),e(37),i(),e(38,`
1141        `),n(39,"td"),e(40),i(),e(41,`
1142        `),n(42,"td"),e(43),i(),e(44,`
1143        `),n(45,"td"),e(46),v(47,"utcDate"),i(),e(48,`
1144      `),i(),e(49,`
1145    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.programName),s(3),c(t.regName),s(3),c(t.userName),s(3),c(B(15,15,t.clubUserWaiverExpirationDate,"M/d/y")),s(4),c(t.email),s(3),c(t.playerName),s(3),c(t.grade),s(3),c(B(28,18,t.playerWaiverExpirationDate,"M/d/y")),s(4),c(t.title),s(3),c(t.question),s(3),c(t.response),s(3),c(t.parentSignature),s(3),c(t.playerSignature),s(3),c(B(47,21,t.completedOn,"M/d/y"))}}var Ro=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"userName",header:"User Name"},{field:"clubUserWaiverExpirationDate",header:"User Expiration Date"},{field:"email",header:"Email"},{field:"playerName",header:"Player Name"},{field:"grade",header:"Grade"},{field:"playerWaiverExpirationDate",header:"Player Expiration Date"},{field:"title",header:"Pledge/Waiver"},{field:"question",header:"Question"},{field:"response",header:"Response"}]}getReportData(l){let r=this.reportService.reportFilters[F.PLEDGES_WAIVERS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getPledgesWaiversData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-pledges-waivers-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1146  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
1147    `),R(5,ws,15,0,"ng-template",3),e(6,`
1148    `),R(7,Ds,50,24,"ng-template",4),e(8,`
1149  `),i(),e(9,`
1150`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,de,Ce],encapsulation:2});let o=d;return o}
1150)();var Rs=o=>["/admin/players",o,"overview"];function Ms(o,d){if(o&1&&(e(0,`
1151          `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
1152          `),i(),e(5,`
1153        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
1154            `,t.header,`
1155            `),s(),m("field",t.field)}}function As(o,d){o&1&&(e(0,`
1156          `),g(1,"td"),e(2,`
1157        `))}function Ps(o,d){if(o&1&&(e(0,`
1158      `),n(1,"tr"),e(2,`
1159        `),N(3,Ms,6,4,null,null,W),i(),e(5,`
1160      `),n(6,"tr",5),e(7,`
1161        `),_(8,As,3,0),g(9,"td"),e(10,`
1162        `),g(11,"td"),e(12,`
1163        `),g(13,"td"),e(14,`
1164        `),g(15,"td"),e(16,`
1165        `),g(17,"td"),e(18,`
1166        `),g(19,"td"),e(20,`
1167        `),g(21,"td"),e(22,`
1168        `),g(23,"td"),e(24,`
1169        `),g(25,"td"),e(26,`
1170        `),n(27,"td"),e(28),v(29,"accountingCurrency"),i(),e(30,`
1171      `),i(),e(31,`
1172    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(20),c(E(29,2,t.totalCreditUsed))}}function Os(o,d){if(o&1&&(e(0,`
1173          `),n(1,"td"),e(2),i(),e(3,`
1174        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Ls(o,d){if(o&1&&(e(0,`
1175            `),n(1,"a",8),e(2),i(),e(3,`
1176          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Rs,t.playerID)),s(),c(t.playerName)}}function Ns(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
1177            `,t.playerName,`
1178          `)}}function Vs(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
1179            `,t.creditValue+"%",`
1180          `)}}function ks(o,d){if(o&1&&(e(0),v(1,"accountingCurrency")),o&2){let t=p().$implicit;I(`
1181            `,E(1,1,t.creditValue),`
1182          `)}}function Bs(o,d){if(o&1&&(e(0,`
1183      `),n(1,"tr"),e(2,`
1184        `),_(3,Os,4,1),n(4,"td"),e(5),v(6,"date"),i(),e(7,`
1185        `),n(8,"td"),e(9,`
1186          `),_(10,Ls,4,4)(11,Ns,1,1),i(),e(12,`
1187        `),n(13,"td"),e(14),i(),e(15,`
1188        `),n(16,"td"),e(17),v(18,"date"),i(),e(19,`
1189        `),n(20,"td"),e(21),i(),e(22,`
1190        `),n(23,"td"),e(24),i(),e(25,`
1191        `),n(26,"td"),e(27),i(),e(28,`
1192        `),n(29,"td"),e(30,`
1193          `),_(31,Vs,1,1),_(32,ks,2,3),i(),e(33,`
1194        `),n(34,"td"),e(35),v(36,"accountingCurrency"),i(),e(37,`
1195        `),n(38,"td"),e(39),v(40,"accountingCurrency"),i(),e(41,`
1196      `),i(),e(42,`
1197    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,12,t.dueDate,"M/d/y")),s(5),x(l.reportService.profile[l.Permission.Profile]?10:11),s(4),c(t.gender),s(3),c(B(18,15,t.dob,"M/d/y")),s(4),c(t.programName),s(3),c(t.registrationName),s(3),c(t.creditName),s(4),x(t.clubCreditTypeID===l.ClubCreditType.PERCENTAGE?31:-1),s(),x(t.clubCreditTypeID===l.ClubCreditType.FIXED_AMOUNT?32:-1),s(3),c(E(36,18,t.amountDue)),s(4),c(E(40,20,t.amountUsed))}}var Mo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee,this.ClubCreditType=Pt}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"dueDate",header:"Due Date"},{field:"playerName",header:"Player Name"},{field:"gender",header:"Gender"},{field:"dob",header:"Birth Date"},{field:"programName",header:"Program"},{field:"registrationName",header:"Registration"},{field:"creditName",header:"Financial Aid Name"},{field:"creditValue",header:"Discount"},{field:"amountDue",header:"Amount Due"},{field:"amountUsed",header:"Aid Applied"}]}getReportData(l){let r=this.reportService.reportFilters[F.CREDIT_USAGE];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getCreditUsageData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalCreditUsed=a.totalCreditUsed,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-credit-usage-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","
1197savedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading","sortOrder"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1198  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
1199    `),R(5,Ps,32,4,"ng-template",3),e(6,`
1200    `),R(7,Bs,43,22,"ng-template",4),e(8,`
1201  `),i(),e(9,`
1202`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading)("sortOrder",-1))},dependencies:[pe,z,H,$,K,de,se],encapsulation:2});let o=d;return o})();function Us(o,d){if(o&1){let t=D();e(0,`
1203    `),n(1,"div",4),e(2,`
1204      `),n(3,"div",2),e(4,`
1205        `),n(5,"label"),e(6,"Club"),i(),e(7,`
1206        `),n(8,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.filterPrograms())}),e(9,`
1207        `),i(),e(10,`
1208      `),i(),e(11,`
1209    `),i(),e(12,`
1210  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Ys(o,d){if(o&1){let t=D();e(0,`
1211    `),n(1,"div",1),e(2,`
1212      `),n(3,"div",2),e(4,`
1213        `),n(5,"label"),e(6,"Team"),i(),e(7,`
1214        `),n(8,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(9,`
1215        `),i(),e(10,`
1216      `),i(),e(11,`
1217    `),i(),e(12,`
1218  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} teams selected")}}var Ao=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.registrationService=r,this.creditService=a,this.teamService=b,this.programTypeOptions=Fn,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.CREDIT_USAGE]===void 0&&(this.reportService.reportFilters[F.CREDIT_USAGE]=new P),this.filters=this.reportService.reportFilters[F.CREDIT_USAGE],oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons()]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.filterPrograms(),this.getTeams()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CREDIT_USAGE]})}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name})}):this.teams=void 0}filterPrograms(){this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CREDIT_USAGE],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypeID=+this.reportService.state.programTypeID:this.filters.programTypeID=null,this.reportService.state.activePrograms?(this.filters.activePrograms=this.reportService.state.activePrograms,this.filters.activeFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.activeTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.filters.dateFrom=void 0):(this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0),this.reportService.showReportData=!0,this.reportService.state=void 0),this.programs=this.reportService.filterPrograms(this.filters)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ct),w(ve))},d.\u0275cmp=A({type:d,selectors:[["app-credit-usage-filters"]],standalone:!1,decls:89,vars:23,consts:[[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["id","playerName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2","col-lg-2"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["o
1218ptionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
1219  `),_(2,Us,13,7),n(3,"div",1),e(4,`
1220    `),n(5,"div",2),e(6,`
1221      `),n(7,"label"),e(8,"Program Type"),i(),e(9,`
1222      `),n(10,"p-select",3),y("ngModelChange",function(u){return S(a.filters.programTypeID,u)||(a.filters.programTypeID=u),u}),T("onChange",function(){return a.filterPrograms()}),i(),e(11,`
1223    `),i(),e(12,`
1224  `),i(),e(13,`
1225  `),n(14,"div",4),e(15,`
1226    `),n(16,"div",2),e(17,`
1227      `),n(18,"label"),e(19,"Program"),i(),e(20,`
1228      `),n(21,"p-multiSelect",5),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),e(22,`
1229      `),i(),e(23,`
1230    `),i(),e(24,`
1231  `),i(),e(25,`
1232  `),n(26,"div",4),e(27,`
1233    `),n(28,"div",2),e(29,`
1234      `),n(30,"label"),e(31,"Player Name"),i(),e(32,`
1235      `),n(33,"input",6),y("ngModelChange",function(u){return S(a.filters.playerName,u)||(a.filters.playerName=u),u}),i(),e(34,`
1236    `),i(),e(35,`
1237  `),i(),e(36,`
1238  `),n(37,"div",7),e(38,`
1239    `),n(39,"div",2),e(40,`
1240      `),n(41,"label"),e(42,"Aid Applied Date"),i(),e(43,`
1241      `),n(44,"span",8)(45,"p-inputgroup"),e(46,`
1242        `),n(47,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(48,`
1243        `),i(),e(49,`
1244        `),n(50,"p-inputgroup-addon"),e(51,"to"),i(),e(52,`
1245        `),n(53,"p-datepicker",10),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(54,`
1246        `),i(),e(55,`
1247        `),i(),e(56,`
1248        `),n(57,"a",11),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(58,`
1249          `),g(59,"i",12),e(60,`
1250        `),i(),e(61,`
1251      `),i(),e(62,`
1252    `),i(),e(63,`
1253  `),i(),e(64,`
1254  `),n(65,"div",13),e(66,`
1255    `),n(67,"div",2),e(68,`
1256      `),n(69,"label"),e(70,"Test Players"),i(),e(71,`
1257      `),n(72,"p-select",14),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(73,`
1258    `),i(),e(74,`
1259  `),i(),e(75,`
1260  `),n(76,"div",1),e(77,`
1261    `),n(78,"div",2),e(79,`
1262      `),n(80,"label"),e(81,"Season"),i(),e(82,`
1263      `),n(83,"p-multiSelect",15),y("ngModelChange",function(u){return S(a.filters.seasons,u)||(a.filters.seasons=u),u}),e(84,`
1264      `),i(),e(85,`
1265    `),i(),e(86,`
1266  `),i(),e(87,`
1267  `),_(88,Ys,13,7),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.programTypeID),m("options",a.programTypeOptions),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected"),s(12),C("ngModel",a.filters.playerName),s(14),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.seasons),m("options",a.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected"),s(5),x(-1))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
1267)();function js(o,d){if(o&1&&(e(0,`
1268              `),g(1,"i",8),e(2,`
1269            `)),o&2){let t=p().$implicit;s(),m("title",t.tooltip)}}function Hs(o,d){if(o&1&&(e(0,`
1270          `),n(1,"th",6),e(2),_(3,js,3,1),g(4,"p-sortIcon",7),e(5,`
1271          `),i(),e(6,`
1272        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
1273            `,t.header,`
1274            `),s(),x(t.tooltip?3:-1),s(),m("field",t.field)}}function zs(o,d){o&1&&(e(0,`
1275          `),g(1,"td"),e(2,`
1276        `))}function qs(o,d){if(o&1&&(e(0,`
1277      `),n(1,"tr"),e(2,`
1278        `),N(3,Hs,7,5,null,null,W),i(),e(5,`
1279      `),n(6,"tr",5),e(7,`
1280        `),_(8,zs,3,0),g(9,"td"),e(10,`
1281        `),g(11,"td"),e(12,`
1282        `),g(13,"td"),e(14,`
1283        `),g(15,"td"),e(16,`
1284        `),g(17,"td"),e(18,`
1285        `),g(19,"td"),e(20,`
1286        `),g(21,"td"),e(22,`
1287        `),g(23,"td"),e(24,`
1288        `),g(25,"td"),e(26,`
1289        `),g(27,"td"),e(28,`
1290        `),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
1291        `),n(33,"td"),e(34),v(35,"accountingCurrency"),i(),e(36,`
1292      `),i(),e(37,`
1293    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(22),c(E(31,3,t.totalPrice)),s(4),c(E(35,5,t.totalGranted))}}function $s(o,d){if(o&1&&(e(0,`
1294          `),n(1,"td"),e(2),i(),e(3,`
1295        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Ks(o,d){if(o&1&&e(0),o&2){let t=p(2).$implicit;I(`
1296              `,t.creditValue+"%",`
1297            `)}}function Js(o,d){if(o&1&&(e(0),v(1,"accountingCurrency")),o&2){let t=p(2).$implicit;I(`
1298              `,E(1,1,t.creditValue),`
1299            `)}}function Xs(o,d){if(o&1&&(e(0,`
1300            `),_(1,Ks,1,1),_(2,Js,2,3)),o&2){let t=p().$implicit,l=p();s(),x(t.clubCreditTypeID===l.ClubCreditType.PERCENTAGE?1:-1),s(),x(t.clubCreditTypeID===l.ClubCreditType.FIXED_AMOUNT?2:-1)}}function Zs(o,d){if(o&1&&(e(0,`
1301      `),n(1,"tr"),e(2,`
1302        `),_(3,$s,4,1),n(4,"td"),e(5),i(),e(6,`
1303        `),n(7,"td"),e(8),i(),e(9,`
1304        `),n(10,"td"),e(11),v(12,"date"),i(),e(13,`
1305        `),n(14,"td"),e(15),i(),e(16,`
1306        `),n(17,"td"),e(18),i(),e(19,`
1307        `),n(20,"td"),e(21),i(),e(22,`
1308        `),n(23,"td"),e(24),v(25,"date"),i(),e(26,`
1309        `),n(27,"td"),e(28),i(),e(29,`
1310        `),n(30,"td"),e(31),i(),e(32,`
1311        `),n(33,"td"),e(34,`
1312          `),_(35,Xs,3,2),i(),e(36,`
1313        `),n(37,"td"),e(38),v(39,"accountingCurrency"),i(),e(40,`
1314        `),n(41,"td"),e(42),v(43,"accountingCurrency"),i(),e(44,`
1315      `),i(),e(45,`
1316    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),I(" ",t.playerName),s(3),c(t.gender),s(3),c(B(12,13,t.dob,"M/d/y")),s(4),c(t.grade),s(3),c(t.userName),s(3),c(t.status),s(3),c(B(25,16,t.reviewedOn,"M/d/y")),s(4),c(t.reviewedBy),s(3),c(t.registered),s(4),x(t.creditValue?35:-1),s(3),c(E(39,19,t.price)),s(4),c(E(43,21,t.aidAmount))}}var Po=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee,this.ClubCreditType=Pt}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){let l=[{field:"playerName",header:"Player Name"},{field:"gender",header:"Gender"},{field:"dob",header:"Birth Date"},{field:"grade",header:"Grade"},{field:"userName",header:"User Name"},{field:"status",header:"Application Status"},{field:"reviewedOn",header:"Review Date"},{field:"reviewedBy",header:"Reviewer"},{field:"registered",header:"Registered"},{field:"creditValue",header:"Financial Aid"},{field:"price",header:"Actual Registration Fees",tooltip:"The total registration fee for the player's completed registration"},{field:"aidAmount",header:"Actual Grant Amount",tooltip:"The amount of financial aid granted to a player based upon the price of their completed registration"}];return this.showClubName&&l.unshift({field:"clubName",header:"Club"}),l}getReportData(l){let r=this.reportService.reportFilters[F.CREDIT_BUDGETING];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getCreditBudgetingData().subscribe({next:a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalGranted=a.totalGranted,this.totalPrice=a.totalPrice,this.totalAidAmountPotential=a.totalAidAmountPotential,this.loading=!1,this.columns=this.getReportColumns()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")}})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-credit-budgeting-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[1,"far","fa-info-circle",3,"title"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1317  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
1318    `),R(5,qs,38,7,"ng-template",3),e(6,`
1319    `),R(7,Zs,46,23,"ng-template",4),e(8,`
1320  `),i(),e(9,`
1321`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,de,se],encapsulation:2});let o=d;return o}
1321)();function e0(o,d){if(o&1){let t=D();e(0,`
1322    `),n(1,"div",6),e(2,`
1323      `),n(3,"div",3),e(4,`
1324        `),n(5,"label",34),e(6,"Club"),i(),e(7,`
1325        `),n(8,"p-select",35),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubID,r)||(a.filters.clubID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.filterPrograms())}),i(),e(9,`
1326      `),i(),e(10,`
1327    `),i(),e(11,`
1328  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.clubID),m("options",t.clubOptions)}}function t0(o,d){if(o&1){let t=D();e(0,`
1329        `),n(1,"p-select",36),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubFiscalYearID,r)||(a.filters.clubFiscalYearID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.updateDates())}),e(2,`
1330        `),i(),e(3,`
1331      `)}if(o&2){let t=p();s(),C("ngModel",t.filters.clubFiscalYearID),m("options",t.fiscalYearsOptions)}}function i0(o,d){if(o&1){let t=D();e(0,`
1332        `),n(1,"p-multiSelect",37),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.filterPrograms())}),e(2,`
1333        `),i(),e(3,`
1334      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} issue types selected")}}function n0(o,d){if(o&1){let t=D();e(0,`
1335        `),n(1,"p-datepicker",38,0),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
1336        `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1337        `),n(7,"p-datepicker",39),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),i(),e(8,`
1338      `)}if(o&2){let t=ue(2),l=p();s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function o0(o,d){if(o&1){let t=D();e(0,`
1339        `),n(1,"p-datepicker",40),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
1340        `),i(),e(3,`
1341        `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1342        `),n(7,"p-datepicker",41),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
1343        `),i(),e(9,`
1344      `)}if(o&2){let t=p();s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function r0(o,d){if(o&1){let t=D();e(0,`
1345      `),n(1,"p-multiSelect",42),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
1346      `),i(),e(3,`
1347    `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}var Oo=(()=>{let d=class d{constructor(l,r,a,b,u){this.reportService=l,this.creditService=r,this.dashboardService=a,this.datePipe=b,this.sharedPlayerService=u,this.statuses=[{label:"All",value:null}],this.fiscalYearsOptions=[],this.minBirthYear=Ie,this.maxBirthYear=Re,this.registeredOptions=In,this.currentPlayerOptions=Rn,this.testUserOptions=le,this.clubOptions=[]}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.reportService.reportFilters[F.CREDIT_BUDGETING]===void 0&&(this.reportService.reportFilters[F.CREDIT_BUDGETING]=this.reportService.createFilters()),this.filters=this.reportService.reportFilters[F.CREDIT_BUDGETING],oe([this.reportService.getClubUserFinancialAidApplicationStatuses(),this.reportService.getPrograms(),this.reportService.getProgramTypes(),this.dashboardService.getFiscalYears(),this.sharedPlayerService.getGrades()]).subscribe(l=>
1347{l[0].forEach(r=>{this.statuses.push(r)}),this.reportService.programs=l[1],this.programTypes=l[2],this.fiscalYears=l[3],this.grades=l[4],this.fiscalYears&&(this.filters.clubFiscalYearID=this.fiscalYears[0].clubFiscalYearID,this.fiscalYears.forEach(r=>{this.fiscalYearsOptions.push({label:this.datePipe.transform(r.startDate,"MM/dd/yyyy")+" - "+this.datePipe.transform(r.endDate,"MM/dd/yyyy"),value:r.clubFiscalYearID})})),this.reportService.state&&(this.reportService.state.programTypeID&&(this.filters.programTypes=this.programTypes.filter(r=>r.value===+this.reportService.state.programTypeID)),this.filters.programID=this.reportService.state.programID?this.reportService.state.programID:null,this.filters.statusID=this.reportService.state.statusID?this.reportService.state.statusID:null,this.filters.registered=this.reportService.state.registered?this.reportService.state.registered:null,this.filters.currentPlayer=this.reportService.state.currentPlayer?this.reportService.state.currentPlayer:null,this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.filters.clubFiscalYearID=this.reportService.state.clubFiscalYearID?this.reportService.state.clubFiscalYearID:this.fiscalYears[0].clubFiscalYearID,this.reportService.state.includeUnusedAid?this.filters.includeUnusedAid=!0:this.filters.includeUnusedAid=!1,this.reportService.state.grades?this.filters.grades=this.grades.filter(r=>this.reportService.state.grades.includes(r.value)):this.filters.grades=void 0,this.reportService.showReportData=!0,this.reportService.state=void 0),this.updateDates(),this.filterPrograms()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=this.reportService.createFilters(),this.filters=this.reportService.reportFilters[F.CREDIT_BUDGETING]}),this.reportService.clubs.forEach(l=>{this.clubOptions.push({label:l.name,value:l.clubID})})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters,void 0,!1),this.programsOptions=[{label:"All",value:null}],this.programs.forEach(l=>{this.programsOptions.push({label:l.displayName,value:l.programID})})}updateDates(){this.filters.dateFrom=new Date(this.fiscalYears.find(l=>l.clubFiscalYearID===this.filters.clubFiscalYearID).startDate),this.filters.dateTo=new Date(this.fiscalYears.find(l=>l.clubFiscalYearID===this.filters.clubFiscalYearID).endDate)}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(ct),w(mt),w(de),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-credit-budgeting-filters"]],standalone:!1,decls:166,vars:21,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["for","credit-budgeting-fiscal-year-filter"],["for","credit-budgeting-program-type-filter"],[1,"col-md-5","col-lg-3"],["for","credit-budgeting-program-filter"],["styleClass","full-width","inputId","credit-budgeting-program-filter","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["for","credit-budgeting-birthdate-range-filter",1,"sr-only"],["for","credit-budgeting-birthdate-from-filter",1,"sr-only"],["for","credit-budgeting-birthdate-to-filter",1,"sr-only"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","inputId","credit-budgeting-birthdate-range-filter","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],["role","button",1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["for","credit-budgeting-grade-filter"],["for","credit-budgeting-registration-date-from",1,"sr-only"],["for","credit-budgeting-registration-date-to",1,"sr-only"],["id","regFrom","dateFormat","mm/dd/yy","inputId","credit-budgeting-registration-date-from","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","regTo","dateFormat","mm/dd/yy","inputId","credit-budgeting-registration-date-to","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-2","col-lg-2"],["for","credit-budgeting-status-filter"],["styleClass","full-width","inputId","credit-budgeting-status-filter","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-2"],["for","credit-budgeting-registered-filter"],["inputId","credit-budgeting-registered-filter","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["for","credit-budgeting-current-player
1347-filter"],["inputId","credit-budgeting-current-player-filter","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["for","credit-budgeting-test-players-filter"],["inputId","credit-budgeting-test-players-filter","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[3,"ngModelChange","binary","ngModel"],["for","credit-budgeting-club-filter"],["styleClass","full-width","inputId","credit-budgeting-club-filter","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],["styleClass","full-width","inputId","credit-budgeting-fiscal-year-filter","optionLabel","label","optionValue","value","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],["placeholder","All","optionLabel","label","inputId","credit-budgeting-program-type-filter","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","inputId","credit-budgeting-birthdate-from-filter","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","inputId","credit-budgeting-birthdate-to-filter","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","inputId","credit-budgeting-birthdate-from-filter","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","credit-budgeting-birthdate-to-filter","appendTo","body",3,"ngModelChange","ngModel"],["placeholder","All","optionLabel","label","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1348  `),_(2,e0,12,2),n(3,"div",2),e(4,`
1349    `),n(5,"div",3),e(6,`
1350      `),n(7,"label",4),e(8,"Fiscal Year"),i(),e(9,`
1351      `),_(10,t0,4,2),i(),e(11,`
1352  `),i(),e(12,`
1353  `),n(13,"div",2),e(14,`
1354    `),n(15,"div",3),e(16,`
1355      `),n(17,"label",5),e(18,"Program Type"),i(),e(19,`
1356      `),_(20,i0,4,7),i(),e(21,`
1357  `),i(),e(22,`
1358  `),n(23,"div",6),e(24,`
1359    `),n(25,"div",3),e(26,`
1360      `),n(27,"label",7),e(28,"Program"),i(),e(29,`
1361      `),n(30,"p-select",8),y("ngModelChange",function(u){return S(a.filters.programID,u)||(a.filters.programID=u),u}),i(),e(31,`
1362    `),i(),e(32,`
1363  `),i(),e(33,`
1364  `),e(34,`
1365`),n(35,"div",9),e(36,`
1366  `),n(37,"div",10),e(38,`
1367    `),n(39,"label"),e(40,"Birth Date"),i(),e(41,`
1368    `),n(42,"label",11),e(43,"Range Toggle"),i(),e(44,`
1369    `),n(45,"label",12),e(46,"Birth Date From"),i(),e(47,`
1370    `),n(48,"label",13),e(49,"Birth Date To"),i(),e(50,`
1371    `),n(51,"p-select",14),T("onChange",function(){return a.filters.dobFrom=void 0,a.filters.dobTo=void 0}),y("ngModelChange",function(u){return S(a.filters.dobType,u)||(a.filters.dobType=u),u}),i(),e(52,`
1372    `),n(53,"span",15)(54,"p-inputgroup"),e(55,`
1373      `),_(56,n0,9,8)(57,o0,10,2),i(),e(58,`
1374      `),n(59,"a",16),T("click",function(){return a.filters.dobFrom=void 0,a.filters.dobTo=void 0}),e(60,`
1375        `),g(61,"i",17),e(62,`
1376      `),i(),e(63,`
1377    `),i(),e(64,`
1378
1379  `),i(),e(65,`
1380`),i(),e(66,`
1381`),n(67,"div",2),e(68,`
1382  `),n(69,"div",3),e(70,`
1383    `),n(71,"label",18),e(72,"Grade"),i(),e(73,`
1384    `),_(74,r0,4,7),i(),e(75,`
1385`),i(),e(76,`
1386`),n(77,"div",9),e(78,`
1387  `),n(79,"div",3),e(80,`
1388    `),n(81,"label"),e(82,"Registration Date"),i(),e(83,`
1389    `),n(84,"label",19),e(85,"Registration Date From"),i(),e(86,`
1390    `),n(87,"label",20),e(88,"Registration Date To"),i(),e(89,`
1391    `),n(90,"span",15)(91,"p-inputgroup"),e(92,`
1392      `),n(93,"p-datepicker",21),y("ngModelChange",function(u){return S(a.filters.regFrom,u)||(a.filters.regFrom=u),u}),e(94,`
1393      `),i(),e(95,`
1394      `),n(96,"p-inputgroup-addon"),e(97,"to"),i(),e(98,`
1395      `),n(99,"p-datepicker",22),y("ngModelChange",function(u){return S(a.filters.regTo,u)||(a.filters.regTo=u),u}),e(100,`
1396      `),i(),e(101,`
1397      `),i(),e(102,`
1398      `),n(103,"a",16),T("click",function(){return a.filters.regFrom=a.reportService.defaultDate,a.filters.regTo=void 0}),e(104,`
1399        `),g(105,"i",17),e(106,`
1400      `),i(),e(107,`
1401    `),i(),e(108,`
1402  `),i(),e(109,`
1403`),i(),e(110,`
1404`),n(111,"div",23),e(112,`
1405  `),n(113,"div",3),e(114,`
1406    `),n(115,"label",24),e(116,"Status"),i(),e(117,`
1407    `),n(118,"p-select",25),y("ngModelChange",function(u){return S(a.filters.statusID,u)||(a.filters.statusID=u),u}),i(),e(119,`
1408  `),i(),e(120,`
1409`),i(),e(121,`
1410`),n(122,"div",26),e(123,`
1411  `),n(124,"div",3),e(125,`
1412    `),n(126,"label",27),e(127,"Registered"),i(),e(128,`
1413    `),n(129,"p-select",28),y("ngModelChange",function(u){return S(a.filters.registered,u)||(a.filters.registered=u),u}),i(),e(130,`
1414  `),i(),e(131,`
1415`),i(),e(132,`
1416`),n(133,"div",26),e(134,`
1417  `),n(135,"div",3),e(136,`
1418    `),n(137,"label",29),e(138,"Current Player"),i(),e(139,`
1419    `),n(140,"p-select",30),y("ngModelChange",function(u){return S(a.filters.currentPlayer,u)||(a.filters.currentPlayer=u),u}),i(),e(141,`
1420  `),i(),e(142,`
1421`),i(),e(143,`
1422`),n(144,"div",26),e(145,`
1423  `),n(146,"div",3),e(147,`
1424    `),n(148,"label",31),e(149,"Test Players"),i(),e(150,`
1425    `),n(151,"p-select",32),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(152,`
1426  `),i(),e(153,`
1427`),i(),e(154,`
1428`),n(155,"div",6),e(156,`
1429  `),n(157,"div",3),e(158,`
1430    `),n(159,"label"),e(160,"Include Players with Unused Financial Aid"),i(),e(161,`
1431    `),n(162,"p-checkbox",33),y("ngModelChange",function(u){return S(a.filters.includeUnusedAid,u)||(a.filters.includeUnusedAid=u),u}),i(),e(163,`
1432  `),i(),e(164,`
1433`),i(),e(165,`
1434
1435`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),x((a.fiscalYearsOptions==null?null:a.fiscalYearsOptions.length)>0?10:-1),s(10),x(a.programTypes?20:-1),s(10),C("ngModel",a.filters.programID),m("options",a.programsOptions),s(21),m("options",a.yearTypes),C("ngModel",a.filters.dobType),s(5),x(a.filters.dobType===1?56:57),s(18),x(a.grades?74:-1),s(19),C("ngModel",a.filters.regFrom),s(6),C("ngModel",a.filters.regTo),s(19),C("ngModel",a.filters.statusID),m("options",a.statuses),s(11),C("ngModel",a.filters.registered),m("options",a.registeredOptions),s(11),C("ngModel",a.filters.currentPlayer),m("options",a.currentPlayerOptions),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(11),m("binary",!0),C("ngModel",a.filters.includeUnusedAid))},dependencies:[U,Y,ie,ne,te,St,q,Q],encapsulation:2});let o=d;return o}
1435)();function l0(o,d){if(o&1){let t=D();e(0,`
1436      `),n(1,"div",4),e(2,`
1437        `),n(3,"div",2),e(4,`
1438          `),n(5,"label"),e(6,"Club"),i(),e(7,`
1439          `),n(8,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.filterPrograms())}),e(9,`
1440          `),i(),e(10,`
1441        `),i(),e(11,`
1442      `),i(),e(12,`
1443    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function s0(o,d){if(o&1){let t=D();e(0,`
1444  `),n(1,"div",0),e(2,`
1445    `),_(3,l0,13,7),n(4,"div",1),e(5,`
1446      `),n(6,"div",2),e(7,`
1447        `),n(8,"label"),e(9,"Program Type"),i(),e(10,`
1448        `),n(11,"p-multiSelect",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),h(r.updateRegistrations())}),e(12,`
1449        `),i(),e(13,`
1450      `),i(),e(14,`
1451    `),i(),e(15,`
1452    `),n(16,"div",4),e(17,`
1453      `),n(18,"div",2),e(19,`
1454        `),n(20,"label"),e(21,"Program"),i(),e(22,`
1455        `),n(23,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(24,`
1456        `),i(),e(25,`
1457      `),i(),e(26,`
1458    `),i(),e(27,`
1459    `),n(28,"div",6),e(29,`
1460      `),n(30,"div",2),e(31,`
1461        `),n(32,"label"),e(33,"Registration Date"),i(),e(34,`
1462        `),n(35,"span",7)(36,"p-inputgroup"),e(37,`
1463          `),n(38,"p-datepicker",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(39,`
1464          `),i(),e(40,`
1465          `),n(41,"p-inputgroup-addon"),e(42,"to"),i(),e(43,`
1466          `),n(44,"p-datepicker",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(45,`
1467          `),i(),e(46,`
1468          `),i(),e(47,`
1469          `),n(48,"a",10),T("click",function(){f(t);let r=p();return r.filters.regFrom=r.reportService.defaultDate,r.filters.regTo=void 0,h(r.updateRegistrations())}),e(49,`
1470            `),g(50,"i",11),e(51,`
1471          `),i(),e(52,`
1472        `),i(),e(53,`
1473      `),i(),e(54,`
1474    `),i(),e(55,`
1475    `),n(56,"div",4),e(57,`
1476      `),n(58,"div",2),e(59,`
1477        `),n(60,"label"),e(61,"Registration"),i(),e(62,`
1478        `),n(63,"p-multiSelect",12),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(64,`
1479        `),i(),e(65,`
1480      `),i(),e(66,`
1481    `),i(),e(67,`
1482    `),n(68,"div",6),e(69,`
1483      `),n(70,"div",2),e(71,`
1484        `),n(72,"label"),e(73,"Payment Date"),i(),e(74,`
1485        `),n(75,"span",7)(76,"p-inputgroup"),e(77,`
1486          `),n(78,"p-datepicker",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(79,`
1487          `),i(),e(80,`
1488          `),n(81,"p-inputgroup-addon"),e(82,"to"),i(),e(83,`
1489          `),n(84,"p-datepicker",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(85,`
1490          `),i(),e(86,`
1491          `),i(),e(87,`
1492          `),n(88,"a",10),T("click",function(){f(t);let r=p();return r.setDateFrom(),h(r.filters.dateTo=void 0)}),e(89,`
1493            `),g(90,"i",11),e(91,`
1494          `),i(),e(92,`
1495        `),i(),e(93,`
1496      `),i(),e(94,`
1497    `),i(),e(95,`
1498    `),n(96,"div",15),e(97,`
1499      `),n(98,"div",2),e(99,`
1500        `),n(100,"label"),e(101,"Test Players"),i(),e(102,`
1501        `),n(103,"p-select",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),i(),e(104,`
1502      `),i(),e(105,`
1503    `),i(),e(106,`
1504    `),n(107,"div",1),e(108,`
1505      `),n(109,"div",2),e(110,`
1506        `),n(111,"label"),e(112,"Season"),i(),e(113,`
1507        `),n(114,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(115,`
1508        `),i(),e(116,`
1509      `),i(),e(117,`
1510    `),i(),e(118,`
1511    `),n(119,"div",1),e(120,`
1512      `),n(121,"div",2),e(122,`
1513        `),n(123,"label"),e(124,"Team"),i(),e(125,`
1514        `),n(126,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(127,`
1515        `),i(),e(128,`
1516      `),i(),e(129,`
1517    `),i(),e(130,`
1518  `),i(),e(131,`
1519`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("filter",!0)("maxSelectedLabels",1)("showToggleAll",!0)("selectedItemsLabel","{0} program types selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected"),s(15),C("ngModel",t.filters.regFrom),s(6),C("ngModel",t.filters.regTo),s(19),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected"),s(15),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo),s(19),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(11),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0}
1519 teams selected")}}var Lo=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.registrationService=r,this.teamService=a,this.testUserOptions=le}ngOnInit(){oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes()]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.reportService.reportFilters[F.REGISTRATION_PAYMENTS]===void 0&&(this.reportService.reportFilters[F.REGISTRATION_PAYMENTS]=new P,this.reportService.reportFilters[F.REGISTRATION_PAYMENTS].dateFrom=new Date,this.reportService.reportFilters[F.REGISTRATION_PAYMENTS].dateFrom.setDate(new Date().getDate()-60),this.reportService.reportFilters[F.REGISTRATION_PAYMENTS].programTypes=this.programTypes.filter(r=>r.value!==Ne.OTHER)),this.filters=this.reportService.reportFilters[F.REGISTRATION_PAYMENTS],this.filterPrograms(),this.updateRegistrations(),this.getTeams(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REGISTRATION_PAYMENTS]})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name})}):this.teams=void 0}setDateFrom(){this.filters.dateFrom=new Date,this.filters.dateFrom.setDate(new Date().getDate()-60)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve))},d.\u0275cmp=A({type:d,selectors:[["app-registration-payments-filters"]],standalone:!1,decls:1,vars:1,consts:[[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","maxSelectedLabels","showToggleAll","selectedItemsLabel"],[1,"col-md-5","col-lg-3"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["id","dateFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-2","col-lg-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","name","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,s0,132,42),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
1519)();var p0=o=>["/admin/players",o,"overview"];function m0(o,d){if(o&1&&(e(0,`
1520          `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
1521          `),i(),e(5,`
1522        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
1523            `,t.header,`
1524            `),s(),m("field",t.field)}}function c0(o,d){o&1&&(e(0,`
1525          `),g(1,"td"),e(2,`
1526        `))}function u0(o,d){if(o&1&&(e(0,`
1527      `),n(1,"tr"),e(2,`
1528        `),N(3,m0,6,4,null,null,W),i(),e(5,`
1529      `),n(6,"tr",5),e(7,`
1530        `),_(8,c0,3,0),g(9,"td"),e(10,`
1531        `),g(11,"td"),e(12,`
1532        `),g(13,"td"),e(14,`
1533        `),g(15,"td"),e(16,`
1534        `),g(17,"td"),e(18,`
1535        `),n(19,"td",6),e(20),v(21,"accountingCurrency"),i(),e(22,`
1536        `),n(23,"td"),e(24),v(25,"accountingCurrency"),i(),e(26,`
1537        `),n(27,"td"),e(28),v(29,"accountingCurrency"),i(),e(30,`
1538        `),n(31,"td"),e(32),v(33,"accountingCurrency"),i(),e(34,`
1539        `),g(35,"td"),e(36,`
1540      `),i(),e(37,`
1541    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(12),c(E(21,5,t.totalAmountDue)),s(4),c(E(25,7,t.totalAmountPaid)),s(4),c(E(29,9,t.totalCreditUsed)),s(4),c(E(33,11,t.totalAmountPaid+t.totalCreditUsed))}}function _0(o,d){if(o&1&&(e(0,`
1542          `),n(1,"td"),e(2),i(),e(3,`
1543        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function x0(o,d){if(o&1){let t=D();e(0,`
1544              `),n(1,"a",9),T("click",function(){f(t);let r=p(2).$implicit,a=p();return h(a.reportService.setupModal(r.playerID,r.clubUserID,r.subdomain,r.clubName))}),e(2),i(),e(3,`
1545            `)}if(o&2){let t=p(2).$implicit;s(2),I(`
1546                `,t.playerName,`
1547              `)}}function g0(o,d){if(o&1&&(e(0,`
1548              `),n(1,"a",10),e(2),i(),e(3,`
1549            `)),o&2){let t=p(2).$implicit;s(),m("routerLink",re(2,p0,t.playerID)),s(),I(`
1550                `,t.playerName,`
1551              `)}}function f0(o,d){if(o&1&&(e(0,`
1552            `),_(1,x0,4,1),_(2,g0,4,4)),o&2){let t=p().$implicit,l=p();s(),x(t.clubID!==l.reportService.clubID?1:-1),s(),x(t.clubID===l.reportService.clubID?2:-1)}}function h0(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
1553            `,t.playerName,`
1554          `)}}function C0(o,d){if(o&1&&(e(0,`
1555      `),n(1,"tr"),e(2,`
1556        `),_(3,_0,4,1),n(4,"td"),e(5),v(6,"utcDate"),i(),e(7,`
1557        `),n(8,"td"),e(9,`
1558          `),_(10,f0,3,2)(11,h0,1,1),i(),e(12,`
1559        `),n(13,"td"),e(14),i(),e(15,`
1560        `),n(16,"td"),e(17),v(18,"utcDate"),i(),e(19,`
1561        `),n(20,"td"),e(21),v(22,"utcDate"),i(),e(23,`
1562        `),n(24,"td"),e(25),v(26,"accountingCurrency"),i(),e(27,`
1563        `),n(28,"td"),e(29),v(30,"accountingCurrency"),i(),e(31,`
1564        `),n(32,"td"),e(33),v(34,"accountingCurrency"),i(),e(35,`
1565        `),n(36,"td"),e(37),v(38,"accountingCurrency"),i(),e(39,`
1566        `),n(40,"td"),e(41),i(),e(42,`
1567      `),i(),e(43,`
1568    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,11,t.paymentCompletedDate,"M/d/y")),s(5),x(l.reportService.profile[l.Permission.Profile]?10:11),s(4),c(t.programName),s(3),c(B(18,14,t.dueDate,"M/d/y")),s(4),c(B(22,17,t.completedDate,"M/d/y")),s(4),c(E(26,20,t.amountDue)),s(4),c(E(30,22,t.amountPaid)),s(4),c(E(34,24,t.creditUsed)),s(4),c(E(38,26,t.totalPaid)),s(4),c(t.disbursement)}}var No=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.showClubName=!1,this.Permission=ee,this.loading=!0}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"paymentCompletedDate",header:"Payment Date"},{field:"playerName",header:"Player Name"},{field:"programName",header:"Program"},{field:"dueDate",header:"Due Date"},{field:"completedDate",header:"Registration Date"},{field:"amountDue",header:"Total Fee"},{field:"amountPaid",header:"Paid (Cash)"},{field:"creditUsed",header:"Paid (Credit)"},{field:"totalPaid",header:"Total Paid"}
1568,{field:"disbursement",header:"Disbursement ID"}]}getReportData(l){let r=this.reportService.reportFilters[F.REGISTRATION_PAYMENTS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getRegistrationPaymentsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalAmountDue=a.totalAmountDue,this.totalAmountPaid=a.totalAmountPaid,this.totalCreditUsed=a.totalCreditUsed,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-registration-payments-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","paymentCompletedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading","sortOrder"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"click"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1569  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
1570    `),R(5,u0,38,13,"ng-template",3),e(6,`
1571    `),R(7,C0,44,28,"ng-template",4),e(8,`
1572  `),i(),e(9,`
1573`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading)("sortOrder",-1))},dependencies:[pe,z,H,$,K,Ce,se],encapsulation:2});let o=d;return o}
1573)();function y0(o,d){if(o&1){let t=D();e(0,`
1574      `),n(1,"div",4),e(2,`
1575        `),n(3,"div",3),e(4,`
1576          `),n(5,"label"),e(6,"Club"),i(),e(7,`
1577          `),n(8,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),h(r.updateRegistrations())}),e(9,`
1578          `),i(),e(10,`
1579        `),i(),e(11,`
1580      `),i(),e(12,`
1581    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function b0(o,d){if(o&1){let t=D();e(0,`
1582          `),n(1,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),h(r.updateRegistrations())}),e(2,`
1583          `),i(),e(3,`
1584        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("filter",!0)("maxSelectedLabels",1)("showToggleAll",!0)("selectedItemsLabel","{0} program types selected")}}function v0(o,d){if(o&1){let t=D();e(0,`
1585          `),n(1,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
1586          `),i(),e(3,`
1587        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected")}}function T0(o,d){if(o&1){let t=D();e(0,`
1588            `),n(1,"p-datepicker",18),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
1589            `),i(),e(3,`
1590          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.regFrom)}}function E0(o,d){if(o&1){let t=D();e(0,`
1591            `),n(1,"p-datepicker",19),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
1592            `),i(),e(3,`
1593          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.regTo)}}function w0(o,d){if(o&1){let t=D();e(0,`
1594            `),n(1,"p-datepicker",20,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
1595            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1596            `),n(7,"p-datepicker",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
1597            `),i(),e(9,`
1598          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function F0(o,d){if(o&1){let t=D();e(0,`
1599            `),n(1,"p-datepicker",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
1600            `),i(),e(3,`
1601            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1602            `),n(7,"p-datepicker",23),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
1603            `),i(),e(9,`
1604          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function D0(o,d){if(o&1){let t=D();e(0,`
1605          `),n(1,"p-multiSelect",24),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
1606          `),i(),e(3,`
1607        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}function I0(o,d){if(o&1){let t=D();e(0,`
1608          `),n(1,"p-multiSelect",25),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(2,`
1609          `),i(),e(3,`
1610        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected")}}function R0(o,d){if(o&1){let t=D();e(0,`
1611          `),n(1,"p-multiSelect",26),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(2,`
1612          `),i(),e(3,`
1613        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0}
1613 teams selected")}}function M0(o,d){if(o&1){let t=D();e(0,`
1614          `),n(1,"p-multiSelect",27),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.notInPrograms,r)||(a.filters.notInPrograms=r),h(r)}),e(2,`
1615          `),i(),e(3,`
1616        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.notInPrograms),m("options",t.notInPrograms)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.notInPrograms?"None":"Select club(s)")("selectedItemsLabel","{0} program(s) selected")}}function A0(o,d){if(o&1){let t=D();e(0,`
1617  `),n(1,"div",1),e(2,`
1618    `),_(3,y0,13,7),n(4,"div",2),e(5,`
1619      `),n(6,"div",3),e(7,`
1620        `),n(8,"label"),e(9,"Program Type"),i(),e(10,`
1621        `),_(11,b0,4,7),i(),e(12,`
1622    `),i(),e(13,`
1623    `),n(14,"div",4),e(15,`
1624      `),n(16,"div",3),e(17,`
1625        `),n(18,"label"),e(19,"Program"),i(),e(20,`
1626        `),_(21,v0,4,7),i(),e(22,`
1627    `),i(),e(23,`
1628    `),n(24,"div",5),e(25,`
1629      `),n(26,"div",3),e(27,`
1630        `),n(28,"label"),e(29,"Registration Date"),i(),e(30,`
1631        `),n(31,"span",6)(32,"p-inputgroup"),e(33,`
1632          `),_(34,T0,4,1),n(35,"p-inputgroup-addon"),e(36,"to"),i(),e(37,`
1633          `),_(38,E0,4,1),i(),e(39,`
1634          `),n(40,"a",7),T("click",function(){f(t);let r=p();return r.filters.regFrom=r.reportService.defaultDate,r.filters.regTo=void 0,h(r.updateRegistrations())}),e(41,`
1635            `),g(42,"i",8),e(43,`
1636          `),i(),e(44,`
1637        `),i(),e(45,`
1638      `),i(),e(46,`
1639    `),i(),e(47,`
1640    `),n(48,"div",2),e(49,`
1641      `),n(50,"div",3),e(51,`
1642        `),n(52,"label"),e(53,"Registration"),i(),e(54,`
1643        `),n(55,"p-multiSelect",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(56,`
1644        `),i(),e(57,`
1645      `),i(),e(58,`
1646    `),i(),e(59,`
1647    `),n(60,"div",10),e(61,`
1648      `),n(62,"div",3),e(63,`
1649        `),n(64,"label"),e(65,"Gender"),i(),e(66,`
1650        `),n(67,"p-select",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(68,`
1651      `),i(),e(69,`
1652    `),i(),e(70,`
1653    `),n(71,"div",5),e(72,`
1654      `),n(73,"div",12),e(74,`
1655        `),n(75,"label"),e(76,"Birth Date"),i(),e(77,`
1656        `),n(78,"p-select",13),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(79,`
1657        `),n(80,"span",6)(81,"p-inputgroup"),e(82,`
1658          `),_(83,w0,10,8)(84,F0,10,2),i(),e(85,`
1659          `),n(86,"a",7),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(87,`
1660            `),g(88,"i",8),e(89,`
1661          `),i(),e(90,`
1662        `),i(),e(91,`
1663      `),i(),e(92,`
1664    `),i(),e(93,`
1665    `),n(94,"div",2),e(95,`
1666      `),n(96,"div",3),e(97,`
1667        `),n(98,"label",14),e(99,"Grade"),i(),e(100,`
1668        `),_(101,D0,4,7),i(),e(102,`
1669    `),i(),e(103,`
1670    `),n(104,"div",10),e(105,`
1671      `),n(106,"div",3),e(107,`
1672        `),n(108,"label"),e(109,"Test Users/Players"),i(),e(110,`
1673        `),n(111,"p-select",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(112,`
1674        `),i(),e(113,`
1675      `),i(),e(114,`
1676    `),i(),e(115,`
1677    `),n(116,"div",2),e(117,`
1678      `),n(118,"div",3),e(119,`
1679        `),n(120,"label"),e(121,"Season"),i(),e(122,`
1680        `),_(123,I0,4,7),i(),e(124,`
1681    `),i(),e(125,`
1682    `),n(126,"div",2),e(127,`
1683      `),n(128,"div",3),e(129,`
1684        `),n(130,"label"),e(131,"Team"),i(),e(132,`
1685        `),_(133,R0,4,7),i(),e(134,`
1686    `),i(),e(135,`
1687    `),n(136,"div",4),e(137,`
1688      `),n(138,"div",3),e(139,`
1689        `),n(140,"label"),e(141,"Not In Program"),i(),e(142,`
1690        `),_(143,M0,4,8),i(),e(144,`
1691    `),i(),e(145,`
1692    `),n(146,"div",4),e(147,`
1693      `),n(148,"div",3),e(149,`
1694        `),n(150,"label"),e(151,"Selected Fields"),i(),e(152,`
1695        `),n(153,"p-multiSelect",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.selectedFields,r)||(a.filters.selectedFields=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onSelectedFieldChange())}),e(154,`
1696        `),i(),e(155,`
1697      `),i(),e(156,`
1698    `),i(),e(157,`
1699  `),i(),e(158,`
1700`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.programTypes?11:-1),s(10),x(t.programs?21:-1),s(13),x(t.filters?34
1700:-1),s(4),x(t.filters?38:-1),s(17),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected"),s(12),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?83:84),s(18),x(t.grades?101:-1),s(10),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(12),x(t.seasons?123:-1),s(10),x(t.teams?133:-1),s(10),x(t.notInPrograms?143:-1),s(10),m("autofocusFilter",!0),C("ngModel",t.filters.selectedFields),m("dataKey","field")("options",t.allAvailableFields)("filter",!0)("maxSelectedLabels",1)("showToggleAll",!0)("selectedItemsLabel","{0} fields(s) selected")}}var Vo=(()=>{let d=class d{constructor(l,r,a,b,u){this.siteDataService=l,this.reportService=r,this.registrationService=a,this.teamService=b,this.sharedPlayerService=u,this.notInPrograms=[],this.minBirthYear=Ie,this.maxBirthYear=Re,this.testUserOptions=le,this.genderOptions=Ae}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(),this.siteDataService.getClubSettings(),this.siteDataService.getClubFieldOptions(),this.sharedPlayerService.getGrades()]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.club=l[3].club,this.clubFieldOptions=l[4],this.grades=l[5],this.clubFieldOptions=l[4],this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS]===void 0&&(this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS]=new P,this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS].programTypes=this.programTypes.filter(r=>r.value!==Ne.OTHER),this.filterAvailableColumns()),this.filters=this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS],this.filterPrograms(),this.updateRegistrations(),this.getTeams(),console.log("state: ",this.reportService.state),this.reportService.state&&(this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(r=>r.clubID===this.reportService.state.clubID)]),this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(r=>this.reportService.state.programs.includes(r.programID)):this.filters.programs=void 0,this.reportService.state.seasons?this.filters.seasons=this.seasons.filter(r=>this.reportService.state.seasons.includes(r.value)):this.filters.seasons=void 0,this.reportService.state.grades?this.filters.grades=this.grades.filter(r=>this.reportService.state.grades.includes(r.value)):this.filters.grades=void 0,this.filters.regFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.regTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.showReportData=!0,this.reportService.state=void 0,this.filterAvailableColumns())}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS],this.filterAvailableColumns()})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters),this.notInPrograms=this.reportService.setProgramsDisplayName(this.filters)}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}addFieldOptionedField(l,r,a,b=!0,u=void 0){let L=this.clubFieldOptions.find(he=>he.fieldOptionID===r);L!==void 0&&l.push({notSortable:!b,field:a,header:u||L.fieldName})}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>
1700{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name})}):this.teams=void 0}getAvailableFields(){let l=[{field:"programName",header:"Program"},{field:"userName",header:"User Name"},{field:"email",header:"Email"},{field:"cellPhone",header:"Phone Number"},{field:"playerName",header:"Player Name"}];return this.addFieldOptionedField(l,O.DATE_OF_BIRTH,"dob"),this.addFieldOptionedField(l,O.GENDER,"gender"),l.push({field:"listPrice",header:"Program List Price"}),l.push({field:"discount",header:"Discount Percent"}),l.push({field:"price",header:"Program Fee"}),l.push({field:"createdDate",header:"Registration Start Date"}),this.additionalFields=[],this.addFieldOptionedField(this.additionalFields,O.TSHIRT_SIZE,"playerTShirtSize",!1),this.addFieldOptionedField(this.additionalFields,O.HOW_DID_YOU_HEAR_ABOUT_US,"referralOption",!1),this.addFieldOptionedField(this.additionalFields,O.HOW_DID_YOU_HEAR_ABOUT_US_FOLLOW_UP,"referralOptionFollowUp",!1),this.addFieldOptionedField(this.additionalFields,O.ARE_YOU_A_GOALKEEPER,"isGoalkeeper",!1),this.addFieldOptionedField(this.additionalFields,O.GOALKEEPER_STATUS,"goalkeeperStatus",!1),this.addFieldOptionedField(this.additionalFields,O.GRADE,"playerGrade",!1),this.addFieldOptionedField(this.additionalFields,O.LAST_YEAR_TEAM,"previousClub",!1),this.addFieldOptionedField(this.additionalFields,O.SCHOOL,"schoolName",!1),this.addFieldOptionedField(this.additionalFields,O.SCHOOL_TEAM_LEVEL,"schoolTeamLevel",!1),this.addFieldOptionedField(this.additionalFields,O.DO_YOU_PLAY_FOR_YOUR_SCHOOL,"playsForSchool",!1),this.addFieldOptionedField(this.additionalFields,O.PREFERRED_JERSEY_NUMBER,"preferredNumber",!1),this.addFieldOptionedField(this.additionalFields,O.PREFERRED_JERSEY_NUMBER_2,"preferredNumber2",!1),this.addFieldOptionedField(this.additionalFields,O.PREFERRED_JERSEY_NUMBER_3,"preferredNumber3",!1),this.addFieldOptionedField(this.additionalFields,O.JERSEY_NUMBER,"number",!1),this.addFieldOptionedField(this.additionalFields,O.TRYOUT_JERSEY_NUMBER,"tryoutNumber",!1),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_POSITION,"position",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_POSITION,"secondaryPosition",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_PREFERRED_PRIMARY_POSITION,"preferredPosition",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_PREFERRED_SECONDARY_POSITION,"preferredSecondaryPosition",!1),this.addFieldOptionedField(this.additionalFields,O.INTERESTED_IN_ASSISTANT_REFEREE_PROGRAM,"interestedInRefereeProgram",!1),this.addFieldOptionedField(this.additionalFields,O.CERTIFIED_AS_ASSISTANT_REFEREE,"certifiedAsReferee",!1),this.addFieldOptionedField(this.additionalFields,O.NAMES_OF_FRIENDS_OF_PLAYER_IN_CLUB,"namesOfFriends",!1),this.addFieldOptionedField(this.additionalFields,O.FRIEND_GROUP_REQUEST,"friendGroup",!1),this.addFieldOptionedField(this.additionalFields,O.COACH_REQUEST,"coachRequest",!1),this.addFieldOptionedField(this.additionalFields,O.WHICH_HIGH_SCHOOL_TEAM,"highSchoolLevelID",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYED_WITH_OUR_CLUB_LAST_YEAR,"playedWithUsLastYear",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYED_WITH_OUR_CLUB_LAST_YEAR_FOLLOW_UP,"playedWithUsLastYearFollowUp",!1),this.addFieldOptionedField(this.additionalFields,O.TYPE_OF_SOCCER_PLAYED_THIS_PAST_YEAR,"levelID",!1),this.addFieldOptionedField(this.additionalFields,O.ADDITIONAL_COMMENTS,"comments",!1),this.addFieldOptionedField(this.additionalFields,O.ROOMMATE_PREFERENCES,"roommatePreferences",!1),this.addFieldOptionedField(this.additionalFields,O.PLAY_OTHER_SPORTS,"playOtherSports",!1),this.addFieldOptionedField(this.additionalFields,O.WHICH_SPORTS_AND_WHAT_MONTHS_OUT_OF_THE_YEAR,"otherSports",!1),this.addFieldOptionedField(this.additionalFields,O.EXPECTED_HIGH_SCHOOL_GRADUATION_YEAR,"graduationYear",!1),this.addFieldOptionedField(this.additionalFields,O.PRIOR_PLAYING_EXPERIENCE,"playingExperience",!1),this.addFieldOptionedField(this.additionalFields,O.PRIOR_PLAYING_EXPERIENCE_FOLLOW_UP,"playingExperienceFollowUp",!1),this.addFieldOptionedField(this.additionalFields,O.YEARS_OF_EXPERIENCE,"experienceYears",!1),this.addFieldOptionedField(this.additionalFields,O.COLLEGE_GRADUATION_YEAR,"collegeGraduationYear",!1),this.addFieldOptionedField(this.additionalFields,O.COLLEGE_ATTENDED,"collegeAttended",!1),this.addFieldOptionedField(this.additionalFields,O.TRAPP
1700ED_8TH_GRADER,"trappedPlayerStatus",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_CARD_ID,"playerCardID",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_CARD_ID_2,"playerCardID2",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_CARD_ID_3,"playerCardID3",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_CARD_ID_4,"playerCardID4",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_CARD_ID_5,"playerCardID5",!1),this.addFieldOptionedField(this.additionalFields,O.PLAYER_ADDRESS,"playerAddressLine1",!1,"Player Address Line 1"),this.addFieldOptionedField(this.additionalFields,O.PLAYER_ADDRESS,"playerAddressLine2",!1,"Player Address Line 2"),this.addFieldOptionedField(this.additionalFields,O.PLAYER_ADDRESS,"playerCity",!1,"Player City"),this.addFieldOptionedField(this.additionalFields,O.PLAYER_ADDRESS,"playerState",!1,"Player State"),this.addFieldOptionedField(this.additionalFields,O.PLAYER_ADDRESS,"playerZip",!1,"Player Zip"),this.additionalFields.push({notSortable:!0,field:"userAddressLine1",header:"User Address Line 1"}),this.additionalFields.push({notSortable:!0,field:"userAddressLine2",header:"User Address Line 2"}),this.additionalFields.push({notSortable:!0,field:"userCity",header:"User City"}),this.additionalFields.push({notSortable:!0,field:"userState",header:"User State"}),this.additionalFields.push({notSortable:!0,field:"userZip",header:"User Zip"}),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_1,"customBitField1",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_2,"customBitField2",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_3,"customBitField3",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_4,"customBitField4",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_5,"customBitField5",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_6,"customBitField6",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_7,"customBitField7",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_8,"customBitField8",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_9,"customBitField9",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_BIT_FIELD_10,"customBitField10",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_1,"customTextField1",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_2,"customTextField2",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_3,"customTextField3",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_4,"customTextField4",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_5,"customTextField5",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_6,"customTextField6",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_7,"customTextField7",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_8,"customTextField8",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_9,"customTextField9",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_TEXT_FIELD_10,"customTextField10",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_1,"customDropdownField1",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_2,"customDropdownField2",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_3,"customDropdownField3",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_4,"customDropdownField4",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_5,"customDropdownField5",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_6,"customDropdownField6",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_7,"customDropdownField7",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_8,"customDropdownField8",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_9,"customDropdownField9",!1),this.addFieldOptionedField(this.additionalFields,O.CUSTOM_DROPDOWN_FIELD_10,"customDropdownField10",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_1,"gearField1",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_2,"gearField2",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_3,"gearField3",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_4,"gearField4",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_5,"gearField5",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_6,"gearField6",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_7,"gearField7",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_8,"gearField8",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_9,"gearField9",!1),this.addFieldOptionedField(this.additionalFields,O.GEAR_FIELD_10,"gearField10",!1),this.club.sportID===Rt.HOCKEY&&(this.additionalFields=[{notSortable:!0,field:"usaHockeyNumber",header:"USA Hockey Number"},...this.additionalFields]),this.club.sportID===Rt.LACROSSE&&(this.additionalFields=[{notSortable:!0,field:"usaLacrosseNumber",header:"USA Lacrosse Number"},...this.additionalFields]),this.club.enableTeamSnap&&(this.additionalFields=[{notSortable:!0,field:"teamSnapUserID",header:"Team Snap User ID"},...this.additionalFields]),l=[...l,...this.additionalFields],l}filterAvailableColumns(){let l=this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS];l.selectedFields=this.allAvailableFields.filter(r=>!this.additionalFields.some(a=>a.field===r.field))}onSelectedFieldChange(){this.filters.selectedFields.sort((l,r)=>this.allAvailableFields.findIndex(a=>a.field===l.field)-this.allAvailableFields.findIndex(a=>a.field===r.field))}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(Se),w(ve),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-incomplete-registration-detail
1700s-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],[1,"col-md-5","col-lg-3"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],["for","credit-budgeting-grade-filter"],["optionLabel","header","placeholder","None","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","dataKey","options","filter","maxSelectedLabels","showToggleAll","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","maxSelectedLabels","showToggleAll","selectedItemsLabel"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["placeholder","All","optionLabel","label","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","name","placeholder","None","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,A0,159,31),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
1700)();var O0=o=>["/admin/players",o,"overview"];function L0(o,d){if(o&1&&(e(0,`
1701            `),n(1,"th"),e(2),i(),e(3,`
1702          `)),o&2){let t=p().$implicit;s(2),I(`
1703              `,t.header,`
1704            `)}}function N0(o,d){if(o&1&&(e(0,`
1705            `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
1706            `),i(),e(5,`
1707          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
1708              `,t.header,`
1709              `),s(),m("field",t.field)}}function V0(o,d){if(o&1&&(e(0,`
1710          `),_(1,L0,4,1)(2,N0,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function k0(o,d){if(o&1&&(e(0,`
1711              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
1712            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalListPrice))}}function B0(o,d){if(o&1&&(e(0,`
1713              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
1714            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalPrice))}}function W0(o,d){if(o&1&&(e(0,`
1715              `),n(1,"td"),e(2),i(),e(3,`
1716            `)),o&2){let t=p().$index,l=p(2);s(2),I(" ",t===0?"Total Records: "+(l.totalRecords||0):"")}}function U0(o,d){if(o&1&&(e(0,`
1717          `),_(1,k0,5,3)(2,B0,5,3)(3,W0,4,1),e(4,`
1718        `)),o&2){let t,l=d.$implicit;s(),x((t=l.field)==="listPrice"?1:t==="price"?2:3)}}function Y0(o,d){if(o&1&&(e(0,`
1719      `),n(1,"tr"),e(2,`
1720        `),N(3,V0,3,1,null,null,W),i(),e(5,`
1721      `),n(6,"tr",5),e(7,`
1722        `),N(8,U0,5,1,null,null,W),i(),e(10,`
1723    `)),o&2){let t=p();s(3),V(t.columns),s(5),V(t.columns)}}function G0(o,d){if(o&1&&(e(0,`
1724          `),n(1,"td"),e(2),i(),e(3,`
1725        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function j0(o,d){if(o&1&&(e(0,`
1726          `),n(1,"td"),e(2),i(),e(3,`
1727        `)),o&2){let t=p().$implicit;s(2),c(t.programName)}}function H0(o,d){if(o&1&&(e(0,`
1728          `),n(1,"td"),e(2),i(),e(3,`
1729        `)),o&2){let t=p().$implicit;s(2),c(t.userName)}}function z0(o,d){if(o&1&&(e(0,`
1730          `),n(1,"td"),e(2),i(),e(3,`
1731        `)),o&2){let t=p().$implicit;s(2),c(t.email)}}function q0(o,d){if(o&1&&(e(0,`
1732          `),n(1,"td"),e(2),i(),e(3,`
1733        `)),o&2){let t=p().$implicit;s(2),c(t.cellPhone)}}function $0(o,d){if(o&1&&(e(0,`
1734              `),n(1,"a",8),e(2),i(),e(3,`
1735            `)),o&2){let t=p(2).$implicit;s(),m("routerLink",re(2,O0,t.playerID)),s(),c(t.playerName)}}function K0(o,d){if(o&1&&e(0),o&2){let t=p(2).$implicit;I(`
1736              `,t.playerName,`
1737            `)}}function J0(o,d){if(o&1&&(e(0,`
1738          `),n(1,"td"),e(2,`
1739            `),_(3,$0,4,4)(4,K0,1,1),i(),e(5,`
1740        `)),o&2){let t=p(2);s(3),x(t.reportService.profile[t.Permission.Profile]?3:4)}}function X0(o,d){if(o&1&&(e(0,`
1741          `),n(1,"td"),e(2),v(3,"date"),i(),e(4,`
1742        `)),o&2){let t=p().$implicit;s(2),c(B(3,1,t.dob,"M/d/y"))}}function Z0(o,d){if(o&1&&(e(0,`
1743          `),n(1,"td"),e(2),i(),e(3,`
1744        `)),o&2){let t=p().$implicit;s(2),c(t.grade)}}function Q0(o,d){if(o&1&&(e(0,`
1745          `),n(1,"td"),e(2),i(),e(3,`
1746        `)),o&2){let t=p().$implicit;s(2),c(t.gender)}}function ed(o,d){if(o&1&&(e(0,`
1747          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
1748        `)),o&2){let t=p().$implicit;s(2),c(E(3,1,t.listPrice))}}function td(o,d){if(o&1&&(e(0,`
1749          `),n(1,"td"),e(2),v(3,"number"),i(),e(4,`
1750        `)),o&2){let t=p().$implicit;s(2),c(t.discount?B(3,1,t.discount,"1.0-2")+"%":"")}}function id(o,d){if(o&1&&(e(0,`
1751          `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
1752        `)),o&2){let t=p().$implicit;s(2),c(E(3,1,t.price))}}function nd(o,d){if(o&1&&(e(0,`
1753          `),n(1,"td"),e(2),v(3,"utcDate"),i(),e(4,`
1754        `)),o&2){let t=p().$implicit;s(2),c(B(3,1,t.createdDate,"M/d/y"))}}function od(o,d){if(o&1&&(e(0,`
1755          `),n(1,"td"),e(2),i(),e(3,`
1756        `)),o&2){let t=p().$implicit;s(2),c(t.teamSnapUserID)}}function rd(o,d){if(o&1&&(e(0,`
1757          `),n(1,"td"),e(2),i(),e(3,`
1758        `)),o&2){let t=p().$implicit;s(2),c(t.usaHockeyNumber)}}function ad(o,d){if(o&1&&(e(0,`
1759          `),n(1,"td"),e(2),i(),e(3,`
1760        `)),o&2){let t=p().$implicit;s(2),c(t.playerTShirtSize)}}function ld(o,d){if(o&1&&(e(0,`
1761          `),n(1,"td"),e(2),i(),e(3,`
1762        `)),o&2){let t=p().$implicit;s(2),c(t.referralOption)}}function sd(o,d){if(o&1&&(e(0,`
1763          `),n(1,"td"),e(2),i(),e(3,`
1764        `)),o&2){let t=p().$implicit;s(2),c(t.referralOptionFollowUp)}}function dd(o,d){if(o&1&&(e(0,`
1765          `),n(1,"td"),e(2),i(),e(3,`
1766        `)),o&2){let t=p().$implicit;s(2),c(t.isGoalkeeper?"Yes":"")}}function pd(o,d){if(o&1&&(e(0,`
1767          `),n(1,"td"),e(2),i(),e(3,`
1768        `)),o&2){let t=p().$implicit;s(2),c(t.goalkeeperStatus)}}function md(o,d){if(o&1&&(e(0,`
1769          `),n(1,"td"),e(2),i(),e(3,`
1770        `)),o&2){let t=p().$implicit;s(2),c(t.playerGrade)}}function cd(o,d){if(o&1&&(e(0,`
1771          `),n(1,"td"),e(2),i(),e(3,`
1772        `)),o&2){let t=p().$implicit;s(2),c(t.previousClub)}}function ud(o,d){if(o&1&&(e(0,`
1773          `),n(1,"td"),e(2),i(),e(3,`
1774        `)),o&2){let t=p().$implicit;s(2),c(t.schoolName)}}function _d(o,d){if(o&1&&(e(0,`
1775          `),n(1,"td"),e(2),i(),e(3,`
1776        `)),o&2){let t=p().$implicit;s(2),c(t.schoolTeamLevel)}}function xd(o,d){if(o&1&&(e(0,`
1777          `),n(1,"td"),e(2),i(),e(3,`
1778        `)),o&2){let t=p().$implicit;s(2),c(t.playsForSchool!==null?t.playsForSchool===!0?"Yes":"No":"")}}function gd(o,d){if(o&1&&(e(0,`
1779          `),n(1,"td"),e(2),i(),e(3,`
1780        `)),o&2){let t=p().$implicit;s(2),c(t.preferredNumber)}}function fd(o,d){if(o&1&&(e(0,`
1781          `),n(1,"td"),e(2),i(),e(3,`
1782        `)),o&2){let t=p().$implicit;s(2),c(t.preferredNumber2)}}function hd(o,d){if(o&1&&(e(0,`
1783          `),n(1,"td"),e(2),i(),e(3,`
1784        `)),o&2){let t=p().$implicit;s(2),c(t.preferredNumber3)}}function Cd(o,d){if(o&1&&(e(0,`
1785          `),n(1,"td"),e(2),i(),e(3,`
1786        `)),o&2){let t=p().$implicit;s(2),c(t.number)}}function Sd(o,d){if(o&1&&(e(0,`
1787          `),n(1,"td"),e(2),i(),e(3,`
1788        `)),o&2){let t=p().$implicit;s(2),c(t.tryoutNumber)}}function yd(o,d){if(o&1&&(e(0,`
1789          `),n(1,"td"),e(2),i(),e(3,`
1790        `)),o&2){let t=p().$implicit;s(2),c(t.position)}}function bd(o,d){if(o&1&&(e(0,`
1791          `),n(1,"td"),e(2),i(),e(3,`
1792        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryPosition)}}function vd(o,d){if(o&1&&(e(0,`
1793          `),n(1,"td"),e(2),i(),e(3,`
1794        `)),o&2){let t=p().$implicit;s(2),c(t.preferredPosition)}}function Td(o,d){if(o&1&&(e(0,`
1795          `),n(1,"td"),e(2),i(),e(3,`
1796        `)),o&2){let t=p().$implicit;s(2),c(t.preferredSecondaryPosition)}}function Ed(o,d){if(o&1&&(e(0,`
1797          `),n(1,"td"),e(2),i(),e(3,`
1798        `)),o&2){let t=p().$implicit;s(2),c(t.interestedInRefereeProgram!==null?t.interestedInRefereeProgram===!0?"Yes":"No":"")}}function wd(o,d){if(o&1&&(e(0,`
1799          `),n(1,"td"),e(2),i(),e(3,`
1800        `)),o&2){let t=p().$implicit;s(2),c(t.certifiedAsReferee!==null?t.certifiedAsReferee===!0?"Yes":"No":"")}}function Fd(o,d){if(o&1&&(e(0,`
1801          `),n(1,"td"),e(2),i(),e(3,`
1802        `)),o&2){let t=p().$implicit;s(2),c(t.namesOfFriends)}}function Dd(o,d){if(o&1&&(e(0,`
1803          `),n(1,"td"),e(2),i(),e(3,`
1804        `)),o&2){let t=p().$implicit;s(2),c(t.friendGroup)}}function Id(o,d){if(o&1&&(e(0,`
1805          `),n(1,"td"),e(2),i(),e(3,`
1806        `)),o&2){let t=p().$implicit;s(2),c(t.coachRequest)}}function Rd(o,d){if(o&1&&(e(0,`
1807          `),n(1,"td"),e(2),i(),e(3,`
1808        `)),o&2){let t=p().$implicit;s(2),c(t.highSchoolLevelID)}}function Md(o,d){if(o&1&&(e(0,`
1809          `),n(1,"td"),e(2),i(),e(3,`
1810        `)),o&2){let t=p().$implicit;s(2),c(t.playedWithUsLastYear!==null?t.playedWithUsLastYear===!0?"Yes":"No":"")}}function Ad(o,d){if(o&1&&(e(0,`
1811          `),n(1,"td"),e(2),i(),e(3,`
1812        `)),o&2){let t=p().$implicit;s(2),c(t.playedWithUsLastYearFollowUp)}}function Pd(o,d){if(o&1&&(e(0,`
1813          `),n(1,"td"),e(2),i(),e(3,`
1814        `)),o&2){let t=p().$implicit;s(2),c(t.levelID)}}function Od(o,d){if(o&1&&(e(0,`
1815          `),n(1,"td"),e(2),i(),e(3,`
1816        `)),o&2){let t=p().$implicit;s(2),c(t.comments)}}function Ld(o,d){if(o&1&&(e(0,`
1817          `),n(1,"td"),e(2),i(),e(3,`
1818        `)),o&2){let t=p().$implicit;s(2),c(t.roommatePreferences)}}function Nd(o,d){if(o&1&&(e(0,`
1819          `),n(1,"td"),e(2),i(),e(3,`
1820        `)),o&2){let t=p().$implicit;s(2),c(t.playOtherSports!==null?t.playOtherSports===!0?"Yes":"No":"")}}function Vd(o,d){if(o&1&&(e(0,`
1821          `),n(1,"td"),e(2),i(),e(3,`
1822        `)),o&2){let t=p().$implicit;s(2),c(t.otherSports)}}function kd(o,d){if(o&1&&(e(0,`
1823          `),n(1,"td"),e(2),i(),e(3,`
1824        `)),o&2){let t=p().$implicit;s(2),c(t.graduationYear)}}function Bd(o,d){if(o&1&&(e(0,`
1825          `),n(1,"td"),e(2),i(),e(3,`
1826        `)),o&2){let t=p().$implicit;s(2),c(t.playingExperience)}}function Wd(o,d){if(o&1&&(e(0,`
1827          `),n(1,"td"),e(2),i(),e(3,`
1828        `)),o&2){let t=p().$implicit;s(2),c(t.playingExperienceFollowUp)}}function Ud(o,d){if(o&1&&(e(0,`
1829          `),n(1,"td"),e(2),i(),e(3,`
1830        `)),o&2){let t=p().$implicit;s(2),c(t.experienceYears)}}function Yd(o,d){if(o&1&&(e(0,`
1831          `),n(1,"td"),e(2),i(),e(3,`
1832        `)),o&2){let t=p().$implicit;s(2),c(t.collegeGraduationYear)}}function Gd(o,d){if(o&1&&(e(0,`
1833          `),n(1,"td"),e(2),i(),e(3,`
1834        `)),o&2){let t=p().$implicit;s(2),c(t.collegeAttended)}}
1834function jd(o,d){if(o&1&&(e(0,`
1835          `),n(1,"td"),e(2),i(),e(3,`
1836        `)),o&2){let t=p().$implicit;s(2),c(t.trappedPlayerStatus)}}function Hd(o,d){if(o&1&&(e(0,`
1837          `),n(1,"td"),e(2),i(),e(3,`
1838        `)),o&2){let t=p().$implicit;s(2),c(t.playerCardID)}}function zd(o,d){if(o&1&&(e(0,`
1839          `),n(1,"td"),e(2),i(),e(3,`
1840        `)),o&2){let t=p().$implicit;s(2),c(t.playerCardID2)}}function qd(o,d){if(o&1&&(e(0,`
1841          `),n(1,"td"),e(2),i(),e(3,`
1842        `)),o&2){let t=p().$implicit;s(2),c(t.playerCardID3)}}function $d(o,d){if(o&1&&(e(0,`
1843          `),n(1,"td"),e(2),i(),e(3,`
1844        `)),o&2){let t=p().$implicit;s(2),c(t.playerCardID4)}}function Kd(o,d){if(o&1&&(e(0,`
1845          `),n(1,"td"),e(2),i(),e(3,`
1846        `)),o&2){let t=p().$implicit;s(2),c(t.playerCardID5)}}function Jd(o,d){if(o&1&&(e(0,`
1847          `),n(1,"td"),e(2),i(),e(3,`
1848        `)),o&2){let t=p().$implicit;s(2),c(t.playerAddressLine1)}}function Xd(o,d){if(o&1&&(e(0,`
1849          `),n(1,"td"),e(2),i(),e(3,`
1850        `)),o&2){let t=p().$implicit;s(2),c(t.playerAddressLine2)}}function Zd(o,d){if(o&1&&(e(0,`
1851          `),n(1,"td"),e(2),i(),e(3,`
1852        `)),o&2){let t=p().$implicit;s(2),c(t.playerCity)}}function Qd(o,d){if(o&1&&(e(0,`
1853          `),n(1,"td"),e(2),i(),e(3,`
1854        `)),o&2){let t=p().$implicit;s(2),c(t.playerState)}}function ep(o,d){if(o&1&&(e(0,`
1855          `),n(1,"td"),e(2),i(),e(3,`
1856        `)),o&2){let t=p().$implicit;s(2),c(t.playerZip)}}function tp(o,d){if(o&1&&(e(0,`
1857          `),n(1,"td"),e(2),i(),e(3,`
1858        `)),o&2){let t=p().$implicit;s(2),c(t.userAddressLine1)}}function ip(o,d){if(o&1&&(e(0,`
1859          `),n(1,"td"),e(2),i(),e(3,`
1860        `)),o&2){let t=p().$implicit;s(2),c(t.userAddressLine2)}}function np(o,d){if(o&1&&(e(0,`
1861          `),n(1,"td"),e(2),i(),e(3,`
1862        `)),o&2){let t=p().$implicit;s(2),c(t.userCity)}}function op(o,d){if(o&1&&(e(0,`
1863          `),n(1,"td"),e(2),i(),e(3,`
1864        `)),o&2){let t=p().$implicit;s(2),c(t.userState)}}function rp(o,d){if(o&1&&(e(0,`
1865          `),n(1,"td"),e(2),i(),e(3,`
1866        `)),o&2){let t=p().$implicit;s(2),c(t.userZip)}}function ap(o,d){if(o&1&&(e(0,`
1867          `),n(1,"td"),e(2),i(),e(3,`
1868        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField1?"Yes":"")}}function lp(o,d){if(o&1&&(e(0,`
1869          `),n(1,"td"),e(2),i(),e(3,`
1870        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField2?"Yes":"")}}function sp(o,d){if(o&1&&(e(0,`
1871          `),n(1,"td"),e(2),i(),e(3,`
1872        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField3?"Yes":"")}}function dp(o,d){if(o&1&&(e(0,`
1873          `),n(1,"td"),e(2),i(),e(3,`
1874        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField4?"Yes":"")}}function pp(o,d){if(o&1&&(e(0,`
1875          `),n(1,"td"),e(2),i(),e(3,`
1876        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField5?"Yes":"")}}function mp(o,d){if(o&1&&(e(0,`
1877          `),n(1,"td"),e(2),i(),e(3,`
1878        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField6?"Yes":"")}}function cp(o,d){if(o&1&&(e(0,`
1879          `),n(1,"td"),e(2),i(),e(3,`
1880        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField7?"Yes":"")}}function up(o,d){if(o&1&&(e(0,`
1881          `),n(1,"td"),e(2),i(),e(3,`
1882        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField8?"Yes":"")}}function _p(o,d){if(o&1&&(e(0,`
1883          `),n(1,"td"),e(2),i(),e(3,`
1884        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField9?"Yes":"")}}function xp(o,d){if(o&1&&(e(0,`
1885          `),n(1,"td"),e(2),i(),e(3,`
1886        `)),o&2){let t=p().$implicit;s(2),c(t.customBitField10?"Yes":"")}}function gp(o,d){if(o&1&&(e(0,`
1887          `),n(1,"td"),e(2),i(),e(3,`
1888        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField1)}}function fp(o,d){if(o&1&&(e(0,`
1889          `),n(1,"td"),e(2),i(),e(3,`
1890        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField2)}}function hp(o,d){if(o&1&&(e(0,`
1891          `),n(1,"td"),e(2),i(),e(3,`
1892        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField3)}}function Cp(o,d){if(o&1&&(e(0,`
1893          `),n(1,"td"),e(2),i(),e(3,`
1894        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField4)}}function Sp(o,d){if(o&1&&(e(0,`
1895          `),n(1,"td"),e(2),i(),e(3,`
1896        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField5)}}function yp(o,d){if(o&1&&(e(0,`
1897          `),n(1,"td"),e(2),i(),e(3,`
1898        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField6)}}function bp(o,d){if(o&1&&(e(0,`
1899          `),n(1,"td"),e(2),i(),e(3,`
1900        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField7)}}function vp(o,d){if(o&1&&(e(0,`
1901          `),n(1,"td"),e(2),i(),e(3,`
1902        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField8)}}function Tp(o,d){if(o&1&&(e(0,`
1903          `),n(1,"td"),e(2),i(),e(3,`
1904        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField9)}}function Ep(o,d){if(o&1&&(e(0,`
1905          `),n(1,"td"),e(2),i(),e(3,`
1906        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField10)}}function wp(o,d){if(o&1&&(e(0,`
1907          `),n(1,"td"),e(2),i(),e(3,`
1908        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField1)}}function Fp(o,d){if(o&1&&(e(0,`
1909          `),n(1,"td"),e(2),i(),e(3,`
1910        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField2)}}function Dp(o,d){if(o&1&&(e(0,`
1911          `),n(1,"td"),e(2),i(),e(3,`
1912        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField3)}}function Ip(o,d){if(o&1&&(e(0,`
1913          `),n(1,"td"),e(2),i(),e(3,`
1914        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField4)}}function Rp(o,d){if(o&1&&(e(0,`
1915          `),n(1,"td"),e(2),i(),e(3,`
1916        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField5)}}function Mp(o,d){if(o&1&&(e(0,`
1917          `),n(1,"td"),e(2),i(),e(3,`
1918        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField6)}}function Ap(o,d){if(o&1&&(e(0,`
1919          `),n(1,"td"),e(2),i(),e(3,`
1920        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField7)}}function Pp(o,d){if(o&1&&(e(0,`
1921          `),n(1,"td"),e(2),i(),e(3,`
1922        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField8)}}function Op(o,d){if(o&1&&(e(0,`
1923          `),n(1,"td"),e(2),i(),e(3,`
1924        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField9)}}function Lp(o,d){if(o&1&&(e(0,`
1925          `),n(1,"td"),e(2),i(),e(3,`
1926        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField10)}}function Np(o,d){if(o&1&&(e(0,`
1927          `),n(1,"td"),e(2),i(),e(3,`
1928        `)),o&2){let t=p().$implicit;s(2),c(t.gearField1)}}function Vp(o,d){if(o&1&&(e(0,`
1929          `),n(1,"td"),e(2),i(),e(3,`
1930        `)),o&2){let t=p().$implicit;s(2),c(t.gearField2)}}function kp(o,d){if(o&1&&(e(0,`
1931          `),n(1,"td"),e(2),i(),e(3,`
1932        `)),o&2){let t=p().$implicit;s(2),c(t.gearField3)}}function Bp(o,d){if(o&1&&(e(0,`
1933          `),n(1,"td"),e(2),i(),e(3,`
1934        `)),o&2){let t=p().$implicit;s(2),c(t.gearField4)}}function Wp(o,d){if(o&1&&(e(0,`
1935          `),n(1,"td"),e(2),i(),e(3,`
1936        `)),o&2){let t=p().$implicit;s(2),c(t.gearField5)}}function Up(o,d){if(o&1&&(e(0,`
1937          `),n(1,"td"),e(2),i(),e(3,`
1938        `)),o&2){let t=p().$implicit;s(2),c(t.gearField6)}}function Yp(o,d){if(o&1&&(e(0,`
1939          `),n(1,"td"),e(2),i(),e(3,`
1940        `)),o&2){let t=p().$implicit;s(2),c(t.gearField7)}}function Gp(o,d){if(o&1&&(e(0,`
1941          `),n(1,"td"),e(2),i(),e(3,`
1942        `)),o&2){let t=p().$implicit;s(2),c(t.gearField8)}}function jp(o,d){if(o&1&&(e(0,`
1943          `),n(1,"td"),e(2),i(),e(3,`
1944        `)),o&2){let t=p().$implicit;s(2),c(t.gearField9)}}function Hp(o,d){if(o&1&&(e(0,`
1945          `),n(1,"td"),e(2),i(),e(3,`
1946        `)),o&2){let t=p().$implicit;s(2),c(t.gearField10)}}function zp(o,d){if(o&1&&(e(0,`
1947      `),n(1,"tr"),e(2,`
1948        `),_(3,G0,4,1),_(4,j0,4,1),_(5,H0,4,1),_(6,z0,4,1),_(7,q0,4,1),_(8,J0,6,1),_(9,X0,5,4),_(10,Z0,4,1),_(11,Q0,4,1),_(12,ed,5,3),_(13,td,5,4),_(14,id,5,3),_(15,nd,5,4),_(16,od,4,1),_(17,rd,4,1),_(18,ad,4,1),_(19,ld,4,1),_(20,sd,4,1),_(21,dd,4,1),_(22,pd,4,1),_(23,md,4,1),_(24,cd,4,1),_(25,ud,4,1),_(26,_d,4,1),_(27,xd,4,1),_(28,gd,4,1),_(29,fd,4,1),_(30,hd,4,1),_(31,Cd,4,1),_(32,Sd,4,1),_(33,yd,4,1),_(34,bd,4,1),_(35,vd,4,1),_(36,Td,4,1),_(37,Ed,4,1),_(38,wd,4,1),_(39,Fd,4,1),_(40,Dd,4,1),_(41,Id,4,1),_(42,Rd,4,1),_(43,Md,4,1),_(44,Ad,4,1),_(45,Pd,4,1),_(46,Od,4,1),_(47,Ld,4,1),_(48,Nd,4,1),_(49,Vd,4,1),_(50,kd,4,1),_(51,Bd,4,1),_(52,Wd,4,1),_(53,Ud,4,1),_(54,Yd,4,1),_(55,Gd,4,1),_(56,jd,4,1),_(57,Hd,4,1),_(58,zd,4,1),_(59,qd,4,1),_(60,$d,4,1),_(61,Kd,4,1),_(62,Jd,4,1),_(63,Xd,4,1),_(64,Zd,4,1),_(65,Qd,4,1),_(66,ep,4,1),_(67,tp,4,1),_(68,ip,4,1),_(69,np,4,1),_(70,op,4,1),_(71,rp,4,1),_(72,ap,4,1),_(73,lp,4,1),_(74,sp,4,1),_(75,dp,4,1),_(76,pp,4,1),_(77,mp,4,1),_(78,cp,4,1),_(79,up,4,1),_(80,_p,4,1),_(81,xp,4,1),_(82,gp,4,1),_(83,fp,4,1),_(84,hp,4,1),_(85,Cp,4,1),_(86,Sp,4,1),_(87,yp,4,1),_(88,bp,4,1),_(89,vp,4,1),_(90,Tp,4,1),_(91,Ep,4,1),_(92,wp,4,1),_(93,Fp,4,1),_(94,Dp,4,1),_(95,Ip,4,1),_(96,Rp,4,1),_(97,Mp,4,1),_(98,Ap,4,1),_(99,Pp,4,1),_(100,Op,4,1),_(101,Lp,4,1),_(102,Np,4,1),_(103,Vp,4,1),_(104,kp,4,1),_(105,Bp,4,1),_(106,Wp,4,1),_(107,Up,4,1),_(108,Yp,4,1),_(109,Gp,4,1),_(110,jp,4,1),_(111,Hp,4,1),i(),e(112,`
1949    `)),o&2){let t=p();s(3),x(t.columnsShown.clubName?3:-1),s(),x(t.columnsShown.programName?4:-1),s(),x(t.columnsShown.userName?5:-1),s(),x(t.columnsShown.email?6:-1),s(),x(t.columnsShown.cellPhone?7:-1),s(),x(t.columnsShown.playerName?8:-1),s(),x(t.columnsShown.dob?9:-1),s(),x(t.columnsShown.grade?10:-1),s(),x(t.columnsShown.gender?11:-1),s(),x(t.columnsShown.listPrice?12:-1),s(),x(t.columnsShown.discount?13:-1),s(),x(t.columnsShown.price?14:-1),s(),x(t.columnsShown.createdDate?15:-1),s(),x(t.columnsShown.teamSnapUserID?16:-1),s(),x(t.columnsShown.usaHockeyNumber?17:-1),s(),x(t.columnsShown.playerTShirtSize?18:-1),s(),x(t.columnsShown.referralOption?19:-1),s(),x(t.columnsShown.referralOptionFollowUp?20:-1),s(),x(t.columnsShown.isGoalkeeper?21:-1),s(),x(t.columnsShown.goalkeeperStatus?22:-1),s(),x(t.columnsShown.playerGrade?23:-1),s(),x(t.columnsShown.previousClub?24:-1),s(),x(t.columnsShown.schoolName?25:-1),s(),x(t.columnsShown.schoolTeamLevel?26:-1),s(),x(t.columnsShown.playsForSchool?27:-1),s(),x(t.columnsShown.preferredNumber?28:-1),s(),x(t.columnsShown.preferredNumber2?29:-1),s(),x(t.columnsShown.preferredNumber3?30:-1),s(),x(t.columnsShown.number?31:-1),s(),x(t.columnsShown.tryoutNumber?32:-1),s(),x(t.columnsShown.position?33:-1),s(),x(t.columnsShown.secondaryPosition?34:-1),s(),x(t.columnsShown.preferredPosition?35:-1),s(),x(t.columnsShown.preferredSecondaryPosition?36:-1),s(),x(t.columnsShown.interestedInRefereeProgram?37:-1),s(),x(t.columnsShown.certifiedAsReferee?38:-1),s(),x(t.columnsShown.namesOfFriends?39:-1),s(),x(t.columnsShown.friendGroup?40:-1),s(),x(t.columnsShown.coachRequest?41:-1),s(),x(t.columnsShown.highSchoolLevelID?42:-1),s(),x(t.columnsShown.playedWithUsLastYear?43:-1),s(),x(t.columnsShown.playedWithUsLastYearFollowUp?44:-1),s(),x(t.columnsShown.levelID?45:-1),s(),x(t.columnsShown.comments?46:-1),s(),x(t.columnsShown.roommatePreferences?47:-1),s(),x(t.columnsShown.playOtherSports?48:-1),s(),x(t.columnsShown.otherSports?49:-1),s(),x(t.columnsShown.graduationYear?50:-1),s(),x(t.columnsShown.playingExperience?51:-1),s(),x(t.columnsShown.playingExperienceFollowUp?52:-1),s(),x(t.columnsShown.experienceYears?53:-1),s(),x(t.columnsShown.collegeGraduationYear?54:-1),s(),x(t.columnsShown.collegeAttended?55:-1),s(),x(t.columnsShown.trappedPlayerStatus?56:-1),s(),x(t.columnsShown.playerCardID?57:-1),s(),x(t.columnsShown.playerCardID2?58:-1),s(),x(t.columnsShown.playerCardID3?59:-1),s(),x(t.columnsShown.playerCardID4?60:-1),s(),x(t.columnsShown.playerCardID5?61:-1),s(),x(t.columnsShown.playerAddressLine1?62:-1),s(),x(t.columnsShown.playerAddressLine2?63:-1),s(),x(t.columnsShown.playerCity?64:-1),s(),x(t.columnsShown.playerState?65:-1),s(),x(t.columnsShown.playerZip?66:-1),s(),x(t.columnsShown.userAddressLine1?67:-1),s(),x(t.columnsShown.userAddressLine2?68:-1),s(),x(t.columnsShown.userCity?69:-1),s(),x(t.columnsShown.userState?70:-1),s(),x(t.columnsShown.userZip?71:-1),s(),x(t.columnsShown.customBitField1?72:-1),s(),x(t.columnsShown.customBitField2?73:-1),s(),x(t.columnsShown.customBitField3?74:-1),s(),x(t.columnsShown.customBitField4?75:-1),s(),x(t.columnsShown.customBitField5?76:-1),s(),x(t.columnsShown.customBitField6?77:-1),s(),x(t.columnsShown.customBitField7?78:-1),s(),x(t.columnsShown.customBitField8?79:-1),s(),x(t.columnsShown.customBitField9?80:-1),s(),x(t.columnsShown.customBitField10?81:-1),s(),x(t.columnsShown.customTextField1?82:-1),s(),x(t.columnsShown.customTextField2?83:-1),s(),x(t.columnsShown.customTextField3?84:-1),s(),x(t.columnsShown.customTextField4?85:-1),s(),x(t.columnsShown.customTextField5?86:-1),s(),x(t.columnsShown.customTextField6?87:-1),s(),x(t.columnsShown.customTextField7?88:-1),s(),x(t.columnsShown.customTextField8?89:-1),s(),x(t.columnsShown.customTextField9?90:-1),s(),x(t.columnsShown.customTextField10?91:-1),s(),x(t.columnsShown.customDropdownField1?92:-1),s(),x(t.columnsShown.customDropdownField2?93:-1),s(),x(t.columnsShown.customDropdownField3?94:-1),s(),x(t.columnsShown.customDropdownField4?95:-1),s(),x(t.columnsShown.customDropdownField5?96:-1),s(),x(t.columnsShown.customDropdownField6?97:-1),s(),x(t.columnsShown.customDropdownField7?98:-1),s(),x(t.columnsShown.customDropdownField8?99:-1),s(),x(t.columnsShown.customDropdownField9?100:-1),s(),x(t.columnsShown.customDropdownField10?101:-1),s(),x(t.columnsShown.gearField1?102:-1),s(),x(t.columnsShown.gearField2?103:-1),s(),x(t.columnsShown.gearField3?104:-1),s(),x(t.columnsShown.gearField4?105:-1),s(),x(t.columnsShown.gearField5?106:-1),s(),x(t.columnsShown.gearField6?107:-1),s(),x(t.columnsShown.gearField7?108:-1),s(),x(t.columnsShown.gearField8?109:-1),s(),x(t.columnsShown.gearField9?110:-1),s(),x(t.columnsShown.gearField10?111:-1)}}var ko=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.determineColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}determineColumns(){this.columns=[...this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS].selectedFields],this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.columnsShown={},this.columns.forEach(l=>this.columnsShown[l.field]=!0)}getReportData(l){this.determineColumns();let r=this.reportService.reportFilters[F.INCOMPLETE_REGISTRATION_DETAILS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getIncompleteRegistrationDetail
1949sData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalPrice=a.totalPrice,this.totalListPrice=a.totalListPrice,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-incomplete-registration-details-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1950  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
1951    `),R(5,Y0,11,0,"ng-template",3),e(6,`
1952    `),R(7,zp,113,109,"ng-template",4),e(8,`
1953  `),i(),e(9,`
1954`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,Be,de,Ce,se],encapsulation:2});let o=d;return o}
1954)();function $p(o,d){if(o&1){let t=D();e(0,`
1955    `),n(1,"div",2),e(2,`
1956      `),n(3,"div",3),e(4,`
1957        `),n(5,"label",18),e(6,"Club"),i(),e(7,`
1958        `),n(8,"p-select",19),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubID,r)||(a.filters.clubID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.filterPrograms())}),i(),e(9,`
1959      `),i(),e(10,`
1960    `),i(),e(11,`
1961  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.clubID),m("options",t.clubOptions)}}function Kp(o,d){if(o&1){let t=D();e(0,`
1962          `),n(1,"p-datepicker",20,0),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
1963          `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1964          `),n(7,"p-datepicker",21),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),i(),e(8,`
1965        `)}if(o&2){let t=ue(2),l=p();s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function Jp(o,d){if(o&1){let t=D();e(0,`
1966          `),n(1,"p-datepicker",22),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
1967          `),i(),e(3,`
1968          `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
1969          `),n(7,"p-datepicker",23),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
1970          `),i(),e(9,`
1971        `)}if(o&2){let t=p();s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function Xp(o,d){if(o&1){let t=D();e(0,`
1972        `),n(1,"p-multiSelect",24),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
1973        `),i(),e(3,`
1974      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}var Bo=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.creditService=r,this.sharedPlayerService=a,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testUserOptions=le,this.clubOptions=[]}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.reportService.reportFilters[F.INCOMPLETE_FINANCIAL_AID]===void 0&&(this.reportService.reportFilters[F.INCOMPLETE_FINANCIAL_AID]=this.reportService.createFilters()),this.filters=this.reportService.reportFilters[F.INCOMPLETE_FINANCIAL_AID],oe({programs:this.reportService.getPrograms(),grades:this.sharedPlayerService.getGrades()}).subscribe(l=>{this.reportService.programs=l.programs,this.grades=l.grades,this.filterPrograms(),this.programs&&!this.filters.programID&&(this.filters.programID=this.programs[0].programID),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=this.reportService.createFilters(),this.filters=this.reportService.reportFilters[F.INCOMPLETE_FINANCIAL_AID]}),this.reportService.clubs.forEach(l=>{this.clubOptions.push({label:l.name,value:l.clubID})})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters,[Ne.TEAM],!1),this.programsOptions=[],this.programs.forEach(l=>{this.programsOptions.push({label:l.displayName,value:l.programID})})}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(ct),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-incomplete-fin-aid-filters"]],standalone:!1,decls:68,vars:9,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-6"],[1,"form-group"],["for","incomplete-fin-aid-program-filter"],["styleClass","full-width","inputId","incomplete-fin-aid-program-filter","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-3"],[1,"form-group","form-group--birthday-range"],["for","incomplete-fin-aid-birthdate-range-filter",1,"sr-only"],["for","incomplete-fin-aid-birthdate-from-filter",1,"sr-only"],["for","incomplete-fin-aid-birthdate-to-filter",1,"sr-only"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","inputId","incomplete-fin-aid-birthdate-range-filter","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],["role","button",1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["for","credit-budgeting-grade-filter"],["for","incomplete-fin-aid-testers-filter"],["styleClass","full-width","inputId","incomplete-fin-aid-testers-filter","appendTo","body",3,"ngModelChange","ngModel","options"],["for","incomplete-fin-aid-club-filter"],["styleClass","full-width","inputId","incomplete-fin-aid-club-filter","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","inputId","incomplete-fin-aid-birthdate-from-filter","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","inputId","incomplete-fin-aid-birthdate-to-filter","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","inputId","incomplete-fin-aid-birthdate-from-filter","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","incomplete-fin-aid-birthdate-to-filter","appendTo","body",3,"ngModelChange","ngModel"],["placeholder","All","optionLabel","label","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
1975  `),_(2,$p,12,2),n(3,"div",2),e(4,`
1976    `),n(5,"div",3),e(6,`
1977      `),n(7,"label",4),e(8,"Program"),i(),e(9,`
1978      `),n(10,"p-select",5),y("ngModelChange",function(u){return S(a.filters.programID,u)||(a.filters.programID=u),u}),i(),e(11,`
1979    `),i(),e(12,`
1980  `),i(),e(13,`
1981  `),n(14,"div",6),e(15,`
1982    `),n(16,"div",7),e(17,`
1983      `),n(18,"label"),e(19,"Birth Date"),i(),e(20,`
1984      `),n(21,"label",8),e(22,"Range Toggle"),i(),e(23,`
1985      `),n(24,"label",9),e(25,"Birth Date From"),i(),e(26,`
1986      `),n(27,"label",10),e(28,"Birth Date To"),i(),e(29,`
1987      `),n(30,"p-select",11),T("onChange",function(){return a.filters.dobFrom
1987=void 0,a.filters.dobTo=void 0}),y("ngModelChange",function(u){return S(a.filters.dobType,u)||(a.filters.dobType=u),u}),i(),e(31,`
1988      `),n(32,"span",12)(33,"p-inputgroup"),e(34,`
1989        `),_(35,Kp,9,8)(36,Jp,10,2),i(),e(37,`
1990        `),n(38,"a",13),T("click",function(){return a.filters.dobFrom=void 0,a.filters.dobTo=void 0}),e(39,`
1991          `),g(40,"i",14),e(41,`
1992        `),i(),e(42,`
1993      `),i(),e(43,`
1994    `),i(),e(44,`
1995  `),i(),e(45,`
1996  `),n(46,"div",6),e(47,`
1997    `),n(48,"div",3),e(49,`
1998      `),n(50,"label",15),e(51,"Grade"),i(),e(52,`
1999      `),_(53,Xp,4,7),i(),e(54,`
2000  `),i(),e(55,`
2001  `),n(56,"div",6),e(57,`
2002    `),n(58,"div",3),e(59,`
2003      `),n(60,"label",16),e(61,"Test Players"),i(),e(62,`
2004      `),n(63,"p-select",17),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(64,`
2005    `),i(),e(65,`
2006  `),i(),e(66,`
2007`),i(),e(67,`
2008
2009`)),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.programID),m("options",a.programsOptions),s(20),m("options",a.yearTypes),C("ngModel",a.filters.dobType),s(5),x(a.filters.dobType===1?35:36),s(18),x(a.grades?53:-1),s(10),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2009)();var Qp=o=>["/admin/players",o,"overview"];function em(o,d){if(o&1&&(e(0,`
2010          `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
2011          `),i(),e(5,`
2012        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2013            `,t.header,`
2014            `),s(),m("field",t.field)}}function tm(o,d){if(o&1&&(e(0,`
2015          `),n(1,"td",8),e(2),i(),e(3,`
2016        `)),o&2){let t=p(2);s(2),I("Total Records: ",t.totalRecords)}}function im(o,d){if(o&1&&(e(0,`
2017          `),n(1,"td",9),e(2),i(),e(3,`
2018        `)),o&2){let t=p(2);s(2),I("Total Records: ",t.totalRecords)}}function nm(o,d){if(o&1&&(e(0,`
2019      `),n(1,"tr"),e(2,`
2020        `),N(3,em,6,4,null,null,W),i(),e(5,`
2021      `),n(6,"tr",5),e(7,`
2022        `),_(8,tm,4,1),_(9,im,4,1),g(10,"td"),e(11,`
2023        `),g(12,"td"),e(13,`
2024        `),g(14,"td"),e(15,`
2025        `),g(16,"td"),e(17,`
2026        `),g(18,"td"),e(19,`
2027        `),g(20,"td"),e(21,`
2028      `),i(),e(22,`
2029    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(),x(t.showClubName?-1:9)}}function om(o,d){if(o&1&&(e(0,`
2030          `),n(1,"td"),e(2),i(),e(3,`
2031        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function rm(o,d){if(o&1&&(e(0,`
2032            `),n(1,"a",10),e(2),i(),e(3,`
2033          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Qp,t.playerID)),s(),c(t.playerName)}}function am(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2034            `,t.playerName,`
2035          `)}}function lm(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2036            `,t.creditValue+"%",`
2037          `)}}function sm(o,d){if(o&1&&(e(0),v(1,"accountingCurrency")),o&2){let t=p().$implicit;I(`
2038            `,E(1,1,t.creditValue),`
2039          `)}}function dm(o,d){if(o&1&&(e(0,`
2040      `),n(1,"tr"),e(2,`
2041        `),_(3,om,4,1),n(4,"td"),e(5),i(),e(6,`
2042        `),n(7,"td"),e(8),i(),e(9,`
2043        `),n(10,"td"),e(11),i(),e(12,`
2044        `),n(13,"td"),e(14,`
2045          `),_(15,rm,4,4)(16,am,1,1),i(),e(17,`
2046        `),n(18,"td"),e(19),i(),e(20,`
2047        `),n(21,"td"),e(22),v(23,"date"),i(),e(24,`
2048        `),n(25,"td"),e(26),i(),e(27,`
2049        `),n(28,"td"),e(29,`
2050          `),_(30,lm,1,1),_(31,sm,2,3),i(),e(32,`
2051      `),i(),e(33,`
2052    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.userName),s(3),c(t.email),s(3),c(t.cellPhone),s(4),x(l.reportService.profile[l.Permission.Profile]?15:16),s(4),c(t.gender),s(3),c(B(23,10,t.dob,"M/d/y")),s(4),c(t.grade),s(4),x(t.clubCreditTypeID===l.ClubCreditType.PERCENTAGE?30:-1),s(),x(t.clubCreditTypeID===l.ClubCreditType.FIXED_AMOUNT?31:-1)}}var Wo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee,this.ClubCreditType=Pt}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"userName",header:"User Name"},{field:"email",header:"Email"},{field:"cellPhone",header:"Phone Number"},{field:"playerName",header:"Player Name"},{field:"gender",header:"Gender"},{field:"dob",header:"Birth Date"},{field:"grade",header:"Grade"},{field:"creditValue",header:"Financial Aid"}]}getReportData(l){let r=this.reportService.reportFilters[F.INCOMPLETE_FINANCIAL_AID];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getIncompleteFinAidData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-incomplete-fin-aid-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],["colspan","3"],["colspan","2"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2053  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2054    `),R(5,nm,23,2,"ng-template",3),e(6,`
2055    `),R(7,dm,34,13,"ng-template",4),e(8,`
2056  `),i(),e(9,`
2057`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de,se],encapsulation:2});let o=d;return o}
2057)();function mm(o,d){if(o&1){let t=D();e(0,`
2058    `),n(1,"div",8),e(2,`
2059      `),n(3,"div",2),e(4,`
2060        `),n(5,"label"),e(6,"Club"),i(),e(7,`
2061        `),n(8,"p-multiSelect",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),r.updateRegistrationOptions(),h(r.updateRegistrations())}),e(9,`
2062        `),i(),e(10,`
2063      `),i(),e(11,`
2064    `),i(),e(12,`
2065  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var Uo=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.registrationService=r,this.registrationOptionService=a,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.REGISTRATION_OPTIONS]===void 0&&(this.reportService.reportFilters[F.REGISTRATION_OPTIONS]=new P),this.filters=this.reportService.reportFilters[F.REGISTRATION_OPTIONS],this.reportService.getPrograms().subscribe(l=>{this.reportService.programs=l,this.filterPrograms(),this.updateRegistrations(),this.updateRegistrationOptions(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REGISTRATION_OPTIONS]})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}updateRegistrationOptionValues(){this.filters.registrationOptions?this.registrationOptionService.getRegistrationOptionsValues(this.filters.registrationOptions,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptionValues=l}):this.registrationOptionValues=void 0}updateRegistrationOptions(){this.registrationOptionService.getRegistrationOptions(this.filters.registrations,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptions=l})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(Ui))},d.\u0275cmp=A({type:d,selectors:[["app-registration-options-filters"]],standalone:!1,decls:91,vars:33,consts:[[1,"row"],[1,"col-md-5","col-lg-4"],[1,"form-group"],["optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-5"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["optionLabel","name","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
2066  `),_(2,mm,13,7),n(3,"div",1),e(4,`
2067    `),n(5,"div",2),e(6,`
2068      `),n(7,"label"),e(8,"Checkout Option"),i(),e(9,`
2069      `),n(10,"p-multiSelect",3),y("ngModelChange",function(u){return S(a.filters.registrationOptions,u)||(a.filters.registrationOptions=u),u}),T("onChange",function(){return a.updateRegistrationOptionValues()}),e(11,`
2070      `),i(),e(12,`
2071    `),i(),e(13,`
2072  `),i(),e(14,`
2073  `),n(15,"div",4),e(16,`
2074    `),n(17,"div",2),e(18,`
2075      `),n(19,"label"),e(20,"Checkout Option Response"),i(),e(21,`
2076      `),n(22,"p-multiSelect",5),y("ngModelChange",function(u){return S(a.filters.registrationOptionValues,u)||(a.filters.registrationOptionValues=u),u}),e(23,`
2077      `),i(),e(24,`
2078    `),i(),e(25,`
2079  `),i(),e(26,`
2080  `),n(27,"div",6),e(28,`
2081    `),n(29,"div",2),e(30,`
2082      `),n(31,"label"),e(32,"Test Players"),i(),e(33,`
2083      `),n(34,"p-select",7),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),e(35,`
2084      `),i(),e(36,`
2085    `),i(),e(37,`
2086  `),i(),e(38,`
2087  `),n(39,"div",8),e(40,`
2088    `),n(41,"div",2),e(42,`
2089      `),n(43,"label"),e(44,"Program"),i(),e(45,`
2090      `),n(46,"p-multiSelect",9),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),T("onChange",function(){return a.updateRegistrations()}),e(47,`
2091      `),i(),e(48,`
2092    `),i(),e(49,`
2093  `),i(),e(50,`
2094  `),n(51,"div",10),e(52,`
2095    `),n(53,"div",2),e(54,`
2096      `),n(55,"label"),e(56,"Registration Date"),i(),e(57,`
2097      `),n(58,"span",11)(59,"p-inputgroup"),e(60,`
2098        `),n(61,"p-datepicker",12),y("ngModelChange",function(u){return S(a.filters.regFrom,u)||(a.filters.regFrom=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(62,`
2099        `),i(),e(63,`
2100        `),n(64,"p-inputgroup-addon"),e(65,"to"),i(),e(66,`
2101        `),n(67,"p-datepicker",13),y("ngModelChange",function(u){return S(a.filters.regTo,u)||(a.filters.regTo=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(68,`
2102        `),i(),e(69,`
2103        `),i(),e(70,`
2104        `),n(71,"a",14),T("click",function(){return a.filters.regFrom=a.reportService.defaultDate,a.filters.regTo=void 0,a.updateRegistrations()}),e(72,`
2105          `),g(73,"i",15),e(74,`
2106        `),i(),e(75,`
2107      `),i(),e(76,`
2108    `),i(),e(77,`
2109  `),i(),e(78,`
2110  `),n(79,"div",8),e(80,`
2111    `),n(81,"div",2),e(82,`
2112      `),n(83,"label"),e(84,"Registration"),i(),e(85,`
2113      `),n(86,"p-multiSelect",16),y("ngModelChange",function(u){return S(a.filters.registrations,u)||(a.filters.registrations=u),u}),e(87,`
2114      `),i(),e(88,`
2115    `),i(),e(89,`
2116  `),i(),e(90,`
2117`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),m("autofocusFilter",!0),C("ngModel",a.filters.registrationOptions),m("options",a.registrationOptions)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} checkout options selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.registrationOptionValues),m("options",a.registrationOptionValues)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} responses selected"),s(12),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected"),s(15),C("ngModel",a.filters.regFrom),s(6),C("ngModel",a.filters.regTo),s(19),m("autofocusFilter",!0),C("ngModel",a.filters.registrations),m("options",a.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected"))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2117)();var um=o=>["/admin/players",o,"overview"];function _m(o,d){if(o&1&&(e(0,`
2118          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
2119          `),i(),e(5,`
2120        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2121            `,t.header,`
2122            `),s(),m("field",t.field)}}function xm(o,d){if(o&1&&(e(0,`
2123          `),n(1,"th"),e(2),i(),e(3,`
2124        `)),o&2){let t=d.$implicit;s(2),I(`
2125            `,t.header,`
2126          `)}}function gm(o,d){if(o&1&&(e(0,`
2127      `),n(1,"tr"),e(2,`
2128        `),N(3,_m,6,4,null,null,W),N(5,xm,4,1,null,null,W),i(),e(7,`
2129    `)),o&2){let t=p();s(3),V(t.columns),s(2),V(t.optionColumns)}}function fm(o,d){if(o&1&&(e(0,`
2130          `),n(1,"td"),e(2),i(),e(3,`
2131        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function hm(o,d){if(o&1&&(e(0,`
2132            `),n(1,"a",7),e(2),i(),e(3,`
2133          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,um,t.playerID)),s(),c(t.playerName)}}function Cm(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2134            `,t.playerName,`
2135          `)}}function Sm(o,d){if(o&1&&(e(0,`
2136          `),n(1,"td"),e(2),i(),e(3,`
2137          `),n(4,"td"),e(5),v(6,"accountingCurrency"),i(),e(7,`
2138        `)),o&2){let t=d.$index,l=p().$implicit;s(2),c(l["optionResponse"+t]),s(3),c(E(6,2,l["optionFee"+t]))}}function ym(o,d){if(o&1&&(e(0,`
2139      `),n(1,"tr"),e(2,`
2140        `),_(3,fm,4,1),n(4,"td"),e(5),i(),e(6,`
2141        `),n(7,"td"),e(8),i(),e(9,`
2142        `),n(10,"td"),e(11,`
2143          `),_(12,hm,4,4)(13,Cm,1,1),i(),e(14,`
2144        `),N(15,Sm,8,4,null,null,W),i(),e(17,`
2145    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.programName),s(3),c(t.regName),s(4),x(l.reportService.profile[l.Permission.Profile]?12:13),s(3),V(l.options)}}var Yo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"playerName",header:"Player Name"}]}getReportData(l){let r=this.reportService.reportFilters[F.REGISTRATION_OPTIONS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getRegistrationOptionsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.reportData.length>0&&(this.optionColumns=[],this.options=Object.keys(this.reportData[0]).filter(b=>b.includes("optionName")),this.options.forEach(b=>{this.optionColumns=this.optionColumns.concat([{field:"optionResponse"+b.substr(8),header:this.reportData[0][b]},{field:"optionFee"+b.substr(8),header:"Fee"}])})),this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-registration-options-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2146  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2147    `),R(5,gm,8,0,"ng-template",3),e(6,`
2148    `),R(7,ym,18,4,"ng-template",4),e(8,`
2149  `),i(),e(9,`
2150`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,se],encapsulation:2});let o=d;return o}
2150)();var vm=o=>["/admin/users",o,"profile"],Tm=o=>["/admin/players",o,"overview"];function Em(o,d){if(o&1&&(e(0,`
2151          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
2152          `),i(),e(5,`
2153        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2154            `,t.header,`
2155            `),s(),m("field",t.field)}}function wm(o,d){if(o&1&&(e(0,`
2156      `),n(1,"tr"),e(2,`
2157        `),N(3,Em,6,4,null,null,W),i(),e(5,`
2158    `)),o&2){let t=p();s(3),V(t.columns)}}function Fm(o,d){if(o&1&&(e(0,`
2159          `),n(1,"td"),e(2),i(),e(3,`
2160        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Dm(o,d){if(o&1&&(e(0,`
2161            `),n(1,"a",7),e(2),i(),e(3,`
2162          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,vm,t.clubUserID)),s(),c(t.teamName)}}function Im(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2163            `,t.teamName,`
2164          `)}}function Rm(o,d){if(o&1&&(e(0,`
2165            `),n(1,"a",7),e(2),i(),e(3,`
2166          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Tm,t.playerID)),s(),c(t.playerLastName)}}function Mm(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2167            `,t.playerLastName,`
2168          `)}}function Am(o,d){if(o&1&&(e(0,`
2169      `),n(1,"tr"),e(2,`
2170        `),_(3,Fm,4,1),n(4,"td"),e(5),v(6,"utcDate"),i(),e(7,`
2171        `),n(8,"td"),e(9),i(),e(10,`
2172        `),n(11,"td"),e(12),i(),e(13,`
2173        `),n(14,"td"),e(15),i(),e(16,`
2174        `),n(17,"td"),e(18),i(),e(19,`
2175        `),n(20,"td"),e(21),i(),e(22,`
2176        `),n(23,"td"),e(24),i(),e(25,`
2177        `),n(26,"td"),e(27,`
2178          `),_(28,Dm,4,4)(29,Im,1,1),i(),e(30,`
2179        `),n(31,"td"),e(32,`
2180          `),_(33,Rm,4,4)(34,Mm,1,1),i(),e(35,`
2181        `),n(36,"td"),e(37),i(),e(38,`
2182        `),n(39,"td"),e(40),v(41,"date"),i(),e(42,`
2183        `),n(43,"td"),e(44),i(),e(45,`
2184        `),n(46,"td"),e(47),i(),e(48,`
2185        `),n(49,"td"),e(50),i(),e(51,`
2186        `),n(52,"td"),e(53),v(54,"accountingCurrency"),i(),e(55,`
2187        `),n(56,"td"),e(57),v(58,"accountingCurrency"),i(),e(59,`
2188        `),n(60,"td"),e(61),v(62,"accountingCurrency"),i(),e(63,`
2189        `),n(64,"td"),e(65),v(66,"accountingCurrency"),i(),e(67,`
2190        `),n(68,"td"),e(69),v(70,"utcDate"),i(),e(71,`
2191        `),n(72,"td"),e(73),i(),e(74,`
2192        `),n(75,"td"),e(76),v(77,"utcDate"),i(),e(78,`
2193        `),n(79,"td"),e(80),i(),e(81,`
2194
2195      `),i(),e(82,`
2196    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,23,t.changeDate,"M/d/y")),s(4),c(t.status),s(3),c(t.programName),s(3),c(t.regName),s(3),c(t.userName),s(3),c(t.email),s(3),c(t.cellPhone),s(4),x(!t.playerLastName&&l.reportService.profile[l.Permission.UserProfile]?28:29),s(5),x(l.reportService.profile[l.Permission.Profile]?33:34),s(4),c(t.playerFirstName),s(3),c(B(41,26,t.dob,"M/d/y")),s(4),c(t.playerGrade),s(3),c(t.gender),s(3),c(t.paymentType),s(3),c(E(54,29,t.listPrice)),s(4),c(E(58,31,t.adminFee)),s(4),c(E(62,33,t.amountRefunded||0)),s(4),c(E(66,35,t.amountCredited||0)),s(4),c(B(70,37,t.completedDate,"short")),s(4),c(t.userName),s(3),c(B(77,40,t.cancelledOn,"short")),s(4),c(t.cancelledBy)}}var Go=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"changeDate",header:"Change Date"},{field:"status",header:"Change"},{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"userName",header:"User Name"},{field:"email",header:"Email"},{field:"cellPhone",header:"Phone Number"},{field:"teamName",header:"Team Name"},{field:"playerLastName",header:"Player Last Name"},{field:"playerFirstName",header:"Player First Name"},{field:"dob",header:"Birth Date"},{field:"playerGrade",header:"Grade"},{field:"gender",header:"Gender"},{field:"paymentType",header:"Payment Type"},{field:"listPrice",header:"Program List Price"},{field:"adminFee",header:"Admin Fee"},{field:"amountRefunded",header:"Refunded Amount"},{field:"amountCredited",header:"Credited Amount"},{field:"completedDate",header:"Completed Date"},{field:"userName",header:"Completed By"},{field:"cancelledOn",header:"Cancelled Date"},{field:"cancelledBy",header:"Cancelled By"}]}getReportData(l){let r=this.reportService.reportFilters[F.REGISTRATION_CHANGES];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getRegistrationChangesData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-registration-changes-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2197  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2198    `),R(5,wm,6,0,"ng-template",3),e(6,`
2199    `),R(7,Am,83,43,"ng-template",4),e(8,`
2200  `),i(),e(9,`
2201`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de,Ce,se],encapsulation:2});let o=d;return o}
2201)();function Om(o,d){if(o&1){let t=D();e(0,`
2202      `),n(1,"div",4),e(2,`
2203        `),n(3,"div",3),e(4,`
2204          `),n(5,"label"),e(6,"Club"),i(),e(7,`
2205          `),n(8,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),h(r.updateRegistrations())}),e(9,`
2206          `),i(),e(10,`
2207        `),i(),e(11,`
2208      `),i(),e(12,`
2209    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Lm(o,d){if(o&1){let t=D();e(0,`
2210          `),n(1,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),h(r.updateRegistrations())}),e(2,`
2211          `),i(),e(3,`
2212        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("filter",!0)("maxSelectedLabels",1)("showToggleAll",!0)("selectedItemsLabel","{0} program types selected")}}function Nm(o,d){if(o&1){let t=D();e(0,`
2213          `),n(1,"p-multiSelect",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
2214          `),i(),e(3,`
2215        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} programs selected")}}function Vm(o,d){if(o&1){let t=D();e(0,`
2216            `),n(1,"p-datepicker",22,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
2217            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
2218            `),n(7,"p-datepicker",23),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
2219            `),i(),e(9,`
2220          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function km(o,d){if(o&1){let t=D();e(0,`
2221            `),n(1,"p-datepicker",24),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
2222            `),i(),e(3,`
2223            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
2224            `),n(7,"p-datepicker",25),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
2225            `),i(),e(9,`
2226          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function Bm(o,d){if(o&1){let t=D();e(0,`
2227          `),n(1,"p-multiSelect",26),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
2228          `),i(),e(3,`
2229        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}function Wm(o,d){if(o&1){let t=D();e(0,`
2230  `),n(1,"div",1),e(2,`
2231    `),_(3,Om,13,7),n(4,"div",2),e(5,`
2232      `),n(6,"div",3),e(7,`
2233        `),n(8,"label"),e(9,"Program Type"),i(),e(10,`
2234        `),_(11,Lm,4,7),i(),e(12,`
2235    `),i(),e(13,`
2236    `),n(14,"div",4),e(15,`
2237      `),n(16,"div",3),e(17,`
2238        `),n(18,"label"),e(19,"Program"),i(),e(20,`
2239        `),_(21,Nm,4,8),i(),e(22,`
2240    `),i(),e(23,`
2241    `),n(24,"div",5),e(25,`
2242      `),n(26,"div",3),e(27,`
2243        `),n(28,"label"),e(29,"Change Date"),i(),e(30,`
2244        `),n(31,"span",6)(32,"p-inputgroup"),e(33,`
2245          `),n(34,"p-datepicker",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),e(35,`
2246          `),i(),e(36,`
2247          `),n(37,"p-inputgroup-addon"),e(38,"to"),i(),e(39,`
2248          `),n(40,"p-datepicker",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),e(41,`
2249          `),i(),e(42,`
2250          `),i(),e(43,`
2251          `),n(44,"a",9),T("click",function(){f(t);let r=p();return r.filters.regFrom=r.reportService.defaultDate,h(r.filters.regTo=void 0)}),e(45,`
2252            `),g(46,"i",10),e(47,`
2253          `),i(),e(48,`
2254        `),i(),e(49,`
2255      `),i(),e(50,`
2256    `),i(),e(51,`
2257    `),n(52,"div",2),e(53,`
2258      `),n(54,"div",3),e(55,`
2259        `),n(56,"label"),e(57,"Registration"),i(),e(58,`
2260        `),n(59,"p-multiSelect",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(60,`
2261        `),i(),e(61,`
2262      `),i(),e(62,`
2263    `),i(),e(63,`
2264    `),n(64,"div",12),e(65,`
2265      `),n(66,"div",3),e(67,`
2266        `),n(68,"label"),e(69,"Gender"),i(),e(70,`
2267        `),n(71,"p-select",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(72,`
2268      `),i(),e(73,`
2269    `),i(),e(74,`
2270    `),n(75,"div",5),e(76,`
2271      `),n(77,"div",14),e(78,`
2272        `),n(79,"label"),e(80,"Birth Date"),i(),e(81,`
2273        `),n(82,"p-select",15),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(83,`
2274        `),n(84,"span",6)(85,"p-inputgroup"),e(86,`
2275          `),_(87,Vm,10,8)(88,km,10,2),i(),e(89,`
2276          `),n(90,"a",9),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(91,`
2277            `),g(92,"i",10),e(93,`
2278          `),i(),e(94,`
2279        `),i(),e(95,`
2280      `),i(),e(96,`
2281    `),i(),e(97,`
2282    `),n(98,"div",2),e(99,`
2283      `),n(100,"div",3),e(101,`
2284        `),n(102,"label",16),e(103,"Grade"),i(),e(104,`
2285        `),_(105,Bm,4,7),i(),e(106,`
2286    `),i(),e(107,`
2287    `),n(108,"div",12),e(109,`
2288      `),n(110,"div",3),e(111,`
2289        `),n(112,"label"),e(113,"Test Users/Players"),i(),e(114,`
2290        `),n(115,"p-select",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(116,`
2291        `),i(),e(117,`
2292      `),i(),e(118,`
2293    `),i(),e(119,`
2294    `),n(120,"div",2),e(121,`
2295      `),n(122,"div",3),e(123,`
2296        `),n(124,"label"),e(125,"Season"),i(),e(126,`
2297        `),n(127,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(128,`
2298        `),i(),e(129,`
2299      `),i(),e(130,`
2300    `),i(),e(131,`
2301    `),n(132,"div",2),e(133,`
2302      `),n(134,"div",3),e(135,`
2303        `),n(136,"label"),e(137,"Team"),i(),e(138,`
2304        `),n(139,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(140,`
2305        `),i(),e(141,`
2306      `),i(),e(142,`
2307    `),i(),e(143,`
2308  `),i(),e(144,`
2309`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.programTypes?11:-1),s(10),x(t.filters?21:-1),s(13),C("ngModel",t.filters.regFrom),s(6),C("ngModel",t.filters.regTo),s(19),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registrations selected"),s(12),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?87:88),s(18),x(t.grades?105:-1),s(10),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0}
2309 teams selected")}}var jo=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.registrationService=r,this.teamService=a,this.sharedPlayerService=b,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testUserOptions=le,this.genderOptions=Ae}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(),this.sharedPlayerService.getGrades()]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.grades=l[3],this.reportService.reportFilters[F.REGISTRATION_CHANGES]===void 0&&(this.reportService.reportFilters[F.REGISTRATION_CHANGES]=new P,this.reportService.reportFilters[F.REGISTRATION_CHANGES].regFrom=new Date(new Date().setDate(new Date().getDate()-30)),this.reportService.reportFilters[F.REGISTRATION_CHANGES].programTypes=this.programTypes.filter(r=>r.value!==Ne.OTHER)),this.filters=this.reportService.reportFilters[F.REGISTRATION_CHANGES],this.filterPrograms(),this.getTeams()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REGISTRATION_CHANGES]})}filterPrograms(){this.reportService.state&&(this.reportService.state.programTypeID?this.filters.programTypes=this.programTypes.filter(l=>l.value===+this.reportService.state.programTypeID):this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.grades?this.filters.grades=this.grades.filter(l=>this.reportService.state.grades.includes(l.value)):this.filters.grades=void 0),this.programs=this.reportService.filterPrograms(this.filters)}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state?(this.reportService.state.seasons?this.filters.seasons=this.seasons.filter(r=>this.reportService.state.seasons.includes(r.value)):this.filters.seasons=void 0,this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>r.teamID===this.reportService.state.teamID):this.filters.teams=void 0,this.filters.dobFrom=this.reportService.state.dobFrom?new Date(this.reportService.state.dobFrom):void 0,this.filters.dobTo=this.reportService.state.dobTo?new Date(this.reportService.state.dobTo):void 0,this.filters.regFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.regTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.updateRegistrations(),this.reportService.showReportData=!0,this.reportService.state=void 0):this.updateRegistrations()}):this.teams=void 0}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID)).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-registration-changes-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],[1,"col-md-5","col-lg-3"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"form-group","form-group--birthday-range"],["o
2309ptionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],["for","credit-budgeting-grade-filter"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","maxSelectedLabels","showToggleAll","selectedItemsLabel"],["optionLabel","name","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["optionLabel","label","placeholder","All","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,Wm,145,36),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2309)();var Ym=o=>["/admin/players",o,"overview"];function Gm(o,d){if(o&1&&(e(0,`
2310          `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
2311          `),i(),e(5,`
2312        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2313            `,t.header,`
2314            `),s(),m("field",t.field)}}function jm(o,d){o&1&&(e(0,`
2315          `),g(1,"td"),e(2,`
2316        `))}function Hm(o,d){if(o&1&&(e(0,`
2317      `),n(1,"tr"),e(2,`
2318        `),N(3,Gm,6,4,null,null,W),i(),e(5,`
2319      `),n(6,"tr",5),e(7,`
2320        `),_(8,jm,3,0),g(9,"td"),e(10,`
2321        `),g(11,"td"),e(12,`
2322        `),g(13,"td"),e(14,`
2323        `),n(15,"td"),e(16),v(17,"accountingCurrency"),i(),e(18,`
2324        `),g(19,"td"),e(20,`
2325        `),g(21,"td"),e(22,`
2326      `),i(),e(23,`
2327    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(8),c(E(17,2,t.totalCreditUsed))}}function zm(o,d){if(o&1&&(e(0,`
2328          `),n(1,"td"),e(2),i(),e(3,`
2329        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function qm(o,d){if(o&1&&(e(0,`
2330            `),n(1,"a",8),e(2),i(),e(3,`
2331          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Ym,t.playerID)),s(),c(t.playerName)}}function $m(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2332            `,t.playerName,`
2333          `)}}function Km(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2334            `,t.creditValue+"%",`
2335          `)}}function Jm(o,d){if(o&1&&(e(0),v(1,"accountingCurrency")),o&2){let t=p().$implicit;I(`
2336            `,E(1,1,t.creditValue),`
2337          `)}}function Xm(o,d){if(o&1&&(e(0,`
2338      `),n(1,"tr"),e(2,`
2339        `),_(3,zm,4,1),n(4,"td"),e(5,`
2340          `),_(6,qm,4,4)(7,$m,1,1),i(),e(8,`
2341        `),n(9,"td"),e(10),i(),e(11,`
2342        `),n(12,"td"),e(13,`
2343          `),_(14,Km,1,1),_(15,Jm,2,3),i(),e(16,`
2344        `),n(17,"td"),e(18),v(19,"accountingCurrency"),i(),e(20,`
2345        `),n(21,"td"),e(22),v(23,"utcDate"),i(),e(24,`
2346        `),n(25,"td"),e(26),v(27,"utcDate"),i(),e(28,`
2347      `),i(),e(29,`
2348    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(3),x(l.reportService.profile[l.Permission.Profile]?6:7),s(4),c(t.creditName),s(4),x(t.clubCreditTypeID===l.ClubCreditType.PERCENTAGE?14:-1),s(),x(t.clubCreditTypeID===l.ClubCreditType.FIXED_AMOUNT?15:-1),s(3),c(E(19,8,t.creditUsed)),s(4),c(B(23,10,t.effectiveDate,"M/d/y")),s(4),c(B(27,13,t.expirationDate,"M/d/y"))}}var Ho=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee,this.ClubCreditType=Pt}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"playerName",header:"Player Name"},{field:"creditName",header:"Discount Name"},{field:"creditValue",header:"Discount"},{field:"creditUsed",header:"Discount Used"},{field:"effectiveDate",header:"Issued Date"},{field:"expirationDate",header:"Expiration Date"}]}getReportData(l){let r=this.reportService.reportFilters[F.DISCOUNT_SUMMARY];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getDiscountSummaryData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalCreditUsed=a.totalCreditUsed,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-discount-summary-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2349  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2350    `),R(5,Hm,24,4,"ng-template",3),e(6,`
2351    `),R(7,Xm,30,16,"ng-template",4),e(8,`
2352  `),i(),e(9,`
2353`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,Ce,se],encapsulation:2});let o=d;return o}
2353)();function Qm(o,d){if(o&1){let t=D();e(0,`
2354    `),n(1,"div",12),e(2,`
2355      `),n(3,"div",2),e(4,`
2356        `),n(5,"label"),e(6,"Club"),i(),e(7,`
2357        `),n(8,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
2358        `),i(),e(10,`
2359      `),i(),e(11,`
2360    `),i(),e(12,`
2361  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var zo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.creditService=r,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.DISCOUNT_SUMMARY]===void 0&&(this.reportService.reportFilters[F.DISCOUNT_SUMMARY]=new P),this.filters=this.reportService.reportFilters[F.DISCOUNT_SUMMARY],this.reportService.state&&(this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.showReportData=!0,this.reportService.state=void 0),this.reportService.setClubID(this.filters),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.DISCOUNT_SUMMARY]})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(ct))},d.\u0275cmp=A({type:d,selectors:[["app-discount-summary-filters"]],standalone:!1,decls:53,vars:6,consts:[[1,"row"],[1,"col-md-5","col-lg-4"],[1,"form-group"],["id","creditName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2","col-lg-2"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
2362  `),_(2,Qm,13,7),n(3,"div",1),e(4,`
2363    `),n(5,"div",2),e(6,`
2364      `),n(7,"label"),e(8,"Credit/Discount Name"),i(),e(9,`
2365      `),n(10,"input",3),y("ngModelChange",function(u){return S(a.filters.creditName,u)||(a.filters.creditName=u),u}),i(),e(11,`
2366    `),i(),e(12,`
2367  `),i(),e(13,`
2368  `),n(14,"div",4),e(15,`
2369    `),n(16,"div",2),e(17,`
2370      `),n(18,"label"),e(19,"Issued Date"),i(),e(20,`
2371      `),n(21,"span",5)(22,"p-inputgroup"),e(23,`
2372        `),n(24,"p-datepicker",6),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(25,`
2373        `),i(),e(26,`
2374        `),n(27,"p-inputgroup-addon"),e(28,"to"),i(),e(29,`
2375        `),n(30,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(31,`
2376        `),i(),e(32,`
2377        `),i(),e(33,`
2378        `),n(34,"a",8),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(35,`
2379          `),g(36,"i",9),e(37,`
2380        `),i(),e(38,`
2381      `),i(),e(39,`
2382    `),i(),e(40,`
2383  `),i(),e(41,`
2384  `),n(42,"div",10),e(43,`
2385    `),n(44,"div",2),e(45,`
2386      `),n(46,"label"),e(47,"Test Players"),i(),e(48,`
2387      `),n(49,"p-select",11),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(50,`
2388    `),i(),e(51,`
2389  `),i(),e(52,`
2390`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.creditName),s(14),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2390)();function tc(o,d){if(o&1&&(e(0,`
2391          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
2392          `),i(),e(5,`
2393        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2394            `,t.header,`
2395            `),s(),m("field",t.field)}}function ic(o,d){if(o&1&&(e(0,`
2396      `),n(1,"tr"),e(2,`
2397        `),N(3,tc,6,4,null,null,W),i(),e(5,`
2398    `)),o&2){let t=p();s(3),V(t.columns)}}function nc(o,d){if(o&1&&(e(0,`
2399      `),n(1,"tr"),e(2,`
2400        `),n(3,"td"),e(4),i(),e(5,`
2401        `),n(6,"td"),e(7),v(8,"date"),i(),e(9,`
2402        `),n(10,"td"),e(11),i(),e(12,`
2403        `),n(13,"td"),e(14),i(),e(15,`
2404        `),n(16,"td"),e(17),i(),e(18,`
2405        `),n(19,"td"),e(20),i(),e(21,`
2406        `),n(22,"td"),e(23),i(),e(24,`
2407        `),n(25,"td"),e(26),i(),e(27,`
2408        `),n(28,"td"),e(29),i(),e(30,`
2409        `),n(31,"td"),e(32),i(),e(33,`
2410        `),n(34,"td"),e(35),v(36,"utcDate"),i(),e(37,`
2411        `),n(38,"td"),e(39),i(),e(40,`
2412        `),n(41,"td"),e(42),v(43,"utcDate"),i(),e(44,`
2413      `),i(),e(45,`
2414    `)),o&2){let t=d.$implicit;s(4),c(t.playerName),s(3),c(B(8,13,t.dob,"M/d/y")),s(4),c(t.gender),s(3),c(t.phone),s(3),c(t.email),s(3),c(t.schoolName),s(3),c(t.gradeInSchool),s(3),c(t.tryoutNumber),s(3),c(t.teamName),s(3),c(t.status),s(3),c(B(36,16,t.savedOn,"M/d/y")),s(4),c(t.teamType),s(3),c(B(43,19,t.acceptBy,"M/d/y"))}}var $o=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.siteDataService=r,this.teamService=a,this.programService=b,this.AriaLabels=X,this.loading=!0,this.showAssignModal=!1}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)}),this.teamService.getTeams().subscribe(l=>{this.teams=l,this.teams.length>0&&(this.teamID=this.teams[0].teamID)})}getReportColumns(){return[{field:"playerName",header:"Player Name"},{field:"dob",header:"Birth Date"},{field:"gender",header:"Gender"},{field:"phone",header:"Phone"},{field:"email",header:"Email"},{field:"schoolName",header:"School"},{field:"gradeInSchool",header:"Grade"},{field:"tryoutNumber",header:"Tryout Jersey Number"},{field:"teamName",header:"Team Name"},{field:"status",header:"Status"},{field:"savedOn",header:"Status Date"},{field:"TeamType",header:"Team Type"},{field:"acceptBy",header:"Accept By"}]}getReportData(l){let r=this.reportService.reportFilters[F.TRYOUT_ASSIGNMENT];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getTryoutAssignmentData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(ve),w(At))},d.\u0275cmp=A({type:d,selectors:[["app-tryout-assignment-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2415  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2416    `),R(5,ic,6,0,"ng-template",3),e(6,`
2417    `),R(7,nc,46,22,"ng-template",4),e(8,`
2418  `),i(),e(9,`
2419`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,de,Ce],encapsulation:2});let o=d;return o}
2419)();function rc(o,d){if(o&1){let t=D();e(0,`
2420    `),n(1,"div",6),e(2,`
2421      `),n(3,"div",3),e(4,`
2422        `),n(5,"label",36),e(6,"Club"),i(),e(7,`
2423        `),n(8,"p-select",37),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubID,r)||(a.filters.clubID=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),h(r.updateRegistrations())}),i(),e(9,`
2424      `),i(),e(10,`
2425    `),i(),e(11,`
2426  `)}if(o&2){let t=p();s(8),C("ngModel",t.filters.clubID),m("options",t.clubOptions)}}function ac(o,d){if(o&1){let t=D();e(0,`
2427          `),n(1,"p-datepicker",38,0),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
2428          `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
2429          `),n(7,"p-datepicker",39),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),i(),e(8,`
2430        `)}if(o&2){let t=ue(2),l=p();s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function lc(o,d){if(o&1){let t=D();e(0,`
2431          `),n(1,"p-datepicker",40),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
2432          `),i(),e(3,`
2433          `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
2434          `),n(7,"p-datepicker",41),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
2435          `),i(),e(9,`
2436        `)}if(o&2){let t=p();s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}var Ko=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.registrationService=r,this.teamService=a,this.minBirthYear=Ie,this.maxBirthYear=Re,this.genderOptions=Ae,this.testUserOptions=le,this.notAssignedPlayerOptions=wn,this.clubOptions=[]}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.reportService.reportFilters[F.TRYOUT_ASSIGNMENT]===void 0&&(this.reportService.reportFilters[F.TRYOUT_ASSIGNMENT]=new P),this.filters=this.reportService.reportFilters[F.TRYOUT_ASSIGNMENT],oe([this.reportService.getPrograms(),this.reportService.getProgramTypes(),this.teamService.getTeams(),this.teamService.getInviteStatuses()]).subscribe(l=>{this.reportService.programs=l[0],this.programTypes=l[1],this.teams=l[2],this.inviteStatuses=l[3],this.filters.programTypeID=this.programTypes[0].value,this.filterPrograms(),this.filters.programID===void 0&&this.programs.length>0&&(this.filters.programID=this.programs[0].programID),this.filters.programID&&this.updateRegistrations(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.TRYOUT_ASSIGNMENT]}),this.reportService.clubs.forEach(l=>{this.clubOptions.push({label:l.name,value:l.clubID})})}updateRegistrations(){this.registrationService.getFilteredRegistrations([this.filters.programID],this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))})}filterPrograms(){this.reportService.state&&(this.reportService.state.clubID&&(this.filters.clubID=this.reportService.state.clubID),this.reportService.state.programID&&(this.filters.programID=this.reportService.state.programID,this.filters.programTypeID=this.reportService.programs.find(l=>l.programID===this.filters.programID).programTypeID),this.reportService.state.statuses&&(this.filters.statuses=this.inviteStatuses.filter(l=>this.reportService.state.statuses.includes(l.value))),this.reportService.showReportData=!0,this.reportService.state=void 0),this.programs=this.reportService.filterPrograms(this.filters,void 0,!1),this.reportService.state||(this.filters.programID=this.programs[0]?.programID),this.programsOptions=[],this.programs.forEac
2436h(l=>{this.programsOptions.push({label:l.displayName,value:l.programID})})}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve))},d.\u0275cmp=A({type:d,selectors:[["app-tryout-assignment-filters"]],standalone:!1,decls:137,vars:35,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["for","tryout-assignment-type"],["styleClass","full-width","inputId","tryout-assignment-type","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["for","tryout-assignment-program"],["styleClass","full-width","inputId","tryout-assignment-program","appendTo","body",3,"ngModelChange","ngModel","options"],["for","tryout-assignment-registration"],["optionLabel","name","inputId","tryout-assignment-registration","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-2"],["for","tryout-assignment-last-name"],["type","text","id","tryout-assignment-last-name",3,"ngModelChange","ngModel"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["for","tryout-assignment-birthdate-range-filter",1,"sr-only"],["for","tryout-assignment-birthdate-from-filter",1,"sr-only"],["for","tryout-assignment-birthdate-to-filter",1,"sr-only"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","inputId","tryout-assignment-birthdate-range-filter","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],["role","button",1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2","col-lg-1"],["for","tryout-assignment-gender"],["styleClass","full-width","inputId","tryout-assignment-gender","appendTo","body",3,"ngModelChange","ngModel","options"],["for","tryout-assignment-status"],["optionLabel","label","inputId","tryout-assignment-status","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["for","tryout-assignment-team"],["optionLabel","name","inputId","tryout-assignment-team","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-2","col-lg-2"],["for","tryout-assignment-test-players"],["styleClass","full-width","inputId","tryout-assignment-test-players","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-2","col-lg-3"],["for","tryout-assignment-not-assigned-players"],["styleClass","full-width","inputId","tryout-assignment-not-assigned-players","appendTo","body",3,"ngModelChange","ngModel","options"],["for","tryout-assignment-club"],["styleClass","full-width","inputId","tryout-assignment-club","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","inputId","tryout-assignment-birthdate-from-filter","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","inputId","tryout-assignment-birthdate-to-filter","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","inputId","tryout-assignment-birthdate-from-filter","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","inputId","tryout-assignment-birthdate-to-filter","appendTo","body",3,"ngModelChange","ngModel"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2437  `),_(2,rc,12,2),n(3,"div",2),e(4,`
2438    `),n(5,"div",3),e(6,`
2439      `),n(7,"label",4),e(8,"Program Type"),i(),e(9,`
2440      `),n(10,"p-select",5),y("ngModelChange",function(u){return S(a.filters.programTypeID,u)||(a.filters.programTypeID=u),u}),T("onChange",function(){return a.filterPrograms()}),i(),e(11,`
2441    `),i(),e(12,`
2442  `),i(),e(13,`
2443  `),n(14,"div",6),e(15,`
2444    `),n(16,"div",3),e(17,`
2445      `),n(18,"label",7),e(19,"Program"),i(),e(20,`
2446      `),n(21,"p-select",8),y("ngModelChange",function(u){return S(a.filters.programID,u)||(a.filters.programID=u),u}),i(),e(22,`
2447    `),i(),e(23,`
2448  `),i(),e(24,`
2449  `),n(25,"div",2),e(26,`
2450    `),n(27,"div",3),e(28,`
2451      `),n(29,"label",9),e(30,"Registration"),i(),e(31,`
2452      `),n(32,"p-multiSelect",10),y("ngModelChange",function(u){return S(a.filters.registrations,u)||(a.filters.registrations=u),u}),e(33,`
2453      `),i(),e(34,`
2454    `),i(),e(35,`
2455  `),i(),e(36,`
2456  `),n(37,"div",11),e(38,`
2457    `),n(39,"div",3),e(40,`
2458      `),n(41,"label",12),e(42,"Last Name"),i(),e(43,`
2459      `),n(44,"input",13),y("ngModelChange",function(u){return S(a.filters.playerName,u)||(a.filters.playerName=u),u}),i(),e(45,`
2460    `),i(),e(46,`
2461  `),i(),e(47,`
2462  `),n(48,"div",14),e(49,`
2463    `),n(50,"div",15),e(51,`
2464      `),n(52,"label"),e(53,"Birth Date"),i(),e(54,`
2465      `),n(55,"label",16),e(56,"Range Toggle"),i(),e(57,`
2466      `),n(58,"label",17),e(59,"Birth Date From"),i(),e(60,`
2467      `),n(61,"label",18),e(62,"Birth Date To"),i(),e(63,`
2468      `),n(64,"p-select",19),T("onChange",function(){return a.filters.dobFrom=void 0,a.filters.dobTo=void 0}),y("ngModelChange",function(u){return S(a.filters.dobType,u)||(a.filters.dobType=u),u}),i(),e(65,`
2469      `),n(66,"span",20)(67,"p-inputgroup"),e(68,`
2470        `),_(69,ac,9,8)(70,lc,10,2),i(),e(71,`
2471        `),n(72,"a",21),T("click",function(){return a.filters.dobFrom=void 0,a.filters.dobTo=void 0}),e(73,`
2472          `),g(74,"i",22),e(75,`
2473        `),i(),e(76,`
2474      `),i(),e(77,`
2475    `),i(),e(78,`
2476  `),i(),e(79,`
2477  `),n(80,"div",23),e(81,`
2478    `),n(82,"div",3),e(83,`
2479      `),n(84,"label",24),e(85,"Gender"),i(),e(86,`
2480      `),n(87,"p-select",25),y("ngModelChange",function(u){return S(a.filters.genderID,u)||(a.filters.genderID=u),u}),i(),e(88,`
2481    `),i(),e(89,`
2482  `),i(),e(90,`
2483  `),n(91,"div",11),e(92,`
2484    `),n(93,"div",3),e(94,`
2485      `),n(95,"label",26),e(96,"Status"),i(),e(97,`
2486      `),n(98,"p-multiSelect",27),y("ngModelChange",function(u){return S(a.filters.statuses,u)||(a.filters.statuses=u),u}),e(99,`
2487      `),i(),e(100,`
2488    `),i(),e(101,`
2489  `),i(),e(102,`
2490  `),n(103,"div",2),e(104,`
2491    `),n(105,"div",3),e(106,`
2492      `),n(107,"label",28),e(108,"Team"),i(),e(109,`
2493      `),n(110,"p-multiSelect",29),y("ngModelChange",function(u){return S(a.filters.teams,u)||(a.filters.teams=u),u}),e(111,`
2494      `),i(),e(112,`
2495    `),i(),e(113,`
2496  `),i(),e(114,`
2497  `),n(115,"div",30),e(116,`
2498    `),n(117,"div",3),e(118,`
2499      `),n(119,"label",31),e(120,"Test Players"),i(),e(121,`
2500      `),n(122,"p-select",32),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(123,`
2501    `),i(),e(124,`
2502  `),i(),e(125,`
2503  `),n(126,"div",33),e(127,`
2504    `),n(128,"div",3),e(129,`
2505      `),n(130,"label",34),e(131,"Not Assigned Players"),i(),e(132,`
2506      `),n(133,"p-select",35),y("ngModelChange",function(u){return S(a.filters.notAssignedPlayerOption,u)||(a.filters.notAssignedPlayerOption=u),u}),i(),e(134,`
2507    `),i(),e(135,`
2508  `),i(),e(136,`
2509`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.programTypeID),m("options",a.programTypes),s(11),C("ngModel",a.filters.programID),m("options",a.programsOptions),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.registrations),m("options",a.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registration(s) selected"),s(12),C("ngModel",a.filters.playerName),s(20),m("options",a.yearTypes),C("ngModel",a.filters.dobType),s(5),x(a.filters.dobType===1?69:70),s(18),C("ngModel",a.filters.genderID),m("options",a.genderOptions),s(11),C("ngModel",a.filters.statuses),m("options",a.inviteStatuses)("filter",!1)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} status selected"),s(12),C("ngModel",a.filters.teams),m("options",a.teams)("filter",!1)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} team(s) selected"),s(12),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(11),C("ngModel",a.filters.notAssignedPlayerOption),m("options",a.notAssignedPlayerOptions))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2509)();var dc=["form"];function pc(o,d){if(o&1&&(e(0,`
2510          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
2511          `),i(),e(5,`
2512        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2513            `,t.header,`
2514            `),s(),m("field",t.field)}}function mc(o,d){if(o&1&&(e(0,`
2515      `),n(1,"tr"),e(2,`
2516        `),N(3,pc,6,4,null,null,W),g(5,"th"),e(6,`
2517      `),i(),e(7,`
2518    `)),o&2){let t=p();s(3),V(t.columns)}}function cc(o,d){if(o&1){let t=D();e(0,`
2519            `),n(1,"button",7),T("click",function(){f(t);let r=p().$implicit,a=p();return h(a.reviewRefundRequest(r))}),e(2,`
2520              Review
2521            `),i(),e(3,`
2522          `)}}function uc(o,d){if(o&1&&(e(0,`
2523      `),n(1,"tr"),e(2,`
2524        `),n(3,"td"),e(4),v(5,"utcDate"),i(),e(6,`
2525        `),n(7,"td"),e(8),v(9,"utcDate"),i(),e(10,`
2526        `),n(11,"td"),e(12),i(),e(13,`
2527        `),n(14,"td"),e(15),i(),e(16,`
2528        `),n(17,"td"),e(18),i(),e(19,`
2529        `),n(20,"td"),e(21),i(),e(22,`
2530        `),n(23,"td"),e(24),i(),e(25,`
2531        `),n(26,"td"),e(27),i(),e(28,`
2532        `),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
2533        `),n(33,"td"),e(34),v(35,"uppercase"),i(),e(36,`
2534        `),n(37,"td"),e(38),v(39,"uppercase"),i(),e(40,`
2535        `),n(41,"td"),e(42),v(43,"utcDate"),i(),e(44,`
2536        `),n(45,"td"),e(46),v(47,"utcDate"),i(),e(48,`
2537        `),n(49,"td"),e(50),i(),e(51,`
2538        `),n(52,"td"),e(53),i(),e(54,`
2539        `),n(55,"td"),e(56,`
2540          `),_(57,cc,4,0),i(),e(58,`
2541      `),i(),e(59,`
2542    `)),o&2){let t=d.$implicit,l=p();s(4),c(B(5,16,t.requestedOn,"M/d/y")),s(4),c(B(9,19,t.cancelledOn,"M/d/y")),s(4),c(t.playerID),s(3),c(t.playerName),s(3),c(t.clubUserID),s(3),c(t.userName),s(3),c(t.programName),s(3),c(t.registrationName),s(3),c(E(31,22,t.refundAmount)),s(4),c(E(35,24,t.refundType)),s(4),c(E(39,26,t.refundStatus)),s(4),c(B(43,28,t.reviewedOn,"M/d/y")),s(4),c(B(47,31,t.sentOn,"M/d/y")),s(4),c(t.checkNumber),s(3),c(t.notes),s(4),x(t.refundRequestStatusID===l.RefundRequestStatus.PENDING?57:-1)}}function _c(o,d){if(o&1){let t=D();e(0,`
2543  `),n(1,"app-refund-request-review",8),T("close",function(){f(t);let r=p();return h(r.showEditDialog=!1)})("save",function(){f(t);let r=p();return h(r.saved())}),e(2,`
2544  `),i(),e(3,`
2545`)}if(o&2){let t=p();s(),m("programName",t.reviewItem.programName)("refundRequestID",t.reviewItem.refundRequestID)("refundRequestReviewTypeID",t.reviewItem.refundRequestReviewTypeID)}}var Jo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.RefundRequestStatus=si,this.showEditDialog=!1,this.unsubsribe$=new ge}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"requestedOn",header:"Requested On"},{field:"cancelledOn",header:"Cancellation Date"},{field:"playerID",header:"Player ID"},{field:"playerName",header:"Player Name"},{field:"clubUserID",header:"User ID"},{field:"userName",header:"User Name"},{field:"programName",header:"Program Name"},{field:"registrationName",header:"Registration Name"},{field:"refundAmount",header:"Refund Amount"},{field:"refundType",header:"Request Amount Type"},{field:"refundStatus",header:"Refund Status"},{field:"reviewedOn",header:"Reviewed On"},{field:"sentOn",header:"Check Sent On"},{field:"checkNumber",header:"Check Number"},{field:"notes",header:"Notes"}]}getReportData(l){let r=this.reportService.reportFilters[F.REFUNDS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getRefundsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}reviewRefundRequest(l){this.reviewItem=Tt(vt({},l),{sentOn:new Date}),this.showEditDialog=!0}saved(){this.getReportData(null),this.showEditDialog=!1,this.reviewItem=null}ngOnDestroy(){this.runSubscription$.unsubscribe(),this.unsubsribe$.next(),this.unsubsribe$.complete()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-refunds-table"]],viewQuery:function(r,a){
2545if(r&1&&Wt(dc,5),r&2){let b;Ut(b=Yt())&&(a.form=b.first)}},standalone:!1,decls:12,vars:10,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","requestedOn","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[1,"btn","btn-primary",3,"click"],[3,"close","save","programName","refundRequestID","refundRequestReviewTypeID"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2546  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2547    `),R(5,mc,8,0,"ng-template",3),e(6,`
2548    `),R(7,uc,60,34,"ng-template",4),e(8,`
2549  `),i(),e(9,`
2550`),i(),e(10,`
2551
2552`),_(11,_c,4,3)),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading),s(9),x(a.showEditDialog?11:-1))},dependencies:[z,H,$,K,ro,yn,Ce,se],encapsulation:2});let o=d;return o}
2552)();function gc(o,d){if(o&1){let t=D();e(0,`
2553    `),n(1,"div",9),e(2,`
2554      `),n(3,"div",2),e(4,`
2555        `),n(5,"label"),e(6,"Club"),i(),e(7,`
2556        `),n(8,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
2557        `),i(),e(10,`
2558      `),i(),e(11,`
2559    `),i(),e(12,`
2560  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function fc(o,d){if(o&1){let t=D();e(0,`
2561        `),n(1,"p-multiSelect",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.statuses,r)||(a.filters.statuses=r),h(r)}),e(2,`
2562        `),i(),e(3,`
2563      `)}if(o&2){let t=p();s(),C("ngModel",t.filters.statuses),m("options",t.refundStatuses)("filter",!1)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder","Select a Refund Status")}}var Xo=(()=>{let d=class d{constructor(l){this.reportService=l,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.REFUNDS]===void 0&&(this.reportService.reportFilters[F.REFUNDS]=new P,this.reportService.reportFilters[F.REFUNDS].dateFrom=null),this.filters=this.reportService.reportFilters[F.REFUNDS],this.reportService.clubs?.length>1&&!this.filters.clubs&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID)]),this.reportService.getRefundStatuses().subscribe(l=>{this.refundStatuses=l,this.reportService.state?(this.filters.dateFrom=this.reportService.state.dateFrom,this.filters.dateTo=this.reportService.state.dateTo,this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(r=>r.clubID===this.reportService.state.clubID)]),this.reportService.state.refundRequestStatus?this.filters.statuses=[this.refundStatuses.find(r=>r.value===this.reportService.state.refundRequestStatus)]:this.filters.statuses=[this.refundStatuses.find(r=>r.value===si.PENDING)],this.reportService.showReportData=!0):this.filters.statuses=[this.refundStatuses.find(r=>r.value===si.PENDING)]}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REFUNDS]})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-refunds-filters"]],standalone:!1,decls:64,vars:7,consts:[[1,"row"],[1,"col-md-6","col-lg-4"],[1,"form-group"],[1,"d-flex","align-items-center"],["id","dateFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-3"],[1,"col-md-5","col-lg-3"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
2564  `),_(2,gc,13,7),n(3,"div",1),e(4,`
2565    `),n(5,"div",2),e(6,`
2566      `),n(7,"label"),e(8,"Requested Date"),i(),e(9,`
2567      `),n(10,"span",3)(11,"p-inputgroup"),e(12,`
2568        `),n(13,"p-datepicker",4),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(14,`
2569        `),i(),e(15,`
2570        `),n(16,"p-inputgroup-addon"),e(17,"to"),i(),e(18,`
2571        `),n(19,"p-datepicker",5),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(20,`
2572        `),i(),e(21,`
2573        `),i(),e(22,`
2574        `),n(23,"a",6),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(24,`
2575          `),g(25,"i",7),e(26,`
2576        `),i(),e(27,`
2577      `),i(),e(28,`
2578    `),i(),e(29,`
2579  `),i(),e(30,`
2580  `),n(31,"div",8),e(32,`
2581    `),n(33,"div",2),e(34,`
2582      `),n(35,"label"),e(36,"Refund Status"),i(),e(37,`
2583      `),_(38,fc,4,6),i(),e(39,`
2584  `),i(),e(40,`
2585  `),n(41,"div",9),e(42,`
2586    `),n(43,"div",2),e(44,`
2587      `),n(45,"label",10),e(46,"User/Player Last Name"),i(),e(47,`
2588      `),n(48,"input",11),y("ngModelChange",function(u){return S(a.filters.playerName,u)||(a.filters.playerName=u),u}),i(),e(49,`
2589    `),i(),e(50,`
2590  `),i(),e(51,`
2591  `),n(52,"div",12),e(53,`
2592    `),n(54,"div",2),e(55,`
2593      `),n(56,"label"),e(57,"Test Users/Players"),i(),e(58,`
2594      `),n(59,"p-select",13),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),e(60,`
2595      `),i(),e(61,`
2596    `),i(),e(62,`
2597  `),i(),e(63,`
2598`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(11),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),x(a.refundStatuses?38:-1),s(10),C("ngModel",a.filters.playerName),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2598)();function Cc(o,d){if(o&1){let t=D();e(0,`
2599    `),n(1,"div",3),e(2,`
2600      `),n(3,"div",2),e(4,`
2601        `),n(5,"label"),e(6,"Club"),i(),e(7,`
2602        `),n(8,"p-multiSelect",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
2603        `),i(),e(10,`
2604      `),i(),e(11,`
2605    `),i(),e(12,`
2606  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Sc(o,d){if(o&1){let t=D();e(0,`
2607        `),n(1,"p-multiSelect",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.permissions,r)||(a.filters.permissions=r),h(r)}),e(2,`
2608        `),i(),e(3,`
2609      `)}if(o&2){let t=p();s(),C("ngModel",t.filters.permissions),m("options",t.permissions)("filter",!1)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} permission(s) selected")}}var Zo=(()=>{let d=class d{constructor(l){this.reportService=l,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.PERMISSIONS]===void 0&&(this.reportService.reportFilters[F.PERMISSIONS]=new P),this.filters=this.reportService.reportFilters[F.PERMISSIONS],this.reportService.clubs?.length>1&&!this.filters.clubs&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID)]),this.reportService.getPermissions().subscribe(l=>{this.permissions=l}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.PERMISSIONS]}),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-permissions-filters"]],standalone:!1,decls:35,vars:5,consts:[[1,"row"],[1,"col-md-3"],[1,"form-group"],[1,"col-md-5","col-lg-3"],["for","userName"],["id","userName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
2610  `),_(2,Cc,13,7),n(3,"div",1),e(4,`
2611    `),n(5,"div",2),e(6,`
2612      `),n(7,"label"),e(8,"Permission"),i(),e(9,`
2613      `),_(10,Sc,4,6),i(),e(11,`
2614  `),i(),e(12,`
2615  `),n(13,"div",3),e(14,`
2616    `),n(15,"div",2),e(16,`
2617      `),n(17,"label",4),e(18,"Last Name"),i(),e(19,`
2618      `),n(20,"input",5),y("ngModelChange",function(u){return S(a.filters.userName,u)||(a.filters.userName=u),u}),i(),e(21,`
2619    `),i(),e(22,`
2620  `),i(),e(23,`
2621  `),n(24,"div",6),e(25,`
2622    `),n(26,"div",2),e(27,`
2623      `),n(28,"label"),e(29,"Test Players"),i(),e(30,`
2624      `),n(31,"p-select",7),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(32,`
2625    `),i(),e(33,`
2626  `),i(),e(34,`
2627`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),x(a.permissions?10:-1),s(10),C("ngModel",a.filters.userName),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[fe,U,Y,q,Q],encapsulation:2});let o=d;return o}
2627)();function bc(o,d){if(o&1&&(e(0,`
2628          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
2629          `),i(),e(5,`
2630        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2631            `,t.header,`
2632            `),s(),m("field",t.field)}}function vc(o,d){if(o&1&&(e(0,`
2633      `),n(1,"tr"),e(2,`
2634        `),N(3,bc,6,4,null,null,W),i(),e(5,`
2635    `)),o&2){let t=p();s(3),V(t.columns)}}function Tc(o,d){if(o&1&&(e(0,`
2636          `),n(1,"td"),e(2),i(),e(3,`
2637        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Ec(o,d){if(o&1&&(e(0,`
2638      `),n(1,"tr"),e(2,`
2639        `),_(3,Tc,4,1),n(4,"td"),e(5),i(),e(6,`
2640        `),n(7,"td"),e(8),i(),e(9,`
2641        `),n(10,"td"),e(11),i(),e(12,`
2642      `),i(),e(13,`
2643    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.clubUserID),s(3),c(t.userName),s(3),c(t.permissionName)}}var Qo=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"clubUserID",header:"User ID"},{field:"userName",header:"User Name"},{field:"permissionName",header:"Permission"}]}getReportData(l){let r=this.reportService.reportFilters[F.PERMISSIONS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getPermissionsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-permissions-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","userName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2644  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2645    `),R(5,vc,6,0,"ng-template",3),e(6,`
2646    `),R(7,Ec,14,4,"ng-template",4),e(8,`
2647  `),i(),e(9,`
2648`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",1)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K],encapsulation:2});let o=d;return o}
2648)();function Fc(o,d){if(o&1&&(e(0,`
2649          `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
2650          `),i(),e(5,`
2651        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2652            `,t.header,`
2653            `),s(),m("field",t.field)}}function Dc(o,d){if(o&1&&(e(0,`
2654      `),n(1,"tr"),e(2,`
2655        `),N(3,Fc,6,4,null,null,W),i(),e(5,`
2656      `),n(6,"tr",5),e(7,`
2657        `),g(8,"td"),e(9,`
2658        `),n(10,"td",6),e(11),v(12,"accountingCurrency"),i(),e(13,`
2659        `),n(14,"td",6),e(15),v(16,"accountingCurrency"),i(),e(17,`
2660        `),n(18,"td",6),e(19),v(20,"accountingCurrency"),i(),e(21,`
2661        `),n(22,"td",6),e(23),v(24,"accountingCurrency"),i(),e(25,`
2662        `),n(26,"td",6),e(27),v(28,"accountingCurrency"),i(),e(29,`
2663        `),n(30,"td",6),e(31),v(32,"accountingCurrency"),i(),e(33,`
2664        `),n(34,"td",6),e(35),v(36,"accountingCurrency"),i(),e(37,`
2665        `),n(38,"td",6),e(39),v(40,"accountingCurrency"),i(),e(41,`
2666        `),n(42,"td",6),e(43),v(44,"accountingCurrency"),i(),e(45,`
2667        `),n(46,"td",6),e(47),v(48,"accountingCurrency"),i(),e(49,`
2668        `),n(50,"td",6),e(51),v(52,"accountingCurrency"),i(),e(53,`
2669      `),i(),e(54,`
2670    `)),o&2){let t=p();s(3),V(t.columns),s(8),c(E(12,11,t.totalCreditCardFees)),s(4),c(E(16,13,t.totalPayRixCreditCardFees)),s(4),c(E(20,15,t.totalInterchangeFees)),s(4),c(E(24,17,t.totalPayRixReverseAuthFees)),s(4),c(E(28,19,t.totalNetCCRevenue)),s(4),c(E(32,21,t.totalACHFees)),s(4),c(E(36,23,t.totalPayRixACHFees)),s(4),c(E(40,25,t.totalPayRixACHReturnFees)),s(4),c(E(44,27,t.totalNetACHRevenue)),s(4),c(E(48,29,t.totalPayRixPayoutFees)),s(4),c(E(52,31,t.totalNetRevenue))}}function Ic(o,d){if(o&1&&(e(0,`
2671      `),n(1,"tr"),e(2,`
2672        `),n(3,"td"),e(4),i(),e(5,`
2673        `),n(6,"td"),e(7),v(8,"accountingCurrency"),i(),e(9,`
2674        `),n(10,"td"),e(11),v(12,"accountingCurrency"),i(),e(13,`
2675        `),n(14,"td"),e(15),v(16,"accountingCurrency"),i(),e(17,`
2676        `),n(18,"td"),e(19),v(20,"accountingCurrency"),i(),e(21,`
2677        `),n(22,"td"),e(23),v(24,"accountingCurrency"),i(),e(25,`
2678        `),n(26,"td"),e(27),v(28,"accountingCurrency"),i(),e(29,`
2679        `),n(30,"td"),e(31),v(32,"accountingCurrency"),i(),e(33,`
2680        `),n(34,"td"),e(35),v(36,"accountingCurrency"),i(),e(37,`
2681        `),n(38,"td"),e(39),v(40,"accountingCurrency"),i(),e(41,`
2682        `),n(42,"td"),e(43),v(44,"accountingCurrency"),i(),e(45,`
2683        `),n(46,"td"),e(47),v(48,"accountingCurrency"),i(),e(49,`
2684      `),i(),e(50,`
2685    `)),o&2){let t=d.$implicit;s(4),c(t.clubName),s(3),c(E(8,12,t.creditCardFees)),s(4),c(E(12,14,t.payRixCreditCardFees)),s(4),c(E(16,16,t.interchangeFees)),s(4),c(E(20,18,t.payRixReverseAuthFees)),s(4),c(E(24,20,t.netCCRevenue)),s(4),c(E(28,22,t.achFees)),s(4),c(E(32,24,t.payRixACHFees)),s(4),c(E(36,26,t.payRixACHReturnFees)),s(4),c(E(40,28,t.netACHRevenue)),s(4),c(E(44,30,t.payRixPayoutFees)),s(4),c(E(48,32,t.netRevenue))}}var er=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"clubName",header:"Club Name"},{field:"creditCardFees",header:"CC Fees Collected"},{field:"payRixCreditCardFees",header:"PayRix Credit Card Fees"},{field:"interchangeFees",header:"Interchange Fees"},{field:"payRixReverseAuthFees",header:"PayRix Reverse Auth Fees"},{field:"netCCRevenue",header:"Net CC Revenue"},{field:"achFees",header:"ACH Fees Collected"},{field:"payRixACHFees",header:"PayRix ACH Fees"},{field:"payRixACHReturnFees",header:"PayRix ACH Return Fees"},{field:"netACHRevenue",header:"Net ACH Revenue"},{field:"payRixPayoutFees",header:"PayRix Payout Fees"},{field:"netRevenue",header:"Net Revenue"}]}getReportData(l){let r=this.reportService.reportFilters[F.REVENUE];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getRevenueData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalCreditCardFees=a.totalCreditCardFees,this.totalACHFees=a.totalACHFees,this.totalPayRixCreditCardFees=a.totalPayRixCreditCardFees,this.totalPayRixACHFees=a.totalPayRixACHFees,this.totalPayRixACHReturnFees=a.totalPayRixACHReturnFees,this.totalInterchangeFees=a.totalInterchangeFees,this.totalPayRixPayoutFees=a.totalPayRixPayoutFees,this.totalPayRixReverseAuthFees=a.totalPayRixReverseAuthFees,this.totalNetRevenue=a.totalNetRevenue,this.totalNetCCRevenue=a.totalNetCCRevenue,this.totalNetACHRevenue=a.totalNetACHRevenue,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-revenue-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","clubName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2686  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2687    `),R(5,Dc,55,33,"ng-template",3),e(6,`
2688    `),R(7,Ic,51,34,"ng-template",4),e(8,`
2689  `),i(),e(9,`
2690`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,se],encapsulation:2});let o=d;return o}
2690)();var tr=(()=>{let d=class d{constructor(l){this.reportService=l}ngOnInit(){this.reportService.reportFilters[F.REVENUE]===void 0&&(this.reportService.reportFilters[F.REVENUE]=new P),this.filters=this.reportService.reportFilters[F.REVENUE],this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REVENUE]}),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-revenue-filters"]],standalone:!1,decls:42,vars:9,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
2691     `),n(2,"div",1),e(3,`
2692          `),n(4,"div",2),e(5,`
2693               `),n(6,"label"),e(7,"Club"),i(),e(8,`
2694               `),n(9,"p-multiSelect",3),y("ngModelChange",function(u){return S(a.filters.clubs,u)||(a.filters.clubs=u),u}),e(10,`
2695               `),i(),e(11,`
2696          `),i(),e(12,`
2697     `),i(),e(13,`
2698     `),n(14,"div",4),e(15,`
2699          `),n(16,"div",2),e(17,`
2700               `),n(18,"label"),e(19,"Transaction Date"),i(),e(20,`
2701               `),n(21,"span",5)(22,"p-inputgroup"),e(23,`
2702                    `),n(24,"p-datepicker",6),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(25,`
2703                    `),i(),e(26,`
2704                    `),n(27,"p-inputgroup-addon"),e(28,"to"),i(),e(29,`
2705                    `),n(30,"p-datepicker",7),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(31,`
2706                    `),i(),e(32,`
2707                    `),i(),e(33,`
2708                    `),n(34,"a",8),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(35,`
2709                         `),g(36,"i",9),e(37,`
2710                    `),i(),e(38,`
2711               `),i(),e(39,`
2712          `),i(),e(40,`
2713     `),i(),e(41,`     
2714`),i()),r&2&&(s(9),m("autofocusFilter",!0),C("ngModel",a.filters.clubs),m("options",a.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected"),s(15),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo))},dependencies:[U,Y,ie,ne,te,Q],encapsulation:2});let o=d;return o}
2714)();var Ac=o=>["/admin/players",o,"overview"];function Pc(o,d){if(o&1&&(e(0,`
2715          `),n(1,"th"),e(2),i(),e(3,`
2716        `)),o&2){let t=d.$implicit;s(2),I(`
2717            `,t.header,`
2718          `)}}function Oc(o,d){if(o&1&&(e(0,`
2719      `),n(1,"tr"),e(2,`
2720        `),N(3,Pc,4,1,null,null,W),i(),e(5,`
2721    `)),o&2){let t=p();s(3),V(t.columns)}}function Lc(o,d){if(o&1&&(e(0,`
2722          `),n(1,"td"),e(2),i(),e(3,`
2723        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Nc(o,d){if(o&1&&(e(0,`
2724            `),n(1,"a",5),e(2),i(),e(3,`
2725          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Ac,t.playerID)),s(),c(t.playerName)}}function Vc(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
2726            `,t.playerName,`
2727          `)}}function kc(o,d){if(o&1&&(e(0,`
2728      `),n(1,"tr"),e(2,`
2729        `),_(3,Lc,4,1),n(4,"td"),e(5),v(6,"utcDate"),i(),e(7,`
2730        `),n(8,"td"),e(9),i(),e(10,`
2731        `),n(11,"td"),e(12),i(),e(13,`
2732        `),n(14,"td"),e(15),i(),e(16,`
2733        `),n(17,"td"),e(18),i(),e(19,`
2734        `),n(20,"td"),e(21,`
2735          `),_(22,Nc,4,4)(23,Vc,1,1),i(),e(24,`
2736        `),n(25,"td"),e(26),v(27,"accountingCurrency"),i(),e(28,`
2737        `),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
2738        `),n(33,"td"),e(34),v(35,"accountingCurrency"),i(),e(36,`
2739        `),n(37,"td"),e(38),v(39,"accountingCurrency"),i(),e(40,`
2740        `),n(41,"td"),e(42),v(43,"accountingCurrency"),i(),e(44,`
2741        `),n(45,"td"),e(46),v(47,"accountingCurrency"),i(),e(48,`
2742        `),n(49,"td"),e(50),v(51,"accountingCurrency"),i(),e(52,`
2743        `),n(53,"td"),e(54),v(55,"accountingCurrency"),i(),e(56,`
2744        `),n(57,"td"),e(58),v(59,"accountingCurrency"),i(),e(60,`
2745        `),n(61,"td"),e(62),i(),e(63,`
2746        `),n(64,"td"),e(65),v(66,"date"),i(),e(67,`
2747        `),n(68,"td"),e(69),i(),e(70,`
2748      `),i(),e(71,`
2749    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,19,t.transDate,"M/d/yyyy")),s(4),c(t.refID),s(3),c(t.event),s(3),c(t.programName),s(3),c(t.regName),s(4),x(l.reportService.profile[l.Permission.Profile]?22:23),s(4),c(E(27,22,t.regPrice)),s(4),c(E(31,24,t.amountDue)),s(4),c(E(35,26,t.discount)),s(4),c(E(39,28,t.finAidUsed)),s(4),c(E(43,30,t.adminFee)),s(4),c(E(47,32,t.netAmountDue)),s(4),c(E(51,34,t.amountPaid)),s(4),c(E(55,36,t.creditUsed)),s(4),c(E(59,38,t.runningTotal)),s(4),c(t.transactionID),s(3),c(B(66,40,t.reimbursementDate,"M/d/y")),s(4),c(t.reimbursementID)}}var ir=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"transDate",header:"Transaction Date"},{field:"refID",header:"Ref ID"},{field:"event",header:"Event"},{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"playerName",header:"Player Name"},{field:"regPrice",header:"Registration Price"},{field:"amountDue",header:"List Transaction Amount"},{field:"discount",header:"Discount"},{field:"finAidUsed",header:"Financial Aid"},{field:"adminFee",header:"Admin Fee"},{field:"netAmountDue",header:"Net Transaction Amount"},{field:"amountPaid",header:"Paid (Refunded) Cash"},{field:"creditUsed",header:"Used (Issued) Credit"},{field:"runningTotal",header:"Player Balance"},{field:"transactionID",header:"Transaction ID"},{field:"reimbursementDate",header:"Reimbursement Date"},{field:"reimbursementID",header:"Reimbursement ID"}]}getReportData(l){let r=this.reportService.reportFilters[F.LEDGER];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getLedgerData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-ledger-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","clubName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
2750  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
2751    `),R(5,Oc,6,0,"ng-template",3),e(6,`
2752    `),R(7,kc,72,43,"ng-template",4),e(8,`
2753  `),i(),e(9,`
2754`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,de,Ce,se],encapsulation:2});let o=d;return o}
2754)();function Wc(o,d){if(o&1){let t=D();e(0,`
2755    `),n(1,"div",1),e(2,`
2756      `),n(3,"div",2),e(4,`
2757        `),n(5,"label"),e(6,"Club"),i(),e(7,`
2758        `),n(8,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
2759        `),i(),e(10,`
2760      `),i(),e(11,`
2761    `),i(),e(12,`
2762  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var nr=(()=>{let d=class d{constructor(l){this.reportService=l,this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.LEDGER]===void 0&&(this.reportService.reportFilters[F.LEDGER]=new P),this.filters=this.reportService.reportFilters[F.LEDGER],this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.LEDGER]}),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-ledger-filters"]],standalone:!1,decls:53,vars:6,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-2","col-lg-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
2763  `),_(2,Wc,13,7),n(3,"div",1),e(4,`
2764    `),n(5,"div",2),e(6,`
2765      `),n(7,"label",3),e(8,"Player Last Name"),i(),e(9,`
2766      `),n(10,"input",4),y("ngModelChange",function(u){return S(a.filters.playerName,u)||(a.filters.playerName=u),u}),i(),e(11,`
2767    `),i(),e(12,`
2768  `),i(),e(13,`
2769  `),n(14,"div",5),e(15,`
2770    `),n(16,"div",2),e(17,`
2771      `),n(18,"label"),e(19,"Test Players"),i(),e(20,`
2772      `),n(21,"p-select",6),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(22,`
2773    `),i(),e(23,`
2774  `),i(),e(24,`
2775  `),n(25,"div",7),e(26,`
2776    `),n(27,"div",2),e(28,`
2777      `),n(29,"label"),e(30,"Only users with transactions between"),i(),e(31,`
2778      `),n(32,"span",8)(33,"p-inputgroup"),e(34,`
2779        `),n(35,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(36,`
2780        `),i(),e(37,`
2781        `),n(38,"p-inputgroup-addon"),e(39,"to"),i(),e(40,`
2782        `),n(41,"p-datepicker",10),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(42,`
2783        `),i(),e(43,`
2784        `),i(),e(44,`
2785        `),n(45,"a",11),T("click",function(){return a.filters.dateFrom=a.reportService.defaultDate,a.filters.dateTo=void 0}),e(46,`
2786          `),g(47,"i",12),e(48,`
2787        `),i(),e(49,`
2788      `),i(),e(50,`
2789    `),i(),e(51,`
2790  `),i(),e(52,`
2791`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.playerName),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(14),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
2791)();function Yc(o,d){if(o&1){let t=D();e(0,`
2792      `),n(1,"div",6),e(2,`
2793        `),n(3,"div",2),e(4,`
2794          `),n(5,"label"),e(6,"Club"),i(),e(7,`
2795          `),n(8,"p-multiSelect",7),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
2796          `),i(),e(10,`
2797        `),i(),e(11,`
2798      `),i(),e(12,`
2799    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Gc(o,d){if(o&1){let t=D();e(0,`
2800          `),n(1,"p-multiSelect",8),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(2,`
2801          `),i(),e(3,`
2802        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} teams selected")}}function jc(o,d){if(o&1){let t=D();e(0,`
2803            `),n(1,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p(3);return S(a.filters.coaches,r)||(a.filters.coaches=r),h(r)}),e(2,`
2804            `),i(),e(3,`
2805          `)}if(o&2){let t=p(3);s(),m("autofocusFilter",!0),C("ngModel",t.filters.coaches),m("options",t.coaches)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} coaches selected")}}function Hc(o,d){if(o&1&&(e(0,`
2806      `),n(1,"div",4),e(2,`
2807        `),n(3,"div",2),e(4,`
2808          `),n(5,"label"),e(6,"Coaches"),i(),e(7,`
2809          `),_(8,jc,4,7),i(),e(9,`
2810      `),i(),e(10,`
2811    `)),o&2){let t=p(2);s(8),x(t.coaches?8:-1)}}function zc(o,d){if(o&1){let t=D();e(0,`
2812          `),n(1,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.birthYears,r)||(a.filters.birthYears=r),h(r)}),e(2,`
2813          `),i(),e(3,`
2814        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.birthYears),m("options",t.birthdays)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} years selected")}}function qc(o,d){if(o&1){let t=D();e(0,`
2815          `),n(1,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(2,`
2816          `),i(),e(3,`
2817        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected")}}function $c(o,d){if(o&1){let t=D();e(0,`
2818          `),n(1,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.priorSeasons,r)||(a.filters.priorSeasons=r),h(r)}),e(2,`
2819          `),i(),e(3,`
2820        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.priorSeasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected")}}function Kc(o,d){if(o&1){let t=D();e(0,`
2821      `),n(1,"div",1),e(2,`
2822        `),n(3,"div",2),e(4,`
2823          `),n(5,"label"),e(6,"Years to Compare"),i(),e(7,`
2824          `),n(8,"p-select",3),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programGroupYear,r)||(a.filters.programGroupYear=r),h(r)}),i(),e(9,`
2825        `),i(),e(10,`
2826      `),i(),e(11,`
2827    `)}if(o&2){let t=p(2);s(8),C("ngModel",t.filters.programGroupYear),m("options",t.programGroupYearOptions)}}function Jc(o,d){if(o&1){let t=D();e(0,`
2828  `),n(1,"div",0),e(2,`
2829    `),_(3,Yc,13,7),n(4,"div",1),e(5,`
2830      `),n(6,"div",2),e(7,`
2831        `),n(8,"label"),e(9,"Gender"),i(),e(10,`
2832        `),n(11,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(12,`
2833      `),i(),e(13,`
2834    `),i(),e(14,`
2835    `),n(15,"div",4),e(16,`
2836      `),n(17,"div",2),e(18,`
2837        `),n(19,"label"),e(20,"Team"),i(),e(21,`
2838        `),_(22,Gc,4,7),i(),e(23,`
2839    `),i(),e(24,`
2840    `),_(25,Hc,11,1),n(26,"div",4),e(27,`
2841      `),n(28,"div",2),e(29,`
2842        `),n(30,"label"),e(31,"Birth Year"),i(),e(32,`
2843        `),_(33,zc,4,7),i(),e(34,`
2844    `),i(),e(35,`
2845    `),n(36,"div",4),e(37,`
2846      `),n(38,"div",2),e(39,`
2847        `),n(40,"label"),e(41,"Current Season"),i(),e(42,`
2848        `),_(43,qc,4,7),i(),e(44,`
2849    `),i(),e(45,`
2850    `),n(46,"div",4),e(47,`
2851      `),n(48,"div",2),e(49,`
2852        `),n(50,"label"),e(51,"Prior Season"),i(),e(52,`
2853        `),_(53,$c,4,7),i(),e(54,`
2854    `),i(),e(55,`
2855    `),n(56,"div",1),e(57,`
2856      `),n(58,"div",2),e(59,`
2857        `),n(60,"label"),e(61,"Retained?"),i(),e(62,`
2858        `),n(63,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.retainedPlayer,r)||(a.filters.retainedPlayer=r),h(r)}),i(),e(64,`
2859      `),i(),e(65,`
2860    `),i(),e(66,`
2861    `),_(67,Kc,12,2),n(68,"div",4),e(69,`
2862      `),n(70,"div",2),e(71,`
2863        `),n(72,"label"),e(73,"Player Decline Reason"),i(),e(74,`
2864        `),n(75,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.declineReasons,r)||(a.filters.declineReasons=r),h(r)}),e(76,`
2865        `),i(),e(77,`
2866      `),i(),e(78,`
2867    `),i(),e(79,`
2868    `),n(80,"div",4),e(81,`
2869      `),n(82,"div",2),e(83,`
2870        `),n(84,"label"),e(85,"Exit Reason (Staff Only View)"),i(),e(86,`
2871        `),n(87,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.exitReasons,r)||(a.filters.exitReasons=r),h(r)}),e(88,`
2872        `),i(),e(89,`
2873      `),i(),e(90,`
2874    `),i(),e(91,`
2875  `),i(),e(92,`
2876`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),x(t.teams?22:-1),s(3),x(t.isAdmin?25:-1),s(8),x(t.birthdays?33:-1),s(10),x(t.seasons?43:-1),s(10),x(t.seasons?53:-1),s(10),C("ngModel",t.filters.retainedPlayer),m("options",t.retainedPlayerOptions),s(4),x((t.programGroupYears==null?null:t.programGroupYears.length)>1?67:-1),s(8),m("autofocusFilter",!0),C("ngModel",t.filters.declineReasons),m("options",t.declineReasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} reasons selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.exitReasons),m("options",t.exitReasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} reasons selected")}}var or=(()=>{let d=class d{constructor(l,r,a,b,u,L){this.reportService=l,this.registrationService=r,this.teamService=a,this.dashboardService=b,this.authorizeService=u,this.programService=L,this.genderOptions=Ae,this.retainedPlayerOptions=An}ngOnInit(){this.reportService.reportFilters[F.RETENTION]===void 0&&(this.reportService.reportFilters[F.RETENTION]=new P),this.filters=this.reportService.reportFilters[F.RETENTION],this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l,this.isAdmin=this.profile[ee.AdminDashboard])}),oe([this.reportService.getCoaches(),this.teamService.getTeams(this.reportService.clubs,!0),this.registrationService.getRegistrationSeasons(),this.dashboardService.getProgramGroupYears(),this.programService.getDeclineInviteMetadata()]).subscribe(l=>{this.coaches=l[0].coaches,this.birthdays=l[0].birthdays,this.teams=l[1],this.seasons=l[2],this.programGroupYears=l[3],this.declineReasons=l[4].fields.find(r=>r.controlName==="declineReasonID")?.options,this.exitReasons=l[4].fields.find(r=>r.controlName==="adminDeclineReasonID")?.optionGroups.map(r=>r.items.map(a=>({label:r.label+" - "+a.label,value:a.value}
2876))).flat(),this.teams.forEach(r=>{this.filters?.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.programGroupYears&&(this.programGroupYearOptions=this.reportService.getProgramGroupYearCompareDropdownOptions(this.programGroupYears)),console.log("state: ",this.reportService.state),this.reportService.state?(this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=this.reportService.clubs.filter(r=>this.reportService.state.clubID.includes(r.clubID))),this.reportService.state.coachClubUserID?this.filters.coaches=this.coaches.filter(r=>r.value===+this.reportService.state.coachClubUserID):this.filters.coaches=void 0,this.reportService.state.birthYear?this.filters.birthYears=this.birthdays.filter(r=>this.reportService.state.birthYear.includes(r.value)):this.filters.birthYears=void 0,this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>this.reportService.state.teamID.includes(r.teamID)):this.filters.teams=void 0,this.filters.genderID=this.reportService.state.genderID?this.reportService.state.genderID:void 0,this.filters.retainedPlayer=this.reportService.state.status?this.reportService.state.status:0,this.reportService.state.programGroupYear?this.filters.programGroupYear=+this.reportService.state.programGroupYear:this.setDefaultProgramGroupYear(),this.reportService.showReportData=!0,this.reportService.state=void 0):this.setDefaultProgramGroupYear()}),this.registrationService.getRegistrationSeasons().subscribe(l=>{this.seasons=l}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.RETENTION]})}setDefaultProgramGroupYear(){this.programGroupYearOptions.length>1?this.filters.programGroupYear=+this.programGroupYearOptions.find(l=>l.value===this.programGroupYearOptions.find(r=>r.value<=new Date().getFullYear()).value).value:this.filters.programGroupYear=+this.programGroupYearOptions[0].value}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve),w(mt),w(Pe),w(At))},d.\u0275cmp=A({type:d,selectors:[["app-retention-filters"]],standalone:!1,decls:1,vars:1,consts:[[1,"row"],[1,"col-md-2"],[1,"form-group"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-2"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-3"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,Jc,93,25),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,q,Q],encapsulation:2});let o=d;return o}
2876)();var Zc=()=>({"min-width":"50%"});function Qc(o,d){if(o&1&&(e(0,`
2877          `),n(1,"th",9),e(2),g(3,"p-sortIcon",10),e(4,`
2878          `),i(),e(5,`
2879        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
2880            `,t.header,`
2881            `),s(),m("field",t.field)}}function eu(o,d){if(o&1&&(e(0,`
2882          `),n(1,"th"),e(2),i(),e(3,`
2883        `)),o&2){let t=d.$implicit;s(2),I(`
2884            `,t.header,`
2885          `)}}function tu(o,d){if(o&1&&(e(0,`
2886      `),n(1,"tr"),e(2,`
2887        `),n(3,"th"),e(4,`
2888          `),g(5,"p-tableHeaderCheckbox"),e(6,`
2889        `),i(),e(7,`
2890        `),N(8,Qc,6,4,null,null,W),N(10,eu,4,1,null,null,W),i(),e(12,`
2891    `)),o&2){let t=p();s(8),V(t.columns),s(2),V(t.optionColumns)}}function iu(o,d){if(o&1&&(e(0,`
2892            `),g(1,"p-tableCheckbox",11),e(2,`
2893          `)),o&2){let t=p().$implicit;s(),m("value",t)}}function nu(o,d){if(o&1&&(e(0,`
2894          `),n(1,"td"),e(2),i(),e(3,`
2895        `)),o&2){let t=p().$implicit;s(2),c(t.club)}}function ou(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;Ye(`
2896          `,t.coachLastName,`,
2897          `,t.coachFirstName,`
2898        `)}}function ru(o,d){o&1&&(e(0,`
2899          `),n(1,"td"),e(2,`
2900            Yes
2901          `),i(),e(3,`
2902        `))}function au(o,d){o&1&&(e(0,`
2903          `),n(1,"td"),e(2,"No"),i(),e(3,`
2904        `))}function lu(o,d){o&1&&(e(0,`
2905          `),n(1,"td"),e(2,"No - Leaving"),i(),e(3,`
2906        `))}function su(o,d){if(o&1){let t=D();e(0,`
2907          `),n(1,"a",12),T("click",function(){f(t);let r=p().$implicit,a=p();return h(a.showReasons(r))}),e(2,`Edit
2908          Exit Reason (Staff Only View)`),i(),e(3,`
2909        `)}}function du(o,d){if(o&1&&(e(0,`
2910      `),n(1,"tr"),e(2,`
2911        `),n(3,"td"),e(4,`
2912          `),_(5,iu,3,1),i(),e(6,`
2913        `),_(7,nu,4,1),n(8,"td"),e(9),i(),e(10,`
2914        `),n(11,"td"),_(12,ou,1,2),i(),e(13,`
2915        `),n(14,"td"),e(15),i(),e(16,`
2916        `),n(17,"td"),e(18),i(),e(19,`
2917        `),n(20,"td"),e(21),i(),e(22,`
2918        `),n(23,"td"),e(24),i(),e(25,`
2919        `),_(26,ru,4,0),_(27,au,4,0),_(28,lu,4,0),n(29,"td"),e(30),i(),e(31,`
2920        `),n(32,"td"),e(33),_(34,su,4,0),i(),e(35,`
2921      `),n(36,"td"),e(37),i(),e(38,`
2922    `),i(),e(39,`
2923  `)),o&2){let t=d.$implicit,l=p();s(5),x(t.wasRetained?-1:5),s(2),x(l.showClubName?7:-1),s(2),c(t.program),s(3),x(t.coachLastName!==null?12:-1),s(3),Ye("",t.playerLastName,", ",t.playerFirstName," "),s(3),c(t.gender),s(3),c(t.birthYear),s(3),c(t.team),s(2),x(t.wasRetained?26:-1),s(),x(!t.wasRetained&&!t.playerDeclineReason&&!t.adminDeclineReason?27:-1),s(),x(!t.wasRetained&&(t.playerDeclineReason||t.adminDeclineReason)?28:-1),s(2),c(t.playerDeclineReason),s(3),c(t.adminDeclineReason),s(),x(!t.adminDeclineReason&&!t.wasRetained?34:-1),s(3),c(t.adminDeclineReasonCategory)}}function pu(o,d){if(o&1){let t=D();e(0,`
2924          `),n(1,"app-dynamic-form",14,1),T("onSubmit",function(r){f(t);let a=p(2);return h(a.saveReason(r))})("onCancel",function(){f(t);let r=p(2);return h(r.showDeclineModal=!1)}),e(3,`
2925            `),n(4,"app-dynamic-form-field",15),T("onChange",function(r){f(t);let a=p(2);return h(a.updateDeclineFields(r))}),e(5,`
2926            `),i(),e(6,`
2927            `),n(7,"app-dynamic-form-field",16),e(8,`
2928            `),i(),e(9,`
2929          `),i(),e(10,`
2930        `)}if(o&2){let t=p(2);s(),m("fields",t.activeDeclineFields)("contentFieldsMode",!0)("horizontalForm",!0)("buttonsPosition","left")}}function mu(o,d){if(o&1&&(e(0,`
2931    `),n(1,"div",13),e(2,`
2932      `),n(3,"div"),e(4,`
2933        `),_(5,pu,11,4),i(),e(6,`
2934    `),i(),e(7,`
2935  `)),o&2){let t=p();s(5),x(t.showDeclineModal&&t.activeDeclineFields?5:-1)}}var rr=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.siteDataService=r,this.programService=a,this.playerService=b,this.unsubscribe$=new ge,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee,this.showDeclineModal=!1}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"program",header:"Program"},{field:"coachLastName",header:"Coach"},{field:"playerLastName",header:"Player Name"},{field:"gender",header:"Player Gender"},{field:"birthYear",header:"Player Birth Year"},{field:"team",header:"Team"},{field:"wasRetained",header:"Retained?"},{field:"playerDeclineReason",header:"Player Decline Reason"},{field:"adminDeclineReason",header:"Exit Reason (Staff Only View)"},{field:"adminDeclineReasonCategory",header:"Exit Reason Category (Staff Only View)"}]}getReportData(l){this.loading=!0,this.reportService.getRetentionData().subscribe(r=>{this.reportData=r,this.totalRecords=r.length,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}showReasons(l){l&&(this.selectedItems=[l]),this.declineFields?(this.updateDeclineFields(null),this.showDeclineModal=!0):this.programService.getDeclineInviteMetadata().subscribe({next:r=>{this.declineFields=r.fields,this.updateDeclineFields(null),this.showDeclineModal=!0},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem exporting data.")}})}updateDeclineFields(l){l!==on.AnotherClubOther&&l!==on.NotInterestedOther?this.activeDeclineFields=this.declineFields?.filter(r=>r.controlName!=="adminDeclineReasonText"):this.activeDeclineFields=this.declineFields}saveReason(l){this.playerService.updateAttritionReason(this.selectedItems.map(r=>r.playerID),this.reportService.reportFilters[F.RETENTION].programGroupYear,l).subscribe({next:()=>{this.getReportData(null),this.showDeclineModal=!1,this.siteDataService.showSiteSuccessAlert("Decline Reason information saved successfully.")},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem processing your request."),this.showDeclineModal=!1}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.runSubscription$&&this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(At),w(Yi))},d.\u0275cmp=A({type:d,selectors:[["app-retention-table"]],standalone:!1,decls:20,vars:17,consts:[["reportTable",""],["form",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"selectionChange","onLazyLoad","columns","value","paginator","alwaysShowPaginator","totalRecords","rows","loading","selection","lazy"],["pTemplate","header"],["pTemplate","body"],["appStickyFormButtons","",1,"pb-1"],[1,"btn","btn-primary",3,"click","hidden"],["header","Exit Reason",3,"visibleChange","visible","closable","modal"],[3,"pSortableColumn"],[3,"field"],[3,"value"],[3,"click"],[1,"form-wrapper"],["formID","player-decline-reason-form",3,"onSubmit","onCancel","fields","contentFieldsMode","horizontalForm","buttonsPosition"],["fieldName","adminDeclineReasonID",3,"onChange"],["fieldName","adminDeclineReasonText"]],template:function(r,a){
2935if(r&1){let b=D();n(0,"div",2),e(1,`
2936  `),n(2,"p-table",3,0),y("selectionChange",function(L){return f(b),S(a.selectedItems,L)||(a.selectedItems=L),h(L)}),T("onLazyLoad",function(L){return a.getReportData(L)}),e(4,`
2937    `),R(5,tu,13,0,"ng-template",4),e(6,`
2938    `),R(7,du,40,16,"ng-template",5),e(8,`
2939`),i(),e(9,`
2940`),i(),e(10,`
2941`),n(11,"div",6),e(12,`
2942  `),n(13,"button",7),T("click",function(){return a.showReasons()}),e(14,`
2943    Edit
2944    Exit Reason (Staff Only View)
2945  `),i(),e(15,`
2946`),i(),e(16,`
2947`),n(17,"p-dialog",8),y("visibleChange",function(L){return f(b),S(a.showDeclineModal,L)||(a.showDeclineModal=L),h(L)}),e(18,`
2948  `),_(19,mu,8,1),i()}r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading),C("selection",a.selectedItems),m("lazy",!0),s(11),m("hidden",!(a.selectedItems!=null&&a.selectedItems.length)),s(4),_t(Le(16,Zc)),C("visible",a.showDeclineModal),m("closable",!1)("modal",!0),s(2),x(a.showDeclineModal?19:-1))},dependencies:[Xt,Jt,z,jn,H,$,K,Ai,Yn,ft],encapsulation:2});let o=d;return o}
2948)();function uu(o,d){if(o&1){let t=D();e(0,`
2949      `),n(1,"div",5),e(2,`
2950        `),n(3,"div",2),e(4,`
2951          `),n(5,"label"),e(6,"Club"),i(),e(7,`
2952          `),n(8,"p-multiSelect",6),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
2953          `),i(),e(10,`
2954        `),i(),e(11,`
2955      `),i(),e(12,`
2956    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function _u(o,d){if(o&1){let t=D();e(0,`
2957          `),n(1,"p-multiSelect",7),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(2,`
2958          `),i(),e(3,`
2959        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} teams selected")}}function xu(o,d){if(o&1){let t=D();e(0,`
2960            `),n(1,"p-multiSelect",8),y("ngModelChange",function(r){f(t);let a=p(3);return S(a.filters.coaches,r)||(a.filters.coaches=r),h(r)}),e(2,`
2961            `),i(),e(3,`
2962          `)}if(o&2){let t=p(3);s(),m("autofocusFilter",!0),C("ngModel",t.filters.coaches),m("options",t.coaches)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} coaches selected")}}function gu(o,d){if(o&1&&(e(0,`
2963      `),n(1,"div",4),e(2,`
2964        `),n(3,"div",2),e(4,`
2965          `),n(5,"label"),e(6,"Coaches"),i(),e(7,`
2966          `),_(8,xu,4,7),i(),e(9,`
2967      `),i(),e(10,`
2968    `)),o&2){let t=p(2);s(8),x(t.coaches?8:-1)}}function fu(o,d){if(o&1){let t=D();e(0,`
2969          `),n(1,"p-multiSelect",8),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.birthYears,r)||(a.filters.birthYears=r),h(r)}),e(2,`
2970          `),i(),e(3,`
2971        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.birthYears),m("options",t.birthdays)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} years selected")}}function hu(o,d){if(o&1){let t=D();e(0,`
2972          `),n(1,"p-multiSelect",8),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(2,`
2973          `),i(),e(3,`
2974        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected")}}function Cu(o,d){if(o&1){let t=D();e(0,`
2975          `),n(1,"p-multiSelect",8),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.priorSeasons,r)||(a.filters.priorSeasons=r),h(r)}),e(2,`
2976          `),i(),e(3,`
2977        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.priorSeasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected")}}function Su(o,d){if(o&1){let t=D();e(0,`
2978  `),n(1,"div",0),e(2,`
2979    `),_(3,uu,13,7),n(4,"div",1),e(5,`
2980      `),n(6,"div",2),e(7,`
2981        `),n(8,"label"),e(9,"Gender"),i(),e(10,`
2982        `),n(11,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(12,`
2983      `),i(),e(13,`
2984    `),i(),e(14,`
2985    `),n(15,"div",4),e(16,`
2986      `),n(17,"div",2),e(18,`
2987        `),n(19,"label"),e(20,"Team"),i(),e(21,`
2988        `),_(22,_u,4,7),i(),e(23,`
2989    `),i(),e(24,`
2990    `),_(25,gu,11,1),n(26,"div",4),e(27,`
2991      `),n(28,"div",2),e(29,`
2992        `),n(30,"label"),e(31,"Birth Year"),i(),e(32,`
2993        `),_(33,fu,4,7),i(),e(34,`
2994    `),i(),e(35,`
2995    `),n(36,"div",4),e(37,`
2996      `),n(38,"div",2),e(39,`
2997        `),n(40,"label"),e(41,"Current Season"),i(),e(42,`
2998        `),_(43,hu,4,7),i(),e(44,`
2999    `),i(),e(45,`
3000    `),n(46,"div",4),e(47,`
3001      `),n(48,"div",2),e(49,`
3002        `),n(50,"label"),e(51,"Prior Season"),i(),e(52,`
3003        `),_(53,Cu,4,7),i(),e(54,`
3004    `),i(),e(55,`
3005    `),n(56,"div",1),e(57,`
3006      `),n(58,"div",2),e(59,`
3007        `),n(60,"label"),e(61,"New?"),i(),e(62,`
3008        `),n(63,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.newPlayer,r)||(a.filters.newPlayer=r),h(r)}),i(),e(64,`
3009      `),i(),e(65,`
3010    `),i(),e(66,`
3011    `),n(67,"div",1),e(68,`
3012      `),n(69,"div",2),e(70,`
3013        `),n(71,"label"),e(72,"Years to Compare"),i(),e(73,`
3014        `),n(74,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programGroupYear,r)||(a.filters.programGroupYear=r),h(r)}),i(),e(75,`
3015      `),i(),e(76,`
3016    `),i(),e(77,`
3017  `),i(),e(78,`
3018`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),x(t.teams?22:-1),s(3),x(t.isAdmin?25:-1),s(8),x(t.birthdays?33:-1),s(10),x(t.seasons?43:-1),s(10),x(t.seasons?53:-1),s(10),C("ngModel",t.filters.newPlayer),m("options",t.newPlayerOptions),s(11),C("ngModel",t.filters.programGroupYear),m("options",t.programGroupYearOptions)}}var ar=(()=>{let d=class d{constructor(l,r,a,b,u){this.reportService=l,this.registrationService=r,this.teamService=a,this.dashboardService=b,this.authorizeService=u,this.genderOptions=Ae,this.newPlayerOptions=Mn}ngOnInit(){this.reportService.reportFilters[F.ROSTER]===void 0&&(this.reportService.reportFilters[F.ROSTER]=new P),this.filters=this.reportService.reportFilters[F.ROSTER],this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l,this.isAdmin=this.profile[ee.AdminDashboard])}),oe([this.reportService.getCoaches(),this.teamService.getTeams(this.reportService.clubs,!0),this.registrationService.getRegistrationSeasons(),this.dashboardService.getProgramGroupYears()]).subscribe(l=>{this.coaches=l[0].coaches,this.birthdays=l[0].birthdays,this.teams=l[1],this.seasons=l[2],this.programGroupYears=l[3],this.teams.forEach(r=>{this.filters?.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.programGroupYears&&(this.programGroupYearOptions=this.reportService.getProgramGroupYearCompareDropdownOptions(this.programGroupYears)),this.reportService.state?(this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=this.reportService.clubs.filter(r=>this.reportService.state.clubID.includes(r.clubID))),this.reportService.state.coachClubUserID?this.filters.coaches=this.coaches.filter(r=>r.value===+this.reportService.state.coachClubUserID):this.filters.coaches=void 0,this.reportService.state.birthYear?this.filters.birthYears=this.birthdays.filter(r=>this.reportService.state.birthYear.includes(r.value)):this.filters.birthYears=void 0,this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>this.reportService.state.teamID.includes(r.teamID)):this.filters.teams=void 0,this.filters.genderID=this.reportService.state.genderID?this.reportService.state.genderID:void 0,this.filters.newPlayer=this.reportService.state.status?this.reportService.state.status:0,this.reportService.state.programGroupYear&&(this.filters.programGroupYear=+this.reportService.state.programGroupYear),this.reportService.showReportData=!0):this.programGroupYears.length>1?this.filters.programGroupYear=this.programGroupYearOptions.find(r=>r.value).value:this.filters.programGroupYear=this.programGroupYearOptions[0].value}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.ROSTER]})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve),w(mt),w(Pe))},d.\u0275cmp=A({type:d,selectors:[["app-roster-filters"]],standalone:!1,decls:1,vars:1,consts:[[1,"row"],[1,"col-md-2"],[1,"form-group"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-2"],[1,"col-md-5","col-lg-3"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["o
3018ptionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,Su,79,12),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,q,Q],encapsulation:2});let o=d;return o})();function bu(o,d){if(o&1&&(e(0,`
3019          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
3020          `),i(),e(5,`
3021        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3022            `,t.header,`
3023            `),s(),m("field",t.field)}}function vu(o,d){if(o&1&&(e(0,`
3024          `),n(1,"th"),e(2),i(),e(3,`
3025        `)),o&2){let t=d.$implicit;s(2),I(`
3026            `,t.header,`
3027          `)}}function Tu(o,d){if(o&1&&(e(0,`
3028      `),n(1,"tr"),e(2,`
3029        `),N(3,bu,6,4,null,null,W),N(5,vu,4,1,null,null,W),i(),e(7,`
3030    `)),o&2){let t=p();s(3),V(t.columns),s(2),V(t.optionColumns)}}function Eu(o,d){if(o&1&&(e(0,`
3031          `),n(1,"td"),e(2),i(),e(3,`
3032        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function wu(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;Ye(`
3033          `,t.coachLastName,", ",t.coachFirstName,`
3034        `)}}function Fu(o,d){o&1&&(e(0,`
3035          `),n(1,"td"),e(2,`
3036            Yes
3037          `),i(),e(3,`
3038        `))}function Du(o,d){o&1&&(e(0,`
3039          `),n(1,"td"),e(2,"No"),i(),e(3,`
3040        `))}function Iu(o,d){if(o&1&&(e(0,`
3041      `),n(1,"tr"),e(2,`
3042        `),_(3,Eu,4,1),n(4,"td"),e(5),i(),e(6,`
3043        `),n(7,"td"),_(8,wu,1,2),i(),e(9,`
3044        `),n(10,"td"),e(11),i(),e(12,`
3045        `),n(13,"td"),e(14),i(),e(15,`
3046        `),n(16,"td"),e(17),i(),e(18,`
3047        `),n(19,"td"),e(20),i(),e(21,`
3048        `),_(22,Fu,4,0),_(23,Du,4,0),i(),e(24,`
3049    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.program),s(3),x(t.coachLastName!==null?8:-1),s(3),Ye("",t.playerLastName,", ",t.playerFirstName),s(3),c(t.gender),s(3),c(t.birthYear),s(3),c(t.team),s(2),x(t.isNew?22:-1),s(),x(t.isNew?-1:23)}}var lr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.getReportData(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData()})}getReportColumns(){return[{field:"program",header:"Program"},{field:"coachLastName",header:"Coach"},{field:"playerLastName",header:"Player Name"},{field:"gender",header:"Player Gender"},{field:"birthYear",header:"Player Birth Year"},{field:"team",header:"Team"},{field:"isNew",header:"New Player"}]}getReportData(){this.loading=!0,this.reportService.getRosternData().subscribe(l=>{this.reportData=l,this.totalRecords=l.length,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-roster-table"]],standalone:!1,decls:10,vars:7,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table  table-sticky-header",1,"table","table-striped","table-sm",3,"columns","value","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3050  `),n(2,"p-table",2,0),e(4,`
3051    `),R(5,Tu,8,0,"ng-template",3),e(6,`
3052    `),R(7,Iu,25,10,"ng-template",4),e(8,`
3053  `),i(),e(9,`
3054`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K],encapsulation:2});let o=d;return o}
3054)();function Mu(o,d){if(o&1){let t=D();e(0,`
3055      `),n(1,"div",1),e(2,`
3056        `),n(3,"div",2),e(4,`
3057          `),n(5,"label"),e(6,"Club"),i(),e(7,`
3058          `),n(8,"p-multiSelect",11),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),h(r.updateRegistrations())}),e(9,`
3059          `),i(),e(10,`
3060        `),i(),e(11,`
3061      `),i(),e(12,`
3062    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Au(o,d){if(o&1){let t=D();e(0,`
3063          `),n(1,"p-multiSelect",12),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
3064          `),i(),e(3,`
3065        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected")}}function Pu(o,d){o&1&&(e(0,`
3066          `),n(1,"div",13),e(2,`
3067            Select at least one program
3068          `),i(),e(3,`
3069        `))}function Ou(o,d){if(o&1){let t=D();e(0,`
3070          `),n(1,"p-multiSelect",10),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.birthYears,r)||(a.filters.birthYears=r),h(r)}),e(2,`
3071          `),i(),e(3,`
3072        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.birthYears),m("options",t.birthdays)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} years selected")}}function Lu(o,d){if(o&1){let t=D();e(0,`
3073          `),n(1,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
3074          `),i(),e(3,`
3075        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}function Nu(o,d){if(o&1){let t=D();e(0,`
3076  `),n(1,"div",0),e(2,`
3077    `),_(3,Mu,13,7),n(4,"div",1),e(5,`
3078      `),n(6,"div",2),e(7,`
3079        `),n(8,"label"),e(9,"Program"),i(),e(10,`
3080        `),_(11,Au,4,7),_(12,Pu,4,0),i(),e(13,`
3081    `),i(),e(14,`
3082    `),n(15,"div",3),e(16,`
3083      `),n(17,"div",2),e(18,`
3084        `),n(19,"label"),e(20,"Gender"),i(),e(21,`
3085        `),n(22,"p-multiSelect",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genders,r)||(a.filters.genders=r),h(r)}),i(),e(23,`
3086      `),i(),e(24,`
3087    `),i(),e(25,`
3088    `),n(26,"div",5),e(27,`
3089      `),n(28,"div",2),e(29,`
3090        `),n(30,"label"),e(31,"Birth Year"),i(),e(32,`
3091        `),_(33,Ou,4,7),i(),e(34,`
3092    `),i(),e(35,`
3093    `),n(36,"div",5),e(37,`
3094      `),n(38,"div",2),e(39,`
3095        `),n(40,"label",6),e(41,"Grade"),i(),e(42,`
3096        `),_(43,Lu,4,7),i(),e(44,`
3097    `),i(),e(45,`
3098    `),n(46,"div",7),e(47,`
3099      `),n(48,"div",2),e(49,`
3100        `),n(50,"label"),e(51,"Test Players"),i(),e(52,`
3101        `),n(53,"p-select",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),i(),e(54,`
3102      `),i(),e(55,`
3103    `),i(),e(56,`
3104    `),n(57,"div",5),e(58,`
3105      `),n(59,"div",2),e(60,`
3106        `),n(61,"label"),e(62,"Registration"),i(),e(63,`
3107        `),n(64,"p-multiSelect",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(65,`
3108        `),i(),e(66,`
3109      `),i(),e(67,`
3110    `),i(),e(68,`
3111    `),n(69,"div",5),e(70,`
3112      `),n(71,"div",2),e(72,`
3113        `),n(73,"label"),e(74,"Season"),i(),e(75,`
3114        `),n(76,"p-multiSelect",10),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(77,`
3115        `),i(),e(78,`
3116      `),i(),e(79,`
3117    `),i(),e(80,`
3118    `),e(81,`
3119  `),e(82,`
3120`),i(),e(83,`
3121`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.programs?11:-1),s(),x((t.filters.programs==null?null:t.filters.programs.length)===0?12:-1),s(10),C("ngModel",t.filters.genders),m("options",t.genderOptions)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} genders selected"),s(11),x(t.birthdays?33:-1),s(10),x(t.grades?43:-1),s(10),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(11),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} registrations selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected")}}var sr=(()=>{let d=class d{constructor(l,r,a,b){this.reportService=l,this.registrationService=r,this.siteDataService=a,this.sharedPlayerService=b,this.loading=!0,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testUserOptions=le,this.genderOptions=Ae.filter(u=>u.value!=="")}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),oe({p:this.reportService.getPrograms(),s:this.registrationService.getRegistrationSeasons(),pt:this.reportService.getProgramTypes(),c:this.reportService.getCoaches(),g:this.sharedPlayerService.getGrades()}).subscribe({next:l=>{this.reportService.programs=l.p,this.seasons=l.s,this.programTypes=l.pt,this.birthdays=l.c.birthdays,this.grades=l.g,this.reportService.reportFilters[F.HEAT_MAP]===void 0&&(this.reportService.reportFilters[F.HEAT_MAP]=new P,this.reportService.reportFilters[F.HEAT_MAP].programTypes=this.programTypes.filter(r=>r.value!==Ne.OTHER)),this.filters=this.reportService.reportFilters[F.HEAT_MAP],this.filterPrograms(),this.updateRegistrations(),this.loading=!1}}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.HEAT_MAP],this.filterPrograms(),this.updateRegistrations()})}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters);let l=this.programs.find(r=>r.programTypeID===Ne.TEAM);if(console.log("state: ",this.reportService.state),this.reportService.state)this.reportService.state.clubID&&this.reportService.clubs?.length>0?this.filters.clubs=[this.reportService.clubs.find(r=>r.clubID===this.reportService.state.clubID)]:this.filters.birthYears=void 0,this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(r=>this.reportService.state.programs.includes(r.programID)):this.filters.programs=void 0,this.reportService.state.seasons?this.filters.seasons=this.seasons.filter(r=>this.reportService.state.seasons.includes(r.value)):this.filters.seasons=void 0,this.reportService.state.birthYear?this.filters.birthYears=this.birthdays.filter(r=>this.reportService.state.birthYear.includes(r.value)):this.filters.birthYears=void 0,this.reportService.state.genders?this.filters.genders=this.genderOptions.filter(r=>this.reportService.state.genders.includes(r.value)):this.filters.genders=void 0,this.reportService.state.grades?this.filters.grades=this.grades.filter(r=>this.reportService.state.grades.includes(r.value)):this.filters.grades=void 0,this.reportService.showReportData=!0;else{let r=this.filters.programs?.filter(a=>this.programs.some(b=>b.programID===a.programID));if(r?.length>0)this.filters.programs=r;else{let a=l||this.programs?.[0];this.filters.programs=a?[a]:void 0}}}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID)).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID)),this.reportService.state&&(this.reportService.state.registrations&&(this.filters.registrations=this.registrations.filter(r=>this.reportService.state.registrations.includes(r.registrationID))),this.reportService.showReportData=!0,this.reportService.state=void 0)}):(this.registrations=void 0,this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0))}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(k),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-heat-map-filters"]],standalone:!1,decls:1,vars:1,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"col-md-2"],["o
3121ptionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","ngModel","options","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-2"],["for","credit-budgeting-grade-filter"],[1,"col-md-2","col-lg-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["placeholder","Select program(s)","optionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"form-error-message"],["optionLabel","label","placeholder","All","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,Nu,84,26),r&2&&x(a.loading?-1:0)},dependencies:[U,Y,q,Q],encapsulation:2});let o=d;return o}
3121)();function ku(o,d){if(o&1&&(e(0,`
3122          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
3123          `),i(),e(5,`
3124        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3125            `,t.header,`
3126            `),s(),m("field",t.field)}}function Bu(o,d){if(o&1&&(e(0,`
3127          `),n(1,"th"),e(2),i(),e(3,`
3128        `)),o&2){let t=d.$implicit;s(2),I(`
3129            `,t.header,`
3130          `)}}function Wu(o,d){if(o&1&&(e(0,`
3131      `),n(1,"tr"),e(2,`
3132        `),N(3,ku,6,4,null,null,W),N(5,Bu,4,1,null,null,W),i(),e(7,`
3133    `)),o&2){let t=p();s(3),V(t.columns),s(2),V(t.optionColumns)}}function Uu(o,d){if(o&1&&(e(0,`
3134          `),n(1,"td"),e(2),i(),e(3,`
3135        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Yu(o,d){if(o&1&&(e(0,`
3136      `),n(1,"tr"),e(2,`
3137        `),_(3,Uu,4,1),n(4,"td"),e(5),i(),e(6,`
3138        `),n(7,"td"),e(8),i(),e(9,`
3139        `),n(10,"td"),e(11),i(),e(12,`
3140        `),n(13,"td"),e(14),i(),e(15,`
3141        `),n(16,"td"),e(17),i(),e(18,`
3142        `),n(19,"td"),e(20),v(21,"date"),i(),e(22,`
3143        `),n(23,"td"),e(24),i(),e(25,`
3144        `),n(26,"td"),e(27),i(),e(28,`
3145      `),i(),e(29,`
3146    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),Ye("",t.lastName,", ",t.firstName),s(3),Ye("",t.address," ",t.address2),s(3),c(t.city),s(3),c(t.state),s(3),c(t.zip),s(3),c(B(21,11,t.dob,"MM/dd/yyyy")),s(4),c(t.grade),s(3),c(t.programName)}}var dr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.getReportData(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData()})}getReportColumns(){return[{field:"lastName",header:"Player Name"},{field:"address",header:"Address"},{field:"city",header:"City"},{field:"state",header:"State"},{field:"zip",header:"Zip"},{field:"dob",header:"Date of Birth"},{field:"grade",header:"Grade"},{field:"programName",header:"Program Name"}]}getReportData(){this.loading=!0,this.reportService.reportFilters[F.HEAT_MAP]!==void 0&&this.reportService.reportFilters[F.HEAT_MAP].programs?.length>0&&this.reportService.getHeatMapnData().subscribe({next:l=>{this.reportData=l,this.totalRecords=l.length,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")}})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-heat-map-table"]],standalone:!1,decls:10,vars:7,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"columns","value","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3147  `),n(2,"p-table",2,0),e(4,`
3148    `),R(5,Wu,8,0,"ng-template",3),e(6,`
3149    `),R(7,Yu,30,14,"ng-template",4),e(8,`
3150  `),i(),e(9,`
3151`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,de],encapsulation:2});let o=d;return o}
3151)();function ju(o,d){if(o&1){let t=D();e(0,`
3152    `),n(1,"div",1),e(2,`
3153      `),n(3,"div",2),e(4,`
3154        `),n(5,"label"),e(6,"Club"),i(),e(7,`
3155        `),n(8,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),h(r.updateRegistrations())}),e(9,`
3156        `),i(),e(10,`
3157      `),i(),e(11,`
3158    `),i(),e(12,`
3159  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var pr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.registrationService=r,this.defaultFrom=new Date(new Date().setMonth(new Date().getMonth()-1)),this.testUserOptions=le}ngOnInit(){this.reportService.reportFilters[F.TRANSACTIONS]===void 0&&(this.reportService.reportFilters[F.TRANSACTIONS]=new P,this.reportService.reportFilters[F.TRANSACTIONS].dateFrom=this.defaultFrom,this.reportService.reportFilters[F.TRANSACTIONS].regFrom=this.defaultFrom),this.filters=this.reportService.reportFilters[F.TRANSACTIONS],this.reportService.getPrograms().subscribe(l=>{this.reportService.programs=l,this.programs=this.reportService.filterPrograms(this.filters),this.updateRegistrations(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.TRANSACTIONS]})}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se))},d.\u0275cmp=A({type:d,selectors:[["app-transactions-filters"]],standalone:!1,decls:133,vars:26,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],["optionLabel","name","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-5","col-lg-2"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-2","col-lg-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
3160  `),_(2,ju,13,7),n(3,"div",1),e(4,`
3161    `),n(5,"div",2),e(6,`
3162      `),n(7,"label"),e(8,"Program"),i(),e(9,`
3163      `),n(10,"p-multiSelect",3),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),T("onChange",function(){return a.updateRegistrations()}),e(11,`
3164      `),i(),e(12,`
3165    `),i(),e(13,`
3166  `),i(),e(14,`
3167  `),n(15,"div",4),e(16,`
3168    `),n(17,"div",2),e(18,`
3169      `),n(19,"label"),e(20,"Registration"),i(),e(21,`
3170      `),n(22,"p-multiSelect",5),y("ngModelChange",function(u){return S(a.filters.registrations,u)||(a.filters.registrations=u),u}),e(23,`
3171      `),i(),e(24,`
3172    `),i(),e(25,`
3173  `),i(),e(26,`
3174  `),n(27,"div",1),e(28,`
3175    `),n(29,"div",2),e(30,`
3176      `),n(31,"label",6),e(32,"Player Last Name"),i(),e(33,`
3177      `),n(34,"input",7),y("ngModelChange",function(u){return S(a.filters.playerName,u)||(a.filters.playerName=u),u}),i(),e(35,`
3178    `),i(),e(36,`
3179  `),i(),e(37,`
3180  `),n(38,"div",8),e(39,`
3181    `),n(40,"div",2),e(41,`
3182      `),n(42,"label"),e(43,"Test Players"),i(),e(44,`
3183      `),n(45,"p-select",9),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(46,`
3184    `),i(),e(47,`
3185  `),i(),e(48,`
3186  `),n(49,"div",10),e(50,`
3187    `),n(51,"div",2),e(52,`
3188      `),n(53,"label"),e(54,"Transaction Date"),i(),e(55,`
3189      `),n(56,"span",11)(57,"p-inputgroup"),e(58,`
3190        `),n(59,"p-datepicker",12),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(60,`
3191        `),i(),e(61,`
3192        `),n(62,"p-inputgroup-addon"),e(63,"to"),i(),e(64,`
3193        `),n(65,"p-datepicker",13),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(66,`
3194        `),i(),e(67,`
3195        `),i(),e(68,`
3196        `),n(69,"a",14),T("click",function(){return a.filters.dateFrom=a.defaultFrom,a.filters.dateTo=void 0}),e(70,`
3197          `),g(71,"i",15),e(72,`
3198        `),i(),e(73,`
3199      `),i(),e(74,`
3200    `),i(),e(75,`
3201  `),i(),e(76,`
3202  `),n(77,"div",10),e(78,`
3203    `),n(79,"div",2),e(80,`
3204      `),n(81,"label"),e(82,"Registration Date"),i(),e(83,`
3205      `),n(84,"span",11)(85,"p-inputgroup"),e(86,`
3206        `),n(87,"p-datepicker",12),y("ngModelChange",function(u){return S(a.filters.regFrom,u)||(a.filters.regFrom=u),u}),e(88,`
3207        `),i(),e(89,`
3208        `),n(90,"p-inputgroup-addon"),e(91,"to"),i(),e(92,`
3209        `),n(93,"p-datepicker",13),y("ngModelChange",function(u){return S(a.filters.regTo,u)||(a.filters.regTo=u),u}),e(94,`
3210        `),i(),e(95,`
3211        `),i(),e(96,`
3212        `),n(97,"a",14),T("click",function(){return a.filters.regFrom=a.defaultFrom,a.filters.regTo=void 0}),e(98,`
3213          `),g(99,"i",15),e(100,`
3214        `),i(),e(101,`
3215      `),i(),e(102,`
3216    `),i(),e(103,`
3217  `),i(),e(104,`
3218  `),n(105,"div",10),e(106,`
3219    `),n(107,"div",2),e(108,`
3220      `),n(109,"label"),e(110,"Reimbursement Date"),i(),e(111,`
3221      `),n(112,"span",11)(113,"p-inputgroup"),e(114,`
3222        `),n(115,"p-datepicker",12),y("ngModelChange",function(u){return S(a.filters.dateFrom2,u)||(a.filters.dateFrom2=u),u}),e(116,`
3223        `),i(),e(117,`
3224        `),n(118,"p-inputgroup-addon"),e(119,"to"),i(),e(120,`
3225        `),n(121,"p-datepicker",13),y("ngModelChange",function(u){return S(a.filters.dateTo2,u)||(a.filters.dateTo2=u),u}),e(122,`
3226        `),i(),e(123,`
3227        `),i(),e(124,`
3228        `),n(125,"a",14),T("click",function(){return a.filters.dateFrom2=void 0,a.filters.dateTo2=void 0}),e(126,`
3229          `),g(127,"i",15),e(128,`
3230        `),i(),e(129,`
3231      `),i(),e(130,`
3232    `),i(),e(131,`
3233  `),i(),e(132,`
3234`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.programs?"All":"Select club(s)")("selectedItemsLabel","{0} program(s) selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.registrations),m("options",a.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registration(s) selected"),s(12),C("ngModel",a.filters.playerName),s(11),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(14),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(22),C("ngModel",a.filters.regFrom),s(6),C("ngModel",a.filters.regTo),s(22),C("ngModel",a.filters.dateFrom2),s(6),C("ngModel",a.filters.dateTo2))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
3234)();var zu=o=>["/admin/players",o,"overview"];function qu(o,d){if(o&1&&(e(0,`
3235            `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
3236            `),i(),e(5,`
3237          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3238              `,t.header,`
3239              `),s(),m("field",t.field)}}function $u(o,d){if(o&1&&(e(0,`
3240            `),n(1,"th"),e(2),i(),e(3,`
3241          `)),o&2){let t=p().$implicit;s(2),c(t.header)}}function Ku(o,d){if(o&1&&(e(0,`
3242          `),_(1,qu,6,4),_(2,$u,4,1)),o&2){let t=d.$implicit;s(),x(t.sortable?1:-1),s(),x(t.sortable?-1:2)}}function Ju(o,d){if(o&1&&(e(0,`
3243      `),n(1,"tr"),e(2,`
3244        `),N(3,Ku,3,2,null,null,W),i(),e(5,`
3245    `)),o&2){let t=p();s(3),V(t.columns)}}function Xu(o,d){if(o&1&&(e(0,`
3246          `),n(1,"td"),e(2),i(),e(3,`
3247        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Zu(o,d){if(o&1&&(e(0,`
3248            `),n(1,"a",7),e(2),i(),e(3,`
3249          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,zu,t.playerID)),s(),c(t.playerName)}}function Qu(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
3250            `,t.playerName,`
3251          `)}}function e_(o,d){if(o&1&&(e(0,`
3252      `),n(1,"tr"),e(2,`
3253        `),_(3,Xu,4,1),n(4,"td"),e(5),v(6,"utcDate"),i(),e(7,`
3254        `),n(8,"td"),e(9),i(),e(10,`
3255        `),n(11,"td"),e(12),i(),e(13,`
3256        `),n(14,"td"),e(15),i(),e(16,`
3257        `),n(17,"td"),e(18),i(),e(19,`
3258        `),n(20,"td"),e(21,`
3259          `),_(22,Zu,4,4)(23,Qu,1,1),i(),e(24,`
3260        `),n(25,"td"),e(26),v(27,"accountingCurrency"),i(),e(28,`
3261        `),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
3262        `),n(33,"td"),e(34),v(35,"accountingCurrency"),i(),e(36,`
3263        `),n(37,"td"),e(38),v(39,"accountingCurrency"),i(),e(40,`
3264        `),n(41,"td"),e(42),v(43,"accountingCurrency"),i(),e(44,`
3265        `),n(45,"td"),e(46),v(47,"accountingCurrency"),i(),e(48,`
3266        `),n(49,"td"),e(50),v(51,"accountingCurrency"),i(),e(52,`
3267        `),n(53,"td"),e(54),v(55,"accountingCurrency"),i(),e(56,`
3268        `),n(57,"td"),e(58),v(59,"accountingCurrency"),i(),e(60,`
3269        `),n(61,"td"),e(62),i(),e(63,`
3270        `),n(64,"td"),e(65),v(66,"date"),i(),e(67,`
3271        `),n(68,"td"),e(69),i(),e(70,`
3272      `),i(),e(71,`
3273    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(B(6,19,t.transDate,"M/d/yyyy")),s(4),c(t.refID),s(3),c(t.event),s(3),c(t.programName),s(3),c(t.regName),s(4),x(l.reportService.profile[l.Permission.Profile]?22:23),s(4),c(E(27,22,t.regPrice)),s(4),c(E(31,24,t.amountDue)),s(4),c(E(35,26,t.discount)),s(4),c(E(39,28,t.finAidUsed)),s(4),c(E(43,30,t.adminFee)),s(4),c(E(47,32,t.netAmountDue)),s(4),c(E(51,34,t.amountPaid)),s(4),c(E(55,36,t.creditUsed)),s(4),c(E(59,38,t.revenue)),s(4),c(t.transactionID),s(3),c(B(66,40,t.reimbursementDate,"M/d/y")),s(4),c(t.reimbursementID)}}var mr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"transDate",header:"Transaction Date",sortable:!0},{field:"refID",header:"Ref ID",sortable:!1},{field:"event",header:"Event",sortable:!1},{field:"programName",header:"Program",sortable:!0},{field:"regName",header:"Registration",sortable:!0},{field:"playerName",header:"Player Name",sortable:!0},{field:"regPrice",header:"Registration Price",sortable:!0},{field:"amountDue",header:"List Transaction Amount",sortable:!0},{field:"discount",header:"Discount",sortable:!0},{field:"finAidUsed",header:"Financial Aid",sortable:!0},{field:"adminFee",header:"Admin Fee",sortable:!0},{field:"netAmountDue",header:"Net Transaction Amount",sortable:!0},{field:"amountPaid",header:"Paid (Refunded) Cash",sortable:!0},{field:"creditUsed",header:"Used (Issued) Credit",sortable:!0}
3273,{field:"revenue",header:"Revenue",sortable:!0},{field:"transactionID",header:"Transaction ID",sortable:!1},{field:"reimbursementDate",header:"Reimbursement Date",sortable:!0},{field:"reimbursementID",header:"Reimbursement ID",sortable:!1}]}getReportData(l){let r=this.reportService.reportFilters[F.TRANSACTIONS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getTransactionsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-transactions-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","transDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3274  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
3275    `),R(5,Ju,6,0,"ng-template",3),e(6,`
3276    `),R(7,e_,72,43,"ng-template",4),e(8,`
3277  `),i(),e(9,`
3278`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de,Ce,se],encapsulation:2});let o=d;return o}
3278)();var i_=()=>({width:"25%"});function n_(o,d){if(o&1&&(e(0,`
3279          `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
3280          `),i(),e(5,`
3281        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3282            `,t.header,`
3283            `),s(),m("field",t.field)}}function o_(o,d){if(o&1&&(e(0,`
3284      `),n(1,"tr"),e(2,`
3285        `),N(3,n_,6,4,null,null,W),i(),e(5,`
3286    `)),o&2){let t=p();s(3),V(t.columns)}}function r_(o,d){if(o&1){let t=D();e(0,`
3287              `),n(1,"span",9),e(2),i(),e(3,`
3288              `),n(4,"button",10),T("click",function(){f(t);let r=p(2).$implicit,a=p();return h(a.notesExpanded[r.clubContactID]=!1)}),e(5,"Collapse"),i(),e(6,`
3289            `)}if(o&2){let t=p(2).$implicit;s(2),I(`
3290                `,t.notes,`
3291              `)}}function a_(o,d){if(o&1){let t=D();e(0,`
3292              `),n(1,"span",11),e(2),v(3,"ellipsis"),i(),e(4,`
3293              `),n(5,"button",12),T("click",function(){f(t);let r=p(2).$implicit,a=p();return h(a.notesExpanded[r.clubContactID]=!0)}),e(6,"Expand"),i(),e(7,`
3294            `)}if(o&2){let t=p(2).$implicit;s(2),I(`
3295                `,B(3,1,t.notes,100),`
3296              `)}}function l_(o,d){if(o&1&&(e(0,`
3297            `),_(1,r_,7,1),_(2,a_,8,4)),o&2){let t=p().$implicit,l=p();s(),x(l.notesExpanded[t.clubContactID]?1:-1),s(),x(l.notesExpanded[t.clubContactID]?-1:2)}}function s_(o,d){if(o&1&&(e(0,`
3298            `),n(1,"span",13),e(2),i(),e(3,`
3299          `)),o&2){let t=p().$implicit;s(2),I(`
3300              `,t.notes,`
3301            `)}}function d_(o,d){o&1&&(e(0,`
3302            `),g(1,"i",14),e(2,`
3303          `))}function p_(o,d){o&1&&(e(0,`
3304            `),g(1,"i",15),e(2,`
3305          `))}function m_(o,d){o&1&&(e(0,`
3306            `),g(1,"i",14),e(2,`
3307          `))}function c_(o,d){o&1&&(e(0,`
3308            `),g(1,"i",15),e(2,`
3309          `))}function u_(o,d){o&1&&(e(0,`
3310            `),g(1,"i",14),e(2,`
3311          `))}function __(o,d){o&1&&(e(0,`
3312            `),g(1,"i",15),e(2,`
3313          `))}function x_(o,d){o&1&&(e(0,`
3314            `),g(1,"i",14),e(2,`
3315          `))}function g_(o,d){o&1&&(e(0,`
3316            `),g(1,"i",15),e(2,`
3317          `))}function f_(o,d){if(o&1&&(e(0,`
3318            `),n(1,"div",16),e(2,`
3319              `),n(3,"app-star-rating",17),e(4,`
3320              `),i(),e(5,`
3321            `),i(),e(6,`
3322          `)),o&2){let t=p().$implicit;s(3),m("rating",t.leadRating)("blackStar",!0)("fullWidth",!1)("circleStars",!0)}}function h_(o,d){o&1&&(e(0,`
3323              `),g(1,"app-pill",18),e(2,`
3324            `))}function C_(o,d){o&1&&(e(0,`
3325              `),g(1,"app-pill",19),e(2,`
3326            `))}function S_(o,d){o&1&&(e(0,`
3327              `),g(1,"app-pill",20),e(2,`
3328            `))}function y_(o,d){o&1&&(e(0,`
3329              `),g(1,"app-pill",21),e(2,`
3330            `))}function b_(o,d){if(o&1&&(e(0,`
3331      `),n(1,"tr"),e(2,`
3332        `),n(3,"td"),e(4),i(),e(5,`
3333        `),n(6,"td"),e(7),i(),e(8,`
3334        `),n(9,"td"),e(10),v(11,"date"),i(),e(12,`
3335        `),n(13,"td"),e(14),i(),e(15,`
3336        `),n(16,"td"),e(17),i(),e(18,`
3337        `),n(19,"td"),e(20,`
3338          `),_(21,l_,3,2)(22,s_,4,1),i(),e(23,`
3339        `),n(24,"td"),e(25),i(),e(26,`
3340        `),n(27,"td"),e(28),v(29,"date"),i(),e(30,`
3341        `),n(31,"td",7),e(32,`
3342          `),_(33,d_,3,0)(34,p_,3,0),i(),e(35,`
3343        `),n(36,"td",7),e(37,`
3344          `),_(38,m_,3,0)(39,c_,3,0),i(),e(40,`
3345        `),n(41,"td",7),e(42,`
3346          `),_(43,u_,3,0)(44,__,3,0),i(),e(45,`
3347        `),n(46,"td",7),e(47,`
3348          `),_(48,x_,3,0)(49,g_,3,0),i(),e(50,`
3349        `),n(51,"td"),e(52,`
3350          `),_(53,f_,7,4),i(),e(54,`
3351        `),n(55,"td"),e(56,`
3352          `),n(57,"span",8),e(58,`
3353            `),_(59,h_,3,0),_(60,C_,3,0),_(61,S_,3,0),_(62,y_,3,0),i(),e(63,`
3354        `),i(),e(64,`
3355      `),i(),e(65,`
3356    `)),o&2){let t=d.$implicit,l=p();s(4),c(t.parentEmail),s(3),c(t.playerName),s(3),c(B(11,19,t.playerDOB,"MM/dd/y")),s(4),c(t.playerGender),s(3),c(t.parentName),s(2),_t(Le(25,i_)),s(2),x(t.notes.length>100?21:22),s(4),c(t.activity),s(3),c(B(29,22,t.emailSentDate,"MMM d, y")),s(5),x(t.interestA?33:34),s(5),x(t.interestB?38:39),s(5),x(t.interestC?43:44),s(5),x(t.interestD?48:49),s(5),x(t.leadRating?53:-1),s(6),x(t.status===l.ClubContactStatus.CLUB_CONTACT?59:-1),s(),x(t.status===l.ClubContactStatus.CONVERTED?60:-1),s(),x(t.status===l.ClubContactStatus.INACTIVE?61:-1),s(),x(t.status===l.ClubContactStatus.HAS_PROFILE?62:-1)}}var cr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.notesExpanded={},this.ClubContactStatus=eo}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"parentEmail",header:"Parent Email"},{field:"playerName",header:"Player Name"},{field:"playerDOB",header:"Player Birth Date"},{field:"playerGender",header:"Player Gender"},{field:"parentName",header:"Parent Name"},{field:"notes",header:"Notes (Most recent)"},{field:"activity",header:"Activity (Most recent)"},{field:"emailSentDate",header:"Email (Most recent)"},{field:"interestA",header:"Signing up a Player"},{field:"interestB",header:"Coaching"},{field:"interestC",header:"Community Partnership"},{field:"interestD",header:"Something else"},{field:"leadRating",header:"Engagement"},{field:"status",header:"Status"}]}getReportData(l){let r=this.reportService.reportFilters[F.CLUB_CONTACTS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getClubContactsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-club-contacts-table"]],standalone:!1,decls:11,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","
3356submittedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[1,"text-center"],[1,"table-item-nowrap"],[1,"text-small","pr-3"],["type","button",1,"btn","btn-naked","btn-icon-angle-up-after",3,"click"],[1,"pr-3","table-item-nowrap"],["type","button",1,"btn","btn-naked","btn-icon-angle-down-after",3,"click"],[1,"pr-3"],[1,"fal","fa-check-square","text-large"],[1,"fal","fa-square","text-large"],[1,"text-large"],[3,"rating","blackStar","fullWidth","circleStars"],["text","Active Club Contact","status","primary"],["text","Converted","status","success"],["text","Inactive","status","warning"],["text","Has Profile","status","secondary"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3357  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
3358    `),R(5,o_,6,0,"ng-template",3),e(6,`
3359    `),R(7,b_,66,26,"ng-template",4),e(8,`
3360  `),i(),e(9,`
3361`),i(),e(10,`
3362
3363`)),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading))},dependencies:[z,ht,$n,H,$,K,de,Hn],encapsulation:2});let o=d;return o}
3363)();function T_(o,d){if(o&1){let t=D();e(0,`
3364            `),n(1,"p-datepicker",13,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
3365            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
3366            `),n(7,"p-datepicker",14),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),i(),e(8,`
3367          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function E_(o,d){if(o&1){let t=D();e(0,`
3368            `),n(1,"p-datepicker",15),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
3369            `),i(),e(3,`
3370            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
3371            `),n(7,"p-datepicker",16),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
3372            `),i(),e(9,`
3373          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function w_(o,d){if(o&1){let t=D();e(0,`
3374          `),n(1,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.interestAreas,r)||(a.filters.interestAreas=r),h(r)}),e(2,`
3375          `),i(),e(3,`
3376        `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.interestAreas),m("options",t.interestAreas)("filter",!1)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} statuses selected")}}function F_(o,d){if(o&1){let t=D();e(0,`
3377  `),n(1,"div",1),e(2,`
3378    `),n(3,"div",2),e(4,`
3379      `),n(5,"div",3),e(6,`
3380        `),n(7,"label"),e(8,"Gender"),i(),e(9,`
3381        `),n(10,"p-select",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),e(11,`
3382        `),i(),e(12,`
3383      `),i(),e(13,`
3384    `),i(),e(14,`
3385    `),n(15,"div",5),e(16,`
3386      `),n(17,"div",6),e(18,`
3387        `),n(19,"label"),e(20,"Birth Date"),i(),e(21,`
3388        `),n(22,"p-select",7),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(23,`
3389        `),n(24,"span",8)(25,"p-inputgroup"),e(26,`
3390          `),_(27,T_,9,8)(28,E_,10,2),i(),e(29,`
3391          `),n(30,"a",9),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(31,`
3392            `),g(32,"i",10),e(33,`
3393          `),i(),e(34,`
3394        `),i(),e(35,`
3395      `),i(),e(36,`
3396    `),i(),e(37,`
3397    `),n(38,"div",11),e(39,`
3398      `),n(40,"div",3),e(41,`
3399        `),n(42,"label"),e(43,"Interest Area"),i(),e(44,`
3400        `),_(45,w_,4,6),i(),e(46,`
3401    `),i(),e(47,`
3402    `),n(48,"div",2),e(49,`
3403      `),n(50,"div",3),e(51,`
3404        `),n(52,"label"),e(53,"Status"),i(),e(54,`
3405        `),n(55,"p-multiSelect",12),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubContactPlayerStatuses,r)||(a.filters.clubContactPlayerStatuses=r),h(r)}),e(56,`
3406        `),i(),e(57,`
3407      `),i(),e(58,`
3408    `),i(),e(59,`
3409  `),i(),e(60,`
3410`)}if(o&2){let t=p();s(10),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(12),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?27:28),s(18),x(t.dobSelect?45:-1),s(10),m("autofocusFilter",!0),C("ngModel",t.filters.clubContactPlayerStatuses),m("options",t.playerStatuses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} statuses selected")}}var ur=(()=>{let d=class d{constructor(l){this.reportService=l,this.genderOptions=Ae,this.minBirthYear=Ie,this.maxBirthYear=Re}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.reportService.reportFilters[F.CLUB_CONTACTS]===void 0&&(this.reportService.reportFilters[F.CLUB_CONTACTS]=new P),this.filters=this.reportService.reportFilters[F.CLUB_CONTACTS],oe([this.reportService.getInterestAreas(),this.reportService.getClubContactPlayerStatuses()]).subscribe(l=>{this.interestAreas=l[0],this.playerStatuses=l[1],this.reportService.state&&(this.reportService.state.interestArea?this.filters.interestAreas=this.interestAreas.filter(r=>r.value===+this.reportService.state.interestArea):this.filters.interestAreas=void 0,this.reportService.state.clubContactPlayerStatuses?this.filters.clubContactPlayerStatuses=this.playerStatuses.filter(r=>r.value===+this.reportService.state.clubContactPlayerStatuses):this.filters.clubContactPlayerStatuses=void 0,this.filters.genderID=this.reportService.state.genderID?this.reportService.state.genderID:null,this.reportService.showReportData=!0),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CLUB_CONTACTS]})})}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};
3410d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-club-contacts-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-2"],[1,"form-group"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-5","col-lg-2"],["optionLabel","label","optionValue","value","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["optionLabel","label","optionValue","value","placeholder","All","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,F_,61,13),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
3410)();function I_(o,d){if(o&1&&(e(0,`
3411          `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
3412          `),i(),e(5,`
3413        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3414            `,t.header,`
3415            `),s(),m("field",t.field)}}function R_(o,d){if(o&1&&(e(0,`
3416      `),n(1,"tr"),e(2,`
3417        `),N(3,I_,6,4,null,null,W),i(),e(5,`
3418    `)),o&2){let t=p();s(3),V(t.columns)}}function M_(o,d){if(o&1&&(e(0,`
3419      `),n(1,"tr"),e(2,`
3420        `),n(3,"td"),e(4),i(),e(5,`
3421        `),n(6,"td"),e(7),i(),e(8,`
3422        `),n(9,"td"),e(10),i(),e(11,`
3423        `),n(12,"td",8),e(13),i(),e(14,`
3424        `),n(15,"td",8),e(16),i(),e(17,`
3425        `),n(18,"td",8),e(19),i(),e(20,`
3426        `),n(21,"td",8),e(22,`
3427          `),n(23,"span"),e(24),i(),e(25,`
3428        `),i(),e(26,`
3429        `),n(27,"td",8),e(28,`
3430          `),n(29,"span"),e(30),v(31,"number"),i(),e(32,`
3431        `),i(),e(33,`
3432        `),n(34,"td",8),e(35,`
3433          `),g(36,"i"),e(37,`
3434          `),n(38,"span",9),e(39),i(),e(40,`
3435        `),i(),e(41,`
3436        `),n(42,"td",8),e(43),i(),e(44,`
3437      `),i(),e(45,`
3438    `)),o&2){let t=d.$implicit,l=p();s(4),c(t.householdName),s(3),c(t.email),s(3),c(t.phoneNumber),s(3),c(t.requiredHours),s(3),c(t.completedHours),s(3),c(t.pendingHours),s(4),Je(t.remainingHours>0?"text-warning":"text-success"),s(),I(`
3439            `,t.remainingHours,`
3440          `),s(5),Je(t.completionPercentage>=100?"text-success":"text-warning"),s(),I("",B(31,16,t.completionPercentage,"1.0-1"),"%"),s(6),Je("fal "+l.getCompletionStatusIcon(t.requirementMet)+" "+l.getCompletionStatusClass(t.requirementMet)),s(3),c(t.requirementMet?"Complete":"Incomplete"),s(4),c(t.totalVolunteerEvents)}}function A_(o,d){if(o&1&&(e(0,`
3441      `),n(1,"tr"),e(2,`
3442        `),n(3,"td",8),e(4,"No volunteer status records found."),i(),e(5,`
3443      `),i(),e(6,`
3444    `)),o&2){let t=p();s(3),J("colspan",t.columns.length)}}var _r=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.totalRecords=0,this.loading=!0,this.unsubscribe$=new ge}ngOnInit(){this.columns=this.getReportColumns(),this.reportService.runReport.pipe(Z(this.unsubscribe$)).subscribe({next:()=>{this.loading||this.getReportData(null)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to run report.")}}),this.reportService.filterChanged.pipe(Z(this.unsubscribe$)).subscribe({next:()=>{this.getReportData(null)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to apply filters.")}}),this.reportService.state&&this.reportService.state.run?(this.reportService.showReportData=!0,this.getReportData(null)):this.reportService.showReportData&&this.getReportData(null)}getReportColumns(){return[{field:"householdName",header:"Household"},{field:"email",header:"Parent Email"},{field:"phoneNumber",header:"Parent Phone"},{field:"requiredHours",header:"Required Points"},{field:"completedHours",header:"Completed Points"},{field:"pendingHours",header:"Pending Points"},{field:"remainingHours",header:"Remaining Points"},{field:"completionPercentage",header:"Completion %"},{field:"requirementMet",header:"Requirement Met"},{field:"totalVolunteerEvents",header:"Total Tasks"}]}getReportData(l){let r=this.reportService.reportFilters[F.CLUB_VOLUNTEER_STATUS];l&&l.sortField&&(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC")),l&&l.first!==void 0&&l.rows?(r.page=Math.floor(l.first/l.rows)+1,r.rows=l.rows):r.page=1,this.loading=!0,this.reportService.getClubVolunteerStatusData().pipe(Z(this.unsubscribe$)).subscribe({next:a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report."),this.loading=!1}})}getCompletionStatusClass(l){return l?"text-success":"text-warning"}getCompletionStatusIcon(l){return l?"fa-check-circle":"fa-clock"}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-club-volunteer-status-table"]],standalone:!1,decls:13,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSortableColumn"],[3,"field"],[1,"text-center"],[1,"sr-only"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3445  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
3446    `),R(5,R_,6,0,"ng-template",3),e(6,`
3447    `),R(7,M_,46,19,"ng-template",4),e(8,`
3448    `),R(9,A_,7,1,"ng-template",5),e(10,`
3449  `),i(),e(11,`
3450`),i(),e(12,`
3451`)),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,Be],encapsulation:2});let o=d;return o}
3451)();function O_(o,d){if(o&1){let t=D();e(0,`
3452  `),n(1,"div",0),e(2,`
3453    `),n(3,"div",1),e(4,`
3454      `),n(5,"div",2),e(6,`
3455        `),n(7,"label"),e(8,"Household Name"),i(),e(9,`
3456        `),n(10,"input",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.householdName,r)||(a.filters.householdName=r),h(r)}),i(),e(11,`
3457      `),i(),e(12,`
3458    `),i(),e(13,`
3459    `),n(14,"div",1),e(15,`
3460      `),n(16,"div",2),e(17,`
3461        `),n(18,"label"),e(19,"Requirement Status"),i(),e(20,`
3462        `),n(21,"p-select",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.requirementMet,r)||(a.filters.requirementMet=r),h(r)}),i(),e(22,`
3463      `),i(),e(23,`
3464    `),i(),e(24,`
3465    `),n(25,"div",1),e(26,`
3466      `),n(27,"div",2),e(28,`
3467        `),n(29,"label"),e(30,"Minimum Required Points"),i(),e(31,`
3468        `),n(32,"input",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.minRequiredHours,r)||(a.filters.minRequiredHours=r),h(r)}),i(),e(33,`
3469      `),i(),e(34,`
3470    `),i(),e(35,`
3471    `),n(36,"div",1),e(37,`
3472      `),n(38,"div",2),e(39,`
3473        `),n(40,"label"),e(41,"Minimum Completed Points"),i(),e(42,`
3474        `),n(43,"input",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.minCompletedHours,r)||(a.filters.minCompletedHours=r),h(r)}),i(),e(44,`
3475      `),i(),e(45,`
3476    `),i(),e(46,`
3477  `),i(),e(47,`
3478`)}if(o&2){let t=p();s(10),C("ngModel",t.filters.householdName),s(11),C("ngModel",t.filters.requirementMet),m("options",t.requirementStatuses),s(11),C("ngModel",t.filters.minRequiredHours),s(11),C("ngModel",t.filters.minCompletedHours)}}function L_(o,d){if(o&1){let t=D();e(0,`
3479  `),n(1,"div",0),e(2,`
3480    `),n(3,"div",1),e(4,`
3481      `),n(5,"div",2),e(6,`
3482        `),n(7,"label"),e(8,"Email Search"),i(),e(9,`
3483        `),n(10,"input",6),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.emailSearch,r)||(a.filters.emailSearch=r),h(r)}),i(),e(11,`
3484      `),i(),e(12,`
3485    `),i(),e(13,`
3486  `),i(),e(14,`
3487`)}if(o&2){let t=p();s(10),C("ngModel",t.filters.emailSearch)}}var xr=(()=>{let d=class d{constructor(l){this.reportService=l}ngOnInit(){this.reportService.reportFilters[F.CLUB_VOLUNTEER_STATUS]===void 0&&(this.reportService.reportFilters[F.CLUB_VOLUNTEER_STATUS]=new P),this.filters=this.reportService.reportFilters[F.CLUB_VOLUNTEER_STATUS],this.requirementStatuses=[{label:"All",value:null},{label:"Complete",value:"true"},{label:"Incomplete",value:"false"}],this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CLUB_VOLUNTEER_STATUS]}),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}onFilterChange(){this.reportService.filterChanged.next(!0)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-club-volunteer-status-filters"]],standalone:!1,decls:2,vars:2,consts:[[1,"row"],[1,"col-md-3"],[1,"form-group"],["type","text","placeholder","Search by household name",1,"form-control",3,"ngModelChange","ngModel"],["optionLabel","label","optionValue","value","styleClass","full-width","placeholder","All Statuses","appendTo","body",3,"ngModelChange","ngModel","options"],["type","number","placeholder","Enter minimum hours","min","0","max","999",1,"form-control",3,"ngModelChange","ngModel"],["type","text","placeholder","Search by email",1,"form-control",3,"ngModelChange","ngModel"]],template:function(r,a){r&1&&(_(0,O_,48,5),_(1,L_,15,1)),r&2&&(x(a.filters?0:-1),s(),x(a.filters?1:-1))},dependencies:[fe,Gt,U,jt,wi,Y,q],encapsulation:2});let o=d;return o}
3487)();var V_=o=>["/admin/players",o,"volunteering"];function k_(o,d){if(o&1&&(e(0,`
3488        `),n(1,"th",4),e(2),g(3,"p-sortIcon",5),e(4,`
3489        `),i(),e(5,`
3490      `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),s(),I(`
3491          `,t.header,`
3492          `),s(),m("field",t.field)("ariaLabel",l.AriaLabels.ACTIVATE_SORT+" "+t.header)}}function B_(o,d){if(o&1&&(e(0,`
3493    `),n(1,"tr"),e(2,`
3494      `),N(3,k_,6,4,null,null,W),i(),e(5,`
3495  `)),o&2){let t=p();s(3),V(t.columns)}}function W_(o,d){if(o&1&&(e(0,`
3496    `),n(1,"tr"),e(2,`
3497      `),n(3,"td"),e(4,`
3498        `),n(5,"a",6),e(6),i(),e(7,`
3499      `),i(),e(8,`
3500      `),n(9,"td"),e(10),i(),e(11,`
3501      `),n(12,"td"),e(13),i(),e(14,`
3502      `),n(15,"td"),e(16),i(),e(17,`
3503      `),n(18,"td"),e(19),i(),e(20,`
3504      `),n(21,"td"),e(22),i(),e(23,`
3505      `),n(24,"td"),e(25),i(),e(26,`
3506      `),n(27,"td"),e(28),i(),e(29,`
3507      `),n(30,"td"),e(31,`
3508        `),g(32,"i",7),e(33),i(),e(34,`
3509    `),i(),e(35,`
3510  `)),o&2){let t=d.$implicit,l=p();s(5),m("routerLink",re(14,V_,t.playerID)),s(),I(`
3511          `,t.playerName,`
3512        `),s(4),c(t.programName),s(3),c(t.teamName||"No Team"),s(3),c(t.requiredVolunteerPoints),s(3),c(t.completedVolunteerPoints),s(3),c(t.pendingVolunteerPoints),s(3),c(t.remainingVolunteerPoints),s(3),I("",t.completionPercentage,"%"),s(4),Je("fas "+l.getCompletionStatusIcon(t.requirementMet)),m("ngClass",l.getCompletionStatusClass(t.requirementMet))("title",t.requirementMet?"Complete":"Incomplete"),s(),I(`
3513        `,t.requirementMet?"Complete":"Incomplete",`
3514      `)}}function U_(o,d){if(o&1&&(e(0,`
3515    `),n(1,"tr"),e(2,`
3516      `),n(3,"td",8),e(4,`
3517        No volunteer status data found matching the current filters.
3518      `),i(),e(5,`
3519    `),i(),e(6,`
3520  `)),o&2){let t=p();s(3),J("colspan",t.columns.length)}}var gr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.totalRecords=0,this.loading=!0,this.unsubscribe$=new ge}ngOnInit(){this.columns=this.getReportColumns(),this.reportService.runReport.pipe(Z(this.unsubscribe$)).subscribe({next:()=>{this.loading||this.getReportData(null)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to run report.")}}),this.reportService.filterChanged.pipe(Z(this.unsubscribe$)).subscribe({next:()=>{this.getReportData(null)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to apply filters.")}}),this.reportService.state&&this.reportService.state.run?(this.reportService.showReportData=!0,this.getReportData(null)):this.reportService.showReportData&&this.getReportData(null)}getReportColumns(){return[{field:"playerName",header:"Player Name"},{field:"programName",header:"Program"},{field:"teamName",header:"Team"},{field:"requiredVolunteerPoints",header:"Required Points"},{field:"completedVolunteerPoints",header:"Completed Points"},{field:"pendingVolunteerPoints",header:"Pending Points"},{field:"remainingVolunteerPoints",header:"Remaining Points"},{field:"completionPercentage",header:"Completion %"},{field:"requirementMet",header:"Requirement Met"}]}getReportData(l){let r=this.reportService.reportFilters[F.PROGRAM_TEAM_VOLUNTEER_STATUS];l&&l.sortField&&(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC")),l&&l.first!==void 0&&l.rows?(r.page=Math.floor(l.first/l.rows)+1,r.rows=l.rows):r.page=1,this.loading=!0,this.reportService.getProgramTeamVolunteerStatusData().pipe(Z(this.unsubscribe$)).subscribe({next:a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report."),this.loading=!1}})}getCompletionStatusClass(l){return l?"text-success":"text-warning"}getCompletionStatusIcon(l){return l?"fa-check-circle":"fa-clock"}formatDate(l){return l?new Date(l).toLocaleDateString():"N/A"}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-program-team-volunteer-status-table"]],standalone:!1,decls:9,vars:9,consts:[["styleClass","p-datatable-striped table-sticky-header","currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries",3,"onLazyLoad","value","columns","paginator","rows","totalRecords","lazy","loading","sortMode","showCurrentPageReport"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSortableColumn"],[3,"field","ariaLabel"],[1,"text-decoration-none",3,"routerLink"],[3,"ngClass","title"],[1,"text-center"]],template:function(r,a){r&1&&(n(0,"p-table",0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(1,`
3521
3522  `),R(2,B_,6,0,"ng-template",1),e(3,`
3523
3524  `),R(4,W_,36,16,"ng-template",2),e(5,`
3525
3526  `),R(6,U_,7,1,"ng-template",3),e(7,`
3527`),i(),e(8,`
3528`)),r&2&&m("value",a.reportData)("columns",a.columns)("paginator",!0)("rows",100)("totalRecords",a.totalRecords)("lazy",!0)("loading",a.loading)("sortMode","single")("showCurrentPageReport",!0)},dependencies:[Ge,pe,z,H,$,K],encapsulation:2});let o=d;return o}
3528)();function G_(o,d){if(o&1){let t=D();e(0,`
3529  `),n(1,"div",0),e(2,`
3530    `),n(3,"div",1),e(4,`
3531      `),n(5,"div",2),e(6,`
3532        `),n(7,"label"),e(8,"Program Type"),i(),e(9,`
3533        `),n(10,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programTypeID,r)||(a.filters.programTypeID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onProgramTypeChange())}),e(11,`
3534        `),i(),e(12,`
3535      `),i(),e(13,`
3536    `),i(),e(14,`
3537    `),n(15,"div",1),e(16,`
3538      `),n(17,"div",2),e(18,`
3539        `),n(19,"label"),e(20,"Program"),i(),e(21,`
3540        `),n(22,"p-select",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programID,r)||(a.filters.programID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onProgramChange())}),e(23,`
3541        `),i(),e(24,`
3542      `),i(),e(25,`
3543    `),i(),e(26,`
3544    `),n(27,"div",1),e(28,`
3545      `),n(29,"div",2),e(30,`
3546        `),n(31,"label"),e(32,"Team"),i(),e(33,`
3547        `),n(34,"p-select",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teamID,r)||(a.filters.teamID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onFilterChange())}),e(35,`
3548        `),i(),e(36,`
3549      `),i(),e(37,`
3550    `),i(),e(38,`
3551    `),n(39,"div",1),e(40,`
3552      `),n(41,"div",2),e(42,`
3553        `),n(43,"label"),e(44,"Requirement Status"),i(),e(45,`
3554        `),n(46,"p-select",6),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.requirementMet,r)||(a.filters.requirementMet=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onFilterChange())}),i(),e(47,`
3555      `),i(),e(48,`
3556    `),i(),e(49,`
3557  `),i(),e(50,`
3558`)}if(o&2){let t=p();s(10),m("showClear",!0),C("ngModel",t.filters.programTypeID),m("options",t.programTypes),s(12),m("showClear",!0),C("ngModel",t.filters.programID),m("options",t.programs),s(12),m("showClear",!0),C("ngModel",t.filters.teamID),m("options",t.teams)("disabled",!t.filters.programID||t.teams.length===0),s(12),C("ngModel",t.filters.requirementMet),m("options",t.requirementStatuses)}}function j_(o,d){o&1&&(e(0,`
3559  `),n(1,"div",0),e(2,`
3560    `),n(3,"div",7),e(4,`
3561      `),g(5,"i",8),e(6,` Loading filters...
3562    `),i(),e(7,`
3563  `),i(),e(8,`
3564`))}var fr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.programTypes=[],this.programs=[],this.teams=[],this.loading=!0,this.unsubscribe$=new ge}ngOnInit(){this.reportService.reportFilters[F.PROGRAM_TEAM_VOLUNTEER_STATUS]===void 0&&(this.reportService.reportFilters[F.PROGRAM_TEAM_VOLUNTEER_STATUS]=new P),this.filters=this.reportService.reportFilters[F.PROGRAM_TEAM_VOLUNTEER_STATUS],this.requirementStatuses=[{label:"All",value:null},{label:"Complete",value:"true"},{label:"Incomplete",value:"false"}],this.loadProgramTypes(),this.loadPrograms(),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.PROGRAM_TEAM_VOLUNTEER_STATUS]})}loadProgramTypes(){this.reportService.getProgramTypes(!0).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.programTypes=l?.filter(r=>r.value===1||r.value===3||r.value===4||r.value===6)||[]},error:()=>{this.siteDataService.showSiteErrorAlert("Unable to load program types.")}})}loadPrograms(){this.reportService.getPrograms().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.filters.programTypeID?this.programs=(l||[]).filter(r=>r.programTypeID===this.filters.programTypeID):this.programs=l||[],this.filters.programID&&this.onProgramChange(),this.loading=!1,this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to load programs.")}})}onProgramTypeChange(){this.filters.programID=null,this.filters.teamID=null,this.programs=[],this.teams=[],this.loadPrograms(),this.onFilterChange()}onProgramChange(){if(this.teams=[],this.filters.teamID=null,this.filters.programID){let l=this.programs.find(r=>r.programID===this.filters.programID);l&&l.teams&&(this.teams=l.teams)}this.onFilterChange()}onFilterChange(){this.reportService.filterChanged.next(!0)}ngOnDestroy(){this.clearSubscription$.unsubscribe(),this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-program-team-volunteer-status-filters"]],standalone:!1,decls:2,vars:2,consts:[[1,"row"],[1,"col-md-3"],[1,"form-group"],["optionLabel","label","optionValue","value","styleClass","full-width","placeholder","All Program Types","appendTo","body",3,"ngModelChange","onChange","showClear","ngModel","options"],["optionLabel","name","optionValue","programID","styleClass","full-width","placeholder","Select Program","appendTo","body",3,"ngModelChange","onChange","showClear","ngModel","options"],["optionLabel","name","optionValue","teamID","styleClass","full-width","placeholder","All Teams","appendTo","body",3,"ngModelChange","onChange","showClear","ngModel","options","disabled"],["optionLabel","label","optionValue","value","styleClass","full-width","placeholder","All Statuses","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],[1,"col-12","text-center"],[1,"fas","fa-spinner","fa-spin"]],template:function(r,a){r&1&&(_(0,G_,51,12),_(1,j_,9,0)),r&2&&(x(a.filters&&!a.loading?0:-1),s(),x(a.loading?1:-1))},dependencies:[U,Y,q],encapsulation:2});let o=d;return o}
3564)();var z_=o=>["/admin/players",o,"volunteering"],q_=o=>["/admin/users",o,"volunteering"];function $_(o,d){if(o&1&&(e(0,`
3565        `),n(1,"th",4),e(2),g(3,"p-sortIcon",5),e(4,`
3566        `),i(),e(5,`
3567      `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),s(),I(`
3568          `,t.header,`
3569          `),s(),m("field",t.field)("ariaLabel",l.AriaLabels.ACTIVATE_SORT+" "+t.header)}}function K_(o,d){if(o&1&&(e(0,`
3570    `),n(1,"tr"),e(2,`
3571      `),N(3,$_,6,4,null,null,W),i(),e(5,`
3572  `)),o&2){let t=p();s(3),V(t.columns)}}function J_(o,d){if(o&1&&(e(0,`
3573              `),n(1,"a",8),e(2),i(),e(3,`
3574            `)),o&2){let t=p(2).$implicit;s(),m("routerLink",re(2,z_,t.volunteerPlayerID)),s(),I(`
3575                `,t.volunteerName,`
3576              `)}}function X_(o,d){if(o&1&&(e(0,`
3577              `),n(1,"a",8),e(2),i(),e(3,`
3578            `)),o&2){let t=p(2).$implicit;s(),m("routerLink",re(2,q_,t.volunteerClubUserID)),s(),I(`
3579                `,t.volunteerName,`
3580              `)}}function Z_(o,d){if(o&1&&(e(0,`
3581              `),n(1,"span"),e(2),i(),e(3,`
3582            `)),o&2){let t=p(2).$implicit;s(2),c(t.volunteerName)}}function Q_(o,d){if(o&1&&(e(0,`
3583          `),n(1,"span"),e(2,`
3584            `),_(3,J_,4,4),_(4,X_,4,4),_(5,Z_,4,1),i(),e(6,`
3585        `)),o&2){let t=p().$implicit;s(3),x(t.volunteerPlayerID?3:-1),s(),x(!t.volunteerPlayerID&&t.volunteerClubUserID?4:-1),s(),x(!t.volunteerPlayerID&&!t.volunteerClubUserID?5:-1)}}function ex(o,d){o&1&&(e(0,`
3586          `),n(1,"span",9),e(2,"Unassigned"),i(),e(3,`
3587        `))}function tx(o,d){if(o&1&&(e(0,`
3588    `),n(1,"tr"),e(2,`
3589      `),n(3,"td"),e(4),i(),e(5,`
3590      `),n(6,"td"),e(7),i(),e(8,`
3591      `),n(9,"td"),e(10),i(),e(11,`
3592      `),n(12,"td",6),e(13),i(),e(14,`
3593      `),n(15,"td"),e(16),v(17,"date"),i(),e(18,`
3594      `),n(19,"td"),e(20),i(),e(21,`
3595      `),n(22,"td"),e(23),i(),e(24,`
3596      `),n(25,"td"),e(26,`
3597        `),_(27,Q_,7,3)(28,ex,4,0),i(),e(29,`
3598      `),n(30,"td",6),e(31,`
3599        `),g(32,"i",7),e(33),i(),e(34,`
3600      `),n(35,"td"),e(36),i(),e(37,`
3601      `),n(38,"td"),e(39),i(),e(40,`
3602      `),n(41,"td"),e(42),i(),e(43,`
3603    `),i(),e(44,`
3604  `)),o&2){let t=d.$implicit,l=p();s(4),c(t.calendarEventName),s(3),c(t.calendarEventType),s(3),c(t.taskName),s(3),c(t.points),s(3),c(E(17,16,t.eventStartDate)),s(4),c(l.formatTime(t.taskStartTime)),s(3),c(l.formatTime(t.taskEndTime)),s(4),x(t.volunteerName?27:28),s(5),Je("pi "+l.getAttendanceStatusIcon(t)),m("ngClass",l.getAttendanceStatusClass(t))("title",t.attendanceStatus),s(),I(`
3605        `,t.attendanceStatus,`
3606      `),s(3),c(t.facility||"N/A"),s(3),c(t.programName||"N/A"),s(3),c(t.teamName||"N/A")}}function ix(o,d){if(o&1&&(e(0,`
3607    `),n(1,"tr"),e(2,`
3608      `),n(3,"td",6),e(4,`
3609        No volunteer task data found matching the current filters.
3610      `),i(),e(5,`
3611    `),i(),e(6,`
3612  `)),o&2){let t=p();s(3),J("colspan",t.columns.length)}}var hr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.totalRecords=0,this.loading=!0,this.unsubscribe$=new ge}ngOnInit(){this.columns=this.getReportColumns(),this.reportService.runReport.pipe(Z(this.unsubscribe$)).subscribe({next:()=>{this.loading||this.getReportData(null)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to run report.")}}),this.reportService.filterChanged.pipe(Z(this.unsubscribe$)).subscribe({next:()=>{this.getReportData(null)},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to apply filters.")}}),this.reportService.state&&this.reportService.state.run?(this.reportService.showReportData=!0,this.getReportData(null)):this.reportService.showReportData&&this.getReportData(null)}getReportColumns(){return[{field:"calendarEventName",header:"Event Name"},{field:"calendarEventType",header:"Event Type"},{field:"taskName",header:"Task Name"},{field:"points",header:"Points"},{field:"eventStartDate",header:"Event Date"},{field:"taskStartTime",header:"Start Time"},{field:"taskEndTime",header:"End Time"},{field:"volunteerName",header:"Volunteer"},{field:"isConfirmed",header:"Status"},{field:"facility",header:"Facility"},{field:"programName",header:"Program"},{field:"teamName",header:"Team"}]}getReportData(l){let r=this.reportService.reportFilters[F.VOLUNTEER_TASKS];l&&l.sortField&&(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC")),l&&l.first!==void 0&&l.rows?(r.page=Math.floor(l.first/l.rows)+1,r.rows=l.rows):r.page=1,this.loading=!0,this.reportService.getVolunteerTasksData().pipe(Z(this.unsubscribe$)).subscribe({next:a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report."),this.loading=!1}})}
3612getAttendanceStatusClass(l){return l.volunteerName?l.isConfirmed?"text-success":"text-warning":"text-muted"}getAttendanceStatusIcon(l){return l.attendanceIcon}formatDate(l){return l?new Date(l).toLocaleDateString():"N/A"}formatTime(l){if(!l)return"N/A";if(typeof l=="string"){let r=l.split(":");if(r.length>=2){let a=parseInt(r[0],10),b=parseInt(r[1],10),u=a>=12?"PM":"AM",L=a===0?12:a>12?a-12:a,he=b.toString().padStart(2,"0");return`${L}:${he} ${u}`}}return l.toString()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-volunteer-tasks-table"]],standalone:!1,decls:9,vars:9,consts:[["styleClass","p-datatable-striped table-sticky-header","currentPageReportTemplate","Showing {first} to {last} of {totalRecords} entries",3,"onLazyLoad","value","columns","paginator","rows","totalRecords","lazy","loading","sortMode","showCurrentPageReport"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSortableColumn"],[3,"field","ariaLabel"],[1,"text-center"],[3,"ngClass","title"],[1,"text-decoration-none",3,"routerLink"],[1,"text-muted"]],template:function(r,a){r&1&&(n(0,"p-table",0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(1,`
3613
3614  `),R(2,K_,6,0,"ng-template",1),e(3,`
3615
3616  `),R(4,tx,45,18,"ng-template",2),e(5,`
3617
3618  `),R(6,ix,7,1,"ng-template",3),e(7,`
3619`),i(),e(8,`
3620`)),r&2&&m("value",a.reportData)("columns",a.columns)("paginator",!0)("rows",100)("totalRecords",a.totalRecords)("lazy",!0)("loading",a.loading)("sortMode","single")("showCurrentPageReport",!0)},dependencies:[Ge,pe,z,H,$,K,de],encapsulation:2});let o=d;return o}
3620)();function ox(o,d){if(o&1){let t=D();e(0,`
3621          `),n(1,"small",10),e(2,`
3622            `),n(3,"button",11),T("click",function(){f(t);let r=p(2);return h(r.clearPointsRange())}),e(4,"Clear range"),i(),e(5,`
3623          `),i(),e(6,`
3624        `)}}function rx(o,d){if(o&1){let t=D();e(0,`
3625  `),n(1,"div",0),e(2,`
3626    `),n(3,"div",1),e(4,`
3627      `),n(5,"div",2),e(6,`
3628        `),n(7,"label"),e(8,"Event Type"),i(),e(9,`
3629        `),n(10,"p-select",3),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubEventTypeID,r)||(a.filters.clubEventTypeID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onFilterChange())}),e(11,`
3630        `),i(),e(12,`
3631      `),i(),e(13,`
3632    `),i(),e(14,`
3633    `),n(15,"div",1),e(16,`
3634      `),n(17,"div",2),e(18,`
3635        `),n(19,"label"),e(20,"Task Name"),i(),e(21,`
3636        `),n(22,"p-inputgroup"),e(23,`
3637          `),n(24,"input",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.taskName,r)||(a.filters.taskName=r),h(r)}),T("input",function(){f(t);let r=p();return h(r.onFilterChange())}),i(),e(25,`
3638            `),n(26,"p-inputgroup-addon"),e(27,`
3639              `),n(28,"button",5),T("click",function(){f(t);let r=p();return h(r.clearTaskName())}),e(29,`
3640                `),g(30,"i",6),e(31,`
3641              `),i(),e(32,`
3642            `),i(),e(33,`
3643        `),i(),e(34,`
3644      `),i(),e(35,`
3645    `),i(),e(36,`
3646    `),n(37,"div",1),e(38,`
3647      `),n(39,"div",2),e(40,`
3648        `),n(41,"label"),e(42,"Points Range"),i(),e(43,`
3649        `),n(44,"p-inputgroup"),e(45,`
3650          `),n(46,"input",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.pointsMin,r)||(a.filters.pointsMin=r),h(r)}),T("input",function(){f(t);let r=p();return h(r.onFilterChange())}),i(),e(47,`
3651            `),n(48,"p-inputgroup-addon"),e(49,"to"),i(),e(50,`
3652            `),n(51,"input",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.pointsMax,r)||(a.filters.pointsMax=r),h(r)}),T("input",function(){f(t);let r=p();return h(r.onFilterChange())}),i(),e(52,`
3653        `),i(),e(53,`
3654        `),_(54,ox,7,0),i(),e(55,`
3655    `),i(),e(56,`
3656    `),n(57,"div",1),e(58,`
3657      `),n(59,"div",2),e(60,`
3658        `),n(61,"label"),e(62,"Facility"),i(),e(63,`
3659        `),n(64,"p-select",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.locationID,r)||(a.filters.locationID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onFilterChange())}),e(65,`
3660        `),i(),e(66,`
3661      `),i(),e(67,`
3662    `),i(),e(68,`
3663  `),i(),e(69,`
3664`)}if(o&2){let t=p();s(10),C("ngModel",t.filters.clubEventTypeID),m("options",t.eventTypes)("showClear",!0),s(14),C("ngModel",t.filters.taskName),s(4),m("disabled",!t.filters.taskName),s(18),C("ngModel",t.filters.pointsMin),s(5),C("ngModel",t.filters.pointsMax),s(3),x(t.filters.pointsMin||t.filters.pointsMax?54:-1),s(10),C("ngModel",t.filters.locationID),m("options",t.facilities)("showClear",!0)}}function ax(o,d){if(o&1){let t=D();e(0,`
3665          `),n(1,"small",10),e(2,`
3666            `),n(3,"button",11),T("click",function(){f(t);let r=p(2);return h(r.clearDateRange())}),e(4,"Clear dates"),i(),e(5,`
3667          `),i(),e(6,`
3668        `)}}function lx(o,d){if(o&1){let t=D();e(0,`
3669  `),n(1,"div",0),e(2,`
3670    `),n(3,"div",1),e(4,`
3671      `),n(5,"div",2),e(6,`
3672        `),n(7,"label"),e(8,"Start Date Range"),i(),e(9,`
3673        `),n(10,"p-inputgroup"),e(11,`
3674          `),n(12,"p-datepicker",12),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.startDateFrom,r)||(a.filters.startDateFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.onFilterChange())})("onClearClick",function(){f(t);let r=p();return h(r.onFilterChange())}),e(13,`
3675          `),i(),e(14,`
3676          `),n(15,"p-inputgroup-addon"),e(16,"to"),i(),e(17,`
3677          `),n(18,"p-datepicker",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.startDateTo,r)||(a.filters.startDateTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.onFilterChange())})("onClearClick",function(){f(t);let r=p();return h(r.onFilterChange())}),e(19,`
3678          `),i(),e(20,`
3679        `),i(),e(21,`
3680        `),_(22,ax,7,0),i(),e(23,`
3681    `),i(),e(24,`
3682    `),n(25,"div",1),e(26,`
3683      `),n(27,"div",2),e(28,`
3684        `),n(29,"label"),e(30,"Program"),i(),e(31,`
3685        `),n(32,"p-select",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programID,r)||(a.filters.programID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onProgramChange())}),e(33,`
3686        `),i(),e(34,`
3687      `),i(),e(35,`
3688    `),i(),e(36,`
3689    `),n(37,"div",1),e(38,`
3690      `),n(39,"div",2),e(40,`
3691        `),n(41,"label"),e(42,"Team"),i(),e(43,`
3692        `),n(44,"p-select",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teamID,r)||(a.filters.teamID=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onFilterChange())}),e(45,`
3693        `),i(),e(46,`
3694      `),i(),e(47,`
3695    `),i(),e(48,`
3696    `),n(49,"div",1),e(50,`
3697      `),e(51,`
3698    `),i(),e(52,`
3699  `),i(),e(53,`
3700`)}if(o&2){let t=p();s(12),C("ngModel",t.filters.startDateFrom),s(6),C("ngModel",t.filters.startDateTo),s(4),x(t.filters.startDateFrom||t.filters.startDateTo?22:-1),s(10),C("ngModel",t.filters.programID),m("options",t.programs)("showClear",!0),s(12),C("ngModel",t.filters.teamID),m("options",t.teams)("showClear",!0)("disabled",!t.filters.programID||t.teams.length===0)}}var Cr=(()=>{let d=class d{constructor(l){this.reportService=l,this.eventTypes=[],this.facilities=[],this.programs=[],this.teams=[],this.loading=!0,this.unsubscribe$=new ge}ngOnInit(){this.reportService.reportFilters[F.VOLUNTEER_TASKS]===void 0&&(this.reportService.reportFilters[F.VOLUNTEER_TASKS]=new P),this.filters=this.reportService.reportFilters[F.VOLUNTEER_TASKS],this.loadEventTypes(),this.loadFacilities(),this.loadPrograms(),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.VOLUNTEER_TASKS]})}loadEventTypes(){this.reportService.getCalendarEventTypes().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.eventTypes=l||[]},error:()=>{}})}loadFacilities(){this.reportService.getFacilities().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.facilities=l||[]},error:()=>{}})}loadPrograms(){this.reportService.getPrograms().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.programs=l||[],this.filters.programID&&this.onProgramChange(),this.loading=!1},error:()=>{this.loading=!1}})}onProgramChange(){if(this.teams=[],this.filters.teamID=null,this.filters.programID){let l=this.programs.find(r=>r.programID===this.filters.programID);l&&l.teams&&(this.teams=l.teams)}this.onFilterChange()}onFilterChange(){this.reportService.filterChanged.next(!0)}clearTaskName(){this.filters.taskName=null,this.onFilterChange()}clearPointsRange(){this.filters.pointsMin=null,this.filters.pointsMax=null,this.onFilterChange()}clearDateRange(){this.filters.startDateFrom=null,this.filters.startDateTo=null,this.onFilterChange()}ngOnDestroy(){this.clearSubscription$.unsubscribe(),this.unsubscribe$.next(),this.unsubscribe$.complete()}};
3700d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-volunteer-tasks-filters"]],standalone:!1,decls:2,vars:2,consts:[[1,"row"],[1,"col-md-3"],[1,"form-group"],["optionLabel","label","optionValue","value","styleClass","full-width","placeholder","All Event Types","appendTo","body",3,"ngModelChange","onChange","ngModel","options","showClear"],["type","text","placeholder","Search task name",1,"form-control",3,"ngModelChange","input","ngModel"],["type","button",1,"btn","btn-naked","btn-sm",3,"click","disabled"],[1,"fa","fa-times"],["type","number","placeholder","Min points","min","0",1,"form-control","me-2",3,"ngModelChange","input","ngModel"],["type","number","placeholder","Max points","min","0",1,"form-control",3,"ngModelChange","input","ngModel"],["optionLabel","label","optionValue","value","styleClass","full-width","placeholder","All Facilities","appendTo","body",3,"ngModelChange","onChange","ngModel","options","showClear"],[1,"form-text","text-muted"],[1,"btn","btn-link","btn-sm","p-0",3,"click"],["dateFormat","mm/dd/yy","placeholder","From date","styleClass","w-50 me-2","appendTo","body",3,"ngModelChange","onSelect","onClearClick","ngModel"],["dateFormat","mm/dd/yy","placeholder","To date","styleClass","w-50","appendTo","body",3,"ngModelChange","onSelect","onClearClick","ngModel"],["optionLabel","name","optionValue","programID","styleClass","full-width","placeholder","All Programs","appendTo","body",3,"ngModelChange","onChange","ngModel","options","showClear"],["optionLabel","name","optionValue","teamID","styleClass","full-width","placeholder","All Teams","appendTo","body",3,"ngModelChange","onChange","ngModel","options","showClear","disabled"]],template:function(r,a){r&1&&(_(0,rx,70,11),_(1,lx,54,10)),r&2&&(x(a.filters&&!a.loading?0:-1),s(),x(a.filters&&!a.loading?1:-1))},dependencies:[fe,Gt,U,jt,Y,ie,ne,te,q],encapsulation:2});let o=d;return o}
3700)();function dx(o,d){if(o&1){let t=D();e(0,`
3701      `),n(1,"div",12),e(2,`
3702        `),n(3,"div",2),e(4,`
3703          `),n(5,"label"),e(6,"Club"),i(),e(7,`
3704          `),n(8,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
3705          `),i(),e(10,`
3706        `),i(),e(11,`
3707      `),i(),e(12,`
3708    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} club(s) selected")}}function px(o,d){if(o&1){let t=D();e(0,`
3709          `),n(1,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.roles,r)||(a.filters.roles=r),h(r)}),e(2,`
3710          `),i(),e(3,`
3711        `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.roles),m("options",t.roles)("filter",!1)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} role(s) selected")}}function mx(o,d){if(o&1){let t=D();e(0,`
3712          `),n(1,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),e(2,`
3713          `),i(),e(3,`
3714        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} program(s) selected")}}function cx(o,d){if(o&1){let t=D();e(0,`
3715  `),n(1,"div",0),e(2,`
3716    `),_(3,dx,13,7),n(4,"div",1),e(5,`
3717      `),n(6,"div",2),e(7,`
3718        `),n(8,"label"),e(9,"Role"),i(),e(10,`
3719        `),_(11,px,4,6),i(),e(12,`
3720    `),i(),e(13,`
3721    `),n(14,"div",3),e(15,`
3722      `),n(16,"div",2),e(17,`
3723        `),n(18,"label"),e(19,"Program"),i(),e(20,`
3724        `),_(21,mx,4,8),i(),e(22,`
3725    `),i(),e(23,`
3726    `),n(24,"div",4),e(25,`
3727      `),n(26,"div",2),e(27,`
3728        `),n(28,"label"),e(29,"Team"),i(),e(30,`
3729        `),n(31,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(32,`
3730        `),i(),e(33,`
3731      `),i(),e(34,`
3732    `),i(),e(35,`
3733    `),n(36,"div",3),e(37,`
3734      `),n(38,"div",2),e(39,`
3735        `),n(40,"label",6),e(41,"Last Name"),i(),e(42,`
3736        `),n(43,"input",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.userName,r)||(a.filters.userName=r),h(r)}),i(),e(44,`
3737      `),i(),e(45,`
3738    `),i(),e(46,`
3739    `),n(47,"div",8),e(48,`
3740      `),n(49,"div",2),e(50,`
3741        `),n(51,"label"),e(52,"Test Users"),i(),e(53,`
3742        `),n(54,"p-select",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),i(),e(55,`
3743      `),i(),e(56,`
3744    `),i(),e(57,`
3745    `),n(58,"div",10),e(59,`
3746      `),n(60,"div",2),e(61,`
3747        `),n(62,"label"),e(63,"Selected Fields"),i(),e(64,`
3748        `),n(65,"p-multiSelect",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.selectedFields,r)||(a.filters.selectedFields=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.onSelectedFieldChange())}),e(66,`
3749        `),i(),e(67,`
3750      `),i(),e(68,`
3751    `),i(),e(69,`
3752  `),i(),e(70,`
3753`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.roles?11:-1),s(10),x(t.programs?21:-1),s(10),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} team(s) selected"),s(12),C("ngModel",t.filters.userName),s(11),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(11),m("autofocusFilter",!0),C("ngModel",t.filters.selectedFields),m("dataKey","field")("options",t.allAvailableFields)("filter",!0)("maxSelectedLabels",1)("showToggleAll",!0)("placeholder",t.allAvailableFields?"None":"Select fields")("selectedItemsLabel","{0} fields(s) selected")}}var Sr=(()=>{let d=class d{constructor(l,r,a,b){this.siteDataService=l,this.reportService=r,this.teamService=a,this.authorizeService=b,this.testUserOptions=le}ngOnInit(){this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l)}),oe([this.siteDataService.getClubSettings(),this.siteDataService.getClubFieldOptions(),this.reportService.getRoles(),this.reportService.getPrograms()]).subscribe(l=>{this.club=l[0].club,this.clubFieldOptions=l[1],this.roles=l[2],this.reportService.programs=l[3],this.allAvailableFields=this.getAvailableFields(),this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS]===void 0?(this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS]=new P,this.filterAvailableColumns()):this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS].selectedFields||(this.filterAvailableColumns(),this.reportService.showReportData=!0),this.filters=this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS],this.programs=this.reportService.filterPrograms(this.filters),this.getTeams(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS],this.filterAvailableColumns()})}onSelectedFieldChange(){this.filters.selectedFields.sort((l,r)=>this.allAvailableFields.findIndex(a=>a.field===l.field)-this.allAvailableFields.findIndex(a=>a.field===r.field))}getAvailableFields(){let l=[{field:"clubUserID",header:"User ID"},{field:"userName",header:"User Name"},{field:"roles",header:"Role(s)"},{field:"email",header:"Email"},{field:"cellPhone",header:"Phone Number"},{field:"programTeam",header:"Team(s)",notSortable:!0}];return this.additionalFields=[],this.additionalFields.push({notSortable:!0,field:"dob",header:"User Date of Birth"}),this.additionalFields.push({notSortable:!0,field:"userAddressLine1",header:"User Address Line 1"}),this.additionalFields.push({notSortable:!0,field:"userAddressLine2",header:"User Address Line 2"}),this.additionalFields.push({notSortable:!0,field:"userCity",header:"User City"}),this.additionalFields.push({notSortable:!0,field:"userState",header:"User State"}),this.additionalFields.push({notSortable:!0,field:"userZip",header:"User Zi
3753p"}),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_CONTACT_FIRST_NAME,"primaryContactFirstName",!1),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_CONTACT_LAST_NAME,"primaryContactLastName",!1),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_CONTACT_CELL_PHONE,"primaryContactCellPhone",!1),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_CONTACT_EMAIL,"primaryContactEmail",!1),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_CONTACT_HOME_PHONE,"primaryContactHomePhone",!1),this.addFieldOptionedField(this.additionalFields,O.PRIMARY_CONTACT_WORK_PHONE,"primaryContactWorkPhone",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_CONTACT_FIRST_NAME,"secondaryContactFirstName",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_CONTACT_LAST_NAME,"secondaryContactLastName",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_CONTACT_CELL_PHONE,"secondaryContactCellPhone",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_CONTACT_EMAIL,"secondaryContactEmail",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_CONTACT_HOME_PHONE,"secondaryContactHomePhone",!1),this.addFieldOptionedField(this.additionalFields,O.SECONDARY_CONTACT_WORK_PHONE,"secondaryContactWorkPhone",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_TEXT_FIELD_1,"customTextField1",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_TEXT_FIELD_2,"customTextField2",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_TEXT_FIELD_3,"customTextField3",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_TEXT_FIELD_4,"customTextField4",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_TEXT_FIELD_5,"customTextField5",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_1,"customDropdownField1",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_2,"customDropdownField2",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_3,"customDropdownField3",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_4,"customDropdownField4",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_5,"customDropdownField5",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_6,"customDropdownField6",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_7,"customDropdownField7",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_8,"customDropdownField8",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_9,"customDropdownField9",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_10,"customDropdownField10",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_11,"customDropdownField11",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_12,"customDropdownField12",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_13,"customDropdownField13",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_14,"customDropdownField14",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_CUSTOM_DROPDOWN_FIELD_15,"customDropdownField15",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_OCCUPATION,"jobTitle",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_EMPLOYER,"employer",!1),this.addFieldOptionedField(this.additionalFields,O.STAFF_INDUSTRY,"industry",!1),this.club.sportID===Rt.HOCKEY&&(this.additionalFields=[{notSortable:!0,field:"usaHockeyNumber",header:"USA Hockey Number"},...this.additionalFields]),this.club.sportID===Rt.LACROSSE&&(this.additionalFields=[{notSortable:!0,field:"usaLacrosseNumber",header:"USA Lacrosse Number"},...this.additionalFields]),this.club.enableTeamSnap&&(this.additionalFields=[{notSortable:!0,field:"teamSnapUserID",header:"Team Snap User ID"},...this.additionalFields]),l=[...l,...this.additionalFields],l}addFieldOptionedField(l,r,a,b=!0,u=void 0){let L=this.clubFieldOptions.find(he=>he.fieldOptionID===r);L!==void 0&&l.push({notSortable:!b,field:a,header:u||L.fieldName})}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>
3753{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name})}):this.teams=void 0}filterAvailableColumns(){let l=this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS];l.selectedFields=this.allAvailableFields.filter(r=>!this.additionalFields.some(a=>a.field===r.field))}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(ve),w(Pe))},d.\u0275cmp=A({type:d,selectors:[["app-staff-demographics-filters"]],standalone:!1,decls:1,vars:1,consts:[[1,"row"],[1,"col-md-3"],[1,"form-group"],[1,"col-md-5","col-lg-3"],[1,"col-md-5","col-lg-2"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["for","last-name"],["id","last-name","type","text",3,"ngModelChange","ngModel"],[1,"col-md-2","col-lg-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-4"],["optionLabel","header","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","dataKey","options","filter","maxSelectedLabels","showToggleAll","placeholder","selectedItemsLabel"],[1,"col-md-3","col-lg-4"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,cx,71,23),r&2&&x(a.filters?0:-1)},dependencies:[fe,U,Y,q,Q],encapsulation:2});let o=d;return o}
3753)();var _x=o=>["/admin/users",o,"profile"];function xx(o,d){if(o&1&&(e(0,`
3754            `),n(1,"th"),e(2),i(),e(3,`
3755          `)),o&2){let t=p().$implicit;s(2),I(`
3756              `,t.header,`
3757            `)}}function gx(o,d){if(o&1&&(e(0,`
3758            `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
3759            `),i(),e(5,`
3760          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3761              `,t.header,`
3762              `),s(),m("field",t.field)}}function fx(o,d){if(o&1&&(e(0,`
3763          `),_(1,xx,4,1)(2,gx,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function hx(o,d){if(o&1&&(e(0,`
3764      `),n(1,"tr"),e(2,`
3765        `),N(3,fx,3,1,null,null,W),i(),e(5,`
3766    `)),o&2){let t=p();s(3),V(t.columns)}}function Cx(o,d){if(o&1&&(e(0,`
3767          `),n(1,"td"),e(2),i(),e(3,`
3768        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Sx(o,d){if(o&1&&(e(0,`
3769          `),n(1,"td"),e(2),i(),e(3,`
3770        `)),o&2){let t=p().$implicit;s(2),c(t.clubUserID)}}function yx(o,d){if(o&1&&(e(0,`
3771              `),n(1,"a",7),e(2),i(),e(3,`
3772            `)),o&2){let t=p(2).$implicit;s(),m("routerLink",re(2,_x,t.clubUserID)),s(),c(t.userName)}}function bx(o,d){if(o&1&&e(0),o&2){let t=p(2).$implicit;I(`
3773              `,t.userName,`
3774            `)}}function vx(o,d){if(o&1&&(e(0,`
3775          `),n(1,"td"),e(2,`
3776            `),_(3,yx,4,4)(4,bx,1,1),i(),e(5,`
3777        `)),o&2){let t=p(2);s(3),x(t.reportService.profile[t.Permission.UserProfile]?3:4)}}function Tx(o,d){if(o&1&&(e(0,`
3778          `),n(1,"td"),e(2),i(),e(3,`
3779        `)),o&2){let t=p().$implicit;s(2),c(t.roles)}}function Ex(o,d){if(o&1&&(e(0,`
3780          `),n(1,"td"),e(2),i(),e(3,`
3781        `)),o&2){let t=p().$implicit;s(2),c(t.email)}}function wx(o,d){if(o&1&&(e(0,`
3782          `),n(1,"td"),e(2),i(),e(3,`
3783        `)),o&2){let t=p().$implicit;s(2),c(t.cellPhone)}}function Fx(o,d){if(o&1&&(e(0,`
3784          `),n(1,"td"),e(2),i(),e(3,`
3785        `)),o&2){let t=p().$implicit;s(2),c(t.programTeam)}}function Dx(o,d){if(o&1&&(e(0,`
3786          `),n(1,"td"),e(2),i(),e(3,`
3787        `)),o&2){let t=p().$implicit;s(2),c(t.teamSnapUserID)}}function Ix(o,d){if(o&1&&(e(0,`
3788          `),n(1,"td"),e(2),i(),e(3,`
3789        `)),o&2){let t=p().$implicit;s(2),c(t.usaLacrosseNumber)}}function Rx(o,d){if(o&1&&(e(0,`
3790          `),n(1,"td"),e(2),i(),e(3,`
3791        `)),o&2){let t=p().$implicit;s(2),c(t.usaHockeyNumber)}}function Mx(o,d){if(o&1&&(e(0,`
3792          `),n(1,"td"),e(2),v(3,"date"),i(),e(4,`
3793        `)),o&2){let t=p().$implicit;s(2),c(B(3,1,t.dob,"M/d/y"))}}function Ax(o,d){if(o&1&&(e(0,`
3794          `),n(1,"td"),e(2),i(),e(3,`
3795        `)),o&2){let t=p().$implicit;s(2),c(t.userAddressLine1)}}function Px(o,d){if(o&1&&(e(0,`
3796          `),n(1,"td"),e(2),i(),e(3,`
3797        `)),o&2){let t=p().$implicit;s(2),c(t.userAddressLine2)}}function Ox(o,d){if(o&1&&(e(0,`
3798          `),n(1,"td"),e(2),i(),e(3,`
3799        `)),o&2){let t=p().$implicit;s(2),c(t.userCity)}}function Lx(o,d){if(o&1&&(e(0,`
3800          `),n(1,"td"),e(2),i(),e(3,`
3801        `)),o&2){let t=p().$implicit;s(2),c(t.userState)}}function Nx(o,d){if(o&1&&(e(0,`
3802          `),n(1,"td"),e(2),i(),e(3,`
3803        `)),o&2){let t=p().$implicit;s(2),c(t.userZip)}}function Vx(o,d){if(o&1&&(e(0,`
3804          `),n(1,"td"),e(2),i(),e(3,`
3805        `)),o&2){let t=p().$implicit;s(2),c(t.primaryContactFirstName)}}function kx(o,d){if(o&1&&(e(0,`
3806          `),n(1,"td"),e(2),i(),e(3,`
3807        `)),o&2){let t=p().$implicit;s(2),c(t.primaryContactLastName)}}function Bx(o,d){if(o&1&&(e(0,`
3808          `),n(1,"td"),e(2),i(),e(3,`
3809        `)),o&2){let t=p().$implicit;s(2),c(t.primaryContactCellPhone)}}function Wx(o,d){if(o&1&&(e(0,`
3810          `),n(1,"td"),e(2),i(),e(3,`
3811        `)),o&2){let t=p().$implicit;s(2),c(t.primaryContactEmail)}}function Ux(o,d){if(o&1&&(e(0,`
3812          `),n(1,"td"),e(2),i(),e(3,`
3813        `)),o&2){let t=p().$implicit;s(2),c(t.primaryContactHomePhone)}}function Yx(o,d){if(o&1&&(e(0,`
3814          `),n(1,"td"),e(2),i(),e(3,`
3815        `)),o&2){let t=p().$implicit;s(2),c(t.primaryContactWorkPhone)}}function Gx(o,d){if(o&1&&(e(0,`
3816          `),n(1,"td"),e(2),i(),e(3,`
3817        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryContactFirstName)}}function jx(o,d){if(o&1&&(e(0,`
3818          `),n(1,"td"),e(2),i(),e(3,`
3819        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryContactLastName)}}function Hx(o,d){if(o&1&&(e(0,`
3820          `),n(1,"td"),e(2),i(),e(3,`
3821        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryContactCellPhone)}}function zx(o,d){if(o&1&&(e(0,`
3822          `),n(1,"td"),e(2),i(),e(3,`
3823        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryContactEmail)}}function qx(o,d){if(o&1&&(e(0,`
3824          `),n(1,"td"),e(2),i(),e(3,`
3825        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryContactHomePhone)}}function $x(o,d){if(o&1&&(e(0,`
3826          `),n(1,"td"),e(2),i(),e(3,`
3827        `)),o&2){let t=p().$implicit;s(2),c(t.secondaryContactWorkPhone)}}function Kx(o,d){if(o&1&&(e(0,`
3828          `),n(1,"td"),e(2),i(),e(3,`
3829        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField1)}}function Jx(o,d){if(o&1&&(e(0,`
3830          `),n(1,"td"),e(2),i(),e(3,`
3831        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField2)}}function Xx(o,d){if(o&1&&(e(0,`
3832          `),n(1,"td"),e(2),i(),e(3,`
3833        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField3)}}function Zx(o,d){if(o&1&&(e(0,`
3834          `),n(1,"td"),e(2),i(),e(3,`
3835        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField4)}}function Qx(o,d){if(o&1&&(e(0,`
3836          `),n(1,"td"),e(2),i(),e(3,`
3837        `)),o&2){let t=p().$implicit;s(2),c(t.customTextField5)}}function e1(o,d){if(o&1&&(e(0,`
3838          `),n(1,"td"),e(2),i(),e(3,`
3839        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField1)}}function t1(o,d){if(o&1&&(e(0,`
3840          `),n(1,"td"),e(2),i(),e(3,`
3841        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField2)}}function i1(o,d){if(o&1&&(e(0,`
3842          `),n(1,"td"),e(2),i(),e(3,`
3843        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField3)}}function n1(o,d){if(o&1&&(e(0,`
3844          `),n(1,"td"),e(2),i(),e(3,`
3845        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField4)}}function o1(o,d){if(o&1&&(e(0,`
3846          `),n(1,"td"),e(2),i(),e(3,`
3847        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField5)}}function r1(o,d){if(o&1&&(e(0,`
3848          `),n(1,"td"),e(2),i(),e(3,`
3849        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField6)}}function a1(o,d){if(o&1&&(e(0,`
3850          `),n(1,"td"),e(2),i(),e(3,`
3851        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField7)}}function l1(o,d){if(o&1&&(e(0,`
3852          `),n(1,"td"),e(2),i(),e(3,`
3853        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField8)}}function s1(o,d){if(o&1&&(e(0,`
3854          `),n(1,"td"),e(2),i(),e(3,`
3855        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField9)}}function d1(o,d){if(o&1&&(e(0,`
3856          `),n(1,"td"),e(2),i(),e(3,`
3857        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField10)}}function p1(o,d){if(o&1&&(e(0,`
3858          `),n(1,"td"),e(2),i(),e(3,`
3859        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField11)}}function m1(o,d){if(o&1&&(e(0,`
3860          `),n(1,"td"),e(2),i(),e(3,`
3861        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField12)}}function c1(o,d){if(o&1&&(e(0,`
3862          `),n(1,"td"),e(2),i(),e(3,`
3863        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField13)}}function u1(o,d){if(o&1&&(e(0,`
3864          `),n(1,"td"),e(2),i(),e(3,`
3865        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField14)}}function _1(o,d){if(o&1&&(e(0,`
3866          `),n(1,"td"),e(2),i(),e(3,`
3867        `)),o&2){let t=p().$implicit;s(2),c(t.customDropdownField15)}}function x1(o,d){if(o&1&&(e(0,`
3868          `),n(1,"td"),e(2),i(),e(3,`
3869        `)),o&2){let t=p().$implicit;s(2),c(t.jobTitle)}}function g1(o,d){if(o&1&&(e(0,`
3870          `),n(1,"td"),e(2),i(),e(3,`
3871        `)),o&2){let t=p().$implicit;s(2),c(t.employer)}}function f1(o,d){if(o&1&&(e(0,`
3872          `),n(1,"td"),e(2),i(),e(3,`
3873        `)),o&2){let t=p().$implicit;s(2),c(t.industry)}}function h1(o,d){if(o&1&&(e(0,`
3874      `),n(1,"tr"),e(2,`
3875        `),_(3,Cx,4,1),_(4,Sx,4,1),_(5,vx,6,1),_(6,Tx,4,1),_(7,Ex,4,1),_(8,wx,4,1),_(9,Fx,4,1),_(10,Dx,4,1),_(11,Ix,4,1),_(12,Rx,4,1),_(13,Mx,5,4),_(14,Ax,4,1),_(15,Px,4,1),_(16,Ox,4,1),_(17,Lx,4,1),_(18,Nx,4,1),_(19,Vx,4,1),_(20,kx,4,1),_(21,Bx,4,1),_(22,Wx,4,1),_(23,Ux,4,1),_(24,Yx,4,1),_(25,Gx,4,1),_(26,jx,4,1),_(27,Hx,4,1),_(28,zx,4,1),_(29,qx,4,1),_(30,$x,4,1),_(31,Kx,4,1),_(32,Jx,4,1),_(33,Xx,4,1),_(34,Zx,4,1),_(35,Qx,4,1),_(36,e1,4,1),_(37,t1,4,1),_(38,i1,4,1),_(39,n1,4,1),_(40,o1,4,1),_(41,r1,4,1),_(42,a1,4,1),_(43,l1,4,1),_(44,s1,4,1),_(45,d1,4,1),_(46,p1,4,1),_(47,m1,4,1),_(48,c1,4,1),_(49,u1,4,1),_(50,_1,4,1),_(51,x1,4,1),_(52,g1,4,1),_(53,f1,4,1),i(),e(54,`
3876    `)),o&2){let t=p();s(3),x(t.columnsShown.clubName?3:-1),s(),x(t.columnsShown.clubUserID?4:-1),s(),x(t.columnsShown.userName?5:-1),s(),x(t.columnsShown.roles?6:-1),s(),x(t.columnsShown.email?7:-1),s(),x(t.columnsShown.cellPhone?8:-1),s(),x(t.columnsShown.programTeam?9:-1),s(),x(t.columnsShown.teamSnapUserID?10:-1),s(),x(t.columnsShown.usaLacrosseNumber?11:-1),s(),x(t.columnsShown.usaHockeyNumber?12:-1),s(),x(t.columnsShown.dob?13:-1),s(),x(t.columnsShown.userAddressLine1?14:-1),s(),x(t.columnsShown.userAddressLine2?15:-1),s(),x(t.columnsShown.userCity?16:-1),s(),x(t.columnsShown.userState?17:-1),s(),x(t.columnsShown.userZip?18:-1),s(),x(t.columnsShown.primaryContactFirstName?19:-1),s(),x(t.columnsShown.primaryContactLastName?20:-1),s(),x(t.columnsShown.primaryContactCellPhone?21:-1),s(),x(t.columnsShown.primaryContactEmail?22:-1),s(),x(t.columnsShown.primaryContactHomePhone?23:-1),s(),x(t.columnsShown.primaryContactWorkPhone?24:-1),s(),x(t.columnsShown.secondaryContactFirstName?25:-1),s(),x(t.columnsShown.secondaryContactLastName?26:-1),s(),x(t.columnsShown.secondaryContactCellPhone?27:-1),s(),x(t.columnsShown.secondaryContactEmail?28:-1),s(),x(t.columnsShown.secondaryContactHomePhone?29:-1),s(),x(t.columnsShown.secondaryContactWorkPhone?30:-1),s(),x(t.columnsShown.customTextField1?31:-1),s(),x(t.columnsShown.customTextField2?32:-1),s(),x(t.columnsShown.customTextField3?33:-1),s(),x(t.columnsShown.customTextField4?34:-1),s(),x(t.columnsShown.customTextField5?35:-1),s(),x(t.columnsShown.customDropdownField1?36:-1),s(),x(t.columnsShown.customDropdownField2?37:-1),s(),x(t.columnsShown.customDropdownField3?38:-1),s(),x(t.columnsShown.customDropdownField4?39:-1),s(),x(t.columnsShown.customDropdownField5?40:-1),s(),x(t.columnsShown.customDropdownField6?41:-1),s(),x(t.columnsShown.customDropdownField7?42:-1),s(),x(t.columnsShown.customDropdownField8?43:-1),s(),x(t.columnsShown.customDropdownField9?44:-1),s(),x(t.columnsShown.customDropdownField10?45:-1),s(),x(t.columnsShown.customDropdownField11?46:-1),s(),x(t.columnsShown.customDropdownField12?47:-1),s(),x(t.columnsShown.customDropdownField13?48:-1),s(),x(t.columnsShown.customDropdownField14?49:-1),s(),x(t.columnsShown.customDropdownField15?50:-1),s(),x(t.columnsShown.jobTitle?51:-1),s(),x(t.columnsShown.employer?52:-1),s(),x(t.columnsShown.industry?53:-1)}}var yr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.determineColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}determineColumns(){this.columns=[...this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS].selectedFields],this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.columnsShown={},this.columns.forEach(l=>this.columnsShown[l.field]=!0)}getReportData(l){this.loading=!0,this.determineColumns();let r=this.reportService.reportFilters[F.STAFF_DEMOGRAPHICS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.reportService.getStaffDemographicsData().subscribe({next:a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")}})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-staff-demographics-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","userName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3877  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
3878    `),R(5,hx,6,0,"ng-template",3),e(6,`
3879    `),R(7,h1,55,51,"ng-template",4),e(8,`
3880  `),i(),e(9,`
3881`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de],encapsulation:2});let o=d;return o}
3881)();var S1=o=>["/admin/players",o,"overview"];function y1(o,d){if(o&1&&(e(0,`
3882            `),n(1,"th"),e(2),i(),e(3,`
3883          `)),o&2){let t=p().$implicit;s(2),I(`
3884              `,t.header,`
3885            `)}}function b1(o,d){if(o&1&&(e(0,`
3886            `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
3887            `),i(),e(5,`
3888          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
3889              `,t.header,`
3890              `),s(),m("field",t.field)}}function v1(o,d){if(o&1&&(e(0,`
3891          `),_(1,y1,4,1)(2,b1,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function T1(o,d){if(o&1&&(e(0,`
3892              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3893            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalListPrice))}}function E1(o,d){if(o&1&&(e(0,`
3894              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3895            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalDiscountAmount-t.totalFinAidAmount))}}function w1(o,d){if(o&1&&(e(0,`
3896              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3897            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalFinAidAmount))}}function F1(o,d){if(o&1&&(e(0,`
3898              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3899            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalPrice))}}function D1(o,d){if(o&1&&(e(0,`
3900              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3901            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalFee))}}function I1(o,d){if(o&1&&(e(0,`
3902              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3903            `)),o&2){let t=p(3);s(2),I(`
3904              `,E(3,1,-1*(t.totalListPrice+t.totalFee-t.totalAmountDue- -1*t.totalDiscountAmount+(t.totalKeptCash||0)+(t.totalKeptCredits||0))))}}function R1(o,d){if(o&1&&(e(0,`
3905              `),n(1,"td",8),e(2),v(3,"accountingCurrency"),i(),e(4,`
3906            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountDue))}}function M1(o,d){if(o&1&&(e(0,`
3907                `),n(1,"td"),e(2),i(),e(3,`
3908              `)),o&2){let t=p(4);s(2),c("Total Records: "+(t.totalRecords||0))}}function A1(o,d){if(o&1&&(e(0,`
3909                `),n(1,"td"),e(2),i(),e(3,`
3910              `)),o&2){let t=p(4);s(2),c("Total Players: "+(t.totalPlayers||0))}}function P1(o,d){o&1&&(e(0,`
3911                `),g(1,"td"),e(2,`
3912              `))}function O1(o,d){if(o&1&&(e(0,`
3913              `),_(1,M1,4,1),_(2,A1,4,1),_(3,P1,3,0)),o&2){let t=p().$index;s(),x(t===0?1:-1),s(),x(t===1?2:-1),s(),x(t>1?3:-1)}}function L1(o,d){if(o&1&&(e(0,`
3914              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3915            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalKeptCash))}}function N1(o,d){if(o&1&&(e(0,`
3916              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3917            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalKeptCredits))}}function V1(o,d){if(o&1&&(e(0,`
3918              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
3919            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalSurchargeableAmount))}}function k1(o,d){if(o&1&&(e(0,`
3920          `),_(1,T1,5,3)(2,E1,5,3)(3,w1,5,3)(4,F1,5,3)(5,D1,5,3)(6,I1,5,3)(7,R1,5,3)(8,O1,4,3)(9,L1,5,3)(10,N1,5,3)(11,V1,5,3),e(12,`
3921        `)),o&2){let t,l=d.$implicit;s(),x((t=l.field)==="listPrice"?1:t==="discountAmount"?2:t==="finAidAmount"?3:t==="price"?4:t==="adminFee"?5:t==="feeAdjustment"?6:t==="amountDue"?7:t==="keptCash"?9:t==="keptCredits"?10:t==="surchargeableAmount"?11:8)}}function B1(o,d){if(o&1&&(e(0,`
3922      `),n(1,"tr"),e(2,`
3923        `),N(3,v1,3,1,null,null,W),i(),e(5,`
3924      `),n(6,"tr",5),e(7,`
3925        `),N(8,k1,13,1,null,null,W),i(),e(10,`
3926    `)),o&2){let t=p();s(3),V(t.columns),s(5),V(t.columns)}}function W1(o,d){if(o&1&&(e(0,`
3927            `),n(1,"a",9),e(2),i(),e(3,`
3928          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,S1,t.playerID)),s(),c(t.playerName)}}function U1(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
3929            `,t.playerName,`
3930          `)}}function Y1(o,d){if(o&1&&(e(0,`
3931      `),n(1,"tr"),e(2,`
3932        `),n(3,"td"),e(4),i(),e(5,`
3933        `),n(6,"td"),e(7),i(),e(8,`
3934        `),n(9,"td"),e(10),i(),e(11,`
3935        `),n(12,"td"),e(13),i(),e(14,`
3936        `),n(15,"td"),e(16),i(),e(17,`
3937        `),n(18,"td"),e(19),v(20,"date"),i(),e(21,`
3938        `),n(22,"td"),e(23),v(24,"date"),i(),e(25,`
3939        `),n(26,"td"),e(27),i(),e(28,`
3940        `),n(29,"td"),e(30),i(),e(31,`
3941        `),n(32,"td"),e(33),i(),e(34,`
3942        `),n(35,"td"),e(36),i(),e(37,`
3943        `),n(38,"td"),e(39,`
3944          `),_(40,W1,4,4)(41,U1,1,1),i(),e(42,`
3945        `),n(43,"td"),e(44),v(45,"date"),i(),e(46,`
3946        `),n(47,"td"),e(48),i(),e(49,`
3947        `),n(50,"td"),e(51),i(),e(52,`
3948        `),n(53,"td"),e(54),v(55,"accountingCurrency"),i(),e(56,`
3949        `),n(57,"td"),e(58),v(59,"number"),i(),e(60,`
3950        `),n(61,"td"),e(62),v(63,"accountingCurrency"),i(),e(64,`
3951        `),n(65,"td"),e(66),v(67,"accountingCurrency"),i(),e(68,`
3952        `),n(69,"td"),e(70),v(71,"accountingCurrency"),i(),e(72,`
3953        `),n(73,"td"),e(74),v(75,"accountingCurrency"),i(),e(76,`
3954        `),n(77,"td"),e(78),v(79,"accountingCurrency"),i(),e(80,`
3955        `),n(81,"td"),e(82),v(83,"accountingCurrency"),i(),e(84,`
3956        `),n(85,"td"),e(86),v(87,"accountingCurrency"),i(),e(88,`
3957        `),n(89,"td"),e(90),v(91,"accountingCurrency"),i(),e(92,`
3958        `),n(93,"td"),e(94),v(95,"accountingCurrency"),i(),e(96,`
3959        `),n(97,"td"),e(98),v(99,"accountingCurrency"),i(),e(100,`
3960        `),n(101,"td"),e(102),i(),e(103,`
3961        `),n(104,"td"),e(105),v(106,"accountingCurrency"),i(),e(107,`
3962        `),n(108,"td"),e(109),v(110,"utcDate"),i(),e(111,`
3963        `),n(112,"td"),e(113),i(),e(114,`
3964        `),n(115,"td"),e(116),v(117,"utcDate"),i(),e(118,`
3965        `),n(119,"td"),e(120),i(),e(121,`
3966        `),n(122,"td"),e(123),v(124,"date"),i(),e(125,`
3967        `),n(126,"td"),e(127),i(),e(128,`
3968        `),n(129,"td"),e(130),i(),e(131,`
3969
3970      `),i(),e(132,`
3971    `)),o&2){let t=d.$implicit,l=p();s(4),c(t.clubName),s(3),c(t.programName),s(3),c(t.programTypeName),s(3),c(t.regName),s(3),c(t.accountingClassName),s(3),c(B(20,36,t.accrualStartDate,"M/d/y")),s(4),c(B(24,39,t.accrualEndDate,"M/d/y")),s(4),c(t.donationTitle),s(3),c(t.transactionType),s(3),c(t.userName),s(3),c(t.checkoutOptionName),s(4),x(l.reportService.profile[l.Permission.Profile]?40:41),s(4),c(B(45,42,t.dob,"M/d/y")),s(4),c(t.gender),s(3),c(t.teamName),s(3),c(E(55,45,t.listPrice)),s(4),c(t.discount?B(59,47,t.discount,"1.0-2")+"%":""),s(4),I("",E(63,50,-1*(t.discountAmount-t.finAidAmount)),`
3972        `),s(4),c(E(67,52,-1*t.finAidAmount)),s(4),c(E(71,54,t.keptCash)),s(4),c(E(75,56,t.keptCredits)),s(4),c(E(79,58,t.price)),s(4),c(E(83,60,t.adminFee)),s(4),c(E(87,62,-1*t.feeAdjustment)),s(4),c(E(91,64,t.amountDue)),s(4),c(E(95,66,t.amountRefunded||0)),s(4),c(E(99,68,t.amountCredited||0)),s(4),c(t.surchargeName),s(3),c(E(106,70,t.surchargeableAmou
3972nt)),s(4),c(Sn(110,72,t.completedDate,"short",!1,t.revenueTransactionTypeID===3)),s(4),c(t.userName),s(3),c(B(117,77,t.cancelledOn,"short")),s(4),c(t.cancelledBy),s(3),c(B(124,80,t.lastDueDate,"M/d/y")),s(4),c(t.registrationID),s(3),c(t.uniqueTransactionID)}}var br=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"clubName",header:"Club"},{field:"programName",header:"Program"},{field:"programTypeName",header:"Program Type"},{field:"regName",header:"Registration"},{field:"accountingClassName",header:"Accounting Class"},{field:"accrualStartDate",header:"Accrual Start Date"},{field:"accrualEndDate",header:"Accrual End Date"},{field:"donationTitle",header:"Donation"},{field:"transactionType",header:"Transaction Type"},{field:"userName",header:"User Name"},{field:"checkoutOptionName",header:"Checkout Option Name"},{field:"playerName",header:"Player Name"},{field:"dob",header:"Birth Date"},{field:"gender",header:"Gender"},{field:"teamName",header:"Team Name"},{field:"listPrice",header:"Gross Revenue"},{field:"discount",header:"Discount Percent"},{field:"discountAmount",header:"Discount Amount"},{field:"finAidAmount",header:"Financial Aid Amount"}
3972,{field:"keptCash",header:"User Forfeited Cash"},{field:"keptCredits",header:"User Forfeited Credits"},{field:"price",header:"Net Revenue"},{field:"adminFee",header:"Admin Fee"},{field:"feeAdjustment",header:"Fee Adjustment"},{field:"amountDue",header:"Total Revenue"},{field:"amountRefunded",header:"Refunded Amount"},{field:"amountCredited",header:"Credited Amount"},{field:"surchargeName",header:"Surcharge"},{field:"surchargeableAmount",header:"Amount Subject to Surcharge"},{field:"completedDate",header:"Completed Date"},{field:"userName",header:"Completed By"},{field:"cancelledOn",header:"Cancelled Date"},{field:"cancelledBy",header:"Cancelled By"},{field:"lastDueDate",header:"Last Due Date"},{field:"registrationID",header:"Registration ID"},{field:"uniqueTransactionID",header:"Unique Transaction ID"}]}getReportData(l){this.loading=!0;let r=this.reportService.reportFilters[F.REVENUE_TRANSACTIONS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.reportService.getRevenueTransactionnsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalPlayers=a.totalPlayers,this.totalAmountDue=a.totalAmountDue,this.totalPrice=a.totalPrice,this.totalListPrice=a.totalListPrice,this.totalFee=a.totalFee,this.totalDiscountAmount=-1*a.totalDiscountAmount,this.totalFinAidAmount=-1*a.totalFinAidAmount,this.totalKeptCash=a.totalKeptCash,this.totalKeptCredits=a.totalKeptCredits,this.totalSurchargeableAmount=a.totalSurchargeableAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-revenue-transactions-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[1,"green"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
3973  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
3974    `),R(5,B1,11,0,"ng-template",3),e(6,`
3975    `),R(7,Y1,133,83,"ng-template",4),e(8,`
3976  `),i(),e(9,`
3977`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,Be,de,Ce,se],encapsulation:2});let o=d;return o}
3977)();function j1(o,d){if(o&1){let t=D();e(0,`
3978      `),n(1,"div",2),e(2,`
3979        `),n(3,"div",3),e(4,`
3980          `),n(5,"label"),e(6,"Club"),i(),e(7,`
3981          `),n(8,"p-multiSelect",27),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),r.updateRegistrations(),h(r.updateAccountingClassesOptions())}),e(9,`
3982          `),i(),e(10,`
3983        `),i(),e(11,`
3984      `),i(),e(12,`
3985    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} club(s) selected")}}function H1(o,d){if(o&1){let t=D();e(0,`
3986          `),n(1,"p-multiSelect",26),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.accountingClasses,r)||(a.filters.accountingClasses=r),h(r)}),e(2,`
3987          `),i(),e(3,`
3988        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.accountingClasses),m("options",t.accountingClasses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.accountingClasses?"All":"Select accounting classes(s)")("selectedItemsLabel","{0} accounting classes selected")}}function z1(o,d){if(o&1){let t=D();e(0,`
3989          `),n(1,"p-multiSelect",28),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.filterPrograms())}),e(2,`
3990          `),i(),e(3,`
3991        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} program type(s) selected")}}function q1(o,d){if(o&1){let t=D();e(0,`
3992          `),n(1,"p-multiSelect",29),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
3993          `),i(),e(3,`
3994        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} program(s) selected")}}function $1(o,d){if(o&1){let t=D();e(0,`
3995            `),n(1,"p-datepicker",30,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
3996            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
3997            `),n(7,"p-datepicker",31),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
3998            `),i(),e(9,`
3999          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function K1(o,d){if(o&1){let t=D();e(0,`
4000            `),n(1,"p-datepicker",32),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
4001            `),i(),e(3,`
4002            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
4003            `),n(7,"p-datepicker",33),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
4004            `),i(),e(9,`
4005          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function J1(o,d){if(o&1){let t=D();e(0,`
4006      `),n(1,"div",2),e(2,`
4007        `),n(3,"div",3),e(4,`
4008          `),n(5,"label"),e(6,"Use Beta Version"),i(),e(7,`
4009          `),n(8,"p-checkbox",34),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.useBeta,r)||(a.filters.useBeta=r),h(r)}),i(),e(9,`
4010        `),i(),e(10,`
4011      `),i(),e(11,`
4012    `)}if(o&2){let t=p(2);s(8),m("binary",!0),C("ngModel",t.filters.useBeta)}}function X1(o,d){if(o&1){let t=D();e(0,`
4013  `),n(1,"div",1),e(2,`
4014    `),_(3,j1,13,7),n(4,"div",2),e(5,`
4015      `),n(6,"div",3),e(7,`
4016        `),n(8,"label"),e(9,"Accounting Class"),i(),e(10,`
4017        `),_(11,H1,4,8),i(),e(12,`
4018    `),i(),e(13,`
4019    `),n(14,"div",4),e(15,`
4020      `),n(16,"div",3),e(17,`
4021        `),n(18,"label"),e(19,"Program Type"),i(),e(20,`
4022        `),_(21,z1,4,7),i(),e(22,`
4023    `),i(),e(23,`
4024    `),n(24,"div",2),e(25,`
4025      `),n(26,"div",3),e(27,`
4026        `),n(28,"label"),e(29,"Program"),i(),e(30,`
4027        `),_(31,q1,4,8),i(),e(32,`
4028    `),i(),e(33,`
4029    `),n(34,"div",5),e(35,`
4030      `),n(36,"div",3),e(37,`
4031        `),n(38,"label"),e(39,"Revenue Transaction Date"),i(),e(40,`
4032        `),n(41,"span",6)(42,"p-inputgroup"),e(43,`
4033          `),n(44,"p-datepicker",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(45,`
4034          `),i(),e(46,`
4035          `),n(47,"p-inputgroup-addon"),e(48,"to"),i(),e(49,`
4036          `),n(50,"p-datepicker",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),T("onSelect",function(){f(t);let r=p();return h(r.updateRegistrations())}),e(51,`
4037          `),i(),e(52,`
4038          `),i(),e(53,`
4039          `),n(54,"a",9),T("click",function(){f(t);let r=p();return r.filters.regFrom=r.reportService.defaultDate,r.filters.regTo=void 0,h(r.updateRegistrations())}),e(55,`
4040            `),g(56,"i",10),e(57,`
4041          `),i(),e(58,`
4042        `),i(),e(59,`
4043      `),i(),e(60,`
4044    `),i(),e(61,`
4045    `),n(62,"div",4),e(63,`
4046      `),n(64,"div",3),e(65,`
4047        `),n(66,"label"),e(67,"Registration"),i(),e(68,`
4048        `),n(69,"p-multiSelect",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(70,`
4049        `),i(),e(71,`
4050      `),i(),e(72,`
4051    `),i(),e(73,`
4052    `),n(74,"div",12),e(75,`
4053      `),n(76,"div",3),e(77,`
4054        `),n(78,"label"),e(79,"Gender"),i(),e(80,`
4055        `),n(81,"p-select",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(82,`
4056      `),i(),e(83,`
4057    `),i(),e(84,`
4058    `),n(85,"div",5),e(86,`
4059      `),n(87,"div",14),e(88,`
4060        `),n(89,"label"),e(90,"Birth Date"),i(),e(91,`
4061        `),n(92,"p-select",15),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(93,`
4062        `),n(94,"span",6)(95,"p-inputgroup"),e(96,`
4063          `),_(97,$1,10,8)(98,K1,10,2),i(),e(99,`
4064          `),n(100,"a",9),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(101,`
4065            `),g(102,"i",10),e(103,`
4066          `),i(),e(104,`
4067        `),i(),e(105,`
4068      `),i(),e(106,`
4069    `),i(),e(107,`
4070    `),n(108,"div",12),e(109,`
4071      `),n(110,"div",3),e(111,`
4072        `),n(112,"label"),e(113,"Test Users/Players"),i(),e(114,`
4073        `),n(115,"p-select",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(116,`
4074        `),i(),e(117,`
4075      `),i(),e(118,`
4076    `),i(),e(119,`
4077    `),n(120,"div",4),e(121,`
4078      `),n(122,"div",3),e(123,`
4079        `),n(124,"label"),e(125,"Season"),i(),e(126,`
4080        `),n(127,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(128,`
4081        `),i(),e(129,`
4082      `),i(),e(130,`
4083    `),i(),e(131,`
4084    `),n(132,"div",4),e(133,`
4085      `),n(134,"div",3),e(135,`
4086        `),n(136,"label"),e(137,"Team"),i(),e(138,`
4087        `),n(139,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(140,`
4088        `),i(),e(141,`
4089      `),i(),e(142,`
4090    `),i(),e(143,`
4091    `),n(144,"div",2),e(145,`
4092      `),n(146,"div",3),e(147,`
4093        `),n(148,"label",18),e(149,"Player Last Name"),i(),e(150,`
4094        `),n(151,"input",19),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.playerName,r)||(a.filters.playerName=r),h(r)}),i(),e(152,`
4095      `),i(),e(153,`
4096    `),i(),e(154,`
4097    `),n(155,"div",4),e(156,`
4098      `),n(157,"div",3),e(158,`
4099        `),n(159,"label"),e(160,"Transaction Type"),i(),e(161,`
4100        `),n(162,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.revenueTransactionTypes,r)||(a.filters.revenueTransactionTypes=r),h(r)}),e(163,`
4101        `),i(),e(164,`
4102      `),i(),e(165,`
4103    `),i(),e(166,`
4104    `),n(167,"div",20),e(168,`
4105      `),n(169,"div",3),e(170,`
4106        `),n(171,"label"),e(172,"Fiscal Year"),i(),e(173,`
4107        `),n(174,"span",6)(175,"p-inputgroup"),e(176,`
4108          `),n(177,"p-datepicker",21),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(178,`
4109          `),i(),e(179,`
4110          `),n(180,"p-inputgroup-addon"),e(181,"to"),i(),e(182,`
4111          `),n(183,"p-datepicker",22),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(184,`
4112          `),i(),e(185,`
4113          `),i(),e(186,`
4114          `),n(187,"a",9),T("click",function(){f(t);let r=p();return r.filters.dateFrom=void 0,h(r.filters.dateTo=void 0)}),e(188,`
4115            `),g(189,"i",10),e(190,`
4116          `),i(),e(191,`
4117        `),i(),e(192,`
4118      `),i(),e(193,`
4119    `),i(),e(194,`
4120    `),n(195,"div",23),e(196,`
4121      `),n(197,"div",3),e(198,`
4122        `),n(199,"label"),e(200,"Checkout Option"),i(),e(201,`
4123        `),n(202,"p-multiSelect",24),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrationOptions,r)||(a.filters.registrationOptions=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.updateRegistrationOptionValues())}),e(203,`
4124        `),i(),e(204,`
4125      `),i(),e(205,`
4126    `),i(),e(206,`
4127    `),n(207,"div",25),e(208,`
4128      `),n(209,"div",3),e(210,`
4129        `),n(211,"label"),e(212,"Checkout Option Response"),i(),e(213,`
4130        `),n(214,"p-multiSelect",26),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrationOptionValues,r)||(a.filters.registrationOptionValues=r),h(r)}),e(215,`
4131        `),i(),e(216,`
4132      `),i(),e(217,`
4133    `),i(),e(218,`
4134    `),_(219,J1,12,2),i(),e(220,`
4135`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.accountingClasses?11:-1),s(10),x(t.programTypes?21:-1),s(10),x(t.programs?31:-1),s(13),C("ngModel",t.filters.regFrom),s(6),C("ngModel",t.filters.regTo),s(19),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registration(s) selected"),s(12),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?97:98),s(18),C("ngModel",t.filters.testUserOption),m("options",t.testPlayersOptions),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} season(s) selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} team(s) selected"),s(12),C("ngModel",t.filters.playerName),s(11),m("autofocusFilter",!0),C("ngModel",t.filters.revenueTransactionTypes),m("options",t.revenueTransactionTypes)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} transaction types(s) selected"),s(15),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo),s(19),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptions),m("options",t.registrationOptions)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} checkout options selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptionValues),m("options",t.registrationOptionValues)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.registrationOptions?"All":"Select checkout option(s)")("selectedItemsLabel","{0} responses selected"),s(5),x(t.isSuperAdmin?219:-1)}}var vr=(()=>{let d=class d{constructor(l,r,a,b,u,L){this.siteDataService=l,this.reportService=r,this.registrationService=a,this.teamService=b,this.authorizeService=u,this.clubService=L,this.isSuperAdmin=!1,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testPlayersOptions=[{label:"All",value:""},{label:"Exclude",value:1},{label:"Include",value:2},{label:"Only",value:3}],this.genderOptions=Ae,this.revenueTransactionTypes=zt,this.accountingClasses=[]}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l,this.isSuperAdmin=this.authorizeService.isSuperAdmin(l.role))}),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(),this.siteDataService.getClubSettings(),this.siteDataService.getClubFieldOptions(),this.clubService.getClubAccountingClasses(void 0)]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.club=l[3].club,this.clubFieldOptions=l[4],this.accountingClassOptions=l[5],this.reportService.reportFilters[F.REVENUE_TRANSACTIONS]===void 0&&(this.reportService.reportFilters[F.REVENUE_TRANSACTIONS]=new P),this.filters=this.reportService.reportFilters[F.REVENUE_TRANSACTIONS],this.filters.dateFrom=void 0,this.filters.useBeta=!1,this.filterPrograms(),this.getTeams(),this.updateRegistrationOptionsAndValues(),this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REVENUE_TRANSACTIONS]})}filterPrograms(){this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.REVENUE_TRANSACTIONS],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypes=this.programTypes.filter(l=>l.value===+this.reportService.state.programTypeID):this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.reportService.state.includeCancelledRegistrations&&(this.filters.includeCancelledRegistrations=!0),this.filters.regFrom=void 0,this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.state.revenueTransactionType&&(this.filters.revenueTransactionTypes=this.revenueTransactionTypes.filter(l=>this.reportService.state.revenueTransactionType.includes(+l.value)))),this.programs=this.reportService.filterPrograms(this.filters)}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>
4135{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state?(this.reportService.state.seasons?this.filters.seasons=this.seasons.filter(r=>this.reportService.state.seasons.includes(r.value)):this.filters.seasons=void 0,this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>r.teamID===this.reportService.state.teamID):this.filters.teams=void 0,this.filters.dobFrom=this.reportService.state.dobFrom?new Date(this.reportService.state.dobFrom):void 0,this.filters.dobTo=this.reportService.state.dobTo?new Date(this.reportService.state.dobTo):void 0,this.filters.genderID=this.reportService.state.genderID,this.updateRegistrations(),this.reportService.showReportData=!0,this.reportService.state=void 0):this.updateRegistrations()}):this.teams=void 0}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}setToDateToEOY(l){return Me(l)}updateAccountingClassesOptions(){this.reportService.clubs&&this.reportService.clubs.length>1&&this.clubService.getClubAccountingClassesForClubs(this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.accountingClassOptions=l,this.accountingClasses=[],this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))})}updateRegistrationOptionValues(){this.filters.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptionValues=l}):this.registrationOptionValues=void 0}updateRegistrationOptions(){this.reportService.getRegistrationOptions(this.filters.registrations,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptions=l})}updateRegistrationOptionsAndValues(){this.reportService.getRegistrationOptions(this.filters.registrations,this.filters.clubs.map(l=>l.clubID)).pipe(Bt(l=>{this.registrationOptions=l}),Ft(()=>this.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.filters.clubs.map(l=>l.clubID)):wt(void 0))).subscribe(l=>{this.registrationOptionValues=l})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(Se),w(ve),w(Pe),w(et))},d.\u0275cmp=A({type:d,selectors:[["app-revenue-transactions-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"col-md-5","col-lg-2"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-6","col-lg-4"],["id","dateFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-5","col-lg-4"],["o
4135ptionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-5","col-lg-5"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["placeholder","All","optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[3,"ngModelChange","binary","ngModel"]],template:function(r,a){r&1&&_(0,X1,221,63),r&2&&x(a.filters?0:-1)},dependencies:[fe,U,Y,ie,ne,te,St,q,Q],encapsulation:2});let o=d;return o}
4135)();var Q1=o=>["/admin/players",o,"overview"];function eg(o,d){if(o&1&&(e(0,`
4136            `),n(1,"th"),e(2),i(),e(3,`
4137          `)),o&2){let t=p().$implicit;s(2),I(`
4138              `,t.header,`
4139            `)}}function tg(o,d){if(o&1&&(e(0,`
4140            `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
4141            `),i(),e(5,`
4142          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4143              `,t.header,`
4144              `),s(),m("field",t.field)}}function ig(o,d){if(o&1&&(e(0,`
4145          `),_(1,eg,4,1)(2,tg,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function ng(o,d){o&1&&(e(0,`
4146          `),g(1,"td"),e(2,`
4147        `))}function og(o,d){o&1&&(e(0,`
4148          `),g(1,"td"),e(2,`
4149        `))}function rg(o,d){o&1&&(e(0,`
4150          `),g(1,"td"),e(2,`
4151        `))}function ag(o,d){if(o&1&&(e(0,`
4152          `),n(1,"td",6),e(2),v(3,"accountingCurrency"),i(),e(4,`
4153        `)),o&2){let t=p(2);s(2),c(E(3,1,t.totalSurchargeAmount))}}function lg(o,d){if(o&1&&(e(0,`
4154      `),n(1,"tr"),e(2,`
4155        `),N(3,ig,3,1,null,null,W),i(),e(5,`
4156      `),n(6,"tr",5),e(7,`
4157        `),n(8,"td"),e(9,"Totals:"),i(),e(10,`
4158        `),g(11,"td"),e(12,`
4159        `),_(13,ng,3,0),g(14,"td"),e(15,`
4160        `),g(16,"td"),e(17,`
4161        `),g(18,"td"),e(19,`
4162        `),g(20,"td"),e(21,`
4163        `),g(22,"td"),e(23,`
4164        `),g(24,"td"),e(25,`
4165        `),g(26,"td"),e(27,`
4166        `),_(28,og,3,0),g(29,"td"),e(30,`
4167        `),g(31,"td"),e(32,`
4168        `),_(33,rg,3,0),_(34,ag,5,3),n(35,"td",6),e(36),v(37,"accountingCurrency"),i(),e(38,`
4169        `),n(39,"td",6),e(40),v(41,"accountingCurrency"),i(),e(42,`
4170        `),n(43,"td",6),e(44),v(45,"accountingCurrency"),i(),e(46,`
4171        `),n(47,"td",6),e(48),v(49,"accountingCurrency"),i(),e(50,`
4172        `),g(51,"td"),e(52,`
4173        `),n(53,"td",6),e(54),v(55,"accountingCurrency"),i(),e(56,`
4174        `),n(57,"td",6),e(58),v(59,"accountingCurrency"),i(),e(60,`
4175        `),n(61,"td",6),e(62),v(63,"accountingCurrency"),i(),e(64,`
4176        `),g(65,"td"),e(66,`
4177        `),g(67,"td"),e(68,`
4178        `),g(69,"td"),e(70,`
4179
4180        `),g(71,"td"),e(72,`
4181        `),g(73,"td"),e(74,`
4182        `),g(75,"td"),e(76,`
4183        `),g(77,"td"),e(78,`
4184      `),i(),e(79,`
4185    `)),o&2){let t=p();s(3),V(t.columns),s(10),x(t.showRegOption?13:-1),s(15),x(t.showRegOption?28:-1),s(5),x(t.showRegOption?33:-1),s(),x(t.showRegOption?34:-1),s(2),c(E(37,11,t.totalPaymentAmount)),s(4),c(E(41,13,t.totalPaymentFee)),s(4),c(E(45,15,t.totalPaymentAmount+t.totalPaymentFee)),s(4),c(E(49,17,t.totalProcessorFee)),s(6),c(E(55,19,t.totalReimbursementAmount)),s(4),c(E(59,21,t.totalReimbursementFeeAmount)),s(4),c(E(63,23,t.totalReimbursementAmount+t.totalReimbursementFeeAmount))}}function sg(o,d){if(o&1&&(e(0,`
4186          `),n(1,"td"),e(2),i(),e(3,`
4187        `)),o&2){let t=p().$implicit;s(2),c(t.connectedAccountName)}}function dg(o,d){if(o&1&&(e(0,`
4188          `),n(1,"td"),e(2),i(),e(3,`
4189        `)),o&2){let t=p().$implicit;s(2),c(t.checkoutOptionName)}}function pg(o,d){if(o&1&&(e(0,`
4190            `),n(1,"a",9),e(2),i(),e(3,`
4191          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Q1,t.playerID)),s(),c(t.playerName)}}function mg(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
4192            `,t.playerName,`
4193          `)}}function cg(o,d){if(o&1&&(e(0,`
4194          `),n(1,"td"),e(2),i(),e(3,`
4195        `)),o&2){let t=p().$implicit;s(2),c(t.surchargeName)}}function ug(o,d){if(o&1&&(e(0),v(1,"accountingCurrency")),o&2){let t=p().$implicit;I(`
4196            `,E(1,1,t.surchargeAmount),`
4197          `)}}function _g(o,d){if(o&1&&(e(0,`
4198      `),n(1,"tr"),e(2,`
4199        `),n(3,"td"),e(4),v(5,"utcDate"),i(),e(6,`
4200        `),n(7,"td"),e(8),i(),e(9,`
4201        `),_(10,sg,4,1),n(11,"td"),e(12),i(),e(13,`
4202        `),n(14,"td"),e(15),i(),e(16,`
4203        `),n(17,"td"),e(18),i(),e(19,`
4204        `),n(20,"td"),e(21),i(),e(22,`
4205        `),n(23,"td"),e(24),i(),e(25,`
4206        `),n(26,"td"),e(27),i(),e(28,`
4207        `),_(29,dg,4,1),n(30,"td"),e(31,`
4208          `),_(32,pg,4,4)(33,mg,1,1),i(),e(34,`
4209        `),n(35,"td"),e(36),i(),e(37,`
4210        `),n(38,"td"),e(39),i(),e(40,`
4211        `),_(41,cg,4,1),n(42,"td"),e(43,`
4212          `),_(44,ug,2,3),i(),e(45,`
4213        `),n(46,"td"),e(47),v(48,"accountingCurrency"),i(),e(49,`
4214        `),n(50,"td"),e(51),v(52,"accountingCurrency"),i(),e(53,`
4215        `),n(54,"td"),e(55),v(56,"accountingCurrency"),i(),e(57,`
4216        `),n(58,"td"),e(59),v(60,"accountingCurrency"),i(),e(61,`
4217        `),n(62,"td"),e(63),i(),e(64,`
4218        `),n(65,"td"),e(66),v(67,"accountingCurrency"),i(),e(68,`
4219        `),n(69,"td"),e(70),v(71,"accountingCurrency"),i(),e(72,`
4220        `),n(73,"td"),e(74),v(75,"accountingCurrency"),i(),e(76,`
4221        `),n(77,"td"),e(78),v(79,"accountingCurrency"),i(),e(80,`
4222        `),n(81,"td"),e(82),v(83,"date"),i(),e(84,`
4223        `),n(85,"td"),e(86),i(),e(87,`
4224        `),n(88,"td"),e(89),i(),e(90,`
4225        `),n(91,"td"),e(92),v(93,"date"),i(),e(94,`
4226        `),n(95,"td"),e(96),i(),e(97,`
4227        `),n(98,"td"),e(99),i(),e(100,`
4228      `),i(),e(101,`
4229    `)),o&2){let t=d.$implicit,l=p();s(4),c(B(5,30,t.submittedDate,"M/d/y")),s(4),c(t.clubName),s(2),x(l.showRegOption?10:-1),s(2),c(t.programTypeName),s(3),c(t.programName),s(3),c(t.regName),s(3),c(t.accountingClassName),s(3),c(t.userName),s(3),c(t.sitePaymentType),s(2),x(l.showRegOption?29:-1),s(3),x(l.reportService.profile[l.Permission.Profile]?32:33),s(4),c(t.paymentMethod),s(3),c(t.transactionID),s(2),x(l.showRegOption?41:-1),s(3),x(t.surchargeAmount!==0&&t.surchargeName?44:-1),s(3),c(E(48,33,t.paymentAmount)),s(4),c(E(52,35,t.paymentFee)),s(4),c(E(56,37,t.paymentAmount+t.paymentFee)),s(4),c(E(60,39,t.processorFee)),s(4),c(t.reimbursed),s(3),c(E(67,41,t.reimbursementAmount)),s(4),c(E(71,43,t.reimbursementFEEAmount)),s(4),c(E(75,45,t.totalDisbursement)),s(4),c(E(79,47,t.checkAmount)),s(4),c(B(83,49,t.reimbursementDate,"M/d/y")),s(4),c(t.accountingTransactionID),s(3),c(t.status),s(3),c(B(93,52,t.dueDate,"M/d/y")),s(4),c(t.registrationID),s(3),c(t.uniqueTransactionID)}}var Tr=(()=>{let d=class d{constructor(l,r,a,b,u){this.reportService=l,this.siteDataService=r,this.paymentService=a,this.formService=b,this.ref=u,this.AriaLabels=X,this.loading=!0,this.ReportType=F,this.showModal=!1,this.show
4229FailPaymentConfirm=!1,this.showClubName=!1,this.showRegOption=!1,this.Permission=ee}ngOnInit(){this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showRegOption=this.reportService.clubs&&this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID).paymentVendorID===gt.STRIPE,this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||(this.columns=this.getReportColumns(),this.getReportData(null))})}getReportColumns(){let l=[{field:"submittedDate",header:"Transaction Date"},{field:"clubName",header:"Club"},{field:"programTypeName",header:"Program Type"},{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"accountingClassName",header:"Accounting Class"},{field:"userName",header:"User Name"},{field:"sitePaymentType",header:"Type"},{field:"playerName",header:"Player Name"},{field:"paymentMethod",header:"Payment Method"},{field:"transactionID",header:"Transaction ID"},{field:"paymentAmount",header:"Amount"},{field:"paymentFee",header:"Transaction Fee"},{field:"total",header:"Total"},{field:"processorFee",header:"Processor Fee"},{field:"reimbursed",header:"Reimbursed"},{field:"reimbursementAmount",header:"Reimbursement Amount"},{field:"reimbursementFEEAmount",header:"Reimbursement Fee"},{field:"totalDisbursement",header:"Reimbursement Total"},{field:"checkAmount",header:"Transfer Total"},{field:"reimbursementDate",header:"Reimbursement Date"},{field:"accountingTransactionID",header:"Accounting Transaction ID"},{field:"status",header:"Status"},{field:"dueDate",header:"Due Date"},{field:"registrationID",header:"Registration ID"},{field:"uniqueTransactionID",header:"Unique Transaction ID"}];return this.showRegOption&&(l.splice(2,0,{field:"connectedAccountName",header:"Connected Account"}),l.splice(9,0,{field:"checkoutOptionName",header:"Checkout Option Name"}),l.splice(13,0,{field:"surchargeName",header:"Surcharge"}),l.splice(14,0,{field:"surchargeAmount",header:"Surcharge Amount"})),l}getReportData(l){let r=this.reportService.reportFilters[this.reportService.reportType];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getClubTransactionsBreakoutData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalPaymentAmount=a.totalPaymentAmount,this.totalPaymentFee=a.totalPaymentFee,this.totalReimbursementAmount=a.totalReimbursementAmount,this.totalReimbursementFeeAmount=a.totalReimbursementFEEAmount,this.totalProcessorFee=a.totalProcessorFee,this.totalSurchargeAmount=a.totalSurchargeAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(Ue),w(Ct),w(Dt))},d.\u0275cmp=A({type:d,selectors:[["app-club-transactions-breakout-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","submittedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
4230  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
4231    `),R(5,lg,80,25,"ng-template",3),e(6,`
4232    `),R(7,_g,102,55,"ng-template",4),e(8,`
4233  `),i(),e(9,`
4234`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de,Ce,se],encapsulation:2});let o=d;return o}
4234)();function gg(o,d){if(o&1){let t=D();e(0,`
4235    `),n(1,"div",1),e(2,`
4236      `),n(3,"div",2),e(4,`
4237        `),n(5,"label"),e(6,"Club"),i(),e(7,`
4238        `),n(8,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.updateAccountingClassesOptions())}),e(9,`
4239        `),i(),e(10,`
4240      `),i(),e(11,`
4241    `),i(),e(12,`
4242  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function fg(o,d){if(o&1){let t=D();e(0,`
4243        `),n(1,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.accountingClasses,r)||(a.filters.accountingClasses=r),h(r)}),e(2,`
4244        `),i(),e(3,`
4245      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.accountingClasses),m("options",t.accountingClasses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} accounting classes selected")}}function hg(o,d){if(o&1){let t=D();e(0,`
4246        `),n(1,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.paymentTypes,r)||(a.filters.paymentTypes=r),h(r)}),e(2,`
4247        `),i(),e(3,`
4248      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.paymentTypes),m("options",t.paymentTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} payment types selected")}}function Cg(o,d){if(o&1){let t=D();e(0,`
4249    `),n(1,"div",21),e(2,`
4250      `),n(3,"div",2),e(4,`
4251        `),n(5,"label"),e(6,"Checkout Option"),i(),e(7,`
4252        `),n(8,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrationOptions,r)||(a.filters.registrationOptions=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.updateRegistrationOptionValues())}),e(9,`
4253        `),i(),e(10,`
4254      `),i(),e(11,`
4255    `),i(),e(12,`
4256    `),n(13,"div",23),e(14,`
4257      `),n(15,"div",2),e(16,`
4258        `),n(17,"label"),e(18,"Checkout Option Response"),i(),e(19,`
4259        `),n(20,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrationOptionValues,r)||(a.filters.registrationOptionValues=r),h(r)}),e(21,`
4260        `),i(),e(22,`
4261      `),i(),e(23,`
4262    `),i(),e(24,`
4263  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptions),m("options",t.registrationOptions)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} checkout options selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptionValues),m("options",t.registrationOptionValues)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} responses selected")}}var Er=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.paymentService=r,this.clubService=a,this.paymentTypes=qt,this.ReportType=F,this.testUserOptions=le,this.reimbursedOptions=Mt,this.inactivePlayerOptions=Ht,this.accountingClasses=[],this.connectedAccounts=[],this.showRegOptionsFilters=!1}ngOnInit(){this.showRegOptionsFilters=this.reportService.clubs&&this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID).paymentVendorID===gt.STRIPE,this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[this.reportService.reportType]}),this.reportService.setClubID(this.filters),this.filters.dateFrom=void 0,this.updateRegistrationOptionsAndValues()}ngOnChanges(l){l&&l.reportType&&this.setFilters()}setFilters(){this.reportService.reportFilters[this.reportService.reportType]===void 0&&(this.reportService.reportFilters[this.reportService.reportType]=new P),this.filters=this.reportService.reportFilters[this.reportService.reportType];let l=[];l.push(this.paymentService.getSitePaymentTypes()),l.push(this.clubService.getClubAccountingClasses(void 0)),l.push(this.reportService.getConnectedAccounts()),l.length>0&&oe(l).subscribe(r=>{this.sitePaymentTypes||(this.sitePaymentTypes=[{label:"All",value:null},...r[0]]),this.accountingClassOptions=r[1],this.accountingClasses=this.accountingClassOptions.map(a=>({label:a.accountingClassName,value:a.clubAccountingClassID})),this.connectedAccountOptions=r[2].filter(a=>a.accountTypeID!==Ot.TEAM_ACCOUNT),this.connectedAccounts=this.connectedAccountOptions.map(a=>({label:a.name,value:a.clubStripeConnectedAccountID})),this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CLUB_TRANSACTIONS_BREAKOUT],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(a=>a.clubID===this.reportService.state.clubID)]),this.filters.transFrom=this.reportService.state.transFrom?new Date(this.reportService.state.transFrom):void 0,this.filters.transTo=this.reportService.state.transTo?new Date(this.reportService.state.transTo):void 0,this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.state.connectedAccountID&&(this.filters.connectedAccounts=[this.connectedAccounts.find(a=>a.value===this.reportService.state.connectedAccountID)]),this.reportService.state.testUserOption!==void 0&&(this.filters.testUserOption=this.reportService.state.testUserOption),this.reportService.state.paymentTypeIDs?.length>0&&(this.filters.paymentTypes=this.paymentTypes.filter(a=>this.reportService.state.paymentTypeIDs.includes(a.value))),this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.filters.transFrom=new Date(new Date().setDate(new Date().getDate()-30)),this.filters.dateFrom=new Date(new Date().setDate(new Date().getDate()-30))}updateAccountingClassesOptions(){this.reportService.clubs&&this.reportService.clubs.length>1&&this.clubService.getClubAccountingClassesForClubs(this.getSelectedClubIDs()).subscribe(l=>{this.accountingClassOptions=l,this.accountingClasses=[],this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))})}updateRegistrationOptionValues(){this.filters.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.get
4263SelectedClubIDs()).subscribe(l=>{this.registrationOptionValues=l}):this.registrationOptionValues=void 0}updateRegistrationOptions(){this.reportService.getRegistrationOptions(this.filters.registrations,this.getSelectedClubIDs()).subscribe(l=>{this.registrationOptions=l})}updateRegistrationOptionsAndValues(){this.reportService.getRegistrationOptions(this.filters.registrations,this.getSelectedClubIDs()).pipe(Bt(l=>{this.registrationOptions=l}),Ft(()=>this.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.getSelectedClubIDs()):wt(void 0))).subscribe(l=>{this.registrationOptionValues=l})}getSelectedClubIDs(){return this.filters.clubs?.length>0?this.filters.clubs.map(l=>l.clubID):this.reportService.clubs.map(l=>l.clubID)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Ue),w(et))},d.\u0275cmp=A({type:d,selectors:[["app-club-transactions-breakout-filters"]],inputs:{reportType:"reportType"},standalone:!1,features:[Ve],decls:136,vars:22,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","transFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","transTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-2"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5"],["id","playerName","type","text",3,"ngModelChange","ngModel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["placeholder","All","optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-4"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-5"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
4264  `),_(2,gg,13,7),n(3,"div",1),e(4,`
4265    `),n(5,"div",2),e(6,`
4266      `),n(7,"label"),e(8,"Accounting Class"),i(),e(9,`
4267      `),_(10,fg,4,7),i(),e(11,`
4268  `),i(),e(12,`
4269  `),n(13,"div",3),e(14,`
4270    `),n(15,"div",2),e(16,`
4271      `),n(17,"label"),e(18,"Transaction Date"),i(),e(19,`
4272      `),n(20,"span",4)(21,"p-inputgroup"),e(22,`
4273        `),n(23,"p-datepicker",5),y("ngModelChange",function(u){return S(a.filters.transFrom,u)||(a.filters.transFrom=u),u}),e(24,`
4274        `),i(),e(25,`
4275        `),n(26,"p-inputgroup-addon"),e(27,"to"),i(),e(28,`
4276        `),n(29,"p-datepicker",6),y("ngModelChange",function(u){return S(a.filters.transTo,u)||(a.filters.transTo=u),u}),e(30,`
4277        `),i(),e(31,`
4278        `),i(),e(32,`
4279        `),n(33,"a",7),T("click",function(){return a.filters.transFrom=a.reportService.defaultDate,a.filters.transTo=void 0}),e(34,`
4280          `),g(35,"i",8),e(36,`
4281        `),i(),e(37,`
4282      `),i(),e(38,`
4283    `),i(),e(39,`
4284  `),i(),e(40,`
4285  `),n(41,"div",3),e(42,`
4286    `),n(43,"div",2),e(44,`
4287      `),n(45,"label"),e(46,"Reimbursement Date"),i(),e(47,`
4288      `),n(48,"span",4)(49,"p-inputgroup"),e(50,`
4289        `),n(51,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(52,`
4290        `),i(),e(53,`
4291        `),n(54,"p-inputgroup-addon"),e(55,"to"),i(),e(56,`
4292        `),n(57,"p-datepicker",10),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(58,`
4293        `),i(),e(59,`
4294        `),i(),e(60,`
4295        `),n(61,"a",7),T("click",function(){return a.filters.dateFrom=void 0,a.filters.dateTo=void 0}),e(62,`
4296          `),g(63,"i",8),e(64,`
4297        `),i(),e(65,`
4298      `),i(),e(66,`
4299    `),i(),e(67,`
4300  `),i(),e(68,`
4301  `),n(69,"div",11),e(70,`
4302    `),n(71,"div",2),e(72,`
4303      `),n(73,"label"),e(74,"Reimbursed"),i(),e(75,`
4304      `),n(76,"p-select",12),y("ngModelChange",function(u){return S(a.filters.reimbursed,u)||(a.filters.reimbursed=u),u}),i(),e(77,`
4305    `),i(),e(78,`
4306  `),i(),e(79,`
4307  `),n(80,"div",13),e(81,`
4308    `),n(82,"div",2),e(83,`
4309      `),n(84,"label"),e(85,"Type"),i(),e(86,`
4310      `),n(87,"p-select",14),y("ngModelChange",function(u){return S(a.filters.sitePaymentTypeID,u)||(a.filters.sitePaymentTypeID=u),u}),i(),e(88,`
4311    `),i(),e(89,`
4312  `),i(),e(90,`
4313  `),n(91,"div",13),e(92,`
4314    `),n(93,"div",2),e(94,`
4315      `),n(95,"label"),e(96,"Payment Type"),i(),e(97,`
4316      `),_(98,hg,4,7),i(),e(99,`
4317  `),i(),e(100,`
4318  `),n(101,"div",11),e(102,`
4319    `),n(103,"div",2),e(104,`
4320      `),n(105,"label"),e(106,"Test Users"),i(),e(107,`
4321      `),n(108,"p-select",12),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(109,`
4322    `),i(),e(110,`
4323  `),i(),e(111,`
4324  `),n(112,"div",15),e(113,`
4325    `),n(114,"div",2),e(115,`
4326      `),n(116,"label"),e(117,"Transaction ID"),i(),e(118,`
4327      `),n(119,"input",16),y("ngModelChange",function(u){return S(a.filters.transactionID,u)||(a.filters.transactionID=u),u}),i(),e(120,`
4328    `),i(),e(121,`
4329  `),i(),e(122,`
4330  `),n(123,"div",13),e(124,`
4331    `),n(125,"div",2),e(126,`
4332      `),n(127,"label"),e(128,"Connected Account"),i(),e(129,`
4333      `),n(130,"p-multiSelect",17),y("ngModelChange",function(u){return S(a.filters.connectedAccounts,u)||(a.filters.connectedAccounts=u),u}),e(131,`
4334      `),i(),e(132,`
4335    `),i(),e(133,`
4336  `),i(),e(134,`
4337  `),_(135,Cg,25,14),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),x(a.accountingClasses?10:-1),s(13),C("ngModel",a.filters.transFrom),s(6),C("ngModel",a.filters.transTo),s(22),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.reimbursed),m("options",a.reimbursedOptions),s(11),C("ngModel",a.filters.sitePaymentTypeID),m("options",a.sitePaymentTypes),s(11),x(a.paymentTypes?98:-1),s(10),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(11),C("ngModel",a.filters.transactionID),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.connectedAccounts),m("options",a.connectedAccounts)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} accounts selected"),s(5),x(a.showRegOptionsFilters?135:-1))},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
4337)();function yg(o,d){if(o&1&&(e(0,`
4338            `),n(1,"th"),e(2),i(),e(3,`
4339          `)),o&2){let t=p().$implicit;s(2),I(`
4340              `,t.header,`
4341            `)}}function bg(o,d){if(o&1&&(e(0,`
4342            `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
4343            `),i(),e(5,`
4344          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4345              `,t.header,`
4346              `),s(),m("field",t.field)}}function vg(o,d){if(o&1&&(e(0,`
4347          `),_(1,yg,4,1)(2,bg,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function Tg(o,d){if(o&1&&(e(0,`
4348      `),n(1,"tr"),e(2,`
4349        `),N(3,vg,3,1,null,null,W),i(),e(5,`
4350    `)),o&2){let t=p();s(3),V(t.columns)}}function Eg(o,d){if(o&1&&(e(0,`
4351          `),n(1,"td"),e(2),i(),e(3,`
4352        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function wg(o,d){if(o&1&&(e(0,`
4353      `),n(1,"tr"),e(2,`
4354        `),_(3,Eg,4,1),n(4,"td"),e(5),i(),e(6,`
4355        `),n(7,"td"),e(8),i(),e(9,`
4356        `),n(10,"td"),e(11),i(),e(12,`
4357        `),n(13,"td"),e(14),i(),e(15,`
4358        `),n(16,"td"),e(17),i(),e(18,`
4359        `),n(19,"td"),e(20),i(),e(21,`
4360        `),n(22,"td"),e(23),i(),e(24,`
4361        `),n(25,"td"),e(26),i(),e(27,`
4362        `),n(28,"td"),e(29),i(),e(30,`
4363        `),n(31,"td"),e(32),i(),e(33,`
4364      `),i(),e(34,`
4365    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.waiverID),s(3),c(t.waiverTitle),s(3),c(t.waiverType),s(3),c(t.playerID),s(3),c(t.playerName),s(3),c(t.grade),s(3),c(t.clubUserID),s(3),c(t.userName),s(3),c(t.programName),s(3),c(t.teamName)}}var wr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.determineColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}determineColumns(){this.columns=[{field:"waiverID",header:"Waiver ID",notSortable:!0},{field:"waiverTitle",header:"Waiver Title"},{field:"waiverType",header:"Waiver Type"},{field:"playerID",header:"Player ID",notSortable:!0},{field:"playerName",header:"Player"},{field:"grade",header:"Grade"},{field:"clubUserID",header:"User ID",notSortable:!0},{field:"userName",header:"User"},{field:"programName",header:"Program"},{field:"teamName",header:"Team"}],this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"})}getReportData(l){this.loading=!0,this.determineColumns();let r=this.reportService.reportFilters[F.OUTSTANDING_WAIVERS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.reportService.getOutstandingWaiversData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-outstanding-waivers-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading","sortField"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
4366  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
4367    `),R(5,Tg,6,0,"ng-template",3),e(6,`
4368    `),R(7,wg,35,11,"ng-template",4),e(8,`
4369  `),i(),e(9,`
4370`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading)("sortField",a.showClubName?"clubName":"programName"))},dependencies:[z,H,$,K],encapsulation:2});let o=d;return o}
4370)();function Dg(o,d){if(o&1){let t=D();e(0,`
4371      `),n(1,"div",2),e(2,`
4372        `),n(3,"div",3),e(4,`
4373          `),n(5,"label"),e(6,"Club"),i(),e(7,`
4374          `),n(8,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.filterPrograms())}),e(9,`
4375          `),i(),e(10,`
4376        `),i(),e(11,`
4377      `),i(),e(12,`
4378    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} club(s) selected")}}function Ig(o,d){if(o&1){let t=D();e(0,`
4379          `),n(1,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.waiverTypeID,r)||(a.filters.waiverTypeID=r),h(r)}),e(2,`
4380          `),i(),e(3,`
4381        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.waiverTypeID),m("options",t.waiverTypes)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} type(s) selected")}}function Rg(o,d){if(o&1){let t=D();e(0,`
4382          `),n(1,"p-multiSelect",6),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),e(2,`
4383          `),i(),e(3,`
4384        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} program(s) selected")}}function Mg(o,d){if(o&1){let t=D();e(0,`
4385            `),n(1,"p-datepicker",18,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
4386            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
4387            `),n(7,"p-datepicker",19),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
4388            `),i(),e(9,`
4389          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function Ag(o,d){if(o&1){let t=D();e(0,`
4390            `),n(1,"p-datepicker",20),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
4391            `),i(),e(3,`
4392            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
4393            `),n(7,"p-datepicker",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
4394            `),i(),e(9,`
4395          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function Pg(o,d){if(o&1){let t=D();e(0,`
4396          `),n(1,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.grades,r)||(a.filters.grades=r),h(r)}),e(2,`
4397          `),i(),e(3,`
4398        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.grades),m("options",t.grades)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} grades selected")}}function Og(o,d){if(o&1){let t=D();e(0,`
4399  `),n(1,"div",1),e(2,`
4400    `),_(3,Dg,13,7),n(4,"div",2),e(5,`
4401      `),n(6,"div",3),e(7,`
4402        `),n(8,"label"),e(9,"Pledge/Waiver"),i(),e(10,`
4403        `),n(11,"p-multiSelect",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.pledgesWaivers,r)||(a.filters.pledgesWaivers=r),h(r)}),e(12,`
4404        `),i(),e(13,`
4405      `),i(),e(14,`
4406    `),i(),e(15,`
4407    `),n(16,"div",2),e(17,`
4408      `),n(18,"div",3),e(19,`
4409        `),n(20,"label"),e(21,"Waiver Type"),i(),e(22,`
4410        `),_(23,Ig,4,7),i(),e(24,`
4411    `),i(),e(25,`
4412    `),n(26,"div",2),e(27,`
4413      `),n(28,"div",3),e(29,`
4414        `),n(30,"label"),e(31,"Program"),i(),e(32,`
4415        `),_(33,Rg,4,7),i(),e(34,`
4416    `),i(),e(35,`
4417    `),n(36,"div",5),e(37,`
4418      `),n(38,"div",3),e(39,`
4419        `),n(40,"label"),e(41,"Team"),i(),e(42,`
4420        `),n(43,"p-multiSelect",6),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(44,`
4421        `),i(),e(45,`
4422      `),i(),e(46,`
4423    `),i(),e(47,`
4424    `),n(48,"div",7),e(49,`
4425      `),n(50,"div",3),e(51,`
4426        `),n(52,"label"),e(53,"Gender"),i(),e(54,`
4427        `),n(55,"p-select",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(56,`
4428      `),i(),e(57,`
4429    `),i(),e(58,`
4430    `),n(59,"div",9),e(60,`
4431      `),n(61,"div",10),e(62,`
4432        `),n(63,"label"),e(64,"Birth Date"),i(),e(65,`
4433        `),n(66,"p-select",11),T("onChange",function(){f(t);let r=p();
4433return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(67,`
4434        `),n(68,"span",12)(69,"p-inputgroup"),e(70,`
4435          `),_(71,Mg,10,8)(72,Ag,10,2),i(),e(73,`
4436          `),n(74,"a",13),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(75,`
4437            `),g(76,"i",14),e(77,`
4438          `),i(),e(78,`
4439        `),i(),e(79,`
4440      `),i(),e(80,`
4441    `),i(),e(81,`
4442    `),n(82,"div",5),e(83,`
4443      `),n(84,"div",3),e(85,`
4444        `),n(86,"label",15),e(87,"Grade"),i(),e(88,`
4445        `),_(89,Pg,4,7),i(),e(90,`
4446    `),i(),e(91,`
4447    `),n(92,"div",7),e(93,`
4448      `),n(94,"div",3),e(95,`
4449        `),n(96,"label"),e(97,"Test Users/Players"),i(),e(98,`
4450        `),n(99,"p-select",8),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(100,`
4451        `),i(),e(101,`
4452      `),i(),e(102,`
4453    `),i(),e(103,`
4454  `),i(),e(104,`
4455`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),m("autofocusFilter",!0),C("ngModel",t.filters.pledgesWaivers),m("options",t.pledgesWaivers)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} waivers selected"),s(12),x(t.waiverTypes?23:-1),s(10),x(t.programs?33:-1),s(10),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} team(s) selected"),s(12),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?71:72),s(18),x(t.grades?89:-1),s(10),C("ngModel",t.filters.testUserOption),m("options",t.testPlayersOptions)}}var Fr=(()=>{let d=class d{constructor(l,r,a,b,u,L){this.siteDataService=l,this.reportService=r,this.teamService=a,this.authorizeService=b,this.waiverService=u,this.sharedPlayerService=L,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testPlayersOptions=[{label:"All",value:""},{label:"Exclude",value:1},{label:"Include",value:2},{label:"Only",value:3}],this.genderOptions=Ae}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l)}),oe([this.reportService.getPrograms(!1),this.siteDataService.getClubSettings(),this.reportService.getWaiverTypes(),this.sharedPlayerService.getGrades()]).subscribe(l=>{this.reportService.programs=l[0],this.club=l[1].club,this.waiverTypes=l[2],this.grades=l[3],this.reportService.reportFilters[F.OUTSTANDING_WAIVERS]===void 0&&(this.reportService.reportFilters[F.OUTSTANDING_WAIVERS]=new P),this.filters=this.reportService.reportFilters[F.OUTSTANDING_WAIVERS],this.filterPrograms(),this.getTeams(),this.getPledgesWaivers()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.OUTSTANDING_WAIVERS]})}getPledgesWaivers(){this.filters.clubs||this.reportService.clubs.length===1?this.waiverService.getWaivers(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.pledgesWaivers=l.sort((r,a)=>r.label<a.label?-1:r.label>a.label?1:0)}):this.pledgesWaivers=void 0}filterPrograms(){this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.OUTSTANDING_WAIVERS],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.reportService.state.grades?this.filters.grades=this.grades.filter(l=>this.reportService.state.grades.includes(l.value)):this.filters.grades=void 0),this.programs=this.reportService.filterPrograms(this.filters)}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>
4455{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state&&(this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>r.teamID===this.reportService.state.teamID):this.filters.teams=void 0,this.filters.dobFrom=this.reportService.state.dobFrom?new Date(this.reportService.state.dobFrom):void 0,this.filters.dobTo=this.reportService.state.dobTo?new Date(this.reportService.state.dobTo):void 0,this.filters.genderID=this.reportService.state.genderID,this.reportService.showReportData=!0,this.reportService.state=void 0)}):this.teams=void 0}setToDateToEOY(l){return Me(l)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(ve),w(Pe),w(ei),w(qe))},d.\u0275cmp=A({type:d,selectors:[["app-outstanding-waivers-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-2"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["for","credit-budgeting-grade-filter"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["placeholder","All","optionLabel","label","inputId","credit-budgeting-grade-filter","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,Og,105,25),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
4455)();function Ng(o,d){if(o&1&&(e(0,`
4456            `),n(1,"th"),e(2),i(),e(3,`
4457          `)),o&2){let t=p().$implicit;s(2),I(`
4458              `,t.header,`
4459            `)}}function Vg(o,d){if(o&1&&(e(0,`
4460            `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
4461            `),i(),e(5,`
4462          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4463              `,t.header,`
4464              `),s(),m("field",t.field)}}function kg(o,d){if(o&1&&(e(0,`
4465          `),_(1,Ng,4,1)(2,Vg,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function Bg(o,d){if(o&1&&(e(0,`
4466      `),n(1,"tr"),e(2,`
4467        `),N(3,kg,3,1,null,null,W),i(),e(5,`
4468      `),n(6,"tr",5),e(7,`
4469        `),n(8,"td"),e(9,"Totals:"),i(),e(10,`
4470        `),g(11,"td"),e(12,`
4471        `),g(13,"td"),e(14,`
4472        `),g(15,"td"),e(16,`
4473        `),g(17,"td"),e(18,`
4474        `),n(19,"td",6),e(20),v(21,"accountingCurrency"),i(),e(22,`
4475        `),n(23,"td",6),e(24),v(25,"accountingCurrency"),i(),e(26,`
4476        `),n(27,"td",6),e(28),v(29,"accountingCurrency"),i(),e(30,`
4477        `),n(31,"td",6),e(32),v(33,"accountingCurrency"),i(),e(34,`
4478        `),n(35,"td",6),e(36),v(37,"accountingCurrency"),i(),e(38,`
4479        `),n(39,"td",6),e(40),v(41,"accountingCurrency"),i(),e(42,`
4480        `),n(43,"td",6),e(44),v(45,"accountingCurrency"),i(),e(46,`
4481        `),n(47,"td",6),e(48),v(49,"accountingCurrency"),i(),e(50,`
4482      `),i(),e(51,`
4483    `)),o&2){let t=p();s(3),V(t.columns),s(17),c(E(21,8,t.totalPaymentAmount)),s(4),c(E(25,10,t.totalPaymentFee)),s(4),c(E(29,12,t.totalSurchargeAmount)),s(4),c(E(33,14,t.totalPaymentAmount+t.totalPaymentFee)),s(4),c(E(37,16,t.totalProcessorFee)),s(4),c(E(41,18,t.totalReimbursementAmount)),s(4),c(E(45,20,t.totalReimbursementFeeAmount)),s(4),c(E(49,22,t.totalReimbursementAmount+t.totalReimbursementFeeAmount))}}function Wg(o,d){if(o&1&&(e(0,`
4484      `),n(1,"tr"),e(2,`
4485        `),n(3,"td"),e(4),i(),e(5,`
4486        `),n(6,"td"),e(7),i(),e(8,`
4487        `),n(9,"td"),e(10),i(),e(11,`
4488        `),n(12,"td"),e(13),i(),e(14,`
4489        `),n(15,"td"),e(16),i(),e(17,`
4490        `),n(18,"td"),e(19),v(20,"accountingCurrency"),i(),e(21,`
4491        `),n(22,"td"),e(23),v(24,"accountingCurrency"),i(),e(25,`
4492        `),n(26,"td"),e(27),v(28,"accountingCurrency"),i(),e(29,`
4493        `),n(30,"td"),e(31),v(32,"accountingCurrency"),i(),e(33,`
4494        `),n(34,"td"),e(35),v(36,"accountingCurrency"),i(),e(37,`
4495        `),n(38,"td"),e(39),v(40,"accountingCurrency"),i(),e(41,`
4496        `),n(42,"td"),e(43),v(44,"accountingCurrency"),i(),e(45,`
4497        `),n(46,"td"),e(47),v(48,"accountingCurrency"),i(),e(49,`
4498      `),i(),e(50,`
4499    `)),o&2){let t=d.$implicit;s(4),c(t.clubName),s(3),c(t.programTypeName),s(3),c(t.programName),s(3),c(t.accountingClassName),s(3),c(t.feeType),s(3),c(E(20,13,t.paymentAmount)),s(4),c(E(24,15,t.paymentFee)),s(4),c(E(28,17,t.surchargeAmount)),s(4),c(E(32,19,t.paymentAmount+t.paymentFee)),s(4),c(E(36,21,t.processorFee)),s(4),c(E(40,23,t.reimbursementAmount)),s(4),c(E(44,25,t.reimbursementFEEAmount)),s(4),c(E(48,27,t.totalDisbursement))}}var Dr=(()=>{let d=class d{constructor(l,r,a,b,u){this.reportService=l,this.siteDataService=r,this.paymentService=a,this.formService=b,this.ref=u,this.AriaLabels=X,this.loading=!0,this.ReportType=F,this.showModal=!1,this.showFailPaymentConfirm=!1,this.showClubName=!1}ngOnInit(){this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||(this.columns=this.getReportColumns(),this.getReportData(null))})}getReportColumns(){return[{field:"clubName",header:"Club"},{field:"programTypeName",header:"Program Type"},{field:"programName",header:"Program"},{field:"accountingClassName",header:"Accounting Class"},{field:"feeType",header:"Fee Type"},{field:"paymentAmount",header:"Amount"},{field:"paymentFee",header:"Transaction Fee"},{field:"surchargeAmount",header:"Surcharge Amount"},{field:"total",header:"Total"},{field:"processorFee",header:"Processor Fee"},{field:"reimbursementAmount",header:"Reimbursement Amount"},{field:"reimbursementFEEAmount",header:"Reimbursement Fee"},{field:"reimbursementTotal",header:"Reimbursement Total"}]}getReportData(l){let r=this.reportService.reportFilters[this.reportService.reportType];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getClubTransactionsBreakoutSummaryData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalPaymentAmount=a.totalPaymentAmount,this.totalPaymentFee=a.totalPaymentFee,this.totalReimbursementAmount=a.totalReimbursementAmount,this.totalReimbursementFeeAmount=a.totalReimbursementFEEAmount,this.totalProcessorFee=a.totalProcessorFee,this.totalSurchargeAmount=a.totalSurchargeAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(Ue),w(Ct),w(Dt))},d.\u0275cmp=A({type:d,selectors:[["app-club-transactions-breakout-summary-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
4500  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
4501    `),R(5,Bg,52,24,"ng-template",3),e(6,`
4502    `),R(7,Wg,51,29,"ng-template",4),e(8,`
4503  `),i(),e(9,`
4504`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,se],encapsulation:2});let o=d;return o}
4504)();function Yg(o,d){if(o&1){let t=D();e(0,`
4505    `),n(1,"div",1),e(2,`
4506      `),n(3,"div",2),e(4,`
4507        `),n(5,"label"),e(6,"Club"),i(),e(7,`
4508        `),n(8,"p-multiSelect",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),h(r.updateAccountingClassesOptions())}),e(9,`
4509        `),i(),e(10,`
4510      `),i(),e(11,`
4511    `),i(),e(12,`
4512  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Gg(o,d){if(o&1){let t=D();e(0,`
4513        `),n(1,"p-multiSelect",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p();return h(r.filterPrograms())}),e(2,`
4514        `),i(),e(3,`
4515      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} program types selected")}}function jg(o,d){if(o&1){let t=D();e(0,`
4516        `),n(1,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),e(2,`
4517        `),i(),e(3,`
4518      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} programs selected")}}function Hg(o,d){if(o&1){let t=D();e(0,`
4519        `),n(1,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.accountingClasses,r)||(a.filters.accountingClasses=r),h(r)}),e(2,`
4520        `),i(),e(3,`
4521      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.accountingClasses),m("options",t.accountingClasses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} accounting classes selected")}}function zg(o,d){if(o&1){let t=D();e(0,`
4522        `),n(1,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.paymentTypes,r)||(a.filters.paymentTypes=r),h(r)}),e(2,`
4523        `),i(),e(3,`
4524      `)}if(o&2){let t=p();s(),m("autofocusFilter",!0),C("ngModel",t.filters.paymentTypes),m("options",t.paymentTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} payment types selected")}}var Ir=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.paymentService=r,this.clubService=a,this.paymentTypes=qt,this.ReportType=F,this.reimbursedOptions=Mt,this.testUserOptions=le,this.accountingClasses=[],this.connectedAccounts=[]}ngOnInit(){this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[this.reportService.reportType]}),this.reportService.setClubID(this.filters),this.filters.dateFrom=void 0,this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}ngOnChanges(l){l&&l.reportType&&this.setFilters()}setFilters(){this.reportService.reportFilters[this.reportService.reportType]===void 0&&(this.reportService.reportFilters[this.reportService.reportType]=new P),this.filters=this.reportService.reportFilters[this.reportService.reportType];let l=[];this.sitePaymentTypes||l.push(this.paymentService.getSitePaymentTypes()),l.push(this.reportService.getPrograms()),l.push(this.reportService.getProgramTypes()),l.push(this.clubService.getClubAccountingClasses(void 0)),l.push(this.reportService.getConnectedAccounts()),l.length>0&&oe(l).subscribe(r=>{this.sitePaymentTypes||(this.sitePaymentTypes=[{label:"All",value:null},...r[0]]),this.reportService.programs=r[1],this.programTypes=r[2],this.filterPrograms(),this.accountingClassOptions=r[3],this.accountingClasses=this.accountingClassOptions.map(a=>({label:a.accountingClassName,value:a.clubAccountingClassID})),this.connectedAccountOptions=r[4].filter(a=>a.accountTypeID!==Ot.TEAM_ACCOUNT),this.connectedAccounts=this.connectedAccountOptions.map(a=>({label:a.name,value:a.clubStripeConnectedAccountID}))}),this.filters.transFrom=new Date(new Date().setDate(new Date().getDate()-30)),this.filters.dateFrom=new Date(new Date().setDate(new Date().getDate()-30))}getSelectedClubIDs(){return this.filters.clubs?.length>0?this.filters.clubs.map(l=>l.clubID):this.reportService.clubs.map(l=>l.clubID)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}filterPrograms(){this.programs=this.reportService.filterPrograms(this.filters)}updateAccountingClassesOptions(){this.reportService.clubs&&this.reportService.clubs.length>1&&this.clubService.getClubAccountingClassesForClubs(this.getSelectedClubIDs()).subscribe(l=>{this.accountingClassOptions=l,this.accountingClasses=[],this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))})}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Ue),w(et))},d.\u0275cmp=A({type:d,selectors:[["app-club-transactions-breakout-summary-filters"]],inputs:{reportType:"reportType"},standalone:!1,features:[Ve],decls:144,vars:22,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"d-flex","align-items-center"],["id","transFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","transTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-2"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["o
4524ptionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body","placeholder","All",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["placeholder","All","optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body","placeholder","All",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
4525  `),_(2,Yg,13,7),n(3,"div",1),e(4,`
4526    `),n(5,"div",2),e(6,`
4527      `),n(7,"label"),e(8,"Program Type"),i(),e(9,`
4528      `),_(10,Gg,4,7),i(),e(11,`
4529  `),i(),e(12,`
4530  `),n(13,"div",1),e(14,`
4531    `),n(15,"div",2),e(16,`
4532      `),n(17,"label"),e(18,"Program"),i(),e(19,`
4533      `),_(20,jg,4,7),i(),e(21,`
4534  `),i(),e(22,`
4535  `),n(23,"div",1),e(24,`
4536    `),n(25,"div",2),e(26,`
4537      `),n(27,"label"),e(28,"Accounting Class"),i(),e(29,`
4538      `),_(30,Hg,4,7),i(),e(31,`
4539  `),i(),e(32,`
4540  `),n(33,"div",1),e(34,`
4541    `),n(35,"div",2),e(36,`
4542      `),n(37,"label"),e(38,"Transaction Date"),i(),e(39,`
4543      `),n(40,"span",3)(41,"p-inputgroup"),e(42,`
4544        `),n(43,"p-datepicker",4),y("ngModelChange",function(u){return S(a.filters.transFrom,u)||(a.filters.transFrom=u),u}),e(44,`
4545        `),i(),e(45,`
4546        `),n(46,"p-inputgroup-addon"),e(47,"to"),i(),e(48,`
4547        `),n(49,"p-datepicker",5),y("ngModelChange",function(u){return S(a.filters.transTo,u)||(a.filters.transTo=u),u}),e(50,`
4548        `),i(),e(51,`
4549        `),i(),e(52,`
4550        `),n(53,"a",6),T("click",function(){return a.filters.transFrom=a.reportService.defaultDate,a.filters.transTo=void 0}),e(54,`
4551          `),g(55,"i",7),e(56,`
4552        `),i(),e(57,`
4553      `),i(),e(58,`
4554    `),i(),e(59,`
4555  `),i(),e(60,`
4556  `),n(61,"div",1),e(62,`
4557    `),n(63,"div",2),e(64,`
4558      `),n(65,"label"),e(66,"Reimbursement Date"),i(),e(67,`
4559      `),n(68,"span",3)(69,"p-inputgroup"),e(70,`
4560        `),n(71,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(72,`
4561        `),i(),e(73,`
4562        `),n(74,"p-inputgroup-addon"),e(75,"to"),i(),e(76,`
4563        `),n(77,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(78,`
4564        `),i(),e(79,`
4565        `),i(),e(80,`
4566        `),n(81,"a",6),T("click",function(){return a.filters.dateFrom=void 0,a.filters.dateTo=void 0}),e(82,`
4567          `),g(83,"i",7),e(84,`
4568        `),i(),e(85,`
4569      `),i(),e(86,`
4570    `),i(),e(87,`
4571  `),i(),e(88,`
4572  `),n(89,"div",10),e(90,`
4573    `),n(91,"div",2),e(92,`
4574      `),n(93,"label"),e(94,"Reimbursed"),i(),e(95,`
4575      `),n(96,"p-select",11),y("ngModelChange",function(u){return S(a.filters.reimbursed,u)||(a.filters.reimbursed=u),u}),i(),e(97,`
4576    `),i(),e(98,`
4577  `),i(),e(99,`
4578  `),n(100,"div",12),e(101,`
4579    `),n(102,"div",2),e(103,`
4580      `),n(104,"label"),e(105,"Type"),i(),e(106,`
4581      `),n(107,"p-select",13),y("ngModelChange",function(u){return S(a.filters.sitePaymentTypeID,u)||(a.filters.sitePaymentTypeID=u),u}),i(),e(108,`
4582    `),i(),e(109,`
4583  `),i(),e(110,`
4584  `),n(111,"div",12),e(112,`
4585    `),n(113,"div",2),e(114,`
4586      `),n(115,"label"),e(116,"Payment Type"),i(),e(117,`
4587      `),_(118,zg,4,7),i(),e(119,`
4588  `),i(),e(120,`
4589  `),n(121,"div",10),e(122,`
4590    `),n(123,"div",2),e(124,`
4591      `),n(125,"label"),e(126,"Test Users"),i(),e(127,`
4592      `),n(128,"p-select",11),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(129,`
4593    `),i(),e(130,`
4594  `),i(),e(131,`
4595  `),n(132,"div",12),e(133,`
4596    `),n(134,"div",2),e(135,`
4597      `),n(136,"label"),e(137,"Connected Account"),i(),e(138,`
4598      `),n(139,"p-multiSelect",14),y("ngModelChange",function(u){return S(a.filters.connectedAccounts,u)||(a.filters.connectedAccounts=u),u}),e(140,`
4599      `),i(),e(141,`
4600    `),i(),e(142,`
4601  `),i(),e(143,`
4602`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),x(a.programTypes?10:-1),s(10),x(a.programs?20:-1),s(10),x(a.accountingClasses?30:-1),s(13),C("ngModel",a.filters.transFrom),s(6),C("ngModel",a.filters.transTo),s(22),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.reimbursed),m("options",a.reimbursedOptions),s(11),C("ngModel",a.filters.sitePaymentTypeID),m("options",a.sitePaymentTypes),s(11),x(a.paymentTypes?118:-1),s(10),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.connectedAccounts),m("options",a.connectedAccounts)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} accounts selected"))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
4602)();function $g(o,d){if(o&1&&(e(0,`
4603            `),n(1,"th"),e(2),i(),e(3,`
4604          `)),o&2){let t=p().$implicit;s(2),I(`
4605              `,t.header,`
4606            `)}}function Kg(o,d){if(o&1&&(e(0,`
4607            `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
4608            `),i(),e(5,`
4609          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4610              `,t.header,`
4611              `),s(),m("field",t.field)}}function Jg(o,d){if(o&1&&(e(0,`
4612          `),_(1,$g,4,1)(2,Kg,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function Xg(o,d){if(o&1&&(e(0,`
4613      `),n(1,"tr"),e(2,`
4614        `),N(3,Jg,3,1,null,null,W),i(),e(5,`
4615    `)),o&2){let t=p();s(3),V(t.columns)}}function Zg(o,d){if(o&1&&(e(0,`
4616      `),n(1,"tr"),e(2,`
4617        `),n(3,"td"),e(4),i(),e(5,`
4618        `),n(6,"td"),e(7),i(),e(8,`
4619        `),n(9,"td"),e(10),i(),e(11,`
4620        `),n(12,"td"),e(13),i(),e(14,`
4621        `),n(15,"td"),e(16),i(),e(17,`
4622        `),n(18,"td"),e(19),i(),e(20,`
4623        `),n(21,"td"),e(22),i(),e(23,`
4624        `),n(24,"td"),e(25),v(26,"utcDate"),i(),e(27,`
4625        `),n(28,"td"),e(29),i(),e(30,`
4626      `),i(),e(31,`
4627    `)),o&2){let t=d.$implicit;s(4),c(t.clubName),s(3),c(t.firstName),s(3),c(t.lastName),s(3),c(t.email),s(3),c(t.userType),s(3),c(t.device),s(3),c(t.browserInfo),s(3),c(B(26,9,t.loginDate,"M/d/yyy h:mm a")),s(4),c(t.ip)}}var Rr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"clubName",header:"Club"},{field:"firstName",header:"First Name"},{field:"lastName",header:"Last Name"},{field:"email",header:"Email"},{field:"userType",header:"User Type"},{field:"device",header:"Device",notSortable:!0},{field:"browserInfo",header:"Browser Info",notSortable:!0},{field:"loginDate",header:"Login Date"},{field:"ip",header:"IP Address"}]}getReportData(l){let r=this.reportService.reportFilters[F.ACTIVITY];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getActivityData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-activity-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","loginDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
4628  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
4629    `),R(5,Xg,6,0,"ng-template",3),e(6,`
4630    `),R(7,Zg,32,12,"ng-template",4),e(8,`
4631  `),i(),e(9,`
4632`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,Ce],encapsulation:2});let o=d;return o}
4632)();function ef(o,d){if(o&1){let t=D();e(0,`
4633    `),n(1,"div",10),e(2,`
4634      `),n(3,"div",2),e(4,`
4635        `),n(5,"label"),e(6,"Club"),i(),e(7,`
4636        `),n(8,"p-multiSelect",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
4637        `),i(),e(10,`
4638      `),i(),e(11,`
4639    `),i(),e(12,`
4640  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}var Mr=(()=>{let d=class d{constructor(l){this.reportService=l,this.ReportType=F,this.testUserOptions=le}ngOnInit(){this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[this.reportService.reportType]}),this.reportService.setClubID(this.filters),this.setDateFrom(),this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}ngOnChanges(l){l&&l.reportType&&this.setFilters()}setFilters(){this.reportService.reportFilters[this.reportService.reportType]===void 0&&(this.reportService.reportFilters[this.reportService.reportType]=new P),this.filters=this.reportService.reportFilters[this.reportService.reportType],this.filters.dateFrom=new Date(new Date().setDate(new Date().getDate()-7))}ngOnDestroy(){this.clearSubscription$.unsubscribe()}setDateFrom(){this.filters.dateFrom=new Date,this.filters.dateFrom.setDate(new Date().getDate()-7)}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-activity-filters"]],inputs:{reportType:"reportType"},standalone:!1,features:[Ve],decls:42,vars:5,consts:[[1,"row"],[1,"col-md-6","col-lg-4"],[1,"form-group"],[1,"d-flex","align-items-center"],["id","dateFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
4641  `),_(2,ef,13,7),n(3,"div",1),e(4,`
4642    `),n(5,"div",2),e(6,`
4643      `),n(7,"label"),e(8,"Login Date"),i(),e(9,`
4644      `),n(10,"span",3)(11,"p-inputgroup"),e(12,`
4645        `),n(13,"p-datepicker",4),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),e(14,`
4646        `),i(),e(15,`
4647        `),n(16,"p-inputgroup-addon"),e(17,"to"),i(),e(18,`
4648        `),n(19,"p-datepicker",5),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),e(20,`
4649        `),i(),e(21,`
4650        `),i(),e(22,`
4651        `),n(23,"a",6),T("click",function(){return a.setDateFrom(),a.filters.dateTo=void 0}),e(24,`
4652          `),g(25,"i",7),e(26,`
4653        `),i(),e(27,`
4654      `),i(),e(28,`
4655    `),i(),e(29,`
4656  `),i(),e(30,`
4657  `),n(31,"div",8),e(32,`
4658    `),n(33,"div",2),e(34,`
4659      `),n(35,"label"),e(36,"Test Users"),i(),e(37,`
4660      `),n(38,"p-select",9),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),i(),e(39,`
4661    `),i(),e(40,`
4662  `),i(),e(41,`
4663`),i()),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(11),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions))},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
4663)();var nf=o=>["/admin/invoicing/invoices",o,"view"];function of(o,d){if(o&1&&(e(0,`
4664            `),n(1,"th"),e(2),i(),e(3,`
4665          `)),o&2){let t=p().$implicit;s(2),I(`
4666              `,t.header,`
4667            `)}}function rf(o,d){if(o&1&&(e(0,`
4668            `),n(1,"th",5),e(2),g(3,"p-sortIcon",6),e(4,`
4669            `),i(),e(5,`
4670          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4671              `,t.header,`
4672              `),s(),m("field",t.field)}}function af(o,d){if(o&1&&(e(0,`
4673          `),_(1,of,4,1)(2,rf,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function lf(o,d){if(o&1&&(e(0,`
4674      `),n(1,"tr"),e(2,`
4675        `),N(3,af,3,1,null,null,W),i(),e(5,`
4676    `)),o&2){let t=p();s(3),V(t.columns)}}function sf(o,d){if(o&1&&(e(0,`
4677          `),n(1,"td"),e(2),i(),e(3,`
4678        `)),o&2){let t=p().$implicit;s(2),I(`
4679            `,t.clubName,`
4680          `)}}function df(o,d){if(o&1){let t=D();e(0,`
4681              `),n(1,"a",7),T("click",function(){f(t);let r=p(2).$implicit,a=p();return h(a.reportService.setupModal(r.playerID,r.clubUserID,r.subdomain,r.clubName,"/admin/invoicing/invoices/"+r.invoiceID+"/view","invoice"))}),e(2),i(),e(3,`
4682            `)}if(o&2){let t=p(2).$implicit;s(2),I(`
4683                `,t.fullInvoiceID,`
4684              `)}}function pf(o,d){if(o&1&&(e(0,`
4685              `),n(1,"a",8),e(2),i(),e(3,`
4686            `)),o&2){let t=p(2).$implicit;s(),m("routerLink",re(2,nf,t.invoiceID)),s(),I(`
4687                `,t.fullInvoiceID,`
4688              `)}}function mf(o,d){if(o&1&&(e(0,`
4689            `),_(1,df,4,1),_(2,pf,4,4)),o&2){let t=p().$implicit,l=p();s(),x(t.clubID!==l.reportService.clubID?1:-1),s(),x(t.clubID===l.reportService.clubID?2:-1)}}function cf(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
4690            `,t.fullInvoiceID,`
4691          `)}}function uf(o,d){if(o&1&&(e(0,`
4692              `),g(1,"app-pill",9),e(2,`
4693            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function _f(o,d){if(o&1&&(e(0,`
4694              `),g(1,"app-pill",10),e(2,`
4695            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function xf(o,d){if(o&1&&(e(0,`
4696              `),g(1,"app-pill",11),e(2,`
4697            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function gf(o,d){if(o&1&&(e(0,`
4698              `),g(1,"app-pill",12),e(2,`
4699            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function ff(o,d){if(o&1&&(e(0,`
4700              `),g(1,"app-pill",13),e(2,`
4701            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function hf(o,d){if(o&1&&(e(0,`
4702              `),g(1,"app-pill",13),e(2,`
4703            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function Cf(o,d){if(o&1&&(e(0,`
4704              `),g(1,"app-pill",12),e(2,`
4705            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function Sf(o,d){if(o&1&&(e(0,`
4706              `),g(1,"app-pill",13),e(2,`
4707            `)),o&2){let t=p().$implicit;s(),m("text",t.invoiceStatus)}}function yf(o,d){if(o&1&&(e(0,`
4708      `),n(1,"tr"),e(2,`
4709        `),_(3,sf,4,1),n(4,"td"),e(5,`
4710          `),_(6,mf,3,2)(7,cf,1,1),i(),e(8,`
4711        `),n(9,"td"),e(10),i(),e(11,`
4712        `),n(12,"td"),e(13),i(),e(14,`
4713        `),n(15,"td"),e(16),i(),e(17,`
4714        `),n(18,"td"),e(19),i(),e(20,`
4715        `),n(21,"td"),e(22),i(),e(23,`
4716        `),n(24,"td"),e(25),v(26,"sprocketCurrency"),i(),e(27,`
4717        `),n(28,"td"),e(29),i(),e(30,`
4718        `),n(31,"td"),e(32),v(33,"sprocketCurrency"),i(),e(34,`
4719        `),n(35,"td"),e(36),i(),e(37,`
4720        `),n(38,"td"),e(39),v(40,"date"),i(),e(41,`
4721        `),n(42,"td"),e(43),v(44,"date"),i(),e(45,`
4722        `),n(46,"td"),e(47,`
4723          `),_(48,uf,3,1)(49,_f,3,1)(50,xf,3,1)(51,gf,3,1)(52,ff,3,1)(53,hf,3,1)(54,Cf,3,1)(55,Sf,3,1),e(56,`
4724        `),i(),e(57,`
4725      `),i(),e(58,`
4726    `)),o&2){let t,l=d.$implicit,r=p();s(3),x(r.showClubName?3:-1),s(3),x(r.reportService.profile[r.Permission.Invoices]?6:7),s(4),c(l.shortDescription),s(3),c(l.email),s(3),c(l.userName),s(3),c(l.playerName),s(3),c(l.itemName),s(3),c(E(26,14,l.itemPrice)),s(4),c(l.itemQuantity),s(3),c(E(33,16,l.itemTotalPrice)),s(4),c(l.revenueCategory),s(3),c(B(40,18,l.invoiceDate,"MM/dd
4726/yyyy")),s(4),c(B(44,21,l.dueDate,"MM/dd/yyyy")),s(5),x((t=l.invoiceStatusID)===r.InvoiceStatus.DRAFT?48:t===r.InvoiceStatus.OPEN?49:t===r.InvoiceStatus.PAID?50:t===r.InvoiceStatus.OVERDUE?51:t===r.InvoiceStatus.WRITTEN_OFF?52:t===r.InvoiceStatus.CANCELLED?53:t===r.InvoiceStatus.PARTIALLY_REFUNDED?54:t===r.InvoiceStatus.REFUNDED?55:-1)}}var Ar=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee,this.InvoiceStatus=to}ngOnInit(){this.determineColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}determineColumns(){this.columns=[{field:"invoiceID",header:"Invoice ID"},{field:"shortDescription",header:"Description"},{field:"email",header:"Email"},{field:"userName",header:"User Name"},{field:"playerName",header:"Player Name"},{field:"itemName",header:"Item Name",notSortable:!0},{field:"itemPrice",header:"Item Price",notSortable:!0},{field:"itemQuantity",header:"Item Quantity",notSortable:!0},{field:"itemTotalPrice",header:"Item Total Price",notSortable:!0},{field:"revenueCategory",header:"Revenue Category",notSortable:!0},{field:"invoiceDate",header:"Invoice Date"},{field:"dueDate",header:"Due Date"},{field:"invoiceStatusID",header:"Status"}],this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"})}getReportData(l){this.loading=!0;let r=this.reportService.reportFilters[F.INVOICE_DETAILS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.reportService.getInvoiceDetails().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-invoice-details-table"]],standalone:!1,decls:10,vars:9,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","invoiceID","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","sortOrder","rows","loading"],["pTemplate","header"],["pTemplate","body"],[3,"pSortableColumn"],[3,"field"],[3,"click"],[3,"routerLink"],["status","secondary",3,"text"],["status","warning",3,"text"],["status","success",3,"text"],["status","error",3,"text"],[3,"text"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
4727  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
4728    `),R(5,lf,6,0,"ng-template",3),e(6,`
4729    `),R(7,yf,59,24,"ng-template",4),e(8,`
4730  `),i(),e(9,`
4731`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("sortOrder",-1)("rows",100)("loading",a.loading))},dependencies:[pe,z,ht,H,$,K,de,zn],encapsulation:2});let o=d;return o}
4731)();function vf(o,d){if(o&1){let t=D();e(0,`
4732      `),n(1,"div",8),e(2,`
4733        `),n(3,"div",2),e(4,`
4734          `),n(5,"label"),e(6,"Club"),i(),e(7,`
4735            `),n(8,"p-multiSelect",13),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),e(9,`
4736          `),i(),e(10,`
4737        `),i(),e(11,`
4738      `),i(),e(12,`
4739    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} club(s) selected")}}function Tf(o,d){if(o&1){let t=D();e(0,`
4740  `),n(1,"div",0),e(2,`
4741    `),_(3,vf,13,7),n(4,"div",1),e(5,`
4742      `),n(6,"div",2),e(7,`
4743        `),n(8,"label"),e(9,"Invoice Date"),i(),e(10,`
4744        `),n(11,"span",3)(12,"p-inputgroup"),e(13,`
4745          `),n(14,"p-datepicker",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(15,`
4746          `),i(),e(16,`
4747          `),n(17,"p-inputgroup-addon"),e(18,"to"),i(),e(19,`
4748          `),n(20,"p-datepicker",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(21,`
4749          `),i(),e(22,`
4750          `),i(),e(23,`
4751          `),n(24,"a",6),T("click",function(){f(t);let r=p();return r.filters.dateFrom=r.reportService.defaultDate,h(r.filters.dateTo=void 0)}),e(25,`
4752            `),g(26,"i",7),e(27,`
4753          `),i(),e(28,`
4754        `),i(),e(29,`
4755      `),i(),e(30,`
4756    `),i(),e(31,`
4757    `),n(32,"div",1),e(33,`
4758      `),n(34,"div",2),e(35,`
4759        `),n(36,"label"),e(37,"Due Date"),i(),e(38,`
4760        `),n(39,"span",3)(40,"p-inputgroup"),e(41,`
4761          `),n(42,"p-datepicker",4),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom2,r)||(a.filters.dateFrom2=r),h(r)}),e(43,`
4762          `),i(),e(44,`
4763          `),n(45,"p-inputgroup-addon"),e(46,"to"),i(),e(47,`
4764          `),n(48,"p-datepicker",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo2,r)||(a.filters.dateTo2=r),h(r)}),e(49,`
4765          `),i(),e(50,`
4766          `),i(),e(51,`
4767          `),n(52,"a",6),T("click",function(){f(t);let r=p();return r.filters.dateFrom2=r.reportService.defaultDate,h(r.filters.dateTo2=void 0)}),e(53,`
4768            `),g(54,"i",7),e(55,`
4769          `),i(),e(56,`
4770        `),i(),e(57,`
4771      `),i(),e(58,`
4772    `),i(),e(59,`
4773    `),n(60,"div",8),e(61,`
4774      `),n(62,"div",2),e(63,`
4775        `),n(64,"label"),e(65,"Invoice Status"),i(),e(66,`
4776        `),n(67,"p-multiSelect",9),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.invoiceStatuses,r)||(a.filters.invoiceStatuses=r),h(r)}),e(68,`
4777        `),i(),e(69,`
4778      `),i(),e(70,`
4779    `),i(),e(71,`
4780  `),i(),e(72,`
4781  `),n(73,"div",0),e(74,`
4782    `),n(75,"div",10),e(76,`
4783      `),n(77,"div",2),e(78,`
4784        `),n(79,"label",11),e(80,"Test Users/Players"),i(),e(81,`
4785        `),n(82,"p-select",12),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(83,`
4786        `),i(),e(84,`
4787      `),i(),e(85,`
4788    `),i(),e(86,`
4789  `),i(),e(87,`
4790`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(11),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo),s(22),C("ngModel",t.filters.dateFrom2),s(6),C("ngModel",t.filters.dateTo2),s(19),m("autofocusFilter",!0),C("ngModel",t.filters.invoiceStatuses),m("options",t.invoiceStatuses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} status(es) selected"),s(15),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions)}}var Pr=(()=>{let d=class d{constructor(l,r,a){this.siteDataService=l,this.reportService=r,this.authorizeService=a,this.testUserOptions=le}ngOnInit(){this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l)}),this.reportService.reportFilters[F.INVOICE_DETAILS]===void 0&&(this.reportService.reportFilters[F.INVOICE_DETAILS]=new P),this.filters=this.reportService.reportFilters[F.INVOICE_DETAILS],this.reportService.clubs?.length>1&&!this.filters.clubs&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID)]),oe([this.reportService.getInvoiceStatuses()]).subscribe(l=>{this.invoiceStatuses=l[0],this.reportService.state&&(this.reportService.showReportData=!0,this.reportService.state=void 0)}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.INVOICE_DETAILS]})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(Pe))},d.\u0275cmp=A({type:d,selectors:[["app-invoice-details-filters"]],standalone:!1,decls:1,vars:1,consts:[[1,"row"],[1,"col-md-6","col-lg-3"],[1,"form-group"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],[1,"col-md-5","col-lg-3"],["optionLabel","label","optionValue","value","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-3"],["for","test-user-option"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"]],template:function(r,a){r&1&&_(0,Tf,88,14),r&2&&x(a.filters?0:-1)},dependencies:[U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
4790)();var wf=o=>["/admin/users",o,"profile"],Ff=o=>["/admin/players",o,"overview"];function Df(o,d){if(o&1&&(e(0,`
4791          `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
4792          `),i(),e(5,`
4793        `)),o&2){let t=d.$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4794            `,t.header,`
4795            `),s(),m("field",t.field)}}function If(o,d){o&1&&(e(0,`
4796          `),g(1,"td"),e(2,`
4797        `))}function Rf(o,d){if(o&1&&(e(0,`
4798      `),n(1,"tr"),e(2,`
4799        `),N(3,Df,6,4,null,null,W),i(),e(5,`
4800      `),n(6,"tr",5),e(7,`
4801        `),_(8,If,3,0),g(9,"td"),e(10,`
4802        `),g(11,"td"),e(12,`
4803        `),g(13,"td"),e(14,`
4804        `),g(15,"td"),e(16,`
4805        `),g(17,"td"),e(18,`
4806        `),g(19,"td"),e(20,`
4807        `),g(21,"td"),e(22,`
4808        `),n(23,"td",6),e(24),v(25,"accountingCurrency"),i(),e(26,`
4809        `),n(27,"td"),e(28),v(29,"accountingCurrency"),i(),e(30,`
4810        `),n(31,"td"),e(32),v(33,"accountingCurrency"),i(),e(34,`
4811        `),n(35,"td"),e(36),v(37,"accountingCurrency"),i(),e(38,`
4812        `),n(39,"td"),e(40),v(41,"accountingCurrency"),i(),e(42,`
4813        `),n(43,"td"),e(44),v(45,"accountingCurrency"),i(),e(46,`
4814        `),n(47,"td"),e(48),v(49,"accountingCurrency"),i(),e(50,`
4815        `),g(51,"td"),e(52,`
4816        `),g(53,"td"),e(54,`
4817        `),g(55,"td"),e(56,`
4818      `),i(),e(57,`
4819    `)),o&2){let t=p();s(3),V(t.columns),s(5),x(t.showClubName?8:-1),s(16),c(E(25,8,t.totalAmountDue)),s(4),c(E(29,10,t.totalCashPaid)),s(4),c(E(33,12,t.totalCreditUsed)),s(4),c(E(37,14,t.totalAmountPaid)),s(4),c(E(41,16,t.totalOutstanding)),s(4),c(E(45,18,t.totalDisputedAmount)),s(4),c(E(49,20,t.totalRefundRequestAmount))}}function Mf(o,d){if(o&1&&(e(0,`
4820          `),n(1,"td"),e(2),i(),e(3,`
4821        `)),o&2){let t=p().$implicit;s(2),c(t.clubName)}}function Af(o,d){if(o&1&&(e(0,`
4822            `),n(1,"a",9),e(2),i(),e(3,`
4823          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,wf,t.clubUserID)),s(),c(t.teamName)}}function Pf(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
4824            `,t.teamName,`
4825          `)}}function Of(o,d){if(o&1&&(e(0,`
4826            `),n(1,"a",9),e(2),i(),e(3,`
4827          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Ff,t.playerID)),s(),c(t.playerName)}}function Lf(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
4828            `,t.playerName,`
4829          `)}}function Nf(o,d){if(o&1&&(e(0,`
4830      `),n(1,"tr"),e(2,`
4831        `),_(3,Mf,4,1),n(4,"td"),e(5),i(),e(6,`
4832        `),n(7,"td"),e(8,`
4833          `),_(9,Af,4,4)(10,Pf,1,1),i(),e(11,`
4834        `),n(12,"td"),e(13),i(),e(14,`
4835        `),n(15,"td"),e(16),i(),e(17,`
4836        `),n(18,"td"),e(19),i(),e(20,`
4837        `),n(21,"td"),e(22),i(),e(23,`
4838        `),n(24,"td"),e(25,`
4839          `),_(26,Of,4,4)(27,Lf,1,1),i(),e(28,`
4840        `),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
4841        `),n(33,"td"),e(34),v(35,"accountingCurrency"),i(),e(36,`
4842        `),n(37,"td"),e(38),v(39,"accountingCurrency"),i(),e(40,`
4843        `),n(41,"td"),e(42),v(43,"accountingCurrency"),i(),e(44,`
4844        `),n(45,"td"),e(46),v(47,"accountingCurrency"),i(),e(48,`
4845        `),n(49,"td"),e(50),v(51,"accountingCurrency"),i(),e(52,`
4846        `),n(53,"td"),e(54),v(55,"accountingCurrency"),i(),e(56,`
4847        `),n(57,"td"),e(58),v(59,"date"),i(),e(60,`
4848        `),n(61,"td"),e(62),i(),e(63,`
4849        `),n(64,"td"),e(65),i(),e(66,`
4850      `),i(),e(67,`
4851    `)),o&2){let t=d.$implicit,l=p();s(3),x(l.showClubName?3:-1),s(2),c(t.programName),s(4),x(!t.playerName&&l.reportService.profile[l.Permission.UserProfile]?9:10),s(4),c(t.uniqueInvoiceID),s(3),c(t.shortDescription),s(3),c(t.userEmail),s(3),c(t.userName),s(4),x(l.reportService.profile[l.Permission.Profile]?26:27),s(4),c(E(31,18,t.amountDue)),s(4),c(E(35,20,t.cashPaid)),s(4),c(E(39,22,t.creditUsed)),s(4),c(E(43,24,t.totalPaid)),s(4),c(E(47,26,t.outstanding)),s(4),c(E(51,28,t.disputedAmount)),s(4),c(E(55,30,t.refundRequestAmount)),s(4),c(B(59,32,t.dueDate,"M/d/y")),s(4),c(t.registrationID),s(3),c(t.uniqueTransactionID)}}var Or=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.showClubName=!1,this.loading=!0,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showClubName&&this.columns.unshift({field:"clubName",header:"Club"}),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"programName",header:"Program"},{field:"teamName",header:"Team"},{field:"uniqueInvoiceID",header:"Invoice ID"},{field:"shortDescription",header:"Invoice Description"},{field:"userEmail",header:"User Email"},{field:"userName",header:"User Name"},{field:"playerName",header:"Player Name"},{field:"amountDue",header:"Total Fee"},{field:"cashPaid",header:"Paid (Cash)"},{field:"creditUsed",header:"Paid (Credit)"},{field:"totalPaid",header:"Total Paid"},{field:"outstanding",header:"Outstanding"},{field:"disputedAmount",header:"Disputed"},{field:"refundRequestAmount",header:"Pending Refund"},{field:"dueDate",header:"Due Date"},{field:"registrationID",header:"Registration ID"},{field:"uniqueTransactionID",header:"Unique Transaction ID"}]}getReportData(l){let r=this.reportService.reportFilters[F.AR_AGING];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getArAgingData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalAmountDue=a.totalAmountDue,this.totalCashPaid=a.totalCashPaid,this.totalAmountPaid=a.totalAmountPaid,this.totalCreditUsed=a.totalCreditUsed,this.totalOutstanding=a.totalOutstanding,this.totalDisputedAmount=a.totalDisputedAmount,this.totalRefundRequestAmount=a.totalRefundRequestAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-ar-aging-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
4852  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
4853    `),R(5,Rf,58,22,"ng-template",3),e(6,`
4854    `),R(7,Nf,68,35,"ng-template",4),e(8,`
4855  `),i(),e(9,`
4856`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,de,se],encapsulation:2});let o=d;return o}
4856)();function kf(o,d){if(o&1){let t=D();e(0,`
4857    `),n(1,"div",4),e(2,`
4858      `),n(3,"div",2),e(4,`
4859        `),n(5,"label"),e(6,"Club"),i(),e(7,`
4860        `),n(8,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p();return r.filterPrograms(),r.getTeams(),h(r.updateRegistrations())}),e(9,`
4861        `),i(),e(10,`
4862      `),i(),e(11,`
4863    `),i(),e(12,`
4864  `)}if(o&2){let t=p();s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function Bf(o,d){o&1&&(e(0,`
4865      `),n(1,"div",23),e(2,`
4866        Balance As Of Date is Required
4867      `),i(),e(3,`
4868    `))}var Lr=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.registrationService=r,this.teamService=a,this.testUserOptions=le,this.daysOverdueOptions=Ri}ngOnInit(){this.reportService.reportFilters[F.AR_AGING]===void 0&&(this.reportService.reportFilters[F.AR_AGING]=new P),this.filters=this.reportService.reportFilters[F.AR_AGING],this.setDefaultDates(),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(!0)]).subscribe(l=>{this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.filterPrograms(),this.getTeams()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.AR_AGING],this.setDefaultDates()})}filterPrograms(){let l=this.reportService.state?.programs;this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.AR_AGING],this.setDefaultDates(),this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(r=>r.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypeID=+this.reportService.state.programTypeID:this.filters.programTypeID=null,this.reportService.state.activePrograms?(this.filters.activePrograms=this.reportService.state.activePrograms,this.filters.activeFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.activeTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.filters.regFrom=void 0):(this.filters.regFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.regTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0),this.filters.dateFrom=this.reportService.state.dueFrom?new Date(this.reportService.state.dueFrom):void 0,this.filters.dateTo=this.reportService.state.dueTo?new Date(this.reportService.state.dueTo):void 0,this.reportService.state.asOfDate&&(this.filters.asOfDate=this.reportService.state.asOfDate?new Date(this.reportService.state.asOfDate):void 0)),this.programs=this.reportService.filterPrograms(this.filters),l?.length&&(this.filters.programs=this.programs.filter(r=>l.includes(r.programID)))}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state?(this.filters.daysOverdue=this.reportService.state.pastDue??null,this.updateRegistrations(),this.reportService.showReportData=!0,this.reportService.state=void 0):this.updateRegistrations()}):this.teams=void 0}setDefaultDates(){this.filters.asOfDate=this.reportService.currentDate,this.filters.regFrom=void 0,this.filters.dateFrom=void 0,this.checkRequired()}checkRequired(){this.filters.asOfDate?this.reportService.missingRequiredFilter=!1:this.reportService.missingRequiredFilter=!0}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Se),w(ve))},d.\u0275cmp=A({type:d,selectors:[["app-ar-aging-filters"]],standalone:!1,decls:178,vars:45,consts:[[1,"row"],[1,"col-md-5","col-lg-2"],[1,"form-group"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","onChange","ngModel","options"],[1,"col-md-5","col-lg-3"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-6","col-lg-3"],[1,"d-flex","align-items-center"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["o
4868ptionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-2"],["styleClass","full-width","placeholder","All Outstanding","appendTo","body",3,"ngModelChange","ngModel","options"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-2","col-lg-2"],["id","asOfDate","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onBlur","onSelect","ngModel","required"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],[1,"text-red"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
4869  `),_(2,kf,13,7),n(3,"div",1),e(4,`
4870    `),n(5,"div",2),e(6,`
4871      `),n(7,"label"),e(8,"Program Type"),i(),e(9,`
4872      `),n(10,"p-select",3),y("ngModelChange",function(u){return S(a.filters.programTypeID,u)||(a.filters.programTypeID=u),u}),T("onChange",function(){return a.filterPrograms(),a.updateRegistrations()}),i(),e(11,`
4873    `),i(),e(12,`
4874  `),i(),e(13,`
4875  `),n(14,"div",4),e(15,`
4876    `),n(16,"div",2),e(17,`
4877      `),n(18,"label"),e(19,"Program"),i(),e(20,`
4878      `),n(21,"p-multiSelect",5),y("ngModelChange",function(u){return S(a.filters.programs,u)||(a.filters.programs=u),u}),T("onChange",function(){return a.updateRegistrations()}),e(22,`
4879      `),i(),e(23,`
4880    `),i(),e(24,`
4881  `),i(),e(25,`
4882  `),n(26,"div",6),e(27,`
4883    `),n(28,"div",2),e(29,`
4884      `),n(30,"label"),e(31,"Revenue Transaction Date"),i(),e(32,`
4885      `),n(33,"span",7)(34,"p-inputgroup"),e(35,`
4886        `),n(36,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.regFrom,u)||(a.filters.regFrom=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(37,`
4887        `),i(),e(38,`
4888        `),n(39,"p-inputgroup-addon"),e(40,"to"),i(),e(41,`
4889        `),n(42,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.regTo,u)||(a.filters.regTo=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(43,`
4890        `),i(),e(44,`
4891        `),i(),e(45,`
4892        `),n(46,"a",10),T("click",function(){return a.filters.regFrom=void 0,a.filters.regTo=void 0,a.updateRegistrations()}),e(47,`
4893          `),g(48,"i",11),e(49,`
4894        `),i(),e(50,`
4895      `),i(),e(51,`
4896    `),i(),e(52,`
4897  `),i(),e(53,`
4898  `),n(54,"div",6),e(55,`
4899    `),n(56,"div",2),e(57,`
4900      `),n(58,"label"),e(59,"Due Date"),i(),e(60,`
4901      `),n(61,"span",7)(62,"p-inputgroup"),e(63,`
4902        `),n(64,"p-datepicker",8),y("ngModelChange",function(u){return S(a.filters.dateFrom,u)||(a.filters.dateFrom=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(65,`
4903        `),i(),e(66,`
4904        `),n(67,"p-inputgroup-addon"),e(68,"to"),i(),e(69,`
4905        `),n(70,"p-datepicker",9),y("ngModelChange",function(u){return S(a.filters.dateTo,u)||(a.filters.dateTo=u),u}),T("onSelect",function(){return a.updateRegistrations()}),e(71,`
4906        `),i(),e(72,`
4907        `),i(),e(73,`
4908        `),n(74,"a",10),T("click",function(){return a.filters.dateFrom=void 0,a.filters.dateTo=void 0,a.updateRegistrations()}),e(75,`
4909          `),g(76,"i",11),e(77,`
4910        `),i(),e(78,`
4911      `),i(),e(79,`
4912    `),i(),e(80,`
4913  `),i(),e(81,`
4914  `),n(82,"div",1),e(83,`
4915    `),n(84,"div",2),e(85,`
4916      `),n(86,"label"),e(87,"Registration"),i(),e(88,`
4917      `),n(89,"p-multiSelect",12),y("ngModelChange",function(u){return S(a.filters.registrations,u)||(a.filters.registrations=u),u}),e(90,`
4918      `),i(),e(91,`
4919    `),i(),e(92,`
4920  `),i(),e(93,`
4921  `),n(94,"div",1),e(95,`
4922    `),n(96,"div",2),e(97,`
4923      `),n(98,"label"),e(99,"Season"),i(),e(100,`
4924      `),n(101,"p-multiSelect",13),y("ngModelChange",function(u){return S(a.filters.seasons,u)||(a.filters.seasons=u),u}),e(102,`
4925      `),i(),e(103,`
4926    `),i(),e(104,`
4927  `),i(),e(105,`
4928  `),n(106,"div",1),e(107,`
4929    `),n(108,"div",2),e(109,`
4930      `),n(110,"label"),e(111,"Team"),i(),e(112,`
4931      `),n(113,"p-multiSelect",14),y("ngModelChange",function(u){return S(a.filters.teams,u)||(a.filters.teams=u),u}),e(114,`
4932      `),i(),e(115,`
4933    `),i(),e(116,`
4934  `),i(),e(117,`
4935  `),n(118,"div",4),e(119,`
4936    `),n(120,"div",2),e(121,`
4937      `),n(122,"label",15),e(123,"Player Last Name"),i(),e(124,`
4938      `),n(125,"input",16),y("ngModelChange",function(u){return S(a.filters.playerName,u)||(a.filters.playerName=u),u}),i(),e(126,`
4939    `),i(),e(127,`
4940  `),i(),e(128,`
4941  `),n(129,"div",17),e(130,`
4942    `),n(131,"div",2),e(132,`
4943      `),n(133,"label"),e(134,"Days Overdue"),i(),e(135,`
4944      `),n(136,"p-select",18),y("ngModelChange",function(u){return S(a.filters.daysOverdue,u)||(a.filters.daysOverdue=u),u}),e(137,`
4945      `),i(),e(138,`
4946    `),i(),e(139,`
4947  `),i(),e(140,`
4948  `),n(141,"div",17),e(142,`
4949    `),n(143,"div",2),e(144,`
4950      `),n(145,"label"),e(146,"Test Users/Players"),i(),e(147,`
4951      `),n(148,"p-select",19),y("ngModelChange",function(u){return S(a.filters.testUserOption,u)||(a.filters.testUserOption=u),u}),e(149,`
4952      `),i(),e(150,`
4953    `),i(),e(151,`
4954  `),i(),e(152,`
4955  `),n(153,"div",20),e(154,`
4956    `),n(155,"div",2),e(156,`
4957      `),n(157,"label"),e(158,"Balance As Of"),i(),e(159,`
4958      `),n(160,"p-inputgroup"),e(161,`
4959        `),n(162,"p-datepicker",21),y("ngModelChange",function(u){return S(a.filters.asOfDate,u)||(a.filters.asOfDate=u),u}),T("onBlur",function(){return a.checkRequired()})("onSelect",function(){return a.checkRequired()}),e(163,`
4960        `),i(),e(164,`
4961        `),n(165,"p-inputgroup-addon"),e(166,`
4962          `),n(167,"a",10),T("click",function(){return a.filters.asOfDate=a.reportService.currentDate,a.checkRequired()}),e(168,`
4963            `),g(169,"i",11),e(170,`
4964          `),i(),e(171,`
4965        `),i(),e(172,`
4966      `),i(),e(173,`
4967    `),i(),e(174,`
4968    `),_(175,Bf,4,0),i(),e(176,`
4969`),i(),e(177,`
4970`)),r&2&&(s(2),x(a.reportService.clubs&&a.reportService.clubs.length>1?2:-1),s(8),C("ngModel",a.filters.programTypeID),m("options",a.programTypes),s(11),m("autofocusFilter",!0),C("ngModel",a.filters.programs),m("options",a.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.programs?"All":"Select program(s)")("selectedItemsLabel","{0} programs selected"),s(15),C("ngModel",a.filters.regFrom),s(6),C("ngModel",a.filters.regTo),s(22),C("ngModel",a.filters.dateFrom),s(6),C("ngModel",a.filters.dateTo),s(19),m("autofocusFilter",!0),C("ngModel",a.filters.registrations),m("options",a.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",a.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registrations selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.seasons),m("options",a.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} seasons selected"),s(12),m("autofocusFilter",!0),C("ngModel",a.filters.teams),m("options",a.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0}
4970 teams selected"),s(12),C("ngModel",a.filters.playerName),s(11),C("ngModel",a.filters.daysOverdue),m("options",a.daysOverdueOptions),s(12),C("ngModel",a.filters.testUserOption),m("options",a.testUserOptions),s(14),C("ngModel",a.filters.asOfDate),m("required",!0),s(13),x(a.filters.asOfDate?-1:175))},dependencies:[fe,U,vn,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o})();var Uf=o=>["/admin/players",o,"overview"];function Yf(o,d){if(o&1&&(e(0,`
4971            `),n(1,"th"),e(2),i(),e(3,`
4972          `)),o&2){let t=p().$implicit;s(2),I(`
4973              `,t.header,`
4974            `)}}function Gf(o,d){if(o&1&&(e(0,`
4975            `),n(1,"th",7),e(2),g(3,"p-sortIcon",8),e(4,`
4976            `),i(),e(5,`
4977          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
4978              `,t.header,`
4979              `),s(),m("field",t.field)}}function jf(o,d){if(o&1&&(e(0,`
4980          `),_(1,Yf,4,1)(2,Gf,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function Hf(o,d){o&1&&(e(0,`
4981          `),g(1,"td"),e(2,`
4982        `))}function zf(o,d){o&1&&(e(0,`
4983          `),g(1,"td"),e(2,`
4984        `))}function qf(o,d){o&1&&(e(0,`
4985          `),g(1,"td"),e(2,`
4986        `))}function $f(o,d){if(o&1&&(e(0,`
4987          `),n(1,"td",6),e(2),v(3,"accountingCurrency"),i(),e(4,`
4988        `)),o&2){let t=p(2);s(2),c(E(3,1,t.totalSurchargeAmount))}}function Kf(o,d){if(o&1&&(e(0,`
4989      `),n(1,"tr"),e(2,`
4990        `),N(3,jf,3,1,null,null,W),i(),e(5,`
4991      `),n(6,"tr",5),e(7,`
4992        `),n(8,"td"),e(9,"Totals:"),i(),e(10,`
4993        `),g(11,"td"),e(12,`
4994        `),_(13,Hf,3,0),g(14,"td"),e(15,`
4995        `),g(16,"td"),e(17,`
4996        `),g(18,"td"),e(19,`
4997        `),g(20,"td"),e(21,`
4998        `),g(22,"td"),e(23,`
4999        `),g(24,"td"),e(25,`
5000        `),g(26,"td"),e(27,`
5001        `),_(28,zf,3,0),g(29,"td"),e(30,`
5002        `),g(31,"td"),e(32,`
5003        `),g(33,"td"),e(34,`
5004        `),_(35,qf,3,0),_(36,$f,5,3),n(37,"td",6),e(38),v(39,"accountingCurrency"),i(),e(40,`
5005        `),g(41,"td"),e(42,`
5006        `),n(43,"td",6),e(44),v(45,"accountingCurrency"),i(),e(46,`
5007        `),n(47,"td",6),e(48),v(49,"accountingCurrency"),i(),e(50,`
5008        `),n(51,"td",6),e(52),v(53,"accountingCurrency"),i(),e(54,`
5009        `),n(55,"td",6),e(56),v(57,"accountingCurrency"),i(),e(58,`
5010        `),n(59,"td",6),e(60),v(61,"accountingCurrency"),i(),e(62,`
5011        `),n(63,"td",6),e(64),v(65,"accountingCurrency"),i(),e(66,`
5012        `),n(67,"td",6),e(68),v(69,"accountingCurrency"),i(),e(70,`
5013        `),n(71,"td",6),e(72),v(73,"accountingCurrency"),i(),e(74,`
5014        `),n(75,"td",6),e(76),v(77,"accountingCurrency"),i(),e(78,`
5015        `),n(79,"td",6),e(80),v(81,"accountingCurrency"),i(),e(82,`
5016        `),g(83,"td"),e(84,`
5017        `),g(85,"td"),e(86,`
5018        `),g(87,"td"),e(88,`
5019        `),g(89,"td"),e(90,`
5020      `),i(),e(91,`
5021    `)),o&2){let t=p();s(3),V(t.columns),s(10),x(t.showRegOption?13:-1),s(15),x(t.showRegOption?28:-1),s(7),x(t.showRegOption?35:-1),s(),x(t.showRegOption?36:-1),s(2),c(E(39,15,t.totalGrossRevenue)),s(6),c(E(45,17,-1*(t.totalDiscountAmount-t.totalFinAidAmount))),s(4),c(E(49,19,-1*t.totalFinAidAmount)),s(4),c(E(53,21,-1*t.totalCreditUsed)),s(4),c(E(57,23,t.totalNetRevenue)),s(4),c(E(61,25,t.totalAdminFee)),s(4),c(E(65,27,-1*(t.totalGrossRevenue+t.totalAdminFee-t.totalAmountDue-t.totalDiscountAmount))),s(4),c(E(69,29,t.totalPaymentAmount)),s(4),c(E(73,31,t.totalCashRefund)),s(4),c(E(77,33,t.totalReimbursementFeeAmount)),s(4),c(E(81,35,t.totalReimbursementAmount+t.totalReimbursementFeeAmount))}}function Jf(o,d){if(o&1&&(e(0,`
5022          `),n(1,"td"),e(2),i(),e(3,`
5023        `)),o&2){let t=p().$implicit;s(2),c(t.connectedAccountName)}}function Xf(o,d){if(o&1&&(e(0,`
5024          `),n(1,"td"),e(2),i(),e(3,`
5025        `)),o&2){let t=p().$implicit;s(2),c(t.checkoutOptionName)}}function Zf(o,d){if(o&1&&(e(0,`
5026            `),n(1,"a",9),e(2),i(),e(3,`
5027          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,Uf,t.playerID)),s(),c(t.playerName)}}function Qf(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
5028            `,t.playerName,`
5029          `)}}function eh(o,d){if(o&1&&(e(0,`
5030          `),n(1,"td"),e(2),i(),e(3,`
5031        `)),o&2){let t=p().$implicit;s(2),c(t.surchargeName)}}function th(o,d){if(o&1&&(e(0),v(1,"accountingCurrency")),o&2){let t=p(2).$implicit;I(`
5032              `,E(1,1,t.surchargeAmount),`
5033            `)}}function ih(o,d){if(o&1&&(e(0,`
5034          `),n(1,"td"),e(2,`
5035            `),_(3,th,2,3),i(),e(4,`
5036        `)),o&2){let t=p().$implicit;s(3),x(t.surchargeAmount!==0&&t.surchargeName?3:-1)}}function nh(o,d){if(o&1&&(e(0,`
5037      `),n(1,"tr"),e(2,`
5038        `),n(3,"td"),e(4),v(5,"utcDate"),i(),e(6,`
5039        `),n(7,"td"),e(8),i(),e(9,`
5040        `),_(10,Jf,4,1),n(11,"td"),e(12),i(),e(13,`
5041        `),n(14,"td"),e(15),i(),e(16,`
5042        `),n(17,"td"),e(18),i(),e(19,`
5043        `),n(20,"td"),e(21),i(),e(22,`
5044        `),n(23,"td"),e(24),i(),e(25,`
5045        `),n(26,"td"),e(27),i(),e(28,`
5046        `),_(29,Xf,4,1),n(30,"td"),e(31,`
5047          `),_(32,Zf,4,4)(33,Qf,1,1),i(),e(34,`
5048        `),n(35,"td"),e(36),i(),e(37,`
5049        `),n(38,"td"),e(39),v(40,"date"),i(),e(41,`
5050        `),n(42,"td"),e(43),i(),e(44,`
5051        `),_(45,eh,4,1),_(46,ih,5,1),n(47,"td"),e(48),v(49,"accountingCurrency"),i(),e(50,`
5052        `),n(51,"td"),e(52),v(53,"number"),i(),e(54,`
5053        `),n(55,"td"),e(56),v(57,"accountingCurrency"),i(),e(58,`
5054        `),n(59,"td"),e(60),v(61,"accountingCurrency"),i(),e(62,`
5055        `),n(63,"td"),e(64),v(65,"accountingCurrency"),i(),e(66,`
5056        `),n(67,"td"),e(68),v(69,"accountingCurrency"),i(),e(70,`
5057        `),n(71,"td"),e(72),v(73,"accountingCurrency"),i(),e(74,`
5058        `),n(75,"td"),e(76),v(77,"accountingCurrency"),i(),e(78,`
5059        `),n(79,"td"),e(80),v(81,"accountingCurrency"),i(),e(82,`
5060        `),n(83,"td"),e(84),v(85,"accountingCurrency"),i(),e(86,`
5061        `),n(87,"td"),e(88),v(89,"accountingCurrency"),i(),e(90,`
5062        `),n(91,"td"),e(92),v(93,"accountingCurrency"),i(),e(94,`
5063        `),n(95,"td"),e(96),v(97,"accountingCurrency"),i(),e(98,`
5064        `),n(99,"td"),e(100),v(101,"date"),i(),e(102,`
5065        `),n(103,"td"),e(104),i(),e(105,`
5066        `),n(106,"td"),e(107),i(),e(108,`
5067
5068
5069      `),i(),e(109,`
5070    `)),o&2){let t=d.$implicit,l=p();s(4),c(B(5,32,t.submittedDate,"M/d/y")),s(4),c(t.clubName),s(2),x(l.showRegOption?10:-1),s(2),c(t.programTypeName),s(3),c(t.programName),s(3),c(t.regName),s(3),c(t.accountingClassName),s(3),c(t.userName),s(3),c(t.sitePaymentType),s(2),x(l.showRegOption?29:-1),s(3),x(l.reportService.profile[l.Permission.Profile]?32:33),s(4),c(t.paymentMethod),s(3),c(B(40,35,t.dob,"M/d/y")),s(4),c(t.transactionID),s(2),x(l.showRegOption?45:-1),s(),x(l.showRegOption?46:-1),s(2),c(E(49,38,t.grossRevenue)),s(4),c(t.discount?B(53,40,t.discount,"1.0-2")+"%":""),s(4),c(E(57,43,-1*t.discountAmountMinusFinAid)),s(4),c(E(61,45,-1*t.finAidAmount)),s(4),c(E(65,47,-1*t.creditUsed)),s(4),c(E(69,49,t.netRevenue)),s(4),c(E(73,51,t.adminFee)),s(4),c(E(77,53,-1*t.feeAdjustment)),s(4),c(E(81,55,t.paymentAmount)),s(4),c(E(85,57,t.cashRefund)),s(4),c(E(89,59,t.reimbursementFEEAmount)),s(4),c(E(93,61,t.totalDisbursement)),s(4),c(E(97,63,t.checkAmount)),s(4),c(B(101,65,t.reimbursementDate,"M/d/y")),s(4),c(t.accountingTransactionID),s(3),c(t.status)}}var Nr=(()=>{let d=class d{constructor(l,r,a,b,u){this.reportService=l,this.siteDataService=r,this.paymentService=a,this.formService=b,this.ref=u,this.AriaLabels=X,this.loading=!0,this.ReportType=F,this.showModal=!1,this.show
5070FailPaymentConfirm=!1,this.showClubName=!1,this.showRegOption=!1,this.Permission=ee}ngOnInit(){this.showClubName=this.reportService.clubs&&this.reportService.clubs.length>1,this.showRegOption=this.reportService.clubs&&this.reportService.clubs.find(l=>l.clubID===this.reportService.clubID).paymentVendorID===gt.STRIPE,this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){let l=[{field:"submittedDate",header:"Transaction Date"},{field:"clubName",header:"Club"},{field:"programTypeName",header:"Program Type"},{field:"programName",header:"Program"},{field:"regName",header:"Registration"},{field:"accountingClassName",header:"Accounting Class"},{field:"userName",header:"User Name"},{field:"sitePaymentType",header:"Type"},{field:"playerName",header:"Player Name"},{field:"paymentMethod",header:"Payment Method"},{field:"dob",header:"Date of Birth"},{field:"transactionID",header:"Transaction ID"},{field:"grossRevenue",header:"Gross Revenue"},{field:"discount",header:"Discount Percent"},{field:"discountAmountMinusFinAid",header:"Discount Amount"},{field:"finAidAmount",header:"Financial Aid Amount"},{field:"creditUsed",header:"Credit Amount"},{field:"netRevenue",header:"Net Revenue"},{field:"adminFee",header:"Admin Fee"},{field:"feeAdjustment",header:"Fee Adjustment"},{field:"paymentAmount",header:"Total Cash / Scheduled"},{field:"cashRefund",header:"Total Cash Refunded"},{field:"reimbursementFEEAmount",header:"Reimbursement Fee"},{field:"totalDisbursement",header:"Reimbursement Total"},{field:"checkAmount",header:"Transfer Total"},{field:"reimbursementDate",header:"Reimbursement Date"},{field:"accountingTransactionID",header:"Accounting Transaction ID"},{field:"status",header:"Status"}];return this.showRegOption&&(l.splice(2,0,{field:"connectedAccountName",header:"Connected Account"}),l.splice(9,0,{field:"checkoutOptionName",header:"Checkout Option Name"}),l.splice(14,0,{field:"surchargeName",header:"Surcharge"}),l.splice(15,0,{field:"surchargeAmount",header:"Surcharge Amount"})),l}getReportData(l){let r=this.reportService.reportFilters[this.reportService.reportType];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.loading=!0,this.reportService.getClubCashTransactionsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalPaymentAmount=a.totalPaymentAmount,this.totalPaymentFee=a.totalPaymentFee,this.totalReimbursementAmount=a.totalReimbursementAmount,this.totalReimbursementFeeAmount=a.totalReimbursementFEEAmount,this.totalProcessorFee=a.totalProcessorFee,this.totalGrossRevenue=a.totalGrossRevenue,this.totalDiscountAmount=a.totalDiscountAmount,this.totalFinAidAmount=a.totalFinAidAmount,this.totalAdminFee=a.totalAdminFee,this.totalAmountDue=a.totalAmountDue,this.totalCreditUsed=a.totalCreditUsed,this.totalNetRevenue=a.totalNetRevenue,this.totalCashRefund=a.totalCashRefund,this.totalSurchargeAmount=a.totalSurchargeAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(Ue),w(Ct),w(Dt))},d.\u0275cmp=A({type:d,selectors:[["app-club-cash-transactions-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","submittedDate","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[1,"green"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
5071  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
5072    `),R(5,Kf,92,37,"ng-template",3),e(6,`
5073    `),R(7,nh,110,68,"ng-template",4),e(8,`
5074  `),i(),e(9,`
5075`),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,Be,de,Ce,se],encapsulation:2});let o=d;return o}
5075)();function rh(o,d){if(o&1){let t=D();e(0,`
5076      `),n(1,"div",1),e(2,`
5077        `),n(3,"div",2),e(4,`
5078          `),n(5,"label"),e(6,"Club"),i(),e(7,`
5079          `),n(8,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateAccountingClassesOptions())}),e(9,`
5080          `),i(),e(10,`
5081        `),i(),e(11,`
5082      `),i(),e(12,`
5083    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} clubs selected")}}function ah(o,d){if(o&1){let t=D();e(0,`
5084          `),n(1,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.accountingClasses,r)||(a.filters.accountingClasses=r),h(r)}),e(2,`
5085          `),i(),e(3,`
5086        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.accountingClasses),m("options",t.accountingClasses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.accountingClasses?"All":"Select accounting classes(s)")("selectedItemsLabel","{0} accounting classes selected")}}function lh(o,d){if(o&1){let t=D();e(0,`
5087          `),n(1,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.filterPrograms())}),e(2,`
5088          `),i(),e(3,`
5089        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} program type(s) selected")}}function sh(o,d){if(o&1){let t=D();e(0,`
5090          `),n(1,"p-multiSelect",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),e(2,`
5091          `),i(),e(3,`
5092        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select program(s)")("selectedItemsLabel","{0} program(s) selected")}}function dh(o,d){if(o&1){let t=D();e(0,`
5093          `),n(1,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.paymentTypes,r)||(a.filters.paymentTypes=r),h(r)}),e(2,`
5094          `),i(),e(3,`
5095        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.paymentTypes),m("options",t.paymentTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} payment types selected")}}function ph(o,d){if(o&1){let t=D();e(0,`
5096      `),n(1,"div",23),e(2,`
5097        `),n(3,"div",2),e(4,`
5098          `),n(5,"label"),e(6,"Checkout Option"),i(),e(7,`
5099          `),n(8,"p-multiSelect",24),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.registrationOptions,r)||(a.filters.registrationOptions=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrationOptionValues())}),e(9,`
5100          `),i(),e(10,`
5101        `),i(),e(11,`
5102      `),i(),e(12,`
5103      `),n(13,"div",25),e(14,`
5104        `),n(15,"div",2),e(16,`
5105          `),n(17,"label"),e(18,"Checkout Option Response"),i(),e(19,`
5106          `),n(20,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.registrationOptionValues,r)||(a.filters.registrationOptionValues=r),h(r)}),e(21,`
5107          `),i(),e(22,`
5108        `),i(),e(23,`
5109      `),i(),e(24,`
5110    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptions),m("options",t.registrationOptions)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} checkout options selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptionValues),m("options",t.registrationOptionValues)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.registrationOptions?"All":"Select checkout option(s)")("selectedItemsLabel","{0} responses selected")}}function mh(o,d){if(o&1){let t=D();e(0,`
5111  `),n(1,"div",0),e(2,`
5112    `),_(3,rh,13,7),n(4,"div",1),e(5,`
5113      `),n(6,"div",2),e(7,`
5114        `),n(8,"label"),e(9,"Accounting Class"),i(),e(10,`
5115        `),_(11,ah,4,8),i(),e(12,`
5116    `),i(),e(13,`
5117    `),n(14,"div",3),e(15,`
5118      `),n(16,"div",2),e(17,`
5119        `),n(18,"label"),e(19,"Program Type"),i(),e(20,`
5120        `),_(21,lh,4,7),i(),e(22,`
5121    `),i(),e(23,`
5122    `),n(24,"div",1),e(25,`
5123      `),n(26,"div",2),e(27,`
5124        `),n(28,"label"),e(29,"Program"),i(),e(30,`
5125        `),_(31,sh,4,8),i(),e(32,`
5126    `),i(),e(33,`
5127    `),n(34,"div",4),e(35,`
5128      `),n(36,"div",2),e(37,`
5129        `),n(38,"label"),e(39,"Transaction Date"),i(),e(40,`
5130        `),n(41,"span",5)(42,"p-inputgroup"),e(43,`
5131          `),n(44,"p-datepicker",6),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.transFrom,r)||(a.filters.transFrom=r),h(r)}),e(45,`
5132          `),i(),e(46,`
5133          `),n(47,"p-inputgroup-addon"),e(48,"to"),i(),e(49,`
5134          `),n(50,"p-datepicker",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.transTo,r)||(a.filters.transTo=r),h(r)}),e(51,`
5135          `),i(),e(52,`
5136          `),i(),e(53,`
5137          `),n(54,"a",8),T("click",function(){f(t);let r=p();return r.filters.transFrom=r.reportService.defaultDate,h(r.filters.transTo=void 0)}),e(55,`
5138            `),g(56,"i",9),e(57,`
5139          `),i(),e(58,`
5140        `),i(),e(59,`
5141      `),i(),e(60,`
5142    `),i(),e(61,`
5143    `),n(62,"div",4),e(63,`
5144      `),n(64,"div",2),e(65,`
5145        `),n(66,"label"),e(67,"Reimbursement Date"),i(),e(68,`
5146        `),n(69,"span",5)(70,"p-inputgroup"),e(71,`
5147          `),n(72,"p-datepicker",10),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(73,`
5148          `),i(),e(74,`
5149          `),n(75,"p-inputgroup-addon"),e(76,"to"),i(),e(77,`
5150          `),n(78,"p-datepicker",11),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(79,`
5151          `),i(),e(80,`
5152          `),i(),e(81,`
5153          `),n(82,"a",8),T("click",function(){f(t);let r=p();return r.filters.dateFrom=void 0,h(r.filters.dateTo=void 0)}),e(83,`
5154            `),g(84,"i",9),e(85,`
5155          `),i(),e(86,`
5156        `),i(),e(87,`
5157      `),i(),e(88,`
5158    `),i(),e(89,`
5159    `),n(90,"div",12),e(91,`
5160      `),n(92,"div",2),e(93,`
5161        `),n(94,"label"),e(95,"Reimbursed"),i(),e(96,`
5162        `),n(97,"p-select",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.reimbursed,r)||(a.filters.reimbursed=r),h(r)}),i(),e(98,`
5163      `),i(),e(99,`
5164    `),i(),e(100,`
5165    `),n(101,"div",3),e(102,`
5166      `),n(103,"div",2),e(104,`
5167        `),n(105,"label"),e(106,"Type"),i(),e(107,`
5168        `),n(108,"p-select",13),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.sitePaymentTypeID,r)||(a.filters.sitePaymentTypeID=r),h(r)}),i(),e(109,`
5169      `),i(),e(110,`
5170    `),i(),e(111,`
5171    `),n(112,"div",3),e(113,`
5172      `),n(114,"div",2),e(115,`
5173        `),n(116,"label"),e(117,"Payment Type"),i(),e(118,`
5174        `),_(119,dh,4,7),i(),e(120,`
5175    `),i(),e(121,`
5176    `),n(122,"div",12),e(123,`
5177      `),n(124,"div",2),e(125,`
5178        `),n(126,"label"),e(127,"Test Users"),i(),e(128,`
5179        `),n(129,"p-select",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),i(),e(130,`
5180      `),i(),e(131,`
5181    `),i(),e(132,`
5182    `),n(133,"div",15),e(134,`
5183      `),n(135,"div",2),e(136,`
5184        `),n(137,"label"),e(138,"Transaction ID"),i(),e(139,`
5185        `),n(140,"input",16),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.transactionID,r)||(a.filters.transactionID=r),h(r)}),i(),e(141,`
5186      `),i(),e(142,`
5187    `),i(),e(143,`
5188    `),n(144,"div",3),e(145,`
5189      `),n(146,"div",2),e(147,`
5190        `),n(148,"label"),e(149,"Transaction Type"),i(),e(150,`
5191          `),n(151,"p-multiSelect",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.revenueCashTransactionTypes,r)||(a.filters.revenueCashTransactionTypes=r),h(r)}),e(152,`
5192        `),i(),e(153,`
5193      `),i(),e(154,`
5194    `),i(),e(155,`
5195    `),n(156,"div",3),e(157,`
5196      `),n(158,"div",2),e(159,`
5197        `),n(160,"label"),e(161,"Connected Account"),i(),e(162,`
5198        `),n(163,"p-multiSelect",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.connectedAccounts,r)||(a.filters.connectedAccounts=r),h(r)}),e(164,`
5199        `),i(),e(165,`
5200      `),i(),e(166,`
5201    `),i(),e(167,`
5202    `),_(168,ph,25,16),i(),e(169,`
5203`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.accountingClasses?11:-1),s(10),x(t.programTypes?21:-1),s(10),x(t.programs?31:-1),s(13),C("ngModel",t.filters.transFrom),s(6),C("ngModel",t.filters.transTo),s(22),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo),s(19),C("ngModel",t.filters.reimbursed),m("options",t.reimbursedOptions),s(11),C("ngModel",t.filters.sitePaymentTypeID),m("options",t.sitePaymentTypes),s(11),x(t.paymentTypes?119:-1),s(10),C("ngModel",t.filters.testUserOption),m("options",t.testUserOptions),s(11),C("ngModel",t.filters.transactionID),s(11),m("autofocusFilter",!0),C("ngModel",t.filters.revenueCashTransactionTypes),m("options",t.revenueCashTransactionTypes)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} transaction types(s) selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.connectedAccounts),m("options",t.connectedAccounts)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.connectedAccounts?"All":"Select account(s)")("selectedItemsLabel","{0} accounts selected"),s(5),x(t.showRegOptionsFilters?168:-1)}}var Vr=(()=>{let d=class d{constructor(l,r,a){this.reportService=l,this.paymentService=r,this.clubService=a,this.paymentTypes=qt,this.ReportType=F,this.testUserOptions=le,this.reimbursedOptions=Mt,this.inactivePlayerOptions=Ht,this.accountingClasses=[],this.revenueCashTransactionTypes=Pn,this.connectedAccounts=[],this.showRegOptionsFilters=!1}ngOnInit(){this.showRegOptionsFilters=this.reportService.clubs&&this.reportService.clubs.find(r=>r.clubID===this.reportService.clubID).paymentVendorID===gt.STRIPE;let l=[];l.push(this.paymentService.getSitePaymentTypes()),l.push(this.clubService.getClubAccountingClasses(void 0)),l.push(this.reportService.getPrograms()),l.push(this.reportService.getProgramTypes()),l.push(this.reportService.getConnectedAccounts()),oe(l).subscribe(r=>{this.sitePaymentTypes||(this.sitePaymentTypes=[{label:"All",value:null},...r[0]]),this.accountingClassOptions=r[1],this.reportService.programs=r[2],this.programTypes=r[3],this.connectedAccountOptions=r[4].filter(a=>a.accountTypeID!==Ot.TEAM_ACCOUNT),this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS]===void 0&&(this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS]=new P),this.filters=this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS],this.filters.transFrom=new Date(new Date().setDate(new Date().getDate()-30)),this.filters.dateFrom=new Date(new Date().setDate(new Date().getDate()-30)),this.programs=this.reportService.filterPrograms(this.filters),this.accountingClasses.push(...this.accountingClassOptions.map(a=>({label:a.accountingClassName,value:a.clubAccountingClassID}))),this.connectedAccounts=this.connectedAccountOptions.map(a=>({label:a.name,value:a.clubStripeConnectedAccountID})),this.filterPrograms(),this.updateRegistrationOptionsAndValues()}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS]})}ngOnChanges(l){l&&l.reportType&&this.setFilters()}setFilters(){this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS]===void 0&&(this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS]=new P),this.filters=this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS];let l=[];l.push(this.paymentService.getSitePaymentTypes()),l.push(this.clubService.getClubAccountingClasses(void 0)),l.push(this.reportService.getPrograms()),l.push(this.reportService.getProgramTypes()),l.length>0&&oe(l).subscribe(r=>{this.sitePaymentTypes||(this.sitePaymentTypes=[{label:"All",value:null},...r[0]]),this.accountingClassOptions=r[1],this.accountingClasses.push(...this.accountingClassOptions.map(a=>({label:a.accountingClassName,value:a.clubAccountingClassID}))),this.reportService.programs=r[2],this.programTypes=r[3],this.filterPrograms()})}filterPrograms(){this.reportService.state&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.CLUB_CASH_TRANSACTIONS],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypes=this.programTypes.filter(l=>l.value===+this.reportService.state.programTypeID):this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.reportService.state.includeCancelledRegistrations&&(this.filters.includeCancelledRegistrations=!0),this.filters.transFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.transTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.filters.dateFrom=void 0,this.reportService.state.revenueCashTransactionType?this.filters.revenueCashTransactionTypes=this.revenueCashTransactionTypes.filter(l=>l.value===+this.reportService.state.revenueCashTransactionType):this.reportService.state.revenueCashTransactionTypeNot?this.filters.revenueCashTransactionTypes=this.revenueCashTransactionTypes.filter(l=>l.value!==+this.reportService.state.revenueCashTransactionTypeNot):this.reportService.state.revenueCashTransactionTypes&&(this.filters.revenueCashTransactionTypes=this.revenueCashTransactionTypes.filter(l=>this.reportService.state.revenueCashTransactionTypes.includes(l.value))),this.reportService.state.sitePaymentTypeID?this.filters.sitePaymentTypeID=+this.reportService.state.sitePaymentTypeID:this.filters.sitePaymentTypeID=null,this.reportService.showReportData=!0,this.reportService.state=void 0),this.programs=this.reportService.filterPrograms(this.filters)}updateRegistrationOptionValues(){this.filters.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.get
5203SelectedClubIDs()).subscribe(l=>{this.registrationOptionValues=l}):this.registrationOptionValues=void 0}updateRegistrationOptions(){this.reportService.getRegistrationOptions(this.filters.registrations,this.getSelectedClubIDs()).subscribe(l=>{this.registrationOptions=l})}updateAccountingClassesOptions(){this.reportService.clubs&&this.reportService.clubs.length>1&&this.clubService.getClubAccountingClassesForClubs(this.getSelectedClubIDs()).subscribe(l=>{this.accountingClassOptions=l,this.accountingClasses=[],this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))})}updateRegistrationOptionsAndValues(){this.reportService.getRegistrationOptions(this.filters.registrations,this.getSelectedClubIDs()).pipe(Bt(l=>{this.registrationOptions=l}),Ft(()=>this.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.getSelectedClubIDs()):wt(void 0))).subscribe(l=>{this.registrationOptionValues=l})}getSelectedClubIDs(){return this.filters.clubs?.length>0?this.filters.clubs.map(l=>l.clubID):this.reportService.clubs.map(l=>l.clubID)}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(Ue),w(et))},d.\u0275cmp=A({type:d,selectors:[["app-club-cash-transactions-filters"]],standalone:!1,features:[Ve],decls:1,vars:1,consts:[[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"col-md-5","col-lg-2"],[1,"col-md-6","col-lg-4"],[1,"d-flex","align-items-center"],["id","transFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","transTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-2"],["placeholder","All","styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-5"],["id","playerName","type","text",3,"ngModelChange","ngModel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],[1,"col-md-5","col-lg-4"],["optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-5","col-lg-5"]],template:function(r,a){r&1&&_(0,mh,170,32),r&2&&x(a.filters?0:-1)},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
5203)();function uh(o,d){if(o&1&&(e(0,`
5204            `),n(1,"th"),e(2),i(),e(3,`
5205          `)),o&2){let t=p().$implicit;s(2),I(`
5206              `,t.header,`
5207            `)}}function _h(o,d){if(o&1&&(e(0,`
5208            `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
5209            `),i(),e(5,`
5210          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
5211              `,t.header,`
5212              `),s(),m("field",t.field)}}function xh(o,d){if(o&1&&(e(0,`
5213          `),_(1,uh,4,1)(2,_h,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function gh(o,d){if(o&1&&(e(0,`
5214              `),n(1,"td"),e(2),i(),e(3,`
5215            `)),o&2){let t=p(3);s(2),c(t.totalRegisteredPlayers)}}function fh(o,d){if(o&1&&(e(0,`
5216              `),n(1,"td"),e(2),i(),e(3,`
5217            `)),o&2){let t=p(3);s(2),c(t.totalPlayersCancelled)}}function hh(o,d){if(o&1&&(e(0,`
5218              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5219            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalRevenue))}}function Ch(o,d){if(o&1&&(e(0,`
5220              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5221            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalCheckoutOptionAmount))}}function Sh(o,d){if(o&1&&(e(0,`
5222              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5223            `)),o&2){let t=p(3);s(2),c(E(3,1,-1*t.totalDiscountAmount))}}function yh(o,d){if(o&1&&(e(0,`
5224              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5225            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalKeptCash))}}function bh(o,d){if(o&1&&(e(0,`
5226              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5227            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalKeptCredits))}}function vh(o,d){if(o&1&&(e(0,`
5228              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5229            `)),o&2){let t=p(3);s(2),c(E(3,1,-1*t.totalFinAidAmount))}}function Th(o,d){if(o&1&&(e(0,`
5230              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5231            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalNetRevenue))}}function Eh(o,d){if(o&1&&(e(0,`
5232              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5233            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAdminFee))}}function wh(o,d){if(o&1&&(e(0,`
5234              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5235            `)),o&2){let t=p(3);s(2),c(E(3,1,-1*t.totalFeeAdjustment))}}function Fh(o,d){if(o&1&&(e(0,`
5236              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5237            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalTotalRevenue))}}function Dh(o,d){if(o&1&&(e(0,`
5238              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5239            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalCashPaid))}}function Ih(o,d){if(o&1&&(e(0,`
5240              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5241            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalStoreCreditUsed))}}function Rh(o,d){if(o&1&&(e(0,`
5242              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5243            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountDue))}}function Mh(o,d){if(o&1&&(e(0,`
5244              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5245            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountRefunded))}}function Ah(o,d){if(o&1&&(e(0,`
5246              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5247            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountCredited))}}function Ph(o,d){if(o&1&&(e(0,`
5248              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5249            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalScheduledAmount))}}function Oh(o,d){if(o&1&&(e(0,`
5250              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5251            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalPastDueAmount))}}function Lh(o,d){if(o&1&&(e(0,`
5252                `),n(1,"td"),e(2),i(),e(3,`
5253              `)),o&2){let t=p(4);s(2),c("Total Records: "+(t.totalRecords||0))}}function Nh(o,d){o&1&&(e(0,`
5254                `),g(1,"td"),e(2,`
5255              `))}function Vh(o,d){if(o&1&&(e(0,`
5256              `),_(1,Lh,4,1),_(2,Nh,3,0)),o&2){let t=p().$index;s(),x(t===0?1:-1),s(),x(t>0?2:-1)}}function kh(o,d){if(o&1&&(e(0,`
5257          `),_(1,gh,4,1)(2,fh,4,1)(3,hh,5,3)(4,Ch,5,3)(5,Sh,5,3)(6,yh,5,3)(7,bh,5,3)(8,vh,5,3)(9,Th,5,3)(10,Eh,5,3)(11,wh,5,3)(12,Fh,5,3)(13,D
5257h,5,3)(14,Ih,5,3)(15,Rh,5,3)(16,Mh,5,3)(17,Ah,5,3)(18,Ph,5,3)(19,Oh,5,3)(20,Vh,3,2),e(21,`
5258        `)),o&2){let t,l=d.$implicit;s(),x((t=l.field)==="registeredPlayers"?1:t==="playersCancelled"?2:t==="revenue"?3:t==="checkoutOptionAmount"?4:t==="discountAmount"?5:t==="keptCash"?6:t==="keptCredits"?7:t==="finAidAmount"?8:t==="netRevenue"?9:t==="adminFee"?10:t==="feeAdjustment"?11:t==="totalRevenue"?12:t==="cashPaid"?13:t==="storeCreditUsed"?14:t==="amountDue"?15:t==="amountRefunded"?16:t==="amountCredited"?17:t==="scheduledAmount"?18:t==="pastDueAmount"?19:20)}}function Bh(o,d){if(o&1&&(e(0,`
5259      `),n(1,"tr"),e(2,`
5260        `),N(3,xh,3,1,null,null,W),i(),e(5,`
5261      `),n(6,"tr",5),e(7,`
5262        `),N(8,kh,22,1,null,null,W),i(),e(10,`
5263    `)),o&2){let t=p();s(3),V(t.columns),s(5),V(t.columns)}}function Wh(o,d){if(o&1&&(e(0,`
5264      `),n(1,"tr"),e(2,`
5265        `),n(3,"td"),e(4),i(),e(5,`
5266        `),n(6,"td"),e(7),i(),e(8,`
5267        `),n(9,"td"),e(10),i(),e(11,`
5268        `),n(12,"td"),e(13),i(),e(14,`
5269        `),n(15,"td"),e(16),i(),e(17,`
5270        `),n(18,"td"),e(19),i(),e(20,`
5271        `),n(21,"td"),e(22),i(),e(23,`
5272        `),n(24,"td"),e(25),v(26,"accountingCurrency"),i(),e(27,`
5273        `),n(28,"td"),e(29),v(30,"accountingCurrency"),i(),e(31,`
5274        `),n(32,"td"),e(33),v(34,"accountingCurrency"),i(),n(35,"td"),e(36),v(37,"accountingCurrency"),i(),e(38,`
5275          `),n(39,"td"),e(40),v(41,"accountingCurrency"),i(),e(42,`
5276          `),n(43,"td"),e(44),v(45,"accountingCurrency"),i(),e(46,`
5277          `),n(47,"td"),e(48),v(49,"accountingCurrency"),i(),e(50,`
5278          `),n(51,"td"),e(52),v(53,"accountingCurrency"),i(),e(54,`
5279          `),n(55,"td"),e(56),v(57,"accountingCurrency"),i(),e(58,`
5280          `),n(59,"td"),e(60),v(61,"accountingCurrency"),i(),e(62,`
5281          `),n(63,"td"),e(64),v(65,"accountingCurrency"),i(),e(66,`
5282          `),n(67,"td"),e(68),v(69,"accountingCurrency"),i(),e(70,`
5283          `),n(71,"td"),e(72),v(73,"accountingCurrency"),i(),e(74,`
5284          `),n(75,"td"),e(76),v(77,"accountingCurrency"),i(),e(78,`
5285          `),n(79,"td"),e(80),v(81,"accountingCurrency"),i(),e(82,`
5286          `),n(83,"td"),e(84),v(85,"accountingCurrency"),i(),e(86,`
5287        `),i(),e(87,`
5288      `)),o&2){let t=d.$implicit;s(4),c(t.clubName),s(3),c(t.programTypeName),s(3),c(t.programName),s(3),c(t.teamName),s(3),c(t.coachName),s(3),c(t.registeredPlayers),s(3),c(t.playersCancelled),s(3),c(E(26,23,t.revenue)),s(4),c(E(30,25,t.checkoutOptionAmount)),s(4),I("",E(34,27,-1*t.discountAmount),`
5289          `),s(3),c(E(37,29,t.keptCash)),s(4),c(E(41,31,t.keptCredits)),s(4),c(E(45,33,-1*t.finAidAmount)),s(4),c(E(49,35,t.netRevenue)),s(4),c(E(53,37,t.adminFee)),s(4),c(E(57,39,-1*t.feeAdjustment)),s(4),c(E(61,41,t.totalRevenue)),s(4),c(E(65,43,t.cashPaid)),s(4),c(E(69,45,t.storeCreditUsed)),s(4),c(E(73,47,t.amountRefunded)),s(4),c(E(77,49,t.amountCredited)),s(4),c(E(81,51,t.scheduledAmount)),s(4),c(E(85,53,t.pastDueAmount))}}var kr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"clubName",header:"Club"},{field:"programTypeName",header:"Program Type"},{field:"programName",header:"Program Name"},{field:"teamName",header:"Team Name"},{field:"coachName",header:"Coach Name"},{field:"registeredPlayers",header:"Registered Players (Active)"},{field:"playersCancelled",header:"Players Cancelled"},{field:"revenue",header:"Registration Revenue"},{field:"checkoutOptionAmount",header:"Checkout Option Revenue"},{field:"discountAmount",header:"Discounts"},{field:"keptCash",header:"Forfeited Cash"},{field:"keptCredits",header:"Forfeited Credits"},{field:"finAidAmount",header:"Financial Aid"},{field:"netRevenue",header:"Net Revenue"},{field:"adminFee",header:"Admin Fee"},{field:"feeAdjustment",header:"Fee Adjustment"},{field:"totalRevenue",header:"Total Revenue"},{field:"cashPaid",header:"Paid (Cash)"},{field:"storeCreditUsed",header:"Paid (Credits)"},{field:"amountRefunded",header:"Refunded Registrations (Cash)"},{field:"amountCredited",header:"Refunded Registrations (Credits)"},{field:"scheduledAmount",header:"Scheduled Cash"},{field:"pastDueAmount",header:"Past Due Payments"}]}getReportData(l){this.loading=!0;let r=this.reportService.reportFilters[F.TEAM_FINANCE];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.reportService.getTeamFinanceData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalRegisteredPlayers=a.totalRegisteredPlayers,this.totalPlayersCancelled=a.totalPlayersCancelled,this.totalRevenue=a.totalRevenue,this.totalDiscountAmount=a.totalDiscountAmount,this.totalKeptCash=a.totalKeptCash,this.totalKeptCredits=a.totalKeptCredits,this.totalFinAidAmount=a.totalFinAidAmount,this.totalNetRevenue=a.totalNetRevenue,this.totalAdminFee=a.totalAdminFee,this.totalFeeAdjustment=a.totalFeeAdjustment,this.totalTotalRevenue=a.totalTotalRevenue,this.totalCashPaid=a.totalCashPaid,this.totalStoreCreditUsed=a.totalStoreCreditUsed,this.totalAmountRefunded=a.totalAmountRefunded,this.totalAmountCredited=a.totalAmountCredited,this.totalScheduledAmount=a.totalScheduledAmount,this.totalPastDueAmount=a.totalPastDueAmount,this.totalCheckoutOptionAmount=a.totalCheckoutOptionAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-team-finance-table"]],standalone:!1,decls:11,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","programName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
5290  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
5291    `),R(5,Bh,11,0,"ng-template",3),e(6,`
5292    `),R(7,Wh,88,55,"ng-template",4),e(8,`
5293    `),i(),e(9,`
5294  `),i(),e(10,`
5295`)),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[z,H,$,K,se],encapsulation:2});let o=d;return o}
5295)();function Yh(o,d){if(o&1){let t=D();e(0,`
5296      `),n(1,"div",2),e(2,`
5297        `),n(3,"div",3),e(4,`
5298          `),n(5,"label"),e(6,"Club"),i(),e(7,`
5299          `),n(8,"p-multiSelect",19),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),r.updateRegistrations(),h(r.updateAccountingClassesOptions())}),e(9,`
5300          `),i(),e(10,`
5301        `),i(),e(11,`
5302      `),i(),e(12,`
5303    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} club(s) selected")}}function Gh(o,d){if(o&1){let t=D();e(0,`
5304          `),n(1,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.accountingClasses,r)||(a.filters.accountingClasses=r),h(r)}),e(2,`
5305          `),i(),e(3,`
5306        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.accountingClasses),m("options",t.accountingClasses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.accountingClasses?"All":"Select accounting classes(s)")("selectedItemsLabel","{0} accounting classes selected")}}function jh(o,d){if(o&1){let t=D();e(0,`
5307          `),n(1,"p-multiSelect",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.filterPrograms())}),e(2,`
5308          `),i(),e(3,`
5309        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} program type(s) selected")}}function Hh(o,d){if(o&1){let t=D();e(0,`
5310          `),n(1,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
5311          `),i(),e(3,`
5312        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} program(s) selected")}}function zh(o,d){if(o&1){let t=D();e(0,`
5313      `),n(1,"div",8),e(2,`
5314        `),n(3,"div",3),e(4,`
5315          `),n(5,"label"),e(6,"Revenue Transaction Date"),i(),e(7,`
5316          `),n(8,"span",11)(9,"p-inputgroup"),e(10,`
5317            `),n(11,"p-datepicker",23),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(12,`
5318            `),i(),e(13,`
5319            `),n(14,"p-inputgroup-addon"),e(15,"to"),i(),e(16,`
5320            `),n(17,"p-datepicker",24),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(18,`
5321            `),i(),e(19,`
5322            `),i(),e(20,`
5323            `),n(21,"a",12),T("click",function(){f(t);let r=p(2);return r.filters.regFrom=r.reportService.defaultDate,r.filters.regTo=void 0,h(r.updateRegistrations())}),e(22,`
5324              `),g(23,"i",13),e(24,`
5325            `),i(),e(25,`
5326          `),i(),e(26,`
5327        `),i(),e(27,`
5328      `),i(),e(28,`
5329    `)}if(o&2){let t=p(2);s(11),C("ngModel",t.filters.regFrom),s(6),C("ngModel",t.filters.regTo)}}function qh(o,d){if(o&1){let t=D();e(0,`
5330            `),n(1,"p-datepicker",25,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
5331            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
5332            `),n(7,"p-datepicker",26),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
5333            `),i(),e(9,`
5334          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function $h(o,d){if(o&1){let t=D();e(0,`
5335            `),n(1,"p-datepicker",27),y("ngModelChange",function(r){f(t);let a=p(2);
5335return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
5336            `),i(),e(3,`
5337            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
5338            `),n(7,"p-datepicker",28),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
5339            `),i(),e(9,`
5340          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function Kh(o,d){if(o&1){let t=D();e(0,`
5341      `),n(1,"div",2),e(2,`
5342        `),n(3,"div",3),e(4,`
5343          `),n(5,"label",29),e(6,"Player Last Name"),i(),e(7,`
5344          `),n(8,"input",30),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.playerName,r)||(a.filters.playerName=r),h(r)}),i(),e(9,`
5345        `),i(),e(10,`
5346      `),i(),e(11,`
5347    `)}if(o&2){let t=p(2);s(8),C("ngModel",t.filters.playerName)}}function Jh(o,d){if(o&1){let t=D();e(0,`
5348      `),n(1,"div",4),e(2,`
5349        `),n(3,"div",3),e(4,`
5350          `),n(5,"label"),e(6,"Transaction Type"),i(),e(7,`
5351          `),n(8,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.revenueTransactionTypes,r)||(a.filters.revenueTransactionTypes=r),h(r)}),e(9,`
5352          `),i(),e(10,`
5353        `),i(),e(11,`
5354      `),i(),e(12,`
5355    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.revenueTransactionTypes),m("options",t.revenueTransactionTypes)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} transaction types(s) selected")}}function Xh(o,d){if(o&1){let t=D();e(0,`
5356      `),n(1,"div",31),e(2,`
5357        `),n(3,"div",3),e(4,`
5358          `),n(5,"label"),e(6,"Checkout Option"),i(),e(7,`
5359          `),n(8,"p-multiSelect",32),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.registrationOptions,r)||(a.filters.registrationOptions=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrationOptionValues())}),e(9,`
5360          `),i(),e(10,`
5361        `),i(),e(11,`
5362      `),i(),e(12,`
5363    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptions),m("options",t.registrationOptions)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} checkout options selected")}}function Zh(o,d){if(o&1){let t=D();e(0,`
5364      `),n(1,"div",33),e(2,`
5365        `),n(3,"div",3),e(4,`
5366          `),n(5,"label"),e(6,"Checkout Option Response"),i(),e(7,`
5367          `),n(8,"p-multiSelect",20),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.registrationOptionValues,r)||(a.filters.registrationOptionValues=r),h(r)}),e(9,`
5368          `),i(),e(10,`
5369        `),i(),e(11,`
5370      `),i(),e(12,`
5371    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptionValues),m("options",t.registrationOptionValues)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.registrationOptions?"All":"Select checkout option(s)")("selectedItemsLabel","{0} responses selected")}}function Qh(o,d){if(o&1){let t=D();e(0,`
5372  `),n(1,"div",1),e(2,`
5373    `),_(3,Yh,13,7),n(4,"div",2),e(5,`
5374      `),n(6,"div",3),e(7,`
5375        `),n(8,"label"),e(9,"Accounting Class"),i(),e(10,`
5376        `),_(11,Gh,4,8),i(),e(12,`
5377    `),i(),e(13,`
5378    `),n(14,"div",4),e(15,`
5379      `),n(16,"div",3),e(17,`
5380        `),n(18,"label"),e(19,"Program Type"),i(),e(20,`
5381        `),_(21,jh,4,7),i(),e(22,`
5382    `),i(),e(23,`
5383    `),n(24,"div",2),e(25,`
5384      `),n(26,"div",3),e(27,`
5385        `),n(28,"label"),e(29,"Program"),i(),e(30,`
5386        `),_(31,Hh,4,8),i(),e(32,`
5387    `),i(),e(33,`
5388    `),_(34,zh,29,2),n(35,"div",4),e(36,`
5389      `),n(37,"div",3),e(38,`
5390        `),n(39,"label"),e(40,"Registration"),i(),e(41,`
5391        `),n(42,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(43,`
5392        `),i(),e(44,`
5393      `),i(),e(45,`
5394    `),i(),e(46,`
5395    `),n(47,"div",6),e(48,`
5396      `),n(49,"div",3),e(50,`
5397        `),n(51,"label"),e(52,"Gender"),i(),e(53,`
5398        `),n(54,"p-select",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(55,`
5399      `),i(),e(56,`
5400    `),i(),e(57,`
5401    `),n(58,"div",8),e(59,`
5402      `),n(60,"div",9),e(61,`
5403        `),n(62,"label"),e(63,"Birth Date"),i(),e(64,`
5404        `),n(65,"p-select",10),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(66,`
5405        `),n(67,"span",11)(68,"p-inputgroup"),e(69,`
5406          `),_(70,qh,10,8)(71,$h,10,2),i(),e(72,`
5407          `),n(73,"a",12),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(74,`
5408            `),g(75,"i",13),e(76,`
5409          `),i(),e(77,`
5410        `),i(),e(78,`
5411      `),i(),e(79,`
5412    `),i(),e(80,`
5413    `),n(81,"div",6),e(82,`
5414      `),n(83,"div",3),e(84,`
5415        `),n(85,"label"),e(86,"Test Users/Players"),i(),e(87,`
5416        `),n(88,"p-select",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(89,`
5417        `),i(),e(90,`
5418      `),i(),e(91,`
5419    `),i(),e(92,`
5420    `),n(93,"div",4),e(94,`
5421      `),n(95,"div",3),e(96,`
5422        `),n(97,"label"),e(98,"Season"),i(),e(99,`
5423        `),n(100,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(101,`
5424        `),i(),e(102,`
5425      `),i(),e(103,`
5426    `),i(),e(104,`
5427    `),n(105,"div",4),e(106,`
5428      `),n(107,"div",3),e(108,`
5429        `),n(109,"label"),e(110,"Team"),i(),e(111,`
5430        `),n(112,"p-multiSelect",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(113,`
5431        `),i(),e(114,`
5432      `),i(),e(115,`
5433    `),i(),e(116,`
5434    `),_(117,Kh,12,1),_(118,Jh,13,7),n(119,"div",16),e(120,`
5435      `),n(121,"div",3),e(122,`
5436        `),n(123,"label"),e(124,"Fiscal Year"),i(),e(125,`
5437        `),n(126,"span",11)(127,"p-inputgroup"),e(128,`
5438          `),n(129,"p-datepicker",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(130,`
5439          `),i(),e(131,`
5440          `),n(132,"p-inputgroup-addon"),e(133,"to"),i(),e(134,`
5441          `),n(135,"p-datepicker",18),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(136,`
5442          `),i(),e(137,`
5443          `),i(),e(138,`
5444          `),n(139,"a",12),T("click",function(){f(t);let r=p();return r.filters.dateFrom=void 0,h(r.filters.dateTo=void 0)}),e(140,`
5445            `),g(141,"i",13),e(142,`
5446          `),i(),e(143,`
5447        `),i(),e(144,`
5448      `),i(),e(145,`
5449    `),i(),e(146,`
5450    `),_(147,Xh,13,8),_(148,Zh,13,8),i(),e(149,`
5451`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.accountingClasses?11:-1),s(10),x(t.programTypes?21:-1),s(10),x(t.programs?31:-1),s(3),x(-1),s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registration(s) selected"),s(12),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?70:71),s(18),C("ngModel",t.filters.testUserOption),m("options",t.testPlayersOptions),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} season(s) selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} team(s) selected"),s(5),x(-1),s(),x(-1),s(11),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo),s(12),x(-1),s(),x(-1)}}var Br=(()=>{let d=class d{constructor(l,r,a,b,u,L){this.siteDataService=l,this.reportService=r,this.registrationService=a,this.teamService=b,this.authorizeService=u,this.clubService=L,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testPlayersOptions=[{label:"All",value:""},{label:"Exclude",value:1},{label:"Include",value:2},{label:"Only",value:3}],this.genderOptions=Ae,this.revenueTransactionTypes=zt,this.accountingClasses=[]}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l)}),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(),this.siteDataService.getClubSettings(),this.siteDataService.getClubFieldOptions(),this.clubService.getClubAccountingClasses(void 0)]).subscribe(l=>{if(this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.club=l[3].club,this.clubFieldOptions=l[4],this.accountingClassOptions=l[5],this.reportService.reportFilters[F.TEAM_FINANCE]===void 0&&(this.reportService.reportFilters[F.TEAM_FINANCE]=new P),this.filters=this.reportService.reportFilters[F.TEAM_FINANCE],this.filters.regFrom=void 0,this.reportService.state||(this.filters.programTypes=this.programTypes.filter(r=>r.value===Ne.TEAM)),this.filterPrograms(),this.getTeams(),this.updateRegistrationOptions(),this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID}))),this.programs&&!this.reportService.state){let r=this.programs.find(a=>a.programTypeID===Ne.TEAM);r&&(this.filters.programs=[r||this.programs[0]])}}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.TEAM_FINANCE],this.filters.regFrom=void 0,this.filters.programTypes=this.programTypes.filter(l=>l.value===Ne.TEAM),this.filterPrograms(),this.updateRegistrations()})}filterPrograms(){this.reportService.state&&!this.reportService.state.run&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.TEAM_FINANCE],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypes=this.programTypes.filter(l=>l.value===+this.reportService.state.programTypeID):this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.reportService.state.includeCancelledRegistrations&&(this.filters.includeCancelledRegistrations=!0),this.filters.regFrom=void 0,this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.state.revenueTransactionType&&(this.filters.revenueTransactionTypes=this.revenueTransactionTypes.filter(l=>this.reportService.state.revenueTransactionType.includes(+l.value)))),this.programs=this.reportService.filterPrograms(this.filters)}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>
5451{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state?(this.reportService.state.seasons?this.filters.seasons=this.seasons.filter(r=>this.reportService.state.seasons.includes(r.value)):this.filters.seasons=void 0,this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>r.teamID===this.reportService.state.teamID):this.filters.teams=void 0,this.filters.dobFrom=this.reportService.state.dobFrom?new Date(this.reportService.state.dobFrom):void 0,this.filters.dobTo=this.reportService.state.dobTo?new Date(this.reportService.state.dobTo):void 0,this.filters.genderID=this.reportService.state.genderID,this.updateRegistrations(),this.reportService.state.run&&(this.reportService.showReportData=!0),this.reportService.state=void 0):this.updateRegistrations()}):this.teams=void 0}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}setToDateToEOY(l){return Me(l)}updateAccountingClassesOptions(){this.reportService.clubs&&this.reportService.clubs.length>1&&this.clubService.getClubAccountingClassesForClubs(this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.accountingClassOptions=l,this.accountingClasses=[],this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))})}updateRegistrationOptionValues(){this.filters.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptionValues=l}):this.registrationOptionValues=void 0}updateRegistrationOptions(){this.reportService.getRegistrationOptions(this.filters.registrations,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptions=l})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(Se),w(ve),w(Pe),w(et))},d.\u0275cmp=A({type:d,selectors:[["app-team-finance-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"col-md-5","col-lg-2"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-6","col-lg-4"],["id","dateFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["placeholder","All","optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["o
5451ptionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-5","col-lg-4"],["optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-5","col-lg-5"]],template:function(r,a){r&1&&_(0,Qh,150,41),r&2&&x(a.filters?0:-1)},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
5451)();var tC=o=>["/admin/players",o,"overview"];function iC(o,d){if(o&1&&(e(0,`
5452            `),n(1,"th"),e(2),i(),e(3,`
5453          `)),o&2){let t=p().$implicit;s(2),I(`
5454              `,t.header,`
5455            `)}}function nC(o,d){if(o&1&&(e(0,`
5456            `),n(1,"th",6),e(2),g(3,"p-sortIcon",7),e(4,`
5457            `),i(),e(5,`
5458          `)),o&2){let t=p().$implicit,l=p(2);s(),m("pSortableColumn",t.field),J("aria-label",l.AriaLabels.ACTIVATE_SORT),s(),I(`
5459              `,t.header,`
5460              `),s(),m("field",t.field)}}function oC(o,d){if(o&1&&(e(0,`
5461          `),_(1,iC,4,1)(2,nC,6,4)),o&2){let t=d.$implicit;s(),x(t.notSortable===!0?1:2)}}function rC(o,d){if(o&1&&(e(0,`
5462              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5463            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalRevenue))}}function aC(o,d){if(o&1&&(e(0,`
5464              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5465            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalCheckoutOptionAmount))}}function lC(o,d){if(o&1&&(e(0,`
5466              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5467            `)),o&2){let t=p(3);s(2),c(E(3,1,-1*t.totalDiscountAmount))}}function sC(o,d){if(o&1&&(e(0,`
5468              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5469            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalKeptCash))}}function dC(o,d){if(o&1&&(e(0,`
5470              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5471            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalKeptCredits))}}function pC(o,d){if(o&1&&(e(0,`
5472              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5473            `)),o&2){let t=p(3);s(2),c(E(3,1,-1*t.totalFinAidAmount))}}function mC(o,d){if(o&1&&(e(0,`
5474              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5475            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalNetRevenue))}}function cC(o,d){if(o&1&&(e(0,`
5476              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5477            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAdminFee))}}function uC(o,d){if(o&1&&(e(0,`
5478              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5479            `)),o&2){let t=p(3);s(2),c(E(3,1,-1*t.totalFeeAdjustment))}}function _C(o,d){if(o&1&&(e(0,`
5480              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5481            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalTotalRevenue))}}function xC(o,d){if(o&1&&(e(0,`
5482              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5483            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalCashPaid))}}function gC(o,d){if(o&1&&(e(0,`
5484              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5485            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalStoreCreditUsed))}}function fC(o,d){if(o&1&&(e(0,`
5486              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5487            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountDue))}}function hC(o,d){if(o&1&&(e(0,`
5488              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5489            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountRefunded))}}function CC(o,d){if(o&1&&(e(0,`
5490              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5491            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalAmountCredited))}}function SC(o,d){if(o&1&&(e(0,`
5492              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5493            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalScheduledAmount))}}function yC(o,d){if(o&1&&(e(0,`
5494              `),n(1,"td"),e(2),v(3,"accountingCurrency"),i(),e(4,`
5495            `)),o&2){let t=p(3);s(2),c(E(3,1,t.totalPastDueAmount))}}function bC(o,d){if(o&1&&(e(0,`
5496                `),n(1,"td"),e(2),i(),e(3,`
5497              `)),o&2){let t=p(4);s(2),c("Total Records: "+(t.totalRecords||0))}}function vC(o,d){o&1&&(e(0,`
5498                `),g(1,"td"),e(2,`
5499              `))}function TC(o,d){if(o&1&&(e(0,`
5500              `),_(1,bC,4,1),_(2,vC,3,0)),o&2){let t=p().$index;s(),x(t===0?1:-1),s(),x(t>0?2:-1)}}function EC(o,d){if(o&1&&(e(0,`
5501          `),_(1,rC,5,3)(2,aC,5,3)(3,lC,5,3)(4,sC,5,3)(5,dC,5,3)(6,pC,5,3)(7,mC,5,3)(8,cC,5,3)(9,uC,5,3)(10,_C,5,3)(11,xC,5,3)(12,gC,5,3)(13,fC,5,3)(14,hC,5,3)(15,CC,5,3)(16,SC,5,3)(17,yC,5,3)(18,TC,3,2),e(19,`
5502        `)),o&2){let t,l=d.$implicit;s(),x((t=l.field)==="revenue"?1:t==="checkoutOptionAmount"?2:t==="discountAmount"?3:t==="keptCash"?4:t==="keptCredits"?5:t==="finAidAmount"?6:t==="netRevenue"?7:t==="adminFee"?8:t==="feeAdjustment"?9:t==="totalRevenue"?10:t==="cashPaid"?11:t==="storeCreditUsed"?12:t==="amountDue"?13:t==="amountRefunded"?14:t==="amountCredited"?15:t==="scheduledAmount"?16:t==="pastDueAmount"?17:18)}}function wC(o,d){if(o&1&&(e(0,`
5503      `),n(1,"tr"),e(2,`
5504        `),N(3,oC,3,1,null,null,W),i(),e(5,`
5505      `),n(6,"tr",5),e(7,`
5506        `),N(8,EC,20,1,null,null,W),i(),e(10,`
5507    `)),o&2){let t=p();s(3),V(t.columns),s(5),V(t.columns)}}function FC(o,d){if(o&1&&(e(0,`
5508            `),n(1,"a",8),e(2),i(),e(3,`
5509          `)),o&2){let t=p().$implicit;s(),m("routerLink",re(2,tC,t.playerID)),s(),c(t.playerName)}}function DC(o,d){if(o&1&&e(0),o&2){let t=p().$implicit;I(`
5510            `,t.playerName,`
5511          `)}}function IC(o,d){if(o&1&&(e(0,`
5512          `),n(1,"td"),e(2),i(),e(3,`
5513        `)),o&2){let t=p().$implicit;s(2),c(t.paymentsCompletedCount>=t.paymentsTotalCount?"Paid In Full":"Paid "+t.paymentsCompletedCount+" of "+t.paymentsTotalCount+" Installments")}}function RC(o,d){if(o&1&&(e(0,`
5514          `),n(1,"td"),e(2),v(3,"utcDate"),i(),e(4,`
5515        `)),o&2){let t=p().$implicit;s(2),I("Cancelled ",B(3,1,t.cancelledOn,"short"))}}function MC(o,d){if(o&1&&(e(0,`
5516      `),n(1,"tr"),e(2,`
5517        `),n(3,"td"),e(4),i(),e(5,`
5518        `),n(6,"td"),e(7),i(),e(8,`
5519        `),n(9,"td"),e(10),i(),e(11,`
5520        `),n(12,"td"),e(13),i(),e(14,`
5521        `),n(15,"td"),e(16),i(),e(17,`
5522        `),n(18,"td"),e(19,`
5523          `),_(20,FC,4,4)(21,DC,1,1),i(),e(22,`
5524        `),n(23,"td"),e(24),v(25,"utcDate"),i(),e(26,`
5525        `),_(27,IC,4,1),_(28,RC,5,4),n(29,"td"),e(30),v(31,"accountingCurrency"),i(),e(32,`
5526        `),n(33,"td"),e(34),v(35,"accountingCurrency"),i(),e(36,`
5527        `),n(37,"td"),e(38),v(39,"accountingCurrency"),i(),n(40,"td"),e(41),v(42,"accountingCurrency"),i(),e(43,`
5528          `),n(44,"td"),e(45),v(46,"accountingCurrency"),i(),e(47,`
5529          `),n(48,"td"),e(49),v(50,"accountingCurrency"),i(),e(51,`
5530          `),n(52,"td"),e(53),v(54,"accountingCurrency"),i(),e(55,`
5531          `),n(56,"td"),e(57),v(58,"accountingCurrency"),i(),e(59,`
5532          `),n(60,"td"),e(61),v(62,"accountingCurrency"),i(),e(63,`
5533          `),n(64,"td"),e(65),v(66,"accountingCurrency"),i(),e(67,`
5534          `),n(68,"td"),e(69),v(70,"accountingCurrency"),i(),e(71,`
5535          `),n(72,"td"),e(73),v(74,"accountingCurrency"),i(),e(75,`
5536          `),n(76,"td"),e(77),v(78,"accountingCurrency"),i(),e(79,`
5537          `),n(80,"td"),e(81),v(82,"accountingCurrency"),i(),e(83,`
5538          `),n(84,"td"),e(85),v(86,"accountingCurrency"),i(),e(87,`
5539          `),n(88,"td"),e(89),v(90,"accountingCurrency"),i(),e(91,`
5540        `),i(),e(92,`
5541      `)),o&2){let t=d.$implicit,l=p();s(4),c(t.clubName),s(3),c(t.programTypeName),s(3),c(t.programName),s(3),c(t.teamName),s(3),c(t.coachName),s(4),x(l.reportService.profile[l.Permission.Profile]?20:21),s(4),c(B(25,25,t.completedDate,"short")),s(3),x(t.isCurrentlyCancelled?-1:27),s(),x(t.
5541isCurrentlyCancelled?28:-1),s(2),c(E(31,28,t.revenue)),s(4),c(E(35,30,t.checkoutOptionAmount)),s(4),I("",E(39,32,-1*t.discountAmount),`
5542          `),s(3),c(E(42,34,t.keptCash)),s(4),c(E(46,36,t.keptCredits)),s(4),c(E(50,38,-1*t.finAidAmount)),s(4),c(E(54,40,t.netRevenue)),s(4),c(E(58,42,t.adminFee)),s(4),c(E(62,44,-1*t.feeAdjustment)),s(4),c(E(66,46,t.totalRevenue)),s(4),c(E(70,48,t.cashPaid)),s(4),c(E(74,50,t.storeCreditUsed)),s(4),c(E(78,52,t.amountRefunded)),s(4),c(E(82,54,t.amountCredited)),s(4),c(E(86,56,t.scheduledAmount)),s(4),c(E(90,58,t.pastDueAmount))}}var Wr=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.AriaLabels=X,this.loading=!0,this.showClubName=!1,this.Permission=ee}ngOnInit(){this.columns=this.getReportColumns(),this.runSubscription$=this.reportService.runReport.subscribe(()=>{this.loading||this.getReportData(null)})}getReportColumns(){return[{field:"clubName",header:"Club"},{field:"programTypeName",header:"Program Type"},{field:"programName",header:"Program Name"},{field:"teamName",header:"Team Name"},{field:"coachName",header:"Coach Name"},{field:"playerName",header:"Player Name"},{field:"completedDate",header:"Latest Registration Date"},{field:"paymentsTotalCount",header:"Payment Status"},{field:"revenue",header:"Registration Revenue"},{field:"checkoutOptionAmount",header:"Checkout Option Revenue"},{field:"discountAmount",header:"Discounts"},{field:"keptCash",header:"Forfeited Cash"},{field:"keptCredits",header:"Forfeited Credits"},{field:"finAidAmount",header:"Financial Aid"},{field:"netRevenue",header:"Net Revenue"},{field:"adminFee",header:"Admin Fee"},{field:"feeAdjustment",header:"Fee Adjustment"},{field:"totalRevenue",header:"Total Revenue"},{field:"cashPaid",header:"Paid (Cash)"},{field:"storeCreditUsed",header:"Paid (Credits)"},{field:"amountRefunded",header:"Refunded Registrations (Cash)"},{field:"amountCredited",header:"Refunded Registrations (Credits)"},{field:"scheduledAmount",header:"Scheduled Cash"},{field:"pastDueAmount",header:"Past Due Payments"}]}getReportData(l){this.loading=!0;let r=this.reportService.reportFilters[F.TEAM_FINANCE_DETAILS];l&&l.sortField?(r.orderBy=l.sortField+" "+(l.sortOrder===1?"ASC":"DESC"),r.page=l.first/r.rows+1):r.page=1,this.reportService.getTeamFinanceDetailsData().subscribe(a=>{this.reportData=a.results,this.totalRecords=a.totalRows,this.totalRevenue=a.totalRevenue,this.totalDiscountAmount=a.totalDiscountAmount,this.totalKeptCash=a.totalKeptCash,this.totalKeptCredits=a.totalKeptCredits,this.totalFinAidAmount=a.totalFinAidAmount,this.totalNetRevenue=a.totalNetRevenue,this.totalAdminFee=a.totalAdminFee,this.totalFeeAdjustment=a.totalFeeAdjustment,this.totalTotalRevenue=a.totalTotalRevenue,this.totalCashPaid=a.totalCashPaid,this.totalStoreCreditUsed=a.totalStoreCreditUsed,this.totalAmountRefunded=a.totalAmountRefunded,this.totalAmountCredited=a.totalAmountCredited,this.totalScheduledAmount=a.totalScheduledAmount,this.totalPastDueAmount=a.totalPastDueAmount,this.totalCheckoutOptionAmount=a.totalCheckoutOptionAmount,this.loading=!1},()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")})}ngOnDestroy(){this.runSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-team-finance-details-table"]],standalone:!1,decls:10,vars:8,consts:[["reportTable",""],[1,"report-table","table-responsive"],["responsiveLayout","scroll","sortField","playerName","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","totalRecords","rows","loading"],["pTemplate","header"],["pTemplate","body"],[1,"total-table-body"],[3,"pSortableColumn"],[3,"field"],[3,"routerLink"]],template:function(r,a){r&1&&(n(0,"div",1),e(1,`
5543  `),n(2,"p-table",2,0),T("onLazyLoad",function(u){return a.getReportData(u)}),e(4,`
5544    `),R(5,wC,11,0,"ng-template",3),e(6,`
5545    `),R(7,MC,93,60,"ng-template",4),e(8,`
5546    `),i(),e(9,`
5547  `),i()),r&2&&(s(2),m("columns",a.columns)("value",a.reportData)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",a.totalRecords)("rows",100)("loading",a.loading))},dependencies:[pe,z,H,$,K,Ce,se],encapsulation:2});let o=d;return o}
5547)();function PC(o,d){if(o&1){let t=D();e(0,`
5548      `),n(1,"div",2),e(2,`
5549        `),n(3,"div",3),e(4,`
5550          `),n(5,"label"),e(6,"Club"),i(),e(7,`
5551          `),n(8,"p-multiSelect",21),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.clubs,r)||(a.filters.clubs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return r.filterPrograms(),r.updateRegistrations(),h(r.updateAccountingClassesOptions())}),e(9,`
5552          `),i(),e(10,`
5553        `),i(),e(11,`
5554      `),i(),e(12,`
5555    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.clubs),m("options",t.reportService.clubs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} club(s) selected")}}function OC(o,d){if(o&1){let t=D();e(0,`
5556          `),n(1,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.accountingClasses,r)||(a.filters.accountingClasses=r),h(r)}),e(2,`
5557          `),i(),e(3,`
5558        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.accountingClasses),m("options",t.accountingClasses)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.accountingClasses?"All":"Select accounting classes(s)")("selectedItemsLabel","{0} accounting classes selected")}}function LC(o,d){if(o&1){let t=D();e(0,`
5559          `),n(1,"p-multiSelect",23),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programTypes,r)||(a.filters.programTypes=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.filterPrograms())}),e(2,`
5560          `),i(),e(3,`
5561        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programTypes),m("options",t.programTypes)("showToggleAll",!0)("filter",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} program type(s) selected")}}function NC(o,d){if(o&1){let t=D();e(0,`
5562          `),n(1,"p-multiSelect",24),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.programs,r)||(a.filters.programs=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(2,`
5563          `),i(),e(3,`
5564        `)}if(o&2){let t=p(2);s(),m("autofocusFilter",!0),C("ngModel",t.filters.programs),m("options",t.programs)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} program(s) selected")}}function VC(o,d){if(o&1){let t=D();e(0,`
5565      `),n(1,"div",8),e(2,`
5566        `),n(3,"div",3),e(4,`
5567          `),n(5,"label"),e(6,"Revenue Transaction Date"),i(),e(7,`
5568          `),n(8,"span",11)(9,"p-inputgroup"),e(10,`
5569            `),n(11,"p-datepicker",25),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.regFrom,r)||(a.filters.regFrom=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(12,`
5570            `),i(),e(13,`
5571            `),n(14,"p-inputgroup-addon"),e(15,"to"),i(),e(16,`
5572            `),n(17,"p-datepicker",26),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.regTo,r)||(a.filters.regTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.updateRegistrations())}),e(18,`
5573            `),i(),e(19,`
5574            `),i(),e(20,`
5575            `),n(21,"a",12),T("click",function(){f(t);let r=p(2);return r.filters.regFrom=r.reportService.defaultDate,r.filters.regTo=void 0,h(r.updateRegistrations())}),e(22,`
5576              `),g(23,"i",13),e(24,`
5577            `),i(),e(25,`
5578          `),i(),e(26,`
5579        `),i(),e(27,`
5580      `),i(),e(28,`
5581    `)}if(o&2){let t=p(2);s(11),C("ngModel",t.filters.regFrom),s(6),C("ngModel",t.filters.regTo)}}function kC(o,d){if(o&1){let t=D();e(0,`
5582            `),n(1,"p-datepicker",27,0),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),i(),e(3,`
5583            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
5584            `),n(7,"p-datepicker",28),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),T("onSelect",function(){f(t);let r=p(2);return h(r.filters.dobTo=r.setToDateToEOY(r.filters.dobTo))}),e(8,`
5585            `),i(),e(9,`
5586          `)}if(o&2){let t=ue(2),l=p(2);s(),C("ngModel",l.filters.dobFrom),m("defaultDate",l.minBirthYear)("minDate",l.minBirthYear)("maxDate",l.maxBirthYear),s(6),C("ngModel",l.filters.dobTo),m("defaultDate",l.minBirthYear)("minDate",t.value?t.value:l.minBirthYear)("maxDate",l.maxBirthYear)}}function BC(o,d){if(o&1){let t=D();e(0,`
5587            `),n(1,"p-datepicker",29),y("ngModelChange",function(r){f(t);let a=p(2);
5587return S(a.filters.dobFrom,r)||(a.filters.dobFrom=r),h(r)}),e(2,`
5588            `),i(),e(3,`
5589            `),n(4,"p-inputgroup-addon"),e(5,"to"),i(),e(6,`
5590            `),n(7,"p-datepicker",30),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.dobTo,r)||(a.filters.dobTo=r),h(r)}),e(8,`
5591            `),i(),e(9,`
5592          `)}if(o&2){let t=p(2);s(),C("ngModel",t.filters.dobFrom),s(6),C("ngModel",t.filters.dobTo)}}function WC(o,d){if(o&1){let t=D();e(0,`
5593      `),n(1,"div",4),e(2,`
5594        `),n(3,"div",3),e(4,`
5595          `),n(5,"label"),e(6,"Transaction Type"),i(),e(7,`
5596          `),n(8,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.revenueTransactionTypes,r)||(a.filters.revenueTransactionTypes=r),h(r)}),e(9,`
5597          `),i(),e(10,`
5598        `),i(),e(11,`
5599      `),i(),e(12,`
5600    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.revenueTransactionTypes),m("options",t.revenueTransactionTypes)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} transaction types(s) selected")}}function UC(o,d){if(o&1){let t=D();e(0,`
5601      `),n(1,"div",31),e(2,`
5602        `),n(3,"div",3),e(4,`
5603          `),n(5,"label"),e(6,"Checkout Option"),i(),e(7,`
5604          `),n(8,"p-multiSelect",32),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.registrationOptions,r)||(a.filters.registrationOptions=r),h(r)}),T("onChange",function(){f(t);let r=p(2);return h(r.updateRegistrationOptionValues())}),e(9,`
5605          `),i(),e(10,`
5606        `),i(),e(11,`
5607      `),i(),e(12,`
5608    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptions),m("options",t.registrationOptions)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} checkout options selected")}}function YC(o,d){if(o&1){let t=D();e(0,`
5609      `),n(1,"div",33),e(2,`
5610        `),n(3,"div",3),e(4,`
5611          `),n(5,"label"),e(6,"Checkout Option Response"),i(),e(7,`
5612          `),n(8,"p-multiSelect",22),y("ngModelChange",function(r){f(t);let a=p(2);return S(a.filters.registrationOptionValues,r)||(a.filters.registrationOptionValues=r),h(r)}),e(9,`
5613          `),i(),e(10,`
5614        `),i(),e(11,`
5615      `),i(),e(12,`
5616    `)}if(o&2){let t=p(2);s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrationOptionValues),m("options",t.registrationOptionValues)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.registrationOptions?"All":"Select checkout option(s)")("selectedItemsLabel","{0} responses selected")}}function GC(o,d){if(o&1){let t=D();e(0,`
5617  `),n(1,"div",1),e(2,`
5618    `),_(3,PC,13,7),n(4,"div",2),e(5,`
5619      `),n(6,"div",3),e(7,`
5620        `),n(8,"label"),e(9,"Accounting Class"),i(),e(10,`
5621        `),_(11,OC,4,8),i(),e(12,`
5622    `),i(),e(13,`
5623    `),n(14,"div",4),e(15,`
5624      `),n(16,"div",3),e(17,`
5625        `),n(18,"label"),e(19,"Program Type"),i(),e(20,`
5626        `),_(21,LC,4,7),i(),e(22,`
5627    `),i(),e(23,`
5628    `),n(24,"div",2),e(25,`
5629      `),n(26,"div",3),e(27,`
5630        `),n(28,"label"),e(29,"Program"),i(),e(30,`
5631        `),_(31,NC,4,8),i(),e(32,`
5632    `),i(),e(33,`
5633    `),_(34,VC,29,2),n(35,"div",4),e(36,`
5634      `),n(37,"div",3),e(38,`
5635        `),n(39,"label"),e(40,"Registration"),i(),e(41,`
5636        `),n(42,"p-multiSelect",5),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.registrations,r)||(a.filters.registrations=r),h(r)}),e(43,`
5637        `),i(),e(44,`
5638      `),i(),e(45,`
5639    `),i(),e(46,`
5640    `),n(47,"div",6),e(48,`
5641      `),n(49,"div",3),e(50,`
5642        `),n(51,"label"),e(52,"Gender"),i(),e(53,`
5643        `),n(54,"p-select",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.genderID,r)||(a.filters.genderID=r),h(r)}),i(),e(55,`
5644      `),i(),e(56,`
5645    `),i(),e(57,`
5646    `),n(58,"div",8),e(59,`
5647      `),n(60,"div",9),e(61,`
5648        `),n(62,"label"),e(63,"Birth Date"),i(),e(64,`
5649        `),n(65,"p-select",10),T("onChange",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dobType,r)||(a.filters.dobType=r),h(r)}),i(),e(66,`
5650        `),n(67,"span",11)(68,"p-inputgroup"),e(69,`
5651          `),_(70,kC,10,8)(71,BC,10,2),i(),e(72,`
5652          `),n(73,"a",12),T("click",function(){f(t);let r=p();return r.filters.dobFrom=void 0,h(r.filters.dobTo=void 0)}),e(74,`
5653            `),g(75,"i",13),e(76,`
5654          `),i(),e(77,`
5655        `),i(),e(78,`
5656      `),i(),e(79,`
5657    `),i(),e(80,`
5658    `),n(81,"div",6),e(82,`
5659      `),n(83,"div",3),e(84,`
5660        `),n(85,"label"),e(86,"Test Users/Players"),i(),e(87,`
5661        `),n(88,"p-select",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.testUserOption,r)||(a.filters.testUserOption=r),h(r)}),e(89,`
5662        `),i(),e(90,`
5663      `),i(),e(91,`
5664    `),i(),e(92,`
5665    `),n(93,"div",4),e(94,`
5666      `),n(95,"div",3),e(96,`
5667        `),n(97,"label"),e(98,"Season"),i(),e(99,`
5668        `),n(100,"p-multiSelect",14),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.seasons,r)||(a.filters.seasons=r),h(r)}),e(101,`
5669        `),i(),e(102,`
5670      `),i(),e(103,`
5671    `),i(),e(104,`
5672    `),n(105,"div",4),e(106,`
5673      `),n(107,"div",3),e(108,`
5674        `),n(109,"label"),e(110,"Team"),i(),e(111,`
5675        `),n(112,"p-multiSelect",15),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.teams,r)||(a.filters.teams=r),h(r)}),e(113,`
5676        `),i(),e(114,`
5677      `),i(),e(115,`
5678    `),i(),e(116,`
5679    `),n(117,"div",2),e(118,`
5680      `),n(119,"div",3),e(120,`
5681        `),n(121,"label",16),e(122,"Player Last Name"),i(),e(123,`
5682        `),n(124,"input",17),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.playerName,r)||(a.filters.playerName=r),h(r)}),i(),e(125,`
5683      `),i(),e(126,`
5684    `),i(),e(127,`
5685    `),_(128,WC,13,7),n(129,"div",18),e(130,`
5686      `),n(131,"div",3),e(132,`
5687        `),n(133,"label"),e(134,"Fiscal Year"),i(),e(135,`
5688        `),n(136,"span",11)(137,"p-inputgroup"),e(138,`
5689          `),n(139,"p-datepicker",19),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateFrom,r)||(a.filters.dateFrom=r),h(r)}),e(140,`
5690          `),i(),e(141,`
5691          `),n(142,"p-inputgroup-addon"),e(143,"to"),i(),e(144,`
5692          `),n(145,"p-datepicker",20),y("ngModelChange",function(r){f(t);let a=p();return S(a.filters.dateTo,r)||(a.filters.dateTo=r),h(r)}),e(146,`
5693          `),i(),e(147,`
5694          `),i(),e(148,`
5695          `),n(149,"a",12),T("click",function(){f(t);let r=p();return r.filters.dateFrom=void 0,h(r.filters.dateTo=void 0)}),e(150,`
5696            `),g(151,"i",13),e(152,`
5697          `),i(),e(153,`
5698        `),i(),e(154,`
5699      `),i(),e(155,`
5700    `),i(),e(156,`
5701    `),_(157,UC,13,8),_(158,YC,13,8),i(),e(159,`
5702`)}if(o&2){let t=p();s(3),x(t.reportService.clubs&&t.reportService.clubs.length>1?3:-1),s(8),x(t.accountingClasses?11:-1),s(10),x(t.programTypes?21:-1),s(10),x(t.programs?31:-1),s(3),x(-1),s(8),m("autofocusFilter",!0),C("ngModel",t.filters.registrations),m("options",t.registrations)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.filters.programs?"All":"Select program(s)")("selectedItemsLabel","{0} registration(s) selected"),s(12),C("ngModel",t.filters.genderID),m("options",t.genderOptions),s(11),m("options",t.yearTypes),C("ngModel",t.filters.dobType),s(5),x(t.filters.dobType===1?70:71),s(18),C("ngModel",t.filters.testUserOption),m("options",t.testPlayersOptions),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.seasons),m("options",t.seasons)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("selectedItemsLabel","{0} season(s) selected"),s(12),m("autofocusFilter",!0),C("ngModel",t.filters.teams),m("options",t.teams)("filter",!0)("showToggleAll",!0)("maxSelectedLabels",1)("placeholder",t.programs?"All":"Select club(s)")("selectedItemsLabel","{0} team(s) selected"),s(12),C("ngModel",t.filters.playerName),s(4),x(-1),s(11),C("ngModel",t.filters.dateFrom),s(6),C("ngModel",t.filters.dateTo),s(12),x(-1),s(),x(-1)}}var Ur=(()=>{let d=class d{constructor(l,r,a,b,u,L){this.siteDataService=l,this.reportService=r,this.registrationService=a,this.teamService=b,this.authorizeService=u,this.clubService=L,this.minBirthYear=Ie,this.maxBirthYear=Re,this.testPlayersOptions=[{label:"All",value:""},{label:"Exclude",value:1},{label:"Include",value:2},{label:"Only",value:3}],this.genderOptions=Ae,this.revenueTransactionTypes=zt,this.accountingClasses=[]}ngOnInit(){this.dobSelect=this.reportService.dobYears(),this.yearTypes=this.reportService.yearTypes(),this.authorizeService.getUser().subscribe(l=>{l&&(this.profile=l)}),oe([this.reportService.getPrograms(),this.registrationService.getRegistrationSeasons(),this.reportService.getProgramTypes(),this.siteDataService.getClubSettings(),this.siteDataService.getClubFieldOptions(),this.clubService.getClubAccountingClasses(void 0)]).subscribe(l=>{if(this.reportService.programs=l[0],this.seasons=l[1],this.programTypes=l[2],this.club=l[3].club,this.clubFieldOptions=l[4],this.accountingClassOptions=l[5],this.reportService.reportFilters[F.TEAM_FINANCE_DETAILS]===void 0&&(this.reportService.reportFilters[F.TEAM_FINANCE_DETAILS]=new P),this.filters=this.reportService.reportFilters[F.TEAM_FINANCE_DETAILS],this.filters.regFrom=void 0,this.reportService.state||(this.filters.programTypes=this.programTypes.filter(r=>r.value===Ne.TEAM)),this.filterPrograms(),this.getTeams(),this.updateRegistrationOptions(),this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID}))),this.programs&&!this.reportService.state){let r=this.programs.find(a=>a.programTypeID===Ne.TEAM);r&&(this.filters.programs=[r||this.programs[0]])}}),this.clearSubscription$=this.reportService.clearFilters.subscribe(()=>{this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.TEAM_FINANCE_DETAILS],this.filters.regFrom=void 0,this.filters.programTypes=this.programTypes.filter(l=>l.value===Ne.TEAM),this.filterPrograms(),this.updateRegistrations()})}filterPrograms(){this.reportService.state&&!this.reportService.state.run&&(this.reportService.reportFilters[this.reportService.reportType]=new P,this.filters=this.reportService.reportFilters[F.TEAM_FINANCE_DETAILS],this.reportService.state.clubID&&this.reportService.clubs?.length>0&&(this.filters.clubs=[this.reportService.clubs.find(l=>l.clubID===this.reportService.state.clubID)]),this.reportService.state.programTypeID?this.filters.programTypes=this.programTypes.filter(l=>l.value===+this.reportService.state.programTypeID):this.reportService.state.programs?this.filters.programs=this.reportService.programs.filter(l=>this.reportService.state.programs.includes(l.programID)):(this.filters.programs=void 0,this.filters.programTypes=void 0),this.reportService.state.includeCancelledRegistrations&&(this.filters.includeCancelledRegistrations=!0),this.filters.regFrom=void 0,this.filters.dateFrom=this.reportService.state.dateFrom?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.reportService.state.revenueTransactionType&&(this.filters.revenueTransactionTypes=this.revenueTransactionTypes.filter(l=>this.reportService.state.revenueTransactionType.includes(+l.value)))),this.programs=this.reportService.filterPrograms(this.filters)}getTeams(){this.filters.clubs||this.reportService.clubs.length===1?this.teamService.getTeams(this.filters.clubs?this.filters.clubs:[this.reportService.clubs[0]]).subscribe(l=>
5702{this.teams=l,this.teams.forEach(r=>{this.filters.clubs?.length>1?r.displayName=`${this.filters.clubs.find(a=>a.clubID===r.clubID).name} - ${r.name}`:r.displayName=r.name}),this.reportService.state?(this.reportService.state.seasons?this.filters.seasons=this.seasons.filter(r=>this.reportService.state.seasons.includes(r.value)):this.filters.seasons=void 0,this.reportService.state.teamID?this.filters.teams=this.teams.filter(r=>r.teamID===this.reportService.state.teamID):this.filters.teams=void 0,this.filters.dateFrom=this.reportService.state.dateFrom&&this.reportService.state.dateFrom!=="1/1/1900"?new Date(this.reportService.state.dateFrom):void 0,this.filters.dateTo=this.reportService.state.dateTo?new Date(this.reportService.state.dateTo):void 0,this.filters.dobFrom=this.reportService.state.dobFrom?new Date(this.reportService.state.dobFrom):void 0,this.filters.dobTo=this.reportService.state.dobTo?new Date(this.reportService.state.dobTo):void 0,this.filters.genderID=this.reportService.state.genderID,this.updateRegistrations(),this.reportService.state.run&&(this.reportService.showReportData=!0),this.reportService.state=void 0):this.updateRegistrations()}):this.teams=void 0}updateRegistrations(){this.filters.programs?this.registrationService.getFilteredRegistrations(this.filters.programs.map(l=>l.programID),this.filters.regFrom,this.filters.regTo).subscribe(l=>{this.registrations=l,this.filters.registrations=this.filters.registrations?.filter(r=>this.registrations.find(a=>a.registrationID===r.registrationID))}):this.registrations=void 0}setToDateToEOY(l){return Me(l)}updateAccountingClassesOptions(){this.reportService.clubs&&this.reportService.clubs.length>1&&this.clubService.getClubAccountingClassesForClubs(this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.accountingClassOptions=l,this.accountingClasses=[],this.accountingClasses.push(...this.accountingClassOptions.map(r=>({label:r.accountingClassName,value:r.clubAccountingClassID})))})}updateRegistrationOptionValues(){this.filters.registrationOptions?this.reportService.getRegistrationOptionsValues(this.filters.registrationOptions,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptionValues=l}):this.registrationOptionValues=void 0}updateRegistrationOptions(){this.reportService.getRegistrationOptions(this.filters.registrations,this.filters.clubs.map(l=>l.clubID)).subscribe(l=>{this.registrationOptions=l})}ngOnDestroy(){this.clearSubscription$.unsubscribe()}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(Se),w(ve),w(Pe),w(et))},d.\u0275cmp=A({type:d,selectors:[["app-team-finance-details-filters"]],standalone:!1,decls:1,vars:1,consts:[["dobFromInput",""],[1,"row"],[1,"col-md-5","col-lg-3"],[1,"form-group"],[1,"col-md-5","col-lg-2"],["optionLabel","name","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-2"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-6","col-lg-3"],[1,"form-group","form-group--birthday-range"],["optionLabel","name","optionValue","value","styleClass","birthday-range-frequency","appendTo","body",3,"onChange","ngModelChange","options","ngModel"],[1,"d-flex","align-items-center"],[1,"resetBtn",3,"click"],[1,"far","fa-redo-alt"],["optionLabel","label","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["for","playerLastName"],["id","playerLastName","type","text",3,"ngModelChange","ngModel"],[1,"col-md-6","col-lg-4"],["id","dateFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dateTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel"],["o
5702ptionLabel","label","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["placeholder","All","optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","showToggleAll","filter","maxSelectedLabels","selectedItemsLabel"],["optionLabel","displayName","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],["id","regFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["id","regTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","onSelect","ngModel"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","ngModel","defaultDate","minDate","maxDate"],["view","year","dateFormat","yy","styleClass","birthday-range-start","inputId","yearpicker","appendTo","body",3,"ngModelChange","onSelect","ngModel","defaultDate","minDate","maxDate"],["id","dobFrom","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],["id","dobTo","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"ngModelChange","ngModel"],[1,"col-md-5","col-lg-4"],["optionLabel","label","appendTo","body",3,"ngModelChange","onChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels","placeholder","selectedItemsLabel"],[1,"col-md-5","col-lg-5"]],template:function(r,a){r&1&&_(0,GC,160,41),r&2&&x(a.filters?0:-1)},dependencies:[fe,U,Y,ie,ne,te,q,Q],encapsulation:2});let o=d;return o}
5702)();var Yr=(o,d,t)=>[o,d,t],HC=o=>({"align-right":o});function zC(o,d){o&1&&(e(0,`
5703                            `),n(1,"app-pill",16),e(2,"Custom"),i(),e(3,`
5704                        `))}function qC(o,d){if(o&1&&(e(0,`
5705                    `),n(1,"div",14),e(2,`
5706                        `),n(3,"span",15),e(4),i(),e(5,`
5707                        `),_(6,zC,4,0),i(),e(7,`
5708                `)),o&2){let t=d.$implicit;s(4),c(t.label),s(2),x(t.isCustom?6:-1)}}function $C(o,d){o&1&&(e(0,`
5709              `),g(1,"span",20),e(2,`
5710              `))}function KC(o,d){o&1&&(e(0,`
5711              `),g(1,"span",20),e(2,`
5712              `))}function JC(o,d){if(o&1){let t=D();e(0,`
5713            `),n(1,"a",18),T("click",function(){f(t);let r=p(2);return h(r.email())}),_(2,KC,3,0),g(3,"i",21),e(4,`
5714          Email Members`),i(),e(5,`
5715        `)}if(o&2){let t=p(2);s(2),x(t.emailing?2:-1)}}function XC(o,d){if(o&1){let t=D();e(0,`
5716          `),n(1,"div",17),e(2,`
5717            `),n(3,"a",18),T("click",function(){f(t);let r=p();return h(r.exportCSV())}),_(4,$C,3,0),g(5,"i",19),e(6,`
5718          Export`),i(),e(7,`
5719          `),_(8,JC,6,1),i(),e(9,`
5720    `)}if(o&2){let t=p();s(),m("ngClass",re(3,HC,t.isWindowLarge())),s(3),x(t.exporting?4:-1),s(4),x(t.showEmailPlayers()?8:-1)}}function ZC(o,d){o&1&&(e(0,`
5721        `),n(1,"app-registration-summary-filters"),e(2,`
5722        `),i(),e(3,`
5723      `))}function QC(o,d){o&1&&(e(0,`
5724        `),n(1,"app-registration-changes-filters"),e(2,`
5725        `),i(),e(3,`
5726      `))}function eS(o,d){o&1&&(e(0,`
5727        `),n(1,"app-incomplete-registration-details-filters"),e(2,`
5728        `),i(),e(3,`
5729      `))}function tS(o,d){o&1&&(e(0,`
5730        `),n(1,"app-incomplete-fin-aid-filters"),e(2,`
5731        `),i(),e(3,`
5732      `))}function iS(o,d){o&1&&(e(0,`
5733        `),n(1,"app-outstanding-fees-filters"),e(2,`
5734        `),i(),e(3,`
5735      `))}function nS(o,d){o&1&&(e(0,`
5736        `),n(1,"app-ar-aging-filters"),e(2,`
5737        `),i(),e(3,`
5738      `))}function oS(o,d){o&1&&(e(0,`
5739        `),n(1,"app-registration-payments-filters"),e(2,`
5740        `),i(),e(3,`
5741      `))}function rS(o,d){o&1&&(e(0,`
5742        `),n(1,"app-donations-filters"),e(2,`
5743        `),i(),e(3,`
5744      `))}function aS(o,d){o&1&&(e(0,`
5745        `),n(1,"app-volunteers-filters"),e(2,`
5746        `),i(),e(3,`
5747      `))}function lS(o,d){if(o&1&&(e(0,`
5748        `),n(1,"app-club-transactions-filters",22),e(2,`
5749        `),i(),e(3,`
5750      `)),o&2){let t=p();s(),m("reportType",t.reportService.reportType)}}function sS(o,d){o&1&&(e(0,`
5751        `),n(1,"app-payment-processor-details-filters"),e(2,`
5752        `),i(),e(3,`
5753      `))}function dS(o,d){o&1&&(e(0,`
5754        `),n(1,"app-accounting-transactions-filters"),e(2,`
5755        `),i(),e(3,`
5756      `))}function pS(o,d){o&1&&(e(0,`
5757        `),n(1,"app-credit-summary-filters"),e(2,`
5758        `),i(),e(3,`
5759      `))}function mS(o,d){o&1&&(e(0,`
5760        `),n(1,"app-credit-usage-filters"),e(2,`
5761        `),i(),e(3,`
5762      `))}function cS(o,d){o&1&&(e(0,`
5763        `),n(1,"app-credit-budgeting-filters"),e(2,`
5764        `),i(),e(3,`
5765      `))}function uS(o,d){o&1&&(e(0,`
5766        `),n(1,"app-pledges-waivers-filters"),e(2,`
5767        `),i(),e(3,`
5768      `))}function _S(o,d){o&1&&(e(0,`
5769        `),n(1,"app-registration-options-filters"),e(2,`
5770        `),i(),e(3,`
5771      `))}function xS(o,d){o&1&&(e(0,`
5772        `),n(1,"app-discount-summary-filters"),e(2,`
5773        `),i(),e(3,`
5774      `))}function gS(o,d){o&1&&(e(0,`
5775        `),n(1,"app-tryout-assignment-filters"),e(2,`
5776        `),i(),e(3,`
5777      `))}function fS(o,d){o&1&&(e(0,`
5778        `),n(1,"app-refunds-filters"),e(2,`
5779        `),i(),e(3,`
5780      `))}function hS(o,d){o&1&&(e(0,`
5781        `),n(1,"app-permissions-filters"),e(2,`
5782        `),i(),e(3,`
5783      `))}function CS(o,d){o&1&&(e(0,`
5784        `),n(1,"app-revenue-filters"),e(2,`
5785        `),i(),e(3,`
5786      `))}function SS(o,d){o&1&&(e(0,`
5787        `),n(1,"app-ledger-filters"),e(2,`
5788        `),i(),e(3,`
5789      `))}function yS(o,d){o&1&&(e(0,`
5790        `),n(1,"app-retention-filters"),e(2,`
5791        `),i(),e(3,`
5792      `))}function bS(o,d){o&1&&(e(0,`
5793        `),n(1,"app-roster-filters"),e(2,`
5794        `),i(),e(3,`
5795      `))}function vS(o,d){o&1&&(e(0,`
5796        `),n(1,"app-transactions-filters"),e(2,`
5797        `),i(),e(3,`
5798        `))}function TS(o,d){o&1&&(e(0,`
5799        `),n(1,"app-club-contacts-filters"),e(2,`
5800        `),i(),e(3,`
5801      `))}function ES(o,d){o&1&&(e(0,`
5802        `),n(1,"app-club-volunteer-status-filters"),e(2,`
5803        `),i(),e(3,`
5804      `))}function wS(o,d){o&1&&(e(0,`
5805        `),n(1,"app-program-team-volunteer-status-filters"),e(2,`
5806        `),i(),e(3,`
5807      `))}function FS(o,d){o&1&&(e(0,`
5808        `),n(1,"app-volunteer-tasks-filters"),e(2,`
5809        `),i(),e(3,`
5810      `))}function DS(o,d){o&1&&(e(0,`
5811        `),n(1,"app-staff-demographics-filters"),e(2,`
5812        `),i(),e(3,`
5813      `))}function IS(o,d){o&1&&(e(0,`
5814        `),n(1,"app-revenue-transactions-filters"),e(2,`
5815        `),i(),e(3,`
5816      `))}function RS(o,d){if(o&1&&(e(0,`
5817        `),n(1,"app-club-transactions-breakout-filters",22),e(2,`
5818        `),i(),e(3,`
5819      `)),o&2){let t=p();s(),m("reportType",t.reportService.reportType)}}function MS(o,d){o&1&&(e(0,`
5820        `),n(1,"app-outstanding-waivers-filters"),e(2,`
5821        `),i(),e(3,`
5822      `))}function AS(o,d){if(o&1&&(e(0,`
5823        `),n(1,"app-club-transactions-breakout-summary-filters",22),e(2,`
5824        `),i(),e(3,`
5825      `)),o&2){let t=p();s(),m("reportType",t.reportService.reportType)}}function PS(o,d){if(o&1&&(e(0,`
5826        `),n(1,"app-activity-filters",22),e(2,`
5827        `),i(),e(3,`
5828      `)),o&2){let t=p();s(),m("reportType",t.reportService.reportType)}}function OS(o,d){o&1&&(e(0,`
5829        `),n(1,"app-invoice-details-filters"),e(2,`
5830        `),i(),e(3,`
5831      `))}function LS(o,d){o&1&&(e(0,`
5832        `),n(1,"app-club-cash-transactions-filters"),e(2,`
5833        `),i(),e(3,`
5834      `))}function NS(o,d){o&1&&(e(0,`
5835        `),n(1,"app-heat-map-filters"),e(2,`
5836        `),i(),e(3,`
5837      `))}function VS(o,d){o&1&&(e(0,`
5838        `),n(1,"app-team-finance-filters"),e(2,`
5839        `),i(),e(3,`
5840      `))}function kS(o,d){o&1&&(e(0,`
5841        `),n(1,"app-team-finance-details-filters"),e(2,`
5842        `),i(),e(3,`
5843      `))}function BS(o,d){if(o&1){let t=D();e(0,`
5844          `),n(1,"button",26),T("click",function(){f(t);let r=p(2);return h(r.runReport())}),e(2,"Run"),i(),e(3,`
5845        `)}}function WS(o,d){if(o&1){let t=D();e(0,`
5846      `),n(1,"div",23),e(2,`
5847        `),_(3,BS,4,0),n(4,"button",24),T("click",function(){f(t);let r=p();return h(r.resetFilters())}),g(5,"i",25),e(6,`
5848      Reset`),i(),e(7,`
5849    `),i(),e(8,`
5850  `)}if(o&2){let t=p();s(3),x(t.reportService.missingRequiredFilter?-1:3)}}function US(o,d){o&1&&(e(0,`
5851        `),n(1,"app-registration-summary-table"),e(2,`
5852        `),i(),e(3,`
5853      `))}function YS(o,d){o&1&&(e(0,`
5854        `),n(1,"app-registration-changes-table"),e(2,`
5855        `),i(),e(3,`
5856      `))}function GS(o,d){o&1&&(e(0,`
5857        `),n(1,"app-registration-options-table"),e(2,`
5858        `),i(),e(3,`
5859      `))}function jS(o,d){o&1&&(e(0,`
5860        `),n(1,"app-incomplete-registration-details-table"),e(2,`
5861        `),i(),e(3,`
5862      `))}function HS(o,d){o&1&&(e(0,`
5863        `),n(1,"app-incomplete-fin-aid-table"),e(2,`
5864        `),i(),e(3,`
5865      `))}function zS(o,d){o&1&&(e(0,`
5866        `),n(1,"app-outstanding-fees-table"),e(2,`
5867        `),i(),e(3,`
5868      `))}function qS(o,d){o&1&&(e(0,`
5869        `),n(1,"app-ar-aging-table"),e(2,`
5870        `),i(),e(3,`
5871      `))}function $S(o,d){o&1&&(e(0,`
5872        `),n(1,"app-registration-payments-table"),e(2,`
5873        `),i(),e(3,`
5874      `))}function KS(o,d){o&1&&(e(0,`
5875        `),n(1,"app-donations-table"),e(2,`
5876        `),i(),e(3,`
5877      `))}function JS(o,d){o&1&&(e(0,`
5878        `),n(1,"app-volunteers-table"),e(2,`
5879        `),i(),e(3,`
5880      `))}function XS(o,d){o&1&&(e(0,`
5881        `),n(1,"app-club-transactions-table"),e(2,`
5882        `),i(),e(3,`
5883      `))}function ZS(o,d){o&1&&(e(0,`
5884        `),n(1,"app-payment-processor-details-table"),e(2,`
5885        `),i(),e(3,`
5886      `))}function QS(o,d){o&1&&(e(0,`
5887        `),n(1,"app-accounting-transactions-table"),e(2,`
5888        `),i(),e(3,`
5889      `))}function e2(o,d){o&1&&(e(0,`
5890        `),n(1,"app-credit-summary-table"),e(2,`
5891        `),i(),e(3,`
5892      `))}function t2(o,d){o&1&&(e(0,`
5893        `),n(1,"app-credit-usage-table"),e(2,`
5894        `),i(),e(3,`
5895      `))}function i2(o,d){o&1&&(e(0,`
5896        `),n(1,"app-credit-budgeting-table"),e(2,`
5897        `),i(),e(3,`
5898      `))}function n2(o,d){o&1&&(e(0,`
5899        `),n(1,"app-pledges-waivers-table"),e(2,`
5900        `),i(),e(3,`
5901      `))}function o2(o,d){o&1&&(e(0,`
5902        `),n(1,"app-discount-summary-table"),e(2,`
5903        `),i(),e(3,`
5904      `))}function r2(o,d){o&1&&(e(0,`
5905        `),n(1,"app-tryout-assignment-table"),e(2,`
5906        `),i(),e(3,`
5907      `))}function a2(o,d){o&1&&(e(0,`
5908        `),n(1,"app-refunds-table"),e(2,`
5909        `),i(),e(3,`
5910      `))}function l2(o,d){o&1&&(e(0,`
5911        `),n(1,"app-permissions-table"),e(2,`
5912        `),i(),e(3,`
5913      `))}function s2(o,d){o&1&&(e(0,`
5914        `),n(1,"app-revenue-table"),e(2,`
5915        `),i(),e(3,`
5916      `))}function d2(o,d){o&1&&(e(0,`
5917        `),n(1,"app-ledger-table"),e(2,`
5918        `),i(),e(3,`
5919      `))}function p2(o,d){o&1&&(e(0,`
5920        `),n(1,"app-retention-table"),e(2,`
5921        `),i(),e(3,`
5922      `))}function m2(o,d){o&1&&(e(0,`
5923        `),n(1,"app-roster-table"),e(2,`
5924        `),i(),e(3,`
5925      `))}function c2(o,d){o&1&&(e(0,`
5926        `),n(1,"app-transactions-table"),e(2,`
5927        `),i(),e(3,`
5928        `))}function u2(o,d){o&1&&(e(0,`
5929        `),n(1,"app-club-contacts-table"),e(2,`
5930        `),i(),e(3,`
5931      `))}function _2(o,d){o&1&&(e(0,`
5932        `),n(1,"app-club-volunteer-status-table"),e(2,`
5933        `),i(),e(3,`
5934      `))}function x2(o,d){o&1&&(e(0,`
5935        `),n(1,"app-program-team-volunteer-status-table"),e(2,`
5936        `),i(),e(3,`
5937      `))}function g2(o,d){o&1&&(e(0,`
5938        `),n(1,"app-volunteer-tasks-table"),e(2,`
5939        `),i(),e(3,`
5940      `))}function f2(o,d){o&1&&(e(0,`
5941        `),n(1,"app-staff-demographics-table"),e(2,`
5942        `),i(),e(3,`
5943      `))}function h2(o,d){o&1&&(e(0,`
5944        `),n(1,"app-revenue-transactions-table"),e(2,`
5945        `),i(),e(3,`
5946      `))}function C2(o,d){o&1&&(e(0,`
5947        `),n(1,"app-club-transactions-breakout-table"),e(2,`
5948        `),i(),e(3,`
5949      `))}function S2(o,d){o&1&&(e(0,`
5950        `),n(1,"app-outstanding-waivers-table"),e(2,`
5951        `),i(),e(3,`
5952      `))}function y2(o,d){o&1&&(e(0,`
5953        `),n(1,"app-club-transactions-breakout-summary-table"),e(2,`
5954        `),i(),e(3,`
5955      `))}function b2(o,d){o&1&&(e(0,`
5956        `),n(1,"app-activity-table"),e(2,`
5957        `),i(),e(3,`
5958      `))}function v2(o,d){o&1&&(e(0,`
5959        `),n(1,"app-invoice-details-table"),e(2,`
5960        `),i(),e(3,`
5961      `))}function T2(o,d){o&1&&(e(0,`
5962        `),n(1,"app-club-cash-transactions-table"),e(2,`
5963        `),i(),e(3,`
5964      `))}function E2(o,d){o&1&&(e(0,`
5965        `),g(1,"app-heat-map-table"),e(2,`
5966      `))}function w2(o,d){o&1&&(e(0,`
5967        `),n(1,"app-team-finance-table"),e(2,`
5968        `),i(),e(3,`
5969      `))}function F2(o,d){o&1&&(e(0,`
5970        `),n(1,"app-team-finance-details-table"),e(2,`
5971        `),i(),e(3,`
5972      `))}function D2(o,d){if(o&1&&(e(0,`
5973  `),n(1,"div"),e(2,`
5974    `),_(3,US,4,0)(4,YS,4,0)(5,GS,4,0)(6,jS,4,0)(7,HS,4,0)(8,zS,4,0)(9,qS,4,0)(10,$S,4,0)(11,KS,4,0)(12,JS,4,0)(13,XS,4,0)(14,ZS,4,0)(15,QS,4,0)(16,e2,4,0)(17,t2,4,0)(18,i2,4,0)(19,n2,4,0)(20,o2,4,0)(21,r2,4,0)(22,a2,4,0)(23,l2,4,0)(24,s2,4,0)(25,d2,4,0)(26,p2,4,0)(27,m2,4,0)(28,c2,4,0)(29,u2,4,0)(30,_2,4,0)(31,x2,4,0)(32,g2,4,0)(33,f2,4,0)(34,h2,4,0)(35,C2,4,0)(36,S2,4,0)(37,y2,4,0)(38,b2,4,0)(39,v2,4,0)(40,T2,4,0)(41,E2,3,0)(42,w2,4,0)(43,F2,4,0),e(44,`
5975  `),i(),e(45,`
5976`)),o&2){let t,l=p();s(3),x((t=!0)==(l.reportService.reportType===l.ReportType.REGISTRATION_SUMMARY)?3:t===(l.reportService.reportType===l.ReportType.REGISTRATION_CHANGES)?4:t===(l.reportService.reportType===l.ReportType.REGISTRATION_OPTIONS)?5:t===(l.reportService.reportType===l.ReportType.INCOMPLETE_REGISTRATION_DETAILS)?6:t===(l.reportService.reportType===l.ReportType.INCOMPLETE_FINANCIAL_AID)?7:t===(l.reportService.reportType===l.ReportType.OUTSTANDING_FEES)?8:t===(l.reportService.reportType===l.ReportType.AR_AGING)?9:t===(l.reportService.reportType===l.ReportType.REGISTRATION_PAYMENTS)?10:t===(l.reportService.reportType===l.ReportType.DONATIONS)?11:t===(l.reportService.reportType===l.ReportType.VOLUNTEERS)?12:t===tn(1,Yr,l.ReportType.CLUB_TRANSACTION_DETAILS,l.ReportType.CLUB_TRANSACTIONS,l.ReportType.REIMBURSE_CLUB_TRANSACTIONS).includes(l.reportService.reportType)?13:t===(l.reportService.reportType===l.ReportType.PAYMENT_PROCESSOR_DETAILS)?14:t===(l.reportService.reportType===l.ReportType.ACCOUNTING_TRANSACTIONS)?15:t===(l.reportService.reportType===l.ReportType.CREDIT_SUMMARY)?16:t===(l.reportService.reportType===l.ReportType.CREDIT_USAGE)?17:t===(l.reportService.reportType===l.ReportType.CREDIT_BUDGETING)?18:t===(l.reportService.reportType===l.ReportType.PLEDGES_WAIVERS)?19:t===(l.reportService.reportType===l.ReportType.DISCOUNT_SUMMARY)?20:t===(l.reportService.reportType===l.ReportType.TRYOUT_ASSIGNMENT)?21:t===(l.reportService.reportType===l.ReportType.REFUNDS)?22:t===(l.reportService.reportType===l.ReportType.PERMISSIONS)?23:t===(l.reportService.reportType===l.ReportType.REVENUE)?24:t===(l.reportService.reportType===l.ReportType.LEDGER)?25:t===(l.reportService.reportType===l.ReportType.RETENTION)?26:t===(l.reportService.reportType===l.ReportType.ROSTER)?27:t===(l.reportService.reportType===l.ReportType.TRANSACTIONS)?28:t===(l.reportService.reportType===l.ReportType.CLUB_CONTACTS)?29:t===(l.reportService.reportType===l.ReportType.CLUB_VOLUNTEER_STATUS)?30:t===(l.reportService.reportType===l.ReportType.PROGRAM_TEAM_VOLUNTEER_STATUS)?31:t===(l.reportService.reportType===l.ReportType.VOLUNTEER_TASKS)?32:t===(l.reportService.reportType===l.ReportType.STAFF_DEMOGRAPHICS)?33:t===(l.reportService.reportType===l.ReportType.REVENUE_TRANSACTIONS)?34:t===(l.reportService.reportType===l.ReportType.CLUB_TRANSACTIONS_BREAKOUT)?35:t===(l.reportService.reportType===l.ReportType.OUTSTANDING_WAIVERS)?36:t===(l.reportService.reportType===l.ReportType.CLUB_TRANSACTIONS_BREAKOUT_SUMMARY)?37:t===(l.reportService.reportType===l.ReportType.ACTIVITY)?38:t===(l.reportService.reportType===l.ReportType.INVOICE_DETAILS)?39:t===(l.reportService.reportType===l.ReportType.CLUB_CASH_TRANSACTIONS)?40:t===(l.reportService.reportType===l.ReportType.HEAT_MAP)?41:t===(l.reportService.reportType===l.ReportType.TEAM_FINANCE)?42:t===(l.reportService.reportType===l.ReportType.TEAM_FINANCE_DETAILS)?43:-1)}}function I2(o,d){if(o&1){let t=D();e(0,`
5977  `),n(1,"app-email-compose",27),T("send",function(){f(t);let r=p();return h(r.showComposeEmail=!1)})("cancel",function(){f(t);let r=p();return h(r.showComposeEmail=!1)}),e(2,`
5978  `),i(),e(3,`
5979`)}if(o&2){let t=p();s(),m("recipients",t.emailRecipients)("emailCategoryID",t.EmailCategoryLV.CLUB_COMMUNICATIONS)("emailTemplateType",t.EmailTemplateType.GENERAL)("showSaveDraftButton",!0)("showSteps",!1)("showHeader",!1)("hideSearch",!0)("selectRecipientsButtonText","Continue")}}function R2(o,d){if(o&1){let t=D();e(0,`
5980    `),n(1,"app-dialog-footer"),e(2,`
5981      `),rt(3,28),e(4,`
5982        `),n(5,"button",29),T("click",function(){f(t);let r=p();return h(r.reportService.showChangeClubModal=!1)}),e(6,"No"),i(),e(7,`
5983      `),at(),e(8,`
5984      `),rt(9,30),e(10,`
5985        `),n(11,"button",26),T("click",function(){f(t);let r=p();return h(r.reportService.goToClub())}),e(12,"Yes"),i(),e(13,`
5986      `),at(),e(14,`
5987    `),i(),e(15,`
5988  `)}}var Gr=(()=>{let d=class d{constructor(l,r,a,b,u){this.siteDataService=l,this.reportService=r,this.router=a,this.clubService=b,this.authorizeService=u,this.exporting=!1,this.emailing=!1,this.showComposeEmail=!1,this.ReportType=F,this.downloadingFiles=!1,this.EmailTemplateType=Qn,this.EmailCategoryLV=Zn,this.unsubcribe$=new ge;let he=(this.router.getCurrentNavigation()??this.router.lastSuccessfulNavigation())?.extras.state??JSON.parse(sessionStorage.getItem("reportState"));he&&(this.stateReportType=he.reportType,he.run&&(this.reportService.state=he),this.reportService.showReportData=!1),this.reportService.reportType=0}ngOnInit(){this.reportService.changeReportType.pipe(Z(this.unsubcribe$)).subscribe(l=>{this.reportService.showReportData=!1,this.reportService.reportType=l}),oe([this.reportService.getReportCategories(!0),this.clubService.getClubsDropdown()]).subscribe({next:l=>{this.reportService.reportCategories=l[0],this.reports=this.reportService.reportCategories.flatMap(r=>r.reports).sort((r,a)=>r.label.localeCompare(a.label)),this.reportService.clubs=l[1],this.reportService.clubID=+this.reportService.profile.clubID,this.stateReportType&&(this.reportService.reportType=this.stateReportType,this.currentReport=this.reports.find(r=>!r.isCustom&&r.value===this.reportService.reportType)),this.siteDataService.hide
5988SiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")}}),this.authorizeService.getUser().subscribe(l=>{l&&(this.reportService.profile=l)})}runReport(){this.reportService.runReport.next(!0),this.reportService.showReportData=!0}exportCSV(){this.exporting=!0,this.reportService.getReportDataCSV().subscribe({next:l=>{Tn(l),this.exporting=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")}})}email(){this.emailing=!0,this.reportService.getEmailData().subscribe({next:l=>{this.emailRecipients=l,this.emailing=!1,this.showComposeEmail=!0},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem running this report.")}})}resetFilters(){this.reportService.clearFilters.next(!0)}changeReport(l){this.reportService.showReportData=!1,this.reportService.missingRequiredFilter=!1,l.isCustom?this.router.navigate(["admin/reports/"+l.routerLink],{state:{run:!1,reportType:l.value}}):this.reportService.reportType=l.value}showEmailPlayers(){switch(this.reportService.reportType){case F.REGISTRATION_DETAILS:case F.INCOMPLETE_FINANCIAL_AID:case F.INCOMPLETE_REGISTRATION_DETAILS:case F.OUTSTANDING_FEES:case F.CREDIT_SUMMARY:case F.DISCOUNT_SUMMARY:case F.REGISTRATION_CHANGES:case F.CREDIT_BUDGETING:case F.REGISTRATION_PAYMENTS:case F.TRYOUT_ASSIGNMENT:case F.CLUB_CONTACTS:case F.CLUB_VOLUNTEER_STATUS:case F.PROGRAM_TEAM_VOLUNTEER_STATUS:case F.VOLUNTEER_TASKS:case F.REGISTRATION_DETAILS_OPTIONS_COMBO:case F.VOLUNTEERS:case F.RETENTION:case F.ROSTER:case F.OUTSTANDING_WAIVERS:return!0;default:return!1}}ngOnDestroy(){this.unsubcribe$.next(),this.unsubcribe$.complete(),this.reportService.clubSwitchRedirectUrl=void 0,this.reportService.clubSwitchEntityName=void 0}isWindowLarge(){return window.innerWidth>992}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(it),w(et),w(Pe))},d.\u0275cmp=A({type:d,selectors:[["ng-component"]],standalone:!1,decls:85,vars:21,consts:[["item",""],["role","main",3,"hidden"],["pageTitle","Report","parentLinkText","Reports","parentLinkUrl","..",3,"showBackButton"],[1,"report"],[1,"card","mb-5","report-filters-wrapper"],[1,"row","mb-1"],[1,"col-sm-12","col-lg-6","col-xl-7"],[1,"form-group","horizontal-form","form-select"],["for","report-selector"],[1,"text-medium","fw-700","text-uppercase","mb-0"],["inputId","report-selector",3,"ngModelChange","ngModel","options","optionLabel","filter","placeholder","appendTo"],[1,"report-filters"],["styleClass","shortWidthDialog",3,"visibleChange","header","visible"],["pTemplate","footer"],[1,"d-flex","justify-content-between","align-items-center","full-width"],[1,"flex-grow-1"],["label","Custom","size","small"],[1,"col-md-12","col-lg-6","col-xl-5",3,"ngClass"],[1,"btn",3,"click"],[1,"fal","fa-table"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"fal","fa-at"],[3,"reportType"],[1,"mt-3"],[1,"btn","btn-blank",3,"click"],[1,"far","fa-redo-alt"],[1,"btn","btn-primary",3,"click"],[3,"send","cancel","recipients","emailCategoryID","emailTemplateType","showSaveDraftButton","showSteps","showHeader","hideSearch","selectRecipientsButtonText"],["slot","secondary"],[1,"btn","btn-secondary",3,"click"],["slot","primary"]],template:function(r,a){if(r&1){let b=D();n(0,"main",1),e(1,`
5989  `),g(2,"app-admin-header",2),e(3,`
5990  `),n(4,"section",3),e(5,`
5991    `),n(6,"div",4),e(7,`
5992      `),n(8,"div",5),e(9,`
5993        `),n(10,"div",6),e(11,`
5994          `),n(12,"div",7),e(13,`
5995            `),n(14,"label",8),e(15,`
5996              `),n(16,"h2",9),e(17,"Report"),i(),e(18,`
5997            `),i(),e(19,`
5998            `),n(20,"p-select",10),y("ngModelChange",function(L){return f(b),S(a.currentReport,L)||(a.currentReport=L),h(L)}),T("ngModelChange",function(L){return a.changeReport(L)}),e(21,`
5999                `),R(22,qC,8,2,"ng-template",null,0,Fe),e(24,`
6000            `),i(),e(25,`
6001          `),i(),e(26,`
6002        `),i(),e(27,`
6003        `),_(28,XC,10,5),i(),e(29,`
6004  `),n(30,"div",11),e(31,`
6005    `),_(32,ZC,4,0)(33,QC,4,0)(34,eS,4,0)(35,tS,4,0)(36,iS,4,0)(37,nS,4,0)(38,oS,4,0)(39,rS,4,0)(40,aS,4,0)(41,lS,4,1)(42,sS,4,0)(43,dS,4,0)(44,pS,4,0)(45,mS,4,0)(46,cS,4,0)(47,uS,4,0)(48,_S,4,0)(49,xS,4,0)(50,gS,4,0)(51,fS,4,0)(52,hS,4,0)(53,CS,4,0)(54,SS,4,0)(55,yS,4,0)(56,bS,4,0)(57,vS,4,0)(58,TS,4,0)(59,ES,4,0)(60,wS,4,0)(61,FS,4,0)(62,DS,4,0)(63,IS,4,0)(64,RS,4,1)(65,MS,4,0)(66,AS,4,1)(67,PS,4,1)(68,OS,4,0)(69,LS,4,0)(70,NS,4,0)(71,VS,4,0)(72,kS,4,0),e(73,`
6006    `),_(74,WS,9,1),i(),e(75,`
6007`),i(),e(76,`
6008`),_(77,D2,46,5),i(),e(78,`
6009`),i(),e(79,`
6010`),_(80,I2,4,8),n(81,"p-dialog",12),y("visibleChange",function(L){return f(b),S(a.reportService.showChangeClubModal,L)||(a.reportService.showChangeClubModal=L),h(L)}),e(82),R(83,R2,16,0,"ng-template",13),e(84,`
6011`),i()}if(r&2){let b;m("hidden",a.showComposeEmail),s(2),m("showBackButton",!0),s(18),C("ngModel",a.currentReport),m("options",a.reports)("optionLabel","label")("filter",!0)("placeholder","Select a Report")("appendTo","body"),s(8),x(a.reportService.showReportData?28:-1),s(4),x((b=!0)==(a.reportService.reportType===a.ReportType.REGISTRATION_SUMMARY)?32:b===(a.reportService.reportType===a.ReportType.REGISTRATION_CHANGES)?33:b===(a.reportService.reportType===a.ReportType.INCOMPLETE_REGISTRATION_DETAILS)?34:b===(a.reportService.reportType===a.ReportType.INCOMPLETE_FINANCIAL_AID)?35:b===(a.reportService.reportType===a.ReportType.OUTSTANDING_FEES)?36:b===(a.reportService.reportType===a.ReportType.AR_AGING)?37:b===(a.reportService.reportType===a.ReportType.REGISTRATION_PAYMENTS)?38:b===(a.reportService.reportType===a.ReportType.DONATIONS)?39:b===(a.reportService.reportType===a.ReportType.VOLUNTEERS)?40:b===tn(17,Yr,a.ReportType.CLUB_TRANSACTION_DETAILS,a.ReportType.CLUB_TRANSACTIONS,a.ReportType.REIMBURSE_CLUB_TRANSACTIONS).includes(a.reportService.reportType)?41:b===(a.reportService.reportType===a.ReportType.PAYMENT_PROCESSOR_DETAILS)?42:b===(a.reportService.reportType===a.ReportType.ACCOUNTING_TRANSACTIONS)?43:b===(a.reportService.reportType===a.ReportType.CREDIT_SUMMARY)?44:b===(a.reportService.reportType===a.ReportType.CREDIT_USAGE)?45:b===(a.reportService.reportType===a.ReportType.CREDIT_BUDGETING)?46:b===(a.reportService.reportType===a.ReportType.PLEDGES_WAIVERS)?47:b===(a.reportService.reportType===a.ReportType.REGISTRATION_OPTIONS)?48:b===(a.reportService.reportType===a.ReportType.DISCOUNT_SUMMARY)?49:b===(a.reportService.reportType===a.ReportType.TRYOUT_ASSIGNMENT)?50:b===(a.reportService.reportType===a.ReportType.REFUNDS)?51:b===(a.reportService.reportType===a.ReportType.PERMISSIONS)?52:b===(a.reportService.reportType===a.ReportType.REVENUE)?53:b===(a.reportService.reportType===a.ReportType.LEDGER)?54:b===(a.reportService.reportType===a.ReportType.RETENTION)?55:b===(a.reportService.reportType===a.ReportType.ROSTER)?56:b===(a.reportService.reportType===a.ReportType.TRANSACTIONS)?57:b===(a.reportService.reportType===a.ReportType.CLUB_CONTACTS)?58:b===(a.reportService.reportType===a.ReportType.CLUB_VOLUNTEER_STATUS)?59:b===(a.reportService.reportType===a.ReportType.PROGRAM_TEAM_VOLUNTEER_STATUS)?60:b===(a.reportService.reportType===a.ReportType.VOLUNTEER_TASKS)?61:b===(a.reportService.reportType===a.ReportType.STAFF_DEMOGRAPHICS)?62:b===(a.reportService.reportType===a.ReportType.REVENUE_TRANSACTIONS)?63:b===(a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS_BREAKOUT)?64:b===(a.reportService.reportType===a.ReportType.OUTSTANDING_WAIVERS)?65:b===(a.reportService.reportType===a.ReportType.CLUB_TRANSACTIONS_BREAKOUT_SUMMARY)?66:b===(a.reportService.reportType===a.ReportType.ACTIVITY)?67:b===(a.reportService.reportType===a.ReportType.INVOICE_DETAILS)?68:b===(a.reportService.reportType===a.ReportType.CLUB_CASH_TRANSACTIONS)?69:b===(a.reportService.reportType===a.ReportType.HEAT_MAP)?70:b===(a.reportService.reportType===a.ReportType.TEAM_FINANCE)?71:b===(a.reportService.reportType===a.ReportType.TEAM_FINANCE_DETAILS)?72:-1),s(42),x(a.reportService.reportType?74:-1),s(3),x(a.reportService.showReportData?77:-1),s(3),x(a.showComposeEmail?80:-1),s(),m("header","Navigate To "+a.reportService.clubName),C("visible",a.reportService.showChangeClubModal),s(),Ye(`
6012  To see this `,a.reportService.clubSwitchEntityName||"account"," you will be taken to ",a.reportService.clubName,`
6013  site, do you wish to proceed?
6014  `)}},dependencies:[Ge,U,Y,z,ht,Qe,Kt,ft,q,no,po,mo,co,uo,_o,xo,go,fo,ho,bo,vo,To,Eo,wo,Fo,Do,Io,Ro,Mo,Ao,Po,Oo,Lo,No,Vo,ko,Bo,Wo,Uo,Yo,Go,jo,Ho,zo,$o,Ko,Jo,Xo,Zo,Qo,er,tr,ir,nr,or,rr,ar,lr,sr,dr,pr,mr,cr,ur,_r,xr,gr,fr,hr,Cr,Sr,yr,br,vr,Tr,Er,wr,Fr,Dr,Ir,Rr,Mr,Ar,Pr,Or,Lr,Nr,Vr,kr,Br,Wr,Ur],styles:[".wrapper[_ngcontent-%COMP%]{max-width:700px;padding:30px;border:1px solid var(--border-color);background:var(--color-white);color:var(--color-black-lt);position:relative;margin:60px auto}.brand[_ngcontent-%COMP%]{margin-top:-30px}.logo[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{max-width:300px;margin-top:-30px}"]});let o=d;return o}
6014)();var M2=o=>({"mt-3":o}),jr=o=>[o],A2=o=>({run:!1,reportType:o}),P2=o=>({run:!0,reportType:o}),O2=()=>["custom-report-model-admin"],L2=()=>["custom-report-query"],N2=o=>({"border-bottom":o}),V2=o=>["custom-report-query",o],k2=()=>({edit:!0});function B2(o,d){if(o&1){let t=D();e(0,`
6015        `),n(1,"div"),e(2,`
6016          `),n(3,"button",6),T("click",function(){f(t);let r=p();return h(r.goToNew())}),e(4,"Add Custom Report"),i(),e(5,`
6017        `),i(),e(6,`
6018      `)}}function W2(o,d){if(o&1&&(e(0,`
6019            `),n(1,"h4",7),e(2),i(),e(3,`
6020          `)),o&2){let t=p(),l=t.$implicit,r=t.$index;s(),m("ngClass",re(2,M2,r>0)),s(),c(l.label)}}function U2(o,d){o&1&&(e(0,`
6021                    `),n(1,"app-pill",13),e(2,"Custom"),i(),e(3,`
6022                `))}function Y2(o,d){if(o&1&&(e(0,`
6023            `),n(1,"div",8),e(2,`
6024              `),n(3,"div",9),e(4),_(5,U2,4,0),i(),e(6,`
6025              `),n(7,"div",10),e(8,`
6026                `),n(9,"a",11),e(10,"Configure"),i(),e(11,`
6027                `),n(12,"a",12),e(13,"Run"),i(),e(14,`
6028              `),i(),e(15,`
6029            `),i(),e(16,`
6030          `)),o&2){let t=d.$implicit;s(4),I(`
6031                `,t.label,`
6032                `),s(),x(t.isCustom?5:-1),s(4),m("routerLink",re(6,jr,t.routerLink))("state",re(8,A2,t.value)),s(3),m("routerLink",re(10,jr,t.routerLink))("state",re(12,P2,t.value))}}function G2(o,d){if(o&1&&(e(0,`
6033          `),_(1,W2,4,4),N(2,Y2,17,14,null,null,W)),o&2){let t=d.$implicit;s(),x(t.reports.length>0?1:-1),s(),V(t.reports)}}function j2(o,d){o&1&&(e(0,`
6034          `),n(1,"h4",14),e(2,"Sprocket Query"),i(),e(3,`
6035          `),rt(4),e(5,`
6036            `),n(6,"div",8),e(7,`
6037              `),n(8,"button",15),e(9,"Admin"),i(),e(10,`
6038            `),i(),e(11,`
6039            `),n(12,"div",8),e(13,`
6040              `),n(14,"button",15),e(15,"Reports"),i(),e(16,`
6041            `),i(),e(17,`
6042          `),at(),e(18,`
6043        `)),o&2&&(s(8),m("routerLink",Le(2,O2)),s(6),m("routerLink",Le(3,L2)))}function H2(o,d){if(o&1){let t=D();e(0,`
6044                  `),n(1,"div",18),e(2,`
6045                    `),n(3,"div",19),e(4,`
6046                      `),n(5,"button",20),T("click",function(r){let a=f(t).$implicit,b=p(4);return h(b.togglePin(a,r))}),e(6,`
6047                        `),g(7,"i",21),e(8,`
6048                      `),i(),e(9,`
6049                    `),i(),e(10,`
6050                    `),n(11,"div",22),e(12,`
6051                      `),n(13,"div",23),e(14,`
6052                        `),n(15,"a",24),e(16,`
6053                          `),n(17,"div",25),e(18,`
6054                            `),n(19,"span",26),e(20),i(),e(21,`
6055                          `),i(),e(22,`
6056                        `),i(),e(23,`
6057                      `),i(),e(24,`
6058                    `),i(),e(25,`
6059                  `),i(),e(26,`
6060                `)}if(o&2){let t=d.$implicit,l=d.$index,r=d.$count,a=p(4);s(),m("ngClass",re(9,N2,l!==r-1)),s(4),m("title",a.isReportPinned(t.value)?"Unpin report":"Pin report"),s(2),lt("fas",a.isReportPinned(t.value))("far",!a.isReportPinned(t.value)),s(8),m("routerLink",re(11,V2,t.value))("state",Le(13,k2)),s(5),c(t.label)}}function z2(o,d){if(o&1&&(e(0,`
6061                `),N(1,H2,27,14,null,null,W)),o&2){let t=p(3);s(),V(t.savedCustomReports)}}function q2(o,d){if(o&1&&(e(0,`
6062            `),n(1,"div",17),e(2,`
6063              `),n(3,"h2"),e(4,"Saved Reports"),i(),e(5,`
6064              `),_(6,z2,3,0),i(),e(7,`
6065          `)),o&2){let t=p(2);s(6),x(t.savedCustomReports?6:-1)}}function $2(o,d){if(o&1&&(e(0,`
6066        `),n(1,"div",16),e(2,`
6067          `),_(3,q2,8,1),i(),e(4,`
6068      `)),o&2){let t=p();s(3),x((t.savedCustomReports==null?null:t.savedCustomReports.length)>0?3:-1)}}var Hr=(()=>{let d=class d{set currentReportID(l){this._currentReportID=l}get currentReportID(){return this._currentReportID}constructor(l,r,a,b,u,L,he,ut){this.siteDataService=l,this.reportService=r,this.route=a,this.router=b,this.authorizeService=u,this.customReportService=L,this.dashboardService=he,this.dashboardConfigService=ut,this.clubFinanceReports=[],this.registrationsReports=[],this.playersReports=[],this.miscReports=[],this.customReportMenu=[],this.savedCustomReportsMap={},this.pinnedReportIds=[],this.showCustomReportError=!1,this.loadingCustomReports=!1,this.Permission=ee,this.isSuperAdmin=!1,this.destroy$=new ge}ngOnInit(){this.dashboardService.dashboardFilters||(this.dashboardService.dashboardFilters={});let l=[this.reportService.getReportCategories()],r=this.customReportService.getClubAndUserQueries().pipe(mn(1));this.authorizeService.getUser().subscribe(a=>{a&&(this.user=a,a&&this.authorizeService.isSuperAdmin(a.role)&&(this.isSuperAdmin=!0))}),this.user?.[ee.CustomReporting]&&this.dashboardConfigService.getPinnedReportIds().pipe(Z(this.destroy$)).subscribe({next:a=>{this.pinnedReportIds=[...a],this.dashboardService.dashboardFilters||(this.dashboardService.dashboardFilters={}),this.dashboardService.dashboardFilters.pinnedReportIds=[...this.pinnedReportIds],r.pipe(Z(this.destroy$)).subscribe({next:b=>{let u=b.queries.concat(b.templates);this.savedCustomReports=this.sortReportsByPinned(u)},error:()=>{this.showCustomReportError=!0}})},error:()=>{this.showCustomReportError=!0}}),this.user[ee.CustomReporting]&&(l.push(r),l.push(this.dashboardConfigService.getAllDashboardFilterValues())),oe(l).subscribe({next:a=>{if(this.reportService.reportCategories=a[0],this.user[ee.CustomReporting]){if(a[2]){let L=a[2].find(he=>he.dashboardFilterTypeId===an.SAVED_REPORTS_PINNED);if(L&&L.filterValue)try{this.pinnedReportIds=JSON.parse(L.filterValue),this.dashboardService.dashboardFilters||(this.dashboardService.dashboardFilters={}),this.dashboardService.dashboardFilters.pinnedReportIds||(this.dashboardService.dashboardFilters.pinnedReportIds=this.pinnedReportIds)}catch(he){console.warn("Failed to parse pinned reports filter:",he),this.pinnedReportIds=[]}else this.pinnedReportIds=[]}else this.pinnedReportIds=[];let b=a[1].queries.concat(a[1].templates);this.savedCustomReports=this.sortReportsByPinned(b)}
6068this.siteDataService.hideSiteLoader()},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem loading reports.")}})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}routeToCustomReport(){this.router.navigate([this.currentReportID],{relativeTo:this.route})}routeToEditCustomReport(){this.router.navigate([this.currentReportID],{relativeTo:this.route,state:{edit:!0}})}goToNew(l){l?this.router.navigate(["custom-report-query/new"],{relativeTo:this.route,state:{model:l}}):this.router.navigate(["custom-report-query/new"],{relativeTo:this.route})}sortReportsByPinned(l){return l.sort((r,a)=>{let b=this.isReportPinned(r.value),u=this.isReportPinned(a.value);return b&&!u?-1:!b&&u?1:r.label.localeCompare(a.label)})}savePinnedReports(){this.dashboardService.updatePinnedReportIds([...this.pinnedReportIds]).subscribe({next:()=>{},error:l=>{console.warn("Failed to save pinned reports:",l)}})}isReportPinned(l){return this.pinnedReportIds.includes(l)}togglePin(l,r){r.preventDefault(),r.stopPropagation();let a=l.value;this.pinnedReportIds.includes(a)?this.pinnedReportIds=this.pinnedReportIds.filter(u=>u!==a):this.pinnedReportIds=[...this.pinnedReportIds,a],this.savedCustomReports=this.sortReportsByPinned([...this.savedCustomReports]),this.dashboardService.setDashboardFilter(an.SAVED_REPORTS_PINNED,this.pinnedReportIds).subscribe({next:()=>{this.dashboardService.dashboardFilters||(this.dashboardService.dashboardFilters={}),this.dashboardService.dashboardFilters.pinnedReportIds=[...this.pinnedReportIds],this.dashboardService.triggerUpdate("pinned-reports-updated")},error:u=>{console.error("Failed to save pinned reports:",u)}})}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(It),w(it),w(Pe),w(Wi),w(mt),w(Bi))},d.\u0275cmp=A({type:d,selectors:[["app-reports-landing"]],standalone:!1,decls:21,vars:4,consts:[["role","main"],[1,"ml-0"],[1,"d-flex","justify-content-between","border-bottom","mb-3"],["pageTitle","Reports",3,"hideBorder"],[1,"row"],[1,"col-md-7"],["icon","far fa-plus",1,"btn","btn-primary","btn-icon-plus","mb-3",3,"click"],[3,"ngClass"],[1,"report-category-item","bg-grey-lt"],[1,"d-flex","align-items-center"],[1,"report-category-item--actions"],[1,"btn","btn-sm","mr-2",3,"routerLink","state"],[1,"btn","btn-sm","btn-green-solid",3,"routerLink","state"],["label","Custom","styleClass","border-all","size","small",1,"d-inline-block","ml-3"],[1,"mt-3"],[1,"btn","btn-sm","mr-2",3,"routerLink"],[1,"col-md-5"],[1,"card","mb-4","settings-card"],[1,"d-flex","justify-content-between","align-items-center","py-1",3,"ngClass"],[1,"report-actions"],[1,"btn","btn-naked","btn-sm","py-0","mr-2",3,"click","title"],[1,"fa-thumbtack","py-1","text-medium"],[1,"flex-grow-1","d-flex"],[1,"flex-grow-1"],[1,"report-link","text-medium","flex-grow-1",3,"routerLink","state"],[1,"d-flex","align-items-center","flex-grow-1"],[1,"report-title","mb-0"]],template:function(r,a){r&1&&(n(0,"main",0),e(1,`
6069  `),n(2,"div",1),e(3,`
6070    `),n(4,"div",2),e(5,`
6071      `),g(6,"app-admin-header",3),e(7,`
6072      `),_(8,B2,7,0),i(),e(9,`
6073    `),n(10,"div",4),e(11,`
6074      `),n(12,"div",5),e(13,`
6075        `),N(14,G2,4,1,null,null,W),_(16,j2,19,4),i(),e(17,`
6076      `),_(18,$2,5,1),i(),e(19,`
6077  `),i(),e(20,`
6078`),i()),r&2&&(s(6),m("hideBorder",!0),s(2),x(a.user[a.Permission.CustomReporting]?8:-1),s(6),V(a.reportService.reportCategories),s(2),x(a.user[a.Permission.NewCustomReporting]?16:-1),s(2),x(a.user[a.Permission.CustomReporting]?18:-1))},dependencies:[Ge,pe,ht,Qe],styles:[".report-category-item[_ngcontent-%COMP%]{padding:.35rem .5rem;display:flex;justify-content:space-between;align-items:center;font-size:var(--text-medium);margin-bottom:.25rem}.report-category-item[_ngcontent-%COMP%]:hover   .report-category-item--actions[_ngcontent-%COMP%]{opacity:1}.report-category-item[_ngcontent-%COMP%]   .report-category-item--actions[_ngcontent-%COMP%]{opacity:0;transition:opacity .1s linear}.report-category-item[_ngcontent-%COMP%]   .btn-sm[_ngcontent-%COMP%]{padding:4px 8px}"]});let o=d;return o}
6078)();var di=(function(o){return o[o.DAILY=0]="DAILY",o[o.WEEKLY=1]="WEEKLY",o[o.MONTHLY=2]="MONTHLY",o})(di||{}),pi=(function(o){return o[o.MONTHLY_DAY_OF_MONTH=0]="MONTHLY_DAY_OF_MONTH",o[o.MONTHLY_LAST=1]="MONTHLY_LAST",o[o.MONTHLY_FIRST_BUSINESS=2]="MONTHLY_FIRST_BUSINESS",o})(pi||{});var J2=["optionsMenu"],X2=()=>({width:"auto"});function Z2(o,d){o&1&&(e(0,`
6079        `),n(1,"tr"),e(2,`
6080          `),n(3,"th",13),e(4,`
6081            Schedule Name
6082            `),g(5,"p-sortIcon",14),e(6,`
6083          `),i(),e(7,`
6084          `),n(8,"th",15),e(9,`
6085            Frequency
6086            `),g(10,"p-sortIcon",16),e(11,`
6087          `),i(),e(12,`
6088          `),n(13,"th",17),e(14,`
6089            Status
6090            `),g(15,"p-sortIcon",18),e(16,`
6091          `),i(),e(17,`
6092          `),n(18,"th",19),e(19,`
6093            Last Run
6094            `),g(20,"p-sortIcon",20),e(21,`
6095          `),i(),e(22,`
6096          `),g(23,"th"),e(24,`
6097        `),i(),e(25,`
6098      `))}function Q2(o,d){if(o&1){let t=D();e(0,`
6099              `),n(1,"a",26),T("click",function(){f(t);let r=p().$implicit,a=p();return h(a.downloadReport(r))}),e(2),i(),e(3,`
6100            `)}if(o&2){let t=p().$implicit;s(2),I(`
6101                `,t.lastRun.displayDate??"Not run yet",`
6102              `)}}function ey(o,d){o&1&&(e(0,`
6103                  `),g(1,"i",27),e(2,`
6104                `))}function ty(o,d){o&1&&(e(0,`
6105                  `),g(1,"i",28),e(2,`
6106                `))}function iy(o,d){if(o&1&&(e(0,`
6107              `),n(1,"span"),e(2),_(3,ey,3,0),_(4,ty,3,0),i(),e(5,`
6108            `)),o&2){let t=p().$implicit;s(2),I(`
6109                `,(t.lastRun==null?null:t.lastRun.displayDate)??"Not run yet",`
6110                `),s(),x(t.lastRun&&t.lastRun.hasError?3:-1),s(),x(t.lastRun&&t.lastRun.deletedOn?4:-1)}}function ny(o,d){if(o&1){let t=D();e(0,`
6111                `),n(1,"button",29),T("click",function(){f(t);let r=p().$implicit,a=p();return h(a.downloadReport(r))}),e(2,`
6112                  `),g(3,"i",30),e(4,`
6113                  `),n(5,"div",25),e(6,"Download"),i(),e(7,`
6114                `),i(),e(8,`
6115              `)}}function oy(o,d){if(o&1){let t=D();e(0,`
6116        `),n(1,"tr"),e(2,`
6117          `),n(3,"td"),e(4),i(),e(5,`
6118          `),n(6,"td"),e(7),i(),e(8,`
6119          `),n(9,"td"),e(10,`
6120            `),n(11,"span",21),e(12),i(),e(13,`
6121          `),i(),e(14,`
6122          `),n(15,"td"),e(16,`
6123            `),_(17,Q2,4,1),_(18,iy,6,3),i(),e(19,`
6124          `),n(20,"td"),e(21,`
6125            `),n(22,"div",22),e(23,`
6126              `),_(24,ny,9,0),n(25,"button",23),T("click",function(r){let a=f(t).$implicit,b=p();return h(b.toggleOptionsMenu(a,r))}),e(26,`
6127                `),g(27,"i",24),e(28,`
6128                `),n(29,"div",25),e(30,"Options"),i(),e(31,`
6129              `),i(),e(32,`
6130            `),i(),e(33,`
6131          `),i(),e(34,`
6132        `),i(),e(35,`
6133      `)}if(o&2){let t=d.$implicit,l=p();s(4),c(t.name),s(3),c(l.getFormattedFrequency(t)),s(4),m("ngClass",t.status==="active"?"pill-success":"pill-secondary"),s(),I(`
6134              `,t.status,`
6135            `),s(5),x(t.lastRun&&t.lastRun.isAvailable?17:-1),s(),x(!t.lastRun||!t.lastRun.isAvailable?18:-1),s(6),x(t.lastRun&&t.lastRun.isAvailable?24:-1)}}function ry(o,d){if(o&1&&(e(0,`
6136        `),n(1,"tr"),e(2,`
6137          `),n(3,"td",31),e(4,"No Scheduled Reports Available"),i(),e(5,`
6138        `),i(),e(6,`
6139      `)),o&2){let t=d.$implicit;s(3),J("colspan",t?t.length:5)}}function ay(o,d){if(o&1){let t=D();e(0,`
6140  `),n(1,"app-yes-no-modal",32),T("onYesSelect",function(){f(t);let r=p();return h(r.canDeactivate(r.selectedRow))})("onNoSelect",function(){f(t);let r=p();return h(r.showCanDeactivate=!1)}),e(2,`
6141    `),n(3,"div",33),e(4,`
6142      `),n(5,"app-inline-alert",34),e(6,`
6143        `),n(7,"div"),e(8,`
6144          Are you sure you want to delete the schedule `),n(9,"strong"),e(10),i(),e(11,`? This action cannot be undone.
6145        `),i(),e(12,`
6146      `),i(),e(13,`
6147    `),i(),e(14,`
6148  `),i(),e(15,`
6149`)}if(o&2){let t=p();s(),m("alertIsInline",!1),s(4),m("isInline",!0),s(5),I("'",t.selectedRow.name,"'")}}var zr=(()=>{let d=class d{constructor(l,r,a){this.siteDataService=l,this.router=r,this.reportService=a,this.unsubscribe$=new ge,this.getLocalTimeZone=Ii,this.selectedRow=null,this.showCanDeactivate=!1,this.reportSchedules=[],this.sortedReportSchedules=[],this.sortField="",this.sortOrder=1,this.options=[],this.loading=!1,this.daysOfWeek=["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
6149ay","Saturday"]}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnInit(){this.loading=!0,this.reportService.getScheduledReports().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{new Date().setHours(23,59,59,999),this.reportSchedules=l.map(a=>Tt(vt({},a),{status:a.isActive?"active":"inactive"})),this.sortedReportSchedules=[...this.reportSchedules],this.loading=!1,this.siteDataService.hideSiteLoader()},error:l=>{console.error("Error fetching report schedules",l),this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to load scheduled reports."),this.siteDataService.hideSiteLoader()}})}getFormattedFrequency(l){if(!l)return"";switch(l.frequencyOptionID){case di.DAILY:return"Daily";case di.WEEKLY:return l.dayOfWeek!==null&&l.dayOfWeek>=0&&l.dayOfWeek<=6?`Weekly on ${this.daysOfWeek[l.dayOfWeek]}`:"Weekly";case di.MONTHLY:if(l.frequencySubOptionID===pi.MONTHLY_DAY_OF_MONTH){if(l.dayOfMonth){let r="th";return l.dayOfMonth%10===1&&l.dayOfMonth%100!==11?r="st":l.dayOfMonth%10===2&&l.dayOfMonth%100!==12?r="nd":l.dayOfMonth%10===3&&l.dayOfMonth%100!==13&&(r="rd"),`Monthly on the ${l.dayOfMonth}${r} day`}return"Monthly on specific day"}else{if(l.frequencySubOptionID===pi.MONTHLY_FIRST_BUSINESS)return"Monthly on first business day";if(l.frequencySubOptionID===pi.MONTHLY_LAST)return"Monthly on last day"}return"Monthly";default:return"Custom"}}onSort(l){this.sortField=l.field,this.sortOrder=l.order,this.sortedReportSchedules=[...this.reportSchedules].sort((r,a)=>{let b=r[this.sortField],u=a[this.sortField];return b==null&&(b=""),u==null&&(u=""),typeof b=="string"&&typeof u=="string"&&(b=b.toLowerCase(),u=u.toLowerCase()),b<u?-1*this.sortOrder:b>u?1*this.sortOrder:0})}downloadReport(l){if(!l.lastRun||!l.lastRun.isAvailable){this.siteDataService.showSiteErrorAlert("Report file is not available for download.");return}this.reportService.downloadReport(l.lastRun.scheduledReportId,l.lastRun.scheduledReportRunId,l.lastRun.fileName).pipe(Z(this.unsubscribe$)).subscribe({next:()=>{},error:r=>{console.error("Error downloading report",r),this.siteDataService.showSiteErrorAlert("Unable to download report file.")}})}createReport(){this.router.navigateByUrl("/admin/reports/scheduled-reports/create")}canDeactivate(l){this.siteDataService.showSiteLoader(),this.reportService.deleteReportSchedule(l.reportScheduleID).pipe(Z(this.unsubscribe$)).subscribe({next:r=>{r.success?(this.reportSchedules=this.reportSchedules.filter(a=>a.reportScheduleID!==l.reportScheduleID),this.sortedReportSchedules=this.sortedReportSchedules.filter(a=>a.reportScheduleID!==l.reportScheduleID),this.siteDataService.showSiteSuccessAlert(`Schedule "${l.name}" has been deleted.`)):this.siteDataService.showSiteErrorAlert("Failed to delete schedule."),this.siteDataService.hideSiteLoader()},error:r=>{console.error("Error deleting schedule",r),console.log("--- ERROR DELETING SCHEDULE ---"),console.log(r),this.siteDataService.showSiteErrorAlert("An error occurred while deleting the schedule."),this.siteDataService.hideSiteLoader()}}),this.showCanDeactivate=!1}toggleOptionsMenu(l,r){let a=[];this.selectedRow=l,l.lastRun&&l.lastRun.isAvailable&&a.push({label:"Download Latest",icon:"fa fa-download",command:()=>{this.downloadReport(l)}}),a.push({label:l.isActive?"Deactivate":"Activate",icon:l.isActive?"fa fa-power-off":"fa fa-play",command:()=>{this.siteDataService.showSiteLoader(),this.reportService.setReportScheduleActive(l.reportScheduleID,!l.isActive).pipe(Z(this.unsubscribe$)).subscribe({next:b=>{if(b.success){l.isActive=!l.isActive;let u=new Date;u.setHours(23,59,59,999),l.status=l.isActive&&new Date(l.startDate)<=u?"active":"inactive",this.siteDataService.showSiteSuccessAlert(l.isActive?`Schedule "${l.name}" has been activated.`:`Schedule "${l.name}" has been deactivated.`)}else this.siteDataService.showSiteErrorAlert("Failed to update schedule status.");this.siteDataService.hideSiteLoader()},error:b=>{console.error("Error updating schedule status",b),this.siteDataService.showSiteErrorAlert("An error occurred while updating schedule status."),this.siteDataService.hide
6149SiteLoader()}})}}),a.push({label:"Edit",icon:"fa fa-edit",command:()=>{this.router.navigate(["/admin/reports/scheduled-reports",l.reportScheduleID,"edit"])}}),a.push({label:"Duplicate",icon:"fa fa-clone",command:()=>{this.router.navigate(["/admin/reports/scheduled-reports/duplicate",l.reportScheduleID])}}),a.push({label:"Delete",icon:"fa-regular fa-circle-x",command:()=>{this.showCanDeactivate=!0}}),this.options=[{label:"Options",items:a}],this.optionsMenu.toggle(r)}};d.\u0275fac=function(r){return new(r||d)(w(k),w(it),w(M))},d.\u0275cmp=A({type:d,selectors:[["app-scheduled-reports"]],viewQuery:function(r,a){if(r&1&&Wt(J2,5),r&2){let b;Ut(b=Yt())&&(a.optionsMenu=b.first)}},standalone:!1,decls:39,vars:13,consts:[["optionsMenu",""],["pageTitle","Scheduled Reports","primaryBtnText","New Scheduled Report",3,"primaryBtnAction"],[1,"tabs"],["role","tablist",1,"tab-nav","no-bullets","inline-list","d-flex"],["routerLinkActive","active",1,"nav-item"],["role","tab","aria-controls","/","aria-selected","true",1,"nav-link",3,"routerLink"],["role","tab","aria-controls","archive","aria-selected","true",1,"nav-link",3,"routerLink"],[1,"card","table-card"],["styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"sortFunction","paginator","alwaysShowPaginator","value","rows","customSort"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["appendTo","body",3,"model","popup"],["pSortableColumn","name"],["field","name"],["pSortableColumn","frequency"],["field","frequency"],["pSortableColumn","status"],["field","status"],["pSortableColumn","lastRun"],["field","lastRun"],[1,"pill","pill-success",3,"ngClass"],[1,"d-flex"],["type","button",1,"btn","btn-sm","btn-tertiary",3,"click"],[1,"fa-solid","fa-ellipsis"],[1,"sr-only"],["href","javascript:void(0)",1,"nav-link","pl-0",3,"click"],["title","Error generating report",1,"fa","fa-exclamation-triangle","text-danger","ml-2"],["title","Report was deleted",1,"fa","fa-trash-alt","ml-2"],["type","button","title","Download",1,"btn","btn-sm","btn-tertiary","mr-2",3,"click"],[1,"fa-solid","fa-download"],[2,"text-align","left"],["dialogClass","standardWidthDialog","headerText","Delete Scheduled Report?","noButtonText","Cancel","modalText","","yesButtonText","Delete",3,"onYesSelect","onNoSelect","alertIsInline"],[1,"text-medium","fw-600"],["alertType","warning",3,"isInline"]],template:function(r,a){r&1&&(n(0,"main"),e(1,`
6150  `),n(2,"app-admin-header",1),T("primaryBtnAction",function(){return a.createReport()}),i(),e(3,`
6151
6152  `),n(4,"div",2),e(5,`
6153    `),n(6,"ul",3),e(7,`
6154      `),n(8,"li",4),e(9,`
6155        `),n(10,"a",5),e(11,"Latest Reports"),i(),e(12,`
6156      `),i(),e(13,`
6157      `),n(14,"li",4),e(15,`
6158        `),n(16,"a",6),e(17,"Reports Archive"),i(),e(18,`
6159      `),i(),e(19,`
6160    `),i(),e(20,`
6161  `),i(),e(21,`
6162
6163  `),n(22,"div",7),e(23,`
6164    `),n(24,"p-table",8),T("sortFunction",function(u){return a.onSort(u)}),e(25,`
6165      `),R(26,Z2,26,0,"ng-template",9),e(27,`
6166      `),R(28,oy,36,7,"ng-template",10),e(29,`
6167      `),R(30,ry,7,1,"ng-template",11),e(31,`
6168    `),i(),e(32,`
6169  `),i(),e(33,`
6170`),i(),e(34,`
6171
6172`),g(35,"p-menu",12,0),e(37,`
6173`),_(38,ay,16,3)),r&2&&(s(10),m("routerLink","./"),s(6),m("routerLink","./archive"),s(8),m("paginator",!0)("alwaysShowPaginator",!1)("value",a.sortedReportSchedules)("rows",25)("customSort",!0),s(11),_t(Le(12,X2)),m("model",a.options)("popup",!0),s(3),x(a.showCanDeactivate&&a.selectedRow?38:-1))},dependencies:[Ge,pe,Di,z,We,Qe,Kn,H,$,K,Mi],encapsulation:2});let o=d;return o}
6173)();function ly(o,d){o&1&&(e(0,`
6174                                `),n(1,"small",11),e(2,"Report is required"),i(),e(3,`
6175                                `))}function sy(o,d){o&1&&(e(0,`
6176                                `),n(1,"small",21),e(2,`
6177                                    At least one club must be selected
6178                                `),i(),e(3,`
6179                                `))}function dy(o,d){if(o&1&&(e(0,`
6180                    `),n(1,"div",7),e(2,`
6181                        `),n(3,"div",8),e(4,`
6182                            `),n(5,"div",18),e(6,`
6183                                `),n(7,"label",19),e(8,`
6184                                    Clubs
6185                                    `),n(9,"span",11),e(10,"*"),i(),e(11,`
6186                                `),i(),e(12,`
6187                                `),n(13,"div",12),e(14,`
6188                                    `),g(15,"p-multiSelect",20),e(16,`
6189                                `),i(),e(17,`
6190                            `),i(),e(18,`
6191                            `),n(19,"div",9),e(20,`
6192                                `),_(21,sy,4,0),i(),e(22,`
6193                        `),i(),e(23,`
6194                    `),i(),e(24,`
6195                    `)),o&2){let t,l=p();s(15),m("options",l.flattenedClubs)("filter",!0),s(6),x(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("clubIDs"))==null||t.errors==null)&&t.errors.required&&(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("clubIDs"))==null)&&t.touched)?21:-1)}}function py(o,d){if(o&1&&(e(0,`
6196                                                    `),g(1,"app-tooltip",42),e(2,`
6197                                                    `)),o&2){let t=p().$implicit;s(),m("tooltipText",t.toolTipText)}}function my(o,d){if(o&1){let t=D();e(0,`
6198                                                `),n(1,"div",39),e(2,`
6199                                                    `),n(3,"p-radioButton",40),T("onClick",function(){let r=f(t).$implicit,a=p(4);return h(a.onPeriodOptionChange({value:r.reportSchedulePeriodOptionID}))}),i(),e(4,`
6200                                                    `),n(5,"label",41),e(6),i(),e(7,`
6201                                                    `),_(8,py,3,1),i(),e(9,`
6202                                                `)}if(o&2){let t=d.$implicit;s(3),m("inputId","period_"+t.reportSchedulePeriodOptionID)("value",t.reportSchedulePeriodOptionID),s(2),m("for","period_"+t.reportSchedulePeriodOptionID),s(),I(`
6203                                                        `,t.description,`
6204                                                    `),s(2),x(t.toolTipText?8:-1)}}function cy(o,d){o&1&&(e(0,`
6205                                `),n(1,"small",43),e(2,`
6206                                    Period option is required
6207                                `),i(),e(3,`
6208                                `))}function uy(o,d){if(o&1&&(e(0,`
6209                            `),n(1,"div",34),e(2,`
6210                                `),n(3,"div",8),e(4,`
6211                                    `),n(5,"div",35),e(6,`
6212                                        `),n(7,"label",36),e(8,`
6213                                            Data as of
6214                                            `),n(9,"span",11),e(10,"*"),i(),e(11,`
6215                                        `),i(),e(12,`
6216                                        `),n(13,"div",37),e(14,`
6217                                            `),n(15,"div",38),e(16,`
6218                                                `),N(17,my,10,5,null,null,W),i(),e(19,`
6219                                        `),i(),e(20,`
6220                                    `),i(),e(21,`
6221                                `),i(),e(22,`
6222                                `),_(23,cy,4,0),i(),e(24,`
6223                            `)),o&2){let t,l=p(3);s(17),V(l.availablePeriodOptions),s(6),x(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("periodOptionID"))==null||t.errors==null)&&t.errors.required&&(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("periodOptionID"))==null)&&t.touched)?23:-1)}}function _y(o,d){o&1&&(e(0,`
6224                            `),n(1,"app-inline-alert",44),e(2,"This report has no available period options"),i(),e(3,`
6225                            `)),o&2&&(s(),m("isInline",!0))}function xy(o,d){o&1&&(e(0,`
6226                                    `),n(1,"span"),e(2,"Number of days is required"),i(),e(3,`
6227                                    `))}function gy(o,d){o&1&&(e(0,`
6228                                    `),n(1,"span"),e(2,"Number must be between 1 and 365"),i(),e(3,`
6229                                    `))}function fy(o,d){if(o&1&&(e(0,`
6230                                `),n(1,"small",49),e(2,`
6231                                    `),_(3,xy,4,0),_(4,gy,4,0),i(),e(5,`
6232                                `)),o&2){let t,l,r=p(4);s(3),x(!(r.reportScheduleForm==null||(t=r.reportScheduleForm.get("nDays"))==null||t.errors==null)&&t.errors.required?3:-1),s(),x(!(r.reportScheduleForm==null||(l=r.reportScheduleForm.get("nDays"))==null||l.errors==null)&&l.errors.min||!(r.reportScheduleForm==null||(l=r.reportScheduleForm.get("nDays"))==null||l.errors==null)&&l.errors.max?4:-1)}}function hy(o,d){if(o&1&&(e(0,`
6233                            `),n(1,"div",45),e(2,`
6234                                `),n(3,"div",35),e(4,`
6235                                    `),n(5,"label",46),e(6,`
6236                                        Number of days
6237                                        `),n(7,"span",11),e(8,"*"),i(),e(9,`
6238                                    `),i(),e(10,`
6239                                    `),n(11,"div",47),e(12,`
6240                                        `),g(13,"input",48),e(14,`
6241                                    `),i(),e(15,`
6242                                `),i(),e(16,`
6243                                `),_(17,fy,6,2),i(),e(18,`
6244                            `)),o&2){let t,l=p(3);s(17),x(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("nDays"))==null)&&t.errors&&(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("nDays"))==null)&&t.touched)?17:-1)}}function Cy(o,d){if(o&1&&(e(0,`
6245            `),n(1,"section",3),e(2,`
6246                `),n(3,"div",4),e(4,`
6247                    `),n(5,"h5",5),e(6,"Reporting Period Date"),i(),e(7,`
6248                    `),n(8,"p"),e(9),i(),e(10,`
6249                `),i(),e(11,`
6250                `),n(12,"div",6),e(13,`
6251                    `),n(14,"div",9),e(15,`
6252                        `),n(16,"div",33),e(17,`
6253                            `),_(18,uy,25,1),_(19,_y,4,1),_(20,hy,19,1),i(),e(21,`
6254                    `),i(),e(22,`
6255                `),i(),e(23,`
6256            `),i(),e(24,`
6257            `)),o&2){let t,l=p(2);s(9),c(l.selectedReport.periodDescription),s(9),x((l.availablePeriodOptions==null?null:l.availablePeriodOptions.length)>0?18:-1),s(),x((l.availablePeriodOptions==null?null:l.availablePeriodOptions.length)===0?19:-1),s(),x((l.reportScheduleForm==null||(t=l.reportScheduleForm.get("periodOptionID"))==null?null:t.value)===3?20:-1)}}function Sy(o,d){o&1&&(e(0,`
6258                                `),n(1,"small",49),e(2,`
6259                                    Frequency is required
6260                                `),i(),e(3,`
6261                                `))}function yy(o,d){o&1&&(e(0,`
6262                                `),n(1,"small",49),e(2,`
6263                                    Day of week is required
6264                                `),i(),e(3,`
6265                                `))}function by(o,d){if(o&1&&(e(0,`
6266                    `),n(1,"div",22),e(2,`
6267                        `),n(3,"div",7),e(4,`
6268                            `),n(5,"div",8),e(6,`
6269                                `),n(7,"label",50),e(8,`
6270                                    Day of Week
6271                                    `),n(9,"span",11),e(10,"*"),i(),e(11,`
6272                                `),i(),e(12,`
6273                                `),g(13,"p-select",51),e(14,`
6274                                `),_(15,yy,4,0),i(),e(16,`
6275                        `),i(),e(17,`
6276                    `),i(),e(18,`
6277                    `)),o&2){let t,l=p(2);s(13),m("options",l.daysOfWeek),s(2),x(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("dayOfWeek"))==null||t.errors==null)&&t.errors.required&&(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("dayOfWeek"))==null)&&t.touched)?15:-1)}}function vy(o,d){o&1&&(e(0,`
6278                                `),n(1,"small",49),e(2,`
6279                                    Monthly option is required
6280                                `),i(),e(3,`
6281                                `))}function Ty(o,d){if(o&1){let t=D();e(0,`
6282                    `),n(1,"div",22),e(2,`
6283                        `),n(3,"div",7),e(4,`
6284                            `),n(5,"div",8),e(6,`
6285                                `),n(7,"label",52),e(8,`
6286                                    Monthly Schedule
6287                                    `),n(9,"span",11),e(10,"*"),i(),e(11,`
6288                                `),i(),e(12,`
6289                                `),n(13,"p-select",53),T("onChange",function(r){f(t);let a=p(2);return h(a.onMonthlySubOptionChange(r))}),i(),e(14,`
6290                                `),_(15,vy,4,0),i(),e(16,`
6291                        `),i(),e(17,`
6292                    `),i(),e(18,`
6293                    `)}if(o&2){let t,l=p(2);s(13),m("options",l.scheduledReportMetadata==null||l.scheduledReportMetadata.frequencyOptions[2]==null?null:l.scheduledReportMetadata.frequencyOptions[2].subOptions),s(2),x(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("frequencySubOptionID"))==null||t.errors==null)&&t.errors.required&&(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("frequencySubOptionID"))==null)&&t.touched)?15:-1)}}function Ey(o,d){o&1&&(e(0,`
6294                                    `),n(1,"span"),e(2,"Day of month is required"),i(),e(3,`
6295                                    `))}function wy(o,d){o&1&&(e(0,`
6296                                    `),n(1,"span"),e(2,`
6297                                        Day of month must be between 1 and 31
6298                                    `),i(),e(3,`
6299                                    `))}function Fy(o,d){if(o&1&&(e(0,`
6300                                `),n(1,"small",49),e(2,`
6301                                    `),_(3,Ey,4,0),_(4,wy,4,0),i(),e(5,`
6302                                `)),o&2){let t,l,r=p(3);s(3),x(!(r.reportScheduleForm==null||(t=r.reportScheduleForm.get("dayOfMonth"))==null||t.errors==null)&&t.errors.required?3:-1),s(),x(!(r.reportScheduleForm==null||(l=r.reportScheduleForm.get("dayOfMonth"))==null||l.errors==null)&&l.errors.min||!(r.reportScheduleForm==null||(l=r.reportScheduleForm.get("dayOfMonth"))==null||l.errors==null)&&l.errors.max?4:-1)}}function Dy(o,d){if(o&1&&(e(0,`
6303                    `),n(1,"div",22),e(2,`
6304                        `),n(3,"div",7),e(4,`
6305                            `),n(5,"div",8),e(6,`
6306                                `),n(7,"label",54),e(8,`
6307                                    Day of Month
6308                                    `),n(9,"span",11),e(10,"*"),i(),e(11,`
6309                                `),i(),e(12,`
6310                                `),n(13,"div",36),e(14,`
6311                                    `),g(15,"input",55),e(16,`
6312                                `),i(),e(17,`
6313                                `),_(18,Fy,6,2),i(),e(19,`
6314                        `),i(),e(20,`
6315                    `),i(),e(21,`
6316                    `)),o&2){let t,l=p(2);s(18),x(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("dayOfMonth"))==null)&&t.errors&&(!(l.reportScheduleForm==null||(t=l.reportScheduleForm.get("dayOfMonth"))==null)&&t.touched)?18:-1)}}function Iy(o,d){o&1&&(e(0,`
6317                                `),n(1,"small",49),e(2,`
6318                                    Start date is required
6319                                `),i(),e(3,`
6320                                `))}function Ry(o,d){o&1&&(e(0,`
6321                        `),n(1,"small",56),e(2,"Schedule name is required"),i(),e(3,`
6322                        `))}function My(o,d){if(o&1){let t=D();e(0,`
6323            `),e(1,`
6324            `),_(2,Cy,25,4),n(3,"section",3),e(4,`
6325                `),n(5,"div",4),e(6,`
6326                    `),n(7,"h5",5),e(8,"Report Schedule"),i(),e(9,`
6327                    `),n(10,"p"),e(11,`
6328                        Set when and how often the report should run. Reports generate automatically at approximately
6329                        `),n(12,"strong"),e(13,"3am CT"),i(),e(14,`
6330                        the day after they are scheduled. For example, if you schedule a report to run on the 15th of
6331                        the month, it will generate early on the 16th to include all transactions from
6332                        the 15th.
6333                    `),i(),e(15,`
6334                `),i(),e(16,`
6335                `),n(17,"div",6),e(18,`
6336                    `),e(19,`
6337                    `),n(20,"div",22),e(21,`
6338                        `),n(22,"div",7),e(23,`
6339                            `),n(24,"div",8),e(25,`
6340                                `),n(26,"label",23),e(27,`
6341                                    Frequency
6342                                    `),n(28,"span",11),e(29,"*"),i(),e(30,`
6343                                `),i(),e(31,`
6344                                `),n(32,"p-select",24),T("onChange",function(r){f(t);let a=p();return h(a.onFrequencyChange(r))}),i(),e(33,`
6345                                `),_(34,Sy,4,0),i(),e(35,`
6346                        `),i(),e(36,`
6347                    `),i(),e(37,`
6348                    `),e(38,`
6349                    `),_(39,by,19,2),_(40,Ty,19,2),_(41,Dy,22,1),n(42,"div",22),e(43,`
6350                        `),n(44,"div",7),e(45,`
6351                            `),n(46,"div",8),e(47,`
6352                                `),n(48,"label",25),e(49,`
6353                                    Start Date
6354                                    `),n(50,"span",11),e(51,"*"),i(),e(52,`
6355                                `),i(),e(53,`
6356                                `),g(54,"p-datepicker",26),e(55,`
6357                                `),_(56,Iy,4,0),i(),e(57,`
6358                        `),i(),e(58,`
6359                    `),i(),e(59,`
6360                    `),e(60,`
6361                `),i(),e(61,`
6362            `),i(),e(62,`
6363            `),e(63,`
6364            `),n(64,"section",3),e(65,`
6365                `),n(66,"h5",5),e(67,"Schedule Name"),i(),e(68,`
6366                `),n(69,"div",6),e(70,`
6367                    `),n(71,"div",4),e(72,`
6368                        `),n(73,"label",27),e(74,`
6369                            Schedule Name
6370                            `),n(75,"span",11),e(76,"*"),i(),e(77,`
6371                        `),i(),e(78,`
6372                        `),g(79,"input",28),e(80,`
6373                    `),i(),e(81,`
6374                    `),n(82,"div",4),e(83,`
6375                        `),_(84,Ry,4,0),i(),e(85,`
6376                    `),e(86,`
6377                    `),n(87,"div",29),e(88,`
6378                        `),n(89,"div",8),e(90,`
6379                            `),n(91,"div",18),e(92,`
6380                                `),n(93,"div",4),e(94,`
6381                                    `),n(95,"div",30),e(96,`
6382                                        `),n(97,"label",31),e(98,"Email Notification"),i(),e(99,`
6383                                        `),g(100,"p-toggleswitch",32),e(101,`
6384                                    `),i(),e(102,`
6385                                `),i(),e(103,`
6386                            `),i(),e(104,`
6387                        `),i(),e(105,`
6388                    `),i(),e(106,`
6389                `),i(),e(107,`
6390            `),i(),e(108,`
6391            `)}if(o&2){let t,l,r,a=p();s(2),x(a.selectedReport&&!a.selectedReport.isCustomReport?2:-1),s(30),m("options",a.scheduledReportMetadata==null?null:a.scheduledReportMetadata.frequencyOptions),s(2),x(!(a.reportScheduleForm==null||(t=a.reportScheduleForm.get("frequencyOptionID"))==null||t.errors==null)&&t.errors.required&&(!(a.reportScheduleForm==null||(t=a.reportScheduleForm.get("frequencyOptionID"))==null)&&t.touched)?34:-1),s(5),x(a.showDayOfWeek?39:-1),s(),x(a.showMonthlyOptions?40:-1),s(),x(a.showDayOfMonth?41:-1),s(13),m("showIcon",!0)("minDate",a.minStartDate),s(2),x(!(a.reportScheduleForm==null||(l=a.reportScheduleForm.get("startDate"))==null||l.errors==null)&&l.errors.required&&(!(a.reportScheduleForm==null||(l=a.reportScheduleForm.get("startDate"))==null)&&l.touched)?56:-1),s(23),m("placeholder","Untitled \u2013 "+(a.selectedReport.description||"")),s(5),x(!(a.reportScheduleForm==null||(r=a.reportScheduleForm.get("name"))==null||r.errors==null)&&r.errors.required&&(!(a.reportScheduleForm==null||(r=a.reportScheduleForm.get("name"))==null)&&r.touched)?84:-1)}}function Ay(o,d){o&1&&(e(0,`
6392                        `),g(1,"span",57),e(2,`
6393                        `))}var Ji=(()=>{let d=class d{constructor(l,r,a,b){this.siteDataService=l,this.reportService=r,this.fb=a,this.route=b,this.unsubscribe$=new ge,this.loading=!1,this.availablePeriodOptions=[],this.isRangePeriod=!1,this.showDayOfWeek=!1,this.showMonthlyOptions=!1,this.showDayOfMonth=!1,this.isEdit=!1,this.isDuplicate=!1,this.reportId=null,this.duplicateId=null,this.daysOfWeek=[{label:"Sunday",value:0},{label:"Monday",value:1},{label:"Tuesday",value:2},{label:"Wednesday",value:3},{label:"Thursday",value:4},{label:"Friday",value:5},{label:"Saturday",value:6}],this.flattenedClubs=[],this.initForm()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnInit(){this.siteDataService.showSiteLoader(),this.minStartDate=new Date,this.minStartDate.setDate(this.minStartDate.getDate()-1),this.route.params.pipe(Z(this.unsubscribe$)).subscribe(r=>{r.id?(this.isEdit=!0,this.reportId=+r.id):r.duplicateId&&(this.isDuplicate=!0,this.duplicateId=+r.duplicateId)});let l=this.reportService.getScheduledReportMetadata().pipe(Z(this.unsubscribe$));if(this.isEdit&&this.reportId){let r=this.reportService.getScheduledReport(this.reportId).pipe(Z(this.unsubscribe$));oe({metadata:l,reportSchedule:r}).subscribe({next:a=>{this.scheduledReportMetadata=a.metadata,this.setReportDisplayLabels(),this.flattenedClubs=this.flattenClubTree(a.metadata.clubs),this.scheduledReport=a.reportSchedule,this.populateFormWithExistingData(a.reportSchedule),this.siteDataService.hide
6393SiteLoader()},error:a=>{console.error("Error fetching report data",a),this.siteDataService.showSiteErrorAlert("Unable to load report data."),this.siteDataService.hideSiteLoader()}})}else if(this.isDuplicate&&this.duplicateId){let r=this.reportService.getScheduledReport(this.duplicateId).pipe(Z(this.unsubscribe$));oe({metadata:l,reportSchedule:r}).subscribe({next:a=>{this.scheduledReportMetadata=a.metadata,this.setReportDisplayLabels(),this.flattenedClubs=this.flattenClubTree(a.metadata.clubs),this.scheduledReport=Tt(vt({},a.reportSchedule),{reportScheduleID:null}),this.scheduledReport.name=`Copy of ${this.scheduledReport.name}`,this.populateFormWithExistingData(this.scheduledReport),this.siteDataService.hideSiteLoader()},error:a=>{console.error("Error fetching report data for duplication",a),this.siteDataService.showSiteErrorAlert("Unable to load report data for duplication."),this.siteDataService.hideSiteLoader()}})}else l.subscribe({next:r=>{this.scheduledReportMetadata=r,this.setReportDisplayLabels(),this.flattenedClubs=this.flattenClubTree(r.clubs),this.flattenedClubs.length===1&&this.reportScheduleForm.get("clubIDs").setValue([this.flattenedClubs[0].clubID]),this.siteDataService.hideSiteLoader()},error:r=>{console.error("Error fetching report schedule metadata",r),this.siteDataService.showSiteErrorAlert("Unable to load report configuration data."),this.siteDataService.hideSiteLoader()}})}initForm(){this.reportScheduleForm=this.fb.group({name:["",tt.required],reportID:[null,tt.required],clubIDs:[[],tt.required],periodOptionID:[null],nDays:[null],frequencyOptionID:[null,tt.required],frequencySubOptionID:[null],dayOfWeek:[null],dayOfMonth:[null],startDate:[new Date,tt.required],sendEmail:[!0],isActive:[!0]})}onReportChange(l){let r=l.value;this.selectedReport=this.scheduledReportMetadata.reports.find(a=>a.reportID===r),this.selectedReport?this.selectedReport.isCustomReport?(this.availablePeriodOptions=[],this.isRangePeriod=!1,this.reportScheduleForm.get("periodOptionID").clearValidators(),this.reportScheduleForm.get("periodOptionID").setValue(null),this.reportScheduleForm.get("nDays").clearValidators(),this.reportScheduleForm.get("nDays").setValue(null),this.reportScheduleForm.get("periodOptionID").updateValueAndValidity(),this.reportScheduleForm.get("nDays").updateValueAndValidity()):(this.availablePeriodOptions=this.selectedReport.periodOptions,this.isRangePeriod=this.availablePeriodOptions.some(a=>a.isRange),this.reportScheduleForm.get("periodOptionID").setValidators([tt.required]),this.reportScheduleForm.get("periodOptionID").setValue(null),this.reportScheduleForm.get("nDays").setValue(null),this.reportScheduleForm.get("periodOptionID").updateValueAndValidity(),this.reportScheduleForm.get("nDays").updateValueAndValidity()):this.availablePeriodOptions=[]}setReportDisplayLabels(){this.scheduledReportMetadata?.reports?.length&&(this.scheduledReportMetadata.reports=this.scheduledReportMetadata.reports.map(l=>Tt(vt({},l),{displayLabel:l.category?`${l.category}: ${l.description}`:l.description})))}onPeriodOptionChange(l){let r=l.value;this.availablePeriodOptions.find(b=>b.reportSchedulePeriodOptionID===r)&&(r===3?this.reportScheduleForm.get("nDays").setValidators([tt.required,tt.min(1),tt.max(365)]):(this.reportScheduleForm.get("nDays").clearValidators(),this.reportScheduleForm.get("nDays").setValue(null)),this.reportScheduleForm.get("nDays").updateValueAndValidity())}onFrequencyChange(l){let r=l.value;switch(this.showDayOfWeek=!1,this.showMonthlyOptions=!1,this.showDayOfMonth=!1,this.reportScheduleForm.get("frequencySubOptionID").clearValidators(),this.reportScheduleForm.get("dayOfWeek").clearValidators(),this.reportScheduleForm.get("dayOfMonth").clearValidators(),this.reportScheduleForm.get("frequencySubOptionID").setValue(null),this.reportScheduleForm.get("dayOfWeek").setValue(null),this.reportScheduleForm.get("dayOfMonth").setValue(null),r){case 1:this.showDayOfWeek=!0,this.reportScheduleForm.get("dayOfWeek").setValidators(tt.required);break;case 2:this.showMonthlyOptions=!0,this.reportScheduleForm.get("frequencySubOptionID").setValidators(tt.required);break}
6393this.reportScheduleForm.get("frequencySubOptionID").updateValueAndValidity(),this.reportScheduleForm.get("dayOfWeek").updateValueAndValidity(),this.reportScheduleForm.get("dayOfMonth").updateValueAndValidity()}onMonthlySubOptionChange(l){let r=l.value;this.showDayOfMonth=!1,this.reportScheduleForm.get("dayOfMonth").clearValidators(),this.reportScheduleForm.get("dayOfMonth").setValue(null),r===0&&(this.showDayOfMonth=!0,this.reportScheduleForm.get("dayOfMonth").setValidators([tt.required,tt.min(1),tt.max(31)])),this.reportScheduleForm.get("dayOfMonth").updateValueAndValidity()}populateFormWithExistingData(l){this.reportScheduleForm.get("reportID").setValue(l.reportID);let r={value:l.reportID};this.onReportChange(r),this.reportScheduleForm.patchValue({name:l.name,clubIDs:l.clubIDs,periodOptionID:l.periodOptionID,nDays:l.nDays,frequencyOptionID:l.frequencyOptionID,sendEmail:l.sendEmail,isActive:l.isActive,startDate:new Date(l.startDate)}),l.frequencyOptionID===1?(this.showDayOfWeek=!0,this.reportScheduleForm.get("dayOfWeek").setValue(l.dayOfWeek)):l.frequencyOptionID===2&&(this.showMonthlyOptions=!0,this.reportScheduleForm.get("frequencySubOptionID").setValue(l.frequencySubOptionID),l.frequencySubOptionID===0&&(this.showDayOfMonth=!0,this.reportScheduleForm.get("dayOfMonth").setValue(l.dayOfMonth))),this.isEdit&&!this.isDuplicate&&this.reportScheduleForm.get("reportID").disable()}flattenClubTree(l){let r=[];for(let a of l)r.push({clubID:a.clubID,name:a.name,children:[]}),a.children&&a.children.length>0&&(r=[...r,...this.flattenClubTree(a.children)]);return r}getPageTitle(){return this.isEdit?"Edit Scheduled Report":this.isDuplicate?"Duplicate Scheduled Report":"New Scheduled Report"}
6393getButtonText(){return this.isEdit?"Update":(this.isDuplicate,"Save")}onSubmit(){if(this.reportScheduleForm.invalid){Object.keys(this.reportScheduleForm.controls).forEach(b=>{this.reportScheduleForm.get(b).markAsTouched()});return}this.loading=!0,this.siteDataService.showSiteLoader();let l=this.selectedReport?.isCustomReport,r=this.reportScheduleForm.value,a={reportScheduleID:this.isEdit?this.reportId:null,name:r.name,clubIDs:r.clubIDs,reportID:this.isEdit?this.reportScheduleForm.get("reportID").value:r.reportID,isCustomReport:l,startDate:r.startDate.toISOString(),sendEmail:r.sendEmail,isActive:r.isActive,frequencyOptionID:r.frequencyOptionID,frequencySubOptionID:r.frequencyOptionID===2?r.frequencySubOptionID:null,dayOfWeek:r.frequencyOptionID===1?r.dayOfWeek:null,dayOfMonth:r.frequencyOptionID===2&&r.frequencySubOptionID===0?r.dayOfMonth:null,periodOptionID:l?null:r.periodOptionID,nDays:l?null:r.periodOptionID===3?r.nDays:null};this.reportService.saveScheduledReport(a).pipe(Z(this.unsubscribe$)).subscribe({next:b=>{this.siteDataService.hideSiteLoader(),this.loading=!1;let u;this.isEdit?u="Report schedule updated successfully.":this.isDuplicate?u="Report schedule duplicated successfully.":u="Report schedule created successfully.",this.siteDataService.showSiteSuccessAlert(u),window.location.href="/admin/reports/scheduled-reports"},error:b=>{console.error("Error saving report schedule",b),this.siteDataService.hideSiteLoader(),this.loading=!1,this.siteDataService.showSiteErrorAlert("Unable to save report schedule. Please try again.")}})}};d.\u0275fac=function(r){return new(r||d)(w(k),w(M),w(Fi),w(It))},d.\u0275cmp=A({type:d,selectors:[["app-scheduled-reports"]],standalone:!1,decls:67,vars:12,consts:[["parentLinkUrl","/admin/reports/scheduled-reports","parentLinkText","Scheduled Reports",3,"pageTitle","showBackButton"],[1,"container-fluid","mt-3","create-component"],[3,"ngSubmit","formGroup"],[1,"mb-4","pb-4","border-bottom"],[1,"col-md-8","pl-0"],[1,"mb-3"],[1,"py-2"],[1,"col-md-8"],[1,"form-group"],[1,"row"],["for","reportID",1,"form-label","col-md-4","pl-0","pr-0"],[1,"text-danger"],[1,"col-md-4","pl-0","pr-0"],["id","reportID","formControlName","reportID","optionLabel","displayLabel","optionValue","reportID","filterBy","description","placeholder","Select a report","styleClass","full-width",3,"onChange","options","filter"],[1,"mb-4"],[1,"gap-2","mt-4","flex"],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","button","routerLink","/admin/reports/scheduled-reports",1,"btn","btn-secondary",3,"disabled"],[1,"row","mt-3"],["for","clubIDs",1,"form-label","col-md-4","pl-0"],["id","clubIDs","formControlName","clubIDs","optionLabel","name","optionValue","clubID","filterBy","name","styleClass","full-width","placeholder","All",3,"options","filter"],[1,"text-danger","pl-0"],[1,"row","mb-3"],["for","frequencyOptionID",1,"form-label","col-md-4","pl-0"],["id","frequencyOptionID","formControlName","frequencyOptionID","optionLabel","description","optionValue","zReportScheduleFrequencyI
6393D","placeholder","Select frequency",3,"onChange","options"],["for","startDate",1,"form-label","col-md-4","pl-0"],["id","startDate","formControlName","startDate","dateFormat","mm/dd/yy",3,"showIcon","minDate"],["for","name",1,"form-label","col-md-4","pl-0"],["type","text","id","name","formControlName","name",1,"form-control","col-md-6",3,"placeholder"],[1,"col-md-12"],[1,"d-flex"],[1,"me-3","mb-0","col-md-4","pl-0"],["formControlName","sendEmail"],[1,"col-12"],[1,"form-group","pl-0"],[1,"col-md-8","flex","pl-0"],[1,"form-label","col-md-4","pl-0"],[1,"mt-2","col-md-4","pl-0"],[1,"radio-group"],[1,"mb-2","center"],["formControlName","periodOptionID",3,"onClick","inputId","value"],[1,"ms-2",3,"for"],[3,"tooltipText"],[1,"text-danger","d-block","mt-2"],["alertType","info",3,"isInline"],[1,"form-group","mt-3"],["for","nDays",1,"form-label","col-md-4","pl-0"],[1,"col-md-4","pl-0"],["type","number","id","nDays","formControlName","nDays","min","1","max","365",1,"form-control",2,"max-width","200px"],[1,"text-danger","d-block","mt-1"],["for","dayOfWeek",1,"form-label","col-md-4"],["id","dayOfWeek","formControlName","dayOfWeek","optionLabel","label","optionValue","value","placeholder","Select day of week",3,"options"],["for","frequencySubOptionID",1,"form-label","col-md-4","pl-0"],["id","frequencySubOptionID","formControlName","frequencySubOptionID","optionLabel","description","optionValue","zReportScheduleFrequencySuboptionID","placeholder","Select monthly option",3,"onChange","options"],["for","dayOfMonth",1,"form-label","col-md-4","pl-0"],["type","number","id","dayOfMonth","formControlName","dayOfMonth","min","1","max","31","placeholder","15",1,"form-control"],[1,"text-danger","mt-1","pl-0"],[1,"spinner-border","spinner-border-sm","me-1"]],template:function(r,a){if(r&1&&(n(0,"main"),e(1,`
6394    `),g(2,"app-admin-header",0),e(3,`
6395
6396    `),n(4,"div",1),e(5,`
6397        `),n(6,"form",2),T("ngSubmit",function(){return a.onSubmit()}),e(7,`
6398            `),e(8,`
6399            `),n(9,"section",3),e(10,`
6400                `),n(11,"div",4),e(12,`
6401                    `),n(13,"h5",5),e(14,"Select a Report"),i(),e(15,`
6402                    `),n(16,"p"),e(17,`
6403                        Start by selecting the report you want to schedule. This will be the template for your scheduled
6404                        delivery. Once selected, you\u2019ll customize the reporting period and choose when
6405                        and how often it should be delivered.
6406                    `),i(),e(18,`
6407                `),i(),e(19,`
6408                `),n(20,"div",6),e(21,`
6409                    `),n(22,"div",7),e(23,`
6410                        `),n(24,"div",8),e(25,`
6411                            `),n(26,"div",9),e(27,`
6412                                `),n(28,"label",10),e(29,`
6413                                    Report
6414                                    `),n(30,"span",11),e(31,"*"),i(),e(32,`
6415                                `),i(),e(33,`
6416                                `),n(34,"div",12),e(35,`
6417                                    `),n(36,"p-select",13),T("onChange",function(u){return a.onReportChange(u)}),i(),e(37,`
6418                                `),i(),e(38,`
6419                            `),i(),e(39,`
6420                            `),n(40,"div",9),e(41,`
6421                                `),_(42,ly,4,0),i(),e(43,`
6422                        `),i(),e(44,`
6423                    `),i(),e(45,`
6424
6425                    `),_(46,dy,25,3),i(),e(47,`
6426            `),i(),e(48,`
6427
6428            `),e(49,`
6429            `),_(50,My,109,11),n(51,"section",14),e(52,`
6430                `),n(53,"div",15),e(54,`
6431                    `),n(55,"button",16),e(56,`
6432                        `),_(57,Ay,3,0),e(58),i(),e(59,`
6433                    `),n(60,"button",17),e(61,"Cancel"),i(),e(62,`
6434                `),i(),e(63,`
6435            `),i(),e(64,`
6436        `),i(),e(65,`
6437    `),i(),e(66,`
6438`),i()),r&2){let b;s(2),m("pageTitle",a.getPageTitle())("showBackButton",!0),s(4),m("formGroup",a.reportScheduleForm),s(30),m("options",a.scheduledReportMetadata==null?null:a.scheduledReportMetadata.reports)("filter",!0),s(6),x(!(a.reportScheduleForm==null||(b=a.reportScheduleForm.get("reportID"))==null||b.errors==null)&&b.errors.required&&(!(a.reportScheduleForm==null||(b=a.reportScheduleForm.get("reportID"))==null)&&b.touched)?42:-1),s(4),x((a.flattenedClubs==null?null:a.flattenedClubs.length)>1?46:-1),s(4),x(a.selectedReport?50:-1),s(5),m("disabled",a.loading),s(2),x(a.loading?57:-1),s(),I(`
6439                        `,a.getButtonText(),` Scheduled Report
6440                    `),s(2),m("disabled",a.loading)}},dependencies:[vi,fe,Gt,U,bi,jt,wi,Ei,Ti,pe,nt,We,Qe,te,q,Q,Un,Gn],styles:[".create-component[_ng
6440content-%COMP%]   .text-danger[_ngcontent-%COMP%]{color:var(--red-700)}.create-component[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%]{display:flex}.create-component[_ngcontent-%COMP%]   .gap-2[_ngcontent-%COMP%]{gap:.5rem;display:flex}.create-component[_ngcontent-%COMP%]   .center[_ngcontent-%COMP%]{display:flex;align-items:center}.create-component[_ngcontent-%COMP%]   .center[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{text-align:left}@media screen and (max-width:525px){.create-component[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%]{flex-direction:column}.create-component[_ngcontent-%COMP%]   .flex[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{margin:0}}"]});let o=d;return o})();var Py=["optionsMenu"],qr=()=>({exact:!0}),Oy=()=>[10,20,50,100],Ly=()=>({width:"auto"});function Ny(o,d){o&1&&(e(0,`
6441        `),n(1,"tr"),e(2,`
6442          `),n(3,"th",29),e(4,`
6443            Schedule Name
6444            `),g(5,"p-sortIcon",30),e(6,`
6445          `),i(),e(7,`
6446          `),n(8,"th",31),e(9,`
6447            Report
6448            `),g(10,"p-sortIcon",32),e(11,`
6449          `),i(),e(12,`
6450          `),n(13,"th",33),e(14,`
6451            Generated Date
6452            `),g(15,"p-sortIcon",34),e(16,`
6453          `),i(),e(17,`
6454          `),g(18,"th"),e(19,`
6455        `),i(),e(20,`
6456      `))}function Vy(o,d){if(o&1){let t=D();e(0,`
6457              `),n(1,"a",39),T("click",function(){f(t);let r=p().$implicit,a=p();return h(a.downloadReport(r))}),e(2),i(),e(3,`
6458            `)}if(o&2){let t=p().$implicit;s(2),I(`
6459                `,t.displayDate,`
6460              `)}}function ky(o,d){o&1&&(e(0,`
6461                  `),g(1,"i",41),e(2,`
6462                `))}function By(o,d){o&1&&(e(0,`
6463                  `),g(1,"i",42),e(2,`
6464                `))}function Wy(o,d){if(o&1&&(e(0,`
6465              `),n(1,"span",40),e(2),_(3,ky,3,0),_(4,By,3,0),i(),e(5,`
6466            `)),o&2){let t=p().$implicit;s(2),I(`
6467                `,t.displayDate,`
6468                `),s(),x(t.hasError?3:-1),s(),x(t.deletedOn?4:-1)}}function Uy(o,d){if(o&1){let t=D();e(0,`
6469                `),n(1,"button",43),T("click",function(){f(t);let r=p().$implicit,a=p();return h(a.downloadReport(r))}),e(2,`
6470                  `),g(3,"i",44),e(4,`
6471                  `),n(5,"div",38),e(6,"Download"),i(),e(7,`
6472                `),i(),e(8,`
6473              `)}}function Yy(o,d){if(o&1){let t=D();e(0,`
6474        `),n(1,"tr"),e(2,`
6475          `),n(3,"td"),e(4),i(),e(5,`
6476          `),n(6,"td"),e(7),i(),e(8,`
6477          `),n(9,"td"),e(10,`
6478            `),_(11,Vy,4,1),_(12,Wy,6,3),i(),e(13,`
6479          `),n(14,"td"),e(15,`
6480            `),n(16,"div",35),e(17,`
6481              `),_(18,Uy,9,0),n(19,"button",36),T("click",function(r){let a=f(t).$implicit,b=p();return h(b.toggleOptionsMenu(a,r))}),e(20,`
6482                `),g(21,"i",37),e(22,`
6483                `),n(23,"div",38),e(24,"Options"),i(),e(25,`
6484              `),i(),e(26,`
6485            `),i(),e(27,`
6486          `),i(),e(28,`
6487        `),i(),e(29,`
6488      `)}if(o&2){let t=d.$implicit;s(4),c(t.scheduleName),s(3),c(t.reportName),s(4),x(t.isAvailable?11:-1),s(),x(t.isAvailable?-1:12),s(6),x(t.isAvailable?18:-1)}}function Gy(o,d){if(o&1&&(e(0,`
6489        `),n(1,"tr"),e(2,`
6490          `),n(3,"td",45),e(4,"No report runs found in the archive"),i(),e(5,`
6491        `),i(),e(6,`
6492      `)),o&2){let t=d.$implicit;s(3),J("colspan",t?t.length:5)}}var $r=(()=>{let d=class d{constructor(l,r,a,b){this.siteDataService=l,this.router=r,this.reportService=a,this.fb=b,this.unsubscribe$=new ge,this.getLocalTimeZone=Ii,this.reportSchedules=[],this.sortedReportSchedules=[],this.sortField="",this.sortOrder=1,this.options=[],this.loading=!1,this.currentPage=1,this.pageSize=20,this.totalRecords=0,this.totalPages=0,this.filterForm=this.fb.group({searchTerm:[""],startDate:[null],endDate:[null]})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnInit(){this.sortField="CompletedDate",this.sortOrder=-1,this.loadReportRuns()}applyFilters(){this.loadReportRuns(!0)}onPageChange(l){this.currentPage=Math.floor(l.first/l.rows)+1,this.pageSize=l.rows,this.loadReportRuns()}clearFilters(){this.filterForm.patchValue({searchTerm:"",startDate:null,endD
6492ate:null}),this.loadReportRuns(!0)}dateChanged(){console.log("Date filter changed")}loadReportRuns(l=!1){l&&(this.currentPage=1),this.loading=!0;let r=this.filterForm.value;console.log("Loading report runs with parameters:",{page:this.currentPage,pageSize:this.pageSize,searchTerm:r.searchTerm,startDate:r.startDate,endDate:r.endDate,sortField:this.sortField,sortOrder:this.sortOrder}),this.reportService.getScheduledReportRuns(this.currentPage,this.pageSize,r.searchTerm,r.startDate,r.endDate,this.sortField,this.sortOrder).pipe(Z(this.unsubscribe$)).subscribe({next:a=>{this.totalRecords=a.totalCount,this.totalPages=a.totalPages,this.reportSchedules=a.items.map(b=>Tt(vt({},b),{isAvailable:b.completedDate&&!b.errorLogID&&!b.deletedOn&&!b.removedOn})),this.sortedReportSchedules=this.reportSchedules,this.loading=!1,this.siteDataService.hideSiteLoader()},error:a=>{console.error("Error fetching report schedule runs:",a);let b="Unable to load report archive.";a.error&&typeof a.error=="string"?b+=" "+a.error:a.message&&(b+=" "+a.message),this.loading=!1,this.siteDataService.showSiteErrorAlert(b),this.siteDataService.hideSiteLoader()}})}onSort(l){this.sortField=l.field,this.sortOrder=l.order,console.log("Sorting by",this.sortField,"in order",this.sortOrder);let r={scheduleName:"ScheduleName",reportName:"ReportName",completedDate:"CompletedDate"};r[this.sortField]&&(this.sortField=r[this.sortField]),console.log("Mapped sort field for API:",this.sortField),this.loadReportRuns()}downloadReport(l){if(!l.isAvailable){this.siteDataService.showSiteErrorAlert("Report file is not available for download.");return}this.reportService.downloadReport(l.scheduledReportId,l.scheduledReportRunId,l.fileName).pipe(Z(this.unsubscribe$)).subscribe({error:r=>{console.error("Error downloading report",r),this.siteDataService.showSiteErrorAlert("Unable to download report file.")}})}toggleOptionsMenu(l,r){let a=[];l.isAvailable&&a.push({label:"Download",icon:"fa fa-download",command:()=>{this.downloadReport(l)}}),l.deletedOn||a.push({label:"Delete",icon:"fa-regular fa-circle-x",command:()=>{confirm(`Are you sure you want to delete this report: ${l.reportName}?`)&&(this.siteDataService.showSiteLoader(),this.reportService.deleteReportScheduleRun(l.scheduledReportId,l.scheduledReportRunId).pipe(Z(this.unsubscribe$)).subscribe({next:b=>{b.success?(this.loadReportRuns(),this.siteDataService.showSiteSuccessAlert("Report deleted successfully.")):(this.siteDataService.showSiteErrorAlert("Failed to delete report."),this.siteDataService.hideSiteLoader())},error:b=>{console.error("Error deleting report",b),this.siteDataService.showSiteErrorAlert("Failed to delete report."),this.siteDataService.hideSiteLoader()}}))}}),this.options=[{label:"Options",items:a}],this.optionsMenu.toggle(r)}};d.\u0275fac=function(r){return new(r||d)(w(k),w(it),w(M),w(Fi))},d.\u0275cmp=A({type:d,selectors:[["app-scheduled-reports"]],viewQuery:function(r,a){if(r&1&&Wt(Py,5),r&2){let b;Ut(b=Yt())&&(a.optionsMenu=b.first)}},standalone:!1,decls:92,vars:24,consts:[["optionsMenu",""],["pageTitle","Reports Archive"],[1,"tabs"],["role","tablist",1,"tab-nav","no-bullets","inline-list","d-flex"],["routerLinkActive","active",1,"nav-item",3,"routerLinkActiveOptions"],["role","tab","aria-controls","/admin/reports/scheduled-reports/","aria-selected","true",1,"nav-link",3,"routerLink"],["role","tab","aria-controls","/","aria-selected","true",1,"nav-link",3,"routerLink"],[3,"adminFilterSearch","adminFilterReset","showAdvanced"],["primary",""],[1,"col","pr-0"],[1,"d-flex",3,"formGroup"],[1,"p-input-icon-left","full-width"],[1,"fa","fa-magnifying-glass"],["type","text","id","search","pInputText","","formControlName","searchTerm","placeholder","Search",1,"full-width","pl-4",3,"keyup.enter"],["for","search",1,"sr-only"],["advanced",""],[1,"row"],[1,"col-md-2"],[3,"formGroup"],[1,"form-group"],["id","From","formControlName","startDate","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"onSelect"],["id","To","formControlName","endDate","dateFormat","mm/dd/yy","placeholder","MM/DD/YYYY","appendTo","body",3,"onSelect"],[1,"col-md-3","d-flex","align-items-end"],[1,"card","table-card"],["currentPageReportTemplate","{first} to {last} of {totalRecords} reports","styleClass","table table-sticky-header",1,"table","table-striped","table-sm",3,"onSort","onPage","value","rows","loading","lazy","paginator","totalRecords","rowsPerPageOptions","showCurrentPageReport","first"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["appendTo","body",3,"model","popup"],["pSortableColumn","scheduleName"],["field","scheduleName"],["pSortableColumn","reportName"],["field","reportName"],["pSortableColumn","completedDate"],["field","completedDate"],[1,"d-flex"],["type","button",1,"btn","btn-sm","btn-tertiary",3,"click"],[1,"fa-solid","fa-ellipsis"],[1,"sr-only"],["href","javascript:void(0)",1,"nav-link","pl-0",3,"click"],[1,"text-muted"],["title","Error generating report",1,"fa","fa-exclamation-triangle","text-danger","ml-2"],["title","Report was deleted",1,"fa","fa-tras
6492h-alt","ml-2"],["type","button","title","Download",1,"btn","btn-sm","btn-tertiary","mr-2",3,"click"],[1,"fa-solid","fa-download"],[2,"text-align","left"]],template:function(r,a){r&1&&(n(0,"main"),e(1,`
6493  `),g(2,"app-admin-header",1),e(3,`
6494
6495  `),n(4,"div",2),e(5,`
6496    `),n(6,"ul",3),e(7,`
6497      `),n(8,"li",4),e(9,`
6498        `),n(10,"a",5),e(11,"Latest Reports"),i(),e(12,`
6499      `),i(),e(13,`
6500      `),n(14,"li",4),e(15,`
6501        `),n(16,"a",6),e(17,"Reports Archive"),i(),e(18,`
6502      `),i(),e(19,`
6503    `),i(),e(20,`
6504  `),i(),e(21,`
6505
6506  `),n(22,"app-admin-filter",7),T("adminFilterSearch",function(){return a.applyFilters()})("adminFilterReset",function(){return a.clearFilters()}),e(23,`
6507    `),rt(24,8),e(25,`
6508      `),n(26,"div",9),e(27,`
6509        `),n(28,"form",10),e(29,`
6510          `),n(30,"span",11),e(31,`
6511            `),g(32,"i",12),e(33,`
6512            `),n(34,"input",13),T("keyup.enter",function(){return a.applyFilters()}),i(),e(35,`
6513            `),g(36,"label",14),e(37,`
6514          `),i(),e(38,`
6515        `),i(),e(39,`
6516      `),i(),e(40,`
6517    `),at(),e(41,`
6518    `),rt(42,15),e(43,`
6519      `),n(44,"div",16),e(45,`
6520        `),n(46,"div",17),e(47,`
6521          `),n(48,"form",18),e(49,`
6522            `),n(50,"div",19),e(51,`
6523              `),n(52,"label"),e(53,"Generated Date"),i(),e(54,`
6524              `),n(55,"p-inputgroup"),e(56,`
6525                `),n(57,"p-datepicker",20),T("onSelect",function(){return a.dateChanged()}),i(),e(58,`
6526                `),n(59,"p-inputgroup-addon"),e(60,"to"),i(),e(61,`
6527                `),n(62,"p-datepicker",21),T("onSelect",function(){return a.dateChanged()}),i(),e(63,`
6528              `),i(),e(64,`
6529            `),i(),e(65,`
6530          `),i(),e(66,`
6531        `),i(),e(67,`
6532        `),e(68,`
6533        `),n(69,"div",22),e(70,`
6534          `),e(71,`
6535        `),i(),e(72,`
6536      `),i(),e(73,`
6537    `),at(),e(74,`
6538  `),i(),e(75,`
6539
6540  `),n(76,"div",23),e(77,`
6541    `),n(78,"p-table",24),T("onSort",function(u){return a.onSort(u)})("onPage",function(u){return a.onPageChange(u)}),e(79,`
6542      `),R(80,Ny,21,0,"ng-template",25),e(81,`
6543      `),R(82,Yy,30,5,"ng-template",26),e(83,`
6544      `),R(84,Gy,7,1,"ng-template",27),e(85,`
6545    `),i(),e(86,`
6546  `),i(),e(87,`
6547`),i(),e(88,`
6548
6549`),g(89,"p-menu",28,0),e(91,`
6550`)),r&2&&(s(8),m("routerLinkActiveOptions",Le(20,qr)),s(2),m("routerLink","/admin/reports/scheduled-reports/"),s(4),m("routerLinkActiveOptions",Le(21,qr)),s(2),m("routerLink","./"),s(6),m("showAdvanced",!0),s(6),m("formGroup",a.filterForm),s(20),m("formGroup",a.filterForm),s(30),m("value",a.sortedReportSchedules)("rows",a.pageSize)("loading",a.loading)("lazy",!0)("paginator",!0)("totalRecords",a.totalRecords)("rowsPerPageOptions",Le(22,Oy))("showCurrentPageReport",!0)("first",(a.currentPage-1)*a.pageSize),s(11),_t(Le(23,Ly)),m("model",a.options)("popup",!0))},dependencies:[vi,fe,U,bi,Ei,Ti,pe,Di,z,Qe,qn,ie,ne,H,$,K,te,Mi],encapsulation:2});let o=d;return o}
6550)();var jy=()=>[];function Hy(o,d){o&1&&(e(0,`
6551            `),n(1,"tr"),e(2,`
6552              `),n(3,"th",20),e(4,"Score"),i(),e(5,`
6553              `),n(6,"th",20),e(7,"Status"),i(),e(8,`
6554              `),n(9,"th",21),e(10,"Team"),i(),e(11,`
6555              `),n(12,"th",22),e(13,"Program"),i(),e(14,`
6556              `),n(15,"th",22),e(16,"Coach"),i(),e(17,`
6557              `),n(18,"th",23),e(19,"Actions"),i(),e(20,`
6558            `),i(),e(21,`
6559          `))}function zy(o,d){if(o&1){let t=D();e(0,`
6560            `),n(1,"tr"),e(2,`
6561              `),n(3,"td"),e(4,`
6562                `),n(5,"span",24),e(6),i(),e(7,`
6563              `),i(),e(8,`
6564              `),n(9,"td"),e(10,`
6565                `),n(11,"span",25),e(12),i(),e(13,`
6566              `),i(),e(14,`
6567              `),n(15,"td"),e(16),i(),e(17,`
6568              `),n(18,"td"),e(19),i(),e(20,`
6569              `),n(21,"td"),e(22),i(),e(23,`
6570              `),n(24,"td",26),e(25,`
6571                `),n(26,"button",27),T("click",function(){let r=f(t).$implicit,a=p(2);return h(a.goToTeamMessages(r))}),e(27,`
6572                  `),g(28,"i",28),e(29,`
6573                `),i(),e(30,`
6574              `),i(),e(31,`
6575            `),i(),e(32,`
6576          `)}if(o&2){let t=d.$implicit,l=p(2);s(5),m("ngClass",l.getStatusClass(t.healthStatus)),s(),I(`
6577                  `,t.healthScore,`
6578                `),s(5),m("ngClass",l.getStatusClass(t.healthStatus)),s(),I(`
6579                  `,t.healthStatus,`
6580                `),s(4),c(t.teamName),s(3),c(t.programName),s(3),c(t.coachName||"No Primary Coach Assigned")}}function qy(o,d){o&1&&(e(0,`
6581            `),n(1,"tr"),e(2,`
6582              `),n(3,"td",29),e(4,`
6583                `),g(5,"i",30),e(6,`
6584                `),n(7,"p",4),e(8,"No teams found matching the selected filters"),i(),e(9,`
6585              `),i(),e(10,`
6586            `),i(),e(11,`
6587          `))}function $y(o,d){if(o&1){let t=D();e(0,`
6588    `),n(1,"div",15),e(2,`
6589      `),n(3,"div",2),e(4,`
6590        `),n(5,"p-table",16),T("onLazyLoad",function(r){f(t);let a=p();return h(a.onPageChange(r))}),e(6,`
6591          `),R(7,Hy,22,0,"ng-template",17),e(8,`
6592          `),R(9,zy,33,7,"ng-template",18),e(10,`
6593          `),R(11,qy,12,0,"ng-template",19),e(12,`
6594        `),i(),e(13,`
6595      `),i(),e(14,`
6596    `),i(),e(15,`
6597  `)}if(o&2){let t=p();s(5),m("value",(t.detailData==null?null:t.detailData.teams)||Le(7,jy))("paginator",!0)("rows",t.pageSize)("totalRecords",(t.detailData==null?null:t.detailData.totalCount)||0)("lazy",!0)("loading",t.loading)("rowHover",!0)}}function Ky(o,d){o&1&&(e(0,`
6598    `),n(1,"div",15),e(2,`
6599      `),n(3,"div",2),e(4,`
6600        `),g(5,"app-skeleton-template"),e(6,`
6601      `),i(),e(7,`
6602    `),i(),e(8,`
6603  `))}var Kr=(()=>{let d=class d{constructor(l,r,a){this.dashboardService=l,this.route=r,this.router=a,this.unsubscribe$=new ge,this.loading=!0,this.filters={days:30,sortBy:"HealthScore",sortOrder:"asc"},this.page=1,this.pageSize=50,this.healthStatusOptions=[{label:"All Statuses",value:null},{label:"Healthy",value:"Healthy"},{label:"At Risk",value:"At Risk"},{label:"Unhealthy",value:"Unhealthy"}],this.sortOptions=[{label:"Health Score",value:"HealthScore"},{label:"Team Name",value:"TeamName"},{label:"Coach Name",value:"CoachName"}],this.daysOptions=[{label:"Last 7 Days",value:7},{label:"Last 30 Days",value:30},{label:"Last 90 Days",value:90}],this.sortOrderOptions=[{label:"Ascending",value:"asc"},{label:"Descending",value:"desc"}]}ngOnInit(){this.route.queryParams.pipe(Z(this.unsubscribe$)).subscribe(l=>{l.healthStatus&&(this.filters.healthStatus=l.healthStatus),this.loadData()})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}loadData(){this.loading=!0,this.dashboardService.getTeamHealthDetailData(this.filters,this.page,this.pageSize).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.detailData=l,this.loading=!1},error:()=>{this.loading=!1}})}onFilterChange(){this.page=1,this.loadData()}onPageChange(l){this.page=l.page+1,this.pageSize=l.rows,this.loadData()}getStatusClass(l){switch(l){case"Healthy":return"status-healthy";case"At Risk":return"status-at-risk";case"Unhealthy":return"status-unhealthy";default:return""}}goToTeamMessages(l){this.router.navigate(["/admin/manage-team",l.teamID,"program",l.programID,"messages"])}};d.\u0275fac=function(r){return new(r||d)(w(mt),w(It),w(it))},d.\u0275cmp=A({type:d,selectors:[["app-team-health-detail"]],standalone:!1,decls:58,vars:9,consts:[[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"page-title"],[1,"text-muted"],[1,"row","mt-3"],[1,"col-md-3"],["for","health-status"],["appendTo","body","styleClass","full-width","inputId","health-status",3,"ngModelChange","onChange","ngModel","options"],["for","days"],["appendTo","body","styleClass","full-width","inputId","days",3,"ngModelChange","onChange","ngModel","options"],["for","sort-by"],["appendTo","body","styleClass","full-width","inputId","sort-by",3,"ngModelChange","onChange","ngModel","options"],["for","sort-order"],["appendTo","body","styleClass","full-width","inputId","sort-order",3,"ngModelChange","onChange","ngModel","options"],[1,"row","mt-4"],["styleClass","p-datatable-sm",3,"onLazyLoad","value","paginator","rows","totalRecords","lazy","loading","rowHover"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[2,"width","10%"],[2,"width","30%"],[2,"width","20%"],[1,"text-center",2,"width","10%"],[1,"health-score",3,"ngClass"],[1,"status-badge",3,"ngClass"],[1,"text-center"],["t
6603itle","View Team Messages",1,"btn","btn-sm","btn-tertiary",3,"click"],[1,"fas","fa-comments"],["colspan","6",1,"text-center","py-4"],[1,"fas","fa-inbox","fa-3x","text-muted","mb-3"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
6604  `),n(2,"div",1),e(3,`
6605    `),n(4,"div",2),e(5,`
6606      `),n(6,"h1",3),e(7,"Team Health Report"),i(),e(8,`
6607      `),n(9,"p",4),e(10,"Communication health metrics for all teams based on message warmth analysis"),i(),e(11,`
6608    `),i(),e(12,`
6609  `),i(),e(13,`
6610
6611  `),e(14,`
6612  `),n(15,"div",5),e(16,`
6613    `),n(17,"div",6),e(18,`
6614      `),n(19,"label",7),e(20,"Health Status"),i(),e(21,`
6615      `),n(22,"p-select",8),y("ngModelChange",function(u){return S(a.filters.healthStatus,u)||(a.filters.healthStatus=u),u}),T("onChange",function(){return a.onFilterChange()}),e(23,`
6616      `),i(),e(24,`
6617    `),i(),e(25,`
6618    `),n(26,"div",6),e(27,`
6619      `),n(28,"label",9),e(29,"Time Period"),i(),e(30,`
6620      `),n(31,"p-select",10),y("ngModelChange",function(u){return S(a.filters.days,u)||(a.filters.days=u),u}),T("onChange",function(){return a.onFilterChange()}),e(32,`
6621      `),i(),e(33,`
6622    `),i(),e(34,`
6623    `),n(35,"div",6),e(36,`
6624      `),n(37,"label",11),e(38,"Sort By"),i(),e(39,`
6625      `),n(40,"p-select",12),y("ngModelChange",function(u){return S(a.filters.sortBy,u)||(a.filters.sortBy=u),u}),T("onChange",function(){return a.onFilterChange()}),e(41,`
6626      `),i(),e(42,`
6627    `),i(),e(43,`
6628    `),n(44,"div",6),e(45,`
6629      `),n(46,"label",13),e(47,"Sort Order"),i(),e(48,`
6630      `),n(49,"p-select",14),y("ngModelChange",function(u){return S(a.filters.sortOrder,u)||(a.filters.sortOrder=u),u}),T("onChange",function(){return a.onFilterChange()}),e(50,`
6631      `),i(),e(51,`
6632    `),i(),e(52,`
6633  `),i(),e(53,`
6634
6635  `),e(54,`
6636  `),_(55,$y,16,8)(56,Ky,9,0),i(),e(57,`
6637
6638`)),r&2&&(s(22),C("ngModel",a.filters.healthStatus),m("options",a.healthStatusOptions),s(9),C("ngModel",a.filters.days),m("options",a.daysOptions),s(9),C("ngModel",a.filters.sortBy),m("options",a.sortOptions),s(9),C("ngModel",a.filters.sortOrder),m("options",a.sortOrderOptions),s(6),x(a.loading?56:55))},dependencies:[Ge,U,Y,z,Ze,H,q],styles:[".page-title[_ngcontent-%COMP%]{font-size:1.75rem;font-weight:600;margin-bottom:.5rem}.health-score[_ngcontent-%COMP%]{display:inline-block;padding:.25rem .75rem;border-radius:12px;font-weight:600;font-size:1.1rem}.health-score.status-healthy[_ngcontent-%COMP%]{background-color:#6d9d9133;color:var(--dashboard-color-success)}.health-score.status-at-risk[_ngcontent-%COMP%]{background-color:#e9a36333;color:var(--dashboard-color-medium)}.health-score.status-unhealthy[_ngcontent-%COMP%]{background-color:#d9737333;color:var(--dashboard-color-critical)}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:.35rem .75rem;border-radius:16px;font-weight:500;font-size:.875rem}.status-badge.status-healthy[_ngcontent-%COMP%]{background-color:var(--dashboard-color-success);color:var(--color-white)}.status-badge.status-at-risk[_ngcontent-%COMP%]{background-color:var(--dashboard-color-medium);color:var(--color-white)}.status-badge.status-unhealthy[_ngcontent-%COMP%]{background-color:var(--dashboard-color-critical);color:var(--color-white)}  .full-width{width:100%}  .p-datatable .p-datatable-tbody>tr>td{vertical-align:middle}label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500}"]});let o=d;return o}
6638)();var Xi=(()=>{let d=class d{constructor(l){this.consentGatedStorageService=l,this.storagePrefix="ss-dashboard-layout",this.allowedColumns=[1,2,3,4]}buildKey(l,r){return`${this.storagePrefix}:${l}:${r}`}loadLayout(l,r,a,b){let u={order:[...a],columnsPerRow:b};if(!r)return u;try{let L=localStorage.getItem(this.buildKey(l,r));if(!L)return u;let he=JSON.parse(L);return{order:this.reconcileOrder(he.order,a),columnsPerRow:this.sanitizeColumns(he.columnsPerRow,b)}}catch(L){return u}}saveLayout(l,r,a){if(r)try{this.consentGatedStorageService.setLocalItem(this.buildKey(l,r),JSON.stringify(a))}catch(b){}}clearLayout(l,r){if(r)try{localStorage.removeItem(this.buildKey(l,r))}catch(a){}}reconcileOrder(l,r){if(!Array.isArray(l)||!l.length)return[...r];let a=new Set(r),b=new Set,u=[];for(let L of l)a.has(L)&&!b.has(L)&&(u.push(L),b.add(L));for(let L of r)b.has(L)||u.push(L);return u}sanitizeColumns(l,r){return typeof l=="number"&&this.allowedColumns.includes(l)?l:r}};d.\u0275fac=function(r){return new(r||d)(ri(Ln))},d.\u0275prov=fi({token:d,factory:d.\u0275fac,providedIn:"root"});let o=d;return o}
6638)();function Jy(o,d){if(o&1){let t=D();e(0,`
6639        `),n(1,"button",20),T("click",function(){f(t);let r=p();return h(r.clear())}),e(2,`
6640          `),g(3,"i",21),e(4,`Clear
6641        `),i(),e(5,`
6642      `)}if(o&2){let t=p();s(),m("disabled",t.loading)}}function Xy(o,d){o&1&&(e(0,`
6643      `),n(1,"app-inline-alert",22),e(2,`
6644        AI analytics are not enabled in this environment yet.
6645      `),i(),e(3,`
6646    `)),o&2&&(s(),m("isInline",!0)("iconClass","fa-solid fa-circle-info"))}function Zy(o,d){if(o&1&&(e(0,`
6647            `),n(1,"div",24),e(2,`
6648              `),n(3,"div",25),e(4),i(),e(5,`
6649            `),i(),e(6,`
6650          `)),o&2){let t=p().$implicit;s(4),c(t.content)}}function Qy(o,d){o&1&&(e(0,`
6651                  `),n(1,"div",30),g(2,"i",31),e(3,"Analyzing your club's data\u2026"),i(),e(4,`
6652                `))}function eb(o,d){if(o&1&&(e(0,`
6653                        `),n(1,"span",35),e(2),i(),e(3,`
6654                      `)),o&2){let t=d.$implicit;s(2),c(t)}}function tb(o,d){if(o&1&&(e(0,`
6655                    `),n(1,"div",33),e(2,`
6656                      `),n(3,"span",34),e(4,"Based on:"),i(),e(5,`
6657                      `),N(6,eb,4,1,null,null,W),i(),e(8,`
6658                  `)),o&2){let t=p(3).$implicit;s(6),V(t.dataUsed)}}function ib(o,d){o&1&&(e(0,`
6659                    `),n(1,"div",36),e(2,`
6660                      `),g(3,"i",19),e(4,`Partial answer \u2014 try narrowing your question for more detail.
6661                    `),i(),e(5,`
6662                  `))}function nb(o,d){if(o&1&&(e(0,`
6663                  `),g(1,"div",32),e(2,`
6664                  `),_(3,tb,9,0),_(4,ib,6,0)),o&2){let t=p(2).$implicit;s(),lt("text-danger",t.error),m("innerHTML",t.html,_n),s(2),x(t.dataUsed!=null&&t.dataUsed.length?3:-1),s(),x(t.truncated?4:-1)}}function ob(o,d){if(o&1&&(e(0,`
6665            `),n(1,"div",26),e(2,`
6666              `),n(3,"div",27),e(4,`
6667                `),n(5,"div",28),e(6,`
6668                  `),g(7,"i",29),e(8,`Analytics Copilot
6669                `),i(),e(9,`
6670                `),_(10,Qy,5,0)(11,nb,5,5),i(),e(12,`
6671            `),i(),e(13,`
6672          `)),o&2){let t=p(),l=t.$implicit,r=t.$index,a=p(2);s(10),x(a.loading&&!l.content&&!l.error&&r===a.messages.length-1?10:11)}}function rb(o,d){if(o&1&&(e(0,`
6673          `),_(1,Zy,7,1)(2,ob,14,1)),o&2){let t=d.$implicit;s(),x(t.role==="user"?1:2)}}function ab(o,d){if(o&1&&(e(0,`
6674      `),n(1,"div",23),e(2,`
6675        `),N(3,rb,3,1,null,null,fn),i(),e(5,`
6676    `)),o&2){let t=p();s(3),V(t.messages)}}function lb(o,d){if(o&1){let t=D();e(0,`
6677            `),n(1,"button",40),T("click",function(){let r=f(t).$implicit,a=p(2);return h(a.usePrompt(r))}),e(2,`
6678              `),g(3,"i",41),e(4),i(),e(5,`
6679          `)}if(o&2){let t=d.$implicit,l=p(2);s(),m("disabled",l.loading),s(3),I("",t,`
6680            `)}}function sb(o,d){if(o&1&&(e(0,`
6681      `),n(1,"div",37),e(2,`
6682        `),n(3,"div",38),e(4,"Try asking\u2026"),i(),e(5,`
6683        `),n(6,"div",39),e(7,`
6684          `),N(8,lb,6,2,null,null,W),i(),e(10,`
6685      `),i(),e(11,`
6686    `)),o&2){let t=p();s(8),V(t.suggestedPrompts)}}var Zi=(()=>{let d=class d{constructor(l){this.reportService=l,this.rangeLabel="",this.clubUserID=null,this.memberName="",this.closePanel=new Ci,this.unsubscribe$=new ge,this.messages=[],this.question="",this.loading=!1,this.notConfigured=!1,this.suggestedPrompts=["Summarize what changed versus the previous period.","Which pages or screens are most popular?","When are members most active during the week?","How is user retention trending, and what should I do about it?"]}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}get hasConversation(){return this.messages.length>0}get isMemberScope(){return this.clubUserID!==null}summarize(){if(this.loading||!this.startDate||!this.endDate)return;let l=this.isMemberScope?`Summarize ${this.memberName||"this member"}'s activity`:"Summarize this dashboard";this.pushUser(l);let r=this.startAssistant();(this.isMemberScope?this.reportService.getAnalyticsCopilotMemberSummary(this.clubUserID,this.startDate,this.endDate):this.reportService.getAnalyticsCopilotSummary(this.startDate,this.endDate)).pipe(Z(this.unsubscribe$)).subscribe({next:b=>this.finishAssistant(r,b),error:()=>this.errorAssistant(r)})}usePrompt(l){this.question=l,this.send()}send(){let l=(this.question||"").trim();if(this.loading||!l||!this.startDate||!this.endDate)return;this.question="";let r=this.buildHistory();this.pushUser(l);let a=this.startAssistant();this.reportService.askAnalyticsCopilot(this.startDate,this.endDate,l,r).pipe(Z(this.unsubscribe$)).subscribe({next:b=>this.finishAssistant(a,b),error:()=>this.errorAssistant(a)})}onEnter(l){l.shiftKey||(l.preventDefault(),this.send())}clear(){this.messages=[],this.notConfigured=!1}buildHistory(){return this.messages.filter(l=>!l.error&&!!l.content).map(l=>({role:l.role,content:l.content}))}pushUser(l){this.messages.push({role:"user",content:l})}startAssistant(){let l={role:"assistant",content:""};return this.messages.push(l),this.loading=!0,l}finishAssistant(l,r){if(this.loading=!1,!r){this.errorAssistant(l);return}this.notConfigured=!r.configured,l.content=r.answer||"",l.html=this.formatAnswer(l.content),l.dataUsed=r.dataUsed||[],l.truncated=r.truncated}errorAssistant(l){this.loading=!1,l.error=!0,l.content="Something went wrong reaching the Analytics Copilot. Please try again in a moment.",l.html=this.formatAnswer(l.content)}formatAnswer(l){let a=(l||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").split(/\r?\n/),b=[],u=!1,L=()=>{u&&(b.push("</ul>"),u=!1)};for(let he of a){let ut=he.trim();if(!ut){L();continue}ut=ut.replace(/\*\*(.+?)\*\*/g,"<strong>$1</strong>");let oi=ut.match(/^#{1,4}\s+(.*)$/);if(oi){L(),b.push(`<div class="font-weight-bold mt-2 mb-1">${oi[1]}</div>`);continue}let sn=ut.match(/^[-*]\s+(.*)$/);if(sn){u||(b.push('<ul class="mb-1 pl-3">'),u=!0),b.push(`<li>${sn[1]}</li>`);continue}L(),b.push(`<p class="mb-1">${ut}</p>`)}return L(),b.join("")}};
6686d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-analytics-copilot"]],inputs:{startDate:"startDate",endDate:"endDate",rangeLabel:"rangeLabel",clubUserID:"clubUserID",memberName:"memberName"},outputs:{closePanel:"closePanel"},standalone:!1,decls:63,vars:10,consts:[[1,"card","border-primary","shadow-sm","mb-3"],[1,"card-header","d-flex","align-items-center","justify-content-between","bg-white"],[1,"d-flex","align-items-center"],[1,"fa-solid","fa-wand-magic-sparkles","text-primary","mr-2"],[1,"font-weight-bold"],[1,"badge","badge-info","text-uppercase","ml-2"],["pTooltip","Answers are generated only from this club's analytics for the selected dates. The AI never writes database queries and cannot access any other club's data.","tooltipPosition","top",1,"fa-solid","fa-shield-halved","ml-2","text-grey-lt"],["type","button","aria-label","Close",1,"btn","btn-naked","btn-sm",3,"click"],[1,"fa-regular","fa-xmark"],[1,"card-body"],[1,"d-flex","flex-wrap","align-items-center","mb-3"],["type","button",1,"btn","btn-primary","btn-sm","mr-2","mb-1",3,"click","disabled"],[1,"fa-solid","fa-wand-magic-sparkles","mr-1"],[1,"text-smallest","text-grey-lt","mb-1"],[1,"d-flex","align-items-start"],["rows","1","name","copilotQuestion","placeholder","Ask a question about your analytics\u2026",1,"form-control","mr-2",3,"ngModelChange","keydown.enter","ngModel","disabled"],["type","button","aria-label","Send",1,"btn","btn-primary",3,"click","disabled"],[1,"fa-solid","fa-paper-plane"],[1,"text-smallest","text-grey-lt","mt-2"],[1,"fa-regular","fa-circle-info","mr-1"],["type","button",1,"btn","btn-naked","btn-sm","mr-1",3,"click","disabled"],[1,"fa-regular","fa-eraser","mr-1"],[3,"isInline","iconClass"],[1,"analytics-copilot-transcript","mb-3"],[1,"d-flex","justify-content-end","mb-2"],[1,"analytics-copilot-bubble","bg-light","border","rounded","px-3","py-2","text-medium"],[1,"d-flex","justify-content-start","mb-3"],[1,"analytics-copilot-bubble"],[1,"d-flex","align-items-center","text-smallest","text-grey-lt","mb-1"],[1,"fa-solid","fa-wand-magic-sparkles","mr-1","text-primary"],[1,"text-grey"],[1,"fa-solid","fa-circle-notch","fa-spin","mr-1"],[1,"analytics-copilot-answer",3,"innerHTML"],[1,"mt-2"],[1,"text-smallest","text-grey-lt","mr-1"],[1,"badge","badge-light","border","mr-1","mb-1"],[1,"text-smallest","text-grey-lt","mt-1"],[1,"mb-3"],[1,"text-smallest","text-grey-lt","mb-2"],[1,"d-flex","flex-wrap"],["type","button",1,"btn","btn-tertiary","btn-sm","mr-2","mb-2",3,"click","disabled"],[1,"fa-regular","fa-comment-dots","mr-1"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
6687  `),n(2,"div",1),e(3,`
6688    `),n(4,"div",2),e(5,`
6689      `),g(6,"i",3),e(7,`
6690      `),n(8,"span",4),e(9,"AI Analytics Copilot"),i(),e(10,`
6691      `),n(11,"span",5),e(12,"Beta"),i(),e(13,`
6692      `),g(14,"i",6),e(15,`
6693    `),i(),e(16,`
6694    `),n(17,"div",2),e(18,`
6695      `),_(19,Jy,6,1),n(20,"button",7),T("click",function(){return a.closePanel.emit()}),e(21,`
6696        `),g(22,"i",8),e(23,`
6697      `),i(),e(24,`
6698    `),i(),e(25,`
6699  `),i(),e(26,`
6700
6701  `),n(27,"div",9),e(28,`
6702    `),_(29,Xy,4,2),n(30,"div",10),e(31,`
6703      `),n(32,"button",11),T("click",function(){return a.summarize()}),e(33,`
6704        `),g(34,"i",12),e(35),i(),e(36,`
6705      `),n(37,"span",13),e(38,`
6706        Insights for `),n(39,"strong"),e(40),i(),e(41,`
6707      `),i(),e(42,`
6708    `),i(),e(43,`
6709
6710    `),_(44,ab,6,0),_(45,sb,12,0),n(46,"div",14),e(47,`
6711      `),n(48,"textarea",15),y("ngModelChange",function(u){return S(a.question,u)||(a.question=u),u}),T("keydown.enter",function(u){return a.onEnter(u)}),i(),e(49,`
6712      `),n(50,"button",16),T("click",function(){return a.send()}),e(51,`
6713        `),g(52,"i",17),e(53,`
6714      `),i(),e(54,`
6715    `),i(),e(55,`
6716
6717    `),n(56,"div",18),e(57,`
6718      `),g(58,"i",19),e(59,`
6719      AI-generated insights can be imperfect \u2014 verify important numbers against the dashboard. This is a beta feature.
6720    `),i(),e(60,`
6721  `),i(),e(61,`
6722`),i(),e(62,`
6723`)),r&2&&(s(19),x(a.hasConversation?19:-1),s(10),x(a.notConfigured?29:-1),s(3),m("disabled",a.loading),s(3),I(`
6724        `,a.isMemberScope?"Summarize this member":"Summarize this dashboard",`
6725      `),s(5),c(a.rangeLabel||"the selected dates"),s(4),x(a.hasConversation?44:-1),s(),x(a.hasConversation?-1:45),s(3),C("ngModel",a.question),m("disabled",a.loading),s(2),m("disabled",a.loading||!a.question.trim()))},dependencies:[fe,U,Y,We,ze],encapsulation:2});let o=d;return o}
6725)();var Zr=(()=>{let d=class d{constructor(l){this.el=l,this.inViewRootMargin="200px 0px",this.inView=new Ci,this.observer=null,this.hasEmitted=!1}ngAfterViewInit(){this.arm()}ngOnChanges(l){l.inViewResetKey&&!l.inViewResetKey.firstChange&&(this.hasEmitted=!1,this.arm())}ngOnDestroy(){this.observer?.disconnect(),this.observer=null}arm(){if(this.observer?.disconnect(),typeof IntersectionObserver>"u"){this.emitOnce();return}this.observer=new IntersectionObserver(l=>{l.some(r=>r.isIntersecting)&&this.emitOnce()},{rootMargin:this.inViewRootMargin}),this.observer.observe(this.el.nativeElement)}emitOnce(){this.hasEmitted||(this.hasEmitted=!0,this.observer?.disconnect(),this.observer=null,this.inView.emit())}};d.\u0275fac=function(r){return new(r||d)(w(un))},d.\u0275dir=gn({type:d,selectors:[["","appInView",""]],inputs:{inViewResetKey:"inViewResetKey",inViewRootMargin:"inViewRootMargin"},outputs:{inView:"inView"},standalone:!1,features:[Ve]});let o=d;return o})();var mb=()=>[1,2,3,4,5,6],Qr=()=>({height:"8px"}),cb=o=>["/admin/reports/analytics/member",o],ub=(o,d)=>d.id;function _b(o,d){if(o&1){let t=D();e(0,`
6726                `),n(1,"div",29),e(2,`
6727                    `),n(3,"span",30),e(4,"Cards per row"),i(),e(5,`
6728                    `),n(6,"p-selectButton",31),y("ngModelChange",function(r){f(t);let a=p();return S(a.columnsPerRow,r)||(a.columnsPerRow=r),h(r)}),T("onChange",function(r){f(t);let a=p();return h(a.onColumnsChange(r.value))}),i(),e(7,`
6729                `),i(),e(8,`
6730                `),n(9,"button",32),T("click",function(){f(t);let r=p();return h(r.resetLayout())}),e(10,`
6731                    `),g(11,"i",33),e(12,`
6732                    Reset
6733                `),i(),e(13,`
6734            `)}if(o&2){let t=p();s(6),m("options",t.columnsOptions),C("ngModel",t.columnsPerRow),m("allowEmpty",!1)}}function xb(o,d){o&1&&(e(0,`
6735                `),n(1,"button",34),e(2,`
6736                    `),g(3,"i",35),e(4,`
6737                    Sprocket Analytics
6738                `),i(),e(5,`
6739            `))}function gb(o,d){if(o&1){let t=D();e(0,`
6740        `),n(1,"app-analytics-copilot",36),T("closePanel",function(){f(t);let r=p();return h(r.showCopilot=!1)}),i(),e(2,`
6741    `)}if(o&2){let t=p();s(),m("startDate",t.startDate)("endDate",t.endDate)("rangeLabel",t.selectedRangeLabel)}}function fb(o,d){if(o&1){let t=D();e(0,`
6742        `),n(1,"app-inline-alert",37),e(2,`
6743            Some analytics sections failed to load.
6744            `),n(3,"button",38),T("click",function(){f(t);let r=p();return h(r.loadData())}),e(4,`
6745                `),g(5,"i",39),e(6,`
6746                Retry
6747            `),i(),e(7,`
6748        `),i(),e(8,`
6749    `)}}function hb(o,d){if(o&1&&(e(0,`
6750                    `),n(1,"div",41),e(2,`
6751                        `),g(3,"i",42),e(4,`
6752                        `),n(5,"span",43),e(6),i(),e(7,`
6753                    `),i(),e(8,`
6754                `)),o&2){let t=p().$implicit;s(6),c(t.label)}}function Cb(o,d){o&1&&ke(0)}function Sb(o,d){if(o&1&&(e(0,`
6755                        `),R(1,Cb,1,0,"ng-container",44),e(2,`
6756                    `)),o&2){p(2);let t=ue(47);s(),m("ngTemplateOutlet",t)}}function yb(o,d){o&1&&ke(0)}function bb(o,d){if(o&1&&(e(0,`
6757                        `),R(1,yb,1,0,"ng-container",44),e(2,`
6758                    `)),o&2){p(2);let t=ue(51);s(),m("ngTemplateOutlet",t)}}function vb(o,d){o&1&&ke(0)}function Tb(o,d){if(o&1&&(e(0,`
6759                        `),R(1,vb,1,0,"ng-container",44),e(2,`
6760                    `)),o&2){p(2);let t=ue(55);s(),m("ngTemplateOutlet",t)}}function Eb(o,d){o&1&&ke(0)}function wb(o,d){if(o&1&&(e(0,`
6761                        `),R(1,Eb,1,0,"ng-container",44),e(2,`
6762                    `)),o&2){p(2);let t=ue(59);s(),m("ngTemplateOutlet",t)}}function Fb(o,d){o&1&&ke(0)}function Db(o,d){if(o&1&&(e(0,`
6763                        `),R(1,Fb,1,0,"ng-container",44),e(2,`
6764                    `)),o&2){p(2);let t=ue(63);s(),m("ngTemplateOutlet",t)}}function Ib(o,d){o&1&&ke(0)}function Rb(o,d){if(o&1&&(e(0,`
6765                        `),R(1,Ib,1,0,"ng-container",44),e(2,`
6766                    `)),o&2){p(2);let t=ue(67);s(),m("ngTemplateOutlet",t)}}function Mb(o,d){o&1&&ke(0)}function Ab(o,d){if(o&1&&(e(0,`
6767                        `),R(1,Mb,1,0,"ng-container",44),e(2,`
6768                    `)),o&2){p(2);let t=ue(71);s(),m("ngTemplateOutlet",t)}}function Pb(o,d){o&1&&ke(0)}function Ob(o,d){if(o&1&&(e(0,`
6769                        `),R(1,Pb,1,0,"ng-container",44),e(2,`
6770                    `)),o&2){p(2);let t=ue(75);s(),m("ngTemplateOutlet",t)}}
6770function Lb(o,d){o&1&&ke(0)}function Nb(o,d){if(o&1&&(e(0,`
6771                        `),R(1,Lb,1,0,"ng-container",44),e(2,`
6772                    `)),o&2){p(2);let t=ue(79);s(),m("ngTemplateOutlet",t)}}function Vb(o,d){o&1&&ke(0)}function kb(o,d){if(o&1&&(e(0,`
6773                        `),R(1,Vb,1,0,"ng-container",44),e(2,`
6774                    `)),o&2){p(2);let t=ue(83);s(),m("ngTemplateOutlet",t)}}function Bb(o,d){o&1&&ke(0)}function Wb(o,d){if(o&1&&(e(0,`
6775                        `),R(1,Bb,1,0,"ng-container",44),e(2,`
6776                    `)),o&2){p(2);let t=ue(87);s(),m("ngTemplateOutlet",t)}}function Ub(o,d){o&1&&ke(0)}function Yb(o,d){if(o&1&&(e(0,`
6777                        `),R(1,Ub,1,0,"ng-container",44),e(2,`
6778                    `)),o&2){p(2);let t=ue(91);s(),m("ngTemplateOutlet",t)}}function Gb(o,d){o&1&&ke(0)}function jb(o,d){if(o&1&&(e(0,`
6779                        `),R(1,Gb,1,0,"ng-container",44),e(2,`
6780                    `)),o&2){p(2);let t=ue(95);s(),m("ngTemplateOutlet",t)}}function Hb(o,d){o&1&&ke(0)}function zb(o,d){if(o&1&&(e(0,`
6781                        `),R(1,Hb,1,0,"ng-container",44),e(2,`
6782                    `)),o&2){p(2);let t=ue(99);s(),m("ngTemplateOutlet",t)}}function qb(o,d){o&1&&ke(0)}function $b(o,d){if(o&1&&(e(0,`
6783                        `),R(1,qb,1,0,"ng-container",44),e(2,`
6784                    `)),o&2){p(2);let t=ue(103);s(),m("ngTemplateOutlet",t)}}function Kb(o,d){o&1&&ke(0)}function Jb(o,d){if(o&1&&(e(0,`
6785                        `),R(1,Kb,1,0,"ng-container",44),e(2,`
6786                    `)),o&2){p(2);let t=ue(107);s(),m("ngTemplateOutlet",t)}}function Xb(o,d){if(o&1){let t=D();e(0,`
6787            `),n(1,"div",40),T("inView",function(){let r=f(t).$implicit,a=p();return h(a.onWidgetVisible(r.id))}),e(2,`
6788                `),_(3,hb,9,1),_(4,Sb,3,1)(5,bb,3,1)(6,Tb,3,1)(7,wb,3,1)(8,Db,3,1)(9,Rb,3,1)(10,Ab,3,1)(11,Ob,3,1)(12,Nb,3,1)(13,kb,3,1)(14,Wb,3,1)(15,Yb,3,1)(16,jb,3,1)(17,zb,3,1)(18,$b,3,1)(19,Jb,3,1),e(20,`
6789            `),i(),e(21,`
6790        `)}if(o&2){let t,l=d.$implicit,r=p();s(),Je(r.getColClass()+" mb-3 d-flex flex-column"),m("cdkDragDisabled",!r.editMode)("inViewResetKey",r.lazyResetKey),s(2),x(r.editMode?3:-1),s(),x((t=l.id)==="kpis"?4:t==="userTrend"?5:t==="activeUsers"?6:t==="newVsReturning"?7:t==="topPages"?8:t==="engagement"?9:t==="platforms"?10:t==="retention"?11:t==="heatmap"?12:t==="geo"?13:t==="topMembers"?14:t==="contentKpis"?15:t==="contentByType"?16:t==="contentByPlacement"?17:t==="contentTrend"?18:t==="topContentItems"?19:-1)}}function Zb(o,d){o&1&&(e(0,`
6791                    `),n(1,"div",47),e(2,`
6792                        `),n(3,"div",48),e(4,`
6793                            `),g(5,"app-skeleton-template",49),e(6,`
6794                        `),i(),e(7,`
6795                    `),i(),e(8,`
6796                `))}function Qb(o,d){o&1&&(e(0,`
6797                `),e(1,`
6798                `),N(2,Zb,9,0,null,null,W)),o&2&&(s(2),V(Le(0,mb)))}function ev(o,d){if(o&1&&(e(0,`
6799                                `),n(1,"div",54),e(2,`
6800                                    `),g(3,"i",55),e(4),i(),e(5,`
6801                            `)),o&2){let t=p().$implicit,l=p(3);s(),m("ngClass",l.getChangeClass(t.change)),s(2),m("ngClass",l.getChangeIcon(t.change)),s(),I(`
6802                                    `,l.formatPercent(t.change||0),` vs prior period
6803                                `)}}function tv(o,d){if(o&1&&(e(0,`
6804                    `),n(1,"div",50),e(2,`
6805                        `),n(3,"div",51),e(4,`
6806                            `),n(5,"span",52),e(6),i(),e(7,`
6807                            `),n(8,"div",53),e(9),i(),e(10,`
6808                            `),_(11,ev,6,3),i(),e(12,`
6809                    `),i(),e(13,`
6810                `)),o&2){let t=d.$implicit,l=d.$index;s(),lt("border-right",l%2===0),s(4),lt("hover-dotted",t.tooltip),m("pTooltip",t.tooltip?t.tooltip:""),s(),c(t.label),s(3),c(t.value),s(2),x(t.change!==void 0?11:-1)}}function iv(o,d){if(o&1&&(e(0,`
6811                `),N(1,tv,14,8,null,null,W)),o&2){let t=p(2);s(),V(t.kpiCards)}}function nv(o,d){if(o&1&&(e(0,`
6812        `),n(1,"app-admin-dashboard-card",45),e(2,`
6813        `),n(3,"div",46),e(4,`
6814            `),_(5,Qb,4,1),_(6,iv,3,0),i(),e(7,`
6815        `),i(),e(8,`
6816    `)),o&2){let t=p();
6816s(5),x(t.loadingSummary?5:-1),s(),x(t.loadingSummary?-1:6)}}function ov(o,d){if(o&1&&(e(0,`
6817                        `),g(1,"i"),e(2)),o&2){let t=d.$implicit;s(),Je(t.icon+" mr-1"),s(),I(`
6818                        `,t.label,`
6819                    `)}}function rv(o,d){o&1&&(e(0,`
6820                `),g(1,"app-skeleton-template",60),e(2,`
6821            `))}function av(o,d){if(o&1&&(e(0,`
6822                        `),g(1,"p-chart",61),e(2,`
6823                    `)),o&2){let t=p(4);s(),m("data",t.trendChartData)("options",t.trendChartOptions)}}function lv(o,d){o&1&&(e(0,`
6824                        `),n(1,"div",62),e(2,"No trend data available."),i(),e(3,`
6825                    `))}function sv(o,d){if(o&1&&(e(0,`
6826                    `),_(1,av,3,2)(2,lv,4,0)),o&2){let t=p(3);s(),x(t.trendChartData?1:2)}}function dv(o,d){o&1&&(e(0,`
6827                            `),n(1,"tr"),e(2,`
6828                                `),n(3,"th",67),e(4,`
6829                                    Date
6830                                    `),g(5,"p-sortIcon",68),e(6,`
6831                                `),i(),e(7,`
6832                                `),n(8,"th",69),e(9,`
6833                                    Users
6834                                    `),g(10,"p-sortIcon",70),e(11,`
6835                                `),i(),e(12,`
6836                                `),n(13,"th",71),e(14,`
6837                                    New
6838                                    `),g(15,"p-sortIcon",72),e(16,`
6839                                `),i(),e(17,`
6840                                `),n(18,"th",73),e(19,`
6841                                    Sessions
6842                                    `),g(20,"p-sortIcon",74),e(21,`
6843                                `),i(),e(22,`
6844                                `),n(23,"th",75),e(24,`
6845                                    Views
6846                                    `),g(25,"p-sortIcon",76),e(26,`
6847                                `),i(),e(27,`
6848                            `),i(),e(28,`
6849                        `))}function pv(o,d){if(o&1&&(e(0,`
6850                            `),n(1,"tr"),e(2,`
6851                                `),n(3,"td"),e(4),i(),e(5,`
6852                                `),n(6,"td"),e(7),v(8,"number"),i(),e(9,`
6853                                `),n(10,"td"),e(11),v(12,"number"),i(),e(13,`
6854                                `),n(14,"td"),e(15),v(16,"number"),i(),e(17,`
6855                                `),n(18,"td"),e(19),v(20,"number"),i(),e(21,`
6856                            `),i(),e(22,`
6857                        `)),o&2){let t=d.$implicit;s(4),c(t.date),s(3),c(E(8,5,t.users)),s(4),c(E(12,7,t.newUsers)),s(4),c(E(16,9,t.sessions)),s(4),c(E(20,11,t.pageViews))}}function mv(o,d){o&1&&(e(0,`
6858                            `),n(1,"tr")(2,"td",77),e(3,"No trend data available"),i()(),e(4,`
6859                        `))}function cv(o,d){if(o&1&&(e(0,`
6860                    `),n(1,"p-table",63),e(2,`
6861                        `),R(3,dv,29,0,"ng-template",64),e(4,`
6862                        `),R(5,pv,23,13,"ng-template",65),e(6,`
6863                        `),R(7,mv,5,0,"ng-template",66),e(8,`
6864                    `),i(),e(9,`
6865                `)),o&2){let t=p(3);s(),m("value",t.trendData)("paginator",!0)("rows",10)("showCurrentPageReport",!0)}}function uv(o,d){if(o&1&&(e(0,`
6866                `),_(1,sv,3,1),_(2,cv,10,4)),o&2){let t=p(2);s(),x(t.selectedDisplayMode==="chart"?1:-1),s(),x(t.selectedDisplayMode==="table"?2:-1)}}function _v(o,d){if(o&1){let t=D();e(0,`
6867        `),n(1,"app-admin-dashboard-card",56),e(2,`
6868            `),g(3,"app-tooltip",57),e(4,`
6869            `),n(5,"div",58),e(6,`
6870                `),n(7,"p-selectButton",59),y("ngModelChange",function(r){f(t);let a=p();return S(a.selectedDisplayMode,r)||(a.selectedDisplayMode=r),h(r)}),e(8,`
6871                    `),R(9,ov,3,3,"ng-template",null,16,Fe),e(11,`
6872                `),i(),e(12,`
6873            `),i(),e(13,`
6874            `),_(14,rv,3,0),_(15,uv,3,2),i(),e(16,`
6875    `)}if(o&2){let t=p();s(),m("loading",t.loadingTrend),s(2),m("renderAsLink",!1),s(4),m("options",t.displayModeOptions),C("ngModel",t.selectedDisplayMode),m("allowEmpty",!1),s(7),x(t.loadingTrend?14:-1),s(),x(t.loadingTrend?
6875-1:15)}}function xv(o,d){if(o&1&&(e(0,`
6876        `),n(1,"app-admin-dashboard-card",78),e(2,`
6877            `),g(3,"app-tooltip",79),e(4,`
6878            `),n(5,"div",80),e(6,`
6879                `),n(7,"span",81),e(8,"Daily (DAU)"),i(),e(9,`
6880                `),n(10,"span",53),e(11),v(12,"number"),i(),e(13,`
6881            `),i(),e(14,`
6882            `),n(15,"div",80),e(16,`
6883                `),n(17,"span",81),e(18,"Weekly (WAU)"),i(),e(19,`
6884                `),n(20,"span",53),e(21),v(22,"number"),i(),e(23,`
6885            `),i(),e(24,`
6886            `),n(25,"div",80),e(26,`
6887                `),n(27,"span",81),e(28,"Monthly (MAU)"),i(),e(29,`
6888                `),n(30,"span",53),e(31),v(32,"number"),i(),e(33,`
6889            `),i(),e(34,`
6890            `),n(35,"div",82),e(36,`
6891                `),n(37,"span",81),e(38,"Stickiness (DAU/MAU)"),i(),e(39,`
6892                `),n(40,"span",53),e(41),i(),e(42,`
6893            `),i(),e(43,`
6894        `),i(),e(44,`
6895    `)),o&2){let t=p();s(),m("loading",t.loadingActiveUsers),s(2),m("renderAsLink",!1),s(8),c(E(12,6,t.activeUsers==null?null:t.activeUsers.dau)),s(10),c(E(22,8,t.activeUsers==null?null:t.activeUsers.wau)),s(10),c(E(32,10,t.activeUsers==null?null:t.activeUsers.mau)),s(10),c(t.formatPercent((t.activeUsers==null?null:t.activeUsers.stickiness)||0))}}function gv(o,d){if(o&1&&(e(0,`
6896        `),n(1,"app-admin-dashboard-card",83),e(2,`
6897            `),g(3,"app-tooltip",84),e(4,`
6898            `),n(5,"div",85),e(6,`
6899                    `),n(7,"span",81),e(8,"New Users"),i(),e(9,`
6900                    `),n(10,"strong"),e(11),v(12,"number"),i(),e(13,`
6901                `),i(),e(14,`
6902                `),g(15,"p-progressBar",86),e(16,`
6903                `),n(17,"div",87),e(18),v(19,"number"),i(),e(20,`
6904                `),n(21,"div",85),e(22,`
6905                    `),n(23,"span",81),e(24,"Returning Users"),i(),e(25,`
6906                    `),n(26,"strong"),e(27),v(28,"number"),i(),e(29,`
6907                `),i(),e(30,`
6908                `),g(31,"p-progressBar",88),e(32,`
6909                `),n(33,"div",89),e(34),v(35,"number"),i(),e(36,`
6910        `),i(),e(37,`
6911    `)),o&2){let t=p();s(),m("loading",t.loadingNewVsReturning),s(2),m("renderAsLink",!1),s(8),c(E(12,14,t.newVsReturning==null?null:t.newVsReturning.newUsers)),s(4),_t(Le(24,Qr)),m("value",t.getNewUserPercent())("showValue",!1),s(3),I("Avg ",B(19,16,t.newVsReturning==null?null:t.newVsReturning.newUserSessionAvg,"1.1-1")," sessions/user"),s(9),c(E(28,19,t.newVsReturning==null?null:t.newVsReturning.returningUsers)),s(4),_t(Le(25,Qr)),m("value",t.getReturningUserPercent())("showValue",!1),s(3),I("Avg ",B(35,21,t.newVsReturning==null?null:t.newVsReturning.returningUserSessionAvg,"1.1-1")," sessions/user")}}function fv(o,d){o&1&&(e(0,`
6912                        `),n(1,"tr"),e(2,`
6913                            `),n(3,"th",95),e(4,`
6914                                Page
6915                                `),g(5,"p-sortIcon",96),e(6,`
6916                            `),i(),e(7,`
6917                            `),n(8,"th",97),e(9,`
6918                                Platform
6919                                `),g(10,"p-sortIcon",98),e(11,`
6920                            `),i(),e(12,`
6921                            `),n(13,"th",99),e(14,`
6922                                Views
6923                                `),g(15,"p-sortIcon",100),e(16,`
6924                            `),i(),e(17,`
6925                            `),n(18,"th",101),e(19,`
6926                                Users
6927                                `),g(20,"p-sortIcon",102),e(21,`
6928                            `),i(),e(22,`
6929                            `),n(23,"th",103),e(24,`
6930                                Avg Time
6931                                `),g(25,"p-sortIcon",104),e(26,`
6932                            `),i(),e(27,`
6933                        `),i(),e(28,`
6934                    `))}function hv(o,d){o&1&&(e(0,`
6935                                    `),n(1,"span",107),e(2,`
6936                                        Website
6937                                    `),i(),e(3,`
6938                                `))}function Cv(o,d){o&1&&(e(0,`
6939                                    `),n(1,"span",108),e(2,`
6940                                        Mobile
6941                                    `),i(),e(3,`
6942                                `))}function Sv(o,d){if(o&1&&(e(0,`
6943                        `),n(1,"tr"),e(2,`
6944                             `),n(3,"td"),e(4,`
6945                                `),n(5,"span",105),e(6,`
6946                                `),n(7,"a",106),e(8),v(9,"slice"),i(),e(10,`
6947                                `),i(),e(11,`
6948                            `),i(),e(12,`
6949                            `),n(13,"td"),e(14,`
6950                                `),_(15,hv,4,0)(16,Cv,4,0),i(),e(17,`
6951                            `),n(18,"td"),e(19),v(20,"number"),i(),e(21,`
6952                            `),n(22,"td"),e(23),v(24,"number"),i(),e(25,`
6953                            `),n(26,"td"),e(27),i(),e(28,`
6954                        `),i(),e(29,`
6955                    `)),o&2){let t=d.$implicit,l=p(2);s(5),m("pTooltip",en(t.pageTitle)),s(2),m("href",en(t.pagePath),xn),s(),Ye("",Cn(9,10,t.pageTitle,0,20),"",t.pageTitle.length>20?"\u2026":""),s(7),x(t.platform==="Web"?15:16),s(4),c(E(20,14,t.views)),s(4),c(E(24,16,t.uniqueUsers)),s(4),c(l.formatDuration(t.avgTimeOnPage))}}function yv(o,d){o&1&&(e(0,`
6956                        `),n(1,"tr")(2,"td",77),e(3,"No page data available"),i()(),e(4,`
6957                    `))}function bv(o,d){if(o&1){let t=D();e(0,`
6958        `),n(1,"app-admin-dashboard-card",90),e(2,`
6959            `),g(3,"app-tooltip",91),e(4,`
6960            
6961                        `),n(5,"div",92),e(6,`
6962                `),n(7,"p-selectButton",93),y("ngModelChange",function(r){f(t);let a=p();return S(a.topPagesTab,r)||(a.topPagesTab=r),h(r)}),i(),e(8,`
6963            `),i(),e(9,`
6964
6965            `),n(10,"p-table",94),e(11,`
6966                    `),R(12,fv,29,0,"ng-template",64),e(13,`
6967                    `),R(14,Sv,30,18,"ng-template",65),e(15,`
6968                    `),R(16,yv,5,0,"ng-template",66),e(17,`
6969                `),i(),e(18,`
6970        `),i(),e(19,`
6971    `)}if(o&2){let t=p();s(),m("loading",t.loadingTopPages),s(2),m("renderAsLink",!1),s(4),m("options",t.engagementTabs),C("ngModel",t.topPagesTab),m("allowEmpty",!1)("size","small"),s(3),m("value",t.filteredTopPages)("paginator",!0)("rows",10)}}function vv(o,d){if(o&1&&(e(0,`
6972                    `),n(1,"div",80),e(2,`
6973                        `),n(3,"span",81),e(4,"Avg Engagement Time"),i(),e(5,`
6974                        `),n(6,"strong"),e(7),i(),e(8,`
6975                    `),i(),e(9,`
6976                    `),n(10,"div",80),e(11,`
6977                        `),n(12,"span",81),e(13,"Engaged Session Rate"),i(),e(14,`
6978                        `),n(15,"strong"),e(16),i(),e(17,`
6979                    `),i(),e(18,`
6980                    `),n(19,"div",80),e(20,`
6981                        `),n(21,"span",81),e(22,`
6982                            Avg Sessions / User
6983                            `),n(23,"span",112),e(24),i(),e(25,`
6984                        `),i(),e(26,`
6985                        `),n(27,"strong"),e(28),v(29,"number"),i(),e(30,`
6986                    `),i(),e(31,`
6987                    `),n(32,"div",80),e(33,`
6988                        `),n(34,"span",81),e(35,"Avg Screens / Session"),i(),e(36,`
6989                        `),n(37,"strong"),e(38),v(39,"number"),i(),e(40,`
6990                    `),i(),e(41,`
6991                    `),n(42,"div",113),e(43,`
6992                        `),n(44,"span",81),e(45,"Total Events"),i(),e(46,`
6993                        `),n(47,"strong"),e(48),v(49,"number"),i(),e(50,`
6994                    `),i(),e(51,`
6995            `)),o&2){let t=p(2);s(7),c(t.formatDuration(t.engagement==null?null:t.engagement.avgEngagementTimeSec)),s(9),c(t.formatPercent((t.engagement==null?null:t.engagement.engagedSessionRate)||0)),s(8),I("(",t.selectedRangeLabel,")"),s(4),c(B(29,6,t.engagement==null?null:t.engagement.avgSessionsPerUser,"1.1-1")),s(10),c(B(39,9,t.engagement==null?null:t.engagement.avgScreensPerSession,"1.1-1")),s(10),c(E(49,12,t.engagement==null?null:t.engagement.totalEvents))}}function Tv(o,d){if(o&1&&(e(0,`
6996                        `),n(1,"div",80),e(2,`
6997                            `),n(3,"span",81),e(4,"Avg Engagement Time"),i(),e(5,`
6998                            `),n(6,"strong"),e(7),i(),e(8,`
6999                        `),i(),e(9,`
7000                        `),n(10,"div",80),e(11,`
7001                            `),n(12,"span",81),e(13,"Engaged Session Rate"),i(),e(14,`
7002                            `),n(15,"strong"),e(16),i(),e(17,`
7003                        `),i(),e(18,`
7004                        `),n(19,"div",80),e(20,`
7005                            `),n(21,"span",81),e(22,"Avg Sessions / User"),i(),e(23,`
7006                            `),n(24,"strong"),e(25),v(26,"number"),i(),e(27,`
7007                        `),i(),e(28,`
7008                        `),n(29,"div",80),e(30,`
7009                            `),n(31,"span",81),e(32,"Avg Screens / Session"),i(),e(33,`
7010                            `),n(34,"strong"),e(35),v(36,"number"),i(),e(37,`
7011                        `),i(),e(38,`
7012                        `),n(39,"div",113),e(40,`
7013                            `),n(41,"span",81),e(42,"Total Events"),i(),e(43,`
7014                            `),n(44,"strong"),e(45),v(46,"number"),i(),e(47,`
7015                        `),i(),e(48,`
7016                    `)),o&2){let t=d,l=p(3);s(7),c(l.formatDuration(t.avgEngagementTimeSec)),s(9),c(l.formatPercent(t.engagedSessionRate||0)),s(9),c(B(26,5,t.avgSessionsPerUser,"1.1-1")),s(10),c(B(36,8,t.avgScreensPerSession,"1.1-1")),s(10),c(E(46,11,t.totalEvents))}}function Ev(o,d){o&1&&(e(0,`
7017                        `),n(1,"div",62),e(2,"No data for this platform."),i(),e(3,`
7018                    `))}function wv(o,d){if(o&1&&(e(0,`
7019                    `),_(1,Tv,49,13),_(2,Ev,4,0)),o&2){let t,l=p(2);s(),x((t=l.getEngagementPlatform(l.engagementTab))?1:-1,t),s(),x(l.getEngagementPlatform(l.engagementTab)?-1:2)}}function Fv(o,d){if(o&1){let t=D();e(0,`
7020        `),n(1,"app-admin-dashboard-card",109),e(2,`
7021            `),g(3,"app-tooltip",110),e(4,`
7022            `),n(5,"small",111),e(6),i(),e(7,`
7023
7024            `),n(8,"div",92),e(9,`
7025                `),n(10,"p-selectButton",93),y("ngModelChange",function(r){f(t);let a=p();return S(a.engagementTab,r)||(a.engagementTab=r),h(r)}),i(),e(11,`
7026            `),i(),e(12,`
7027            `),e(13,`
7028            `),_(14,vv,52,14),_(15,wv,3,2),i(),e(16,`
7029    `)}if(o&2){let t=p();s(),m("loading",t.loadingEngagement),s(2),m("renderAsLink",!1),s(3),c(t.selectedRangeLabel),s(4),m("options",t.engagementTabs),C("ngModel",t.engagementTab),m("allowEmpty",!1)("size","small"),s(4),x(t.engagementTab==="all"?14:-1),s(),x(t.engagementTab!=="all"?15:-1)}}function Dv(o,d){if(o&1&&(e(0,`
7030                    `),n(1,"div",117),e(2,`
7031                        `),g(3,"p-chart",118),e(4,`
7032                    `),i(),e(5,`
7033                `)),o&2){let t=p(2);s(3),m("data",t.platformChartData)("options",t.platformChartOptions)}}function Iv(o,d){if(o&1&&(e(0,`
7034                        `),n(1,"div",119),e(2,`
7035                            `),n(3,"span",81),e(4),i(),e(5,`
7036                            `),n(6,"span"),e(7,`
7037                                `),n(8,"span",120),e(9),v(10,"number"),i(),e(11,`
7038                                `),n(12,"span",121),e(13),v(14,"number"),i(),e(15,`
7039                            `),i(),e(16,`
7040                        `),i(),e(17,`
7041                    `)),o&2){let t=d.$implicit;s(4),c(t.platform),s(5),I("",E(10,3,t.users)," users"),s(4),I("",E(14,5,t.sessions)," sessions")}}function Rv(o,d){if(o&1&&(e(0,`
7042        `),n(1,"app-admin-dashboard-card",114),e(2,`
7043            `),g(3,"app-tooltip",115),e(4,`
7044            `),_(5,Dv,6,2),n(6,"div",116),e(7,`
7045                    `),N(8,Iv,18,7,null,null,W),i(),e(10,`
7046        `),i(),e(11,`
7047    `)),o&2){let t=p();s(),m("loading",t.loadingPlatforms),s(2),m("renderAsLink",!1),s(2),x(t.platformChartData?5:-1),s(3),V(t.platformSummary)}}function Mv(o,d){if(o&1&&(e(0,`
7048                                        `),n(1,"th"),e(2),i(),e(3,`
7049                                    `)),o&2){let t=d.$index;s(2),I("Wk ",t)}}function Av(o,d){if(o&1&&(e(0,`
7050                                            `),n(1,"td"),e(2),i(),e(3,`
7051                                        `)),o&2){let t=d.$implicit,l=p(4);s(),ai("background-color",l.getRetentionColor(t))("color",t>.5?"#fff":"#333"),s(),I(`
7052                                                `,l.formatPercent(t),`
7053                                            `)}}function Pv(o,d){if(o&1&&(e(0,`
7054                                    `),n(1,"tr"),e(2,`
7055                                        `),n(3,"td",127),e(4),i(),e(5,`
7056                                        `),n(6,"td"),e(7),v(8,"number"),i(),e(9,`
7057                                        `),N(10,Av,4,5,null,null,W),i(),e(12,`
7058                                `)),o&2){let t=d.$implicit;s(4),c(t.cohortWeek),s(3),c(E(8,2,t.cohortSize)),s(3),V(t.retentionRates)}}function Ov(o,d){if(o&1&&(e(0,`
7059                    `),n(1,"div",124),e(2,`
7060                        `),n(3,"table",125),e(4,`
7061                            `),n(5,"thead"),e(6,`
7062                                `),n(7,"tr"),e(8,`
7063                                    `),n(9,"th",126),e(10,"Cohort"),i(),e(11,`
7064                                    `),n(12,"th"),e(13,"Size"),i(),e(14,`
7065                                    `),N(15,Mv,4,1,null,null,W),i(),e(17,`
7066                            `),i(),e(18,`
7067                            `),n(19,"tbody"),e(20,`
7068                                `),N(21,Pv,13,4,null,null,W),i(),e(23,`
7069                        `),i(),e(24,`
7070                    `),i(),e(25,`
7071                `)),o&2){let t=p(2);s(15),V(t.retentionData.cohorts[0]==null?null:t.retentionData.cohorts[0].retentionRates),s(6),V(t.retentionData.cohorts)}}function Lv(o,d){o&1&&(e(0,`
7072                    `),n(1,"div",62),e(2,"No retention data available yet."),i(),e(3,`
7073                `))}function Nv(o,d){if(o&1&&(e(0,`
7074        `),n(1,"app-admin-dashboard-card",122),e(2,`
7075            `),g(3,"app-tooltip",123),e(4,`
7076            `),_(5,Ov,26,0)(6,Lv,4,0),i(),e(7,`
7077    `)),o&2){let t=p();s(),m("loading",t.loadingRetention),s(2),m("renderAsLink",!1),s(2),x(!(t.retentionData==null||t.retentionData.cohorts==null)&&t.retentionData.cohorts.length?5:6)}}function Vv(o,d){if(o&1&&(e(0,`
7078                                    `),n(1,"th",130),e(2),i(),e(3,`
7079                                `)),o&2){let t=d.$implicit,l=p(2);s(2),c(l.formatHour(t))}}function kv(o,d){if(o&1&&(e(0,`
7080                                        `),n(1,"td",132),e(2),i(),e(3,`
7081                                    `)),o&2){let t=d.$implicit,l=p(),r=l.$implicit,a=l.$index,b=p(2);s(),ai("background-color",b.getHeatmapColor((b.heatmapGrid[a]==null?null:b.heatmapGrid[a][t])||0))("color",((b.heatmapGrid[a]==null?null:b.heatmapGrid[a][t])||0)/b.getHeatmapMax()>.5?"#fff":"#333"),m("pTooltip",hn("",r," ",b.formatHour(t),": ",(b.heatmapGrid[a]==null?null:b.heatmapGrid[a][t])||0," sessions")),s(),I(`
7082                                            `,(b.heatmapGrid[a]==null?null:b.heatmapGrid[a][t])||0,`
7083                                        `)}}function Bv(o,d){if(o&1&&(e(0,`
7084                                `),n(1,"tr"),e(2,`
7085                                    `),n(3,"td",131),e(4),i(),e(5,`
7086                                    `),N(6,kv,4,9,null,null,W),i(),e(8,`
7087                            `)),o&2){let t=d.$implicit,l=p(2);s(4),c(t),s(2),V(l.hoursOfDay)}}function Wv(o,d){if(o&1&&(e(0,`
7088        `),n(1,"app-admin-dashboard-card",128),e(2,`
7089            `),g(3,"app-tooltip",129),e(4,`
7090            `),n(5,"div",124),e(6,`
7091                    `),n(7,"table",125),e(8,`
7092                        `),n(9,"thead"),e(10,`
7093                            `),n(11,"tr"),e(12,`
7094                                `),g(13,"th"),e(14,`
7095                                `),N(15,Vv,4,1,null,null,W),i(),e(17,`
7096                        `),i(),e(18,`
7097                        `),n(19,"tbody"),e(20,`
7098                            `),N(21,Bv,9,1,null,null,W),i(),e(23,`
7099                    `),i(),e(24,`
7100                `),i(),e(25,`
7101        `),i(),e(26,`
7102    `)),o&2){let t=p();s(),m("loading",t.loadingHeatmap),s(2),m("renderAsLink",!1),s(12),V(t.hoursOfDay),s(6),V(t.daysOfWeek)}}function Uv(o,d){o&1&&(e(0,`
7103                        `),n(1,"tr"),e(2,`
7104                            `),n(3,"th",136),e(4,`
7105                                Region
7106                                `),g(5,"p-sortIcon",137),e(6,`
7107                            `),i(),e(7,`
7108                            `),n(8,"th",138),e(9,`
7109                                City
7110                                `),g(10,"p-sortIcon",139),e(11,`
7111                            `),i(),e(12,`
7112                            `),n(13,"th",69),e(14,`
7113                                Users
7114                                `),g(15,"p-sortIcon",70),e(16,`
7115                            `),i(),e(17,`
7116                            `),n(18,"th",73),e(19,`
7117                                Sessions
7118                                `),g(20,"p-sortIcon",74),e(21,`
7119                            `),i(),e(22,`
7120                        `),i(),e(23,`
7121                    `))}function Yv(o,d){if(o&1&&(e(0,`
7122                        `),n(1,"tr"),e(2,`
7123                            `),n(3,"td"),e(4),i(),e(5,`
7124                            `),n(6,"td"),e(7),i(),e(8,`
7125                            `),n(9,"td"),e(10),v(11,"number"),i(),e(12,`
7126                            `),n(13,"td"),e(14),v(15,"number"),i(),e(16,`
7127                        `),i(),e(17,`
7128                    `)),o&2){let t=d.$implicit;s(4),c(t.region),s(3),c(t.city),s(3),c(E(11,4,t.users)),s(4),c(E(15,6,t.sessions))}}function Gv(o,d){o&1&&(e(0,`
7129                        `),n(1,"tr")(2,"td",140),e(3,"No geographic data"),i()(),e(4,`
7130                    `))}function jv(o,d){if(o&1&&(e(0,`
7131        `),n(1,"app-admin-dashboard-card",133),e(2,`
7132            `),g(3,"app-tooltip",134),e(4,`
7133            `),n(5,"p-table",135),e(6,`
7134                    `),R(7,Uv,24,0,"ng-template",64),e(8,`
7135                    `),R(9,Yv,18,8,"ng-template",65),e(10,`
7136                    `),R(11,Gv,5,0,"ng-template",66),e(12,`
7137                `),i(),e(13,`
7138        `),i(),e(14,`
7139    `)),o&2){let t=p();s(),m("loading",t.loadingGeo),s(2),m("renderAsLink",!1),s(2),m("value",t.geoData)("paginator",!0)("rows",10)}}function Hv(o,d){o&1&&(e(0,`
7140                        `),n(1,"tr"),e(2,`
7141                            `),n(3,"th",143),e(4,`
7142                                User
7143                                `),g(5,"p-sortIcon",144),e(6,`
7144                            `),i(),e(7,`
7145                            `),n(8,"th",73),e(9,`
7146                                Sessions
7147                                `),g(10,"p-sortIcon",74),e(11,`
7148                            `),i(),e(12,`
7149                            `),n(13,"th",75),e(14,`
7150                                Views
7151                                `),g(15,"p-sortIcon",76),e(16,`
7152                            `),i(),e(17,`
7153                            `),n(18,"th"),e(19,"Engagement"),i(),e(20,`
7154                            `),n(21,"th"),e(22,"Platform"),i(),e(23,`
7155                        `),i(),e(24,`
7156                    `))}function zv(o,d){if(o&1&&(e(0,`
7157                        `),n(1,"tr"),e(2,`
7158                            `),n(3,"td"),e(4,`
7159                                `),n(5,"a",145),e(6),i(),e(7,`
7160                            `),i(),e(8,`
7161                            `),n(9,"td"),e(10),v(11,"number"),i(),e(12,`
7162                            `),n(13,"td"),e(14),v(15,"number"),i(),e(16,`
7163                            `),n(17,"td"),e(18),i(),e(19,`
7164                            `),n(20,"td"),e(21,`
7165                                `),n(22,"span",146),e(23),i(),e(24,`
7166                            `),i(),e(25,`
7167                        `),i(),e(26,`
7168                    `)),o&2){let t=d.$implicit,l=p(2);s(5),m("routerLink",re(11,cb,t.userID)),s(),I(`
7169                                    `,t.userID,`
7170                                `),s(4),c(E(11,7,t.sessions)),s(4),c(E(15,9,t.pageViews)),s(4),c(l.formatDuration(t.engagementTimeSec)),s(4),m("ngClass",t.primaryPlatform==="Mobile"?"pill-active":"pill-primary"),s(),I(`
7171                                    `,t.primaryPlatform,`
7172                                `)}}function qv(o,d){o&1&&(e(0,`
7173                        `),n(1,"tr")(2,"td",77),e(3,"No member data"),i()(),e(4,`
7174                    `))}function $v(o,d){if(o&1&&(e(0,`
7175        `),n(1,"app-admin-dashboard-card",141),e(2,`
7176            `),g(3,"app-tooltip",142),e(4,`
7177            `),n(5,"p-table",94),e(6,`
7178                    `),R(7,Hv,25,0,"ng-template",64),e(8,`
7179                    `),R(9,zv,27,13,"ng-template",65),e(10,`
7180                    `),R(11,qv,5,0,"ng-template",66),e(12,`
7181                `),i(),e(13,`
7182        `),i(),e(14,`
7183    `)),o&2){let t=p();s(),m("loading",t.loadingTopMembers),s(2),m("renderAsLink",!1),s(2),m("value",t.topMembers)("paginator",!0)("rows",10)}}function Kv(o,d){o&1&&(e(0,`
7184                        `),g(1,"app-skeleton-template",49),e(2,`
7185                    `))}function Jv(o,d){if(o&1&&(e(0,`
7186                        `),n(1,"div",150),e(2,`
7187                            `),g(3,"i",151),e(4,`
7188                            `),n(5,"span",152),e(6,"Total Impressions"),i(),e(7,`
7189                            `),g(8,"app-tooltip",153),e(9,`
7190                        `),i(),e(10,`
7191                        `),n(11,"div",53),e(12),v(13,"number"),i(),e(14,`
7192                    `)),o&2){let t=p(2);s(8),m("renderAsLink",!1),s(4),c(E(13,2,t.getTotalContentImpressions()))}}function Xv(o,d){o&1&&(e(0,`
7193                        `),g(1,"app-skeleton-template",49),e(2,`
7194                    `))}function Zv(o,d){if(o&1&&(e(0,`
7195                        `),n(1,"div",150),e(2,`
7196                            `),g(3,"i",154),e(4,`
7197                            `),n(5,"span",152),e(6,"Total Clicks"),i(),e(7,`
7198                            `),g(8,"app-tooltip",155),e(9,`
7199                        `),i(),e(10,`
7200                        `),n(11,"div",53),e(12),v(13,"number"),i(),e(14,`
7201                    `)),o&2){let t=p(2);s(8),m("renderAsLink",!1),s(4),c(E(13,2,t.getTotalContentClicks()))}}function Qv(o,d){o&1&&(e(0,`
7202                        `),g(1,"app-skeleton-template",49),e(2,`
7203                    `))}function eT(o,d){if(o&1&&(e(0,`
7204                        `),n(1,"div",150),e(2,`
7205                            `),g(3,"i",156),e(4,`
7206                            `),n(5,"span",152),e(6,"Overall CTR"),i(),e(7,`
7207                            `),g(8,"app-tooltip",157),e(9,`
7208                        `),i(),e(10,`
7209                        `),n(11,"div",53),e(12),i(),e(13,`
7210                    `)),o&2){let t=p(2);s(8),m("renderAsLink",!1),s(4),c(t.getOverallContentCTR())}}function tT(o,d){o&1&&(e(0,`
7211                        `),g(1,"app-skeleton-template",49),e(2,`
7212                    `))}function iT(o,d){if(o&1&&(e(0,`
7213                        `),n(1,"div",150),e(2,`
7214                            `),g(3,"i",158),e(4,`
7215                            `),n(5,"span",152),e(6,"Content Types"),i(),e(7,`
7216                            `),g(8,"app-tooltip",159),e(9,`
7217                        `),i(),e(10,`
7218                        `),n(11,"div",53),e(12),i(),e(13,`
7219                    `)),o&2){let t=p(2);s(8),m("renderAsLink",!1),s(4),c(t.contentOverview.length)}}function nT(o,d){if(o&1&&(e(0,`
7220        `),n(1,"app-admin-dashboard-card",147),e(2,`
7221        `),n(3,"div",46),e(4,`
7222            `),n(5,"div",148),e(6,`
7223                `),n(7,"div",149),e(8,`
7224                    `),_(9,Kv,3,0),_(10,Jv,15,4),i(),e(11,`
7225            `),i(),e(12,`
7226            `),n(13,"div",50),e(14,`
7227                `),n(15,"div",149),e(16,`
7228                    `),_(17,Xv,3,0),_(18,Zv,15,4),i(),e(19,`
7229            `),i(),e(20,`
7230            `),n(21,"div",148),e(22,`
7231                `),n(23,"div",149),e(24,`
7232                    `),_(25,Qv,3,0),_(26,eT,14,2),i(),e(27,`
7233            `),i(),e(28,`
7234            `),n(29,"div",50),e(30,`
7235                `),n(31,"div",149),e(32,`
7236                    `),_(33,tT,3,0),_(34,iT,14,2),i(),e(35,`
7237            `),i(),e(36,`
7238        `),i(),e(37,`
7239        `),i(),e(38,`
7240    `)),o&2){let t=p();s(9),x(t.loadingContentOverview?9:-1),s(),x(t.loadingContentOverview?-1:10),s(7),x(t.loadingContentOverview?17:-1),s(),x(t.loadingContentOverview?-1:18),s(7),x(t.loadingContentOverview?25:-1),s(),x(t.loadingContentOverview?-1:26),s(7),x(t.loadingContentOverview?33:-1),s(),x(t.loadingContentOverview?-1:34)}}function oT(o,d){o&1&&(e(0,`
7241                        `),n(1,"tr"),e(2,`
7242                            `),n(3,"th",163),e(4,`
7243                                Type
7244                                `),g(5,"p-sortIcon",164),e(6,`
7245                            `),i(),e(7,`
7246                            `),n(8,"th",165),e(9,`
7247                                Impressions
7248                                `),g(10,"p-sortIcon",166),e(11,`
7249                            `),i(),e(12,`
7250                            `),n(13,"th",167),e(14,`
7251                                Clicks
7252                                `),g(15,"p-sortIcon",168),e(16,`
7253                            `),i(),e(17,`
7254                            `),n(18,"th",169),e(19,`
7255                                CTR
7256                                `),g(20,"p-sortIcon",170),e(21,`
7257                            `),i(),e(22,`
7258                            `),n(23,"th",101),e(24,`
7259                                Users
7260                                `),g(25,"p-sortIcon",102),e(26,`
7261                            `),i(),e(27,`
7262                        `),i(),e(28,`
7263                    `))}function rT(o,d){if(o&1&&(e(0,`
7264                        `),n(1,"tr"),e(2,`
7265                            `),n(3,"td"),e(4),i(),e(5,`
7266                            `),n(6,"td"),e(7),v(8,"number"),i(),e(9,`
7267                            `),n(10,"td"),e(11),v(12,"number"),i(),e(13,`
7268                            `),n(14,"td"),e(15),i(),e(16,`
7269                            `),n(17,"td"),e(18),v(19,"number"),i(),e(20,`
7270                        `),i(),e(21,`
7271                    `)),o&2){let t=d.$implicit,l=p(2);s(4),c(l.formatContentType(t.contentType)),s(3),c(E(8,5,t.impressions)),s(4),c(E(12,7,t.clicks)),s(4),c(l.formatPercent(t.ctr)),s(3),c(E(19,9,t.uniqueUsers))}}function aT(o,d){o&1&&(e(0,`
7272                        `),n(1,"tr")(2,"td",77),e(3,"No content data available"),i()(),e(4,`
7273                    `))}function lT(o,d){if(o&1&&(e(0,`
7274        `),n(1,"app-admin-dashboard-card",160),e(2,`
7275            `),g(3,"app-tooltip",161),e(4,`
7276            `),n(5,"p-table",162),e(6,`
7277                    `),R(7,oT,29,0,"ng-template",64),e(8,`
7278                    `),R(9,rT,22,11,"ng-template",65),e(10,`
7279                    `),R(11,aT,5,0,"ng-template",66),e(12,`
7280                `),i(),e(13,`
7281        `),i(),e(14,`
7282    `)),o&2){let t=p();s(),m("loading",t.loadingContentOverview),s(2),m("renderAsLink",!1),s(2),m("value",t.contentOverview)}}function sT(o,d){o&1&&(e(0,`
7283                        `),n(1,"tr"),e(2,`
7284                            `),n(3,"th",174),e(4,`
7285                                Placement
7286                                `),g(5,"p-sortIcon",175),e(6,`
7287                            `),i(),e(7,`
7288                            `),n(8,"th",165),e(9,`
7289                                Impressions
7290                                `),g(10,"p-sortIcon",166),e(11,`
7291                            `),i(),e(12,`
7292                            `),n(13,"th",167),e(14,`
7293                                Clicks
7294                                `),g(15,"p-sortIcon",168),e(16,`
7295                            `),i(),e(17,`
7296                            `),n(18,"th",169),e(19,`
7297                                CTR
7298                                `),g(20,"p-sortIcon",170),e(21,`
7299                            `),i(),e(22,`
7300                        `),i(),e(23,`
7301                    `))}function dT(o,d){if(o&1&&(e(0,`
7302                        `),n(1,"tr"),e(2,`
7303                            `),n(3,"td"),e(4),i(),e(5,`
7304                            `),n(6,"td"),e(7),v(8,"number"),i(),e(9,`
7305                            `),n(10,"td"),e(11),v(12,"number"),i(),e(13,`
7306                            `),n(14,"td"),e(15),i(),e(16,`
7307                        `),i(),e(17,`
7308                    `)),o&2){let t=d.$implicit,l=p(2);s(4),c(l.formatPlacement(t.placement)),s(3),c(E(8,4,t.impressions)),s(4),c(E(12,6,t.clicks)),s(4),c(l.formatPercent(t.ctr))}}function pT(o,d){o&1&&(e(0,`
7309                        `),n(1,"tr")(2,"td",140),e(3,"No placement data available"),i()(),e(4,`
7310                    `))}function mT(o,d){if(o&1&&(e(0,`
7311        `),n(1,"app-admin-dashboard-card",171),e(2,`
7312            `),g(3,"app-tooltip",172),e(4,`
7313            `),n(5,"p-table",173),e(6,`
7314                    `),R(7,sT,24,0,"ng-template",64),e(8,`
7315                    `),R(9,dT,18,8,"ng-template",65),e(10,`
7316                    `),R(11,pT,5,0,"ng-template",66),e(12,`
7317                `),i(),e(13,`
7318        `),i(),e(14,`
7319    `)),o&2){let t=p();s(),m("loading",t.loadingContentPlacement),s(2),m("renderAsLink",!1),s(2),m("value",t.contentPlacement)}}function cT(o,d){if(o&1&&(e(0,`
7320                `),g(1,"p-chart",61),e(2,`
7321            `)),o&2){let t=p(2);s(),m("data",t.contentTrendChartData)("options",t.contentTrendChartOptions)}}function uT(o,d){o&1&&(e(0,`
7322                `),n(1,"div",62),e(2,"Not enough data to chart a trend yet."),i(),e(3,`
7323            `))}function _T(o,d){if(o&1&&(e(0,`
7324        `),n(1,"app-admin-dashboard-card",176),e(2,`
7325            `),g(3,"app-tooltip",177),e(4,`
7326            `),_(5,cT,3,2)(6,uT,4,0),i(),e(7,`
7327    `)),o&2){let t=p();s(),m("loading",t.loadingContentTrend),s(2),m("renderAsLink",!1),s(2),x(t.contentTrendChartData&&t.hasContentTrendData()?5:6)}}function xT(o,d){o&1&&(e(0,`
7328                        `),n(1,"tr"),e(2,`
7329                            `),n(3,"th",180),e(4,`
7330                                Name
7331                                `),g(5,"p-sortIcon",181),e(6,`
7332                            `),i(),e(7,`
7333                            `),n(8,"th",163),e(9,`
7334                                Type
7335                                `),g(10,"p-sortIcon",164),e(11,`
7336                            `),i(),e(12,`
7337                            `),n(13,"th",174),e(14,`
7338                                Placement
7339                                `),g(15,"p-sortIcon",175),e(16,`
7340                            `),i(),e(17,`
7341                            `),n(18,"th",165),e(19,`
7342                                Impressions
7343                                `),g(20,"p-sortIcon",166),e(21,`
7344                            `),i(),e(22,`
7345                            `),n(23,"th",167),e(24,`
7346                                Clicks
7347                                `),g(25,"p-sortIcon",168),e(26,`
7348                            `),i(),e(27,`
7349                            `),n(28,"th",169),e(29,`
7350                                CTR
7351                                `),g(30,"p-sortIcon",170),e(31,`
7352                            `),i(),e(32,`
7353                            `),n(33,"th",101),e(34,`
7354                                Users
7355                                `),g(35,"p-sortIcon",102),e(36,`
7356                            `),i(),e(37,`
7357                        `),i(),e(38,`
7358                    `))}function gT(o,d){if(o&1&&(e(0,`
7359                        `),n(1,"tr"),e(2,`
7360                            `),n(3,"td"),e(4),i(),e(5,`
7361                            `),n(6,"td"),e(7,`
7362                                `),n(8,"span",182),e(9),i(),e(10,`
7363                            `),i(),e(11,`
7364                            `),n(12,"td"),e(13),i(),e(14,`
7365                            `),n(15,"td"),e(16),v(17,"number"),i(),e(18,`
7366                            `),n(19,"td"),e(20),v(21,"number"),i(),e(22,`
7367                            `),n(23,"td"),e(24),i(),e(25,`
7368                            `),n(26,"td"),e(27),v(28,"number"),i(),e(29,`
7369                        `),i(),e(30,`
7370                    `)),o&2){let t=d.$implicit,l=p(2);s(4),c(t.contentName||t.contentId),s(5),c(l.formatContentType(t.contentType)),s(4),c(l.formatPlacement(t.placement)),s(3),c(E(17,7,t.impressions)),s(4),c(E(21,9,t.clicks)),s(4),c(l.formatPercent(t.ctr)),s(3),c(E(28,11,t.uniqueUsers))}}function fT(o,d){o&1&&(e(0,`
7371                        `),n(1,"tr")(2,"td",183),e(3,"No content items data"),i()(),e(4,`
7372                    `))}function hT(o,d){if(o&1&&(e(0,`
7373        `),n(1,"app-admin-dashboard-card",178),e(2,`
7374            `),g(3,"app-tooltip",179),e(4,`
7375            `),n(5,"p-table",63),e(6,`
7376                    `),R(7,xT,39,0,"ng-template",64),e(8,`
7377                    `),R(9,gT,31,13,"ng-template",65),e(10,`
7378                    `),R(11,fT,5,0,"ng-template",66),e(12,`
7379                `),i(),e(13,`
7380        `),i(),e(14,`
7381    `)),o&2){let t=p();s(),m("loading",t.loadingContentTopItems),s(2),m("renderAsLink",!1),s(2),m("value",t.contentTopItems)("paginator",!0)("rows",10)("showCurrentPageReport",!0)}}var mi=(function(o){return o[o.LAST_7_DAYS=7]="LAST_7_DAYS",o[o.LAST_30_DAYS=30]="LAST_30_DAYS",o[o.LAST_90_DAYS=90]="LAST_90_DAYS",o})(mi||{}),ta=(()=>{let d=class d{get selectedRangeLabel(){return this.dateRangeOptions.find(l=>l.value===this.selectedRange)?.label||""}constructor(l,r,a,b){this.reportService=l,this.siteDataService=r,this.authorizeService=a,this.dashboardLayoutService=b,this.unsubscribe$=new ge,this.error=!1,this.loadingSummary=!0,this.loadingTrend=!0,this.loadingTopPages=!0,this.loadingEngagement=!0,this.loadingPlatforms=!0,this.loadingActiveUsers=!0,this.loadingNewVsReturning=!0,this.loadingGeo=!0,this.loadingHeatmap=!0,this.loadingTopMembers=!0,this.loadingRetention=!0,this.loadingContentOverview=!0,this.loadingContentTopItems=!0,this.loadingContentTrend=!0,this.loadingContentPlacement=!0,this.lazyResetKey=0,this.requested=new Set,this.selectedRange=mi.LAST_30_DAYS,this.dateRangeOptions=[{label:"Last 7 Days",value:mi.LAST_7_DAYS},{label:"Last 30 Days",value:mi.LAST_30_DAYS},{label:"Last 90 Days",value:mi.LAST_90_DAYS}],this.trendData=[],this.topPages=[],this.platforms=[],this.geoData=[],this.heatmapData=[],this.topMembers=[],this.contentOverview=[],this.contentTopItems=[],this.contentTrend=[],this.contentPlacement=[],this.platformSummary=[],this.kpiCards=[],this.selectedDisplayMode="chart",this.displayModeOptions=[{icon:"fa-solid fa-chart-line",label:"Chart",value:"chart"},{icon:"fa-solid fa-table",label:"Table",value:"table"}],this.engagementTab="all",this.engagementTabs=[{label:"All",value:"all"}],this.topPagesTab="all",this.heatmapGrid=[],this.daysOfWeek=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],this.hoursOfDay=Array.from({length:24},(u,L)=>L),this.dashboardKey="analytics-overview",this.defaultColumnsPerRow=2,this.clubUserID=null,this.editMode=!1,this.showCopilot=!1,this.isSuperAdmin=!1,this.columnsPerRow=this.defaultColumnsPerRow,this.columnsOptions=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4}],this.defaultWidgets=[{id:"kpis",label:"Overview"},{id:"userTrend",label:"User Trend"},{id:"activeUsers",label:"Active Users"},{id:"newVsReturning",label:"New vs Returning"},{id:"topPages",label:"Top Pages / Screens"},{id:"engagement",label:"Engagement Metrics"},{id:"platforms",label:"Platform Breakdown"},{id:"retention",label:"Retention Cohorts"},{id:"heatmap",label:"Peak Usage Times"},{id:"geo",label:"Geographic Distribution"},{id:"topMembers",label:"Most Active Members"},{id:"contentKpis",label:"Content Overview"},{id:"contentByType",label:"Performance by Content Type"},{id:"contentByPlacement",label:"Performance by Placement"},{id:"contentTrend",label:"Content Impressions Trend"},{id:"topContentItems",label:"Top Content Items"}],this.widgets=[...this.defaultWidgets]}ngOnInit(){this.setDateRange(this.selectedRange),this.authorizeService.getUser().pipe(gi(1),Z(this.unsubscribe$)).subscribe({next:l=>{this.clubUserID=l?+l.userID:null,this.isSuperAdmin=l?this.authorizeService.isSuperAdmin(l.role):!1,this.applyStoredLayout()}}),this.loadData()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}applyStoredLayout(){if(!this.clubUserID)return;let l=this.dashboardLayoutService.loadLayout(this.dashboardKey,this.clubUserID,this.defaultWidgets.map(r=>r.id),this.defaultColumnsPerRow);this.columnsPerRow=l.columnsPerRow,this.widgets=l.order.map(r=>this.defaultWidgets.find(a=>a.id===r)).filter(r=>!!r)}toggleEditMode(){this.editMode=!this.editMode}toggleCopilot(){this.showCopilot=!this.showCopilot}onWidgetDrop(l){l.previousIndex!==l.currentIndex&&(Pi(this.widgets,l.previousIndex,l.currentIndex),this.persistLayout())}onColumnsChange(l){this.columnsPerRow=l,this.persistLayout()}resetLayout(){this.widgets=[...this.defaultWidgets],this.columnsPerRow=this.defaultColumnsPerRow,this.clubUserID&&this.dashboardLayoutService.clearLayout(this.dashboardKey,this.clubUserID)}getColClass(){switch(this.columnsPerRow){case 1:return"col-12";case 3:return"col-lg-4 col-md-6";case 4:return"col-lg-3 col-md-6";default:return"col-lg-6"}}persistLayout(){this.clubUserID&&this.dashboardLayoutService.saveLayout(this.dashboardKey,this.clubUserID,{order:this.widgets.map(l=>l.id),columnsPerRow:this.columnsPerRow})}onDateRangeChange(l){this.selectedRange=l,this.setDateRange(l),this.loadData()}setDateRange(l){this.endDate=new Date,this.startDate=new Date(this.endDate),this.startDate.setDate(this.startDate.getDate()-l)}loadData(){this.requested.clear(),this.error=!1,this.kpiCards=[],this.trendData=[],this.trendChartData=null,this.topPages=[],this.platforms=[],this.platformSummary=[],this.platformChartData=null,this.geoData=[],this.heatmapData=[],this.heatmapGrid=[],this.topMembers=[],this.contentOverview=[],this.contentTopItems=[],this.contentTrend=[],this.contentTrendChartData=null,this.contentPlacement=[],this.loadingSummary=!0,this.loadingTrend=!0,this.loadingTopPages=!0,this.loadingEngagement=!0,this.loadingPlatforms=!0,this.loadingActiveUsers=!0,this.loadingNewVsReturning=!0,this.loadingGeo=!0,this.loadingHeatmap=!0,this.loadingTopMembers=!0,this.loadingRetention=!0,this.loadingContentOverview=!0,this.loadingContentTopItems=!0,this.loadingContentTrend=!0,this.loadingContentPlacement=!0,this.topPagesTab="all",this.siteDataService.hide
7381SiteLoader(),this.lazyResetKey++}onWidgetVisible(l){switch(l){case"kpis":this.loadSummary();break;case"userTrend":this.loadTrend();break;case"activeUsers":this.loadActiveUsers();break;case"newVsReturning":this.loadNewVsReturning();break;case"topPages":this.loadTopPages();break;case"engagement":this.loadEngagement();break;case"platforms":this.loadPlatforms();break;case"retention":this.loadRetention();break;case"heatmap":this.loadPeakTimes();break;case"geo":this.loadGeo();break;case"topMembers":this.loadTopMembers();break;case"contentKpis":case"contentByType":this.loadContentOverview();break;case"contentByPlacement":this.loadContentByPlacement();break;case"contentTrend":this.loadContentTrend();break;case"topContentItems":this.loadContentTopItems();break}}loadSummary(){this.requested.has("summary")||(this.requested.add("summary"),this.loadingSummary=!0,this.reportService.getAnalyticsDashboardOverview(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.summary=l,this.buildKpiCards(),this.loadingSummary=!1},error:()=>{this.loadingSummary=!1,this.error=!0}}))}loadTrend(){this.requested.has("trend")||(this.requested.add("trend"),this.loadingTrend=!0,this.reportService.getAnalyticsDashboardTrend(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.trendData=l,this.buildTrendChart(),this.loadingTrend=!1},error:()=>{this.loadingTrend=!1,this.error=!0}}))}loadTopPages(){this.requested.has("topPages")||(this.requested.add("topPages"),this.loadingTopPages=!0,this.reportService.getAnalyticsDashboardTopPages(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.topPages=l,this.loadingTopPages=!1},error:()=>{this.loadingTopPages=!1,this.error=!0}}))}loadEngagement(){this.requested.has("engagement")||(this.requested.add("engagement"),this.loadingEngagement=!0,this.reportService.getAnalyticsDashboardEngagement(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.engagement=l,this.buildEngagementTabs(),this.loadingEngagement=!1},error:()=>{this.loadingEngagement=!1,this.error=!0}}))}loadPlatforms(){this.requested.has("platforms")||(this.requested.add("platforms"),this.loadingPlatforms=!0,this.reportService.getAnalyticsDashboardPlatforms(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.platforms=l,this.buildPlatformSummary(),this.buildPlatformChart(),this.loadingPlatforms=!1},error:()=>{this.loadingPlatforms=!1,this.error=!0}}))}loadActiveUsers(){this.requested.has("activeUsers")||(this.requested.add("activeUsers"),this.loadingActiveUsers=!0,this.reportService.getAnalyticsDashboardActiveUsers().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.activeUsers=l,this.loadingActiveUsers=!1},error:()=>{this.loadingActiveUsers=!1,this.error=!0}}))}loadNewVsReturning(){this.requested.has("newVsReturning")||(this.requested.add("newVsReturning"),this.loadingNewVsReturning=!0,this.reportService.getAnalyticsDashboardNewVsReturning(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.newVsReturning=l,this.loadingNewVsReturning=!1},error:()=>{this.loadingNewVsReturning=!1,this.error=!0}}))}loadGeo(){this.requested.has("geo")||(this.requested.add("geo"),this.loadingGeo=!0,this.reportService.getAnalyticsDashboardGeo(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.geoData=l,this.loadingGeo=!1},error:()=>{this.loadingGeo=!1,this.error=!0}}))}loadPeakTimes(){this.requested.has("peakTimes")||(this.requested.add("peakTimes"),this.loadingHeatmap=!0,this.reportService.getAnalyticsDashboardPeakTimes(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.heatmapData=l,this.buildHeatmapGrid(),this.loadingHeatmap=!1},error:()=>{this.loadingHeatmap=!1,this.error=!0}}))}loadTopMembers(){this.requested.has("topMembers")||(this.requested.add("topMembers"),this.loadingTopMembers=!0,this.reportService.getAnalyticsDashboardTopMembers(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.topMembers=l,this.loadingTopMembers=!1},error:()=>{this.loadingTopMembers=!1,this.error=!0}}))}loadRetention(){this.requested.has("retention")||(this.requested.add("retention"),this.loadingRetention=!0,this.reportService.getAnalyticsDashboardRetention(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.retentionData=l,this.loadingRetention=!1},error:()=>{this.loadingRetention=!1,this.error=!0}}))}loadContentOverview(){this.requested.has("contentOverview")||(this.requested.add("contentOverview"),this.loadingContentOverview=!0,this.reportService.getContentOverview(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.contentOverview=l,this.loadingContentOverview=!1},error:()=>{this.loadingContentOverview=!1,this.error=!0}}))}loadContentTopItems(){this.requested.has("contentTopItems")||(this.requested.add("contentTopItems"),this.loadingContentTopItems=!0,this.reportService.getContentTopItems(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.contentTopItems=l,this.loadingContentTopItems=!1},error:()=>{this.loadingContentTopItems=!1,this.error=!0}}))}loadContentTrend(){this.requested.has("contentTrend")||(this.requested.add("contentTrend"),this.loadingContentTrend=!0,this.reportService.getContentTrend(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.contentTrend=l,this.buildContentTrendChart(),this.loadingContentTrend=!1},error:()=>{this.loadingContentTrend=!1,this.error=!0}}))}loadContentByPlacement(){this.requested.has("contentByPlacement")||(this.requested.add("contentByPlacement"),this.loadingContentPlacement=!0,this.reportService.getContentByPlacement(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.contentPlacement=l,this.loadingContentPlacement=!1},error:()=>{this.loadingContentPlacement=!1,this.error=!0}}))}buildPlatformSummary(){let l=new Map;for(let r of this.platforms){let a=l.get(r.platform)||{users:0,sessions:0};a.users+=r.users,a.sessions+=r.sessions,l.set(r.platform,a)}this.platformSummary=Array.from(l.entries()).map(([r,a])=>({platform:r,users:a.users,sessions:a.sessions}))}buildHeatmapGrid(){this.heatmapGrid=Array.from({length:7},()=>Array(24).fill(0));for(let l of this.heatmapData)l.dayOfWeek>=0&&l.dayOfWeek<7&&l.hourOfDay>=0&&l.hourOfDay<24&&(this.heatmapGrid[l.dayOfWeek][l.hourOfDay]=l.sessions)}getHeatmapMax(){let l=0;for(let r of this.heatmapGrid)for(let a of r)a>l&&(l=a);return l||1}
7381getHeatmapColor(l){let r=this.getHeatmapMax(),a=l/r;return a===0?"#f0f0f0":a<.25?"#c6dbef":a<.5?"#6baed6":a<.75?"#2171b5":"#084594"}formatDuration(l){if(!l)return"0s";let r=Math.floor(l/60),a=Math.round(l%60);return r>0?`${r}m ${a}s`:`${a}s`}formatPercent(l){return(l*100).toFixed(1)+"%"}formatHour(l){return l===0?"12a":l<12?l+"a":l===12?"12p":l-12+"p"}getChangeClass(l){return l>0?"text-success":l<0?"text-danger":""}getChangeIcon(l){return l>0?"fa-regular fa-arrow-up":l<0?"fa-regular fa-arrow-down":"fa-regular fa-minus"}getRetentionColor(l){return l===0?"#f0f0f0":l<.25?"#c6dbef":l<.5?"#6baed6":l<.75?"#2171b5":"#084594"}getNewUserPercent(){let l=(this.newVsReturning?.newUsers||0)+(this.newVsReturning?.returningUsers||0);return l>0?Math.round(this.newVsReturning.newUsers/l*100):0}getReturningUserPercent(){let l=(this.newVsReturning?.newUsers||0)+(this.newVsReturning?.returningUsers||0);return l>0?Math.round(this.newVsReturning.returningUsers/l*100):0}buildKpiCards(){this.kpiCards=[{label:"Visitors",value:(this.summary?.totalUsers||0).toLocaleString(),tooltip:"Every browser that visited your site or app during the date range selected above, including people who never signed in. This counts browsers rather than people - someone who uses both a phone and a laptop counts twice, and clearing cookies starts them over. Expect this to be much larger than Members, because your public pages (schedules, program listings, registration) are open to everyone."},{label:"Members",value:(this.summary?.totalMembers||0).toLocaleString(),tooltip:'The number of signed-in members who used your site or app during the date range selected above, counted once each no matter how many times they came back. This is the dependable answer to "how many of our people actually used this" - it identifies real member accounts rather than browsers. It will not add up against Visitors: a member is anonymous for the first moment of each visit, before they sign in.'},{label:"New Visitors",value:(this.summary?.newUsers||0).toLocaleString(),tooltip:"How many of your visitors were brand new 
7381- it was their very first visit to your site or app during the date range selected above. A growing number here means you are reaching fresh people, not just the same audience."},{label:"Sessions",value:(this.summary?.totalSessions||0).toLocaleString(),tooltip:"The total number of visits during the date range selected above. Unlike Visitors, this counts repeat visits - one person who comes back three times counts as three sessions."},{label:"Avg Duration",value:this.formatDuration(this.summary?.avgSessionDuration),tooltip:"On average, how long each visit lasted during the date range selected above, measured as active on-screen time. Longer visits usually mean people are finding what they came for."},{label:"Pages / Session",value:(this.summary?.avgPagesPerSession||0).toFixed(1),tooltip:"On average, how many pages were viewed per visit during the date range selected above. Higher numbers mean people are exploring your site rather than leaving from the page they landed on."}]}buildTrendChart(){let l=this.trendData.map(a=>a.date),r=getComputedStyle(document.documentElement);this.trendChartData={labels:l,datasets:[{label:"Users",data:this.trendData.map(a=>a.users),borderColor:"#1D6AE5",backgroundColor:"rgba(29, 106, 229, 0.08)",fill:!0,tension:.3,pointRadius:2},{label:"Sessions",data:this.trendData.map(a=>a.sessions),borderColor:"#00D297",backgroundColor:"transparent",fill:!1,tension:.3,pointRadius:2},{label:"New Users",data:this.trendData.map(a=>a.newUsers),borderColor:r.getPropertyValue("--grey-600")||"#757575",backgroundColor:"transparent",borderDash:[4,4],fill:!1,tension:.3,pointRadius:2}]},this.trendChartOptions={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,padding:16}}},scales:{x:{grid:{display:!1}},y:{beginAtZero:!0,grid:{color:"#f0f0f0"}}}}}buildPlatformChart(){if(!this.platformSummary.length){this.platformChartData=null;return}let l=getComputedStyle(document.documentElement),r=[l.getPropertyValue("--dashboard-color-default").trim()||"#1D6AE5",l.getPropertyValue("--dashboard-color-success").trim()||"#00CE9B",l.getPropertyValue("--dashboard-color-medium").trim()||"#FFAA02",l.getPropertyValue("--dashboard-color-critical").trim()||"#EC4F2E"];this.platformChartData={labels:this.platformSummary.map(a=>a.platform),datasets:[{data:this.platformSummary.map(a=>a.users),backgroundColor:r.slice(0,this.platformSummary.length)}]},this.platformChartOptions={responsive:!0,maintainAspectRatio:!0,cutout:"60%",plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,padding:12}}}}}buildContentTrendChart(){let l=[...new Set(this.contentTrend.map(u=>u.contentType))],r=[...new Set(this.contentTrend.map(u=>u.date))].sort(),a=getComputedStyle(document.documentElement),b=[a.getPropertyValue("--dashboard-color-default").trim()||"#1D6AE5",a.getPropertyValue("--dashboard-color-success").trim()||"#00CE9B",a.getPropertyValue("--dashboard-color-medium").trim()||"#FFAA02",a.getPropertyValue("--dashboard-color-critical").trim()||"#EC4F2E"];this.contentTrendChartData={labels:r,datasets:l.map((u,L)=>({label:this.formatContentType(u),data:r.map(he=>{let ut=this.contentTrend.find(oi=>oi.date===he&&oi.contentType===u);return ut?ut.impressions:0}),borderColor:b[L%b.length],backgroundColor:"transparent",fill:!1,tension:.3,pointRadius:2}))},this.contentTrendChartOptions={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,padding:16}}},scales:{x:{grid:{display:!1}},y:{beginAtZero:!0,grid:{color:"#f0f0f0"}}}}}formatContentType(l){return l?.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())||""}formatPlacement(l){return l?.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())||""}getTotalContentImpressions(){return this.contentOverview.reduce((l,r)=>l+r.impressions,0)}getTotalContentClicks(){return this.contentOverview.reduce((l,r)=>l+r.clicks,0)}getOverallContentCTR(){let l=this.getTotalContentImpressions();return l>0?(this.getTotalContentClicks()/l*100).toFixed(1)+"%":"0%"}buildEngagementTabs(){if(this.engagementTabs=[{label:"All",value:"all"}],this.engagement?.platformBreakdown?.length)for(let l of this.engagement.platformBreakdown)this.engagementTabs.push({label:`${l.platform==="Mobile App"?"Mobile":l.platform}`,value:l.platform});this.engagementTab="all"}getEngagementPlatform(l){return this.engagement?.platformBreakdown?.find(r=>r.platform===l)}get filteredTopPages(){return[...this.topPages].filter(r=>this.topPagesTab==="all"||r.platform===this.topPagesTab).sort((r,a)=>{let b=a.views-r.views;return b!==0?b:(r.pagePath||"").localeCompare(a.pagePath||"")})}hasContentTrendData(){return this.contentTrend?.length>2}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k),w(Pe),w(Xi))},d.\u0275cmp=A({type:d,selectors:[["app-analytics-dashboard"]],standalone:!1,decls:110,vars:19,consts:[["tplKpis",""],["tplUserTrend",""],["tplActiveUsers",""],["tplNewVsReturning",""],["tplTopPages",""],["tpl
7381Engagement",""],["tplPlatforms",""],["tplRetention",""],["tplHeatmap",""],["tplGeo",""],["tplTopMembers",""],["tplContentKpis",""],["tplContentByType",""],["tplContentByPlacement",""],["tplContentTrend",""],["tplTopContentItems",""],["item",""],["role","main"],[1,"d-flex","justify-content-between","border-bottom","mb-3"],["pageTitle","Analytics Dashboard",3,"hideBorder"],["optionLabel","label","optionValue","value",1,"mb-2",3,"ngModelChange","onChange","options","ngModel","allowEmpty"],[1,"d-flex","justify-content-between","align-items-center","flex-wrap","mb-3"],[3,"isInline","iconClass"],["type","button",1,"btn","btn-sm","mb-1","mr-2",3,"click"],[1,"fa-solid","fa-wand-magic-sparkles","mr-1"],["status","color1","text","Beta","styleClass","ml-1"],["type","button",1,"btn","btn-tertiary","btn-sm","mb-1",3,"click"],["tooltipText","Drag cards to reorder and choose how many show per row. Your layout is saved to this browser only, for your account.","tooltipPosition","left",1,"ml-2","mb-1","d-inline-block",3,"renderAsLink"],["cdkDropList","","cdkDropListOrientation","mixed",1,"row",3,"cdkDropListDropped","cdkDropListDisabled"],[1,"d-flex","align-items-center","mr-3","mb-1"],[1,"text-medium","mr-2"],["optionLabel","label","optionValue","value",3,"ngModelChange","onChange","options","ngModel","allowEmpty"],["type","button",1,"btn","btn-naked","btn-sm","mr-2","mb-1",3,"click"],[1,"fa-regular","fa-rotate-left","mr-1"],["type","button","routerLink","/admin/reports/analytics/sprocket",1,"btn","btn-tertiary","btn-sm","mb-1","mr-2"],[1,"fa-regular","fa-globe","mr-1"],[3,"closePanel","startDate","endDate","rangeLabel"],["alertType","error"],[1,"btn","btn-outline-danger","btn-sm","ml-2",3,"click"],[1,"fa-solid","fa-rotate-right","mr-1"],["cdkDrag","","appInView","",3,"inView","cdkDragDisabled","inViewResetKey"],["cdkDragHandle","",1,"d-flex","align-items-center","bg-light","border","px-2","py-1","mb-1","text-smallest","text-grey"],[1,"fa-solid","fa-grip-vertical","mr-2","text-grey-lt"],[1,"text-truncate"],[4,"ngTemplateOutlet"],["panelTitle","Overview","styleClass",""],[1,"row"],[1,"col-6"],[2,"height","120px"],["height","5rem"],[1,"col-6","border-bottom"],[1,"full-height","py-2","text-center"],[1,"dashboard-big-number--title","mb-2",3,"pTooltip"],[1,"dashboard-big-number"],[1,"text-smallest","mt-2",3,"ngClass"],[3,"ngClass"],["panelTitle","User Trend","styleClass","flex-gr ow-1 full-hei ght","skeletonHeight","280px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Plots your traffic over time for the date range selected above. Each point is one day (or one week for longer ranges) and shows: Users (different people who visited), New (people on their very first-ever visit), Sessions (total visits), and Views (pages/screens looked at). Use it to spot whether traffic is trending up or down. Counts both your website and mobile app, signed-in members and anonymous visitors.",3,"renderAsLink"],[1,"d-flex","full-width","justify-content-center","border-bottom","py-2","mb-3"],["optionValue","value","size","small",3,"ngModelChange","options","ngModel","allowEmpty"],["height","280px"],["type","line","height","280px",3,"data","options"],[1,"text-center","text-muted","py-3"],[1,"zebra-rows",3,"value","paginator","rows","showCurrentPageReport"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["pSortableColumn","date"],["field","date"],["pSortableColumn","users"],["field","users"],["pSortableColumn","newUsers"],["field","newUsers"],["pSortableColumn","sessions"],["field","sessions"],["pSortableColumn","pageViews"],["field","pageViews"],["colspan","5",1,"text-center"],["panelTitle","Active Users","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","A snapshot of how many different people were active recently. Note: this card always measures up to yesterday and ignores the date buttons at the top. Daily = unique visitors yesterday, Weekly = the last 7 days, Monthly = the last 30 days. Stickiness is Daily divided by Monthly: a higher percentage means your audience comes back more often instead of visiting just once.",3,"renderAsLink"],[1,"d-flex","justify-content-between","border-bottom","py-2"],[1,"text-medium"],[1,"d-flex","justify-content-between","pt-2"],["panelTitle","New vs Returning","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","For the date range selected above, this splits your visitors into two groups: New Users (people whose first-ever visit happened in this range) and Returning Users (people who had visited before). The bars show the mix, and the small text shows the average number of visits each group made. A healthy site keeps a 
7381steady stream of new people while also bringing existing ones back.",3,"renderAsLink"],[1,"d-flex","justify-content-between","align-items-center","mb-1"],["styleClass","mb-2",3,"value","showValue"],[1,"text-smallest","text-grey-lt","mb-3"],["styleClass","mb-2","color","var(--dashboard-color-success)",3,"value","showValue"],[1,"text-smallest","text-grey-lt"],["panelTitle","Top Performing Pages","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","The most-visited pages on your website and screens in your mobile app for the date range selected above, ranked by Views. For each one you also see how many different people viewed it (Users), whether it was Web or Mobile, and the average time people spent on it. Use it to learn what content your audience cares about most.",3,"renderAsLink"],[1,"d-inline-flex","align-items-center","border-bottom","py-2","full-width","flex-grow-1","justify-content-center"],["optionLabel","label","optionValue","value",3,"ngModelChange","options","ngModel","allowEmpty","size"],["styleClass","p-datatable-sm",3,"value","paginator","rows"],["pSortableColumn","pagePath"],["field","pagePath"],["pSortableColumn","platform"],["field","platform"],["pSortableColumn","views"],["field","views"],["pSortableColumn","uniqueUsers"],["field","uniqueUsers"],["pSortableColumn","avgTimeOnPage"],["field","avgTimeOnPage"],["tooltipPosition","top",3,"pTooltip"],["target","_blank",3,"href"],[1,"pill","pill-active"],[1,"pill","pill-warning"],["panelTitle","Engagement Metrics","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Measures how involved visitors were during the date range selected above. Avg Engagement Time is the active on-screen time per visit. Engaged Session Rate is the share of visits with more than 10 seconds of active time (a quick bounce does not count). Avg Sessions/User and Avg Screens/Session show how much each person did per visit, and Total Events is every tracked action combined. Toggle the buttons to compare Web vs Mobile App.",3,"renderAsLink"],["slot","headerActions",1,"text-grey-lt"],[1,"text-grey-lt","text-smallest"],[1,"d-flex","justify-content-between","py-2"],["panelTitle","Platform Breakdown","styleClass","flex-gr ow-1 full-hei ght","skeletonHeight","220px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Shows how your audience reached you during the date range selected above, split between your Website and your Mobile App. The donut and list show the number of different people (users) and total visits (sessions) for each. Use it to see how much of your audience is on mobile vs the web.",3,"renderAsLink"],[1,"mt-3"],[1,"d-flex","justify-content-center"],["type","doughnut","width","220px","height","220px",3,"data","options"],[1,"d-flex","justify-content-between","border-bottom","py-1"],[1,"mr-3"],[1,"text-grey-lt"],["panelTitle","Retention Cohorts","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Tracks whether people keep coming back. Visitors are grouped by the week they first appeared (each row is one group, or cohort). Moving across the row, each cell shows the percentage of that group who returned in Week 1, Week 2, and so on. Higher percentages further to the right mean strong loyalty; numbers dropping off quickly mean people visit once and do not return. Based on the date range selected above.",3,"renderAsLink"],[1,"overflow-auto"],[1,"table","table-sm","table-bordered","mb-0","text-center"],[1,"text-left"],[1,"text-left","nowrap"],["panelTitle","Peak Usage Times","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","A grid showing which days and hours are busiest, counting visits by when they happened in your club's local time zone. Each cell is one day-and-hour combination; darker cells mean more visits. Use it to pick the best times to send emails, post announcements, or schedule events. Based on the date range selected above.",3,"renderAsLink"],[1,"text-smallest"],[1,"bold","text-smallest","nowrap"],["tooltipPosition","top",1,"text-smallest",3,"pTooltip"],["panelTitle","Geographic Distribution","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Where your visitors are located, broken down by region and city, with the number of different people (Users) and total visits (Sessions) from each. Locations are estimated from each visitor's internet connection, so they are approximate. Based on the date range selected above.",3,"renderAsLink"],[1,"zebra-rows",3,"value","paginator","rows"],["pSortableColumn","region"],["field","region"],["pSortableColumn","city"],["field","city"],["colspan","4",1,"text-center"],["panelTitle","Most Active Members","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Top 25 logged-in members by session count. Anonymous visitors are excluded, so these totals are not expected to match the all-traffic dashboard totals above.",3,"renderAsLink"],["pSortableColumn","userID"],["field","userID"],[1,"text-primary",3,"routerLink"],[1,"pill",3,"ngClass"],["panelTitle","Content Overview","styleClass","flex-gr ow-1 full-hei ght"],[1,"col-6","border-bottom","border-right"],[1,"full-height","py-2",2,"height","120px"],[1,"d-flex","align-items-center","mb-2"],[1,"fa-solid","fa-eye","mr-2",2,"color","var(--blue-1000)"],[1,"dashboard-big-number--title","mb-0"],["tooltipPosition","top","tooltipText","The total number of times your promotional content (banners, announcements, featured items, etc.) was shown to visitors across your site and app, added up across all content types. Based on the date range selected above. An impression is one showing - the same visitor seeing it twice counts as two.",3,"renderAsLink"],[1,"fa-solid","fa-mouse-pointer","mr-2",2,"color","var(--green-700)"],["tooltipPosition","top","tooltipText","The total number of times visitors clicked or tapped your promotional content, added up across all content types, for the date range selected above. A click means someone was interested enough to act on what they were shown.",3,"renderAsLink"],[1,"fa-solid","fa-percentage","mr-2",2,"color","var(--blue-700)"],["tooltipPosition","top","tooltipText","CTR stands for Click-Through Rate: total clicks divided by total impressions, shown as a percentage. Of all the times your promotional content was shown, this is the share that got clicked. Higher means your content is more compelling. Based on the date range selected above.",3,"renderAsLink"],[1,"fa-solid","fa-layer-group","mr-2",2,"color","var(--grey-800)"],["tooltipPosition","top","tooltipText","How many different kinds of promotional content (for example banner, announcement, featured event) were shown at least once during the date range selected above. A higher number means you are using a wider variety of content.",3,"renderAsLink"],["panelTitle","Performance by Content Type","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","This and the cards below it are about promotional content you place around your site and app (banners, announcements, featured items, etc.) - not regular pages. An impression means a piece of content was shown to someone; a click means they tapped or clicked it. This card groups that content by type and shows impressions, clicks, click-through rate (clicks divided by impressions), and how many different people saw each. Based on the date range selected above.",3,"renderAsLink"],["styleClass","p-datatable-sm",3,"value"],["pSortableColumn","contentType"],["field","contentType"],["pSortableColumn","impressions"],["field","impressions"],["pSortableColumn","clicks"],["field","clicks"],["pSortableColumn","ctr"],["field","ctr"],["panelTitle","Performance by Placement","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","The same promotional-content numbers (impressions, clicks, and click-through rate), but grouped by placement - the spot on the page where the content appeared (for example a homepage hero, a sidebar, or a banner). Use it to find which locations get the most attention. Based on the date range selected above.",3,"renderAsLink"],[1,"zebra-rows",3,"value"],["pSortableColumn","placement"],["field","placement"],["panelTitle","Content Impressions Trend","styleClass","flex-gr ow-1 full-hei ght","skeletonHeight","280px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Shows how many times your promotional content was shown (impressions) each day across the date range selected above. Use it to see whether your content is being seen more or less over time - for example after you publish something new or change where it appears.",3,"renderAsLink"],["panelTitle","Top Content Items","styleClass","flex-gr ow-1 full-hei ght",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","The individual pieces of promotional content that performed best, ranked by how often they were shown (impressions). For each item you see its type, placement, clicks, click-through rate (clicks divided by impressions), and how many different people saw it. Use it to find your single most effective banners and announcements. Based on the date range selected above.",3,"renderAsLink"],["pSortableColumn","contentName"],["field","contentName"],[1,"pill","pill-primary"],["colspan","7",1,"text-center"]],template:function(r,a){
7381if(r&1){let b=D();n(0,"main",17),e(1,`
7382    `),n(2,"div",18),e(3,`
7383        `),g(4,"app-admin-header",19),e(5,`
7384        `),n(6,"p-selectButton",20),y("ngModelChange",function(L){return f(b),S(a.selectedRange,L)||(a.selectedRange=L),h(L)}),T("onChange",function(L){return a.onDateRangeChange(L.value)}),i(),e(7,`
7385    `),i(),e(8,`
7386
7387    `),e(9,`
7388    `),n(10,"div",21),e(11,`
7389        `),n(12,"div"),e(13,`
7390            `),n(14,"app-inline-alert",22),e(15,`
7391                Today's data is still being collected and may be incomplete. Finalized numbers will be available tomorrow.
7392            `),i(),e(16,`
7393        `),i(),e(17,`
7394        `),n(18,"div"),e(19,`
7395            `),_(20,_b,14,3),_(21,xb,6,0),n(22,"button",23),T("click",function(){return a.toggleCopilot()}),e(23,`
7396                `),g(24,"i",24),e(25,`
7397                Ask AI
7398                `),g(26,"app-pill",25),e(27,`
7399            `),i(),e(28,`
7400            `),n(29,"button",26),T("click",function(){return a.toggleEditMode()}),e(30,`
7401                `),g(31,"i"),e(32),i(),e(33,`
7402            `),g(34,"app-tooltip",27),e(35,`
7403        `),i(),e(36,`
7404    `),i(),e(37,`
7405
7406    `),_(38,gb,3,3),_(39,fb,9,0),n(40,"div",28),T("cdkDropListDropped",function(L){return a.onWidgetDrop(L)}),e(41,`
7407        `),N(42,Xb,22,6,null,null,ub),i(),e(44,`
7408
7409    `),e(45,`
7410    `),R(46,nv,9,2,"ng-template",null,0,Fe),e(48,`
7411
7412    `),e(49,`
7413    `),R(50,_v,17,7,"ng-template",null,1,Fe),e(52,`
7414
7415    `),e(53,`
7416    `),R(54,xv,45,12,"ng-template",null,2,Fe),e(56,`
7417
7418    `),e(57,`
7419    `),R(58,gv,38,26,"ng-template",null,3,Fe),e(60,`
7420
7421    `),e(61,`
7422    `),R(62,bv,20,9,"ng-template",null,4,Fe),e(64,`
7423
7424    `),e(65,`
7425    `),R(66,Fv,17,9,"ng-template",null,5,Fe),e(68,`
7426
7427    `),e(69,`
7428    `),R(70,Rv,12,3,"ng-template",null,6,Fe),e(72,`
7429
7430    `),e(73,`
7431    `),R(74,Nv,8,3,"ng-template",null,7,Fe),e(76,`
7432
7433    `),e(77,`
7434    `),R(78,Wv,27,2,"ng-template",null,8,Fe),e(80,`
7435
7436    `),e(81,`
7437    `),R(82,jv,15,5,"ng-template",null,9,Fe),e(84,`
7438
7439    `),e(85,`
7440    `),R(86,$v,15,5,"ng-template",null,10,Fe),e(88,`
7441
7442    `),e(89,`
7443    `),R(90,nT,39,8,"ng-template",null,11,Fe),e(92,`
7444
7445    `),e(93,`
7446    `),R(94,lT,15,3,"ng-template",null,12,Fe),e(96,`
7447
7448    `),e(97,`
7449    `),R(98,mT,15,3,"ng-template",null,13,Fe),e(100,`
7450
7451    `),e(101,`
7452    `),R(102,_T,8,3,"ng-template",null,14,Fe),e(104,`
7453
7454    `),e(105,`
7455    `),R(106,hT,15,6,"ng-template",null,15,Fe),e(108,`
7456`),i(),e(109,`
7457`)}r&2&&(s(4),m("hideBorder",!0),s(2),m("options",a.dateRangeOptions),C("ngModel",a.selectedRange),m("allowEmpty",!1),s(8),m("isInline",!0)("iconClass","fa-solid fa-clock"),s(6),x(a.editMode?20:-1),s(),x(a.isSuperAdmin?21:-1),s(),lt("btn-primary",a.showCopilot)("btn-tertiary",!a.showCopilot),s(9),Je(a.editMode?"fa-regular fa-check mr-1":"fa-regular fa-table-cells-large mr-1"),s(),I(`
7458                `,a.editMode?"Done":"Customize Layout",`
7459            `),s(2),m("renderAsLink",!1),s(4),x(a.showCopilot?38:-1),s(),x(a.error?39:-1),s(),m("cdkDropListDisabled",!a.editMode),s(2),V(a.widgets))},dependencies:[Ge,yi,U,Y,pe,nt,z,ht,Ze,We,pt,dt,Qe,H,$,K,ze,kn,yt,Ni,Li,Oi,Qt,Zi,Zr,bn,Be],encapsulation:2});let o=d;return o}
7459)();var CT=()=>[1,2,3,4,5],ST=(o,d)=>d.id;function yT(o,d){if(o&1){let t=D();e(0,`
7460    `),n(1,"app-inline-alert",16),e(2,`
7461      Unable to load member analytics data.
7462      `),n(3,"button",17),T("click",function(){f(t);let r=p();return h(r.loadData())}),e(4,"Retry"),i(),e(5,`
7463    `),i(),e(6,`
7464  `)}}function bT(o,d){o&1&&(e(0,`
7465    `),n(1,"app-inline-alert",18),e(2,`
7466      `),g(3,"i",19),e(4,` Today's data is still being collected and may be incomplete. Finalized numbers will be available tomorrow.
7467    `),i(),e(5,`
7468  `)),o&2&&(s(),m("isInline",!0))}function vT(o,d){if(o&1&&(e(0,`
7469                `),n(1,"a",24),e(2),i(),e(3,`
7470              `)),o&2){let t=p(2);s(),m("routerLink",d),s(),Ye("",t.memberInfo.user.firstName," ",t.memberInfo.user.lastName)}}function TT(o,d){if(o&1&&e(0),o&2){let t=p(2);Ye(`
7471                `,t.memberInfo.user.firstName," ",t.memberInfo.user.lastName,`
7472              `)}}function ET(o,d){o&1&&(e(0,`
7473              `),n(1,"small",25),e(2),i(),e(3,`
7474            `)),o&2&&(s(2),c(d))}function wT(o,d){if(o&1&&(e(0,`
7475            `),n(1,"span",26),e(2),v(3,"date"),i(),e(4,`
7476          `)),o&2){let t=p(2);s(2),I(`
7477              DOB: `,B(3,1,t.memberInfo.user.dob,"mediumDate"),`
7478            `)}}function FT(o,d){if(o&1&&(e(0,`
7479    `),n(1,"div",20),e(2,`
7480      `),n(3,"div",21),e(4,`
7481        `),n(5,"div",22),e(6,`
7482          `),n(7,"div"),e(8,`
7483            `),n(9,"h5",23),e(10,`
7484              `),_(11,vT,4,3)(12,TT,1,2),i(),e(13,`
7485            `),_(14,ET,4,1),i(),e(15,`
7486          `),_(16,wT,5,4),i(),e(17,`
7487      `),i(),e(18,`
7488    `),i(),e(19,`
7489  `)),o&2){let t,l,r=p();s(11),x((t=r.getProfileLink())?11:12,t),s(3),x((l=r.getMemberRoles())?14:-1,l),s(2),x(r.memberInfo.isPlayer&&r.memberInfo.user.dob?16:-1)}}function DT(o,d){o&1&&(e(0,`
7490    `),n(1,"div",20),e(2,`
7491      `),n(3,"div",21),e(4,`
7492        `),g(5,"app-skeleton-template",27),e(6,`
7493      `),i(),e(7,`
7494    `),i(),e(8,`
7495  `))}function IT(o,d){o&1&&(e(0,`
7496        `),n(1,"div",28),e(2,`
7497          `),n(3,"div",29),e(4,`
7498            `),n(5,"div",21),e(6,`
7499              `),g(7,"app-skeleton-template",30),e(8,`
7500            `),i(),e(9,`
7501          `),i(),e(10,`
7502        `),i(),e(11,`
7503      `))}function RT(o,d){o&1&&(e(0,`
7504      `),N(1,IT,12,0,null,null,W)),o&2&&(s(),V(Le(0,CT)))}function MT(o,d){if(o&1&&(e(0,`
7505      `),n(1,"div",28),e(2,`
7506        `),n(3,"div",29),e(4,`
7507          `),n(5,"div",21),e(6,`
7508            `),g(7,"i",31),e(8,`
7509            `),n(9,"h6",32),e(10,"Total Sessions"),i(),e(11,`
7510            `),n(12,"h4",33),e(13),v(14,"number"),i(),e(15,`
7511          `),i(),e(16,`
7512        `),i(),e(17,`
7513      `),i(),e(18,`
7514      `),n(19,"div",28),e(20,`
7515        `),n(21,"div",29),e(22,`
7516          `),n(23,"div",21),e(24,`
7517            `),g(25,"i",34),e(26,`
7518            `),n(27,"h6",32),e(28,"Total Page Views"),i(),e(29,`
7519            `),n(30,"h4",33),e(31),v(32,"number"),i(),e(33,`
7520          `),i(),e(34,`
7521        `),i(),e(35,`
7522      `),i(),e(36,`
7523      `),n(37,"div",28),e(38,`
7524        `),n(39,"div",29),e(40,`
7525          `),n(41,"div",21),e(42,`
7526            `),g(43,"i",35),e(44,`
7527            `),n(45,"h6",32),e(46,"Total Engagement"),i(),e(47,`
7528            `),n(48,"h4",33),e(49),i(),e(50,`
7529          `),i(),e(51,`
7530        `),i(),e(52,`
7531      `),i(),e(53,`
7532      `),n(54,"div",36),e(55,`
7533        `),n(56,"div",29),e(57,`
7534          `),n(58,"div",21),e(59,`
7535            `),g(60,"i",37),e(61,`
7536            `),n(62,"h6",32),e(63,"First Seen"),i(),e(64,`
7537            `),n(65,"h4",33),e(66),i(),e(67,`
7538          `),i(),e(68,`
7539        `),i(),e(69,`
7540      `),i(),e(70,`
7541      `),n(71,"div",36),e(72,`
7542        `),n(73,"div",29),e(74,`
7543          `),n(75,"div",21),e(76,`
7544            `),g(77,"i",38),e(78,`
7545            `),n(79,"h6",32),e(80,"Last Seen"),i(),e(81,`
7546            `),n(82,"h4",33),e(83),i(),e(84,`
7547          `),i(),e(85,`
7548        `),i(),e(86,`
7549      `),i(),e(87,`
7550    `)),o&2){let t=p();s(13),c(E(14,5,t.detail.totalSessions)),s(18),c(E(32,7,t.detail.totalPageViews)),s(18),c(t.formatDuration(t.detail.totalEngagementTimeSec)),s(17),c(t.formatDate(t.detail.firstSeenDate)),s(17),c(t.formatDate(t.detail.lastSeenDate))}}function AT(o,d){if(o&1){let t=D();e(0,`
7551      `),n(1,"div",39),e(2,`
7552        `),n(3,"span",40),e(4,"Cards per row"),i(),e(5,`
7553        `),n(6,"p-selectButton",7),y("ngModelChange",function(r){f(t);let a=p();return S(a.columnsPerRow,r)||(a.columnsPerRow=r),h(r)}),T("onChange",function(r){f(t);let a=p();return h(a.onColumnsChange(r.value))}),e(7,`
7554        `),i(),e(8,`
7555      `),i(),e(9,`
7556      `),n(10,"button",41),T("click",function(){f(t);let r=p();return h(r.resetLayout())}),e(11,`
7557        `),g(12,"i",42),e(13,`Reset
7558      `),i(),e(14,`
7559    `)}if(o&2){let t=p();s(6),m("options",t.columnsOptions),C("ngModel",t.columnsPerRow),m("allowEmpty",!1)}}function PT(o,d){if(o&1){let t=D();e(0,`
7560    `),n(1,"app-analytics-copilot",43),T("closePanel",function(){f(t);let r=p();return h(r.showCopilot=!1)}),i(),e(2,`
7561  `)}if(o&2){let t=p();s(),m("startDate",t.startDate)("endDate",t.endDate)("rangeLabel",t.selectedRangeLabel)("clubUserID",t.clubUserID)("memberName",t.memberDisplayName)}}function OT(o,d){if(o&1&&(e(0,`
7562          `),n(1,"div",45),e(2,`
7563            `),g(3,"i",46),e(4,`
7564            `),n(5,"span",47),e(6),i(),e(7,`
7565          `),i(),e(8,`
7566        `)),o&2){let t=p().$implicit;s(6),c(t.label)}}function LT(o,d){o&1&&ke(0)}function NT(o,d){if(o&1&&(e(0," "),R(1,LT,1,0,"ng-container",48),e(2," ")),o&2){p(2);let t=ue(48);s(),m("ngTemplateOutlet",t)}}function VT(o,d){o&1&&ke(0)}function kT(o,d){if(o&1&&(e(0," "),R(1,VT,1,0,"ng-container",48),e(2," ")),o&2){p(2);let t=ue(52);s(),m("ngTemplateOutlet",t)}}function BT(o,d){o&1&&ke(0)}function WT(o,d){if(o&1&&(e(0," "),R(1,BT,1,0,"ng-container",48),e(2," ")),o&2){p(2);let t=ue(56);s(),m("ngTemplateOutlet",t)}}function UT(o,d){o&1&&ke(0)}function YT(o,d){if(o&1&&(e(0," "),R(1,UT,1,0,"ng-container",48),e(2," ")),o&2){p(2);let t=ue(60);s(),m("ngTemplateOutlet",t)}}function GT(o,d){if(o&1&&(e(0,`
7567      `),n(1,"div",44),e(2,`
7568        `),_(3,OT,9,1),_(4,NT,3,1)(5,kT,3,1)(6,WT,3,1)(7,YT,3,1),e(8,`
7569      `),i(),e(9,`
7570    `)),o&2){let t,l=d.$implicit,r=p();s(),Je(r.getColClass()+" mb-3 d-flex flex-column"),m("cdkDragDisabled",!r.editMode),s(2),x(r.editMode?3:-1),s(),x((t=l.id)==="activityTimeline"?4:t==="sessionLog"?5:t==="mostVisitedPages"?6:t==="platformUsage"?7:-1)}}function jT(o,d){o&1&&(e(0,`
7571            `),g(1,"app-skeleton-template",51),e(2,`
7572          `))}function HT(o,d){o&1&&(e(0,`
7573              `),n(1,"div",52),e(2,`
7574                No activity data for this period.
7575              `),i(),e(3,`
7576            `))}function zT(o,d){o&1&&(e(0,`
7577                  `),n(1,"tr"),e(2,`
7578                    `),n(3,"th",56),e(4,"Date "),g(5,"p-sortIcon",57),i(),e(6,`
7579                    `),n(7,"th",58),e(8,"Sessions "),g(9,"p-sortIcon",59),i(),e(10,`
7580                    `),n(11,"th",60),e(12,"Page Views "),g(13,"p-sortIcon",61),i(),e(14,`
7581                  `),i(),e(15,`
7582                `))}function qT(o,d){if(o&1&&(e(0,`
7583                  `),n(1,"tr"),e(2,`
7584                    `),n(3,"td"),e(4),i(),e(5,`
7585                    `),n(6,"td"),e(7),v(8,"number"),i(),e(9,`
7586                    `),n(10,"td"),e(11),v(12,"number"),i(),e(13,`
7587                  `),i(),e(14,`
7588                `)),o&2){let t=d.$implicit,l=p(4);s(4),c(l.formatDate(t.date)),s(3),c(E(8,3,t.sessions)),s(4),c(E(12,5,t.pageViews))}}function $T(o,d){if(o&1&&(e(0,`
7589              `),n(1,"p-table",53),e(2,`
7590                `),R(3,zT,16,0,"ng-template",54),e(4,`
7591                `),R(5,qT,15,7,"ng-template",55),e(6,`
7592              `),i(),e(7,`
7593            `)),o&2){let t=p(3);s(),m("value",t.detail.activityTimeline)("paginator",t.detail.activityTimeline.length>15)("rows",15)}}function KT(o,d){if(o&1&&(e(0,`
7594            `),_(1,HT,4,0),_(2,$T,8,3)),o&2){let t=p(2);s(),x((t.detail.activityTimeline==null?null:t.detail.activityTimeline.length)===0?1:-1),s(),x((t.detail.activityTimeline==null?null:t.detail.activityTimeline.length)>0?2:-1)}}function JT(o,d){if(o&1&&(e(0,`
7595      `),n(1,"div",49),e(2,`
7596        `),n(3,"div",50),e(4,"Activity Timeline"),i(),e(5,`
7597        `),n(6,"div",21),e(7,`
7598          `),_(8,jT,3,0),_(9,KT,3,2),i(),e(10,`
7599      `),i(),e(11,`
7600  `)),o&2){let t=p();s(8),x(t.loading?8:-1),s(),x(!t.loading&&t.detail?9:-1)}}function XT(o,d){o&1&&(e(0,`
7601            `),g(1,"app-skeleton-template",51),e(2,`
7602          `))}function ZT(o,d){o&1&&(e(0,`
7603              `),n(1,"div",52),e(2,`
7604                No session data for this period.
7605              `),i(),e(3,`
7606            `))}function QT(o,d){o&1&&(e(0,`
7607                  `),n(1,"tr"),e(2,`
7608                    `),n(3,"th",63),e(4,"Date "),g(5,"p-sortIcon",64),i(),e(6,`
7609                    `),n(7,"th",65),e(8,"Duration "),g(9,"p-sortIcon",66),i(),e(10,`
7610                    `),n(11,"th",67),e(12,"Pages "),g(13,"p-sortIcon",68),i(),e(14,`
7611                    `),n(15,"th"),e(16,"Platform"),i(),e(17,`
7612                  `),i(),e(18,`
7613                `))}function e3(o,d){if(o&1&&(e(0,`
7614                  `),n(1,"tr"),e(2,`
7615                    `),n(3,"td"),e(4),i(),e(5,`
7616                    `),n(6,"td"),e(7),i(),e(8,`
7617                    `),n(9,"td"),e(10),v(11,"number"),i(),e(12,`
7618                    `),n(13,"td"),e(14),i(),e(15,`
7619                  `),i(),e(16,`
7620                `)),o&2){let t=d.$implicit,l=p(4);s(4),c(l.formatDate(t.sessionDate)),s(3),c(l.formatDuration(t.durationSec)),s(3),c(E(11,4,t.pagesVisited)),s(4),c(t.platform)}}function t3(o,d){o&1&&(e(0,`
7621                  `),n(1,"tr")(2,"td",69),e(3,"No session data"),i()(),e(4,`
7622                `))}function i3(o,d){if(o&1&&(e(0,`
7623              `),n(1,"p-table",53),e(2,`
7624                `),R(3,QT,19,0,"ng-template",54),e(4,`
7625                `),R(5,e3,17,6,"ng-template",55),e(6,`
7626                `),R(7,t3,5,0,"ng-template",62),e(8,`
7627              `),i(),e(9,`
7628            `)),o&2){let t=p(3);s(),m("value",t.detail.sessionLog)("paginator",t.detail.sessionLog.length>10)("rows",10)}}function n3(o,d){if(o&1&&(e(0,`
7629            `),_(1,ZT,4,0),_(2,i3,10,3)),o&2){let t=p(2);s(),x((t.detail.sessionLog==null?null:t.detail.sessionLog.length)===0?1:-1),s(),x((t.detail.sessionLog==null?null:t.detail.sessionLog.length)>0?2:-1)}}function o3(o,d){if(o&1&&(e(0,`
7630      `),n(1,"div",49),e(2,`
7631        `),n(3,"div",50),e(4,"Session Log"),i(),e(5,`
7632        `),n(6,"div",21),e(7,`
7633          `),_(8,XT,3,0),_(9,n3,3,2),i(),e(10,`
7634      `),i(),e(11,`
7635  `)),o&2){let t=p();s(8),x(t.loading?8:-1),s(),x(!t.loading&&t.detail?9:-1)}}function r3(o,d){o&1&&(e(0,`
7636            `),g(1,"app-skeleton-template",51),e(2,`
7637          `))}function a3(o,d){o&1&&(e(0,`
7638              `),n(1,"div",52),e(2,`
7639                No page data for this period.
7640              `),i(),e(3,`
7641            `))}function l3(o,d){o&1&&(e(0,`
7642                  `),n(1,"tr"),e(2,`
7643                    `),n(3,"th",70),e(4,"Page "),g(5,"p-sortIcon",71),i(),e(6,`
7644                    `),n(7,"th"),e(8,"Title"),i(),e(9,`
7645                    `),n(10,"th",72),e(11,"Platform "),g(12,"p-sortIcon",73),i(),e(13,`
7646                    `),n(14,"th",74),e(15,"Views "),g(16,"p-sortIcon",75),i(),e(17,`
7647                  `),i(),e(18,`
7648                `))}function s3(o,d){if(o&1&&(e(0,`
7649                  `),n(1,"tr"),e(2,`
7650                    `),n(3,"td",76),e(4),i(),e(5,`
7651                    `),n(6,"td",77),e(7),i(),e(8,`
7652                    `),n(9,"td"),e(10,`
7653                      `),n(11,"span",78),e(12),i(),e(13,`
7654                    `),i(),e(14,`
7655                    `),n(15,"td"),e(16),v(17,"number"),i(),e(18,`
7656                  `),i(),e(19,`
7657                `)),o&2){let t=d.$implicit;s(3),m("pTooltip",t.pagePath),s(),c(t.pagePath),s(3),c(t.pageTitle),s(4),m("ngClass",t.platform==="Mobile"?"pill-active":"pill-primary"),s(),I(`
7658                        `,t.platform,`
7659                      `),s(4),c(E(17,6,t.views))}}function d3(o,d){o&1&&(e(0,`
7660                  `),n(1,"tr")(2,"td",69),e(3,"No page data"),i()(),e(4,`
7661                `))}function p3(o,d){if(o&1&&(e(0,`
7662              `),n(1,"p-table",53),e(2,`
7663                `),R(3,l3,19,0,"ng-template",54),e(4,`
7664                `),R(5,s3,20,8,"ng-template",55),e(6,`
7665                `),R(7,d3,5,0,"ng-template",62),e(8,`
7666              `),i(),e(9,`
7667            `)),o&2){let t=p(3);s(),m("value",t.detail.mostVisitedPages)("paginator",t.detail.mostVisitedPages.length>10)("rows",10)}}function m3(o,d){if(o&1&&(e(0,`
7668            `),_(1,a3,4,0),_(2,p3,10,3)),o&2){let t=p(2);s(),x((t.detail.mostVisitedPages==null?null:t.detail.mostVisitedPages.length)===0?1:-1),s(),x((t.detail.mostVisitedPages==null?null:t.detail.mostVisitedPages.length)>0?2:-1)}}function c3(o,d){if(o&1&&(e(0,`
7669      `),n(1,"div",49),e(2,`
7670        `),n(3,"div",50),e(4,"Most Visited Pages"),i(),e(5,`
7671        `),n(6,"div",21),e(7,`
7672          `),_(8,r3,3,0),_(9,m3,3,2),i(),e(10,`
7673      `),i(),e(11,`
7674  `)),o&2){let t=p();s(8),x(t.loading?8:-1),s(),x(!t.loading&&t.detail?9:-1)}}function u3(o,d){o&1&&(e(0,`
7675            `),g(1,"app-skeleton-template",79),e(2,`
7676          `))}function _3(o,d){o&1&&(e(0,`
7677              `),n(1,"div",52),e(2,`
7678                No platform data.
7679              `),i(),e(3,`
7680            `))}function x3(o,d){if(o&1&&(e(0,`
7681              `),n(1,"div",80),e(2,`
7682                `),n(3,"div",81),e(4,`
7683                  `),n(5,"strong"),e(6),i(),e(7,`
7684                  `),n(8,"span"),e(9),v(10,"number"),i(),e(11,`
7685                `),i(),e(12,`
7686                `),n(13,"div",82),e(14,`
7687                  `),g(15,"div",83),e(16,`
7688                `),i(),e(17,`
7689                `),n(18,"small",25),e(19),v(20,"number"),i(),e(21,`
7690              `),i(),e(22,`
7691            `)),o&2){let t=d.$implicit,l=p(3);s(6),c(t.platform),s(3),Ye("",E(10,6,t.sessions)," sessions (",l.getPlatformPercent(t.sessions),")"),s(6),ai("width",l.getPlatformBarWidth(t.sessions),"%"),s(4),I("",E(20,8,t.pageViews)," page views")}}function g3(o,d){if(o&1&&(e(0,`
7692            `),_(1,_3,4,0),N(2,x3,23,10,null,null,W)),o&2){let t=p(2);s(),x((t.detail.platformUsage==null?null:t.detail.platformUsage.length)===0?1:-1),s(),V(t.detail.platformUsage)}}function f3(o,d){if(o&1&&(e(0,`
7693      `),n(1,"div",49),e(2,`
7694        `),n(3,"div",50),e(4,"Platform Usage"),i(),e(5,`
7695        `),n(6,"div",21),e(7,`
7696          `),_(8,u3,3,0),_(9,g3,4,1),i(),e(10,`
7697      `),i(),e(11,`
7698  `)),o&2){let t=p();s(8),x(t.loading?8:-1),s(),x(!t.loading&&t.detail?9:-1)}}var _i=(function(o){return o[o.LAST_7_DAYS=7]="LAST_7_DAYS",o[o.LAST_30_DAYS=30]="LAST_30_DAYS",o[o.LAST_90_DAYS=90]="LAST_90_DAYS",o})(_i||{}),ia=(()=>{let d=class d{constructor(l,r,a,b,u,L){this.siteDataService=l,this.route=r,this.reportService=a,this.authorizeService=b,this.userService=u,this.dashboardLayoutService=L,this.unsubscribe$=new ge,this.loading=!0,this.error=!1,this.selectedRange=_i.LAST_30_DAYS,this.dateRangeOptions=[{label:"Last 7 Days",value:_i.LAST_7_DAYS},{label:"Last 30 Days",value:_i.LAST_30_DAYS},{label:"Last 90 Days",value:_i.LAST_90_DAYS}],this.memberInfo=null,this.canFetchMemberInfo=!1,this.canLinkToStaff=!1,this.canLinkToPlayer=!1,this.canLinkToUser=!1,this.dashboardKey="member-analytics",this.defaultColumnsPerRow=2,this.adminClubUserID=null,this.editMode=!1,this.showCopilot=!1,this.columnsPerRow=this.defaultColumnsPerRow,this.columnsOptions=[{label:"1",value:1},{label:"2",value:2},{label:"3",value:3},{label:"4",value:4}],this.defaultWidgets=[{id:"activityTimeline",label:"Activity Timeline"},{id:"sessionLog",label:"Session Log"},{id:"mostVisitedPages",label:"Most Visited Pages"},{id:"platformUsage",label:"Platform Usage"}],this.widgets=[...this.defaultWidgets]}ngOnInit(){this.route.params.pipe(Z(this.unsubscribe$),cn(l=>(this.clubUserID=+l.clubUserID,this.setDateRange(this.selectedRange),this.authorizeService.getUser().pipe(gi(1)))),Ft(l=>(l&&(this.adminClubUserID=+l.userID,this.canFetchMemberInfo=this.authorizeService.getUserPermissionValue(l,ee.UserAdmin)!==null||this.authorizeService.getUserPermissionValue(l,ee.StaffAdmin)!==null,this.canLinkToStaff=this.authorizeService.userHasPermissions(l,[ee.StaffAdmin]),this.canLinkToPlayer=this.authorizeService.userHasPermissions(l,[ee.PlayerAdmin]),this.canLinkToUser=this.authorizeService.userHasPermissions(l,[ee.UserAdmin])),this.applyStoredLayout(),this.loading=!0,this.error=!1,this.memberInfo=null,this.siteDataService.hide
7698SiteLoader(),this.buildDataRequests()))).subscribe({next:([l,r])=>{this.detail=l,this.memberInfo=r,this.loading=!1},error:()=>{this.loading=!1,this.error=!0}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}applyStoredLayout(){if(!this.adminClubUserID)return;let l=this.dashboardLayoutService.loadLayout(this.dashboardKey,this.adminClubUserID,this.defaultWidgets.map(r=>r.id),this.defaultColumnsPerRow);this.columnsPerRow=l.columnsPerRow,this.widgets=l.order.map(r=>this.defaultWidgets.find(a=>a.id===r)).filter(r=>!!r)}toggleEditMode(){this.editMode=!this.editMode}toggleCopilot(){this.showCopilot=!this.showCopilot}get selectedRangeLabel(){return this.dateRangeOptions.find(l=>l.value===this.selectedRange)?.label||""}get memberDisplayName(){return this.memberInfo?.user?`${this.memberInfo.user.firstName} ${this.memberInfo.user.lastName}`.trim():""}onWidgetDrop(l){l.previousIndex!==l.currentIndex&&(Pi(this.widgets,l.previousIndex,l.currentIndex),this.persistLayout())}onColumnsChange(l){this.columnsPerRow=l,this.persistLayout()}resetLayout(){this.widgets=[...this.defaultWidgets],this.columnsPerRow=this.defaultColumnsPerRow,this.adminClubUserID&&this.dashboardLayoutService.clearLayout(this.dashboardKey,this.adminClubUserID)}getColClass(){switch(this.columnsPerRow){case 1:return"col-12";case 3:return"col-lg-4 col-md-6";case 4:return"col-lg-3 col-md-6";default:return"col-lg-6"}}persistLayout(){this.adminClubUserID&&this.dashboardLayoutService.saveLayout(this.dashboardKey,this.adminClubUserID,{order:this.widgets.map(l=>l.id),columnsPerRow:this.columnsPerRow})}onDateRangeChange(l){this.selectedRange=l,this.setDateRange(l),this.loadData()}setDateRange(l){this.endDate=new Date,this.startDate=new Date(this.endDate),this.startDate.setDate(this.startDate.getDate()-l)}loadData(){this.loading=!0,this.error=!1,this.memberInfo=null,this.siteDataService.hideSiteLoader(),this.buildDataRequests().pipe(Z(this.unsubscribe$)).subscribe({next:([l,r])=>{this.detail=l,this.memberInfo=r,this.loading=!1},error:()=>{this.loading=!1,this.error=!0}})}buildDataRequests(){return oe([this.reportService.getAnalyticsDashboardMemberDetail(this.clubUserID,this.startDate,this.endDate),this.canFetchMemberInfo?this.userService.getUser(this.clubUserID):wt(null)])}formatDuration(l){if(!l)return"0s";let r=Math.floor(l/3600),a=Math.floor(l%3600/60),b=Math.round(l%60);return r>0?`${r}h ${a}m`:a>0?`${a}m ${b}s`:`${b}s`}getMemberRoles(){return this.memberInfo?this.memberInfo.staffProfile?this.memberInfo.staffProfile.title||"Staff":this.memberInfo.isAdmin?"Staff":this.memberInfo.user?.userTypeID===li.CHILD?"Player":this.memberInfo.user?.userTypeID===li.PARENT?"Parent":null:null}getProfileLink(){let l=this.memberInfo;if(!l)return null;if((l.isAdmin||l.staffProfile)&&this.canLinkToStaff)return["/admin/staff",l.clubUserID,"profile"];if(l.user?.userTypeID===li.CHILD&&this.canLinkToPlayer){let r=l.family?.players?.find(a=>a.clubUserID===l.clubUserID);if(r)return["/admin/players",r.playerID,"overview"]}return l.user?.userTypeID===li.PARENT&&this.canLinkToUser?["/admin/users",l.clubUserID,"profile"]:null}formatDate(l){return!l||l.length!==8?l:`${l.substring(0,4)}-${l.substring(4,6)}-${l.substring(6,8)}`}getTotalPlatformSessions(){return this.detail?.platformUsage?.reduce((l,r)=>l+r.sessions,0)||1}getPlatformPercent(l){let r=this.getTotalPlatformSessions();return(l/r*100).toFixed(1)+"%"}getPlatformBarWidth(l){let r=this.getTotalPlatformSessions();return l/r*100}};d.\u0275fac=function(r){return new(r||d)(w(k),w(It),w(M),w(Pe),w(ki),w(Xi))},d.\u0275cmp=A({type:d,selectors:[["app-member-analytics"]],standalone:!1,decls:63,vars:21,consts:[["tplActivityTimeline",""],["tplSessionLog",""],["tplMostVisitedPages",""],["tplPlatformUsage",""],["role","main"],[1,"d-flex","justify-content-between","border-bottom","mb-3"],["pageTitle","Member Analytics","parentLinkText","Analytics Dashboard","parentLinkUrl","/admin/reports/analytics",3,"hideBorder","showBackButton"],["optionLabel","label","optionValue","value",3,"ngModelChange","onChange","options","ngModel","allowEmpty"],[1,"row","mb-3"],[1,"d-flex","justify-content-end","align-items-center","flex-wrap","mb
7698-3"],["type","button",1,"btn","btn-sm","mb-1","mr-2",3,"click"],[1,"fa-solid","fa-wand-magic-sparkles","mr-1"],[1,"badge","badge-info","text-uppercase","ml-1"],["type","button",1,"btn","btn-tertiary","btn-sm","mb-1",3,"click"],["pTooltip","Drag cards to reorder and choose how many show per row. Your layout is saved to this browser only, for your account.","tooltipPosition","left",1,"fa-regular","fa-circle-info","ml-2","mb-1","text-grey-lt"],["cdkDropList","","cdkDropListOrientation","mixed",1,"row",3,"cdkDropListDropped","cdkDropListDisabled"],["alertType","error"],[1,"btn","btn-outline-danger","btn-sm","ml-2",3,"click"],[3,"isInline"],[1,"fa-solid","fa-clock","mr-1"],[1,"card","mb-3"],[1,"card-body"],[1,"d-flex","align-items-center","flex-wrap","gap-2"],[1,"mb-0"],[3,"routerLink"],[1,"text-muted"],[1,"badge","rounded-pill","bg-light","text-dark","border","ms-auto"],["skeletonType","playerHeader"],[1,"col-lg-2","col-md-4","col-sm-6","mb-2"],[1,"card","text-center","full-height"],["height","3rem"],[1,"fa-solid","fa-chart-simple","mb-2",2,"font-size","1.25rem","color","var(--blue-700)"],[1,"card-subtitle","mb-2","text-muted"],[1,"card-title","mb-0"],[1,"fa-solid","fa-eye","mb-2",2,"font-size","1.25rem","color","var(--blue-1000)"],[1,"fa-solid","fa-clock","mb-2",2,"font-size","1.25rem","color","var(--grey-800)"],[1,"col-lg-3","col-md-4","col-sm-6","mb-2"],[1,"fa-solid","fa-calendar-plus","mb-2",2,"font-size","1.25rem","color","var(--green-700)"],[1,"fa-solid","fa-calendar-check","mb-2",2,"font-size","1.25rem","color","var(--blue-700)"],[1,"d-flex","align-items-center","mr-3","mb-1"],[1,"text-medium","mr-2"],["type","button",1,"btn","btn-naked","btn-sm","mr-2","mb-1",3,"click"],[1,"fa-regular","fa-rotate-left","mr-1"],[3,"closePanel","startDate","endDate","rangeLabel","clubUserID","memberName"],["cdkDrag","",3,"cdkDragDisabled"],["cdkDragHandle","",1,"d-flex","align-items-center","bg-light","border","px-2","py-1","mb-1","text-smallest","text-grey"],[1,"fa-solid","fa-grip-vertical","mr-2","text-grey-lt"],[1,"text-truncate"],[4,"ngTemplateOutlet"],[1,"card","flex-grow-1"],[1,"card-header"],["skeletonType","table"],[1,"text-center","text-muted","py-3"],["styleClass","p-datatable-sm",3,"value","paginator","rows"],["pTemplate","header"],["pTemplate","body"],["pSortableColumn","date"],["field","date"],["pSortableColumn","sessions"],["field","sessions"],["pSortableColumn","pageViews"],["field","pageViews"],["pTemplate","emptymessage"],["pSortableColumn","sessionDate"],["field","sessionDate"],["pSortableColumn","durationSec"],["field","durationSec"],["pSortableColumn","pagesVisited"],["field","pagesVisited"],["colspan","4",1,"text-center"],["pSortableColumn","pagePath"],["field","pagePath"],["pSortableColumn","platform"],["field","platform"],["pSortableColumn","views"],["field","views"],[1,"text-truncate",2,"max-width","250px",3,"pTooltip"],[1,"text-truncate",2,"max-width","200px"],[1,"pill","pill-sm",3,"ngClass"],["skeletonType","text"],[1,"mb-3"],[1,"d-flex","justify-content-between","mb-1"],[1,"progress",2,"height","8px"],[1,"progress-bar"]],template:function(r,a){if(r&1){let b=D();n(0,"main",4),e(1,`
7699  `),n(2,"div",5),e(3,`
7700    `),n(4,"app-admin-header",6),e(5,`
7701    `),i(),e(6,`
7702    `),n(7,"p-selectButton",7),y("ngModelChange",function(L){return f(b),S(a.selectedRange,L)||(a.selectedRange=L),h(L)}),T("onChange",function(L){return a.onDateRangeChange(L.value)}),e(8,`
7703    `),i(),e(9,`
7704  `),i(),e(10,`
7705
7706  `),_(11,yT,7,0),_(12,bT,6,1),_(13,FT,20,3),_(14,DT,9,0),n(15,"div",8),e(16,`
7707    `),_(17,RT,3,1),_(18,MT,88,9),i(),e(19,`
7708
7709  `),e(20,`
7710  `),n(21,"div",9),e(22,`
7711    `),_(23,AT,15,3),n(24,"button",10),T("click",function(){return a.toggleCopilot()}),e(25,`
7712      `),g(26,"i",11),e(27,`Ask AI
7713      `),n(28,"span",12),e(29,"Beta"),i(),e(30,`
7714    `),i(),e(31,`
7715    `),n(32,"button",13),T("click",function(){return a.toggleEditMode()}),e(33,`
7716      `),g(34,"i"),e(35),i(),e(36,`
7717    `),g(37,"i",14),e(38,`
7718  `),i(),e(39,`
7719
7720  `),_(40,PT,3,5),n(41,"div",15),T("cdkDropListDropped",function(L){return a.onWidgetDrop(L)}),e(42,`
7721    `),N(43,GT,10,5,null,null,ST),i(),e(45,`
7722
7723  `),e(46,`
7724  `),R(47,JT,12,2,"ng-template",null,0,Fe),e(49,`
7725
7726  `),e(50,`
7727  `),R(51,o3,12,2,"ng-template",null,1,Fe),e(53,`
7728
7729  `),e(54,`
7730  `),R(55,c3,12,2,"ng-template",null,2,Fe),e(57,`
7731
7732  `),e(58,`
7733  `),R(59,f3,12,2,"ng-template",null,3,Fe),e(61,`
7734`),i(),e(62,`
7735`)}r&2&&(s(4),m("hideBorder",!0)("showBackButton",!0),s(3),m("options",a.dateRangeOptions),C("ngModel",a.selectedRange),m("allowEmpty",!1),s(4),x(a.error&&!a.loading?11:-1),s(),x(!a.loading&&!a.error?12:-1),s(),x(a.memberInfo?13:-1),s(),x(a.loading&&!a.memberInfo?14:-1),s(3),x(a.loading?17:-1),s(),x(!a.loading&&a.detail?18:-1),s(5),x(a.editMode?23:-1),s(),lt("btn-primary",a.showCopilot)("btn-tertiary",!a.showCopilot),s(10),Je(a.editMode?"fa-regular fa-check mr-1":"fa-regular fa-table-cells-large mr-1"),s(),I(`
7736      `,a.editMode?"Done":"Customize Layout",`
7737    `),s(5),x(a.showCopilot?40:-1),s(),m("cdkDropListDisabled",!a.editMode),s(2),V(a.widgets))},dependencies:[Ge,yi,U,Y,pe,z,Ze,We,Qe,H,$,K,ze,yt,Ni,Li,Oi,Zi,Be,de],styles:[".card-header[_ngcontent-%COMP%] + .card-body[_ngcontent-%COMP%]{padding-top:.5rem}.card-header[_ngcontent-%COMP%] + .card-body[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(app-skeleton-template):first-child{padding-top:.25rem}"]});let o=d;return o}
7737)();var ni=(()=>{let d=class d{constructor(){this.format="1.0-0",this.webTooltip="Web",this.mobileTooltip="Mobile app (including its in-app web views)"}};d.\u0275fac=function(r){return new(r||d)},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-app-type-split"]],inputs:{webValue:"webValue",mobileValue:"mobileValue",format:"format",webTooltip:"webTooltip",mobileTooltip:"mobileTooltip"},standalone:!1,decls:22,vars:10,consts:[[1,"text-smallest","text-muted","mt-1"],[1,"hover-dotted",3,"pTooltip"],["aria-hidden","true",1,"fa-regular","fa-globe","mr-1"],[1,"sr-only"],["aria-hidden","true",1,"mx-1"],["aria-hidden","true",1,"fa-regular","fa-mobile-screen","mr-1"]],template:function(r,a){r&1&&(n(0,"div",0),e(1,`
7738    `),n(2,"span",1),e(3,`
7739        `),g(4,"i",2),n(5,"span",3),e(6,"Web: "),i(),e(7),v(8,"number"),i(),e(9,`
7740    `),n(10,"span",4),e(11,"\xB7"),i(),e(12,`
7741    `),n(13,"span",1),e(14,`
7742        `),g(15,"i",5),n(16,"span",3),e(17,"Mobile app: "),i(),e(18),v(19,"number"),i(),e(20,`
7743`),i(),e(21,`
7744`)),r&2&&(s(2),m("pTooltip",a.webTooltip),s(5),I("",B(8,4,a.webValue,a.format),`
7745    `),s(6),m("pTooltip",a.mobileTooltip),s(5),I("",B(19,7,a.mobileValue,a.format),`
7746    `))},dependencies:[ze,Be],encapsulation:2});let o=d;return o}
7746)();function h3(o,d){o&1&&(e(0,`
7747        `),g(1,"app-skeleton-template",6),e(2,`
7748    `))}function C3(o,d){if(o&1){let t=D();e(0,`
7749            `),n(1,"app-inline-alert",7),e(2,`
7750                Unable to load member sessions.
7751                `),n(3,"button",8),T("click",function(){f(t);let r=p(2);return h(r.load())}),e(4,`
7752                    `),g(5,"i",9),e(6,`Retry
7753                `),i(),e(7,`
7754            `),i(),e(8,`
7755        `)}o&2&&(s(),m("isInline",!0))}function S3(o,d){o&1&&(e(0,`
7756            `),n(1,"app-inline-alert",10),e(2,`
7757                The analytics daily rollup is not enabled in this environment, so platform-wide member
7758                sessions are unavailable. Enable BigQuery:UseDailyRollup to activate this panel.
7759            `),i(),e(3,`
7760        `)),o&2&&(s(),m("isInline",!0))}function y3(o,d){if(o&1&&(e(0,`
7761                `),g(1,"p-chart",20),e(2,`
7762            `)),o&2){let t=p(3);s(),m("type",t.chartType)("data",t.chartData)("options",t.chartOptions)}}function b3(o,d){o&1&&(e(0,`
7763                `),n(1,"div",21),e(2,"No member sessions in this window."),i(),e(3,`
7764            `))}function v3(o,d){if(o&1&&(e(0,`
7765            `),n(1,"div",11),e(2,`
7766                `),n(3,"div",12),e(4,`
7767                    `),n(5,"div",13),e(6,`
7768                        `),n(7,"span",14),e(8,"Member Sessions"),i(),e(9,`
7769                        `),n(10,"div",15),e(11),v(12,"number"),i(),e(13,`
7770                        `),g(14,"app-sprocket-app-type-split",16),e(15,`
7771                    `),i(),e(16,`
7772                `),i(),e(17,`
7773                `),n(18,"div",17),e(19,`
7774                    `),n(20,"div",13),e(21,`
7775                        `),n(22,"span",18),e(23),i(),e(24,`
7776                        `),n(25,"div",15),e(26),v(27,"number"),i(),e(28,`
7777                        `),g(29,"app-sprocket-app-type-split",19),e(30,`
7778                    `),i(),e(31,`
7779                `),i(),e(32,`
7780            `),i(),e(33,`
7781            `),_(34,y3,3,3)(35,b3,4,0)),o&2){let t=p(2);s(11),c(E(12,9,t.result==null?null:t.result.totalMemberSessions)),s(3),m("webValue",t.result==null?null:t.result.webMemberSessions)("mobileValue",t.result==null?null:t.result.mobileMemberSessions),s(8),m("pTooltip",t.membersTooltip),s(),c(t.membersLabel),s(3),c(E(27,11,t.result==null?null:t.result.totalMembers)),s(3),m("webValue",t.result==null?null:t.result.webMembers)("mobileValue",t.result==null?null:t.result.mobileMembers),s(5),x(t.chartData?34:35)}}function T3(o,d){if(o&1&&(e(0,`
7782        `),_(1,C3,9,1)(2,S3,4,1)(3,v3,36,13)),o&2){let t=p();s(),x(t.error?1:t.result&&!t.result.rollupAvailable?2:3)}}var na=(()=>{let d=class d{constructor(l){this.reportService=l,this.clubOptions=[],this.unsubscribe$=new ge,this.loading=!0,this.error=!1,this.selectedClubID=null,this.clubFilterOptions=[{label:"All Clubs",value:null}],this.loadSequence=0,this.viewMode="totals",this.viewModeOptions=[{label:"Totals",value:"totals"},{label:"By App Type",value:"byApp"}],this.chartType="line"}ngOnChanges(l){l.clubOptions&&(this.clubFilterOptions=[{label:"All Clubs",value:null},...this.clubOptions||[]]),(l.startDate||l.endDate)&&this.startDate&&this.endDate&&this.load()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onClubFilterChange(){this.load()}onViewModeChange(){this.buildChart()}load(){let l=++this.loadSequence;this.loading=!0,this.error=!1,this.reportService.getSprocketMemberSessions(this.startDate,this.endDate,this.selectedClubID??void 0).pipe(Z(this.unsubscribe$)).subscribe({next:r=>{l===this.loadSequence&&(this.result=r,this.buildChart(),this.loading=!1)},error:()=>{l===this.loadSequence&&(this.loading=!1,this.error=!0)}})}get membersLabel(){return this.selectedClubID===null?"Active Members (memberships)":"Active Members"}get membersTooltip(){return this.selectedClubID===null?"Distinct signed-in members across all clubs. A member is a ClubUserID (one per person per club), so one person active in three clubs counts three times here. Anonymous visitors are never counted.":"Distinct signed-in members of this club in the window. Anonymous visitors are never counted."}buildChart(){if(!this.result?.trend?.length){this.chartData=null;return}let l=getComputedStyle(document.documentElement),r=l.getPropertyValue("--dashboard-color-default").trim()||"#1D6AE5",a=l.getPropertyValue("--dashboard-color-success").trim()||"#00CE9B",b=l.getPropertyValue("--dashboard-color-medium").trim()||"#FFAA02";this.viewMode==="byApp"?this.chartData={labels:this.result.trend.map(u=>u.date),datasets:[{label:"Web",data:this.result.trend.map(u=>u.webMemberSessions),backgroundColor:r,borderRadius:3},{label:"Mobile App",data:this.result.trend.map(u=>u.mobileMemberSessions),backgroundColor:b,borderRadius:3}]}:this.chartData={labels:this.result.trend.map(u=>u.date),datasets:[{label:"Member Sessions",data:this.result.trend.map(u=>u.memberSessions),borderColor:r,backgroundColor:"rgba(21, 101, 192, 0.08)",fill:!0,tension:.3,pointRadius:2},{label:"Active Members",data:this.result.trend.map(u=>u.members),borderColor:a,backgroundColor:"transparent",fill:!1,tension:.3,pointRadius:2}]},this.chartType=this.viewMode==="byApp"?"bar":"line",this.chartOptions={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,padding:16}}},scales:{x:{grid:{display:!1},stacked:this.viewMode==="byApp"},y:{beginAtZero:!0,grid:{color:"#f0f0f0"},stacked:this.viewMode==="byApp"}}}}};
7782d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-member-sessions-panel"]],inputs:{startDate:"startDate",endDate:"endDate",clubOptions:"clubOptions"},standalone:!1,features:[Ve],decls:18,vars:10,consts:[["panelTitle","Member Sessions","skeletonHeight","380px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Sessions where someone was signed in at some point \u2014 anonymous visits to public pages are excluded entirely, so this reflects real member activity, not devices or drive-by traffic. Member Sessions counts distinct visits; Active Members counts distinct signed-in members active in the window.",3,"renderAsLink"],["slot","filters",1,"d-flex","align-items-center","flex-wrap","pb-2"],["for","memberSessionsClubFilter",1,"sr-only"],["inputId","memberSessionsClubFilter","filterBy","label","appendTo","body",3,"ngModelChange","onChange","options","ngModel","filter"],["optionLabel","label","optionValue","value",1,"ml-3",3,"ngModelChange","onChange","options","ngModel","allowEmpty"],["height","280px"],["alertType","error",3,"isInline"],["type","button",1,"btn","btn-red","btn-sm","ml-2",3,"click"],[1,"fa-regular","fa-rotate-right","mr-1"],["alertType","warning",3,"isInline"],[1,"row","border-bottom","mb-3"],[1,"col-6","border-right"],[1,"full-height","py-2","text-center"],["pTooltip","Distinct sessions in the window that included signed-in activity. Anonymous sessions are excluded.",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"dashboard-big-number"],["webTooltip","Member sessions on the web","mobileTooltip","Member sessions in the mobile app (including its in-app web views)",3,"webValue","mobileValue"],[1,"col-6"],[1,"dashboard-big-number--title","mb-2","hover-dotted",3,"pTooltip"],["webTooltip","Members active on the web \u2014 a member using both platforms counts in each split","mobileTooltip","Members active in the mobile app \u2014 a member using both platforms counts in each split",3,"webValue","mobileValue"],["height","280px",3,"type","data","options"],[1,"text-center","text-muted","py-3"]],template:function(r,a){r&1&&(n(0,"app-admin-dashboard-card",0),e(1,`
7783    `),g(2,"app-tooltip",1),e(3,`
7784
7785    `),n(4,"div",2),e(5,`
7786        `),e(6,`
7787         `),n(7,"label",3),e(8,"Club"),i(),e(9,`
7788        `),n(10,"p-select",4),y("ngModelChange",function(u){return S(a.selectedClubID,u)||(a.selectedClubID=u),u}),T("onChange",function(){return a.onClubFilterChange()}),i(),e(11,`
7789        `),n(12,"p-selectButton",5),y("ngModelChange",function(u){return S(a.viewMode,u)||(a.viewMode=u),u}),T("onChange",function(){return a.onViewModeChange()}),i(),e(13,`
7790    `),i(),e(14,`
7791
7792    `),_(15,h3,3,0),_(16,T3,4,1),i(),e(17,`
7793`)),r&2&&(m("loading",a.loading&&!a.result),s(2),m("renderAsLink",!1),s(8),m("options",a.clubFilterOptions),C("ngModel",a.selectedClubID),m("filter",!0),s(2),m("options",a.viewModeOptions),C("ngModel",a.viewMode),m("allowEmpty",!1),s(3),x(a.loading?15:-1),s(),x(a.loading?-1:16))},dependencies:[U,Y,nt,Ze,We,pt,dt,q,ze,yt,Qt,ni,Be],encapsulation:2});let o=d;return o}
7793)();var w3=(o,d)=>d.label;function F3(o,d){o&1&&(e(0,`
7794        `),g(1,"app-skeleton-template",5),e(2,`
7795    `))}function D3(o,d){if(o&1){let t=D();e(0,`
7796            `),n(1,"app-inline-alert",6),e(2,`
7797                Unable to load platform KPIs.
7798                `),n(3,"button",7),T("click",function(){f(t);let r=p(2);return h(r.load())}),e(4,`
7799                    `),g(5,"i",8),e(6,`Retry
7800                `),i(),e(7,`
7801            `),i(),e(8,`
7802        `)}o&2&&(s(),m("isInline",!0))}function I3(o,d){o&1&&(e(0,`
7803            `),n(1,"app-inline-alert",9),e(2,`
7804                The analytics daily rollup is not enabled in this environment, so platform KPIs are
7805                unavailable. Enable BigQuery:UseDailyRollup to activate this panel.
7806            `),i(),e(3,`
7807        `)),o&2&&(s(),m("isInline",!0))}function R3(o,d){if(o&1&&(e(0,`
7808                                `),g(1,"app-sprocket-app-type-split",15),e(2,`
7809                            `)),o&2){let t=p().$implicit;s(),m("webValue",t.web)("mobileValue",t.mobile)}}function M3(o,d){if(o&1&&(e(0,`
7810                                `),n(1,"div",16),e(2,`
7811                                    `),g(3,"i",17),e(4),i(),e(5,`
7812                            `)),o&2){let t=p().$implicit,l=p(3);s(),m("ngClass",l.getChangeClass(t.change)),s(2),m("ngClass",l.getChangeIcon(t.change)),s(),I(`
7813                                    `,l.formatChange(t.change),` vs prior period
7814                                `)}}function A3(o,d){if(o&1&&(e(0,`
7815                    `),n(1,"div",11),e(2,`
7816                        `),n(3,"div",12),e(4,`
7817                            `),n(5,"span",13),e(6),i(),e(7,`
7818                            `),n(8,"div",14),e(9),i(),e(10,`
7819                            `),_(11,R3,3,2),_(12,M3,6,3),i(),e(13,`
7820                    `),i(),e(14,`
7821                `)),o&2){let t=d.$implicit,l=d.$index,r=p(3);s(),lt("border-right",l<r.kpis.length-1),s(4),m("pTooltip",t.tooltip),s(),c(t.label),s(3),c(t.value),s(2),x(t.web!==void 0?11:-1),s(),x(t.change!==void 0&&t.change!==null?12:-1)}}function P3(o,d){if(o&1&&(e(0,`
7822            `),n(1,"div",10),e(2,`
7823                `),N(3,A3,15,7,null,null,w3),i(),e(5,`
7824        `)),o&2){let t=p(2);s(3),V(t.kpis)}}function O3(o,d){if(o&1&&(e(0,`
7825        `),_(1,D3,9,1)(2,I3,4,1)(3,P3,6,0)),o&2){let t=p();s(),x(t.error?1:t.pulse&&!t.pulse.rollupAvailable?2:3)}}var oa=(()=>{let d=class d{constructor(l){this.reportService=l,this.clubOptions=[],this.unsubscribe$=new ge,this.loading=!0,this.error=!1,this.selectedClubID=null,this.clubFilterOptions=[{label:"All Clubs",value:null}],this.loadSequence=0,this.kpis=[]}ngOnChanges(l){l.clubOptions&&(this.clubFilterOptions=[{label:"All Clubs",value:null},...this.clubOptions||[]]),(l.startDate||l.endDate)&&this.startDate&&this.endDate&&this.load()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onClubFilterChange(){this.load()}load(){let l=++this.loadSequence;this.loading=!0,this.error=!1,this.reportService.getSprocketPlatformPulse(this.startDate,this.endDate,this.selectedClubID??void 0).pipe(Z(this.unsubscribe$)).subscribe({next:r=>{l===this.loadSequence&&(this.pulse=r,this.buildKpis(),this.loading=!1)},error:()=>{l===this.loadSequence&&(this.loading=!1,this.error=!0)}})}formatChange(l){return(l>0?"+":"")+l.toFixed(1)+"%"}getChangeClass(l){return l>0?"text-success":l<0?"text-danger":""}getChangeIcon(l){return l>0?"fa-regular fa-arrow-up":l<0?"fa-regular fa-arrow-down":"fa-regular fa-minus"}buildKpis(){if(!this.pulse){this.kpis=[];return}let l=this.selectedClubID===null,r=new Intl.NumberFormat("en-US");this.kpis=[{label:l?"Active Members (memberships)":"Active Members",value:r.format(this.pulse.members),change:this.pulse.membersChangePercent,tooltip:l?"Distinct signed-in members across all clubs. A member is one (person, club) pairing, so a person active in several clubs counts once per club. Anonymous visitors are never counted.":"Distinct signed-in members of this club active in the window.",web:this.pulse.webMembers,mobile:this.pulse.mobileMembers},{label:"Member Sessions",value:r.format(this.pulse.memberSessions),change:this.pulse.memberSessionsChangePercent,tooltip:"Sessions that included 
7825signed-in activity \u2014 real member visits, excluding anonymous public-page traffic.",web:this.pulse.webMemberSessions,mobile:this.pulse.mobileMemberSessions},{label:"Total Sessions",value:r.format(this.pulse.totalSessions),change:this.pulse.totalSessionsChangePercent,tooltip:"All visits, including anonymous visitors browsing public club pages \u2014 the platform's full reach.",web:this.pulse.webTotalSessions,mobile:this.pulse.mobileTotalSessions},{label:"Page Views",value:r.format(this.pulse.pageViews),change:this.pulse.pageViewsChangePercent,tooltip:"Pages and app screens viewed across the platform in the window.",web:this.pulse.webPageViews,mobile:this.pulse.mobilePageViews},{label:"Engagement Hours",value:r.format(Math.round(this.pulse.engagementHours)),change:this.pulse.engagementHoursChangePercent,tooltip:"Total engaged (active, in-foreground) time users spent on the platform, in hours.",web:this.pulse.webEngagementHours,mobile:this.pulse.mobileEngagementHours}],l&&this.kpis.push({label:"Active Clubs",value:r.format(this.pulse.activeClubs),tooltip:"Tenant clubs with any tracked activity in the window."})}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-platform-pulse-panel"]],inputs:{startDate:"startDate",endDate:"endDate",clubOptions:"clubOptions"},standalone:!1,features:[Ve],decls:16,vars:7,consts:[["panelTitle","Platform Pulse","skeletonHeight","220px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","The platform's headline numbers for the selected window, each compared against the immediately preceding window of the same length. Member metrics count signed-in activity only; Total Sessions additionally includes anonymous visits to public club pages.",3,"renderAsLink"],["slot","filters",1,"d-flex","align-items-center","flex-wrap","pb-2"],["for","platformPulseClubFilter",1,"sr-only"],["inputId","platformPulseClubFilter","filterBy","label","appendTo","body",3,"ngModelChange","onChange","options","ngModel","filter"],["height","180px"],["alertType","error",3,"isInline"],["type","button",1,"btn","btn-red","btn-sm","ml-2",3,"click"],[1,"fa-regular","fa-rotate-right","mr-1"],["alertType","warning",3,"isInline"],[1,"row"],[1,"col-lg-2","col-md-4","col-6","border-bottom"],[1,"full-height","py-2","text-center"],[1,"dashboard-big-number--title","mb-2","hover-dotted",3,"pTooltip"],[1,"dashboard-big-number"],[3,"webValue","mobileValue"],[1,"text-smallest","mt-2",3,"ngClass"],[3,"ngClass"]],template:function(r,a){r&1&&(n(0,"app-admin-dashboard-card",0),e(1,`
7826    `),g(2,"app-tooltip",1),e(3,`
7827
7828    `),n(4,"div",2),e(5,`
7829        `),e(6,`
7830        `),n(7,"label",3),e(8,"Club"),i(),e(9,`
7831        `),n(10,"p-select",4),y("ngModelChange",function(u){return S(a.selectedClubID,u)||(a.selectedClubID=u),u}),T("onChange",function(){return a.onClubFilterChange()}),i(),e(11,`
7832    `),i(),e(12,`
7833
7834    `),_(13,F3,3,0),_(14,O3,4,1),i(),e(15,`
7835`)),r&2&&(m("loading",a.loading&&!a.pulse),s(2),m("renderAsLink",!1),s(8),m("options",a.clubFilterOptions),C("ngModel",a.selectedClubID),m("filter",!0),s(3),x(a.loading?13:-1),s(),x(a.loading?-1:14))},dependencies:[Ge,U,Y,nt,Ze,We,pt,dt,q,ze,ni],encapsulation:2});let o=d;return o}
7835)();function N3(o,d){o&1&&(e(0,`
7836        `),g(1,"app-skeleton-template",6),e(2,`
7837    `))}function V3(o,d){if(o&1){let t=D();e(0,`
7838            `),n(1,"app-inline-alert",7),e(2,`
7839                Unable to load commerce data.
7840                `),n(3,"button",8),T("click",function(){f(t);let r=p(2);return h(r.load())}),e(4,`
7841                    `),g(5,"i",9),e(6,`Retry
7842                `),i(),e(7,`
7843            `),i(),e(8,`
7844        `)}o&2&&(s(),m("isInline",!0))}function k3(o,d){o&1&&(e(0,`
7845            `),n(1,"app-inline-alert",10),e(2,`
7846                The analytics daily rollup is not enabled in this environment, so commerce metrics are
7847                unavailable. Enable BigQuery:UseDailyRollup to activate this panel.
7848            `),i(),e(3,`
7849        `)),o&2&&(s(),m("isInline",!0))}function B3(o,d){if(o&1&&(e(0,`
7850                            `),n(1,"div",20),e(2,`
7851                                `),g(3,"i",21),e(4),i(),e(5,`
7852                        `)),o&2){let t=p(3);s(),m("ngClass",t.getChangeClass(t.funnel.purchasesChangePercent)),s(2),m("ngClass",t.getChangeIcon(t.funnel.purchasesChangePercent)),s(),I(`
7853                                `,t.formatChange(t.funnel.purchasesChangePercent),` vs prior period
7854                            `)}}function W3(o,d){if(o&1&&(e(0,`
7855                `),n(1,"h3",22),e(2,"Checkout Funnel "),n(3,"span",23),e(4),v(5,"number"),i()(),e(6,`
7856                `),g(7,"p-chart",24),e(8,`
7857            `)),o&2){let t=p(3);s(4),I("(",B(5,3,t.checkoutCompletionRate,"1.0-0"),"% of started checkouts complete)"),s(3),m("data",t.funnelChartData)("options",t.funnelChartOptions)}}function U3(o,d){if(o&1&&(e(0,`
7858                `),n(1,"h3",25),e(2,"Purchases per Day"),i(),e(3,`
7859                `),g(4,"p-chart",26),e(5,`
7860            `)),o&2){let t=p(3);s(4),m("data",t.trendChartData)("options",t.trendChartOptions)}}function Y3(o,d){o&1&&(e(0,`
7861                `),n(1,"div",27),e(2,"No commerce activity in this window."),i(),e(3,`
7862            `))}function G3(o,d){if(o&1&&(e(0,`
7863            `),n(1,"div",11),e(2,`
7864                `),n(3,"div",12),e(4,`
7865                    `),n(5,"div",13),e(6,`
7866                        `),n(7,"span",14),e(8,"Purchases"),i(),e(9,`
7867                        `),n(10,"div",15),e(11),v(12,"number"),i(),e(13,`
7868                        `),g(14,"app-sprocket-app-type-split",16),e(15,`
7869                        `),_(16,B3,6,3),i(),e(17,`
7870                `),i(),e(18,`
7871                `),n(19,"div",12),e(20,`
7872                    `),n(21,"div",13),e(22,`
7873                        `),n(23,"span",17),e(24,"Conversion"),i(),e(25,`
7874                        `),n(26,"div",15),e(27),v(28,"number"),i(),e(29,`
7875                    `),i(),e(30,`
7876                `),i(),e(31,`
7877                `),n(32,"div",18),e(33,`
7878                    `),n(34,"div",13),e(35,`
7879                        `),n(36,"span",19),e(37,"Member Conversion"),i(),e(38,`
7880                        `),n(39,"div",15),e(40),v(41,"number"),i(),e(42,`
7881                    `),i(),e(43,`
7882                `),i(),e(44,`
7883            `),i(),e(45,`
7884
7885            `),_(46,W3,9,6),_(47,U3,6,2),_(48,Y3,4,0)),o&2){let t=p(2);s(11),c(E(12,9,t.funnel==null?null:t.funnel.purchases)),s(3),m("webValue",t.funnel==null?null:t.funnel.webPurchases)("mobileValue",t.funnel==null?null:t.funnel.mobilePurchases),s(2),x((t.funnel==null?null:t.funnel.purchasesChangePercent)!==void 0&&(t.funnel==null?null:t.funnel.purchasesChangePercent)!==null?16:-1),s(11),I("",B(28,11,t.conversionRate,"1.1-2"),"%"),s(13),I("",B(41,14,t.memberConversionRate,"1.1-2"),"%"),s(6),x(t.funnelChartData?46:-1),s(),x(t.trendChartData?47:-1),s(),x(!t.funnelChartData&&!t.trendChartData?48:-1)}}function j3(o,d){if(o&1&&(e(0,`
7886        `),_(1,V3,9,1)(2,k3,4,1)(3,G3,49,17)),o&2){let t=p();s(),x(t.error?1:t.funnel&&!t.funnel.rollupAvailable?2:3)}}var ra=(()=>{let d=class d{constructor(l){this.reportService=l,this.clubOptions=[],this.unsubscribe$=new ge,this.loading=!0,this.error=!1,this.selectedClubID=null,this.clubFilterOptions=[{label:"All Clubs",value:null}],this.loadSequence=0,this.viewMode="totals",this.viewModeOptions=[{label:"Totals",value:"totals"},{label:"By App Type",value:"byApp"}]}ngOnChanges(l){l.clubOptions&&(this.clubFilterOptions=[{label:"All Clubs",value:null},...this.clubOptions||[]]),(l.startDate||l.endDate)&&this.startDate&&this.endDate&&this.load()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onClubFilterChange(){this.load()}onViewModeChange(){this.buildCharts()}load(){let l=++this.loadSequence;this.loading=!0,this.error=!1,this.reportService.getSprocketCommerceFunnel(this.startDate,this.endDate,this.selectedClubID??void 0).pipe(Z(this.unsubscribe$)).subscribe({next:r=>{l===this.loadSequence&&(this.funnel=r,this.buildCharts(),this.loading=!1)},error:()=>{l===this.loadSequence&&(this.loading=!1,this.error=!0)}})}get conversionRate(){return this.funnel?.totalSessions?this.funnel.purchaseSessions*100/this.funnel.totalSessions:0}get memberConversionRate(){return this.funnel?.memberSessions?this.funnel.purchaseSessions*100/this.funnel.memberSessions:0}get checkoutCompletionRate(){return this.funnel?.checkoutSessions?this.funnel.purchaseSessions*100/this.funnel.checkoutSessions:0}formatChange(l){return(l>0?"+":"")+l.toFixed(1)+"%"}getChangeClass(l){return l>0?"text-success":l<0?"text-danger":""}getChangeIcon(l){return l>0?"fa-regular fa-arrow-up":l<0?"fa-regular fa-arrow-down":"fa-regular fa-minus"}buildCharts(){if(!this.funnel){this.funnelChartData=null,this.trendChartData=null;return}let l=getComputedStyle(document.documentElement),r=l.getPropertyValue("--dashboard-color-default").trim()||"#1D6AE5",a=l.getPropertyValue("--dashboard-color-success").trim()||"#00CE9B",b=l.getPropertyValue("--dashboard-color-medium").trim()||"#FFAA02",u=this.viewMode==="byApp",L=[{label:"Viewed Item",value:this.funnel.viewItemSessions,web:this.funnel.webViewItemSessions,mobile:this.funnel.mobileViewItemSessions},{label:"Added to Cart",value:this.funnel.cartSessions,web:this.funnel.webCartSessions,mobile:this.funnel.mobileCartSessions},{label:"Began Checkout",value:this.funnel.checkoutSessions,web:this.funnel.webCheckoutSessions,mobile:this.funnel.mobileCheckoutSessions},{label:"Purchased",value:this.funnel.purchaseSessions,web:this.funnel.webPurchaseSessions,mobile:this.funnel.mobilePurchaseSessions}];this.funnelChartData=L.some(he=>he.value>0)?{labels:L.map(he=>he.label),datasets:u?[{label:"Web",data:L.map(he=>he.web),backgroundColor:r,borderRadius:3},{label:"Mobile App",data:L.map(he=>he.mobile),backgroundColor:b,borderRadius:3}]:[{label:"Sessions",data:L.map(he=>he.value),backgroundColor:["#90CAF9","#64B5F6","#42A5F5",r],borderRadius:3}]}:null,this.funnelChartOptions={indexAxis:"y",responsive:!0,maintainAspectRatio:!1,plugins:{legend:u?{position:"bottom",labels:{usePointStyle:!0,padding:16}}:{display:!1}},scales:{x:{beginAtZero:!0,grid:{color:"#f0f0f0"}},y:{grid:{display:!1}}}},this.trendChartData=this.funnel.trend?.length?{labels:this.funnel.trend.map(he=>he.date),datasets:u?[{label:"Web",data:this.funnel.trend.map(he=>he.webPurchases),borderColor:r,backgroundColor:"transparent",fill:!1,tension:.3,pointRadius:2},{label:"Mobile App",data:this.funnel.trend.map(he=>he.mobilePurchases),borderColor:b,backgroundColor:"transparent",fill:!1,tension:.3,pointRadius:2}]:[{label:"Purchases",data:this.funnel.trend.map(he=>he.purchases),borderColor:a,backgroundColor:"rgba(46, 125, 50, 0.08)",fill:!0,tension:.3,pointRadius:2}]}:null,this.trendChartOptions={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,padding:16}}},scales:{x:{grid:{display:!1}},y:{beginAtZero:!0,grid:{color:"#f0f0f0"}}}}}};
7886d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-commerce-panel"]],inputs:{startDate:"startDate",endDate:"endDate",clubOptions:"clubOptions"},standalone:!1,features:[Ve],decls:18,vars:10,consts:[["panelTitle","Commerce","skeletonHeight","380px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Registrations and store checkouts measured as GA4 ecommerce events. The funnel shows how many sessions reached each stage \u2014 viewing an item, adding to cart, starting checkout, purchasing. Conversion is purchasing sessions divided by all sessions; member conversion divides by signed-in sessions only. Purchase counts, not dollars \u2014 revenue reporting comes from the payments ledger.",3,"renderAsLink"],["slot","filters",1,"d-flex","align-items-center","flex-wrap","pb-2"],["for","commerceClubFilter",1,"sr-only"],["inputId","commerceClubFilter","filterBy","label","appendTo","body",3,"ngModelChange","onChange","options","ngModel","filter"],["optionLabel","label","optionValue","value",1,"ml-3",3,"ngModelChange","onChange","options","ngModel","allowEmpty"],["height","380px"],["alertType","error",3,"isInline"],["type","button",1,"btn","btn-red","btn-sm","ml-2",3,"click"],[1,"fa-regular","fa-rotate-right","mr-1"],["alertType","warning",3,"isInline"],[1,"row","border-bottom","mb-3"],[1,"col-4","border-right"],[1,"full-height","py-2","text-center"],["pTooltip","Completed purchase events in the window. One session can complete more than one checkout.",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"dashboard-big-number"],["webTooltip","Purchases completed on the web","mobileTooltip","Purchases completed in the mobile app (including its in-app web views)",3,"webValue","mobileValue"],["pTooltip","Sessions that completed a purchase, as a share of all sessions (including anonymous browsing).",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"col-4"],["pTooltip","Sessions that completed a purchase, as a share of signed-in member sessions \u2014 how often an engaged member visit converts.",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"text-smallest","mt-2",3,"ngClass"],[3,"ngClass"],[1,"text-header-4","mb-1"],[1,"text-smallest","text-muted"],["type","bar","height","180px",3,"data","options"],[1,"text-header-4","mb-1","mt-3"],["type","line","height","220px",3,"data","options"],[1,"text-center","text-muted","py-3"]],template:function(r,a){r&1&&(n(0,"app-admin-dashboard-card",0),e(1,`
7887    `),g(2,"app-tooltip",1),e(3,`
7888
7889    `),n(4,"div",2),e(5,`
7890        `),e(6,`
7891        `),n(7,"label",3),e(8,"Club"),i(),e(9,`
7892        `),n(10,"p-select",4),y("ngModelChange",function(u){return S(a.selectedClubID,u)||(a.selectedClubID=u),u}),T("onChange",function(){return a.onClubFilterChange()}),i(),e(11,`
7893        `),n(12,"p-selectButton",5),y("ngModelChange",function(u){return S(a.viewMode,u)||(a.viewMode=u),u}),T("onChange",function(){return a.onViewModeChange()}),i(),e(13,`
7894    `),i(),e(14,`
7895
7896    `),_(15,N3,3,0),_(16,j3,4,1),i(),e(17,`
7897`)),r&2&&(m("loading",a.loading&&!a.funnel),s(2),m("renderAsLink",!1),s(8),m("options",a.clubFilterOptions),C("ngModel",a.selectedClubID),m("filter",!0),s(2),m("options",a.viewModeOptions),C("ngModel",a.viewMode),m("allowEmpty",!1),s(3),x(a.loading?15:-1),s(),x(a.loading?-1:16))},dependencies:[Ge,U,Y,nt,Ze,We,pt,dt,q,ze,yt,Qt,ni,Be],encapsulation:2});let o=d;return o}
7897)();function z3(o,d){o&1&&(e(0,`
7898        `),g(1,"app-skeleton-template",5),e(2,`
7899    `))}function q3(o,d){if(o&1){let t=D();e(0,`
7900            `),n(1,"app-inline-alert",6),e(2,`
7901                Unable to load the tenant leaderboard.
7902                `),n(3,"button",7),T("click",function(){f(t);let r=p(2);return h(r.load())}),e(4,`
7903                    `),g(5,"i",8),e(6,`Retry
7904                `),i(),e(7,`
7905            `),i(),e(8,`
7906        `)}o&2&&(s(),m("isInline",!0))}function $3(o,d){o&1&&(e(0,`
7907                    `),n(1,"tr"),e(2,`
7908                        `),n(3,"th",10),e(4,"Club "),g(5,"p-sortIcon",11),i(),e(6,`
7909                        `),n(7,"th",12),e(8,"Members "),g(9,"p-sortIcon",13),i(),e(10,`
7910                        `),n(11,"th",14),e(12,"Member Sessions "),g(13,"p-sortIcon",15),i(),e(14,`
7911                        `),n(15,"th",16),e(16,"All Sessions "),g(17,"p-sortIcon",17),i(),e(18,`
7912                        `),n(19,"th",18),e(20,"Page Views "),g(21,"p-sortIcon",19),i(),e(22,`
7913                        `),n(23,"th",20),e(24,"Purchases "),g(25,"p-sortIcon",21),i(),e(26,`
7914                        `),n(27,"th",22),e(28,"Conversion "),g(29,"p-sortIcon",23),i(),e(30,`
7915                        `),n(31,"th",24),e(32,`
7916                            `),n(33,"span",25),e(34,"App Mix"),i(),e(35,`
7917                            `),g(36,"p-sortIcon",26),e(37,`
7918                        `),i(),e(38,`
7919                    `),i(),e(39,`
7920                `))}function K3(o,d){if(o&1&&(e(0,`
7921                    `),n(1,"tr"),e(2,`
7922                        `),n(3,"td"),e(4),i(),e(5,`
7923                        `),n(6,"td",27),e(7),v(8,"number"),i(),e(9,`
7924                        `),n(10,"td",27),e(11),v(12,"number"),i(),e(13,`
7925                        `),n(14,"td",27),e(15),v(16,"number"),i(),e(17,`
7926                        `),n(18,"td",27),e(19),v(20,"number"),i(),e(21,`
7927                        `),n(22,"td",27),e(23),v(24,"number"),i(),e(25,`
7928                        `),n(26,"td",27),e(27),v(28,"number"),i(),e(29,`
7929                        `),n(30,"td",27),e(31,`
7930                            `),n(32,"span",28),e(33,`
7931                                `),g(34,"i",29),e(35),v(36,"number"),i(),e(37,`
7932                        `),i(),e(38,`
7933                    `),i(),e(39,`
7934                `)),o&2){let t=d.$implicit,l=p(3);s(4),c(t.clubName),s(3),c(E(8,9,t.members)),s(4),c(E(12,11,t.memberSessions)),s(4),c(E(16,13,t.totalSessions)),s(4),c(E(20,15,t.pageViews)),s(4),c(E(24,17,t.purchases)),s(4),I("",B(28,19,t.conversionRate,"1.1-2"),"%"),s(5),m("pTooltip",l.getAppMixTooltip(t)),s(3),I("",B(36,22,t.mobileMemberSessionsPercent,"1.0-0"),`%
7935                            `)}}function J3(o,d){o&1&&(e(0,`
7936                    `),n(1,"tr")(2,"td",30),e(3,"No tenant activity in this window."),i()(),e(4,`
7937                `))}function X3(o,d){if(o&1&&(e(0,`
7938            `),n(1,"p-table",9),e(2,`
7939                `),R(3,$3,40,0,"ng-template",null,0,Fe),e(5,`
7940                `),R(6,K3,40,25,"ng-template",null,1,Fe),e(8,`
7941                `),R(9,J3,5,0,"ng-template",null,2,Fe),e(11,`
7942            `),i(),e(12,`
7943        `)),o&2){let t=p(2);s(),m("value",t.rows)("paginator",t.rows.length>10)("rows",10)("showCurrentPageReport",t.rows.length>10)("sortOrder",-1)}}function Z3(o,d){if(o&1&&(e(0,`
7944        `),_(1,q3,9,1)(2,X3,13,5)),o&2){let t=p();s(),x(t.error?1:2)}}var aa=(()=>{let d=class d{constructor(l){this.reportService=l,this.unsubscribe$=new ge,this.loading=!0,this.error=!1,this.rows=[],this.loadSequence=0}ngOnChanges(l){(l.startDate||l.endDate)&&this.startDate&&this.endDate&&this.load()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}getAppMixTooltip(l){let r=new Intl.NumberFormat("en-US");return`Member sessions \u2014 Web: ${r.format(l.webMemberSessions)} \xB7 Mobile app: ${r.format(l.mobileMemberSessions)}`}load(){let l=++this.loadSequence;this.loading=!0,this.error=!1,this.reportService.getSprocketClubLeaderboard(this.startDate,this.endDate).pipe(Z(this.unsubscribe$)).subscribe({next:r=>{l===this.loadSequence&&(this.rows=r||[],this.loading=!1)},error:()=>{l===this.loadSequence&&(this.loading=!1,this.error=!0)}})}};
7944d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-club-leaderboard-panel"]],inputs:{startDate:"startDate",endDate:"endDate"},standalone:!1,features:[Ve],decls:7,vars:4,consts:[["header",""],["body",""],["emptymessage",""],["panelTitle","Top Tenants","skeletonHeight","420px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","Every club with tracked activity in the window, ranked by purchases by default \u2014 click any column to re-rank. Members counts distinct signed-in members of that club; Conversion is purchasing sessions as a share of all of that club's sessions; App Mix is the share of member sessions that happened in the mobile app.",3,"renderAsLink"],["height","420px"],["alertType","error",3,"isInline"],["type","button",1,"btn","btn-red","btn-sm","ml-2",3,"click"],[1,"fa-regular","fa-rotate-right","mr-1"],["sortField","purchases","styleClass","p-datatable-sm",3,"value","paginator","rows","showCurrentPageReport","sortOrder"],["pSortableColumn","clubName"],["field","clubName"],["pSortableColumn","members",1,"text-right"],["field","members"],["pSortableColumn","memberSessions",1,"text-right"],["field","memberSessions"],["pSortableColumn","totalSessions",1,"text-right"],["field","totalSessions"],["pSortableColumn","pageViews",1,"text-right"],["field","pageViews"],["pSortableColumn","purchases",1,"text-right"],["field","purchases"],["pSortableColumn","conversionRate",1,"text-right"],["field","conversionRate"],["pSortableColumn","mobileMemberSessionsPercent",1,"text-right"],["pTooltip","Share of the club's member sessions that happened in the mobile app (vs the web). Hover a value for the raw counts.",1,"hover-dotted"],["field","mobileMemberSessionsPercent"],[1,"text-right"],[1,"hover-dotted",3,"pTooltip"],["aria-hidden","true",1,"fa-regular","fa-mobile-screen","mr-1"],["colspan","8",1,"text-center"]],template:function(r,a){r&1&&(n(0,"app-admin-dashboard-card",3),e(1,`
7945    `),g(2,"app-tooltip",4),e(3,`
7946
7947    `),_(4,z3,3,0),_(5,Z3,3,1),i(),e(6,`
7948`)),r&2&&(m("loading",a.loading&&!a.rows.length),s(2),m("renderAsLink",!1),s(2),x(a.loading?4:-1),s(),x(a.loading?-1:5))},dependencies:[nt,Ze,We,pt,dt,H,$,K,ze,Be],encapsulation:2});let o=d;return o}
7948)();var eE=(o,d)=>d.label;function tE(o,d){o&1&&(e(0,`
7949        `),g(1,"app-skeleton-template",21),e(2,`
7950    `))}function iE(o,d){if(o&1){let t=D();e(0,`
7951            `),n(1,"app-inline-alert",22),e(2,`
7952                Unable to load mobile review prompt data.
7953                `),n(3,"button",23),T("click",function(){f(t);let r=p(2);return h(r.load())}),e(4,`
7954                    `),g(5,"i",24),e(6,`Retry
7955                `),i(),e(7,`
7956            `),i(),e(8,`
7957        `)}o&2&&(s(),m("isInline",!0))}function nE(o,d){if(o&1&&(e(0,`
7958                            `),n(1,"span",44),e(2),v(3,"number"),i(),e(4,`
7959                        `)),o&2){let t=d.$implicit,l=p(4);s(2),Ye("",l.formatTriggerLabel(t.label)," (",E(3,2,t.count),")")}}function oE(o,d){if(o&1&&(e(0,`
7960                        `),n(1,"span",43),e(2,"Triggered by:"),i(),e(3,`
7961                        `),N(4,nE,5,4,null,null,eE)),o&2){let t=p(3);s(4),V(t.summary.triggers)}}function rE(o,d){o&1&&(e(0,`
7962                        `),n(1,"span"),e(2,"No prompts were shown in this window."),i(),e(3,`
7963                    `))}function aE(o,d){if(o&1){let t=D();e(0,`
7964            `),n(1,"div",25),e(2,`
7965                `),n(3,"div",26),e(4,`
7966                    `),n(5,"div",27),e(6,`
7967                        `),n(7,"span",28),e(8,"Prompts Shown"),i(),e(9,`
7968                        `),n(10,"div",29),e(11),v(12,"number"),i(),e(13,`
7969                    `),i(),e(14,`
7970                `),i(),e(15,`
7971                `),n(16,"div",26),e(17,`
7972                    `),n(18,"div",27),e(19,`
7973                        `),n(20,"span",30),e(21,"Response Rate"),i(),e(22,`
7974                        `),n(23,"div",29),e(24),v(25,"number"),i(),e(26,`
7975                        `),n(27,"div",31),e(28),v(29,"number"),v(30,"number"),i(),e(31,`
7976                    `),i(),e(32,`
7977                `),i(),e(33,`
7978                `),n(34,"div",26),e(35,`
7979                    `),n(36,"div",27),e(37,`
7980                        `),n(38,"span",32),e(39,"Positive"),i(),e(40,`
7981                        `),n(41,"div",29),e(42),v(43,"number"),i(),e(44,`
7982                        `),n(45,"div",31),e(46,`
7983                            `),g(47,"i",33),e(48),v(49,"number"),g(50,"i",34),e(51),v(52,"number"),i(),e(53,`
7984                    `),i(),e(54,`
7985                `),i(),e(55,`
7986                `),n(56,"div",26),e(57,`
7987                    `),n(58,"div",27),e(59,`
7988                        `),n(60,"span",35),e(61,"Review Requests"),i(),e(62,`
7989                        `),n(63,"div",29),e(64),v(65,"number"),i(),e(66,`
7990                    `),i(),e(67,`
7991                `),i(),e(68,`
7992                `),n(69,"div",26),e(70,`
7993                    `),n(71,"div",27),e(72,`
7994                        `),n(73,"span",36),e(74,"Comments"),i(),e(75,`
7995                        `),n(76,"div",29),e(77),v(78,"number"),i(),e(79,`
7996                    `),i(),e(80,`
7997                `),i(),e(81,`
7998                `),n(82,"div",37),e(83,`
7999                    `),n(84,"div",27),e(85,`
8000                        `),n(86,"span",38),e(87,"Dismissed"),i(),e(88,`
8001                        `),n(89,"div",29),e(90),v(91,"number"),i(),e(92,`
8002                    `),i(),e(93,`
8003                `),i(),e(94,`
8004            `),i(),e(95,`
8005
8006            `),n(96,"div",39),e(97,`
8007                `),n(98,"div",40),e(99,`
8008                    `),_(100,oE,6,0)(101,rE,4,0),i(),e(102,`
8009                `),n(103,"button",41),T("click",function(){f(t);let r=p(2);return h(r.openEntries())}),e(104,`
8010                    `),g(105,"i",42),e(106,`View Responses
8011                `),i(),e(107,`
8012            `),i(),e(108,`
8013        `)}if(o&2){let t=p(2);s(11),c(E(12,11,t.summary.prompts)),s(13),I("",B(25,13,t.summary.responseRatePercent,"1.0-1"),"%"),s(4),Ye("",E(29,16,t.summary.responses)," of ",E(30,18,t.summary.prompts)),s(14),I("",B(43,20,t.summary.positiveRatePercent,"1.0-1"),"%"),s(6),I("",E(49,23,t.summary.thumbsUp),`
8014                            `),s(3),I("",E(52,25,t.summary.thumbsDown),`
8015                        `),s(13),c(E(65,27,t.summary.reviewRequests)),s(13),c(E(78,29,t.summary.verbatims)),s(13),c(E(91,31,t.summary.dismissed)),s(10),x(t.summary.triggers.length?100:101)}}function lE(o,d){if(o&1&&(e(0,`
8016        `),_(1,iE,9,1)(2,aE,109,33)),o&2){let t=p();s(),x(t.error?1:t.summary?2:-1)}}function sE(o,d){if(o&1){let t=D();e(0,`
8017        `),n(1,"app-inline-alert",22),e(2,`
8018            Unable to load responses.
8019            `),n(3,"button",23),T("click",function(){f(t);let r=p();return h(r.loadEntries(!1))}),e(4,`
8020                `),g(5,"i",24),e(6,`Retry
8021            `),i(),e(7,`
8022        `),i(),e(8,`
8023    `)}o&2&&(s(),m("isInline",!0))}function dE(o,d){o&1&&(e(0,`
8024                `),n(1,"tr"),e(2,`
8025                    `),n(3,"th"),e(4,"When"),i(),e(5,`
8026                    `),n(6,"th"),e(7,"Rating"),i(),e(8,`
8027                    `),n(9,"th"),e(10,"Comment"),i(),e(11,`
8028                    `),n(12,"th"),e(13,"Club"),i(),e(14,`
8029                    `),n(15,"th"),e(16,"Member"),i(),e(17,`
8030                    `),n(18,"th"),e(19,"Trigger"),i(),e(20,`
8031                    `),n(21,"th"),e(22,"Platform"),i(),e(23,`
8032                    `),n(24,"th"),e(25,"Version"),i(),e(26,`
8033                `),i(),e(27,`
8034            `))}function pE(o,d){o&1&&(e(0,`
8035                            `),g(1,"i",48),e(2,`
8036                        `))}function mE(o,d){if(o&1&&(e(0,`
8037                `),n(1,"tr"),e(2,`
8038                    `),n(3,"td",46),e(4),v(5,"date"),i(),e(6,`
8039                    `),n(7,"td",46),e(8,`
8040                        `),g(9,"i",47),e(10),_(11,pE,3,0),i(),e(12,`
8041                    `),n(13,"td"),e(14),i(),e(15,`
8042                    `),n(16,"td"),e(17),i(),e(18,`
8043                    `),n(19,"td"),e(20),i(),e(21,`
8044                    `),n(22,"td",46),e(23),i(),e(24,`
8045                    `),n(25,"td",46),e(26),i(),e(27,`
8046                    `),n(28,"td",46),e(29),i(),e(30,`
8047                `),i(),e(31,`
8048            `)),o&2){let t=d.$implicit,l=p(2);s(4),c(B(5,11,t.savedOn,"short")),s(5),Je(l.getRatingIcon(t.ratingID)+" mr-1"),s(),I("",l.getRatingLabel(t.ratingID),`
8049                        `),s(),x(t.reviewRequested?11:-1),s(3),c(t.feedback||"\u2014"),s(3),c(t.clubName),s(3),c(t.memberName),s(3),c(l.formatTriggerLabel(t.triggerType)),s(3),c(t.platform||"\u2014"),s(3),c(t.appVersion||"\u2014")}}function cE(o,d){o&1&&(e(0,`
8050                `),n(1,"tr")(2,"td",49),e(3,"No responses match these filters."),i()(),e(4,`
8051            `))}function uE(o,d){if(o&1){let t=D();e(0,`
8052            `),n(1,"p-paginator",50),T("onPageChange",function(r){f(t);let a=p(2);return h(a.onPageChange(r))}),i(),e(2,`
8053        `)}if(o&2){let t=p(2);s(),m("first",t.first)("rows",t.pageSize)("totalRecords",t.totalEntries)}}function _E(o,d){if(o&1&&(e(0,`
8054        `),n(1,"p-table",45),e(2,`
8055            `),R(3,dE,28,0,"ng-template",null,1,Fe),e(5,`
8056            `),R(6,mE,32,14,"ng-template",null,2,Fe),e(8,`
8057            `),R(9,cE,5,0,"ng-template",null,3,Fe),e(11,`
8058        `),i(),e(12,`
8059
8060        `),_(13,uE,3,3),n(14,"div",31),e(15),v(16,"number"),i(),e(17,`
8061    `)),o&2){let t=p();s(),m("value",t.entries)("loading",t.entriesLoading),s(12),x(t.totalEntries>t.pageSize?13:-1),s(2),I("",E(16,4,t.totalEntries)," response(s)")}}function xE(o,d){if(o&1){let t=D();e(0,`
8062        `),n(1,"app-dialog-footer"),e(2,`
8063            `),rt(3,51),e(4,`
8064                `),n(5,"button",52),T("click",function(){f(t);let r=p();return h(r.closeEntries())}),e(6,"Close"),i(),e(7,`
8065            `),at(),e(8,`
8066        `),i(),e(9,`
8067    `)}}var xt=(function(o){return o[o.THUMBS_DOWN=1]="THUMBS_DOWN",o[o.NO_THANKS=2]="NO_THANKS",o[o.THUMBS_UP=3]="THUMBS_UP",o})(xt||{}),la=(()=>{let d=class d{constructor(l){this.reportService=l,this.clubOptions=[],this.unsubscribe$=new ge,this.RatingType=xt,this.loading=!0,this.error=!1,this.selectedClubID=null,this.clubFilterOptions=[{label:"All Clubs",value:null}],this.loadSequence=0,this.showEntries=!1,this.entriesLoading=!1,this.entriesError=!1,this.entries=[],this.totalEntries=0,this.searchText="",this.ratingFilter=null,this.withFeedbackOnly=!1,this.pageSize=25,this.first=0,this.entriesSequence=0,this.searchChanged$=new ge,this.ratingFilterOptions=[{label:"All Responses",value:null},{label:"Thumbs Up",value:xt.THUMBS_UP},{label:"Thumbs Down",value:xt.THUMBS_DOWN},{label:"Ask Me Later",value:xt.NO_THANKS}],this.searchChanged$.pipe(pn(350),Z(this.unsubscribe$)).subscribe({next:()=>this.loadEntries(!0),error:()=>{this.entriesError=!0}})}ngOnChanges(l){l.clubOptions&&(this.clubFilterOptions=[{label:"All Clubs",value:null},...this.clubOptions||[]]),(l.startDate||l.endDate)&&this.startDate&&this.endDate&&(this.load(),this.showEntries&&this.loadEntries(!0))}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onClubFilterChange(){this.load(),this.showEntries&&this.loadEntries(!0)}load(){let l=++this.loadSequence;this.loading=!0,this.error=!1,this.reportService.getSprocketMobileFeedback(this.startDate,this.endDate,this.selectedClubID??void 0).pipe(Z(this.unsubscribe$)).subscribe({next:r=>{l===this.loadSequence&&(this.summary=r,this.loading=!1)},error:()=>{l===this.loadSequence&&(this.loading=!1,this.error=!0)}})}openEntries(){this.showEntries=!0,this.loadEntries(!0)}closeEntries(){this.showEntries=!1}onSearchChange(){this.searchChanged$.next()}clearSearch(){this.searchText="",this.loadEntries(!0)}onEntryFilterChange(){this.loadEntries(!0)}onPageChange(l){this.first=l.first??0,this.loadEntries(!1)}loadEntries(l){l&&(this.first=0);let r=++this.entriesSequence;this.entriesLoading=!0,this.entriesError=!1;let a={clubID:this.selectedClubID??void 0,search:this.searchText?.trim()||void 0,ratingID:this.ratingFilter??void 0,withFeedbackOnly:this.withFeedbackOnly,page:Math.floor(this.first/this.pageSize)+1,pageSize:this.pageSize};this.reportService.getSprocketMobileFeedbackEntries(this.startDate,this.endDate,a).pipe(Z(this.unsubscribe$)).subscribe({next:b=>{r===this.entriesSequence&&(this.entries=b?.entries||[],this.totalEntries=b?.totalCount||0,this.entriesLoading=!1)},error:()=>{r===this.entriesSequence&&(this.entriesLoading=!1,this.entriesError=!0)}})}getRatingLabel(l){switch(l){case xt.THUMBS_UP:return"Thumbs Up";case xt.THUMBS_DOWN:return"Thumbs Down";case xt.NO_THANKS:return"Ask Me Later";
8067default:return"Dismissed"}}getRatingIcon(l){switch(l){case xt.THUMBS_UP:return"fa-regular fa-thumbs-up text-success";case xt.THUMBS_DOWN:return"fa-regular fa-thumbs-down text-danger";case xt.NO_THANKS:return"fa-regular fa-clock text-medium";default:return"fa-regular fa-xmark text-medium"}}formatTriggerLabel(l){return l?l.split("_").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "):"Unknown"}};d.\u0275fac=function(r){return new(r||d)(w(M))},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-mobile-feedback-panel"]],inputs:{startDate:"startDate",endDate:"endDate",clubOptions:"clubOptions"},standalone:!1,features:[Ve],decls:62,vars:17,consts:[["footer",""],["header",""],["body",""],["emptymessage",""],["panelTitle","Mobile App Reviews","skeletonHeight","220px",3,"loading"],["slot","titleSuffix","tooltipPosition","top","tooltipText","The in-app review prompt, mobile only. Prompts Shown counts prompts that actually passed every gate and were presented. Response Rate is thumbs up plus thumbs down over prompts shown. Review Requests counts times the app asked the OS for its review sheet \u2014 neither Apple nor Google reports whether a sheet appeared or a review was written, so it is a request count, never a review count. Live from the application database, not the nightly rollup.",3,"renderAsLink"],["slot","filters",1,"d-flex","align-items-center","flex-wrap","pb-2"],["for","mobileFeedbackClubFilter",1,"sr-only"],["inputId","mobileFeedbackClubFilter","filterBy","label","appendTo","body",3,"ngModelChange","onChange","options","ngModel","filter"],["header","Mobile App Review Responses","styleClass","largeWidthDialog",3,"visibleChange","onHide","visible","modal","draggable"],[1,"d-flex","align-items-end","flex-wrap","mb-3"],[1,"mr-3","mb-2"],["for","mobileFeedbackSearch",1,"text-medium","mb-1","d-block"],["id","mobileFeedbackSearch","type","text","placeholder","Comment, club, member, version\u2026",1,"form-control",3,"ngModelChange","input","ngModel"],["type","button",1,"btn","btn-naked","btn-sm",3,"click","disabled"],[1,"fa","fa-times"],["for","mobileFeedbackRatingFilter",1,"text-medium","mb-1","d-block"],["inputId","mobileFeedbackRatingFilter","appendTo","body",3,"ngModelChange","onChange","options","ngModel"],[1,"mb-2","d-flex","align-items-center"],["inputId","mobileFeedbackWithComments",3,"ngModelChange","onChange","ngModel","binary"],["for","mobileFeedbackWithComments",1,"ml-2","mb-0"],["height","180px"],["alertType","error",3,"isInline"],["type","button",1,"btn","btn-red","btn-sm","ml-2",3,"click"],[1,"fa-regular","fa-rotate-right","mr-1"],[1,"row"],[1,"col-lg-2","col-md-4","col-6","border-bottom","border-right"],[1,"full-height","py-2","text-center"],["pTooltip","Prompts that passed every gate and were shown to a user.",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"dashboard-big-number"],["pTooltip","Thumbs up plus thumbs down, as a share of prompts shown.",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"text-smallest","text-medium","mt-2"],["pTooltip","Thumbs up as a share of everyone who rated.",1,"dashboard-big-number--title","mb-2","hover-dotted"],["aria-hidden","true",1,"fa-regular","fa-thumbs-up","text-success","mr-1"],["aria-hidden","true",1,"fa-regular","fa-thumbs-down","text-danger","ml-2","mr-1"],["pTooltip","Times the app asked the OS for its review sheet. The store never reports back whether a sheet appeared or a review was left, so this is not a review count.",1,"dashboard-big-number--title","mb-2","hover-dotted"],["pTooltip","Responses that included written feedback.",1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"col-lg-2","col-md-4","col-6","border-bottom"],["pTooltip",'Prompts dismissed without a rating, including explicit "Ask me later".',1,"dashboard-big-number--title","mb-2","hover-dotted"],[1,"d-flex","justify-content-between","align-items-center","flex-wrap","mt-3","px-2"],[1,"text-smallest","text-medium"],["type","button",1,"btn","btn-sm",3,"click"],[1,"fa-regular","fa-comments","mr-1"],[1,"mr-2"],[1,"mr-3"],["styleClass","p-datatable-sm",3,"value","loading"],[1,"text-nowrap"],["aria-hidden","true"],["aria-hidden","true","pTooltip","The OS review sheet was requested for this response.",1,"fa-regular","fa-star","text-medium","ml-1"],["colspan","8",1,"text-center"],[3,"onPageChange","first","rows","totalRecords"],["slot","primary"],["type","button",1,"btn",3,"click"]],template:function(r,a){
8067if(r&1){let b=D();n(0,"app-admin-dashboard-card",4),e(1,`
8068    `),g(2,"app-tooltip",5),e(3,`
8069
8070    `),n(4,"div",6),e(5,`
8071        `),e(6,`
8072          `),n(7,"label",7),e(8,"Club"),i(),e(9,`
8073        `),n(10,"p-select",8),y("ngModelChange",function(L){return f(b),S(a.selectedClubID,L)||(a.selectedClubID=L),h(L)}),T("onChange",function(){return a.onClubFilterChange()}),i(),e(11,`
8074    `),i(),e(12,`
8075
8076    `),_(13,tE,3,0),_(14,lE,3,1),i(),e(15,`
8077
8078`),n(16,"p-dialog",9),y("visibleChange",function(L){return f(b),S(a.showEntries,L)||(a.showEntries=L),h(L)}),T("onHide",function(){return a.closeEntries()}),e(17,`
8079
8080    `),n(18,"div",10),e(19,`
8081        `),n(20,"div",11),e(21,`
8082            `),n(22,"label",12),e(23,"Search"),i(),e(24,`
8083            `),n(25,"p-inputgroup"),e(26,`
8084                `),n(27,"input",13),y("ngModelChange",function(L){return f(b),S(a.searchText,L)||(a.searchText=L),h(L)}),T("input",function(){return a.onSearchChange()}),i(),e(28,`
8085                `),n(29,"p-inputgroup-addon"),e(30,`
8086                    `),n(31,"button",14),T("click",function(){return a.clearSearch()}),e(32,`
8087                        `),g(33,"i",15),e(34,`
8088                    `),i(),e(35,`
8089                `),i(),e(36,`
8090            `),i(),e(37,`
8091        `),i(),e(38,`
8092        `),n(39,"div",11),e(40,`
8093            `),n(41,"label",16),e(42,"Rating"),i(),e(43,`
8094            `),n(44,"p-select",17),y("ngModelChange",function(L){return f(b),S(a.ratingFilter,L)||(a.ratingFilter=L),h(L)}),T("onChange",function(){return a.onEntryFilterChange()}),i(),e(45,`
8095        `),i(),e(46,`
8096        `),n(47,"div",18),e(48,`
8097            `),n(49,"p-checkbox",19),y("ngModelChange",function(L){return f(b),S(a.withFeedbackOnly,L)||(a.withFeedbackOnly=L),h(L)}),T("onChange",function(){return a.onEntryFilterChange()}),i(),e(50,`
8098            `),n(51,"label",20),e(52,"Comments only"),i(),e(53,`
8099        `),i(),e(54,`
8100    `),i(),e(55,`
8101
8102    `),_(56,sE,9,1)(57,_E,18,6),R(58,xE,10,0,"ng-template",null,0,Fe),e(60,`
8103`),i(),e(61,`
8104`)}r&2&&(m("loading",a.loading&&!a.summary),s(2),m("renderAsLink",!1),s(8),m("options",a.clubFilterOptions),C("ngModel",a.selectedClubID),m("filter",!0),s(3),x(a.loading?13:-1),s(),x(a.loading?-1:14),s(2),C("visible",a.showEntries),m("modal",!0)("draggable",!1),s(11),C("ngModel",a.searchText),s(4),m("disabled",!a.searchText),s(13),m("options",a.ratingFilterOptions),C("ngModel",a.ratingFilter),s(5),C("ngModel",a.withFeedbackOnly),m("binary",!0),s(7),x(a.entriesError?56:57))},dependencies:[fe,U,Y,nt,Ze,We,pt,dt,Kt,ie,ne,H,ft,St,q,ze,Bn,Be,de],encapsulation:2});let o=d;return o}
8104)();var xi=(function(o){return o[o.LAST_7_DAYS=7]="LAST_7_DAYS",o[o.LAST_30_DAYS=30]="LAST_30_DAYS",o[o.LAST_90_DAYS=90]="LAST_90_DAYS",o})(xi||{}),sa=(()=>{let d=class d{constructor(l,r){this.reportService=l,this.siteDataService=r,this.unsubscribe$=new ge,this.selectedRange=xi.LAST_30_DAYS,this.dateRangeOptions=[{label:"Last 7 Days",value:xi.LAST_7_DAYS},{label:"Last 30 Days",value:xi.LAST_30_DAYS},{label:"Last 90 Days",value:xi.LAST_90_DAYS}],this.loadingClubs=!0,this.clubOptions=[]}ngOnInit(){this.setDateRange(this.selectedRange),this.loadClubs(),this.siteDataService.hideSiteLoader()}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}onDateRangeChange(l){this.selectedRange=l,this.setDateRange(l)}setDateRange(l){this.endDate=new Date,this.startDate=new Date(this.endDate),this.startDate.setDate(this.startDate.getDate()-l)}loadClubs(){this.loadingClubs=!0,this.reportService.getSprocketAnalyticsClubs().pipe(Z(this.unsubscribe$)).subscribe({next:l=>{this.clubOptions=l||[],this.loadingClubs=!1},error:()=>{this.loadingClubs=!1,this.siteDataService.showSiteErrorAlert("Unable to load the club filter list.")}})}};d.\u0275fac=function(r){return new(r||d)(w(M),w(k))},d.\u0275cmp=A({type:d,selectors:[["app-sprocket-analytics"]],standalone:!1,decls:44,vars:20,consts:[["role","main"],[1,"d-flex","justify-content-between","border-bottom","mb-3"],["pageTitle","Sprocket Analytics",3,"hideBorder"],["optionLabel","label","optionValue","value",1,"mb-2",3,"ngModelChange","onChange","options","ngModel","allowEmpty"],[1,"mb-3"],[3,"isInline","iconClass"],[1,"row"],[1,"col-12","mb-3","d-flex","flex-column"],[3,"startDate","endDate","clubOptions"],[1,"col-lg-6","mb-3","d-flex","flex-column"],[3,"startDate","endDate"]],template:function(r,a){r&1&&(n(0,"main",0),e(1,`
8105    `),n(2,"div",1),e(3,`
8106        `),g(4,"app-admin-header",2),e(5,`
8107        `),n(6,"p-selectButton",3),y("ngModelChange",function(u){return S(a.selectedRange,u)||(a.selectedRange=u),u}),T("onChange",function(u){return a.onDateRangeChange(u.value)}),i(),e(7,`
8108    `),i(),e(8,`
8109
8110    `),n(9,"div",4),e(10,`
8111        `),n(11,"app-inline-alert",5),e(12,`
8112            Platform-wide view across all clubs, counting signed-in member activity only \u2014 anonymous
8113            visits to public pages are excluded. Use each panel's club filter to focus on one club.
8114            Analytics panels run through yesterday's nightly rollup; Mobile App Reviews comes
8115            straight from the application database and is current.
8116        `),i(),e(13,`
8117    `),i(),e(14,`
8118
8119    `),n(15,"div",6),e(16,`
8120        `),n(17,"div",7),e(18,`
8121            `),g(19,"app-sprocket-platform-pulse-panel",8),e(20,`
8122        `),i(),e(21,`
8123        `),n(22,"div",9),e(23,`
8124            `),g(24,"app-sprocket-member-sessions-panel",8),e(25,`
8125        `),i(),e(26,`
8126        `),n(27,"div",9),e(28,`
8127            `),g(29,"app-sprocket-commerce-panel",8),e(30,`
8128        `),i(),e(31,`
8129        `),n(32,"div",7),e(33,`
8130            `),g(34,"app-sprocket-mobile-feedback-panel",8),e(35,`
8131        `),i(),e(36,`
8132        `),n(37,"div",7),e(38,`
8133            `),g(39,"app-sprocket-club-leaderboard-panel",10),e(40,`
8134        `),i(),e(41,`
8135    `),i(),e(42,`
8136`),i(),e(43,`
8137`)),r&2&&(s(4),m("hideBorder",!0),s(2),m("options",a.dateRangeOptions),C("ngModel",a.selectedRange),m("allowEmpty",!1),s(5),m("isInline",!0)("iconClass","fa-regular fa-user-check"),s(8),m("startDate",a.startDate)("endDate",a.endDate)("clubOptions",a.clubOptions),s(5),m("startDate",a.startDate)("endDate",a.endDate)("clubOptions",a.clubOptions),s(5),m("startDate",a.startDate)("endDate",a.endDate)("clubOptions",a.clubOptions),s(5),m("startDate",a.startDate)("endDate",a.endDate)("clubOptions",a.clubOptions),s(5),m("startDate",a.startDate)("endDate",a.endDate))},dependencies:[U,Y,We,Qe,yt,na,oa,ra,aa,la],encapsulation:2});let o=d;return o}
8137)();var da=(()=>{let d=class d{constructor(l,r){this.authorize=l,this.router=r}canActivate(l,r){return this.authorize.getUser().pipe(dn(a=>a&&this.authorize.isSuperAdmin(a.role)&&+a.clubID==0?this.router.createUrlTree(["/admin/reports/analytics/sprocket"]):!0))}};d.\u0275fac=function(r){return new(r||d)(ri(Pe),ri(it))},d.\u0275prov=fi({token:d,factory:d.\u0275fac,providedIn:"root"});let o=d;return o})();var pa=(()=>{let d=class d{};d.\u0275fac=function(r){return new(r||d)},d.\u0275mod=Si({type:d}),d.\u0275inj=hi({imports:[nn.forChild([{path:"",canActivate:[st],component:Hr},{path:"team-health",canActivate:[st],component:Kr},{path:"report",canActivate:[st],component:Gr},{path:"scheduled-reports",canActivate:[st,$t],component:zr,data:{permissions:[ee.ScheduledReports]}},{path:"scheduled-reports/create",canActivate:[st,$t],component:Ji,data:{permissions:[ee.ScheduledReports]}},{path:"scheduled-reports/:id/edit",canActivate:[st,$t],component:Ji,data:{permissions:[ee.ScheduledReports]}},{path:"scheduled-reports/duplicate/:duplicateId",canActivate:[st,$t],component:Ji,data:{permissions:[ee.ScheduledReports]}},{path:"scheduled-reports/archive",canActivate:[st,$t],component:$r,data:{permissions:[ee.ScheduledReports]}},{path:"analytics",canActivate:[st,da],component:ta},{path:"analytics/sprocket",canActivate:[st,Nn],component:sa},{path:"analytics/member/:clubUserID",canActivate:[st],component:ia},{path:"custom-report-model-admin",loadChildren:()=>import("./chunk-CZLZ6ID6.js").then(l=>l.ModelAdminModule),canActivate:[rn],data:{admin:!0,metaTitle:"Custom Report Model Admin"}},{path:"custom-report-query",loadChildren:()=>import("./chunk-6GAOEZMU.js").then(l=>l.QueryModule),canActivate:[rn],data:{admin:!0,metaTitle:"Reports"}}]),nn]});let o=d;return o}
8137)();var WW=(()=>{let d=class d{};d.\u0275fac=function(r){return new(r||d)},d.\u0275mod=Si({type:d}),d.\u0275inj=hi({providers:[ao,M,At,Se,ve,et,Ue,ct,Zt,ei,lo,Ui,mt,Bi,de,Wi,Vi,qe,Yi,ki],imports:[Xn,pa,oo,Vn,io,Jn,Wn,so]});let o=d;return o})();export{WW as ReportModule};

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.