PageSourceSearch

https://vipershockeyclub.org/chunk-T5NOTCBA.js

js vipershockeyclub.org collected 2026-10-08 21:16:44 UTC 73,710 bytes, 533 lines download raw bytes

1import{d as dt,e as P,f as X}from"./chunk-7JPX6E7O.js";import{a as rt,b as be,c as Se,d as st,e as ct}from"./chunk-6CQ6IUNS.js";import{b as lt}from"./chunk-FWW3IJT2.js";import{$b as xe,Ec as nt,Gb as me,Hd as Ce,Ia as Xe,Mb as ue,Ob as _e,Tc as fe,Wb as Ze,Xb as et,aa as Je,d as ze,id as ot,k as qe,kd as he,kh as at,lb as J,lc as tt,qc as it,ua as pe}from"./chunk-X5J6QTCG.js";import{$ as ne,$a as u,Ad as ge,C as Ee,E as Te,Fa as c,Fb as Y,Gb as Pe,Ib as e,If as Ye,Jb as g,Ka as F,Kb as w,Kf as ce,Lc as Ue,Lf as de,Ma as U,Mb as Ne,Na as oe,Ni as Ke,Pf as We,Qb as Z,Rb as ee,Sa as ve,Sb as te,T as Me,Tb as Re,U as A,Ub as Ve,Vb as $e,Vc as ke,Wc as se,_ as G,_c as Oe,ba as V,bb as _,be as je,cb as ye,cc as M,d as W,db as ae,di as Qe,eb as $,ec as Be,fa as C,fb as B,fc as Le,fi as Ge,ga as S,gb as x,hb as a,ib as l,jb as h,k as ie,lc as b,mc as E,nc as re,pj as z,q as Q,qb as v,sb as D,tb as d,u as R,vd as k,wd as He,xb as le,xd as O,ya as T,yb as H,yd as K,zb as j}from"./chunk-SMW7PHYX.js";import{a as I,b as Ie}from"./chunk-BMIYOSOG.js";var pt=(()=>{let r=class r{constructor(){}ngOnInit(){}};r.\u0275fac=function(i){return new(i||r)},r.\u0275cmp=U({type:r,selectors:[["ng-component"]],standalone:!1,decls:1,vars:0,template:function(i,s){i&1&&h(0,"router-outlet")},dependencies:[He],encapsulation:2});let n=r;return n})();var N=(()=>{let r=class r{constructor(t){this.webAPI=t}getClubUserFinancialAidApplicationMetadata(){return this.webAPI.getData("financial-aid-applications/metadata")}getClubUserFinancialAidApplicationDependentMetadata(){return this.webAPI.getData("financial-aid-applications/dependent/metadata")}createClubUserFinancialAidApplication(t){return this.webAPI.postData("financial-aid-applications",t)}getClubUserFinancialAidApplications(){return this.webAPI.getData("financial-aid-applications")}createClubUserFinancialAidApplicationDocument(t,i){return this.webAPI.postMultiPartContent(`financial-aid-applications/${t}/documents`,i,i.name)}getFinancialAidApplicationDocuments(t){return this.webAPI.getData(`financial-aid/applications/${t}/documents`)}createFinancialAidApplicationDocument(t,i,s){let p=s?`?sectionFieldID=${s}`:"";return this.webAPI.postMultiPartContent(`financial-aid/applications/${t}/documents${p}`,i,i.name)}downloadFinancialAidApplicationDocument(t,i){return this.webAPI.getContentData(`financial-aid/applications/${t}/documents/${i}/download`)}deleteFinancialAidApplicationDocument(t,i){return this.webAPI.deleteData(`financial-aid/applications/${t}/documents/${i}`)}getApplicationPlayers(t){return this.webAPI.getData(`financial-aid/applications/${t}/players`)}setApplicationPlayers(t,i){return this.webAPI.putData(`financial-aid/applications/${t}/players`,{playerIDs:i})}getApplicationDependents(t){return this.webAPI.getData(`financial-aid/applications/${t}/dependents`)}addApplicationDependent(t,i){return this.webAPI.postData(`financial-aid/applications/${t}/dependents`,i)}addApplicationDependents(t,i){return this.webAPI.postData(`financial-aid/applications/${t}/dependents/bulk`,i)}updateApplicationDependent(t,i,s){return this.webAPI.putData(`financial-aid/applications/${t}/dependents/${i}`,s)}removeApplicationDependent(t,i){return this.webAPI.deleteData(`financial-aid/applications/${t}/dependents/${i}`)}canClubUserApply(){return this.webAPI.getData("financial-aid-applications/can-apply")}clubUserHasWindowOpen(){return this.webAPI.getData("financial-aid-applications/have-window")}getApplicantForm(){return this.webAPI.getData("financial-aid/form")}createApplication(t){return this.webAPI.postData("financial-aid/applications",{clubFinancialAidApplicationID:t})}submitApplication(t,i){return this.webAPI.postData(`financial-aid/applications/${t}/submit`,i)}getDraftResponses(t){return this.webAPI.getData(`financial-aid/applications/${t}/responses`)}saveDraftApplication(t,i){return this.webAPI.putData(`financial-aid/applications/${t}/responses`,i)}};r.\u0275fac=function(i){return new(i||r)(V(Ge))},r.\u0275prov=G({token:r,factory:r.\u0275fac});let n=r;return n})();var vt=()=>["/dashboard"],_t=()=>["./apply"],yt=(n,r,o)=>({approved:n,denied:r,pending:o}),gt=(n,r)=>({"fa-check":n,"fa-times":r});function bt(n,r){if(n&1&&(e(0,`
2              `),a(1,"div",8),b(2,"safeHtml"),e(3,`
3              `),l(),e(4,`
4            `)),n&2){let o=d();c(),x("innerHTML",E(2,1,o.settings.financialAidPageText),T)}}function wt(n,r){n&1&&(e(0,`
5            `),a(1,"div",9),e(2,`
6              `),a(3,"div",4),e(4,`
7                `),a(5,"app-inline-alert",10),e(6,`
8                  You have an application in progress.
9                  `),a(7,"a",11),e(8,"Continue Application"),l(),e(9,`
10                `),l(),e(10,`
11              `),l(),e(11,`
12            `),l(),e(12,`
13          `)),n&2&&(c(5),x("isInline",!0),c(2),x("routerLink",M(2,_t)))}function It(n,r){n&1&&(e(0,`
14            `),a(1,"div",9),e(2,`
15              `),a(3,"div",4),e(4,`
16                `),a(5,"app-inline-alert",12),e(6,`
17                  Financial aid applications are not currently being accepted.
18                `),l(),e(7,`
19              `),l(),e(8,`
20            `),l(),e(9,`
21          `)),n&2&&(c(5),x("isInline",!0))}function Et(n,r){n&1&&(e(0,`
22                    `),a(1,"tr"),e(2,`
23                      `),a(3,"th"),e(4,"Application Date"),l(),e(5,`
24                      `),a(6,"th"),e(7,"Status"),l(),e(8,`
25                      `),a(9,"th"),e(10,"Issued Amount"),l(),e(11,`
26                      `),a(12,"th"),e(13,"Reviewer Comments"),l(),e(14,`
27                    `),l(),e(15,`
28                  `))}function Tt(n,r){if(n&1&&(e(0,`
29                            `),h(1,"i",22),e(2,`
30                          `)),n&2){let o=d().$implicit,t=d(2);c(),x("ngClass",Be(1,gt,o.clubUserFinancialAidApplicationStatusID===t.Statuses.APPROVED,o.clubUserFinancialAidApplicationStatusID===t.Statuses.DENIED))}}function Mt(n,r){if(n&1&&e(0),n&2){let o=d().$implicit;w(`
31                                    `,o.value,`%
32                                  `)}}function Pt(n,r){if(n&1&&(e(0),b(1,"currency")),n&2){let o=d().$implicit;w(`
33                                    `,E(1,1,o.originalValue),`
34                                  `)}}function Nt(n,r){if(n&1&&(e(0,`
35                            `),a(1,"div",23),e(2,`
36                              `),a(3,"div",24),e(4),l(),e(5,`
37                              `),a(6,"div",24),e(7,"-"),l(),e(8,`
38                              `),a(9,"div"),e(10,`
39                                `),u(11,Mt,1,1)(12,Pt,2,3),e(13,`
40                              `),l(),e(14,`
41                            `),l(),e(15,`
42                          `)),n&2){let o,t=r.$implicit,i=d(4);c(4),g(t.playerName),c(7),_((o=t.clubCreditTypeID)===i.ClubCreditTypes.PERCENTAGE?11:12)}}function Rt(n,r){if(n&1&&(e(0,`
43                          `),$(1,Nt,16,2,null,null,ae)),n&2){let o=d().$implicit;c(),B(o.clubCredits)}}function Vt(n,r){n&1&&e(0,`
44                          N/A
45                        `)}function $t(n,r){if(n&1&&(e(0,`
46                    `),a(1,"tr"),e(2,`
47                      `),a(3,"td",17),e(4),b(5,"utcDate"),l(),e(6,`
48                      `),a(7,"td",18),e(8,`
49                        `),a(9,"span",19),e(10,`
50                          `),u(11,Tt,3,4),e(12),l(),e(13,`
51                      `),l(),e(14,`
52                      `),a(15,"td",20),e(16,`
53                        `),u(17,Rt,3,0)(18,Vt,1,0),l(),e(19,`
54                      `),a(20,"td",21),e(21),l(),e(22,`
55                    `),l(),e(23,`
56                  `)),n&2){let o=r.$implicit,t=d(2);c(4),w(`
57                        `,re(5,6,o.applicationDate,"MM/dd/y"),`
58                      `),c(5),x("ngClass",Le(9,yt,o.clubUserFinancialAidApplicationStatusID===t.Statuses.APPROVED,o.clubUserFinancialAidApplicationStatusID===t.Statuses.DENIED,o.clubUserFinancialAidApplicationStatusID===t.Statuses.PENDING)),c(2),_(o.clubUserFinancialAidApplicationStatusID!==t.Statuses.PENDING?11:-1),c(),w(`
59                          `,o.clubUserFinancialAidApplicationStatus.description,`
60                        `),c(5),_(o.clubCredits&&o.clubCredits.length>0?17:18),c(4),w(`
61                        `,o.reviewerComments||"N/A",`
62                      `)}}function Bt(n,r){if(n&1&&(e(0,`
63            `),a(1,"div",3),e(2,`
64              `),a(3,"div",4),e(4,`
65                `),a(5,"h3"),e(6,"Previous Applications"),l(),e(7,`
66              `),l(),e(8,`
67            `),l(),e(9,`
68            `),a(10,"div",13),e(11,`
69              `),a(12,"div",4),e(13,`
70                `),a(14,"p-table",14),e(15,`
71                  `),ve(16,Et,16,0,"ng-template",15),e(17,`
72                  `),ve(18,$t,24,13,"ng-template",16),e(19,`
73                `),l(),e(20,`
74              `),l(),e(21,`
75            `),l(),e(22,`
76          `)),n&2){let o=d();c(14),x("value",o.historicalApplications)("lazy",!0)("paginator",!1)("totalRecords",o.historicalApplications.length)("rows",100)}}function Lt(n,r){n&1&&(e(0,`
77                `),a(1,"a",25),e(2,`
78                  Apply for Financial Aid
79                `),l(),e(3,`
80              `)),n&2&&(c(),x("routerLink",M(1,_t)))}var xt=(()=>{let r=class r{constructor(t,i,s,p){this.siteDataService=t,this.financialAidService=i,this.router=s,this.route=p,this.unsubscribe$=new W,this.ClubCreditTypes=lt,this.Statuses=Se,this.canApply=!0,this.showNotAcceptingAlert=!1,this.historicalApplications=[]}ngOnInit(){R({applications:this.financialAidService.getClubUserFinancialAidApplications(),form:this.financialAidService.getApplicantForm(),settings:this.siteDataService.getClubFinancialAidSettings()}).pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.applications=t.applications,this.inProgressApp=this.applications?.find(i=>i.clubUserFinancialAidApplicationStatusID===Se.IN_PROGRESS),this.historicalApplications=this.applications?.filter(i=>i.clubUserFinancialAidApplicationStatusID!==Se.IN_PROGRESS)??[],this.settings=t.settings,t.form.experienceType==="new"?(this.canApply=t.form.canApply,t.form.inProgressApplicationID||(this.inProgressApp=void 0),this.showNotAcceptingAlert=!t.form.canApply&&!this.historicalApplications.length,this.applications?.length===0&&(t.form.canApply||t.form.inProgressApplicationID)?this.router.navigate(["./apply"],{relativeTo:this.route}):this.siteDataService.hideSiteLoader()):this.legacyCanApplyCheck()},error:()=>{this.siteDataService.hideSiteLoader(),this.siteDataService.showSiteErrorAlert("There was an error getting your submitted applications.")}})}legacyCanApplyCheck(){R({settings:this.siteDataService.getClubFinancialAidSettings(),canApply:this.financialAidService.canClubUserApply()}).pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.canApply=t.canApply,this.settings=t.settings,this.canApply&&this.settings.windowStartDate&&!(this.getWindowStartDate(new Date(this.settings.windowStartDate))<=new Date&&this.getWindowEndDate(new Date(this.settings.windowStartDate),new Date(this.settings.windowEndDate))>=new Date)?this.financialAidService.clubUserHasWindowOpen().pipe(A(this.unsubscribe$)).subscribe({next:i=>{this.canApply=i,this.finishLegacyLoading()},error:()=>this.siteDataService.showSiteErrorAlert("There was an error getting data.")}):this.finishLegacyLoading()},error:()=>this.siteDataService.showSiteErrorAlert("There was an error getting data.")})}finishLegacyLoading(){this.applications?.length>0||!this.canApply?this.siteDataService.hideSiteLoader():this.canApply&&this.router.navigate(["./apply"],{relativeTo:this.route})}getWindowStartDate(t){return new Date(new Date().getFullYear(),t.getMonth(),t.getDate())>new Date?new Date(new Date().getFullYear()-1,t.getMonth(),t.getDate()):new Date(new Date().getFullYear(),t.getMonth(),t.getDate())}getWindowEndDate(t,i){return t.getMonth()<=i.getMonth()?new Date(new Date().getFullYear(),t.getMonth(),t.getDate())>new Date?new Date(new Date().getFullYear()-1,i.getMonth(),i.getDate(),23,59,59):new Date(new Date().getFullYear(),i.getMonth(),i.getDate(),23,59,59):new Date(new Date().getFullYear(),t.getMonth(),t.getDate())>new Date?new Date(new Date().getFullYear(),i.getMonth(),i.getDate(),23,59,59):new Date(new Date().getFullYear()+1,i.getMonth(),i.getDate(),23,59,59)}ngOnDestroy(){this.unsubscribe$.next(null),this.unsubscribe$.complete()}};r.\u0275fac=function(i){return new(i||r)(F(z),F(N),F(O),F(k))},r.\u0275cmp=U({type:r,selectors:[["app-financial-aid-search"]],standalone:!1,decls:43,vars:7,consts:[[1,"container-fluid","mb
80-3"],[1,"row"],[1,"col-lg-8","offset-lg-2"],[1,"row","section-header"],[1,"col-lg-12"],[1,"row","no-gutters","mt-3"],[1,"col-md-6"],[1,"btn","btn-naked","btn-icon-home","pull-right",3,"routerLink"],[1,"col-lg-12",3,"innerHTML"],[1,"row","section-content","mb-4"],["alertType","info",3,"isInline"],[1,"btn","btn-sm","btn-primary","ml-3",3,"routerLink"],["alertType","warning",3,"isInline"],[1,"row","section-content"],[1,"table","table-striped","table-sm",3,"value","lazy","paginator","totalRecords","rows"],["pTemplate","header"],["pTemplate","body"],[2,"width","15%"],[2,"width","20%"],[1,"financial-aid-status",3,"ngClass"],[2,"width","25%"],[2,"width","40%"],[1,"fas","fa-check",3,"ngClass"],[1,"d-flex","mb-1","align-items-center"],[1,"mr-3"],[1,"btn","btn-primary","btn-icon-plus-circle",3,"routerLink"]],template:function(i,s){i&1&&(a(0,"main"),e(1,`
81
82  `),a(2,"div",0),e(3,`
83    `),a(4,"div",1),e(5,`
84      `),a(6,"div",2),e(7,`
85        `),a(8,"section"),e(9,`
86          `),a(10,"div",3),e(11,`
87            `),a(12,"div",4),e(13,`
88              `),a(14,"h2"),e(15,"Financial Aid Applications"),l(),e(16,`
89            `),l(),e(17,`
90          `),l(),e(18,`
91          `),a(19,"div",3),e(20,`
92            `),u(21,bt,5,3),l(),e(22,`
93
94          `),u(23,wt,13,3),u(24,It,10,1),u(25,Bt,23,5),a(26,"div",5),e(27,`
95            `),a(28,"div",6),e(29,`
96              `),u(30,Lt,4,2),l(),e(31,`
97            `),a(32,"div",6),e(33,`
98              `),a(34,"a",7),e(35,`
99                Return to Homepage
100              `),l(),e(36,`
101            `),l(),e(37,`
102          `),l(),e(38,`
103        `),l(),e(39,`
104
105      `),l(),e(40,`
106    `),l(),e(41,`
107  `),l(),e(42,`
108`),l()),i&2&&(c(21),_(s.settings!=null&&s.settings.financialAidPageText?21:-1),c(2),_(s.inProgressApp?23:-1),c(),_(s.showNotAcceptingAlert?24:-1),c(),_(s.historicalApplications.length?25:-1),c(5),_(s.canApply&&!s.inProgressApp?30:-1),c(4),x("routerLink",M(6,vt)))},dependencies:[Ue,K,je,ue,nt,Oe,J,ot],styles:[".financial-aid-status[_ngcontent-%COMP%]{font-size:var(--text-medium);text-transform:uppercase}.approved[_ngcontent-%COMP%]{color:var(--success)}.denied[_ngcontent-%COMP%]{color:var(--warning)}"]});let n=r;return n})();var jt=["mainForm"],Yt=["amountForm"],Wt=["dependentForm"],ft=()=>[".."],Qt=()=>["/dashboard"],Gt=()=>({"min-width":"600px"});function Kt(n,r){n&1&&(e(0,`
109                  `),a(1,"h3"),e(2,"About Your Dependents"),l(),e(3,`
110                `))}function Jt(n,r){if(n&1&&(e(0,`
111                  `),a(1,"h3"),e(2),l(),e(3,`
112                `)),n&2){let o=d(2);c(2),w(`
113                    `,o.settings.dependentsTitleText,`
114                  `)}}function Xt(n,r){if(n&1&&(e(0,`
115                  `),a(1,"p",33),e(2,`
116                  `),l(),e(3,`
117                `)),n&2){let o=d(2);c(),x("innerHtml",o.settings.dependentsDescriptionText,T)}}function Zt(n,r){n&1&&(e(0,`
118                  `),a(1,"p",34),e(2,`
119                    Please add all dependents, age 19 or younger, who live in your home and
120                    were
121                    submitted on your tax return. To include an older dependent child, they
122                    must be a
123                    full-time student age 24 or younger.
124                  `),l(),e(3,`
125                `))}function ei(n,r){if(n&1){let o=v();e(0,`
126                        `),a(1,"tr"),e(2,`
127                          `),a(3,"td",36),e(4),l(),e(5,`
128                          `),a(6,"td",37),e(7),b(8,"date"),l(),e(9,`
129                          `),a(10,"td",38),e(11),b(12,"uppercase"),l(),e(13,`
130                          `),a(14,"td",38),e(15),b(16,"uppercase"),l(),e(17,`
131                          `),a(18,"td",36),e(19,`
132                            `),a(20,"button",39),D("click",function(){let i=C(o).$index,s=d(3);return S(s.openDependentModal(i))}),e(21,`
133                              `),h(22,"i",40),e(23,`
134                              Edit
135                            `),l(),e(24,`
136                            `),a(25,"button",39),D("click",function(){let i=C(o).$index,s=d(3);return S(s.removeDependent(i))}),e(26,`
137                              `),h(27,"i",41),e(28,`
138                              Remove
139                            `),l(),e(29,`
140                          `),l(),e(30,`
141                        `),l(),e(31,`
142                      `)}if(n&2){let o=r.$implicit;c(4),w(`
143                            `,o.fullName,`
144                          `),c(3),g(E(8,4,o.dob)),c(4),w(`
145                            `,E(12,6,o.isCurrentPlayer?"yes":"no"),`
146                          `),c(4),w(`
147                            `,E(16,8,o.isFullTimeStudent?"yes":"no"),`
148                          `)}}function ti(n,r){if(n&1&&(e(0,`
149                  `),a(1,"table",35),e(2,`
150                    `),a(3,"thead"),e(4,`
151                      `),a(5,"tr"),e(6,`
152                        `),a(7,"th",36),e(8,"Dependent Name"),l(),e(9,`
153                        `),a(10,"th",37),e(11,"Dependent Date of Birth"),l(),e(12,`
154                        `),a(13,"th",38),e(14,"Current Player"),l(),e(15,`
155                        `),a(16,"th",38),e(17,"Full Time Student"),l(),e(18,`
156                        `),a(19,"th",36),e(20,"Actions"),l(),e(21,`
157                      `),l(),e(22,`
158                    `),l(),e(23,`
159                    `),a(24,"tbody"),e(25,`
160                      `),$(26,ei,32,10,null,null,ae),l(),e(28,`
161                  `),l(),e(29,`
162                `)),n&2){let o=d(2);c(26),B(o.application.dependents)}}function ii(n,r){n&1&&(e(0,`
163                `),e(1,`
164                `),a(2,"p-message",42),e(3,`
165                  
166                    `),a(4,"div",3),e(5,`
167                      `),a(6,"div",43),e(7,`
168                        `),a(8,"div",44),e(9,`
169                          `),h(10,"span",45),e(11,`
170                        `),l(),e(12,`
171                        `),a(13,"div",46),e(14,`
172                          `),a(15,"div",43),e(16,`
173                            `),a(17,"div",47),e(18,`
174                              Please add your dependents
175                            `),l(),e(19,`
176                          `),l(),e(20,`
177                        `),l(),e(21,`
178                      `),l(),e(22,`
179                    `),l(),e(23,`
180                  
181                `),l(),e(24,`
182              `)),n&2&&(c(2),x("closable",!1))}function ni(n,r){n&1&&(e(0,`
183                `),a(1,"h3"),e(2,"Required Documents"),l(),e(3,`
184              `))}function oi(n,r){if(n&1&&(e(0,`
185                `),a(1,"h3"),e(2),l(),e(3,`
186              `)),n&2){let o=d(2);c(2),w(`
187                  `,o.settings.requiredDocumentsTitleText,`
188                `)}}function ai(n,r){if(n&1&&(e(0,`
189                  `),a(1,"div",48),e(2,`
190                  `),l(),e(3,`
191                `)),n&2){let o=d(2);c(),x("innerHtml",o.settings.requiredDocumentsDescriptionText,T)}}function li(n,r){n&1&&(e(0,`
192                  `),a(1,"p"),e(2,`
193                    Please provide any relevant documents i.e. `),a(3,"a",49),e(4,`1040 tax
194                  form(s)`),l(),e(5,`,
195                  free/reduced school lunch. `),a(6,"strong"),e(7,`At least one document is
196                required.`),l(),e(8,`
197              `),l(),e(9,`
198              `),a(10,"p"),e(11,`Financial Aid applications cannot be evaluated without financial
199              documentation`),l(),e(12,`
200            `))}function ri(n,r){n&1&&(e(0,`
201            `),e(1,`
202            `),a(2,"p-message",42),e(3,`
203              
204                `),a(4,"div",3),e(5,`
205                  `),a(6,"div",43),e(7,`
206                    `),a(8,"div",44),e(9,`
207                      `),h(10,"span",45),e(11,`
208                    `),l(),e(12,`
209                    `),a(13,"div",46),e(14,`
210                      `),a(15,"div",43),e(16,`
211                        `),a(17,"div",47),e(18,`
212                          Please add at least one file
213                        `),l(),e(19,`
214                      `),l(),e(20,`
215                    `),l(),e(21,`
216                  `),l(),e(22,`
217                `),l(),e(23,`
218            `),l(),e(24,`
219          `)),n&2&&(c(2),x("closable",!1))}function si(n,r){if(n&1&&(e(0,`
220          `),a(1,"section",21),e(2,`
221            `),a(3,"h3"),e(4,"Requested Amount"),l(),e(5,`
222            `),a(6,"app-dynamic-form",50,1),e(8,`
223              `),a(9,"app-dynamic-form-field",51),e(10,`
224              `),l(),e(11,`
225            `),l(),e(12,`
226          `),l(),e(13,`
227        `)),n&2){let o=d(2);c(6),x("entity",o.application)("fields",o.amountFormFields)("contentFieldsMode",!0)("horizontalForm",!0)("showSubmitButton",!1)("showCancelButton",!1)}}function ci(n,r){n&1&&(e(0,`
228              `),a(1,"a",52),e(2,`
229                View Submitted Applications
230              `),l(),e(3,`
231            `)),n&2&&(c(),x("routerLink",M(1,ft)))}function di(n,r){n&1&&(e(0,`
232                    `),h(1,"span",54),e(2,`
233                  `))}function pi(n,r){if(n&1){let o=v();e(0,`
234                `),a(1,"button",53),D("click",function(){C(o);let i=d(3);return S(i.submitApplication())}),e(2,`
235                  `),u(3,di,3,0),e(4),l(),e(5,`
236              `)}if(n&2){let o=d(3);c(),Y("btn-disabled",o.saving),x("disabled",o.saving),c(2),_(o.saving?3:-1),c(),w(`
237                  `,o.saving?"Submitting Application...":"Apply",`
238                `)}}function mi(n,r){if(n&1){let o=v();e(0,`
239                `),a(1,"a",55),D("click",function(i){C(o);let s=d(3);return S(s.saving?i.stopPropagation():"")}),e(2,`
240                  Cancel
241                `),l(),e(3,`
242              `)}if(n&2){let o=d(3);c(),Y("btn-disabled",o.saving),x("routerLink",M(3,ft))}}function ui(n,r){n&1&&(e(0,`
243                `),a(1,"a",56),e(2,`
244                  Return to Homepage
245                `),l(),e(3,`
246              `)),n&2&&(c(),x("routerLink",M(1,Qt)))}function _i(n,r){if(n&1&&(e(0,`
247              `),u(1,pi,6,5),u(2,mi,4,4)(3,ui,4,2)),n&2){let o=d(2);c(),_(o.application.clubUserFinancialAidApplicationID?-1:1),c(),_(o.applications&&o.applications.length>0?2:3)}}function xi(n,r){if(n&1){let o=v();e(0,`
248  `),a(1,"main"),e(2,`
249    `),a(3,"div",3),e(4,`
250      `),a(5,"div",4),e(6,`
251        `),a(7,"div",5),e(8,`
252          `),a(9,"div",6),e(10,`
253            `),a(11,"h2"),e(12,"Apply for Financial Aid"),l(),e(13,`
254          `),l(),e(14,`
255          `),a(15,"div",7),e(16,`
256            `),h(17,"p",8),b(18,"safeHtml"),e(19,`
257          `),l(),e(20,`
258          `),a(21,"div",9),e(22,`
259            `),a(23,"section"),e(24,`
260              `),a(25,"h3",10),e(26,"About You"),l(),e(27,`
261              `),a(28,"app-dynamic-form",11,0),e(30,`
262                `),a(31,"app-dynamic-form-field",12),e(32,`
263                `),l(),e(33,`
264                `),a(34,"app-dynamic-form-field",13),e(35,`
265                `),l(),e(36,`
266                `),a(37,"app-dynamic-form-field",14),e(38,`
267                `),l(),e(39,`
268                `),a(40,"app-dynamic-form-field",15),e(41,`
269                `),l(),e(42,`
270                `),a(43,"app-dynamic-form-field",16),e(44,`
271                `),l(),e(45,`
272                `),a(46,"app-dynamic-form-field",17),e(47,`
273                `),l(),e(48,`
274                `),a(49,"app-dynamic-form-field",18),e(50,`
275                `),l(),e(51,`
276                `),a(52,"app-dynamic-form-field",19),e(53,`
277                `),l(),e(54,`
278                `),a(55,"app-dynamic-form-field",20),e(56,`
279                `),l(),e(57,`
280              `),l(),e(58,`
281            `),l(),e(59,`
282            `),a(60,"section",21),e(61,`
283              `),a(62,"div",22),e(63,`
284                `),u(64,Kt,4,0),u(65,Jt,4,1),l(),e(66,`
285              `),a(67,"div",23),e(68,`
286                `),u(69,Xt,4,1),u(70,Zt,4,0),u(71,ti,30,0),l(),e(72,`
287              `),u(73,ii,25,1),a(74,"div",24),e(75,`
288                `),a(76,"button",25),D("click",function(){C(o);let i=d();return S(i.openDependentModal())}),e(77,`
289                  `),h(78,"i",26),e(79,`
290                  Add a Dependent
291                `),l(),e(80,`
292              `),l(),e(81,`
293            `),l(),e(82,`
294            `),a(83,"section",21),e(84,`
295              `),u(85,ni,4,0),u(86,oi,4,1),a(87,"div",27),e(88,`
296                `),u(89,ai,4,1),u(90,li,13,0),a(91,"p"),e(92),l(),e(93,`
297          `),l(),e(94,`
298          `),h(95,"div",27),e(96,`
299          `),u(97,ri,25,1),a(98,"div",28),e(99,`
300            `),a(100,"app-multiple-file-upload",29),D("onChange",function(i){C(o);let s=d();return S(s.onFileChange(i))}),e(101,`
301            `),l(),e(102,`
302          `),l(),e(103,`
303        `),l(),e(104,`
304        `),u(105,si,14,6),a(106,"section",30),e(107,`
305          `),a(108,"div",31),e(109,`
306            `),u(110,ci,4,2),u(111,_i,4,2),a(112,"div",32),e(113,`
307            `),l(),e(114,`
308          `),l(),e(115,`
309        `),l(),e(116,`
310      `),l(),e(117,`
311    `),l(),e(118,`
312  `),l(),e(119,`
313`),l(),e(120,`
314`),l(),e(121,`
315`)}if(n&2){let o=d();c(17),x("innerHTML",E(18,27,o.settings.instructionText),T),c(11),x("entity",o.application)("fields",o.fields)("contentFieldsMode",!0)("horizontalForm",!0)("showSubmitButton",!1)("showCancelButton",!1),c(36),_(o.settings.dependentsTitleText?-1:64),c(),_(o.settings.dependentsTitleText?65:-1),c(4),_(o.settings.dependentsDescriptionText?69:-1),c(),_(o.settings.dependentsDescriptionText?-1:70),c(),_(o.application.dependents!=null&&o.application.dependents.length?71:-1),c(2),_(o.submitButtonClicked&&(!o.application.dependents||o.application.dependents&&o.application.dependents.length===0)?73:-1),c(12),_(o.settings.requiredDocumentsTitleText?-1:85),c(),_(o.settings.requiredDocumentsTitleText?86:-1),c(3),_(o.settings.requiredDocumentsDescriptionText?89:-1),c(),_(o.settings.requiredDocumentsDescriptionText?-1:90),c(2),Ne(`
316              Maximum of `,o.fileLimit,` files allowed. Files must be a maximum of
317              `,o.maxFileSizeMB,` MB in size and be in one of the following formats:
318              `,o.acceptedFileExtensions,`
319            `),c(5),_(o.submitButtonClicked&&(!o.selectedFiles||o.selectedFiles&&o.selectedFiles.length===0)?97:-1),c(3),x("maxFileSize",o.maxFileSize)("maxFileSizeMB",o.maxFileSizeMB)("fileLimit",o.fileLimit),c(5),_(o.settings.enableRequestedAmountField?105:-1),c(5),_(o.application.clubUserFinancialAidApplicationID?110:-1),c(),_(o.application.clubUserFinancialAidApplicationID?-1:111)}}function fi(n,r){if(n&1){let o=v();e(0,`
320      `),a(1,"app-dynamic-form",58,2),D("onCancel",function(){C(o);let i=d(2);return S(i.showDependentForm=!1)})("onSubmit",function(){C(o);let i=d(2);return S(i.saveDependent())}),e(3,`
321        `),h(4,"app-dynamic-form-field",59),e(5,`
322        `),h(6,"app-dynamic-form-field",60),e(7,`
323        `),h(8,"app-dynamic-form-field",61),e(9,`
324        `),h(10,"app-dynamic-form-field",62),e(11,`
325      `),l(),e(12,`
326    `)}if(n&2){let o=d(2);c(),x("fields",o.dependentFields)("entity",o.dependent)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!1)("showSubmitButton",!0)("showCancelButton",!0)}}function hi(n,r){if(n&1){let o=v();e(0,`
327  `),a(1,"p-dialog",57),te("visibleChange",function(i){C(o);let s=d();return ee(s.showDependentForm,i)||(s.showDependentForm=i),S(i)}),e(2,`
328    `),u(3,fi,13,7),l(),e(4,`
329`)}if(n&2){let o=d();c(),Pe(M(8,Gt)),Z("visible",o.showDependentForm),x("header",o.newDependent?"Add a Dependent":"Edit Dependent")("closable",!1)("modal",!0)("draggable",!1),c(2),_(o.showDependentForm?3:-1)}}var ht=(()=>{let r=class r{constructor(t,i,s,p,m,f){this.siteDataService=t,this.financialAidService=i,this.userService=s,this.router=p,this.route=m,this.formService=f,this.unsubscribe$=new W,this.showDependentForm=!1,this.newDependent=!1,this.saving=!1,this.submitButtonClicked=!1,this.selectedFiles=[],this.fileLimit=5,this.maxFileSize=de,this.maxFileSizeMB=ce,this.acceptedFileTypes=Ye,this.acceptedFileExtensions=["jpg","jpeg","png","gif","pdf"].map(y=>"."+y).join(", ")}ngOnInit(){R([this.financialAidService.getClubUserFinancialAidApplicationMetadata(),this.financialAidService.getClubUserFinancialAidApplicationDependentMetadata(),this.financialAidService.getClubUserFinancialAidApplications(),this.userService.getCurrentUserPlayers(),this.siteDataService.getClubFinancialAidSettings(),this.userService.getCurrentUser(),this.userService.getCurrentUserAddress()]).pipe(A(this.unsubscribe$)).subscribe(t=>{this.fields=t[0].fields,this.amountFormFields=[this.fields.find(i=>i.key==="applicationAmount")],this.dependentFields=t[1].fields,this.applications=t[2],this.application=new rt(t[5],t[6]),t[3]&&t[3].length>0&&(this.application.dependents=[],t[3].forEach(i=>{let s=new be;s.fullName=i.user.firstName+" "+i.user.lastName,s.dob=i.user.dob,s.isCurrentPlayer=!0,this.application.dependents.push(s)}
329)),this.settings=t[4],this.siteDataService.hideSiteLoader()})}openDependentModal(t){t!==void 0?(this.currentDependentIndex=t,this.newDependent=!1,this.dependent=this.application.dependents[t]):(this.currentDependentIndex=void 0,this.newDependent=!0,this.dependent=new be),this.showDependentForm=!0}saveDependent(){this.dependentForm.isValid?(this.application.dependents||(this.application.dependents=[]),this.newDependent?this.application.dependents.push(this.dependentForm.value):this.application.dependents[this.currentDependentIndex]=Ie(I(I({},this.application.dependents[this.currentDependentIndex]),this.dependentForm.value),{isCurrentPlayer:this.dependentForm.value.isCurrentPlayer?this.dependentForm.value.isCurrentPlayer:!1}),this.showDependentForm=!1,this.formService.hideFormLoader()):this.dependentForm.submitForm()}removeDependent(t){this.application.dependents.splice(t,1)}submitApplication(){this.submitButtonClicked=!0,this.form.isValid?!this.amountForm||this.amountForm&&this.amountForm.isValid?this.application.dependents&&this.application.dependents.length>0?this.selectedFiles&&this.selectedFiles.length>0&&(this.saving=!0,this.application=I(I({},this.application),this.form.value),this.amountForm&&(this.application=I(I({},this.application),this.amountForm.value)),this.financialAidService.createClubUserFinancialAidApplication(this.application).pipe(Te(t=>{let i=[];return this.selectedFiles.forEach(s=>{i.push(this.financialAidService.createClubUserFinancialAidApplicationDocument(t.clubUserFinancialAidApplicationID,s))}),R(i)}),A(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Your application was submitted successfully. You will be notified once it has been reviewed.",5e3),this.router.navigate([".."],{relativeTo:this.route})},error:()=>{this.siteDataService.showSiteErrorAlert("There was an error submitting your application."),this.saving=!1}})):document.getElementById("btn-add-dependent").focus():this.amountForm&&this.amountForm.submitForm():this.form.submitForm()}onFileChange(t){this.selectedFiles=t.map(i=>i.file)}ngOnDestroy(){this.unsubscribe$.next(null),this.unsubscribe$.complete()}};r.\u0275fac=function(i){return new(i||r)(F(z),F(N),F(pe),F(O),F(k),F(xe))},r.\u0275cmp=U({type:r,selectors:[["app-financial-aid-edit"]],viewQuery:function(i,s){if(i&1&&le(jt,5)(Yt,5)(Wt,5),i&2){let p;H(p=j())&&(s.form=p.first),H(p=j())&&(s.amountForm=p.first),H(p=j())&&(s.dependentForm=p.first)}},standalone:!1,decls:2,vars:2,consts:[["mainForm",""],["amountForm",""],["dependentForm",""],[1,"container"],[1,"row","justify-content-center"],[1,"col-lg-10"],[1,"section-header","mt-3"],[1,"financial-aid-text","section-content"],[3,"innerHTML"],[1,"card","mb-3"],[1,"mb-2","mt-2"],["formID","main-form",3,"entity","fields","contentFieldsMode","horizontalForm","showSubmitButton","showCancelButton"],["fieldName","firstName","formID","main-form"],["fieldName","lastName","formID","main-form"],["fieldName","addressLine1","formID","main-form"],["fieldName","addressLine2","formID","main-form"],["fieldName","city","formID","main-form"],["fieldName","state","formID","main-form"],["fieldName","zip","formID","main-form"],["fieldName","cellPhone","formID","main-form"],["fieldName","email","formID","main-form"],[1,"border-top","mt-4","pt-4"],[1,"section-header"],[1,"section-content"],[1,"add-dependent-button-row","section-content"],["id","btn-add-dependent",1,"btn","mt-0",3,"click"],[1,"fal","fa-plus-circle"],[1,"required-documents-text","section-content"],[1,"documents","section-content"],[3,"onChange","maxFileSize","maxFileSizeMB","fileLimit"],[1,"buttons"],[1,"form-action","no-gutters"],[1,"col","right-buttons"],[1,"mb-3",3,"innerHtml"],[1,"mb-3"],["id","financial-aid-dependents",1,"temp-table"],[2,"width","25%"],[2,"width","20%"],[2,"width","15%"],[1,"btn","mb-1",3,"click"],[1,"fal","fa-pencil"],[1,"fal","fa-times"],["severity","error","styleClass","p-messages-no-times",3,"closable"],[1,"row"],[1,"col-lg-1"],[1,"ui-messages-icon","fa","fa-exclamation-triangle"],[1,"col-lg-11"],[1,"header","col-lg-12"],[3,"innerHtml"],["href","https://www.irs.gov/pub/irs-pdf/f1040.pdf","target","_blank","rel","noopener noreferrer"],["formID","amount-form",3,"entity","fields","contentFieldsMode","horizontalForm","showSubmitButton","showCancelButton"],["fieldName","applicationAmount","formID","amount-form"],[1,"btn","btn-lg","btn-naked",3,"routerLink"],[1,"btn","btn-lg","btn-primary",3,"click","disabled"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"btn","btn-lg","btn-naked","pull-right",3,"click","routerLink"],[1,"btn","btn-lg","btn-icon-home","btn-naked","pull-right",3,"routerLink"],[3,"visibleChange","visible","header","closable","modal","draggable"],["buttonsPosition","left","formID","dependent-form",3,"onCancel","onSubmit","fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","showSubmitButton","showCancelButton"],["fieldName","fullName","formID","dependent-form"],["fieldName","dob","formID","dependent-form"],["fieldName","isCurrentPlayer","formID","dependent-form"],["fieldName","isFullTimeStudent","formID","dependent-form"]],template:function(i,s){i&1&&(u(0,xi,122,29),u(1,hi,5,9)),i&2&&(_(s.application?0:-1),c(),_(s.dependentFields?1:-1))},dependencies:[Ce,he,K,fe,me,it,ke,se,J],styles:[".section-content[_ngcontent-%COMP%]{margin-top:1em}section.buttons[_ngcontent-%COMP%]{margin-top:1em}#financial-aid-dependents[_ngcontent-%COMP%]   td[_ngcontent-%COMP%], #financial-aid-dependents[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{width:25%}.section-header[_ngcontent-%COMP%]{margin-top:0}p[_ngcontent-%COMP%], .horizontal-form[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{font-size:var(--text-medium)}"]}
329);let n=r;return n})();var Ci=["dependentForm"],Si=["sectionDynForm"],Ai=()=>[],Di=(n,r)=>r.sectionID,Fi=(n,r)=>r.sectionFieldID;function vi(n,r){n&1&&(e(0,`
330    `),h(1,"app-loader"),e(2,`
331`))}function yi(n,r){if(n&1&&(e(0,`
332    `),a(1,"app-inline-alert",5),e(2),l(),e(3,`
333`)),n&2){let o=d();c(),x("isInline",!0),c(),g(o.error)}}function gi(n,r){n&1&&(e(0,`
334        `),a(1,"app-inline-alert",6),e(2,"Financial aid applications are not currently open."),l(),e(3,`
335    `)),n&2&&(c(),x("isInline",!0))}function bi(n,r){n&1&&(e(0,`
336        `),a(1,"app-inline-alert",7),e(2,"You have already submitted a financial aid application. Please contact your club if you need to make changes."),l(),e(3,`
337    `)),n&2&&(c(),x("isInline",!0))}function wi(n,r){n&1&&(e(0,`
338        `),a(1,"app-inline-alert",6),e(2,"Financial aid applications are not currently being accepted."),l(),e(3,`
339    `)),n&2&&(c(),x("isInline",!0))}function Ii(n,r){if(n&1&&(e(0,`
340                `),h(1,"div",11),b(2,"safeHtml"),e(3,`
341            `)),n&2){let o=d(3);c(),x("innerHTML",E(2,1,o.settings.financialAidPageText),T)}}function Ei(n,r){if(n&1){let o=v();e(0,`
342        `),a(1,"div",8),e(2,`
343            `),a(3,"div",9),e(4,`
344                `),a(5,"h3"),e(6,"Financial Aid"),l(),e(7,`
345            `),l(),e(8,`
346            `),u(9,Ii,4,3),a(10,"button",10),D("click",function(){C(o);let i=d(2);return S(i.apply())}),e(11,`
347                Apply for Financial Aid
348            `),l(),e(12,`
349        `),l(),e(13,`
350    `)}if(n&2){let o=d(2);c(9),_(o.settings!=null&&o.settings.financialAidPageText?9:-1),c(),x("disabled",o.saving)}}function Ti(n,r){if(n&1&&(e(0,`
351                                    `),h(1,"div",17),b(2,"safeHtml"),e(3,`
352                                `)),n&2){let o=d(2).$implicit;c(),x("innerHTML",E(2,1,o.description),T)}}function Mi(n,r){if(n&1&&(e(0,`
353                                `),a(1,"div",9),e(2,`
354                                    `),a(3,"h3"),e(4),l(),e(5,`
355                                `),l(),e(6,`
356                                `),u(7,Ti,4,3)),n&2){let o=d().$implicit;c(4),g(o.title),c(3),_(o.description?7:-1)}}function Pi(n,r){if(n&1&&(e(0,`
357                                        `),h(1,"div",21),b(2,"safeHtml"),e(3,`
358                                    `)),n&2){let o=d(2).$implicit;c(),x("innerHTML",E(2,1,o.description),T)}}function Ni(n,r){if(n&1){let o=v();e(0,`
359                                        `),a(1,"app-dynamic-form",22,0),D("valueChanges",function(i){C(o);let s=d(2).$implicit,p=d(3);return S(p.onSectionChange(s.sectionID,i))}),e(3,`
360                                        `),l(),e(4,`
361                                    `)}if(n&2){let o=d(2).$implicit,t=d(3);c(),x("fields",t.sectionDynamicFields.get(o.sectionID))("entity",t.sectionInitialValues.get(o.sectionID))("horizontalForm",!0)("showSubmitButton",!1)("showCancelButton",!1)("showSaveAndAddButton",!1)("formID","section-"+o.sectionID)}}function Ri(n,r){if(n&1&&(e(0,`
362                                `),a(1,"div",9),e(2,`
363                                    `),a(3,"h3"),e(4),l(),e(5,`
364                                `),l(),e(6,`
365                                `),a(7,"div",18),e(8,`
366                                    `),u(9,Pi,4,3),u(10,Ni,5,7),a(11,"p",19),e(12,`
367                                        `),a(13,"small"),e(14,"Need to update your information? "),a(15,"a",20),e(16,"Update your profile"),l()(),e(17,`
368                                    `),l(),e(18,`
369                                `),l(),e(19,`
370                            `)),n&2){let o=d().$implicit,t=d(3);c(4),g(o.title),c(5),_(o.description?9:-1),c(),_(t.sectionDynamicFields.has(o.sectionID)?10:-1)}}function Vi(n,r){if(n&1&&(e(0,`
371                                        `),h(1,"div",21),b(2,"safeHtml"),e(3,`
372                                    `)),n&2){let o=d(2).$implicit;c(),x("innerHTML",E(2,1,o.description),T)}}function $i(n,r){n&1&&(e(0,`
373                                                    `),a(1,"span"),e(2,`
374                                                        `),a(3,"span",27),e(4,"*"),l(),e(5,`
375                                                        `),a(6,"span",28),e(7,"required"),l(),e(8,`
376                                                    `),l(),e(9,`
377                                                `))}function Bi(n,r){if(n&1){let o=v();e(0,`
378                                `),a(1,"div",9),e(2,`
379                                    `),a(3,"h3"),e(4),l(),e(5,`
380                                `),l(),e(6,`
381                                `),a(7,"div",18),e(8,`
382                                    `),u(9,Vi,4,3),a(10,"div",23),e(11,`
383                                        `),a(12,"div",24),e(13,`
384                                            `),a(14,"label"),e(15,`
385                                                `),u(16,$i,10,0),e(17,`
386                                                Select Player(s)
387                                            `),l(),e(18,`
388                                            `),a(19,"div",25),e(20,`
389                                                `),a(21,"p-multiSelect",26),te("ngModelChange",function(i){C(o);let s=d(4);return ee(s.selectedPlayerIDs,i)||(s.selectedPlayerIDs=i),S(i)}),D("onPanelHide",function(){C(o);let i=d(4);return S(i.savePlayerSelections())}),e(22,`
390                                                `),l(),e(23,`
391                                            `),l(),e(24,`
392                                        `),l(),e(25,`
393                                    `),l(),e(26,`
394                                `),l(),e(27,`
395                            `)}if(n&2){let o=d().$implicit,t=d(3);c(4),g(o.title),c(5),_(o.description?9:-1),c(7),_(!(t.playerSection==null||t.playerSection.fields[0]==null)&&t.playerSection.fields[0].isRequired?16:-1),c(5),x("options",t.playerOptions),Z("ngModel",t.selectedPlayerIDs),x("disabled",t.savingPlayers)("maxSelectedLabels",1)("selectedItemsLabel","{0} players selected")("filter",!1)}}function Li(n,r){if(n&1&&(e(0,`
396                                        `),h(1,"div",21),b(2,"safeHtml"),e(3,`
397                                    `)),n&2){let o=d(2).$implicit;c(),x("innerHTML",E(2,1,o.description),T)}}function Ui(n,r){if(n&1){let o=v();e(0,`
398                                                    `),a(1,"tr"),e(2,`
399                                                        `),a(3,"td"),e(4),l(),e(5,`
400                                                        `),a(6,"td"),e(7),b(8,"date"),l(),e(9,`
401                                                        `),a(10,"td"),e(11),l(),e(12,`
402                                                        `),a(13,"td"),e(14),l(),e(15,`
403                                                        `),a(16,"td",32),e(17,`
404                                                            `),a(18,"button",33),D("click",function(){let i=C(o).$index,s=d(6);return S(s.openEditDependent(i))}),e(19,`
405                                                                `),h(20,"i",34),e(21,` Edit
406                                                            `),l(),e(22,`
407                                                            `),a(23,"button",33),D("click",function(){let i=C(o).$index,s=d(6);return S(s.removeDependent(i))}),e(24,`
408                                                                `),h(25,"i",35),e(26,` Remove
409                                                            `),l(),e(27,`
410                                                        `),l(),e(28,`
411                                                    `),l(),e(29,`
412                                                `)}if(n&2){let o=r.$implicit;c(4),g(o.fullName),c(3),g(re(8,4,o.dob,"shortDate")),c(4),g(o.isCurrentPlayer?"Yes":"No"),c(3),g(o.isFullTimeStudent?"Yes":"No")}}function ki(n,r){if(n&1&&(e(0,`
413                                        `),a(1,"table",31),e(2,`
414                                            `),a(3,"thead"),e(4,`
415                                                `),a(5,"tr"),e(6,`
416                                                    `),a(7,"th"),e(8,"Name"),l(),e(9,`
417                                                    `),a(10,"th"),e(11,"Date of Birth"),l(),e(12,`
418                                                    `),a(13,"th"),e(14,"Current Player"),l(),e(15,`
419                                                    `),a(16,"th"),e(17,"Full Time Student"),l(),e(18,`
420                                                    `),h(19,"th"),e(20,`
421                                                `),l(),e(21,`
422                                            `),l(),e(22,`
423                                            `),a(23,"tbody"),e(24,`
424                                                `),$(25,Ui,30,7,null,null,ye),l(),e(27,`
425                                        `),l(),e(28,`
426                                    `)),n&2){let o=d(5);c(25),B(o.dependents)}}function Oi(n,r){if(n&1){let o=v();e(0,`
427                                `),a(1,"div",9),e(2,`
428                                    `),a(3,"h3"),e(4),l(),e(5,`
429                                `),l(),e(6,`
430                                `),a(7,"div",18),e(8,`
431                                    `),u(9,Li,4,3),u(10,ki,29,0),a(11,"button",29),D("click",function(){C(o);let i=d(4);return S(i.openAddDependent())}),e(12,`
432                                        `),h(13,"i",30),e(14,`
433                                        Add Dependent
434                                    `),l(),e(15,`
435                                `),l(),e(16,`
436                            `)}if(n&2){let o=d().$implicit,t=d(3);c(4),g(o.title),c(5),_(o.description?9:-1),c(),_(t.dependents.length>0?10:-1)}}function zi(n,r){if(n&1&&(e(0,`
437                                        `),h(1,"div",21),b(2,"safeHtml"),e(3,`
438                                    `)),n&2){let o=d(2).$implicit;c(),x("innerHTML",E(2,1,o.description),T)}}function qi(n,r){if(n&1){let o=v();e(0,`
439                                `),a(1,"div",9),e(2,`
440                                    `),a(3,"h3"),e(4),l(),e(5,`
441                                `),l(),e(6,`
442                                `),a(7,"div",18),e(8,`
443                                    `),u(9,zi,4,3),a(10,"app-multiple-file-upload",36),D("onSelect",function(i){C(o);let s=d(4);return S(s.onDocumentAdded(i))})("onDownload",function(i){C(o);let s=d(4);return S(s.onDocumentDownload(i))})("onDelete",function(i){C(o);let s=d(4);return S(s.onDocumentDeleted(i))}),e(11,`
444                                    `),l(),e(12,`
445                                `),l(),e(13,`
446                            `)}if(n&2){let o=d().$implicit,t=d(3);c(4),g(o.title),c(5),_(o.description?9:-1),c(),x("fileLimit",5)("infoTextMode","visible")("maxFileSize",t.maxFileSize)("maxFileSizeMB",t.maxFileSizeMB)("acceptedFileTypes",t.acceptedFileTypes)("files",t.documentFiles)}}function Hi(n,r){if(n&1&&(e(0,`
447                                            `),h(1,"div",21),b(2,"safeHtml"),e(3,`
448                                        `)),n&2){let o=d(3).$implicit;c(),x("innerHTML",E(2,1,o.description),T)}}function ji(n,r){n&1&&(e(0,`
449                                                                `),a(1,"span"),e(2,`
450                                                                    `),a(3,"span",27),e(4,"*"),l(),e(5,`
451                                                                    `),a(6,"span",28),e(7,"required"),l(),e(8,`
452                                                                `),l(),e(9,`
453                                                            `))}function Yi(n,r){if(n&1&&(e(0,`
454                                                                `),a(1,"div",39),e(2),l(),e(3,`
455                                                            `)),n&2){let o=d(2).$implicit;c(2),g(o.fieldDescription)}}function Wi(n,r){if(n&1){let o=v();e(0,`
456                                                    `),a(1,"div",24),e(2,`
457                                                        `),a(3,"label"),e(4,`
458                                                            `),u(5,ji,10,0),e(6),u(7,Yi,4,1),l(),e(8,`
459                                                        `),a(9,"app-multiple-file-upload",38),D("onSelect",function(i){C(o);let s=d().$implicit,p=d(6);return S(p.onFieldDocumentAdded(i,s))})("onDownload",function(i){C(o);let s=d(7);return S(s.onDocumentDownload(i))})("onDelete",function(i){C(o);let s=d().$implicit,p=d(6);return S(p.onFieldDocumentDeleted(i,s))}),e(10,`
460                                                        `),l(),e(11,`
461                                                    `),l(),e(12,`
462                                                `)}if(n&2){let o=d().$implicit,t=d(6);c(5),_(o.isRequired?5:-1),c(),w(`
463                                                            `,o.label,`
464                                                            `),c(),_(o.fieldDescription?7:-1),c(2),x("fileLimit",o.maxFiles??1)("required",o.isRequired)("infoTextMode","tooltip")("maxFileSize",t.maxFileSize)("maxFileSizeMB",t.maxFileSizeMB)("acceptedFileTypes",t.acceptedFileTypes)("files",t.fieldDocuments.get(o.sectionFieldID))}}function Qi(n,r){if(n&1&&(e(0,`
465                                                    `),a(1,"app-dynamic-form-field",40),e(2,`
466                                                    `),l(),e(3,`
467                                                `)),n&2){let o=d().$implicit;d();let t=$e(10),i=d(5);c(),x("fieldName",i.controlNameFor(o))("formID",t)}}function Gi(n,r){if(n&1&&(e(0,`
468                                                `),u(1,Wi,13,10)(2,Qi,4,2)),n&2){let o=r.$implicit,t=d(6);c(),_(o.clubFinancialAidFieldTypeID===t.FieldType.DOCUMENT?1:o.dynamicFormFieldTypeID!==null&&o.dynamicFormFieldTypeID!==void 0?2:-1)}}function Ki(n,r){if(n&1){let o=v();e(0,`
469                                    `),a(1,"div",9),e(2,`
470                                        `),a(3,"h3"),e(4),l(),e(5,`
471                                    `),l(),e(6,`
472                                    `),a(7,"div",18),e(8,`
473                                        `),u(9,Hi,4,3),Re(10),e(11,`
474                                        `),a(12,"app-dynamic-form",37,0),D("valueChanges",function(i){C(o);let s=d(2).$implicit,p=d(3);return S(p.onSectionChange(s.sectionID,i))}),e(14,`
475                                            `),$(15,Gi,3,1,null,null,Fi),l(),e(17,`
476                                    `),l(),e(18,`
477                                `)}if(n&2){let o=d(2).$implicit,t=d(3);c(4),g(o.title),c(5),_(o.description?9:-1),c();let i=Ve("section-"+o.sectionID);c(2),x("fields",t.sectionDynamicFields.get(o.sectionID)??M(11,Ai))("entity",t.sectionInitialValues.get(o.sectionID))("horizontalForm",!0)("showSubmitButton",!1)("showCancelButton",!1)("showSaveAndAddButton",!1)("contentFieldsMode",!0)("formID",i),c(3),B(o.fields)}}function Ji(n,r){if(n&1&&(e(0,`
478                                `),u(1,Ki,19,12)),n&2){let o=d().$implicit,t=d(3);c(),_(t.sectionDynamicFields.has(o.sectionID)||t.documentFields(o).length>0?1:-1)}}function Xi(n,r){if(n&1&&(e(0,`
479                    `),a(1,"section"),e(2,`
480
481                        `),u(3,Mi,8,2)(4,Ri,20,3)(5,Bi,28,9)(6,Oi,17,3)(7,qi,14,8)(8,Ji,2,1),e(9,`
482                    `),l(),e(10,`
483                `)),n&2){let o,t=r.$implicit,i=r.$index,s=d(3);c(),Y("border-top",i!==0)("mt-4",i!==0)("pt-4",i!==0),c(2),_((o=t.sectionTypeID)===s.SectionType.INTRODUCTION?3:o===s.SectionType.APPLICANT_INFO?4:o===s.SectionType.PLAYER_INFO?5:o===s.SectionType.HOUSEHOLD_INFO?6:o===s.SectionType.REQUIRED_DOCUMENTS?7:8)}}function Zi(n,r){if(n&1&&(e(0,`
484                                `),a(1,"li"),e(2),l(),e(3,`
485                            `)),n&2){let o=r.$implicit;c(2),g(o)}}function en(n,r){if(n&1&&(e(0,`
486                    `),a(1,"app-inline-alert",41),e(2,`
487                        `),a(3,"ul",42),e(4,`
488                            `),$(5,Zi,4,1,null,null,ye),l(),e(7,`
489                    `),l(),e(8,`
490                `)),n&2){let o=d(3);c(),x("isInline",!0),c(4),B(o.submitErrors)}}function tn(n,r){n&1&&(e(0,`
491                            `),h(1,"i",43),e(2,`
492                        `))}function nn(n,r){n&1&&(e(0,`
493                            `),h(1,"i",43),e(2,`
494                        `))}function on(n,r){if(n&1){let o=v();e(0,`
495        `),a(1,"div",12),e(2,`
496            `),a(3,"div",13),e(4,`
497                `),$(5,Xi,11,7,null,null,Di),l(),e(7,`
498
499            `),a(8,"section",14),e(9,`
500                `),u(10,en,9,1),a(11,"div",15),e(12,`
501                    `),a(13,"button",10),D("click",function(){C(o);let i=d(2);return S(i.submit())}),e(14,`
502                        `),u(15,tn,3,0),e(16),l(),e(17,`
503                    `),a(18,"button",16),D("click",function(){C(o);let i=d(2);return S(i.saveDraft())}),e(19,`
504                        `),u(20,nn,3,0),e(21),l(),e(22,`
505                `),l(),e(23,`
506            `),l(),e(24,`
507        `),l(),e(25,`
508    `)}if(n&2){let o=d(2);c(5),B(o.form.sections),c(5),_(o.submitErrors.length>0?10:-1),c(3),Y("btn-disabled",o.saving),x("disabled",o.saving),c(2),_(o.saving?15:-1),c(),w(`
509                        `,o.saving?"Submitting...":"Submit Application",`
510                    `),c(2),Y("btn-disabled",o.saving),x("disabled",o.saving),c(2),_(o.saving?20:-1),c(),w(`
511                        `,o.saving?"Saving...":"Save Draft",`
512                    `)}}function an(n,r){if(n&1&&(e(0,`
513
514    `),u(1,gi,4,1)(2,bi,4,1)(3,wi,4,1)(4,Ei,14,2)(5,on,26,11)),n&2){let o=d();c(),_(o.form.isEnabled?o.form.hasPendingSubmission?2:!o.form.canApply&&!o.form.inProgressApplicationID&&!o.activeApplicationID?3:!o.activeApplicationID&&o.form.canApply?4:5:1)}}function ln(n,r){if(n&1){let o=v();e(0,`
515            `),a(1,"app-dynamic-form",45,1),D("onCancel",function(){C(o);let i=d(2);return S(i.showDependentForm=!1)})("onSubmit",function(){C(o);let i=d(2);return S(i.saveDependent())}),e(3,`
516                `),h(4,"app-dynamic-form-field",46),e(5,`
517                `),h(6,"app-dynamic-form-field",47),e(7,`
518                `),h(8,"app-dynamic-form-field",48),e(9,`
519                `),h(10,"app-dynamic-form-field",49),e(11,`
520            `),l(),e(12,`
521        `)}if(n&2){let o=d(2);c(),x("fields",o.dependentFields)("entity",o.dependent)("horizontalForm",!0)("contentFieldsMode",!0)("showSaveAndAddButton",!1)("showSubmitButton",!0)("showCancelButton",!0)}}function rn(n,r){if(n&1){let o=v();e(0,`
522    `),a(1,"p-dialog",44),te("visibleChange",function(i){C(o);let s=d();return ee(s.showDependentForm,i)||(s.showDependentForm=i),S(i)}),e(2,`
523        `),u(3,ln,13,7),l(),e(4,`
524`)}if(n&2){let o=d();c(),x("header",o.editingDependentIndex!==null?"Edit Dependent":"Add Dependent"),Z("visible",o.showDependentForm),x("modal",!0)("draggable",!1)("closable",!1),c(2),_(o.showDependentForm?3:-1)}}var Ct=(()=>{let r=class r{constructor(t,i,s,p,m,f){this.financialAidService=t,this.userService=i,this.siteDataService=s,this.router=p,this.route=m,this.formService=f,this.unsubscribe$=new W,this.sectionDynamicFields=new Map,this.sectionResponses=new Map,this.sectionInitialValues=new Map,this.fieldDocuments=new Map,this.players=[],this.playerOptions=[],this.selectedPlayerIDs=[],this.savingPlayers=!1,this.savedPlayerIDs=[],this.dependents=[],this.documentFiles=[],this.documentIDMap=new Map,this.fieldByControlName=new Map,this.showDependentForm=!1,this.editingDependentIndex=null,this.activeApplicationID=null,this.loading=!0,this.saving=!1,this.error=null,this.submitErrors=[],this.maxFileSize=de,this.maxFileSizeMB=ce,this.acceptedFileTypes=["jpg","jpeg","png","gif","pdf"],this.SectionType=dt,this.FieldType=P}ngOnInit(){R({form:this.financialAidService.getApplicantForm(),dependentMeta:this.financialAidService.getClubUserFinancialAidApplicationDependentMetadata(),settings:this.siteDataService.getClubFinancialAidSettings()}).pipe(A(this.unsubscribe$)).subscribe({next:({form:t,dependentMeta:i,settings:s})=>{if(this.form=t,this.dependentFields=i.fields,this.settings=s,!this.form.isEnabled){this.loading=!1,this.siteDataService.hideSiteLoader();return}this.playerSection=this.form.sections.find(m=>m.sectionTypeID===this.SectionType.PLAYER_INFO);for(let m of this.form.sections){let f=this.toDynamicFields(m.fields);f.length>0&&(this.sectionDynamicFields.set(m.sectionID,f),this.sectionResponses.set(m.sectionID,{}),this.sectionInitialValues.set(m.sectionID,{}));for(let y of m.fields)this.fieldByControlName.set(this.controlNameFor(y),y),y.clubFinancialAidFieldTypeID===P.DOCUMENT&&m.sectionTypeID===this.SectionType.CUSTOM&&this.fieldDocuments.set(y.sectionFieldID,[])}let p=this.form.sections.find(m=>m.sectionTypeID===this.SectionType.APPLICANT_INFO);if(p&&this.sectionDynamicFields.has(p.sectionID)){let m={};for(let f of p.fields)f.currentValue!==null&&f.currentValue!==void 0&&(m[this.controlNameFor(f)]=f.currentValue);this.sectionInitialValues.set(p.sectionID,m),this.sectionResponses.set(p.sectionID,I({},m))}t.inProgressApplicationID?(this.activeApplicationID=t.inProgressApplicationID,this.loadApplicationData()):(this.loading=!1,this.siteDataService.hide
524SiteLoader())},error:t=>{this.error=this.errorMessage(t,"There was an error loading the financial aid form."),this.loading=!1,this.siteDataService.hideSiteLoader()}})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}loadApplicationData(){R([this.userService.getCurrentUserPlayers(),this.financialAidService.getFinancialAidApplicationDocuments(this.activeApplicationID),this.financialAidService.getApplicationPlayers(this.activeApplicationID),this.financialAidService.getApplicationDependents(this.activeApplicationID),this.financialAidService.getDraftResponses(this.activeApplicationID)]).pipe(Me(([t,i,s,p,m])=>(t=t??[],p=p??[],t.length===0||p.length>0?ie({players:t,documents:i,playerIDs:s,dependents:p,savedResponses:m}):this.financialAidService.addApplicationDependents(this.activeApplicationID,t.map(f=>({fullName:`${f.user.firstName} ${f.user.lastName}`,dob:f.user.dob,isCurrentPlayer:!0,isFullTimeStudent:!1}))).pipe(Q(f=>({players:t,documents:i,playerIDs:s,dependents:f,savedResponses:m}))))),A(this.unsubscribe$)).subscribe({next:({players:t,documents:i,playerIDs:s,dependents:p,savedResponses:m})=>{this.players=t,this.playerOptions=this.players.map(f=>({label:f.fullName||`${f.user?.firstName} ${f.user?.lastName}`,value:f.playerID})),this.selectedPlayerIDs=s??[],this.savedPlayerIDs=[...this.selectedPlayerIDs],this.dependents=p,this.documentFiles=[];for(let f of i??[]){let y=new Je;y.uploadedDocumentName=f.uploadedDocumentName,y.internalDocumentName=f.internalDocumentName,y.isUploaded=!0,this.documentIDMap.set(f.internalDocumentName,f.clubUserFinancialAidApplicationDocumentID),f.clubFinancialAidSectionFieldID&&this.fieldDocuments.has(f.clubFinancialAidSectionFieldID)?this.fieldDocuments.get(f.clubFinancialAidSectionFieldID).push(y):this.documentFiles.push(y)}this.populateSavedResponses(m),this.loading=!1,this.siteDataService.hideSiteLoader()},error:t=>{this.error=this.errorMessage(t,"There was an error loading your application."),this.loading=!1,this.siteDataService.hideSiteLoader()}})}populateSavedResponses(t){if(!t?.fieldResponses?.length&&(t?.requestedAmount===null||t?.requestedAmount===void 0))return;let i=new Map;for(let p of this.form.sections)for(let m of p.fields)i.set(this.controlNameFor(m),p.sectionID);let s=new Map;for(let p of t.fieldResponses){let m=this.controlNameFor(p),f=i.get(m);if(f==null||!this.sectionResponses.has(f))continue;s.has(f)||s.set(f,{});let y=this.fieldByControlName.get(m),L=this.parseResponseValue(y,p.value);y?.options?.length&&!y.options.some(Dt=>Dt.value===L)||(s.get(f)[m]=L)}for(let[p,m]of s)this.sectionResponses.set(p,I(I({},this.sectionResponses.get(p)),m)),this.sectionInitialValues.set(p,I(I({},this.sectionInitialValues.get(p)),m));if(t.requestedAmount!==null&&t.requestedAmount!==void 0&&this.requestedAmountSection){let p=this.requestedAmountSection.sectionID;if(this.sectionResponses.has(p)){let m={requestedAmount:String(t.requestedAmount)};this.sectionResponses.set(p,m),this.sectionInitialValues.set(p,m)}}}onSectionChange(t,i){this.sectionResponses.set(t,i)}apply(){this.saving=!0,this.financialAidService.createApplication(this.form.clubFinancialAidApplicationID).pipe(A(this.unsubscribe$)).subscribe({next:t=>{this.activeApplicationID=t.clubUserFinancialAidApplicationID,this.saving=!1,this.loading=!0,this.loadApplicationData()},error:t=>{this.siteDataService.showSiteErrorAlert(this.errorMessage(t,"There was an error starting your application.")),this.saving=!1}})}savePlayerSelections(){if(this.savingPlayers)return;let t=this.savedPlayerIDs,i=this.selectedPlayerIDs;i.length===t.length&&i.every(p=>t.includes(p))||(this.savingPlayers=!0,this.financialAidService.setApplicationPlayers(this.activeApplicationID,i).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.savedPlayerIDs=[...i],this.savingPlayers=!1,this.siteDataService.showSiteSuccessAlert("Player selections saved.")},error:p=>{this.selectedPlayerIDs=[...t],this.savingPlayers=!1,this.siteDataService.showSiteErrorAlert(this.errorMessage(p,"There was an error saving your player selections."))}}))}onDocumentAdded(t){this.activeApplicationID&&this.financialAidService.createFinancialAidApplicationDocument(this.activeApplicationID,t.file).pipe(A(this.unsubscribe$)).subscribe({next:i=>{t.internalDocumentName=i.internalDocumentName,t.isUploaded=!0,this.documentIDMap.set(i.internalDocumentName,i.clubUserFinancialAidApplicationDocumentID),this.siteDataService.showSiteSuccessAlert("Document uploaded.")},error:i=>{let s=this.documentFiles.indexOf(t);s!==-1&&this.documentFiles.splice(s,1),this.siteDataService.showSiteErrorAlert(this.errorMessage(i,"There was an error uploading your document."))}})}onFieldDocumentAdded(t,i){this.activeApplicationID&&this.financialAidService.createFinancialAidApplicationDocument(this.activeApplicationID,t.file,i.sectionFieldID).pipe(A(this.unsubscribe$)).subscribe({next:s=>{t.internalDocumentName=s.internalDocumentName,t.isUploaded=!0,this.documentIDMap.set(s.internalDocumentName,s.clubUserFinancialAidApplicationDocumentID),this.siteDataService.showSiteSuccessAlert("Document uploaded.")},error:s=>{let p=this.fieldDocuments.get(i.sectionFieldID)??[],m=p.indexOf(t);m!==-1&&p.splice(m,1),this.siteDataService.showSiteErrorAlert(this.errorMessage(s,"There was an error uploading your document."))}})}onFieldDocumentDeleted(t,i){let s=this.documentIDMap.get(t.internalDocumentName);s&&this.financialAidService.deleteFinancialAidApplicationDocument(this.activeApplicationID,s).pipe(A(this.unsubscribe$)).subscribe({next:()=>{let p=this.fieldDocuments.get(i.sectionFieldID)??[];this.fieldDocuments.set(i.sectionFieldID,p.filter(m=>m!==t)),this.documentIDMap.delete(t.internalDocumentName),this.siteDataService.showSiteSuccessAlert("Document removed.")},error:p=>this.siteDataService.showSiteErrorAlert(this.errorMessage(p,"There was an error deleting your document."))})}onDocumentDownload(t){let i=this.documentIDMap.get(t.internalDocumentName);i&&this.financialAidService.downloadFinancialAidApplicationDocument(this.activeApplicationID,i).pipe(A(this.unsubscribe$)).subscribe({next:s=>We(s),error:s=>this.siteDataService.showSiteErrorAlert(this.errorMessage(s,"There was an error downloading your document."))})}onDocumentDeleted(t){let i=this.documentIDMap.get(t.internalDocumentName);i&&this.financialAidService.deleteFinancialAidApplicationDocument(this.activeApplicationID,i).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.documentFiles=this.documentFiles.filter(s=>s!==t),this.documentIDMap.delete(t.internalDocumentName),this.siteDataService.showSiteSuccessAlert("Document removed.")},error:s=>this.siteDataService.showSiteErrorAlert(this.errorMessage(s,"There was an error deleting your document."))})}openAddDependent(){this.dependent=new ct,this.editingDependentIndex=null,this.showDependentForm=!0}openEditDependent(t){this.dependent=I({},this.dependents[t]),this.editingDependentIndex=t,this.showDependentForm=!0}saveDependent(){if(!this.dependentForm.isValid){this.dependentForm.submitForm(
524);return}let t=this.dependentForm.value;if(this.editingDependentIndex!==null){let i=this.dependents[this.editingDependentIndex],s=I(I({},i),t);this.financialAidService.updateApplicationDependent(this.activeApplicationID,i.clubUserFinancialAidApplicationDependentID,s).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.dependents[this.editingDependentIndex]=s,this.formService.hideFormLoader(),this.showDependentForm=!1,this.siteDataService.showSiteSuccessAlert("Dependent updated.")},error:p=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert(this.errorMessage(p,"There was an error saving the dependent."))}})}else this.financialAidService.addApplicationDependent(this.activeApplicationID,t).pipe(A(this.unsubscribe$)).subscribe({next:i=>{this.dependents.push(i),this.formService.hideFormLoader(),this.showDependentForm=!1,this.siteDataService.showSiteSuccessAlert("Dependent added.")},error:i=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert(this.errorMessage(i,"There was an error saving the dependent."))}})}removeDependent(t){let i=this.dependents[t];this.financialAidService.removeApplicationDependent(this.activeApplicationID,i.clubUserFinancialAidApplicationDependentID).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.dependents.splice(t,1),this.siteDataService.showSiteSuccessAlert("Dependent removed.")},error:s=>this.siteDataService.showSiteErrorAlert(this.errorMessage(s,"There was an error removing the dependent."))})}saveDraft(){this.activeApplicationID&&(this.syncSectionResponsesFromForms(),this.saving=!0,this.financialAidService.saveDraftApplication(this.activeApplicationID,this.buildRequest()).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.saving=!1,this.siteDataService.showSiteSuccessAlert("Draft saved.")},error:t=>{this.saving=!1,this.siteDataService.showSiteErrorAlert(this.errorMessage(t,"There was a problem saving your draft. Please try again."))}}))}toDynamicFields(t){return t.filter(i=>i.dynamicFormFieldTypeID!==null&&i.dynamicFormFieldTypeID!==void 0&&i.clubFinancialAidFieldTypeID!==P.DOCUMENT).map((i,s)=>{let p=new et({key:this.controlNameFor(i),controlName:this.controlNameFor(i),label:i.label,note:i.fieldDescription||void 0,required:i.isRequired,order:s,dynamicFormFieldTypeID:i.dynamicFormFieldTypeID,dynamicFormFieldTextBoxTypeID:this.toTextBoxType(i),isCurrency:i.clubFinancialAidFieldTypeID===P.CURRENCY,maxLength:i.maxLength||void 0,options:i.options?.length?i.options.map(m=>({label:m.label,value:m.value})):void 0,value:i.currentValue??null,validators:this.buildValidators(i)});return i.clubFinancialAidFieldTypeID===P.DATE&&(p.validators=p.validators.filter(m=>m.validatorType!==_e.DATE)),p})}controlNameFor(t){return t.fieldKey||`field_${t.sectionFieldID}`}toTextBoxType(t){return t.clubFinancialAidFieldTypeID===P.CURRENCY?null:t.clubFinancialAidFieldTypeID===P.DATE&&t.dateFormat===X.YEAR?Ze.YEAR_PICKER:t.dynamicFormFieldTextBoxTypeID}buildValidators(t){let i=[];return t.clubFinancialAidFieldTypeID===P.CURRENCY&&i.push({validatorType:_e.CURRENCY}),t.maxLength&&i.push({validatorType:_e.MAX_LENGTH,values:[t.maxLength]}),i}documentFields(t){return t.sectionTypeID!==this.SectionType.CUSTOM?[]:t.fields.filter(i=>i.clubFinancialAidFieldTypeID===P.DOCUMENT)}submit(){if(!this.activeApplicationID)return;if(this.syncSectionResponsesFromForms(),this.submitErrors=[],this.playerSection&&this.playerSection.fields[0]?.isRequired&&this.selectedPlayerIDs.length===0&&this.submitErrors.push("Please select at least one player."),this.form.sections.find(s=>s.sectionTypeID===this.SectionType.REQUIRED_DOCUMENTS)&&this.documentFiles.length===0&&this.submitErrors.push("Please upload at least one required document."),this.requestedAmountSection&&this.sectionDynamicFields.has(this.requestedAmountSection.sectionID)){let s=this.sectionResponses.get(this.requestedAmountSection.sectionID)?.requestedAmount;(s==null||s==="")&&this.submitErrors.push("Please enter a requested amount.")}let i=new Set([this.SectionType.INTRODUCTION,this.SectionType.APPLICANT_INFO,this.SectionType.PLAYER_INFO,this.SectionType.HOUSEHOLD_INFO,this.SectionType.REQUIRED_DOCUMENTS,this.SectionType.REQUESTED_AMOUNT]);for(let s of this.form.sections){if(i.has(s.sectionTypeID))continue;let p=this.sectionResponses.get(s.sectionID)??{};for(let m of this.sectionDynamicFields.get(s.sectionID)??[])m.required&&(p[m.key]===null||p[m.key]===void 0||p[m.key]==="")&&this.submitErrors.push(`${m.label} is required.`);for(let m of this.documentFields(s))m.isRequired&&(this.fieldDocuments.get(m.sectionFieldID)??[]).length===0&&this.submitErrors.push(`${m.label} requires an uploaded document.`)}this.submitErrors.length>0||(this.saving=!0,this.financialAidService.submitApplication(this.activeApplicationID,this.buildRequest()).pipe(A(this.unsubscribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("Your application has been submitted."),this.router.navigate(["../"],{relativeTo:this.route})},error:s=>{this.siteDataService.showSiteErrorAlert(this.errorMessage(s,"There was an error submitting your application.")),this.saving=!1}}))}
524syncSectionResponsesFromForms(){this.sectionDynForms.forEach(t=>{if(!t.value||!t.formID)return;let i=Number(t.formID.replace("section-",""));isNaN(i)||this.sectionResponses.set(i,t.value)})}errorMessage(t,i){let s=t?.error;return typeof s=="string"&&s?s:i}buildRequest(){let t=[],i=this.requestedAmountSection?.sectionID;for(let[p,m]of this.sectionResponses)if(p!==i)for(let[f,y]of Object.entries(m)){let L=this.fieldByControlName.get(f);t.push({sectionFieldID:L&&!L.fieldKey?L.sectionFieldID:void 0,fieldKey:L?.fieldKey??f,value:this.formatResponseValue(L,y)})}let s=new st;return s.fieldResponses=t,s.requestedAmount=parseFloat(this.sectionResponses.get(i)?.requestedAmount)||null,s}parseResponseValue(t,i){if(!i||t?.clubFinancialAidFieldTypeID!==P.DATE)return i;switch(t.dateFormat){case X.MONTH_YEAR:{let[s,p]=i.split("/"),m=parseInt(s,10)-1,f=parseInt(p,10);return isNaN(m)||isNaN(f)?i:new Date(f,m,1)}case X.YEAR:{let s=parseInt(i,10);return isNaN(s)?i:new Date(s,0,1)}default:return new Date(i)}}formatResponseValue(t,i){if(i==null)return"";if(i instanceof Date){let s=String(i.getMonth()+1).padStart(2,"0"),p=String(i.getDate()).padStart(2,"0"),m=i.getFullYear();switch(t?.dateFormat){case X.YEAR:return String(m);case X.MONTH_YEAR:return`${s}/${m}`;default:return`${s}/${p}/${m}`}}return String(i)}get requestedAmountSection(){return this.form?.sections.find(t=>t.sectionTypeID===this.SectionType.REQUESTED_AMOUNT)}};r.\u0275fac=function(i){return new(i||r)(F(N),F(pe),F(z),F(O),F(k),F(xe))},r.\u0275cmp=U({type:r,selectors:[["app-financial-aid-apply"]],viewQuery:function(i,s){if(i&1&&le(Ci,5)(Si,5),i&2){let p;H(p=j())&&(s.dependentForm=p.first),H(p=j())&&(s.sectionDynForms=p)}},standalone:!1,decls:16,vars:4,consts:[["sectionDynForm",""],["dependentForm",""],[1,"container"],[1,"row","justify-content-center"],[1,"col-lg-10"],["alertType","error",3,"isInline"],["alertType","warning",3,"isInline"],["alertType","info",3,"isInline"],[1,"card","mt-4","p-4"],[1,"section-header"],[1,"btn","btn-lg","btn-primary",3,"click","disabled"],[1,"mb-3",3,"innerHTML"],[1,"financial-aid-apply"],[1,"card","mb-3"],[1,"buttons"],[1,"form-action","no-gutters"],[1,"btn","btn-lg","btn-naked","pull-right",3,"click","disabled"],[1,"section-content",3,"innerHTML"],[1,"section-content"],[1,"text-muted","mt-2"],["routerLink","/account/manage/profile"],[3,"innerHTML"],[3,"valueChanges","fields","entity","horizontalForm","showSubmitButton","showCancelButton","showSaveAndAddButton","formID"],[1,"horizontal-form"],[1,"form-group"],[1,"form-dropdown","flex-fill"],["styleClass","full-width","optionLabel","label","optionValue","value","placeholder","Select players","appendTo","body",3,"ngModelChange","onPanelHide","options","ngModel","disabled","maxSelectedLabels","selectedItemsLabel","filter"],["aria-hidden","true",1,"required-asterisk"],[1,"sr-only"],[1,"btn","mt-3",3,"click"],[1,"fal","fa-plus-circle"],[1,"table"],[1,"text-right"],[1,"btn","mb-1",3,"click"],[1,"fal","fa-pencil"],[1,"fal","fa-times"],[3,"onSelect","onDownload","onDelete","fileLimit","infoTextMode","maxFileSize","maxFileSizeMB","acceptedFileTypes","files"],[3,"valueChanges","fields","entity","horizontalForm","showSubmitButton","showCancelButton","showSaveAndAddButton","contentFieldsMode","formID"],[3,"onSelect","onDownload","onDelete","fileLimit","required","infoTextMode","maxFileSize","maxFileSizeMB","acceptedFileTypes","files"],[1,"text-muted","text-small","mt-1"],[3,"fieldName","formID"],["alertType","error",1,"d-block","mb-3",3,"isInline"],[1,"mb-0","pl-3"],[1,"fa","fa-spinner","fa-spin","mr-1"],["styleClass","standardWidthDialog",3,"visibleChange","header","visible","modal","draggable","closable"],["buttonsPosition","left","formID","dependent-form",3,"onCancel","onSubmit","fields","entity","horizontalForm","contentFieldsMode","showSaveAndAddButton","showSubmitButton","showCancelButton"],["fieldName","fullName","formID","dependent-form"],["fieldName","dob","formID","dependent-form"],["fieldName","isCurrentPlayer","formID","dependent-form"],["fieldName","isFullTimeStudent","formID","dependent-form"]],template:function(i,s){i&1&&(u(0,vi,3,0),a(1,"main"),e(2,`
525`),a(3,"div",2),e(4,`
526`),a(5,"div",3),e(6,`
527`),a(7,"div",4),e(8,`
528
529`),u(9,yi,4,2),u(10,an,6,1),u(11,rn,5,6),l(),e(12,`
530`),l(),e(13,`
531`),l(),e(14,`
532`),l(),e(15,`
533`)),i&2&&(_(s.loading?0:-1),c(9),_(s.error?9:-1),c(),_(!s.loading&&s.form?10:-1),c(),_(s.dependentFields?11:-1))},dependencies:[Ce,he,ze,qe,Xe,K,fe,ue,me,tt,se,J],encapsulation:2});let n=r;return n})();var Fe=(()=>
533{let r=class r{constructor(t,i,s,p){this.authorize=t,this.router=i,this.route=s,this.financialAidService=p}canActivate(){return this.financialAidService.canClubUserApply().pipe(Q(t=>t?!0:(this.router.navigate(["/financial-aid-applications"]),!1)))}};r.\u0275fac=function(i){return new(i||r)(V(Qe),V(O),V(k),V(N))},r.\u0275prov=G({token:r,factory:r.\u0275fac});let n=r;return n})();var St=(()=>{let r=class r{constructor(t){this.siteDataService=t}canMatch(){return this.siteDataService.getClubSettings().pipe(Q(t=>t?.clubOptions?.find(i=>i.optionID===Ke.ENABLE_NEW_FINANCIAL_AID_EXPERIENCE)?.boolValue??!1),Ee(()=>ie(!1)))}};r.\u0275fac=function(i){return new(i||r)(V(z))},r.\u0275prov=G({token:r,factory:r.\u0275fac,providedIn:"root"});let n=r;return n})();var At=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({imports:[ge.forChild([{path:"",component:pt,children:[{path:"",component:xt},{path:"apply",canMatch:[St],component:Ct},{path:"apply",canActivate:[Fe],component:ht},{path:"**",redirectTo:"error/not-found"}]}]),ge]});let n=r;return n})();var Ho=(()=>{let r=class r{};r.\u0275fac=function(i){return new(i||r)},r.\u0275mod=oe({type:r}),r.\u0275inj=ne({providers:[N,Fe],imports:[at,At]});let n=r;return n})();export{Ho as FinancialAidModule};

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.