PageSourceSearch

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

js midlandsoccerclub.com collected 2026-10-09 22:41:42 UTC 125,255 bytes, 851 lines download raw bytes

1import{b as lt}from"./chunk-GXCJ5QS4.js";import{g as mi,j as rt}from"./chunk-22ACI5KU.js";import{a as di,b as ci}from"./chunk-FSUBAQYH.js";import{a as si}from"./chunk-7CVCGK4Q.js";import{a as xe}from"./chunk-B6LCWWQX.js";import{a as qe}from"./chunk-B6XXRKU5.js";import{c as at}from"./chunk-RW2MVE4O.js";import{e as ri,g as oi}from"./chunk-H4PCL6BZ.js";import{a as Ye}from"./chunk-NXTJBJRP.js";import{a as kt}from"./chunk-U22BTVEZ.js";import{$b as te,Bb as Ut,Ce as ii,Ec as He,Ef as V,Ff as ni,Gb as W,Gc as ze,Hc as We,Hd as $,Ia as Vt,Lf as Pe,Mb as Be,Ob as Yt,Od as Xt,Rc as Gt,Rd as Zt,Sc as $e,Tb as Bt,Ub as Ht,Uc as qt,Wc as ie,Xc as Jt,Zc as Qt,ah as ai,b as Ne,be as Ge,ca as Mt,cc as zt,d as ye,e as vt,ea as j,fa as nt,h as St,hc as Wt,id as je,jb as Lt,jc as $t,k as fe,kd as ne,kh as li,l as Pt,lc as jt,mb as Ue,pe as Kt,qe as ei,ua as Ce,xb as Rt,y as wt,ye as ti,z as Dt}from"./chunk-X5J6QTCG.js";import{$ as ht,$a as p,Aa as Te,Bf as ve,Db as le,E as q,Eb as Ie,Fa as s,Fb as re,Gb as oe,Hg as Nt,Ib as e,Jb as S,Jf as It,Ka as g,Kb as I,Lb as ue,Lc as he,Lf as Ve,Ma as w,Mb as Ct,Na as _t,Ni as ee,Pf as ce,Qb as E,Rb as T,Sa as k,Sb as F,Se as it,Sh as K,T as mt,Th as Se,U as v,Vc as gt,W as pt,Wc as bt,Xa as J,Yc as Ae,_ as ut,ba as yt,bb as u,be as Me,bg as Le,cc as H,d as M,db as U,dc as se,di as Re,eb as Y,ec as xt,fa as h,fb as B,fi as Ot,fj as D,ga as y,gb as m,hb as l,ib as r,jb as _,k as G,kf as _e,lc as O,ma as N,mc as Z,nb as Q,nc as z,ob as X,pj as A,q as be,qb as C,qc as de,ra as ft,sb as f,tb as c,te as Ft,u as R,ue as ke,vd as Et,xb as Fe,yb as me,yd as Oe,zb as pe,zd as Tt,zg as At}from"./chunk-SMW7PHYX.js";import{a as Ee}from"./chunk-BMIYOSOG.js";var Si=()=>({"max-width":"650px","max-height":"500px"});function Pi(a,d){a&1&&(e(0,`
2      `),l(1,"span",7),e(2,"Player profile found"),r(),e(3,`
3    `))}function wi(a,d){a&1&&(e(0,`
4        `),l(1,"strong"),e(2,"A player matching the information you entered already exists in Sprocket Sports"),r(),e(3,`
5      `))}function Di(a,d){a&1&&(e(0,`
6        `),l(1,"strong"),e(2,"This player already exists in our system and cannot be added to your household at this time"),r(),e(3,`
7      `))}function Ei(a,d){a&1&&(e(0,`
8        `),l(1,"p",8),e(2,`To prevent duplicate player records, you'll need access to the existing profile instead of
9          creating a new one.`),r(),e(3,`
10        `),l(4,"p",8),e(5,`If you're unable to obtain access or still need further help, please contact Sprocket Sports
11          Support.`),r(),e(6,`
12      `))}function Ti(a,d){a&1&&(e(0,`
13        `),l(1,"p",8),e(2,`If this player should be associated with your account, please contact Sprocket Sports
14          Support.`),r(),e(3,`
15      `))}function Fi(a,d){if(a&1){let t=C();e(0,`
16            `),l(1,"button",10),f("click",function(){h(t);let n=c(3);return y(n.confirm.emit())}),e(2,"Save Anyway"),r(),e(3,`
17          `)}}function Ii(a,d){if(a&1){let t=C();e(0,`
18      `),l(1,"app-dialog-footer"),e(2,`
19        `),Q(3,9),e(4,`
20            `),l(5,"button",10),f("click",function(){h(t);let n=c(2);return y(n.cancel.emit())}),e(6,"Close"),r(),e(7,`
21        `),X(),e(8,`
22        `),Q(9,11),e(10,`
23          `),p(11,Fi,4,0),X(),e(12,`
24      `),r(),e(13,`
25    `)}if(a&2){let t=c(2);s(11),u(t.isImpersonating?11:-1)}}function Ai(a,d){if(a&1&&(e(0,`
26  `),l(1,"p-dialog",2),e(2,`
27    `),k(3,Pi,4,0,"ng-template",null,0,de),e(5,`
28    `),l(6,"app-inline-alert",3),e(7,`
29      `),p(8,wi,4,0)(9,Di,4,0),r(),e(10,`
30    `),l(11,"div",4),e(12,`
31      `),p(13,Ei,7,0)(14,Ti,4,0),l(15,"p",5),e(16,"Email: "),l(17,"a",6),e(18,"[email protected]"),r()(),e(19,`
32    `),r(),e(20,`
33    `),k(21,Ii,14,1,"ng-template",null,1,de),e(23,`
34  `),r(),e(24,`
35`)),a&2){let t=c();s(),oe(H(11,Si)),m("visible",!!(t.duplicates!=null&&t.duplicates.length))("showHeader",!0)("closable",!1)("modal",!0)("draggable",!1),s(5),m("isInline",!0),s(2),u(t.isSameFamily?8:9),s(5),u(t.isSameFamily?13:14),s(4),m("href",t.mailtoHref,Te)}}var Ni="[email protected]",pi=(()=>{let d=class d{constructor(i,n){this.sessionService=i,this.clubService=n,this.cancel=ne
35w N,this.confirm=new N,this.isImpersonating=!1,this.unsubscribe$=new M}ngOnInit(){R([this.sessionService.getSessionSettings(),this.clubService.getCurrentClub()]).pipe(v(this.unsubscribe$)).subscribe({next:i=>{this.isImpersonating=i[0].isImpersonating,this.club=i[1]}})}get isSameFamily(){return this.duplicates?.some(i=>i.isSameFamily)??!1}get mailtoHref(){let i=`${this.enteredPlayer?.firstName??""} ${this.enteredPlayer?.lastName??""}`.trim(),n=`Duplicate player profile \u2014 ${i}`,o=[i?`Player: ${i}`:null,this.enteredPlayer?.dob?`DOB: ${this.enteredPlayer.dob}`:null,this.club?.name?`Club: ${this.club.name}`:null,`Scenario: ${this.isSameFamily?"existing household owner":"different household"}`].filter(x=>!!x).join(`
36`);return`mailto:${Ni}?subject=${encodeURIComponent(n)}&body=${encodeURIComponent(o)}`}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(kt),g(Ye))},d.\u0275cmp=w({type:d,selectors:[["app-duplicate-player-warning"]],inputs:{duplicates:"duplicates",enteredPlayer:"enteredPlayer"},outputs:{cancel:"cancel",confirm:"confirm"},standalone:!1,decls:1,vars:1,consts:[["header",""],["footer",""],[3,"visible","showHeader","closable","modal","draggable"],["alertType","warning",3,"isInline"],[1,"mt-3"],[1,"mb-0"],["target","_blank","rel","noopener noreferrer",3,"href"],[1,"fw-600"],[1,"mb-2"],["slot","secondary"],[1,"btn",3,"click"],["slot","primary"]],template:function(n,o){n&1&&p(0,Ai,25,12),n&2&&u(o.club?0:-1)},dependencies:[Be,$e,W],encapsulation:2});let a=d;return a})();var Mi=["form"];function ki(a,d){if(a&1){let t=C();e(0,`
37            `),l(1,"div",7),e(2,`
38                `),l(3,"div",8),e(4,`
39                    `),l(5,"div",9),e(6,`
40                        `),l(7,"div",10),e(8,`
41                            `),l(9,"span",11),e(10),r(),e(11,`
42                        `),r(),e(12,`
43                        `),l(13,"div",12),e(14,`
44                            `),l(15,"button",13),f("click",function(){let n=h(t).$implicit,o=c(3);return o.addingExistingPlayer=!0,y(o.addPlayerToClub(n.userID))}),e(16),r(),e(17,`
45                        `),r(),e(18,`
46                    `),r(),e(19,`
47                `),r(),e(20,`
48            `),r(),e(21,`
49            `)}if(a&2){let t=d.$implicit,i=c(3);s(10),S(t.fullName),s(5),m("disabled",i.addingExistingPlayer),s(),S(i.saveButtonText||"Add")}}function Vi(a,d){if(a&1&&(e(0,`
50`),l(1,"div",2),e(2,`
51    `),l(3,"div",3),e(4,`
52        `),l(5,"div",4),e(6,"Add Existing Player"),r(),e(7,`
53        `),l(8,"div",5),e(9,`
54            `),Y(10,ki,22,3,null,null,U),r(),e(12,`
55    `),r(),e(13,`
56`),r(),e(14,`
57`),l(15,"div",6),e(16,"or"),r(),e(17,`
58`)),a&2){let t=c(2);s(10),B(t.outsidePlayers)}}function Li(a,d){if(a&1){let t=C();e(0,`
59    `),l(1,"button",15),f("click",function(){h(t);let n=c(3);return y(n.cancel.emit())}),e(2,"Cancel"),r(),e(3,`
60    `)}}function Ri(a,d){if(a&1){let t=C();e(0,`
61`),l(1,"div"),e(2,`
62    `),l(3,"button",14),f("click",function(){h(t);let n=c(2);return y(n.showAddPlayersForm=!0)}),e(4,"Add new player"),r(),e(5,`
63    `),p(6,Li,4,0),r(),e(7,`
64`)}if(a&2){let t=c(2);s(6),u(t.showCancelButton?6:-1)}}function Ui(a,d){if(a&1){let t=C();e(0,`
65        `),l(1,"app-dynamic-form-field",25),f("onChange",function(){h(t);let n=c(4);return y(n.showAddPlayerLoginStep())}),e(2,`
66        `),r(),e(3,`
67        `)}if(a&2){let t=c(4);s(),m("styleClass",t.horizontalForm?"":"d-inline-block col-12 pl-0")}}function Yi(a,d){if(a&1&&(e(0,`
68        `),l(1,"app-dynamic-form-field",26),e(2,`
69        `),r(),e(3,`
70        `)),a&2){let t=c(4);s(),m("styleClass",t.horizontalForm?"":"d-block col-6 pl-0")}}function Bi(a,d){if(a&1){let t=C();e(0,`
71        `),l(1,"div",27),e(2,`
72            `),l(3,"div",10),e(4,`
73                `),l(5,"div",28),e(6,"Allow player to log into this account?"),r(),e(7,`
74                `),l(8,"p"),e(9,`Would you like to invite this player to log into your account? The player will only be able to
75                    see limited information like calendars, team information and messages from their coaches.`),r(),e(10,`
76                `),l(11,"p"),e(12,`Check the box below to send an invitation to your player. They will receive an email and will
77                    need to setup a login and will then be able to login to the website and the mobile application.
78                    Note: only players who are over the age of 13 will be able to log into the site`),r(),e(13,`
79                `),l(14,"div",29),e(15,`
80                    `),l(16,"div",30),e(17,`
81                        `),l(18,"p-checkbox",31),F("ngModelChange",function(n){h(t);let o=c(4);return T(o.invitePlayer,n)||(o.invitePlayer=n),y(n)}),e(19,`
82                        `),r(),e(20,`
83                    `),r(),e(21,`
84                    `),l(22,"div",32),e(23,`
85                        Yes, allow this player to create their own login for our account
86                    `),r(),e(24,`
87                `),r(),e(25,`
88            `),r(),e(26,`
89        `),r(),e(27,`
90        `)}if(a&2){let t=c(4);s(18),m("binary",!0),E("ngModel",t.invitePlayer)}}function Hi(a,d){if(a&1){let t=C();e(0,`
91    `),l(1,"app-dynamic-form",16,1),f("onSubmit",function(n){h(t);let o=c(3);return y(o.onFormSubmit(n))})("onCancel",function(){h(t);let n=c(3);return y(n.cancel.emit())}),e(3,`
92        `),l(4,"app-dynamic-form-field",17),e(5,`
93        `),r(),e(6,`
94        `),l(7,"app-dynamic-form-field",18),e(8,`
95        `),r(),e(9,`
96        `),_(10,"app-dynamic-form-field",19),e(11,`
97        `),_(12,"app-dynamic-form-field",20),e(13,`
98        `),l(14,"app-dynamic-form-field",21),f("onChange",function(n){h(t);let o=c(3);return y(o.showAddPlayerLoginStep(n))}),e(15,`
99        `),r(),e(16,`
100        `),l(17,"app-dynamic-form-field",22),e(18,`
101        `),r(),e(19,`
102        `),l(20,"app-dynamic-form-field",23),e(21,`
103        `),r(),e(22,`
104        `),l(23,"app-dynamic-form-field",24),e(24,`
105        `),r(),e(25,`
106        `),p(26,Ui,4,1),p(27,Yi,4,1),p(28,Bi,28,2),r(),e(29,`
107    `)}if(a&2){let t=c(3);
107s(),m("fields",t.fields)("contentFieldsMode",!0)("horizontalForm",t.horizontalForm)("showCancelButton",!0)("showSubmitButton",!0)("submitButtonText",t.saveButtonText||"Save")("buttonsPosition",t.horizontalForm?"left":"spread")("showCancelButton",t.showCancelButton)("entity",t.player),s(3),m("styleClass",t.createFromClubUser?t.horizontalForm?"":"d-block col-12 pl-0":t.horizontalForm?"":"d-inline-block col-6 pl-0"),s(3),m("styleClass",t.createFromClubUser?t.horizontalForm?"":"d-block col-12 pl-0":t.horizontalForm?"":"d-inline-block col-6 pl-0"),s(3),m("styleClass",t.horizontalForm?"":"d-inline-block col-6 pl-0"),s(2),m("styleClass",t.horizontalForm?"":"d-inline-block col-6 pl-0"),s(2),m("styleClass",t.horizontalForm?"":"d-block col-12 pl-0"),s(3),m("styleClass",t.horizontalForm?"":"d-block col-6 pl-0"),s(3),m("styleClass",t.horizontalForm?"":"d-block col-6 pl-0"),s(3),m("styleClass",t.horizontalForm?"":"d-block col-6 pl-0"),s(3),u(t.clubUserID?-1:26),s(),u(t.clubUserID?-1:27),s(),u(t.showAddPlayerLogin&&t.allowAddPlayerLogin?28:-1)}}function zi(a,d){if(a&1&&(e(0,`
108`),l(1,"div",null,0),e(3,`
109    `),p(4,Hi,30,20),r(),e(5,`
110`)),a&2){let t=c(2);s(4),u(t.fields?4:-1)}}function Wi(a,d){if(a&1&&(e(0,`
111`),p(1,Vi,18,0),p(2,Ri,8,1),p(3,zi,6,1)),a&2){let t=c();s(),u(t.haveNonClubPlayers&&!t.showAddPlayersForm?1:-1),s(),u(t.haveNonClubPlayers&&!t.showAddPlayersForm?2:-1),s(),u(!t.haveNonClubPlayers||t.showAddPlayersForm?3:-1)}}function $i(a,d){a&1&&(e(0,`
112`),_(1,"app-skeleton-template",33),e(2,`
113`))}function ji(a,d){if(a&1){let t=C();e(0,`
114`),l(1,"app-duplicate-player-warning",34),f("cancel",function(){h(t);let n=c();return y(n.closeDuplicateModal())})("confirm",function(){h(t);let n=c();return y(n.saveAnyway())}),e(2,`
115`),r(),e(3,`
116`)}if(a&2){let t=c();s(),m("duplicates",t.duplicates)("enteredPlayer",t.duplicateCheckPlayer)}}function Gi(a,d){if(a&1){let t=C();e(0,`
117`),l(1,"app-yes-no-modal",35),f("onYesSelect",function(){h(t);let n=c();return y(n.confirmSelfAdd())})("onNoSelect",function(){h(t);let n=c();return y(n.declineSelfAdd())}),e(2,`
118    `),l(3,"div",36),e(4,`
119        `),l(5,"app-inline-alert",37),e(6,`
120            Are you trying to add yourself as a player at this club?
121        `),r(),e(7,`
122    `),r(),e(8,`
123`),r(),e(9,`
124`)}a&2&&(s(),m("showModalText",!1),s(4),m("isInline",!0))}var kl=(()=>{let d=class d{constructor(i,n,o,x){this.playerService=i,this.formService=n,this.userService=o,this.siteDataService=x,this.unsubscribe$=new M,this.showDuplicates=!1,this.showAddPlayersForm=!1,this.haveNonClubPlayers=!1,this.invitePlayer=!1,this.addingExistingPlayer=!1,this.bypassDuplicatePlayer=!1,this.showPlayerIsClubUser=!1,this.adultPlayerAgeGate=it,this.horizontalForm=!0,this.showCancelButton=!0,this.guest=!1,this.createFromClubUser=!1,this.add=new N,this.cancel=new N,this.loading=!0,this.showAddPlayerLogin=!1,this.allowAddPlayerLogin=!1}ngOnInit(){this.siteDataService.getClubOptions([ee.ADULT_PLAYER_ACCOUNT_CREATION_AGE]).pipe(v(this.unsubscribe$)).subscribe({next:i=>{let n=i?.find(o=>o.optionID===ee.ADULT_PLAYER_ACCOUNT_CREATION_AGE)?.numericValue;this.adultPlayerAgeGate=n??it},error:()=>{}}),R({players:!this.guest&&!this.createFromClubUser?this.userService.getNotInFamilyPlayers(this.clubUserID):G(null),metadata:this.playerService.getPlayerCreateMetadata(),clubDataMetadata:this.playerService.getPlayerClubDataMetadata(),yearlyClubDataMetadata:this.playerService.getPlayerYearlyClubDataMetadata()}).subscribe(i=>{this.guest||(this.outsidePlayers=i.players),this.fields=i.metadata.fields,this.createFromClubUser&&["firstName","lastName"].forEach(o=>{let x=this.fields.find(b=>b.controlName===o);x&&(x.viewOnly=!0,x.value=this.player?.[o])}),i.clubDataMetadata.fields.find(o=>o.controlName==="graduationYear")?.required&&this.fields.push(i.clubDataMetadata.fields.find(o=>o.controlName==="graduationYear"));let n=i.yearlyClubDataMetadata.fields.find(o=>o.controlName==="gradeID");if(n?.required){this.fields.push(n);let o=new Date,x=o.getMonth()<6?o.getFullYear()-1:o.getFullYear();this.gradeEffectiveDate=`${x}-07-01`}this.loading=!1,this.outsidePlayers&&this.outsidePlayers.length>0&&(this.haveNonClubPlayers=!0,this.showAddPlayersForm=!1)})}save$(i){return i.email===""&&(i.email=void 0),this.createFromClubUser&&(i.firstName=i.firstName??this.player?.firstName,i.lastName=i.lastName??this.player?.lastName),this.playerService.createPlayer(this.clubUserID,i,this.guest,this.createFromClubUser)}
124save(i){this.save$(i).pipe(v(this.unsubscribe$),q(n=>this.fields.some(o=>o.controlName==="graduationYear")?this.playerService.savePlayerClubData(n.playerID,i,!1).pipe(be(()=>n)):G(n)),q(n=>this.saveGradeIfNeeded$(n.playerID,i).pipe(be(()=>n)))).subscribe({next:n=>{this.formService.hideFormLoader(),this.siteDataService.showSiteSuccessAlert("Player created successfully"),this.playerService.playerAdded(n),this.bypassDuplicatePlayer=!1,this.userService.loggedInClubUser.user.visitedAddPlayer||(this.userService.loggedInClubUser.user.visitedAddPlayer=!0,this.userService.setUser(this.userService.loggedInClubUser.user)),this.invitePlayer&&i.email&&this.sendPlayerInvitation(n),this.add.emit(n)},error:n=>{this.formService.hideFormLoader();let o=typeof n?.error=="string"?n.error:"There was a problem saving your player.";this.siteDataService.showSiteErrorAlert(o)}})}addPlayerToClub(i){this.playerService.copyPlayerToClub(i).pipe(v(this.unsubscribe$)).subscribe({next:n=>{this.outsidePlayers=this.outsidePlayers.filter(o=>o.userID!==i),this.formService.hideFormLoader(),this.siteDataService.showSiteSuccessAlert("Player added to club successfully"),this.playerService.playerAdded(n),this.add.emit(n),this.addingExistingPlayer=!1},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem adding your player."),this.addingExistingPlayer=!1}})}checkPlayerIsClubUser(i){let n=_e(i.dob);this.userService.loggedInClubUser.user.firstName===i.firstName&&this.userService.loggedInClubUser.user.lastName===i.lastName&&n>=this.adultPlayerAgeGate?(this.showPlayerIsClubUser=!0,this.formPlayer=i):this.checkForDuplicates(i)}onFormSubmit(i){if(!this.bypassDuplicatePlayer&&!this.createFromClubUser){this.checkPlayerIsClubUser(i);return}if(this.createFromClubUser&&_e(i.dob)<this.adultPlayerAgeGate){this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert(`Adult players at this club must be at least ${this.adultPlayerAgeGate} years old.`);return}this.save(i)}confirmSelfAdd(){this.showPlayerIsClubUser=!1,this.createFromClubUser=!0,this.checkForDuplicates(this.formPlayer)}declineSelfAdd(){this.showPlayerIsClubUser=!1,this.checkForDuplicates(this.formPlayer)}checkForDuplicates(i){this.playerService.getDuplicates(i).pipe(q(n=>n&&n.length>0?(this.formService.hideFormLoader(),this.duplicateCheckPlayer=i,this.duplicates=n,this.showDuplicates=!0,G(null)):this.save$(i).pipe(v(this.unsubscribe$),q(o=>this.fields.some(x=>x.controlName==="graduationYear")?this.playerService.savePlayerClubData(o.playerID,i,!1).pipe(be(()=>o)):G(o)),q(o=>this.saveGradeIfNeeded$(o.playerID,i).pipe(be(()=>o))))),v(this.unsubscribe$)).subscribe({next:n=>{n&&(this.formService.hideFormLoader(),this.siteDataService.showSiteSuccessAlert("Player created successfully"),this.playerService.playerAdded(n),this.invitePlayer&&i.email&&this.sendPlayerInvitation(n),this.player=new Ft,this.add.emit(n)),this.bypassDuplicatePlayer=!1},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving your player.")}})}no(){this.save$(this.form.value),this.closeDuplicateModal(),this.formService.showFormLoader()}closeDuplicateModal(){this.duplicates=[],this.showDuplicates=!1}saveAnyway(){this.bypassDuplicatePlayer=!0,this.addPlayersForm.submitForm(),this.closeDuplicateModal()}showAddPlayerLoginStep(i){let n=i??this.form.value?.dob,o=n?_e(n):0;this.showAddPlayerLogin=o>=13&&!!this.form.value?.email,this.showAddPlayerLogin||(this.invitePlayer=!1)}sendPlayerInvitation(i){this.playerService.invitePlayer(i.playerID).subscribe({next:()=>{i.user.invitations.push(new ke),this.siteDataService.showSiteSuccessAlert("Invitation was sent successfully")},error:n=>{let o="There was a problem sending the invitation.";typeof n.error=="string"&&n.error&&(o+=` ${n.error}`),this.siteDataService.showSiteErrorAlert(o)}})}saveGradeIfNeeded$(i,n){if(this.fields.some(o=>o.controlName==="gradeID")&&n.gradeID!=null){let o=new Pe;return o.playerYearlyFieldTypeID=K.Grade,o.numericValue=n.gradeID,o.effectiveDate=new Date(this.gradeEffectiveDate),this.playerService.savePlayerYearlyClubData(i,o,!1)}return G(void 0)}getField(i,n){return i?.find(o=>o.controlName===n)}
124ngOnChanges(i){i.player&&this.createFromClubUser&&this.fields&&["firstName","lastName"].forEach(n=>{let o=this.fields.find(x=>x.controlName===n);o&&(o.value=this.player?.[n])})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(V),g(te),g(Ce),g(A))},d.\u0275cmp=w({type:d,selectors:[["app-add-player"]],viewQuery:function(n,o){if(n&1&&Fe(Mi,5)($,5),n&2){let x;me(x=pe())&&(o.addPlayersForm=x.first),me(x=pe())&&(o.form=x.first)}},inputs:{clubUserID:"clubUserID",saveButtonText:"saveButtonText",player:"player",horizontalForm:"horizontalForm",showCancelButton:"showCancelButton",guest:"guest",createFromClubUser:"createFromClubUser",allowAddPlayerLogin:"allowAddPlayerLogin"},outputs:{add:"add",cancel:"cancel"},standalone:!1,features:[ft],decls:4,vars:4,consts:[["addPlayerForm",""],["form",""],[1,"row","mb-3"],[1,"col-md-12"],[1,"fw-700","mb-0"],[1,"row","my-0"],[1,"ruled-text"],[1,"col-6","mb-3"],[1,"border-all","border-radius","py-2","px-3"],[1,"row","align-items-center"],[1,"col"],[1,"player-header-name"],[1,"col-auto"],[1,"btn","btn-secondary","btn-wrap-ok","btn-sm",3,"click","disabled"],[1,"btn","btn-add",3,"click"],[1,"btn","btn-blank",3,"click"],["formID","player-basic-info-form",3,"onSubmit","onCancel","fields","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","submitButtonText","buttonsPosition","entity"],["fieldName","firstName","formID","player-basic-info-form","autoComplete","off",3,"styleClass"],["fieldName","lastName","formID","player-basic-info-form","autoComplete","off",3,"styleClass"],["fieldName","nickname","formID","player-basic-info-form",3,"styleClass"],["fieldName","middleName","formID","player-basic-info-form",3,"styleClass"],["fieldName","dob","formID","player-basic-info-form",3,"onChange","styleClass"],["fieldName","genderID","formID","player-basic-info-form",3,"styleClass"],["fieldName","graduationYear","formID","player-basic-info-form",3,"styleClass"],["fieldName","gradeID","formID","player-basic-info-form",3,"styleClass"],["fieldName","email","formID","player-basic-info-form","autoComplete","off",3,"onChange","styleClass"],["fieldName","cellPhone","formID","player-basic-info-form","autoComplete","off",3,"styleClass"],[1,"row","no-gutters","border-top","pt-3","mt-3","mb-3"],[1,"text-header-3"],[1,"acknowledgement-row","acknowledgement-checkbox","d-flex","mt-3"],[1,"acknowledgement-chk","mr-3"],[3,"ngModelChange","binary","ngModel"],[1,"acknowledgement-text"],["skeletonType","form-no-buttons"],[3,"cancel","confirm","duplicates","enteredPlayer"],["headerText","Creating Yourself as Player","dialogClass","standardWidthDialog","yesButtonText","Yes","noButtonText","No",3,"onYesSelect","onNoSelect","showModalText"],[1,"text-medium","fw-600"],["alertType","warning",3,"isInline"]],template:function(n,o){n&1&&(p(0,Wi,4,3),p(1,$i,3,0),p(2,ji,4,2),p(3,Gi,10,2)),n&2&&(u(o.loading?-1:0),s(),u(o.loading?1:-1),s(),u(o.showDuplicates?2:-1),s(),u(o.showPlayerIsClubUser?3:-1))},dependencies:[$,ne,ye,fe,ie,Be,ii,zt,pi],encapsulation:2});let a=d;return a})();var P=(function(a){return a[a.ALL=0]="ALL",a[a.PLAYER_DOCUMENT=1]="PLAYER_DOCUMENT",a[a.COMPLETED_WAIVER=2]="COMPLETED_WAIVER",a[a.PLAYER_CARD_PHOTO=3]="PLAYER_CARD_PHOTO",a[a.PLAYER_PROOF_OF_AGE=4]="PLAYER_PROOF_OF_AGE",a[a.PLAYER_PROOF_OF_INSURANCE=5]="PLAYER_PROOF_OF_INSURANCE",a[a.PLAYER_PROOF_OF_COVID_VACCINE=6]="PLAYER_PROOF_OF_COVID_VACCINE",a[a.TRYOUT_PHOTO=7]="TRYOUT_PHOTO",a[a.CUSTOM_PLAYER_DOCUMENT_1=8]="CUSTOM_PLAYER_DOCUMENT_1",a[a.CUSTOM_PLAYER_DOCUMENT_2=9]="CUSTOM_PLAYER_DOCUMENT_2",a[a.CUSTOM_PLAYER_DOCUMENT_3=10]="CUSTOM_PLAYER_DOCUMENT_3",a})(P||{}),qi=(function(a){return a[a.NOT_RECEIVED=1]="NOT_RECEIVED",a[a.PENDING_REVIEW=2]="PENDING_REVIEW",a[a.APPROVED=3]="APPROVED",a[a.REJECTED=4]="REJECTED",a})(qi||{});var Ki=a=>["/waivers",a,"view"],en=()=>({"min-width":"50%"});function tn(a,d){if(a&1){let t=C();e(0,`
125            `),l(1,"div",14),e(2,`
126                `),l(3,"div",15),e(4,`
127                    `),l(5,"div",16),e(6,`
128                        `),l(7,"label"),e(8,"Last Name"),r(),e(9,`
129                        `),l(10,"input",17),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.lastName,n)||(o.playerService.playerFileCabinetSearchFilters.lastName=n),y(n)}),r(),e(11,`
130                    `),r(),e(12,`
131                `),r(),e(13,`
132                `),l(14,"div",15),e(15,`
133                    `),l(16,"div",16),e(17,`
134                        `),l(18,"label"),e(19,"First Name"),r(),e(20,`
135                        `),l(21,"input",18),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.firstName,n)||(o.playerService.playerFileCabinetSearchFilters.firstName=n),y(n)}),r(),e(22,`
136                    `),r(),e(23,`
137                `),r(),e(24,`
138                `),l(25,"div",15),e(26,`
139                    `),l(27,"div",16),e(28,`
140                        `),l(29,"label"),e(30,"Birth Date"),r(),e(31,`
141                        `),l(32,"span",19),e(33,`
142                            `),l(34,"p-inputgroup"),e(35,`
143                                `),l(36,"p-datepicker",20),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.dobFrom,n)||(o.playerService.playerFileCabinetSearchFilters.dobFrom
143=n),y(n)}),r(),e(37,`
144                                `),l(38,"p-inputgroup-addon"),e(39,"to"),r(),e(40,`
145                                `),l(41,"p-datepicker",21),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.dobTo,n)||(o.playerService.playerFileCabinetSearchFilters.dobTo=n),y(n)}),r(),e(42,`
146                            `),r(),e(43,`
147                            `),l(44,"a",22),f("click",function(){h(t);let n=c();return n.playerService.playerFileCabinetSearchFilters.dobFrom=void 0,y(n.playerService.playerFileCabinetSearchFilters.dobTo=void 0)}),e(45,`
148                                `),_(46,"i",23),e(47,`
149                            `),r(),e(48,`
150                        `),r(),e(49,`
151                    `),r(),e(50,`
152                `),r(),e(51,`
153                `),l(52,"div",15),e(53,`
154                    `),l(54,"div",16),e(55,`
155                        `),l(56,"label"),e(57,"Gender"),r(),e(58,`
156                        `),l(59,"p-select",24),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.genderID,n)||(o.playerService.playerFileCabinetSearchFilters.genderID=n),y(n)}),r(),e(60,`
157                    `),r(),e(61,`
158                `),r(),e(62,`
159            `),r(),e(63,`
160        `)}if(a&2){let t=c();s(10),E("ngModel",t.playerService.playerFileCabinetSearchFilters.lastName),s(11),E("ngModel",t.playerService.playerFileCabinetSearchFilters.firstName),s(15),E("ngModel",t.playerService.playerFileCabinetSearchFilters.dobFrom),s(5),E("ngModel",t.playerService.playerFileCabinetSearchFilters.dobTo),s(18),E("ngModel",t.playerService.playerFileCabinetSearchFilters.genderID),m("options",t.genderOptions)}}function nn(a,d){if(a&1){let t=C();e(0,`
161            `),l(1,"div",14),e(2,`
162                `),l(3,"div",25),e(4,`
163                    `),l(5,"div",16),e(6,`
164                        `),l(7,"label"),e(8,"Program"),r(),e(9,`
165                        `),l(10,"p-multiSelect",26),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.programs,n)||(o.playerService.playerFileCabinetSearchFilters.programs=n),y(n)}),r(),e(11,`
166                    `),r(),e(12,`
167                `),r(),e(13,`
168                `),l(14,"div",25),e(15,`
169                    `),l(16,"div",16),e(17,`
170                        `),l(18,"label"),e(19,"Team"),r(),e(20,`
171                        `),l(21,"p-multiSelect",26),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.teams,n)||(o.playerService.playerFileCabinetSearchFilters.teams=n),y(n)}),r(),e(22,`
172                    `),r(),e(23,`
173                `),r(),e(24,`
174                `),l(25,"div",25),e(26,`
175                    `),l(27,"div",16),e(28,`
176                        `),l(29,"label"),e(30,"Test Players"),r(),e(31,`
177                        `),l(32,"p-select",24),F("ngModelChange",function(n){h(t);let o=c();return T(o.playerService.playerFileCabinetSearchFilters.testUserOption,n)||(o.playerService.playerFileCabinetSearchFilters.testUserOption=n),y(n)}),r(),e(33,`
178                    `),r(),e(34,`
179                `),r(),e(35,`
180            `),r(),e(36,`
181        `)}if(a&2){let t=c();s(10),m("autofocusFilter",!0),E("ngModel",t.playerService.playerFileCabinetSearchFilters.programs),m("options",t.playerService.programs)("filter",!0)("showToggleAll",!1)("maxSelectedLabels",0),s(11),m("autofocusFilter",!0),E("ngModel",t.playerService.playerFileCabinetSearchFilters.teams),m("options",t.playerService.teams)("filter",!0)("showToggleAll",!1)("maxSelectedLabels",0),s(11),E("ngModel",t.playerService.playerFileCabinetSearchFilters.testUserOption),m("options",t.testUserOptions)}}function an(a,d){if(a&1){let t=C();e(0,`
182        `),l(1,"button",27),f("click",function(){h(t);let n=c();return y(n.addDocument())}),e(2,`
183            `),_(3,"i",28),e(4,`
184            Upload a File
185        `),r(),e(5,`
186    `)}}function ln(a,d){a&1&&(e(0,`
187                `),_(1,"app-loader"),e(2,`
188            `))}function rn(a,d){if(a&1){let t=C();e(0,`
189        `),l(1,"button",29),f("click",function(){h(t);let n=c();return y(n.downloadPlayerCardPhotos())}),e(2,`
190            `),_(3,"span",30),e(4),p(5,ln,3,0),r(),e(6,`
191    `)}if(a&2){let t=c();s(),re("btn-disabled",t.downloadingFiles),m("disabled",t.downloadingFiles),s(3),I(`
192            `,t.downloadingFiles?"Downloading Files...":"Download Files",`
193            `),s(),u(t.downloadingFiles?5:-1)}}function on(a,d){a&1&&(e(0,`
194        `),l(1,"div"),e(2,"Please note: this process may take a while. Do not refresh the page or navigate away"),r(),e(3,`
195    `))}function sn(a,d){a&1&&(e(0,`
196        `),l(1,"h3"),e(2,"File Cabinet"),r(),e(3,`
197    `))}function dn(a,d){if(a&1&&(e(0,`
198                                    `),_(1,"p-sortIcon",37),e(2,`
199                                `)),a&2){let t=c().$implicit;s(),m("field",t.field)}}function cn(a,d){if(a&1&&(e(0,`
200                            `),l(1,"th",36),e(2),p(3,dn,3,1),r(),e(4,`
201                        `)),a&2){let t=d.$implicit,i=c(3);s(),m("pSortableColumn",t.field),J("aria-label",i.AriaLabels.ACTIVATE_SORT),s(),I(`
202                                `,t.header,`
203                                `),s(),u(t.field?3:-1)}}function mn(a,d){if(a&1&&(e(0,`
204                    `),l(1,"tr"),e(2,`
205                        `),Y(3,cn,5,4,null,null,U),_(5,"th"),e(6,`
206                    `),r(),e(7,`
207                `)),a&2){let t=c(2);s(3),B(t.cols)}}function pn(a,d){if(a&1&&(e(0,`
208                            `),l(1,"td"),e(2),r(),e(3,`
209                        `)),a&2){let t=c().$implicit;s(2),S(t.playerName)}}function un(a,d){if(a&1){let t=C();e(0,`
210                                `),l(1,"button",39),f("click",function(){h(t);let n=c().$implicit,o=c(2);return y(o.editDocument(n.playerDocumentID))}),e(2),r(),e(3,`
211                            `)}if(a&2){let t=c().$implicit;s(2),S(t.name)}}function hn(a,d){if(a&1&&e(0),a&2){let t=c(2).$implicit;I(`
212                                    `,t.name,`
213                                `)}}function yn(a,d){if(a&1&&e(0),a&2){let t=c(2).$implicit;I(`
214                                    `,t.name,`
215                                `)}}function fn(a,d){if(a&1&&(e(0,`
216                                `),p(1,hn,1,1),p(2,yn,1,1)),a&2){let t=c().$implicit,i=c(2);s(),u(i.isAdmin&&t.playerFileCabinetFileType===i.PlayerFileCabinetFileType.COMPLETED_WAIVER?1:-1),s(),u(i.isAdmin?-1:2)}}function _n(a,d){if(a&1&&(e(0,`
217                                    `),_(1,"app-status-indicator",40),e(2,`
218                                `)),a&2){let t=c(2).$implicit;s(),m("tooltipText",t.photoValidationReason)}}function Cn(a,d){a&1&&(e(0,`
219                                    `),_(1,"app-status-indicator",41),e(2,`
220                                `))}function xn(a,d){if(a&1&&(e(0,`
221                            `),l(1,"td"),e(2,`
222                                `),p(3,_n,3,1),p(4,Cn,3,0),r(),e(5,`
223                        `)),a&2){let t=c().$implicit,i=c(2);s(3),u(t.photoValidationStatusID===i.PhotoValidationStatus.NeedsReview?3:-1),s(),u(t.photoValidationStatusID===i.PhotoValidationStatus.Approved?4:-1)}}function gn(a,d){if(a&1){let t=C();e(0,`
224                                    `),l(1,"button",42),f("click",function(){h(t);let n=c(2).$implicit,o=c(2);return y(o.confirmDelete(n.playerDocumentID))}),e(2,`
225                                        `),_(3,"i",43),e(4,`
226                                    `),r(),e(5,`
227                                `)}}function bn(a,d){if(a&1){let t=C();e(0,`
228                                `),l(1,"button",42),f("click",function(){h(t);let n=c().$implicit,o=c(2);return y(o.downloadDocument(n))}),e(2,`
229                                    `),_(3,"i",30),e(4,`
230                                `),r(),e(5,`
231                                `),e(6,`
232                                `),p(7,gn,6,0)}if(a&2){let t=c().$implicit,i=c(2);s(7),u(i.userHasAccessToEditFile(t)&&t.playerFileCabinetFileType===i.PlayerFileCabinetFileType.PLAYER_DOCUMENT?7:-1)}}function vn(a,d){if(a&1&&(e(0,`
233                                `),l(1,"a",44),e(2,`
234                                    View/Print
235                                `),r(),e(3,`
236                            `)),a&2){let t=c().$implicit;s(),m("routerLink",se(1,Ki,t.completedWaiverID))}}function Sn(a,d){if(a&1&&(e(0,`
237                    `),l(1,"tr"),e(2,`
238                        `),p(3,pn,4,1),l(4,"td"),e(5,`
239                            `),p(6,un,4,1)(7,fn,3,2),r(),e(8,`
240                        `),l(9,"td"),e(10),O(11,"uppercase"),r(),e(12,`
241                        `),l(13,"td"),e(14),O(15,"utcDate"),r(),e(16,`
242                        `),l(17,"td"),e(18),r(),e(19,`
243                        `),l(20,"td"),e(21),r(),e(22,`
244                        `),p(23,xn,6,2),l(24,"td",38),e(25,`
245                            `),p(26,bn,8,1),p(27,vn,4,3),r(),e(28,`
246                    `),r(),e(29,`
247                `)),a&2){let t=d.$implicit,i=c(2);s(3),u(i.playerID?-1:3),s(3),u(i.userHasAccessToEditFile(t)&&t.playerFileCabinetFileType===i.PlayerFileCabinetFileType.PLAYER_DOCUMENT?6:7),s(4),S(Z(11,9,i.getFileTypeName(t.playerFileCabinetFileType))),s(4),S(z(15,11,t.savedOn,"MM/dd/y")),s(4),S(t.savedBy),s(3),S(t.registrationName),s(2),u(i.showAIDocumentValidation?23:-1),s(3),u(t.playerFileCabinetFileType!==i.PlayerFileCabinetFileType.COMPLETED_WAIVER?26:-1),s(),u(t.playerFileCabinetFileType===i.PlayerFileCabinetFileType.COMPLETED_WAIVER?27:-1)}}function Pn(a,d){if(a&1&&(e(0,`
248                    `),l(1,"tr"),e(2,`
249                        `),l(3,"td",45),e(4,"There are no files that match the search criteria."),r(),e(5,`
250                    `),r(),e(6,`
251                `)),a&2){let t=c(2);s(3),J("colspan",t.showAIDocumentValidation?t.playerID?7:8:t.playerID?6:7)}}function wn(a,d){if(a&1){let t=C();e(0,`
252        `),l(1,"div",31),e(2,`
253            `),l(3,"p-table",32),f("onLazyLoad",function(n){h(t);let o=c();return y(o.search(n))}),e(4,`
254                `),k(5,mn,8,0,"ng-template",33),e(6,`
255                `),k(7,Sn,30,14,"ng-template",34),e(8,`
256                `),k(9,Pn,7,1,"ng-template",35),e(10,`
257            `),r(),e(11,`
258        `),r(),e(12,`
259    `)}if(a&2){let t=c();s(3),m("value",t.files)("sortOrder",-1)("columns",t.cols)("lazy",!0)("paginator",!0)("alwaysShowPaginator",!1)("totalRecords",t.totalRecords)("loading",t.searching)("rows",100)}}function Dn(a,d){if(a&1){let t=C();e(0,`
260            `),l(1,"app-dynamic-form",47),f("onSubmit",function(n){h(t);let o=c(2);return y(o.saveDocument(n))})("onCancel",function(){h(t);let n=c(2);return y(n.cancel())}),e(2,`
261                `),_(3,"app-dynamic-form-field",48),e(4,`
262                `),l(5,"app-dynamic-form-field",49),f("onChange",function(n){h(t);let o=c(2);return y(o.fileChange(n))}),r(),e(6,`
263            `),r(),e(7,`
264        `)}if(a&2){let t=c(2);
264s(),m("fields",t.fields)("entity",t.playerDocument)("horizontalForm",!0)("contentFieldsMode",!0),s(4),m("acceptType",t.acceptTypes)("maxFileSizeBytes",t.maxFileBytes)("acceptedFileExtensions",t.acceptedFileTypes)}}function En(a,d){if(a&1){let t=C();e(0,`
265    `),l(1,"p-dialog",46),F("visibleChange",function(n){h(t);let o=c();return T(o.showDialog,n)||(o.showDialog=n),y(n)}),e(2,`
266        `),p(3,Dn,8,7),r(),e(4,`
267`)}if(a&2){let t=c();s(),oe(H(7,en)),E("visible",t.showDialog),m("header",t.playerDocument.playerDocumentID?"Edit File":"Upload a File")("closable",!1)("modal",!0),s(2),u(t.fields&&t.playerDocument?3:-1)}}function Tn(a,d){a&1&&(e(0,`
268                        `),_(1,"span",54),e(2,`
269                    `))}function Fn(a,d){if(a&1){let t=C();e(0,`
270        `),l(1,"app-dialog-footer"),e(2,`
271            `),Q(3,50),e(4,`
272                `),l(5,"button",51),f("click",function(){h(t);let n=c();return n.showConfirmDelete=!1,y(n.playerDocumentID=null)}),e(6,"No"),r(),e(7,`
273            `),X(),e(8,`
274            `),Q(9,52),e(10,`
275                `),l(11,"button",53),f("click",function(){h(t);let n=c();return y(n.delete())}),e(12,`
276                    `),p(13,Tn,3,0),e(14),r(),e(15,`
277            `),X(),e(16,`
278        `),r(),e(17,`
279    `)}if(a&2){let t=c();s(5),m("disabled",t.deleting),s(6),m("disabled",t.deleting),s(2),u(t.deleting?13:-1),s(),I(`
280                    `,t.deleting?"Deleting...":"Yes",`
281                `)}}var Cr=(()=>{let d=class d{constructor(i,n,o,x,b,et,gi){this.playerService=i,this.siteDataService=n,this.formService=o,this.userService=x,this.teamService=b,this.authorizeService=et,this.programService=gi,this.totalRecords=0,this.searching=!0,this.loading=!0,this.showHeader=!0,this.isAdmin=!0,this.allFiles=!1,this.showDialog=!1,this.showConfirmDelete=!1,this.deleting=!1,this.downloadingFiles=!1,this.showDownloadButton=!1,this.showAIDocumentValidation=!1,this.PlayerFileCabinetFileType=P,this.PhotoValidationStatus=nt,this.uniquePlayerDocumentFileExtensions=["doc","docx","ppt","pptx","xls","xlsx","txt"],this.acceptedFileTypes=ve.concat(["pdf"]).concat(this.uniquePlayerDocumentFileExtensions),this.acceptTypes=ve.map(tt=>"image/"+tt).concat(["application/pdf"]).concat(this.uniquePlayerDocumentFileExtensions.map(tt=>"."+tt)).join(","),this.maxFileBytes=Ve,this.AriaLabels=Le,this.cols=[{field:"name",header:"File Name"},{field:"fileType",header:"File Type"},{field:"savedOn",header:"Saved Date"},{field:"savedBy",header:"Saved By"},{field:"registrationName",header:"Registration Name"}],this.testUserOptions=At,this.genderOptions=Nt,this.unsubscribe$=new M}ngOnInit(){this.authorizeService.getUser().pipe(v(this.unsubscribe$)).subscribe({next:i=>{i&&(this.userProfile=i)},error:()=>{this.userProfile=void 0}}),this.playerService.isAdmin=this.isAdmin,this.playerID?(this.playerService.playerID=this.playerID,this.showDownloadButton=!1):(this.cols.unshift({field:"playerName",header:"Player Name"}),this.showHeader=!1),this.playerService.playerFileCabinetSearchFilters=new lt,this.isAdmin||(this.clubUserID=this.userService.loggedInClubUser.clubUserID),this.playerID?R([this.siteDataService.getClubFieldOptions(),this.siteDataService.getClubOptions([ee.ENABLE_AI_DOCUMENT_VALIDATION])]).pipe(v(this.unsubscribe$)).subscribe({next:i=>{this.clubFieldOptions=i[0],this.showAIDocumentValidation=i[1]?.find(n=>n.optionID===ee.ENABLE_AI_DOCUMENT_VALIDATION)?.boolValue??!1,this.showAIDocumentValidation&&this.cols.push({field:"photoValidationStatusID",header:"AI Validation"}),this.addFileTypes(),this.loading=!1},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem loading file cabinet settings.")}}):R([this.programService.getPrograms({}),this.teamService.getTeams(),this.siteDataService.getClubFieldOptions(),this.siteDataService.getClubOptions([ee.ENABLE_AI_DOCUMENT_VALIDATION])]).pipe(v(this.unsubscribe$)).subscribe({next:i=>{this.playerService.programs=i[0],this.playerService.teams=i[1],this.clubFieldOptions=i[2],this.showAIDocumentValidation=i[3]?.find(n=>n.optionID===ee.ENABLE_AI_DOCUMENT_VALIDATION)?.boolValue??!1,this.showAIDocumentValidation&&this.cols.push({f
281ield:"photoValidationStatusID",header:"AI Validation"}),this.addFileTypes(),this.loading=!1},error:()=>{this.loading=!1,this.siteDataService.showSiteErrorAlert("There was a problem loading file cabinet settings.")}})}optionEnabled(i){return this.clubFieldOptions?.find(n=>n.fieldOptionID===i)!==void 0}getFieldoptionName(i){return this.clubFieldOptions?.find(n=>n.fieldOptionID===i)?.fieldName}addFileTypes(){this.fileTypes=[],this.optionEnabled(D.PLAYER_CARD_PHOTO)&&this.fileTypes.push({label:this.getFieldoptionName(D.PLAYER_CARD_PHOTO),value:P.PLAYER_CARD_PHOTO}),this.fileTypes.push({label:"Player Document",value:P.PLAYER_DOCUMENT}),this.fileTypes.push({label:"Tryout Photo",value:P.TRYOUT_PHOTO}),this.optionEnabled(D.PLAYER_PROOF_OF_AGE)&&this.authorizeService.userHasPermissions(this.userProfile,[Se.FileCabinetProofOfAge,Se.FullMemberAccess])&&this.fileTypes.push({label:this.getFieldoptionName(D.PLAYER_PROOF_OF_AGE),value:P.PLAYER_PROOF_OF_AGE}),this.optionEnabled(D.PLAYER_PROOF_OF_INSURANCE)&&this.fileTypes.push({label:this.getFieldoptionName(D.PLAYER_PROOF_OF_INSURANCE),value:P.PLAYER_PROOF_OF_INSURANCE}),this.optionEnabled(D.PROOF_OF_COVID_VACCINATION)&&this.fileTypes.push({label:this.getFieldoptionName(D.PROOF_OF_COVID_VACCINATION),value:P.PLAYER_PROOF_OF_COVID_VACCINE}),this.optionEnabled(D.CUSTOM_PLAYER_DOCUMENT_1)&&this.fileTypes.push({label:this.getFieldoptionName(D.CUSTOM_PLAYER_DOCUMENT_1),value:P.CUSTOM_PLAYER_DOCUMENT_1}),this.optionEnabled(D.CUSTOM_PLAYER_DOCUMENT_2)&&this.fileTypes.push({label:this.getFieldoptionName(D.CUSTOM_PLAYER_DOCUMENT_2),value:P.CUSTOM_PLAYER_DOCUMENT_2}),this.optionEnabled(D.CUSTOM_PLAYER_DOCUMENT_3)&&this.fileTypes.push({label:this.getFieldoptionName(D.CUSTOM_PLAYER_DOCUMENT_3),value:P.CUSTOM_PLAYER_DOCUMENT_3}),this.fileTypes.push({label:"Waiver",value:P.COMPLETED_WAIVER})}search(i){this.playerService.playerFileCabinetSearchFilters.orderBy=null,i&&i.sortField&&(this.playerService.playerFileCabinetSearchFilters.orderBy=i.sortField+" "+(i.sortOrder===1?"ASC":"DESC"),this.playerService.playerFileCabinetSearchFilters.page=i.first/this.playerService.playerFileCabinetSearchFilters.rows+1),this.playerService.playerFileCabinetSearchFilters.getTotalCount=this.totalRecords===0,this.searching=!0,this.playerService.getPlayerFileCabinetDocuments(this.playerID,!1).pipe(v(this.unsubscribe$)).subscribe(n=>{this.files=n.results,this.playerService.playerFileCabinetSearchFilters.getTotalCount&&(this.totalRecords=n.count),this.searching=!1,this.loading=!1,this.siteDataService.hideSiteLoader()},()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")})}run(){this.playerService.playerFileCabinetSearchFilters.page=1,this.totalRecords=0,this.setShowDownloadButton(),this.search()}resetFilters(){this.playerService.playerFileCabinetSearchFilters=new lt(this.playerService.playerFileCabinetSearchFilters.orderBy)}addDocument(){this.playerService.getPlayerDocumentMetadata(!0).pipe(v(this.unsubscribe$)).subscribe(i=>{this.playerDocument=new Mt,this.fields=i.fields,this.showDialog=!0})}userHasAccessToEditFile(i){return this.isAdmin?!0:!!(i.uploadedByClubUser&&(i.uploadedByClubUser.clubUserID===0||i.uploadedByClubUser.clubUserID===this.clubUserID))}editDocument(i){R({metaData:this.playerService.getPlayerDocumentMetadata(!1),document:this.playerService.getPlayerDocument(i)}).pipe(v(this.unsubscribe$)).subscribe({next:n=>{this.fields=n.metaData.fields,this.playerDocument=n.document,this.showDialog=!0},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem loading the selected file")}})}saveDocument(i){this.playerDocument.playerDocumentID?(i.playerDocumentID=this.playerDocument.playerDocumentID,i.playerID=this.playerDocument.playerID,this.playerService.updatePlayerDocument(this.playerDocument.playerDocumentID,i).pipe(v(this.unsubscribe$)).subscribe(()=>{this.siteDataService.showSiteSuccessAlert("File saved successfully!"),this.cancel(),this.search()},()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem updating the selected file")})):this.playerService.createPlayerDocument(this.fileToUpload,j.PLAYER_FILE_CABINET,i.name).pipe(v(this.unsubscribe$)).subscribe(()=>{this.siteDataService.showSiteSuccessAlert("File uploaded successfully!"),this.cancel(),this.search()},()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem uploading the selected file")})}fileChange(i){i.target.files&&i.target.files[0]?this.fileToUpload=i.target.files[0]:this.fileToUpload=null}cancel(){this.playerDocument=null,this.showDialog=!1}confirmDelete(i){this.playerDocumentID=i,this.showConfirmDelete=!0}delete(){this.deleting=!0,this.playerService.deletePlayerDocument(this.playerDocumentID).pipe(v(this.unsubscribe$)).subscribe(()=>{this.playerDocumentID=null,this.showConfirmDelete=!1,this.deleting=!1,this.siteDataService.showSiteSuccessAlert("File deleted successfully"),this.search()},()=>{this.deleting=!1,this.siteDataService.showSiteErrorAlert("The file could not be deleted.")})}downloadDocument(i){let n;i.playerFileCabinetFileType===P.PLAYER_PROOF_OF_AGE?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.PLAYER_PROOF_OF_AGE
281):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):i.playerFileCabinetFileType===P.PLAYER_PROOF_OF_INSURANCE?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.PLAYER_PROOF_OF_INSURANCE):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):i.playerFileCabinetFileType===P.PLAYER_PROOF_OF_COVID_VACCINE?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.PROOF_OF_COVID_VACCINE):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):i.playerFileCabinetFileType===P.PLAYER_CARD_PHOTO?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.PLAYER_CARD_PHOTO):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):i.playerFileCabinetFileType===P.CUSTOM_PLAYER_DOCUMENT_1?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.CUSTOM_PLAYER_DOCUMENT_1):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):i.playerFileCabinetFileType===P.CUSTOM_PLAYER_DOCUMENT_2?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.CUSTOM_PLAYER_DOCUMENT_2):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):i.playerFileCabinetFileType===P.CUSTOM_PLAYER_DOCUMENT_3?this.isAdmin?n=this.playerService.downloadPlayerDocumentByType(i.playerID,j.CUSTOM_PLAYER_DOCUMENT_3):n=this.userService.downloadUserDocument(i.userID,i.userDocumentID):n=this.playerService.downloadPlayerDocument(i.playerDocumentID,i.playerID),n.pipe(v(this.unsubscribe$)).subscribe(o=>{ce(o)},()=>{this.siteDataService.showSiteErrorAlert("The requested file could not be found.")})}getFileTypeName(i){switch(i){case P.PLAYER_DOCUMENT:return"DOCUMENT";case P.COMPLETED_WAIVER:return"WAIVER";case P.TRYOUT_PHOTO:return"TRYOUT PHOTO";case P.PLAYER_PROOF_OF_AGE:return this.getFieldoptionName(D.PLAYER_PROOF_OF_AGE)||"PLAYER PROOF OF AGE";case P.PLAYER_CARD_PHOTO:return this.getFieldoptionName(D.PLAYER_CARD_PHOTO)||"PLAYER CARD PHOTO";case P.PLAYER_PROOF_OF_INSURANCE:return this.getFieldoptionName(D.PLAYER_PROOF_OF_INSURANCE)||"PLAYER PROOF OF INSURANCE";case P.PLAYER_PROOF_OF_COVID_VACCINE:return this.getFieldoptionName(D.PROOF_OF_COVID_VACCINATION)||"PLAYER PROOF OF COVID-19 VACCINATION";case P.CUSTOM_PLAYER_DOCUMENT_1:return this.getFieldoptionName(D.CUSTOM_PLAYER_DOCUMENT_1)||"CUSTOM PLAYER DOCUMENT 1";case P.CUSTOM_PLAYER_DOCUMENT_2:return this.getFieldoptionName(D.CUSTOM_PLAYER_DOCUMENT_2)||"CUSTOM PLAYER DOCUMENT 2";case P.CUSTOM_PLAYER_DOCUMENT_3:return this.getFieldoptionName(D.CUSTOM_PLAYER_DOCUMENT_3)||"CUSTOM PLAYER DOCUMENT 3"}}downloadPlayerCardPhotos(){this.downloadingFiles=!0,this.playerService.getPlayerFileCabinetDocuments(void 0,!0).subscribe(i=>{i&&(ce(i),this.downloadingFiles=!1)},i=>{this.siteDataService.showSiteErrorAlert("There was a problem generating the zip file.")})}setShowDownloadButton(){this.showDownloadButton=!this.playerID&&(!this.playerService.playerFileCabinetSearchFilters.fileType||this.playerService.playerFileCabinetSearchFilters.fileType?.some(i=>i.value!==P.COMPLETED_WAIVER))}approvePhotoValidation(i){this.playerService.approvePhotoValidation(i.playerID,i.playerDocumentID).pipe(v(this.unsubscribe$)).subscribe({next:()=>{i.photoValidationStatusID=nt.Approved,i.photoValidationReason=null,this.siteDataService.showSiteSuccessAlert("Photo approved successfully.")},error:()=>{this.siteDataService.showSiteErrorAlert("Unable to approve photo.")}})}ngOnDestroy(){this.unsubscribe$.next(null),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(V),g(A),g(te),g(Ce),g(ni),g(Re),g(qe))},d.\u0275cmp=w({type:d,selectors:[["app-player-file-cabinet"]],inputs:{playerID:"playerID",showHeader:"showHeader",isAdmin:"isAdmin",allFiles:"allFiles"},standalone:!1,decls:48,vars:22,consts:[[3,"adminFilterReset","adminFilterSearch","showAdvanced"],["primary",""],[1,"col","pr-0"],[1,"p-input-icon-left","full-width"],[1,"fa","fa-magnifying-glass"],["type","text","id","search","pInputText","","placeholder","Search",1,"full-width","pl-4",3,"ngModelChange","ngModel"],["for","search",1,"sr-only"],["for","fileType",1,"sr-only"],["optionLabel","label","placeholder","All File Types","appendTo","body",3,"ngModelChange","ngModel","options","filter","showToggleAll","maxSelectedLabels","selectedItemsLabel","styleClass"],["advanced",""],[1,"mb-3"],[3,"keydown.enter"],["header","Delete File",3,"visibleChange","visible","closable","modal"],["pTemplate","footer"],[1,"row","align-bottom"],[1,"col-md-3"],[1,"form-group"],["type","text","placeholder","Last Name",3,"ngModelChange","ngModel"],["type","text","placeholder","First Name",3,"ngModelChange","ngModel"],[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"],["styleClass","full-width","appendTo","body",3,"ngModelChange","ngModel","options"],[1,"col-md-4"],["optionLabel","name","placeholder","All","appendTo","body",3,"ngModelChange","autofocusFilter","ngModel","options","filter","showToggleAll","maxSelectedLabels"],[1,"btn","btn-sm",3,"click"],[1,"fal","fa-plus-circle"],[1,"btn","btn-sm",3,"click","disabled"],[1,"fas","fa-download"],[1,"table-responsive"],["sortField","
281savedOn",1,"table","table-striped","table-sm",3,"onLazyLoad","value","sortOrder","columns","lazy","paginator","alwaysShowPaginator","totalRecords","loading","rows"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"pSortableColumn"],[3,"field"],[1,"nowrap"],[1,"btn","btn-naked",3,"click"],["status","warning","text","Photo Flagged",1,"text-small",3,"tooltipText"],["status","success","text","Verified",1,"text-small"],[1,"btn","btn-sm","btn-tertiary",3,"click"],[1,"fas","fa-trash"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-sm","btn-tertiary",3,"routerLink"],[2,"text-align","left"],[3,"visibleChange","visible","header","closable","modal"],["buttonsPosition","left",3,"onSubmit","onCancel","fields","entity","horizontalForm","contentFieldsMode"],["fieldName","name"],["fieldName","uploadedDocumentName",3,"onChange","acceptType","maxFileSizeBytes","acceptedFileExtensions"],["slot","secondary"],[1,"btn",3,"click","disabled"],["slot","primary"],[1,"btn","btn-primary",3,"click","disabled"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(n,o){n&1&&(l(0,"app-admin-filter",0),f("adminFilterReset",function(){return o.resetFilters()})("adminFilterSearch",function(){return o.run()}),e(1,`
282    `),Q(2,1),e(3,`
283        `),l(4,"div",2),e(5,`
284            `),l(6,"span",3),e(7,`
285                `),_(8,"i",4),e(9,`
286                `),l(10,"input",5),F("ngModelChange",function(b){return T(o.playerService.playerFileCabinetSearchFilters.name,b)||(o.playerService.playerFileCabinetSearchFilters.name=b),b}),r(),e(11,`
287                `),_(12,"label",6),e(13,`
288            `),r(),e(14,`
289        `),r(),e(15,`
290        `),l(16,"div",2),e(17,`
291            `),l(18,"label",7),e(19,"File Type"),r(),e(20,`
292            `),l(21,"p-multiSelect",8),F("ngModelChange",function(b){return T(o.playerService.playerFileCabinetSearchFilters.fileType,b)||(o.playerService.playerFileCabinetSearchFilters.fileType=b),b}),r(),e(22,`
293        `),r(),e(23,`
294    `),X(),e(24,`
295    `),Q(25,9),e(26,`
296        `),p(27,tn,64,6),p(28,nn,37,14),X(),e(29,`
297`),r(),e(30,`
298`),l(31,"div",10),e(32,`
299    `),p(33,an,6,0),p(34,rn,7,5),p(35,on,4,0),r(),e(36,`
300`),l(37,"section",11),f("keydown.enter",function(){return o.run()}),e(38,`
301    `),p(39,sn,4,0),p(40,wn,13,9),r(),e(41,`
302
303`),p(42,En,5,8),l(43,"p-dialog",12),F("visibleChange",function(b){return T(o.showConfirmDelete,b)||(o.showConfirmDelete=b),b}),e(44,`
304    Are you sure you want to delete this file?
305    `),k(45,Fn,18,4,"ng-template",13),e(46,`
306`),r(),e(47,`
307`)),n&2&&(m("showAdvanced",!o.playerID),s(10),E("ngModel",o.playerService.playerFileCabinetSearchFilters.name),s(11),E("ngModel",o.playerService.playerFileCabinetSearchFilters.fileType),m("options",o.fileTypes)("filter",!1)("showToggleAll",!1)("maxSelectedLabels",1)("selectedItemsLabel","{0} file types selected")("styleClass","full-width"),s(6),u(o.playerID?-1:27),s(),u(o.playerID?-1:28),s(5),u(o.playerID?33:-1),s(),u(o.showDownloadButton?34:-1),s(),u(o.downloadingFiles?35:-1),s(2),re("card",!o.allFiles),s(2),u(o.showHeader?39:-1),s(),u(o.loading?-1:40),s(2),u(o.playerDocument?42:-1),s(),E("visible",o.showConfirmDelete),m("closable",!1)("modal",!0))},dependencies:[$,ne,Ne,ye,fe,Vt,Oe,Gt,Me,ti,$e,Jt,Qt,He,ze,We,$t,W,Rt,jt,gt,je],encapsulation:2});let a=d;return a})();var In=(a,d)=>({"col-md-2":a,"col-md-6":d});function An(a,d){if(a&1&&(e(0,`
308                `),l(1,"div",14),e(2,`
309                  `),l(3,"div",11),e(4,`
310                    Team: `),l(5,"strong"),e(6),r(),e(7,`
311                  `),r(),e(8,`
312                `),r(),e(9,`
313              `)),a&2){let t=c().$implicit;s(6),S(t.team.name)}}function Nn(a,d){if(a&1){let t=C();e(0,`
314                    `),l(1,"span",9),e(2,`
315                      `),l(3,"button",15),f("click",function(){h(t);let n=c().$implicit,o=c(2);return y(o.onEdit.emit(n.playerFeedbackID))}),e(4,"Edit"),r(),e(5,`
316                    `),r(),e(6,`
317                  `)}}function On(a,d){if(a&1){let t=C();e(0,`
318                    `),l(1,"span",9),e(2,`
319                      `),l(3,"button",16),f("click",function(){h(t);let n=c().$implicit,o=c(2);return y(o.onSelect.emit(n.feedbackText))}),e(4,"Select"),r(),e(5,`
320                    `),r(),e(6,`
321                  `)}}function Mn(a,d){if(a&1&&(e(0,`  
322    `),l(1,"div",2),e(2,`
323      `),l(3,"div",3),e(4,`
324        `),l(5,"div",4),e(6,`
325          `),l(7,"div",3),e(8,`
326            `),l(9,"div",5),e(10,`
327              `),l(11,"div",6),e(12,`
328                `),l(13,"span",7),_(14,"i",8),r(),e(15,`
329                `),l(16,"span",9),e(17),l(18,"strong"),e(19),r(),e(20,`
330                `),r(),e(21,`
331              `),r(),e(22,`
332              `),p(23,An,10,1),l(24,"div",10),e(25,`
333                `),l(26,"div",11),e(27,`
334                  `),l(28,"span",9),e(29),O(30,"utcDate"),r(),e(31,`
335                  `),p(32,Nn,7,0),p(33,On,7,0),r(),e(34,`
336              `),r(),e(35,`
337            `),r(),e(36,`
338            `),l(37,"div",12),e(38,`
339              `),l(39,"div",13),e(40),r(),e(41,`
340            `),r(),e(42,`
341          `),r(),e(43,`
342        `),r(),e(44,`
343      `),r(),e(45,`
344    `),r(),e(46,`
345    `)),a&2){let t=d.$implicit,i=c(2);s(17),I(`
346                  `,t.playerFeedbackCategory.description,` feedback from
347                  `),s(2),ue(`
348                    `,t.savedByClubUser.user.firstName,`
349                    `,t.savedByClubUser.user.lastName,`
350                  `),s(4),u(i.showTeam?23:-1),s(),m("ngClass",xt(12,In,i.showTeam,!i.showTeam)),s(5),I(`
351                    Sent `,z(30,9,t.savedOn,"M/d/yy"),`
352                  `),s(3),u(i.editable?32:-1),s(),u(i.selectable?33:-1),s(7),I(`
353                `,t.feedbackText,`
354              `)}}function kn(a,d){if(a&1&&(e(0,`
355    `),Y(1,Mn,47,15,null,null,U)),a&2){let t=d.$implicit;s(),B(t)}}var Dr=(()=>{let d=class d{constructor(){this.searching=!0,this.feedback=[],this.totalCount=0,this.rows=10,this.showTeam=!0,this.editable=!1,this.selectable=!1,this.showCopyToClipboardLink=!1,this.loadData=new N,this.onEdit=new N,this.onSelect=new N}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=w({type:d,selectors:[["app-player-feedback"]],inputs:{searching:"searching",playerID:"playerID",feedback:"feedback",totalCount:"totalCount",rows:"rows",showTeam:"showTeam",editable:"editable",selectable:"selectable",showCopyToClipboardLink:"showCopyToClipboardLink"}
355,outputs:{loadData:"loadData",onEdit:"onEdit",onSelect:"onSelect"},standalone:!1,decls:5,vars:7,consts:[["list",""],["layout","list","emptyMessage","No feedback has been given",3,"onLazyLoad","value","paginator","rows","lazy","totalRecords","loading","alwaysShowPaginator"],[1,"row","mb-3","feedback-row"],[1,"col-md-12"],[1,"row","pr-3","pl-3"],[1,"row","feedback-header","align-items-center","pb-1","pt-2"],[1,"col-md-6","pl-0"],[1,"comment-bubble"],[1,"far","fa-comment"],[1,"text-small"],[1,"pr-0",3,"ngClass"],[1,"pull-right","text-small"],[1,"row","feedback-text","pb-2","pt-2"],[1,"col-md-12","pr-0","pl-0","text-small"],[1,"col-md-4"],["type","button",1,"btn","btn-sm","btn-naked","btn-icon-edit-after",3,"click"],["type","button",1,"btn","btn-sm","btn-naked","btn-icon-copy-after",3,"click"]],template:function(n,o){n&1&&(l(0,"p-dataView",1),f("onLazyLoad",function(b){return o.loadData.emit(b)}),e(1,`
356  `),k(2,kn,3,0,"ng-template",null,0,de),e(4,`
357`),r()),n&2&&m("value",o.feedback)("paginator",!0)("rows",o.rows)("lazy",!0)("totalRecords",o.totalCount)("loading",o.searching)("alwaysShowPaginator",!1)},dependencies:[he,ai,je],styles:[`.feedback-row{width:100%;margin-left:0;margin-right:0;background:var(--grey-75);border-radius:4px}.feedback-header{border-bottom:1px solid var(--grey-300)}.comment-bubble{margin-right:.5rem}
358`],encapsulation:2});let a=d;return a})();function Vn(a,d){if(a&1&&(e(0,`
359  `),l(1,"div",0),e(2,`
360    `),l(3,"span",1),e(4,"#"),r(),e(5,`
361    `),l(6,"span",2),e(7),r(),e(8,`
362  `),r(),e(9,`
363`)),a&2){let t=c();s(7),S(t.playerNumber)}}var fi=(()=>{let d=class d{};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=w({type:d,selectors:[["app-player-number"]],inputs:{playerNumber:"playerNumber"},standalone:!1,decls:1,vars:1,consts:[[1,"player-number"],[1,"pound"],[1,"number"]],template:function(n,o){n&1&&p(0,Vn,10,1),n&2&&u(o.playerNumber?0:-1)},styles:[".player-number[_ngcontent-%COMP%]{height:6.875rem;width:6.875rem;background-color:var(--theme-banner-background);color:var(--theme-banner-background-contrast);outline:thick double var(--theme-banner-background-contrast);border-radius:50%;display:flex;align-items:center;justify-content:center}.player-number[_ngcontent-%COMP%]   .pound[_ngcontent-%COMP%]{font-size:var(--text-medium);color:var(--theme-banner-background-contrast);margin:0 .25rem 1rem 0;opacity:45%}.player-number[_ngcontent-%COMP%]   .number[_ngcontent-%COMP%]{font-size:2.625rem;font-weight:700;font-family:Montserrat,Arial,Helvetica,sans-serif;font-weight:800;margin-right:.5rem}"]});let a=d;return a})();var Qe=()=>({exact:!0});function Rn(a,d){if(a&1&&(e(0,`
364            `),l(1,"div",12),e(2,`
365              `),l(3,"div",17),e(4,`
366                `),_(5,"app-player-number",18),e(6,`
367              `),r(),e(7,`
368            `),r(),e(8,`
369          `)),a&2){let t=c(2);s(5),m("playerNumber",t.player.playerClubData.number)}}function Un(a,d){if(a&1&&(e(0,`
370      `),l(1,"div",9),e(2,`
371        `),l(3,"div",10),e(4,`
372          `),l(5,"div",11),e(6,`
373            `),l(7,"div",12),e(8,`
374              `),l(9,"app-player-profile-photo",13),e(10,`
375              `),r(),e(11,`
376            `),r(),e(12,`
377            `),l(13,"div",14),e(14,`
378              `),l(15,"h1",15),e(16,"Welcome, "),l(17,"strong"),e(18),r()(),e(19,`
379              `),e(20,`
380            `),r(),e(21,`
381          `),r(),e(22,`
382        `),r(),e(23,`
383        `),l(24,"div",16),e(25,`
384          `),l(26,"div",11),e(27,`
385            `),l(28,"div",14),e(29,`
386              `),e(30,`
387          `),r(),e(31,`
388          `),p(32,Rn,9,1),r(),e(33,`
389      `),r(),e(34,`
390    `),r(),e(35,`
391  `)),a&2){let t=c();s(9),m("player",t.player)("editable",!0)("initialsOnly",!1),s(9),I("",t.player==null?null:t.player.user.firstName,"!"),s(14),u(!(t.player==null||t.player.playerClubData==null)&&t.player.playerClubData.number?32:-1)}}function Yn(a,d){a&1&&(e(0,`
392        `),l(1,"li",4),e(2,`
393          `),l(3,"a",19),e(4,`
394            College Profile
395          `),r(),e(5,`
396        `),r(),e(6,`
397      `)),a&2&&(s(),m("routerLinkActiveOptions",H(2,Qe)),s(2),m("routerLink","/player-dashboard/player/college-profile"))}var kr=(()=>{let d=class d{constructor(i){this.siteDataService=i,this.showTabs=!1,this.FieldOption=D}ngOnInit(){this.siteDataService.getClubFieldOptions().subscribe(i=>{this.clubFieldOptions=i})}optionEnabled(i){return this.clubFieldOptions?.find(n=>n.fieldOptionID===i)!==void 0}over13(i){return _e(i)>=13}};d.\u0275fac=function(n){return new(n||d)(g(A))},d.\u0275cmp=w({type:d,selectors:[["app-player-banner"]],inputs:{showTabs:"showTabs",player:"player"},standalone:!1,decls:40,vars:12,consts:[["data-testid","player-banner",1,"player-banner","pt-5","pb-3"],[1,"container"],[1,"tabs","pt-3"],["role","tablist",1,"tab-nav","no-bullets","inline-list"],["routerLinkActive","active",1,"nav-item",3,"routerLinkActiveOptions"],["role","tab","aria-controls","player-dashboard","aria-selected","true",1,"nav-link",3,"routerLink"],["role","tab","aria-controls","profile","aria-selected","true",1,"nav-link",3,"routerLink"],["role","tab","aria-controls","file-cabinet","aria-selected","true",1,"nav-link",3,"routerLink"],["routerLinkActive","active",1,"nav-item"],[1,"row"],[1,"col-md-6"],[1,"row","align-items-center"],[1,"col-auto"],["size","banner",3,"player","editable","initialsOnly"],[1,"col"],["id","welcome-player"],[1,"col-md-6","right","align-items-center"],[1,"player-number-wrapper"],[3,"playerNumber"],["role","tab","aria-controls","college-profile","aria-selected","true",1,"nav-link",3,"routerLink"]],template:function(n,o){n&1&&(l(0,"div",0),e(1,`
398  `),l(2,"div",1),e(3,`
399    `),p(4,Un,36,5),r(),e(5,`
400`),r(),e(6,`
401`),l(7,"div",1),e(8,`
402  `),l(9,"div",2),e(10,`
403    `),l(11,"ul",3),e(12,`
404      `),l(13,"li",4),e(14,`
405        `),l(15,"a",5),e(16,`
406          Dashboard
407        `),r(),e(17,`
408      `),r(),e(18,`
409      `),l(19,"li",4),e(20,`
410        `),l(21,"a",6),e(22,`
411          Profile
412        `),r(),e(23,`
413      `),r(),e(24,`
414      `),l(25,"li",4),e(26,`
415        `),l(27,"a",7),e(28,`
416          File Cabinet
417        `),r(),e(29,`
418      `),r(),e(30,`
419      `),p(31,Yn,7,3),l(32,"li",8),e(33,`
420        `),l(34,"a",7),e(35,`
421          Goals & Progress
422        `),r(),e(36,`
423      `),r(),e(37,`
424    `),r(),e(38,`
425  `),r(),e(39,`
426`),r()),n&2&&(s(4),u(o.player?4:-1),s(9),m("routerLinkActiveOptions",H(9,Qe)),s(2),m("routerLink","/player-dashboard"),s(4),m("routerLinkActiveOptions",H(10,Qe)),s(2),m("routerLink","/player-dashboard/player/profile"),s(4),m("routerLinkActiveOptions",H(11,Qe)),s(2),m("routerLink","/player-dashboard/player/file-cabinet"),s(4),u(o.optionEnabled(o.FieldOption.COLLEGE_PROFILE)&&o.player&&o.over13(o.player.user.dob)?31:-1),s(3),m("routerLink","/player-dashboard/player/progress"))},dependencies:[Oe,Tt,ci,fi],styles:[".player-banner[_ngcontent-%COMP%]{background-color:var(--theme-banner-background);color:var(--theme-banner-background-contrast)}h1#welcome-player[_ngcontent-%COMP%]{color:var(--color-white);font-weight:400;font-family:Montserrat,Arial,Helvetica,sans-serif;font-size:1.75rem;margin-bottom:.5rem;padding-top:unset}.team-designation[_ngcontent-%COMP%]{color:var(--color-gray-500);text-transform:uppercase;font-size:var(--text-small)}.player-number-wrapper[_ngcontent-%COMP%]{margin-top:-1.5rem}"]});let a=d;return a})();function Bn(a,d){if(a&1){let t=C();e(0,`
427    `),l(1,"div",2),e(2,`
428      `),l(3,"span",5),e(4,"Player Email"),r(),e(5,`
429      `),l(6,"p"),e(7,`This player does not currently have an email in their profile. Please enter a valid email below if you
430      wish to extend an invitation. This email will be the username for their login.`),r(),e(8,`
431      `),l(9,"input",9,1),F("ngModelChange",function(n){h(t);let o=c();return T(o.userEmail,n)||(o.userEmail=n),y(n)}),r(),e(11,`
432      `),l(12,"div",10),e(13,`
433        Player Email is required and must be a valid email address
434      `),r(),e(14,`
435    `),r(),e(15,`
436  `)}if(a&2){let t=le(10),i=c();s(9),E("ngModel",i.userEmail),s(3),m("hidden",t.valid||!i.showErrors)}}var Xr=(()=>{let d=class d{constructor(i,n,o){this.userService=i,this.playerService=n,this.siteDataService=o,this.unsubscribe$=new M,this.closeInvitePlayer=new N,this.showErrors=!1}sendPlayerInvite(){this.hasEmail?this.sendPlayerInvitation():(this.userEmail&&(this.selectedPlayer.user.email=this.userEmail),this.userService.updateUser(this.selectedPlayer.user.userID,this.selectedPlayer.user).pipe(v(this.unsubscribe$)).subscribe({next:()=>{this.sendPlayerInvitation()},error:()=>{this.selectedPlayer.user.email=null,this.siteDataService.showSiteErrorAlert("There was a problem saving player information.")}}))}sendPlayerInvitation(){this.playerService.invitePlayer(this.selectedPlayer.playerID).subscribe(()=>{this.selectedPlayer.user.invitations.push(new ke),this.selectedPlayer=void 0,this.closeInvitePlayer.emit(!0),this.siteDataService.showSiteSuccessAlert("Invitation was sent successfully")},i=>{let n="There was a problem sending the invitation.";typeof i.error=="string"&&i.error&&(n+=` ${i.error}`),this.siteDataService.showSiteErrorAlert(n)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(Ce),g(V),g(A))},d.\u0275cmp=w({type:d,selectors:[["app-invite-player"]],inputs:{selectedPlayer:"selectedPlayer",userEmail:"userEmail",hasEmail:"hasEmail"},outputs:{closeInvitePlayer:"closeInvitePlayer"},standalone:!1,decls:25,vars:3,consts:[["emailForm","ngForm"],["playerEmail","ngModel"],[1,"mb-4"],[1,"mb-4","p-3","bg-green-lt"],[1,"text-uppercase","text-small","mr-3"],[1,"fw-700"],[1,"row","form-action","no-gutters"],[1,"btn","btn-primary",3,"click"],[1,"btn",3,"click"],["type","email","required","","name","playerEmail","placeholder","Player Email","email","",3,"ngModelChange","ngModel"],[1,"form-error-message",3,"hidden"]],template:function(n,o){if(n&1){let x=C();l(0,"p",2),e(1,`You are about to invite a player to log in to your account. The player will only be able to see
437  limited information like
438  calendars, team information and messages from their coaches. Click below to invite the player to join your
439  account. They
440  will receive an email and will need to setup a login and will then be able to log in to the website and the
441  mobile
442application. Note: only players who are over the age of 13 will be able to log in to the site.`),r(),e(2,`
443`),l(3,"div",3),e(4,`
444  `),l(5,"span",4),e(6,"Player Name"),r(),e(7,`
445  `),l(8,"span",5),e(9),r(),e(10,`
446`),r(),e(11,`
447`),l(12,"form",null,0),e(14,`
448  `),p(15,Bn,16,2),l(16,"div",6),e(17,`
449    `),l(18,"button",7),f("click",function(){h(x);let et=le(13);return y(et.valid?o.sendPlayerInvite():o.showErrors=!0)}),e(19,`Send
450    Invite`),r(),e(20,`
451    `),l(21,"button",8),f("click",function(){return o.closeInvitePlayer.emit(!0)}),e(22,"Cancel"),r(),e(23,`
452  `),r(),e(24,`
453`),r()}n&2&&(s(9),ue("",o.selectedPlayer==null?null:o.selectedPlayer.user.firstName," ",o.selectedPlayer==null?null:o.selectedPlayer.user.lastName),s(6),u(o.hasEmail?-1:15))},dependencies:[Pt,Ne,ye,vt,wt,Dt,fe,St],encapsulation:2});let a=d;return a})();var Xe=class{},ge=(function(a){return a[a.PLAYER=1]="PLAYER",a[a.ACADEMIC=2]="ACADEMIC",a[a.ACTIVITY=3]="ACTIVITY",a})(ge||{});var Ze=(()=>{let d=class d{constructor(i){this.webAPI=i}getPlayerCollegeDataMetadata(){return this.webAPI.getData("players/college/data/metadata")}getPlayerCollegeHighlightMetadata(){return this.webAPI.getData("players/college/highlight/metadata")}getPlayerCollegeData(i){return i?this.webAPI.getData(`players/${i}/college/data`):this.webAPI.getData("players/current/college/data")}getPlayerCollegeHighlights(i){return i?this.webAPI.getData(`players/${i}/college/highlights`):this.webAPI.getData("players/current/college/highlights")}getPlayerCollegeProfile(i){return i?this.webAPI.getContentData(`players/${i}/college/profile`):this.webAPI.getContentData("players/current/college/profile")}getTeamCollegeProfile(i,n){return this.webAPI.getContentData(`private/teams/${i}/college/profile/${n}`)}savePlayerCollegeData(i,n,o){return o?n?this.webAPI.postData(`players/${o}/college/data`,i):this.webAPI.putData(`players/${o}/college/data`,i):n?this.webAPI.postData("players/current/college/data",i):this.webAPI.putData("players/current/college/data",i)}savePlayerCollegeHighlight(i,n,o){return o?n?this.webAPI.putData(`players/${o}/college/highlights/${n}`,i):this.webAPI.postData(`players/${o}/college/highlights`,i):n?this.webAPI.putData(`players/current/college/highlights/${n}`,i):this.webAPI.postData("players/current/college/highlights",i)}deleteHighlight(i,n){return n?this.webAPI.deleteData(`players/${n}/college/highlights/${i}`):this.webAPI.deleteData(`players/current/college/highlights/${i}`)}};d.\u0275fac=function(n){return new(n||d)(yt(Ot))},d.\u0275prov=ut({token:d,factory:d.\u0275fac});let a=d;return a})();var $n=a=>({"border-bottom d-flex justify-content-between":a}),_i=a=>({"parent-header":a}),jn=a=>({"highlights-grid mt-3":a});function Gn(a,d){if(a&1){let t=C();e(0,`
454              `),l(1,"button",45),f("click",function(){h(t);let n=c(2);return y(n.showYourInfoEdit=!0)}),e(2,"EDIT"),r(),e(3,`
455            `)}}function qn(a,d){a&1&&(e(0,`
456            `),l(1,"div",46),e(2,`
457              `),l(3,"p"),e(4,"Help college recruiters get to know y
457ou better by filling out this personal information."),r(),e(5,`
458            `),r(),e(6,`
459          `))}function Jn(a,d){if(a&1&&(e(0),O(1,"number")),a&2){let t=c(2);S(z(1,1,t.playerCollegeData==null?null:t.playerCollegeData.gpa,"1.1"))}}function Qn(a,d){if(a&1){let t=C();e(0,`
460            `),l(1,"div",47)(2,"a",48),f("click",function(){h(t);let n=c(2);return y(n.showYourInfoEdit=!0)}),e(3,`
461              `),_(4,"i",49),e(5,"Edit Your Information"),r()(),e(6,`
462            `)}}function Xn(a,d){a&1&&(e(0,`
463              `),l(1,"p",46),e(2,`Show your stuff! Enter highlights as a player so far.
464                Please note: only the most recent 5 highlights will show on the team profile, so make those
465              count!`),r(),e(3,`
466            `))}function Zn(a,d){if(a&1){let t=C();e(0,`
467                `),l(1,"div",50),e(2,`
468                  `),l(3,"div",51),e(4,`
469                    `),l(5,"span",52),e(6),r(),e(7,`
470                  `),r(),e(8,`
471                  `),l(9,"div",53),e(10),r(),e(11,`
472                  `),l(12,"div",51),e(13,`
473                    `),l(14,"button",54),f("click",function(n){let o=h(t).$implicit;c();let x=le(135),b=c();return b.setupHighlightModal(b.CollegeHighlightType.PLAYER,o.playerCollegeHighlightID),y(x.toggle(n))}),e(15,`
474                      `),_(16,"i",55),e(17,`
475                      `),l(18,"span",56),e(19,"more"),r(),e(20,`
476                    `),r(),e(21,`
477                  `),r(),e(22,`
478                `),r(),e(23,`
479              `)}if(a&2){let t=d.$implicit,i=c(2);s(6),S(i.getYearLabel(t)),s(4),S(t.highlight)}}function Kn(a,d){if(a&1){let t=C();e(0,`
480                `),l(1,"app-dynamic-form",57),f("onSubmit",function(n){h(t);let o=c(2);return y(o.savePlayerCollegeHighlight(n,!1))})("onSaveAndAdd",function(n){h(t);let o=c(2);return y(o.savePlayerCollegeHighlight(n,!0))})("onCancel",function(){h(t);let n=c(2);return y(n.showHighlightEdit=!1)}),e(2,`
481                  `),l(3,"app-dynamic-form-field",58),e(4,`
482                  `),r(),e(5,`
483                  `),l(6,"app-dynamic-form-field",59),e(7,`
484                  `),r(),e(8,`
485                  `),l(9,"app-dynamic-form-field",60),e(10,`
486                  `),r(),e(11,`
487                `),r(),e(12,`
488              `)}if(a&2){let t=c(2);s(),m("fields",t.highlightModalFields)("entity",t.highlight)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!0)("showSubmitButton",!0)("buttonsPosition","left")("showSaveAndAddButton",!0)}}function ea(a,d){a&1&&(e(0,`
489                `),l(1,"p",46),e(2,"Your academic accolades"),r(),e(3,`
490              `))}function ta(a,d){if(a&1){let t=C();e(0,`
491                  `),l(1,"div",50),e(2,`
492                    `),l(3,"div",53),e(4),r(),e(5,`
493                    `),l(6,"div",51),e(7,`
494                      `),l(8,"button",54),f("click",function(n){let o=h(t).$implicit;c();let x=le(135),b=c();return b.setupHighlightModal(b.CollegeHighlightType.ACADEMIC,o.playerCollegeHighlightID),y(x.toggle(n))}),e(9,`
495                        `),_(10,"i",55),e(11,`
496                        `),l(12,"span",56),e(13,"more"),r(),e(14,`
497                      `),r(),e(15,`
498                    `),r(),e(16,`
499                  `),r(),e(17,`
500                `)}if(a&2){let t=d.$implicit;s(4),S(t.highlight)}}function ia(a,d){a&1&&(e(0,`
501                  `),l(1,"p",46),e(2,"Your activities"),r(),e(3,`
502                `))}function na(a,d){if(a&1){let t=C();e(0,`
503                    `),l(1,"div",50),e(2,`
504                      `),l(3,"div",53),e(4),r(),e(5,`
505                      `),l(6,"div",51),e(7,`
506                        `),l(8,"button",54),f("click",function(n){let o=h(t).$implicit;c();let x=le(135),b=c();return b.setupHighlightModal(b.CollegeHighlightType.ACTIVITY,o.playerCollegeHighlightID),y(x.toggle(n))}),e(9,`
507                          `),_(10,"i",55),e(11,`
508                          `),l(12,"span",56),e(13,"more"),r(),e(14,`
509                        `),r(),e(15,`
510                      `),r(),e(16,`
511                    `),r(),e(17,`
512                  `)}if(a&2){let t=d.$implicit;s(4),S(t.highlight)}}function aa(a,d){a&1&&(e(0,`
513                        `),_(1,"span",61),e(2,`
514                    `))}function la(a,d){a&1&&(e(0,`
515                        `),_(1,"i",44),e(2,`
516                    `))}function ra(a,d){if(a&1){let t=C();e(0,`
517  `),l(1,"div"),e(2,`
518    `),l(3,"div",8),e(4,`
519      `),l(5,"div",9),e(6,`
520        `),l(7,"section",10),e(8,`
521          `),e(9,`
522        `),l(10,"div",11),e(11,`
523          `),l(12,"div",12),e(13,`
524            `),l(14,"h3",12),e(15),r(),e(16,`
525            `),p(17,Gn,4,0),r(),e(18,`
526          `),p(19,qn,7,0),l(20,"div",13),e(21,`
527            `),l(22,"div",14),e(23,`
528              `),l(24,"app-field-view-only-row",15),e(25,`
529              `),r(),e(26,`
530              `),l(27,"app-field-view-only-row",15),e(28,`
531              `),r(),e(29,`
532              `),l(30,"app-field-view-only-row",15),e(31,`
533              `),r(),e(32,`
534              `),l(33,"app-field-view-only-row",15),e(34,`
535                `),k(35,Jn,2,4,"ng-template",null,0,de),e(37,`
536              `),r(),e(38,`
537              `),l(39,"app-field-view-only-row",15),e(40,`
538              `),r(),e(41,`
539              `),l(42,"app-field-view-only-row",15),e(43,`
540              `),r(),e(44,`
541              `),l(45,"app-field-view-only-row",15),e(46,`
542              `),r(),e(47,`
543              `),l(48,"app-field-view-only-row",15),e(49,`
544              `),r(),e(50,`
545              `),l(51,"app-field-view-only-row",15),e(52,`
546              `),r(),e(53,`
547              `),l(54,"app-field-view-only-row",15),e(55,`
548              `),r(),e(56,`
549              `),l(57,"app-field-view-only-row",15),e(58,`
550              `),r(),e(59,`
551              `),l(60,"app-field-view-only-row",15),e(61,`
552              `),r(),e(62,`
553              `),l(63,"app-field-view-only-row",15),e(64,`
554              `),r(),e(65,`
555              `),l(66,"app-field-view-only-row",15),e(67,`
556              `),r(),e(68,`
557              `),l(69,"app-field-view-only-row",15),e(70,`
558              `),r(),e(71,`
559            `),r(),e(72,`
560          `),r(),e(73,`
561          `),p(74,Qn,7,0),r(),e(75,`
562          `),l(76,"p-dialog",16),F("visibleChange",function(n){h(t);let o=c();return T(o.showYourInfoEdit,n)||(o.showYourInfoEdit=n),y(n)}),f("onHide",function(){h(t);let n=c();return y(n.showYourInfoEdit=!1)}),e(77,`
563            `),l(78,"div",14),e(79,`
564              `),l(80,"app-dynamic-form",17,1),f("onSubmit",function(n){h(t);let o=c();return y(o.savePlayerCollegeData(n))})("onCancel",function(){h(t);let n=c();return y(n.showYourInfoEdit=!1)}),e(82,`
565                `),l(83,"app-dynamic-form-field",18),e(84,`
566                `),r(),e(85,`
567                `),l(86,"app-dynamic-form-field",19),e(87,`
568                `),r(),e(88,`
569                `),l(89,"app-dynamic-form-field",20),e(90,`
570                `),r(),e(91,`
571                `),l(92,"app-dynamic-form-field",21),e(93,`
572                `),r(),e(94,`
573                `),l(95,"app-dynamic-form-field",22),e(96,`
574                `),r(),e(97,`
575                `),l(98,"app-dynamic-form-field",23),e(99,`
576                `),r(),e(100,`
577                `),l(101,"app-dynamic-form-field",24),e(102,`
578                `),r(),e(103,`
579                `),l(104,"app-dynamic-form-field",25),e(105,`
580                `),r(),e(106,`
581                `),l(107,"app-dynamic-form-field",26),e(108,`
582                `),r(),e(109,`
583                `),l(110,"app-dynamic-form-field",27),e(111,`
584                `),r(),e(112,`
585                `),l(113,"app-dynamic-form-field",28),e(114,`
586                `),r(),e(115,`
587                `),l(116,"app-dynamic-form-field",29),e(117,`
588                `),r(),e(118,`
589                `),l(119,"app-dynamic-form-field",30),e(120,`
590                `),r(),e(121,`
591                `),l(122,"app-dynamic-form-field",31),e(123,`
592                `),r(),e(124,`
593                `),l(125,"app-dynamic-form-field",32),e(126,`
594                `),r(),e(127,`
595              `),r(),e(128,`
596            `),r(),e(129,`
597          `),r(),e(130,`
598        `),r(),e(131,`
599        `),l(132,"section",10),e(133,`
600          `),l(134,"p-menu",33,2),e(136,`
601          `),r(),e(137,`
602          `),l(138,"div",34),e(139,`
603            `),l(140,"h3",12),e(141),r(),e(142,`
604            `),_(143,"hr"),e(144,`
605              `),l(145,"h4"),e(146,"Player Accolades"),l(147,"span",35),e(148,`
606                `),_(149,"i",36),e(150,`
607              `),r(),e(151,`
608            `),r(),e(152,`
609            `),p(153,Xn,4,0),l(154,"div",37),e(155,`
610              `),Y(156,Zn,24,2,null,null,U),r(),e(158,`
611            `),l(159,"button",38),f("click",function(){h(t);let n=c();
611return n.setupHighlightModal(n.CollegeHighlightType.PLAYER),y(n.showHighlightEdit=!0)}),e(160,`
612            Add Player Accolade`),r(),e(161,`
613            `),l(162,"p-dialog",16),F("visibleChange",function(n){h(t);let o=c();return T(o.showHighlightEdit,n)||(o.showHighlightEdit=n),y(n)}),f("onHide",function(){h(t);let n=c();return y(n.showHighlightEdit=!1)}),e(163,`
614              `),p(164,Kn,13,8),r(),e(165,`
615            `),_(166,"hr"),e(167,`
616              `),l(168,"h4"),e(169,"Academic Accolades"),r(),e(170,`
617              `),p(171,ea,4,0),l(172,"div",37),e(173,`
618                `),Y(174,ta,18,1,null,null,U),r(),e(176,`
619              `),l(177,"button",38),f("click",function(){h(t);let n=c();return n.setupHighlightModal(n.CollegeHighlightType.ACADEMIC),y(n.showHighlightEdit=!0)}),e(178,`
620              Add Academic Accolade`),r(),e(179,`
621              `),_(180,"hr"),e(181,`
622                `),l(182,"h4"),e(183,"Activities"),r(),e(184,`
623                `),p(185,ia,4,0),l(186,"div",37),e(187,`
624                  `),Y(188,na,18,1,null,null,U),r(),e(190,`
625                `),l(191,"button",38),f("click",function(){h(t);let n=c();return n.setupHighlightModal(n.CollegeHighlightType.ACTIVITY),y(n.showHighlightEdit=!0)}),e(192,`
626                Add Activity`),r(),e(193,`
627              `),r(),e(194,`
628            `),r(),e(195,`
629          `),r(),e(196,`
630          `),l(197,"div",39),e(198,`
631            `),l(199,"section",40),e(200,`
632              `),l(201,"div",41),e(202,`
633                `),l(203,"div",10),e(204,`
634                    `),l(205,"button",42),f("click",function(){h(t);let n=c();return y(n.generateProfile())}),e(206,`
635                    `),p(207,aa,3,0),p(208,la,3,0),e(209,`
636                    Download College Profile PDF
637                    `),r(),e(210,`
638                `),r(),e(211,`
639                `),l(212,"button",43),f("click",function(){h(t);let n=c();return y(n.showCollegeProfileLinkDialog=!0)}),e(213,`
640                  `),_(214,"i",44),e(215,`
641                  Copy/View College Profile Link
642                `),r(),e(216,`
643              `),r(),e(217,`
644              `),e(218,`
645          `),r(),e(219,`
646        `),r(),e(220,`
647      `),r(),e(221,`
648    `),r(),e(222,`
649  `)}if(a&2){let t=c();s(12),m("ngClass",se(65,$n,!t.isPlayer)),s(2),m("ngClass",se(67,_i,!t.isPlayer&&!t.isAdmin)),s(),I("About ",t.isPlayer?"you ":null),s(2),u(t.isPlayer?-1:17),s(2),u(t.isPlayer?19:-1),s(),m("ngClass",se(69,jn,!t.isPlayer&&!t.isAdmin)),s(4),m("field",t.getField("school"))("entity",t.playerCollegeData),s(3),m("field",t.getField("height"))("entity",t.playerCollegeData),s(3),m("field",t.getField("weight"))("entity",t.playerCollegeData),s(3),m("field",t.getField("gpa"))("entity",t.playerCollegeData),s(6),m("field",t.getField("act"))("entity",t.playerCollegeData),s(3),m("field",t.getField("sat"))("entity",t.playerCollegeData),s(3),m("field",t.getField("twitter"))("entity",t.playerCollegeData),s(3),m("field",t.getField("instagram"))("entity",t.playerCollegeData),s(3),m("field",t.getField("mileTime"))("entity",t.playerCollegeData),s(3),m("field",t.getField("highlightVideoUrl"))("entity",t.playerCollegeData),s(3),m("field",t.getField("approachTouch"))("entity",t.playerCollegeData),s(3),m("field",t.getField("standingReach"))("entity",t.playerCollegeData),s(3),m("field",t.getField("blockJump"))("entity",t.playerCollegeData),s(3),m("field",t.getField("standingVerticalJump"))("entity",t.playerCollegeData),s(3),m("field",t.getField("preferredFootID"))("entity",t.playerCollegeData),s(5),u(t.isPlayer?74:-1),s(2),E("visible",t.showYourInfoEdit),m("header","Edit Your Information")("modal",!0)("closable",!0)("showHeader",!0),s(4),m("fields",t.fields)("entity",t.playerCollegeData)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!0)("showSubmitButton",!0)("buttonsPosition","left"),s(54),m("popup",!0)("model",t.menuOptions),s(6),m("ngClass",se(71,_i,!t.isPlayer&&!t.isAdmin)),s(),I("",t.isPlayer?"Your ":"","Highlights"),s(12),u(t.isPlayer?153:-1),s(3),B(t.getHighlights(t.CollegeHighlightType.PLAYER)),s(6),E("visible",t.showHighlightEdit),m("header",t.headerText)("modal",!0)("closable",!0)("showHeader",!0),s(2),u(t.highlightModalFields&&t.showHighlightEdit?164:-1),s(7),u(t.isPlayer?171:-1),s(3),B(t.getHighlights(t.CollegeHighlightType.ACADEMIC)),s(11),u(t.isPlayer?185:-1),s(3),B(t.getHighlights(t.CollegeHighlightType.ACTIVITY)),s(17),m("disabled",t.downloadingPDF),s(2),u(t.downloadingPDF?207:-1),s(),u(t.downloadingPDF?-1:208)}}var Co=(()=>{let d=class d{constructor(i,n,o,x,b){this.siteDataService=i,this.route=n,this.authorizeService=o,this.formService=x,this.collegeProfileService=b,this.showYourInfoEdit=!1,this.showHighlightEdit=!1,this.loading=!0,this.CollegeHighlightType=ge,this.showCollegeProfileLinkDialog=!1,this.downloadingPDF=!1,this.menuOptions=[{label:"Edit",command:()=>{this.showHighlightEdit=!0}},{label:"Delete",command:()=>{this.deleteHighlight()}}]}
649ngOnInit(){this.playerID=this.getPlayerIdFromRoute(this.route.snapshot),this.collegeProfileLink=`${window.location.origin}/college-profile/player/${this.playerID}`,R({metadata:this.collegeProfileService.getPlayerCollegeDataMetadata(),highlightMetadata:this.collegeProfileService.getPlayerCollegeHighlightMetadata(),data:this.collegeProfileService.getPlayerCollegeData(this.playerID),highlights:this.collegeProfileService.getPlayerCollegeHighlights(this.playerID)}).subscribe({next:i=>{this.fields=i.metadata.fields,this.playerHighlightFields=i.highlightMetadata.fields,this.highlights=i.highlights,this.highlightFields=i.highlightMetadata.fields.filter(o=>o.controlName==="highlight");let n=this.playerHighlightFields.find(o=>o.controlName==="startDate");n.required=!0,n.validators.push({validatorType:Yt.REQUIRED}),this.playerCollegeData=i.data,this.loading=!1,this.siteDataService.hideSiteLoader()},error:()=>{this.loading=!1,this.siteDataService.hideSiteLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving profile.")}}),this.authorizeService.getUser().subscribe(i=>{i&&(this.fullAccess=this.authorizeService.userHasPermissions(i,[Se.FullMemberAccess]),this.isAdmin=this.authorizeService.isAdmin(i.role),this.isPlayer=this.authorizeService.isPlayer(i.role))})}getPlayerIdFromRoute(i){return i?i.params.id?+i.params.id:i.params.playerID?+i.params.playerID:this.getPlayerIdFromRoute(i.parent):null}getField(i){return this.fields.find(n=>n.controlName===i)}savePlayerCollegeData(i){this.collegeProfileService.savePlayerCollegeData(i,!this.playerCollegeData,this.playerID).subscribe({next:()=>{this.playerCollegeData=Ee({},i),this.formService.hideFormLoader(),this.showYourInfoEdit=!1,this.siteDataService.showSiteSuccessAlert("College profile information saved successfully")},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving college profile information.")}})}savePlayerCollegeHighlight(i,n){i.collegeHighlightTypeID=this.highlightType,this.collegeProfileService.savePlayerCollegeHighlight(i,this.highlightID,this.playerID).subscribe({next:o=>{this.highlightID?(this.highlight.startDate=i.startDate,this.highlight.endDate=i.endDate,this.highlight.highlight=i.highlight):(i.playerCollegeHighlightID=o,this.highlight=i,this.highlights.push(this.highlight)),this.highlight=new Xe,this.formService.hideFormLoader(),n?this.highlightID=void 0:this.showHighlightEdit=!1,this.siteDataService.showSiteSuccessAlert("College profile information saved successfully")},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem saving college profile information.")}})}deleteHighlight(){this.collegeProfileService.deleteHighlight(this.highlightID,this.playerID).subscribe({next:()=>{this.highlights=this.highlights.filter(i=>i.playerCollegeHighlightID!==this.highlightID),this.siteDataService.showSiteSuccessAlert("Information deleted successfully")},error:()=>{this.formService.hideFormLoader(),this.siteDataService.showSiteErrorAlert("There was a problem with deleting this information.")}})}setupHighlightModal(i,n){switch(this.highlightType=i,this.highlightID=n,n?this.highlight=this.highlights.find(o=>o.playerCollegeHighlightID===n):this.highlight=void 0,this.highlightType){case ge.PLAYER:this.headerText="Add a Player Accolade",this.highlightModalFields=this.playerHighlightFields;break;case ge.ACADEMIC:this.headerText="Add an Academic Accolade",this.highlightModalFields=this.highlightFields;break;case ge.ACTIVITY:this.headerText="Add an Activity",this.highlightModalFields=this.highlightFields;break}}getHighlights(i){return this.highlights.filter(n=>n.collegeHighlightTypeID===i).sort((n,o)=>new Date(n.startDate)<new Date(o.startDate)?1:new Date(o.startDate)<new Date(n.startDate)?-1:0)}getYearLabel(i){return new Date(i.startDate).getFullYear().toString()+(i.endDate?"-"+new Date(i.endDate).getFullYear():"")}generateProfile(){this.downloadingPDF=!0,this.collegeProfileService.getPlayerCollegeProfile(this.playerID).subscribe({next:i=>{ce(i),this.downloadingPDF=!1},error:()=>{this.downloadingPDF=!1,this.siteDataService.showSiteErrorAlert("There was a problem generating college profile.")}})}copyCollegeProfileLink(){this.siteDataService.copyToClipboard(this.collegeProfileLink)}};d.\u0275fac=function(n){return new(n||d)(g(A),g(Et),g(Re),g(te),g(Ze))},d.\u0275cmp=w({type:d,selectors:[["app-college-profile-edit"]],inputs:{playerID:"playerID"},standalone:!1,decls:21,vars:7,consts:[["valueOverride",""],["form",""],["menu",""],["header","College Profile Link","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[1,"card"],[1,"row","form-action","no-gutters","justify-content-between","mt-3"],[1,"btn","btn-primary",3,"click"],[1,"btn","btn-secondary",3,"click"],[1,"d-flex"],[1,"flex-grow-1"],[1,"mb-3"],[1,"card","mb-4","edit-card"],[3,"ngClass"],[1,"card-body","read-only-form",3,"ngClass"],[1,"form-wrapper"],[3,"field","entity"],["styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","header","modal","closable","showHeader"],["formID","data-form",3,"onSubmit","onCancel","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","buttonsPosition"],["fieldName","school"],["fieldName","height"],["fieldName","weight"],["fieldName","gpa"],["fieldName","act"],["fieldName","sat"],["fieldName","instagram"],["fieldName","twitter"],["fieldName","mileTime"],["fieldName","highlightVideoUrl"],["fieldName","approachTouch"],["fieldName","standingReach"],["fieldName","blockJump"],["fieldName","standingVerticalJump"],["fieldName","preferredFootID"],["appendTo","body",3,"popup","model"],[1,"card","edit-card","mb-4"],[1,"form-tooltip-toggle"],["pTooltip","Include any personal or team achievements or awards","tooltipPosition","top",1,"far","fa-info-circle"],[1,"highlights-grid"],[1,"btn","btn-sm","btn-add",3,"click"],[1,"pl-3"],[1,"position-sticky-top"],[1,"mb-2","text-right"],[1,"btn","btn-secondary","btn-lg","full-width",3,"click","disabled"],[1,"btn","btn-secondary","btn-lg","full-width",3,"click"],[1,"fa-light","fa-arrow-down-to-line","mr-1"],[1,"btn","btn-sm","header-action",3,"click"],[1,"text-medium"],[1,"card-footer"],[1,"btn","btn-naked",3,"click"],[1,"fa-light","fa-pencil","d-inline-block","mr-2"],[1,"row","bg-grey-lt","mx-0"],[1,"col-auto"],[1,"year-range"],[1,"col"],[1,"btn","btn-naked--with-hover","btn-sm","btn-tertiary",3,"click"],[1,"fa-solid","fa-ellipsis"],[1,"sr-only"],["formID","highlight-form",3,"onSubmit","onSaveAndAdd","onCancel","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","buttonsPosition","showSaveAndAddButton"],["fieldName","startDate"],["fieldName","endDate"],["fieldName","highlight"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"]],template:function(n,o){n&1&&(p(0,ra,223,73),l(1,"p-dialog",3),F("visibleChange",function(b){return T(o.showCollegeProfileLinkDialog,b)||(o.showCollegeProfileLinkDialog=b),b}),e(2,`
650    `),l(3,"p"),e(4,"Here is the link to this player's college profile:"),r(),e(5,`
651    `),l(6,"div",4),e(7,`
652      `),l(8,"strong"),e(9),r(),e(10,`
653    `),r(),e(11,`
654    `),l(12,"div",5),e(13,`
655      `),l(14,"button",6),f("click",function(){return o.copyCollegeProfileLink()}),e(15,"Copy Link"),r(),e(16,`
656      `),l(17,"button",7),f("click",function(){return o.showCollegeProfileLinkDialog=!1}),e(18,"Close"),r(),e(19,`
657    `),r(),e(20,`
658  `),r()),n&2&&(u(o.loading?-1:0),s(),E("visible",o.showCollegeProfileLinkDialog),m("showHeader",!0)("closable",!0)("modal",!0)("draggable",!1),s(8),S(o.collegeProfileLink))},dependencies:[he,$,ne,Ge,W,Lt,Ue,Ae],styles:[".border-top-lg[_ngcontent-%COMP%]{border-color:var(--002d73)}.header-action[_ngcontent-%COMP%]{height:max-content;margin-left:auto;position:relative;top:-.375rem;text-transform:uppercase;min-width:60px}.highlights-grid[_ngcontent-%COMP%]{font-size:var(--text-medium);margin-bottom:1rem}.highlights-grid[_ngcontent-%COMP%]   .row[_ngcontent-%COMP%], .highlights-grid[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{background-color:var(--grey-100);margin-left:0;margin-right:0;display:flex;align-items:center;padding:.25rem;border-bottom:1px solid var(--color-white)}.year-range[_ngcontent-%COMP%]{width:100px;display:inline-block;color:var(--grey-800)}.read-only-form[_ngcontent-%COMP%]     .form-group, .read-only-form[_ngcontent-%COMP%]     .field-view-only-row{border-bottom:var(--border);padding-bottom:.5rem;align-items:center;padding:.5rem 0;margin:0}.read-only-form[_ngcontent-%COMP%]     .form-group label, .read-only-form[_ngcontent-%COMP%]     .field-view-only-row label{color:var(--grey-800);font-size:var(--text-medium);max-width:50%;flex:0 0 50%}.read-only-form.highlights-grid[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%]{justify-content:space-between;padding:0rem .5rem}.read-only-form.highlights-grid[_ngcontent-%COMP%]   .form-group[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{font-weight:700;font-size:var(--text-default)}textarea[_ngcontent-%COMP%]{width:70%}  .date-range{flex:0 0 70%;max-width:70%}  .date-range label{display:block;flex:0 0 100%;max-width:100%}.form-group-nested-wrapper[_ngcontent-%COMP%]{display:flex;align-items:flex-end}  .form-group-nested{width:70%}
658  .form-group-nested .form-group{display:inline-block;margin:0;min-width:30%}"]});let a=d;return a})();var sa=["optionsMenu"],da=["profileImageUpload"],ca=()=>({width:"50vw"}),ma=()=>({width:"auto"});function pa(a,d){if(a&1&&(e(0,`
659      `),_(1,"div",2),O(2,"safeStyle"),e(3,`
660    `)),a&2){let t=c(3);s(),Ie("background-image",Z(2,5,"url("+t.imageUrl+")")),re("square",!t.showCircle),m("ngClass",t.circleClass)}}function ua(a,d){if(a&1&&(e(0,`
661      `),_(1,"div",2),O(2,"safeStyle"),e(3,`
662    `)),a&2){let t=c(3);s(),Ie("background-image",Z(2,7,"url("+t.clubImageUrl+")")),re("square",!t.showCircle)("no-bg",t.isClubLogo),m("ngClass",t.circleClass)}}function ha(a,d){if(a&1&&(e(0,`
663      `),l(1,"app-user-initials",3),e(2,`
664      `),r(),e(3,`
665    `)),a&2){let t=c(3);s(),m("firstName",(t.player.user==null?null:t.player.user.firstName)||t.firstName)("lastName",(t.player.user==null?null:t.player.user.lastName)||t.lastName)("id",(t.player.user==null?null:t.player.user.userID)||t.userID)("size",t.avatarSize)("showCircle",t.showCircle)}}function ya(a,d){if(a&1&&(e(0,`
666    `),p(1,pa,4,7),p(2,ua,4,9),p(3,ha,4,5)),a&2){let t=c(2);s(),u(!t.initialsOnly&&t.imageUrl&&!t.isClubLogo?1:-1),s(),u(t.isClubLogo?2:-1),s(),u(t.initialsOnly||!t.imageUrl&&!t.isClubLogo?3:-1)}}function fa(a,d){if(a&1&&(e(0,`
667            `),l(1,"app-user-initials",3),e(2,`
668            `),r(),e(3,`
669          `)),a&2){let t=c(4);s(),m("firstName",(t.player.user==null?null:t.player.user.firstName)||t.firstName)("lastName",(t.player.user==null?null:t.player.user.lastName)||t.lastName)("id",(t.player.user==null?null:t.player.user.userID)||t.userID)("size",t.avatarSize)("showCircle",t.showCircle)}}function _a(a,d){if(a&1&&(e(0,`
670            `),_(1,"div",9),O(2,"safeStyle"),e(3,`
671          `)),a&2){let t=c(4);s(),Ie("background-image",Z(2,7,"url("+t.imageUrl+")")),re("square",!t.showCircle)("no-bg",t.isClubLogo),m("ngClass",t.circleClass)}}function Ca(a,d){if(a&1){let t=C();e(0,`
672        `),l(1,"button",8),f("click",function(n){h(t);let o=c(3);return y(o.toggleOptionsMenu(n))}),e(2,`
673          `),p(3,fa,4,5),p(4,_a,4,9),r(),e(5,`
674      `)}if(a&2){let t=c(3);s(),J("aria-label",t.editPhotoLabel),s(2),u(t.initialsOnly||!t.imageUrl?3:-1),s(),u(!t.initialsOnly&&t.imageUrl?4:-1)}}function xa(a,d){a&1&&(e(0,`
675            `),l(1,"div"),e(2,"Photo must be less than 10MB"),r(),e(3,`
676          `))}function ga(a,d){a&1&&(e(0,`
677            `),l(1,"div"),e(2,`
678              Photo must be in one of the following formats: .jpg, .jpeg, .png, .gif
679            `),r(),e(3,`
680          `))}function ba(a,d){if(a&1&&(e(0,`
681        `),l(1,"div",10),e(2,`
682          `),p(3,xa,4,0),p(4,ga,4,0),r(),e(5,`
683      `)),a&2){let t=c(3);s(3),u(t.errors.filesize?3:-1),s(),u(t.errors.fileextension?4:-1)}}function va(a,d){if(a&1){let t=C();e(0,`
684        `),l(1,"app-image-cropper",11),f("finalImage",function(n){h(t);let o=c(3);return y(o.onFileChange(n))}),e(2,`
685        `),r(),e(3,`
686      `)}if(a&2){let t=c(3);s(),m("fileChangedEvent",t.imageCropperLoadEvent)("loading",t.saving)("icAspectRatio",1/1)}}function Sa(a,d){if(a&1){let t=C();e(0,`
687    `),l(1,"div",4),e(2,`
688      `),p(3,Ca,6,3),p(4,ba,6,2),r(),e(5,`
689    `),l(6,"input",5,0),f("change",function(n){h(t);let o=c(2);return o.imageCropperLoadEvent=n,y(o.showCropperDialog=!0)}),r(),e(8,`
690    `),l(9,"p-dialog",6),F("visibleChange",function(n){h(t);let o=c(2);return T(o.showCropperDialog,n)||(o.showCropperDialog=n),y(n)}),e(10,`
691      `),p(11,va,4,3),r(),e(12,`
692    `),l(13,"p-menu",7,1),e(15,`
693    `),r(),e(16,`
694  `)}if(a&2){let t=c(2);s(3),u(t.player&&t.player.playerID?3:-1),s(),u(t.errors?4:-1),s(2),m("accept",t.acceptTypes),s(3),oe(H(12,ca)),E("visible",t.showCropperDialog),m("closable",!t.saving),s(2),u(t.showCropperDialog?11:-1),s(2),oe(H(13,ma)),m("model",t.menuOptions)("popup",!0)}}function Pa(a,d){if(a&1&&(e(0,`
695  `),p(1,ya,4,3),p(2,Sa,17,14)),a&2){let t=c();s(),u(t.editable?-1:1),s(),u(t.editable?2:-1)}}function wa(a,d){if(a&1&&(e(0,`
696  `),_(1,"p-skeleton",12),e(2,`
697`)),a&2){let t=c();s(),m("shape",t.showCircle?"circle":"square")("size",t.skeletonSize)}}var Ci=(()=>{let d=class d{constructor(i,n){this.siteDataService=i,this.tryoutService=n,this.initialsOnly=!0,this.editable=!1,this.onChange=new N,this.largeCircle=!1,this.showCircle=!0,this.loading=!0,this.saving=!1,this.menuOptions=[],this.isValid=!0,this.showCropperDialog=!1,this.acceptTypes=It,this.isClubLogo=!1,this.unsubscribe$=new M}ngOnInit(){this.playerNumber||(this.playerNumber=Math.floor(Math.random()*Math.floor(6))+1),this.initialsOnly?this.loading=!1:(this.editable=!0,(this.editable?this.tryoutService.getUserPlayerCardPhoto(this.player.playerID,this.registrationID):G(null)).pipe(v(this.unsubscribe$)).subscribe(i=>{i&&(this.imageUrl=i.internalDocumentName320P,this.playerDocument=i),this.loading=!1}))}get avatarSize(){return this.size||(this.largeCircle?"large":"default")}get circleClass(){return`${this.avatarSize}-circle`}get skeletonSize(){return Kt[this.avatarSize]}get editPhotoLabel(){return di(this.player,this.firstName,this.lastName)}get playerInitials(){return this.player&&this.player.user?this.player.user.firstName.substring(0,1)+this.player.user.lastName.substring(0,1):""}toggleOptionsMenu(i){this.menuOptions=[],this.menuOptions.push({label:"Upload a new Tryout Photo",icon:"fas fa-upload",command:()=>{this.profileImageUpload.nativeElement.click()}}),this.imageUrl&&!this.errors&&(this.menuOptions.push({label:"Download Tryout Photo",icon:"fas fa-download",command:()=>{this.downloadPlayerPhoto(!0)}}),this.menuOptions.push({label:"Delete Tryout Photo",icon:"fas fa-tras
697h",command:()=>{this.deleteTryoutPhoto()}})),this.optionsMenu.toggle(i)}onFileChange(i){if(this.isValid=!0,i){let n=this.imageUrl;Ht(i,ve)?Bt(i,Ve)?i!==null&&(this.errors=null,this.profilePhoto=i,this.saving=!0,console.log("registration id ",this.registrationID),this.createTryoutPlayerCardPhoto(n)):(this.errors={filesize:!0},this.isValid=!1,this.profilePhoto=null):(this.errors={fileextension:!0},this.isValid=!1,this.profilePhoto=null)}else this.errors=null,this.profilePhoto=null,this.imageUrl=null;this.onChange.emit(this.profilePhoto)}createTryoutPlayerCardPhoto(i){this.tryoutService.createPlayerCardDocument(this.registrationID,this.player.playerID,this.profilePhoto).pipe(pt(n=>{this.playerDocument=n}),q(()=>this.tryoutService.downloadPlayerCardDocumentBase64(this.registrationID,this.player.playerID)),v(this.unsubscribe$)).subscribe({next:n=>{this.imageUrl=n,this.siteDataService.showSiteSuccessAlert("Player tryout photo saved successfully"),this.saving=!1,this.showCropperDialog=!1},error:()=>{this.imageUrl=i,this.siteDataService.showSiteErrorAlert("There was a problem saving the player tryout photo"),this.saving=!1}})}deleteTryoutPhoto(){this.saving=!0,this.tryoutService.deletePlayerCardDocument(this.registrationID,this.player.playerID).pipe(v(this.unsubscribe$)).subscribe({next:()=>{this.imageUrl=null,this.playerDocument=null,this.profilePhoto=null,this.siteDataService.showSiteSuccessAlert("Player tryout photo deleted successfully"),this.saving=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem deleting the player tryout photo"),this.saving=!1}})}downloadPlayerPhoto(i=!1){this.tryoutService.downloadPlayerCardDocument(this.registrationID,this.player.playerID,i).pipe(v(this.unsubscribe$)).subscribe({next:n=>{ce(n)},error:n=>{this.siteDataService.showSiteErrorAlert("The requested file could not be found.")}})}ngOnDestroy(){this.unsubscribe$.next(null),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(A),g(xe))},d.\u0275cmp=w({type:d,selectors:[["app-player-tryout-photo"]],viewQuery:function(n,o){if(n&1&&Fe(sa,5)(da,5),n&2){let x;me(x=pe())&&(o.optionsMenu=x.first),me(x=pe())&&(o.profileImageUpload=x.first)}},inputs:{player:"player",playerNumber:"playerNumber",initialsOnly:"initialsOnly",firstName:"firstName",lastName:"lastName",userID:"userID",editable:"editable",registrationID:"registrationID",largeCircle:"largeCircle",size:"size",showCircle:"showCircle",clubImageUrl:"clubImageUrl"},outputs:{onChange:"onChange"},standalone:!1,decls:3,vars:1,consts:[["profileImageUpload",""],["optionsMenu",""],["aria-hidden","true",1,"player-profile-image","user-image",3,"ngClass"],[3,"firstName","lastName","id","size","showCircle"],[1,"profile-image"],["hidden","","type","file",3,"change","accept"],["header","Player Photo Preview",3,"visibleChange","visible","closable"],["appendTo","body","styleClass","profile-picture-menu",3,"model","popup"],["type","button",1,"btn-a11y","profile-image-container","editable","icon-badge-camera",3,"click"],["aria-hidden","true",1,"center","player-profile-image","user-image",3,"ngClass"],[1,"form-error-message"],["icFormat","png","icNotes","Photo must be less than 10MB and in one of the following formats: .jpg, .jpeg, .png, .gif. It is recommended you upload a photo with square dimensions ie: 200px x 200px.",3,"finalImage","fileChangedEvent","loading","icAspectRatio"],[3,"shape","size"]],template:function(n,o){n&1&&(e(0,`
698`),p(1,Pa,3,2)(2,wa,3,2)),n&2&&(s(),u(o.player&&!o.loading?1:2))},dependencies:[he,Wt,ei,Xt,W,Ue,qt,Zt],styles:[".profile-image-container[_ngcontent-%COMP%]{position:relative;display:block}"]});let a=d;return a})();function Ea(a,d){if(a&1&&(e(0,`
699        `),l(1,"div",5),e(2),O(3,"date"),r(),e(4,`
700      `)),a&2){let t=c(2);s(2),Ct(`
701          `,(t.player==null?null:t.player.user.genderID)===1?"Male":(t.player==null?null:t.player.user.genderID)===2?"Female":"Other",` \u2022
702          `,z(3,3,t.player.user.dob,"y"),`
703        `,t.player.playerClubData!=null&&t.player.playerClubData.tryoutNumber?"\u2022 "+t.player.playerClubData.tryoutNumber:"")}}function Ta(a,d){if(a&1&&e(0),a&2){let t=c(3);I(`
704              `,t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null?null:t.player.family.parents[0].user.cellPhone,`
705            `)}}function Fa(a,d){a&1&&(e(0,`
706              `),l(1,"span"),e(2,`
707                \xA0\xA0\u2022\xA0\xA0
708              `),r(),e(3,`
709            `))}function Ia(a,d){if(a&1&&(e(0,`
710              `),l(1,"a",10),O(2,"safeUrl"),e(3,"email"),r(),e(4,`
711            `)),a&2){let t=c(3);s(),m("href",Z(2,1,"mailto:"+(t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null?null:t.player.family.parents[0].user.email)),Te)}}function Aa(a,d){if(a&1&&(e(0,`
712      `),l(1,"div",6),e(2,`
713        `),l(3,"div",7),e(4,`
714          `),l(5,"div",8),e(6,"Family Contact"),r(),e(7,`
715          `),l(8,"div",9),e(9),r(),e(10,`
716          `),l(11,"div"),e(12,`
717            `),p(13,Ta,1,1),p(14,Fa,4,0),p(15,Ia,5,3),r(),e(16,`
718        `),r(),e(17,`
719      `),r(),e(18,`
720    `)),a&2){let t=c(2);s(9),S(t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null?null:t.player.family.parents[0].user.fullName),s(4),u(!(t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null)&&t.player.family.parents[0].user.cellPhone?13:-1),s(),u(!(t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null)&&t.player.family.parents[0].user.cellPhone&&(!(t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null)&&t.player.family.parents[0].user.email)?14:-1),s(),u(!(t.player==null||t.player.family==null||t.player.family.parents[0]==null||t.player.family.parents[0].user==null)&&t.player.family.parents[0].user.email?15:-1)}}function Na(a,d){if(a&1&&(e(0,`
721  `),l(1,"div",0),e(2,`
722    `),l(3,"div",1),e(4,`
723      `),_(5,"app-player-tryout-photo",2),e(6,`
724    `),r(),e(7,`
725    `),l(8,"div",3),e(9,`
726      `),l(10,"h2",4),e(11),r(),e(12,`
727      `),p(13,Ea,5,6),r(),e(14,`
728    `),p(15,Aa,19,4),r(),e(16,`
729`)),a&2){let t=c();s(5),m("registrationID",t.registrationID)("player",t.player)("initialsOnly",!1)("largeCircle",!0)("showCircle",!1),s(6),ue("",t.player==null?null:t.player.user.firstName," ",t.player==null?null:t.player.user.lastName),s(2),u(t.player!=null&&t.player.user?13:-1),s(2),u(!(t.player==null||t.player.family==null||t.player.family.parents[0]==null)&&t.player.family.parents[0].user?15:-1)}}function Oa(a,d){if(a&1&&(e(0,`
730      `),l(1,"div",3),e(2,`
731        `),l(3,"h5",12),e(4,"Registration"),r(),e(5,`
732        `),l(6,"strong",13),e(7),r(),e(8,`
733      `),r(),e(9,`
734    `)),a&2){let t=c(2);s(7),S(t.registrationName)}}function Ma(a,d){if(a&1&&(e(0,`
735      `),l(1,"div",3),e(2,`
736        `),l(3,"h5",12),e(4,"Tryout Pool"),r(),e(5,`
737        `),l(6,"strong",13),e(7),r(),e(8,`
738      `),r(),e(9,`
739    `)),a&2){let t=c(2);s(7),S(t.playerPoolName)}}function ka(a,d){if(a&1&&(e(0,`
740      `),l(1,"div",3),e(2,`
741        `),l(3,"h5",12),e(4,"Tier"),r(),e(5,`
742        `),l(6,"strong",13),e(7),r(),e(8,`
743      `),r(),e(9,`
744    `)),a&2){let t=c(2);s(7),S(t.tierName)}}function Va(a,d){if(a&1&&(e(0,`
745      `),l(1,"div",3),e(2,`
746        `),l(3,"h5",12),e(4,"Number"),r(),e(5,`
747        `),l(6,"strong",13),e(7),r(),e(8,`
748      `),r(),e(9,`
749    `)),a&2){let t=c(2);s(7),S(!(t.player==null||t.player.playerClubData==null)&&t.player.playerClubData.tryoutNumber?t.player.playerClubData.tryoutNumber:t.tryoutNumber)}}function La(a,d){if(a&1&&(e(0,`
750  `),l(1,"div",11),e(2,`
751    `),p(3,Oa,10,1),p(4,Ma,10,1),p(5,ka,10,1),p(6,Va,10,1),r(),e(7,`
752`)),a&2){let t=c();s(3),u(t.registrationName?3:-1),s(),u(t.playerPoolName?4:-1),s(),u(t.tierName?5:-1),s(),u(!(t.player==null||t.player.playerClubData==null)&&t.player.playerClubData.tryoutNumber||t.tryoutNumber?6:-1)}}var Ke=(()=>{let d=class d{constructor(){this.hidePlayerName=!1}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=w({type:d,selectors:[["app-player-tryout-info"]],inputs:{registrationID:"registrationID",registrationName:"registrationName",playerPoolName:"playerPoolName",tierName:"tierName",tryoutNumber:"tryoutNumber",player:"player",hidePlayerName:"hidePlayerName"},standalone:!1,decls:2,vars:2,consts:[[1,"row","d-flex","align-items-center","mb-3","border-bottom","pb-3"],[1,"col-auto"],[3,"registrationID","player","initialsOnly","largeCircle","showCircle"],[1,"col"],[1,"mb-0"],[1,"text-small"],[1,"col-auto","right"],[1,"border-left","pl-3","line-height-2","text-medium"],[1,"text-uppercase","text-smallest"],[1,"fw-700","mt-1","line-height-1"],["target","_blank",3,"href"],[1,"row","d-flex","align-items-top","mb
752-3","border-bottom","pb-3","full-width"],[1,"fw-100","mb-2","text-grey","text-uppercase"],[1,"line-height-1","d-inline-block"]],template:function(n,o){n&1&&(p(0,Na,17,9),p(1,La,8,4)),n&2&&(u(o.hidePlayerName?-1:0),s(),u(o.registrationName||o.playerPoolName||o.tierName||!(o.player==null||o.player.playerClubData==null)&&o.player.playerClubData.tryoutNumber||o.tryoutNumber?1:-1))},dependencies:[Ci,bt,Ut],encapsulation:2});let a=d;return a})();function Ra(a,d){a&1&&(e(0,`
753  `),l(1,"div",0),e(2,`
754    `),_(3,"app-skeleton-template",1),e(4,`
755  `),r(),e(5,`
756  `),l(6,"div",0),e(7,`
757    `),_(8,"app-skeleton-template",2),e(9,`
758  `),r(),e(10,`
759  `),l(11,"div",3),e(12,`
760    `),l(13,"div",4),_(14,"app-skeleton-template",2),r(),e(15,`
761    `),l(16,"div",5),_(17,"app-skeleton-template",2),r(),e(18,`
762  `),r(),e(19,`
763  `),l(20,"div",0),e(21,`
764    `),_(22,"app-skeleton-template",2),e(23,`
765  `),r(),e(24,`
766`)),a&2&&(s(3),m("showLargeProfilePic",!0)("showProfilePicCircle",!1))}function Ua(a,d){if(a&1&&(e(0,`
767      `),l(1,"div",12),e(2,`
768        `),l(3,"div",13),e(4,`
769          `),l(5,"div",14),e(6,`
770            `),l(7,"span",15),e(8),r(),e(9,`
771            `),l(10,"span",16),e(11),O(12,"number"),r(),e(13,`
772          `),r(),e(14,`
773        `),r(),e(15,`
774        `),l(16,"div",13),e(17,`
775          `),l(18,"div",17),e(19,`
776            `),l(20,"span",15),e(21,"Average Ranking"),r(),e(22,`
777            `),l(23,"span",16),e(24),O(25,"number"),r(),e(26,`
778          `),r(),e(27,`
779        `),r(),e(28,`
780      `),r(),e(29,`
781    `)),a&2){let t=c(2);s(8),I("Average ",t.ratingLabelOverride),s(3),S(z(12,3,t.getAverageRating(),"1.0-2")||"N/A"),s(13),S(z(25,6,t.getAverageRank(),"1.0-2")||"N/A")}}function Ya(a,d){if(a&1&&(e(0,`
782            `),l(1,"th",18),e(2),_(3,"p-sortIcon",19),e(4,`
783            `),r(),e(5,`
784          `)),a&2){let t=d.$implicit,i=c(3);s(),m("pSortableColumn",t.field),J("aria-label",i.AriaLabels.ACTIVATE_SORT),s(),I(`
785              `,t.header,`
786              `),s(),m("field",t.field)}}function Ba(a,d){if(a&1&&(e(0,`
787        `),l(1,"tr"),e(2,`
788          `),Y(3,Ya,6,4,null,null,U),r(),e(5,`
789      `)),a&2){let t=c(2);s(3),B(t.columns)}}function Ha(a,d){if(a&1&&(e(0,`
790        `),l(1,"tr"),e(2,`
791          `),l(3,"td"),e(4),r(),e(5,`
792          `),l(6,"td"),e(7),r(),e(8,`
793          `),l(9,"td"),e(10),r(),e(11,`
794          `),l(12,"td"),e(13),r(),e(14,`
795        `),r(),e(15,`
796      `)),a&2){let t=d.$implicit;s(4),S(t.coachName),s(3),S(t.rating),s(3),S(t.rank),s(3),S(t.notes)}}function za(a,d){if(a&1&&(e(0,`
797        `),l(1,"tr"),e(2,`
798          `),l(3,"td",20),e(4,`
799            This player currently has not been rated or ranked by any staff
800          `),r(),e(5,`
801        `),r(),e(6,`
802      `)),a&2){let t=d.$implicit;s(3),J("colspan",t.length)}}function Wa(a,d){if(a&1){let t=C();e(0,`
803  `),l(1,"div"),e(2,`
804    `),_(3,"app-player-tryout-info",6),e(4,`
805    `),p(5,Ua,30,9),r(),e(6,`
806  `),l(7,"div",7),e(8,`
807    `),l(9,"p-table",8),f("onLazyLoad",function(n){h(t);let o=c();return y(o.search(n))}),e(10,`
808      `),k(11,Ba,6,0,"ng-template",9),e(12,`
809      `),k(13,Ha,16,4,"ng-template",10),e(14,`
810      `),k(15,za,7,1,"ng-template",11),e(16,`
811    `),r(),e(17,`
812  `),r(),e(18,`
813`)}if(a&2){let t=c();s(3),m("player",t.player)("registrationID",t.registrationID)("registrationName",t.regName)("playerPoolName",t.poolName)("tierName",t.tierName)("tryoutNumber",t.tryoutNumber)("hidePlayerName",t.hidePlayerName),s(2),u((t.searchResults==null?null:t.searchResults.length)>0?5:-1),s(4),m("columns",t.columns)("value",t.searchResults)("lazy",!0)("paginator",!1)("alwaysShowPaginator",!1)("rows",100)("loading",t.loading)}}var Ko=(()=>{let d=class d{constructor(i,n){this.siteDataService=i,this.playerService=n,this.hidePlayerName=!1,this.columns=[{field:"coachName",header:"Coach"},{field:"rating",header:"Rating"},{field:"rank",header:"Ranking"},{field:"notes",header:"Note"}],this.AriaLabels=Le,this.loading=!0,this.order="coachName ASC",this.loadingPlayer=!0,this.unsubscribe$=new M}ngOnInit(){this.ratingLabelOverride&&(this.columns.find(i=>i.field==="rating").header=this.ratingLabelOverride),this.hidePlayerName?this.loadingPlayer=!1:this.playerService.getPlayer(this.playerID,!0).subscribe({next:i=>{this.player=i,this.loadingPlayer=!1}})}getAverageRating(){if(this.searchResults?.length>0){let i=this.searchResults.filter(n=>n.rating!==null&&n.rating!==void 0);return i?.length>0?i.reduce((n,o)=>n+o.rating,0)/i.length:"N/A"}else return"N/A"}getAverageRank(){if(this.searchResults?.length>0){let i=this.searchResults.filter(n=>n.rank!==null&&n.rank!==void 0);return i?.length>0?i.reduce((n,o)=>n+o.rank,0)/i.length:"N/A"}else return"N/A"}search(i=null){this.loading=!0,i&&(this.order=i.sortField+" "+(i.sortOrder===1?"ASC":"DESC")),this.playerService.getPlayerRankings(this.playerID,this.poolID,this.registrationID,this.order).pipe(v(this.unsubscribe$)).subscribe({next:n=>{this.searchResults=n,this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem getting data.")}})}ngOnDestroy(){this.unsubscribe$.next(null),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(A),g(V))},d.\u0275cmp=w({type:d,selectors:[["app-player-rating"]],inputs:{playerID:"playerID",registrationID:"registrationID",poolID:"poolID",regName:"regName",poolName:"poolName",tierName:"tierName",ratingLabelOverride:"ratingLabelOverride",hidePlayerName:"hidePlayerName",tryoutNumber:"tryoutNumber"},standalone:!1,decls:2,vars:2,consts:[[1,"mb-3"],["skeletonType","playerHeader",3,"showLargeProfilePic","showProfilePicCircle"],["height","5rem"],[1,"row","mb-3"],[1,"col-4","offset-2","pl-3"],[1,"col-4","pr-3"],[3,"player","registrationID","registrationName","playerPoolName","tierName","tryoutNumber","hidePlayerName"],[1,"table-responsive"],["sortField","coachName",1,"table","table-striped","table-sm",3,"onLazyLoad","columns","value","lazy","paginator","alwaysShowPaginator","rows","loading"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[1,"row","d-flex","justify-content-center","no-gutters","mb-3"],[1,"col-auto"],[1,"px-5","py-2","bg-grey-lt","text-center","mr-2"],[1,"rating-detail-header"],[1,"fw-700","text-largest"],[1,"px-5","py-2","bg-grey-lt","text-center"],[3,"pSortableColumn"],[3,"field"],[2,"text-align","left"]],template:function(n,o){n&1&&(p(0,Ra,25,2),p(1,Wa,19,15)),n&2&&(u(o.loadingPlayer?0:-1),s(),u(!o.loadingPlayer&&(o.player||o.hidePlayerName)?1:-1))},dependencies:[Me,ie,He,ze,We,Ke,Ae],styles:[".rating-detail-header[_ngcontent-%COMP%]{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--text-medium);text-transform:uppercase}"]});let a=d;return a})();function $a(a,d){if(a&1){let t=C();e(0,`
814`),l(1,"div",1),e(2,`
815    `),l(3,"div",2),e(4,`
816        `),l(5,"h3"),e(6,`
817            School Info
818        `),r(),e(7,`
819    `),r(),e(8,`
820    `),l(9,"div",3),e(10,`
821        `),l(11,"app-field-view-only-row",4),f("editClicked",function(){h(t);let n=c(3);return y(n.setupModal(n.PlayerYearlyFieldType.SchoolName))}),e(12,`
822        `),r(),e(13,`
823        `),l(14,"app-field-view-only-row",4),f("editClicked",function(){h(t);let n=c(3);return y(n.setupModal(n.PlayerYearlyFieldType.Grade))}),e(15,`
824        `),r(),e(16,`
825    `),r(),e(17,`
826`),r(),e(18,`
827`)}if(a&2){let t=c(3);s(11),m("field",t.getField(t.fields,"schoolName"))("entity",t.currentData)("edit",!0),s(3),m("field",t.getField(t.fields,"gradeID"))("entity",t.currentData)("edit",!0)}}function ja(a,d){if(a&1&&(e(0,`
828`),p(1,$a,19,6)),a&2){let t=c(2);s(),u(t.player&&(t.fields==null?null:t.fields.length)>0?1:-1)}}function Ga(a,d){a&1&&(e(0,`
829`),l(1,"div",5),e(2,`
830    `),_(3,"app-skeleton-template",6),e(4,`
831`),r(),e(5,`
832`)),a&2&&(s(3),m("invertBg",!0))}function qa(a,d){if(a&1&&(e(0,`
833`),p(1,ja,2,1)(2,Ga,6,1)),a&2){let t=c();s(),u(t.loading?2:1)}}function Ja(a,d){if(a&1){let t=C();e(0,`
834    `),l(1,"app-dynamic-form",7),f("onSubmit",function(n){h(t);let o=c();return y(o.save(n))})("onCancel",function(){h(t);let n=c();return n.showEditDialog=!1,y(n.cancelled.emit())}),e(2,`
835        `),l(3,"app-dynamic-form-field",8),f("onChange",function(n){h(t);let o=c();return y(o.yearChanged(n))}),r(),e(4,`
836        `),_(5,"app-dynamic-form-field",9),e(6,`
837        `),_(7,"app-dynamic-form-field",10),e(8,`
838        `),_(9,"app-dynamic-form-field",11),e(10,`
839    `),r(),e(11,`
840    `)}if(a&2){let t=c();s(),m("fields",t.editFields)("entity",t.editData)("contentFieldsMode",!0)("horizontalForm",!0)("showCancelButton",!0)("showSubmitButton",!0)("buttonsPosition","left")}}var fs=(()=>{let d=class d{constructor(i,n,o){this.siteDataService=i,this.playerService=n,this.formService=o,this.viewOnly=!1,this.collectDataOnly=!1,this.year=new Date().getFullYear(),this.saved=new N,this.cancelled=new N,this.unsubscribe$=new M,this.currentData={schoolName:null,gradeID:null},this.loading=!0,this.showEditDialog=!1,this.PlayerYearlyFieldType=K}ngOnInit(){R({metadata:this.playerService.getPlayerYearlyClubDataMetadata(),editMetadata:this.playerService.getPlayerYearlyClubDataEditMetadata(),clubData:this.playerService.getPlayerYearlyClubData(this.player.playerID)}).pipe(v(this.unsubscribe$)).subscribe(i=>{this.fields=i.metadata.fields,this.allEditFields=i.editMetadata.fields,this.player.playerYearlyClubData=i.clubData,this.collectDataOnly||new Date().getMonth()<6&&this.year--,this.setCurrentData(),this.collectDataOnly&&this.setupModal(this.editPlayerYearlyFieldType),this.loading=!1})}save(i){i.playerYearlyFieldTypeID=this.editPlayerYearlyFieldType,this.collectDataOnly&&(i.effectiveDate=this.allEditFields.find(n=>n.controlName==="effectiveDate").options.find(n=>new Date(n.value).getFullYear()===this.year).value),this.playerService.savePlayerYearlyClubData(this.player.playerID,i,!this.newItem).pipe(mt(()=>this.playerService.getPlayerYearlyClubData(this.player.playerID)),v(this.unsubscribe$)).subscribe({next:n=>{this.player.playerYearlyClubData=n,this.setCurrentData(),this.playerService.playerUpdated(this.player),this.formService.hideFormLoader(),this.showEditDialog=!1,this.saved.emit(this.player),this.siteDataService.showSiteSuccessAlert("Player information saved successfully")},error:()=>{this.formService.hideFormLoader(),this.showEditDialog=!1,this.siteDataService.showSiteErrorAlert("There was a problem saving your player information.")}})}getField(i,n){return i.find(o=>o.controlName===n)}setCurrentData(){this.currentData.schoolName=this.player.playerYearlyClubData?.f
840ind(i=>i.playerYearlyFieldTypeID===K.SchoolName&&new Date(i.effectiveDate).getFullYear()===this.year)?.stringValue,this.currentData.gradeID=this.player.playerYearlyClubData?.find(i=>i.playerYearlyFieldTypeID===K.Grade&&new Date(i.effectiveDate).getFullYear()===this.year)?.numericValue,this.currentData=Ee({},this.currentData)}setupModal(i){this.editPlayerYearlyFieldType=i,this.editData=this.player.playerYearlyClubData?.find(n=>n.playerYearlyFieldTypeID===i&&new Date(n.effectiveDate).getFullYear()===this.year),this.editData?this.newItem=!1:(this.editData=new Pe,this.newItem=!0),this.editData.effectiveDate=this.allEditFields.find(n=>n.controlName==="effectiveDate").options.find(n=>new Date(n.value).getFullYear()===this.year).value,this.setupEditFields(i),this.showEditDialog=!0}yearChanged(i){this.editData=this.player.playerYearlyClubData?.find(n=>n.playerYearlyFieldTypeID===this.editPlayerYearlyFieldType&&new Date(n.effectiveDate).getFullYear()===new Date(i).getFullYear()),this.editData?this.newItem=!1:(this.editData=new Pe,this.newItem=!0),this.editData.effectiveDate=i}setupEditFields(i){let n;switch(this.editFields=JSON.parse(JSON.stringify(this.allEditFields)),this.collectDataOnly&&(n=this.editFields.find(o=>o.controlName==="effectiveDate"),n.viewOnly=!0),i){case K.SchoolName:this.editFields=this.editFields.filter(o=>o.controlName==="schoolName"||o.controlName==="effectiveDate"),n=this.editFields.find(o=>o.controlName==="schoolName"),n.controlName="stringValue",n.name="stringValue",n.key="stringValue";break;case K.Grade:this.editFields=this.editFields.filter(o=>o.controlName==="gradeID"||o.controlName==="effectiveDate"),n=this.editFields.find(o=>o.controlName==="gradeID"),n.controlName="numericValue",n.name="numericValue",n.key="numericValue";break}}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(A),g(V),g(te))},d.\u0275cmp=w({type:d,selectors:[["app-player-yearly-club-data"]],inputs:{player:"player",viewOnly:"viewOnly",collectDataOnly:"collectDataOnly",editPlayerYearlyFieldType:"editPlayerYearlyFieldType",year:"year"},outputs:{saved:"saved",cancelled:"cancelled"},standalone:!1,decls:4,vars:7,consts:[["header","School Info","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[1,"card","edit-card"],[1,"card-header"],[1,"card-body"],[3,"editClicked","field","entity","edit"],[1,"mb-3"],[3,"invertBg"],[3,"onSubmit","onCancel","fields","entity","contentFieldsMode","horizontalForm","showCancelButton","showSubmitButton","buttonsPosition"],["fieldName","effectiveDate",3,"onChange"],["fieldName","stringValue"],["fieldName","numericValue"],["fieldName","dateTimeValue"]],template:function(n,o){n&1&&(p(0,qa,3,1),l(1,"p-dialog",0),f("visibleChange",function(b){return o.showEditDialog||(o.collectDataOnly=b)}),e(2,`
841    `),p(3,Ja,12,7),r()),n&2&&(u(o.collectDataOnly?-1:0),s(),m("visible",o.showEditDialog||o.collectDataOnly)("showHeader",!0)("closable",!1)("modal",!0)("draggable",!1),s(2),u((o.showEditDialog||o.collectDataOnly)&&o.editFields?3:-1))},dependencies:[$,ne,Ge,ie,W],encapsulation:2});let a=d;return a})();function Qa(a,d){a&1&&(e(0,`
842  `),l(1,"div",1),e(2,`
843    `),_(3,"app-skeleton-template",2),e(4,`
844  `),r(),e(5,`
845`)),a&2&&(s(3),m("showLargeProfilePic",!1))}function Xa(a,d){if(a&1&&(e(0,`
846    `),l(1,"app-player-tryout-info",3),e(2,`
847    `),r(),e(3,`
848  `)),a&2){let t=c(2);s(),m("player",t.player)("registrationID",t.registrationID)("registrationName",t.registrationName)("playerPoolName",t.playerPoolName)("hidePlayerName",t.hidePlayerName)("tryoutNumber",t.tryoutNumber)}}function Za(a,d){if(a&1&&(e(0,`
849  `),p(1,Xa,4,6)),a&2){let t=c();s(),u(t.player&&!t.hidePlayerName?1:-1)}}var Fs=(()=>{let d=class d{constructor(i,n,o){this.playerService=i,this.tryoutService=n,this.siteDataService=o,this.hidePlayerName=!1,this.SurveyCriteriaType=ri,this.SurveyCriteriaFormFieldType=oi,this.evaluationCompareMode=!1,this.loadingEvaluationScorePlayer=!1,this.loadingEvaluationScores=!1,this.PlayerTryoutEvaluationTab=at,this.selectedTab=at.EVALUATIONS,this.unsubscribe$=new M}ngOnInit(){this.loadingEvaluationScorePlayer=!0,this.hidePlayerName?this.loadingEvaluationScorePlayer=!1:this.playerService.getPlayer(this.playerID,!0).pipe(v(this.unsubscribe$)).subscribe({next:i=>{this.player=i,this.loadingEvaluationScorePlayer=!1},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}
849),this.tryoutService.loadedPlayerEvaluationDetails.includes(this.playerID)||(this.loadingEvaluationScores=!0,this.tryoutService.getPlayerTryoutEvaluationDetails(this.registrationID,this.playerID,this.playerPoolID).pipe(v(this.unsubscribe$)).subscribe({next:i=>{this.tryoutService.playerEvaluationDetails[this.playerID]=i,this.tryoutService.playerEvaluationDetails[this.playerID]?.evaluations?.length&&(this.tryoutService.playerEvaluationDetails[this.playerID].evaluations[0].expanded=!0),this.tryoutService.playerEvaluationDetails[this.playerID]?.evaluators?.length&&(this.tryoutService.playerEvaluationDetails[this.playerID].evaluators[0].expanded=!0),this.tryoutService.loadedPlayerEvaluationDetails.push(this.playerID),this.loadingEvaluationScores=!1},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}}))}changeTab(i){this.selectedTab=i}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};d.\u0275fac=function(n){return new(n||d)(g(V),g(xe),g(A))},d.\u0275cmp=w({type:d,selectors:[["app-player-evaluation-details"]],inputs:{registrationID:"registrationID",registrationName:"registrationName",playerPoolID:"playerPoolID",playerPoolName:"playerPoolName",playerID:"playerID",evalScore:"evalScore",hidePlayerName:"hidePlayerName",tryoutNumber:"tryoutNumber"},standalone:!1,decls:5,vars:16,consts:[[3,"details","player","loading","loadingPlayer","registrationID","registrationName","playerPoolID","playerPoolName","playerID","evalScore","hidePlayerName","tryoutNumber","evalScoreNoteText","evalScoreTooltipText"],[1,"mb-3"],["skeletonType","playerHeader",3,"showLargeProfilePic"],[3,"player","registrationID","registrationName","playerPoolName","hidePlayerName","tryoutNumber"]],template:function(n,o){n&1&&(p(0,Qa,6,1),p(1,Za,2,1),l(2,"app-tryout-evaluation-details",0),e(3,`
850`),r(),e(4,`
851`)),n&2&&(u(o.loadingEvaluationScorePlayer?0:-1),s(),u(o.loadingEvaluationScorePlayer?-1:1),s(),m("details",o.tryoutService.playerEvaluationDetails[o.playerID])("player",o.player)("loading",o.loadingEvaluationScores)("loadingPlayer",o.loadingEvaluationScorePlayer)("registrationID",o.registrationID)("registrationName",o.registrationName)("playerPoolID",o.playerPoolID)("playerPoolName",o.playerPoolName)("playerID",o.playerID)("evalScore",o.evalScore)("hidePlayerName",o.hidePlayerName)("tryoutNumber",o.tryoutNumber)("evalScoreNoteText",o.tryoutService.evalScoreNoteText)("evalScoreTooltipText",o.tryoutService.evalScoreTooltipText))},dependencies:[ie,mi,Ke],styles:[".composite-rating[_ngcontent-%COMP%]{color:var(--blue-1000)}.eval-card-header[_ngcontent-%COMP%]   .clickable[_ngcontent-%COMP%]:hover{cursor:pointer}.compare-mode-indicator[_ngcontent-%COMP%]   .compare-top[_ngcontent-%COMP%]{border-top:1px solid var(--blue-1000);margin-bottom:0}.compare-mode-indicator[_ngcontent-%COMP%]   .compare-text[_ngcontent-%COMP%]{color:var(--color-white);background-color:var(--blue-1000);margin-top:0;border-radius:0 0 5px 5px}.eval-score-header[_ngcontent-%COMP%]{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--text-medium);text-transform:uppercase}"]});let a=d;return a})();var x0=(()=>{let d=class d{};d.\u0275fac=function(n){return new(n||d)},d.\u0275mod=_t({type:d}),d.\u0275inj=ht({providers:[xe,si,V,qe,Ye,Ze],imports:[li,rt,rt]});let a=d;return a})();export{fs as a,pi as b,P as c,qi as d,Cr as e,Dr as f,ge as g,Ze as h,Co as i,kl as j,kr as k,Xr as l,Ci as m,Ke as n,Ko as o,Fs as p,x0 as q};

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.