1import{a as Z}from"./chunk-R7G5OMVI.js";import{a as Ge}from"./chunk-BQRBWX66.js";import"./chunk-DBNHDKST.js";import{a as q}from"./chunk-MJKUV2I5.js";import{a as He,b as qe}from"./chunk-N5PZSBUY.js";import{d as Ee}from"./chunk-QQKJHWTF.js";import{Ib as Ye,Rb as z,_b as G,c as We}from"./chunk-PXZNPNHI.js";import"./chunk-KWNDGQWR.js";import"./chunk-2ZFY6MCW.js";import"./chunk-KQ7PEKEE.js";import"./chunk-KVMIYEBS.js";import"./chunk-DLHY2JKF.js";import"./chunk-WLMRFXCZ.js";import"./chunk-WN3UI2QV.js";import"./chunk-YVLOHBDK.js";import"./chunk-Z3AXU4EF.js";import"./chunk-TP3A6IN2.js";import"./chunk-XNFXA3ZT.js";import"./chunk-QLTRNXEK.js";import"./chunk-TEFEWVO6.js";import"./chunk-ZB64W4XA.js";import"./chunk-SVABVB5X.js";import"./chunk-CMY6WAF3.js";import"./chunk-FUY7HSJY.js";import"./chunk-JTYXZXFU.js";import"./chunk-7MK6I7GJ.js";import"./chunk-3HFTO6XY.js";import"./chunk-XNSH6ILV.js";import"./chunk-IZKA562T.js";import"./chunk-BROSYERN.js";import"./chunk-Y2KCFOCP.js";import"./chunk-Z52L74DH.js";import{n as ke}from"./chunk-EME7BUOO.js";import{q as ze}from"./chunk-QH3IRCHN.js";import"./chunk-PLEH3NAH.js";import"./chunk-GXCJ5QS4.js";import"./chunk-22ACI5KU.js";import"./chunk-FXUQQQIE.js";import{b as Ne}from"./chunk-FSUBAQYH.js";import"./chunk-7CVCGK4Q.js";import"./chunk-FWW3IJT2.js";import"./chunk-B6LCWWQX.js";import"./chunk-HYGNXZJR.js";import"./chunk-B6XXRKU5.js";import"./chunk-6Q5DDO7R.js";import"./chunk-RW2MVE4O.js";import"./chunk-3ZVRFUA4.js";import"./chunk-H4PCL6BZ.js";import"./chunk-NXTJBJRP.js";import"./chunk-U22BTVEZ.js";import{Ec as Ue,Ef as je,Gb as H,Gd as Fe,Mb as Me,Sc as Ve,Td as $e,Wc as Y,d as Ce,k as Se,kh as Be,lb as Pe,le as Le,ua as De,xb as Re,y as he,yd as Oe,zd as Ae}from"./chunk-X5J6QTCG.js";import{$,$a as c,Ad as X,Db as Q,E as F,Fa as s,Fi as Ie,H as te,I as ie,Ib as e,Jb as le,Ka as h,Kb as x,Lb as j,Ma as w,Na as L,Ni as we,Qb as k,Rb as U,Sa as u,Sb as V,Sc as ge,U as y,W as ne,Wc as xe,Xa as se,_ as oe,ba as ae,bb as d,be as N,cc as me,d as A,db as D,dc as ce,di as ve,eb as E,ec as de,fa as C,fb as P,fi as ye,ga as S,gb as _,hb as o,ib as a,jb as g,lc as T,mc as I,nb as R,nc as pe,ob as M,pb as K,pj as W,qb as b,qc as _e,ri as be,sb as f,tb as m,u as ee,vd as ue,wd as fe,xd as Te,ya as re,yd as B}from"./chunk-SMW7PHYX.js";import"./chunk-BMIYOSOG.js";var Ke=(()=>{let n=class n{};n.\u0275fac=function(l){return new(l||n)},n.\u0275cmp=w({type:n,selectors:[["ng-component"]],standalone:!1,decls:7,vars:0,consts:[[1,"container"]],template:function(l,p){l&1&&(o(0,"main"),e(1,` 2 `),o(2,"div",0),e(3,` 3 `),g(4,"router-outlet"),e(5,` 4 `),a(),e(6,` 5`),a())},dependencies:[fe],encapsulation:2});let t=n;return t})();var mt=(t,n)=>["/","players",t,"registrations",n,"register"],ct=t=>({registrationTemplateType:t}),dt=()=>[1,2,3];function pt(t,n){t&1&&K(0)}function _t(t,n){if(t&1&&(e(0,` 6 `),o(1,"div",6),e(2,` 7 `),o(3,"div",7),e(4,` 8 `),o(5,"div",3),e(6,` 9 `),o(7,"div",8),e(8,` 10 Available sessions for: 11 `),a(),e(9,` 12 `),g(10,"app-skeleton-template",9),e(11,` 13 `),a(),e(12,` 14 `),a(),e(13,` 15 `),a(),e(14,` 16 `),u(15,pt,1,0,"ng-container",10),e(16,` 17 `)),t&2){m();let i=Q(15);s(15),_("ngTemplateOutlet",i)}}function gt(t,n){t&1&&K(0)}function xt(t,n){if(t&1&&(e(0,` 18 `),u(1,gt,1,0,"ng-container",10),e(2,` 19 `)),t&2){m(3);let i=Q(15);s(),_("ngTemplateOutlet",i)}}function Ct(t,n){if(t&1&&(e(0,` 20 `),o(1,"div",24),T(2,"safeHtml"),e(3,` 21 `),a(),e(4,` 22 `)),t&2){let i=m().$implicit;s(),_("innerHtml",I(2,1,i.details),re)}}function St(t,n){t&1&&(e(0,` 23 `),o(1,"tr"),e(2,` 24 `),o(3,"th"),e(4,"Registration"),a(),e(5,` 25 `),o(6,"th"),e(7,"Description"),a(),e(8,` 26 `),o(9,"th"),e(10,"Cost"),a(),e(11,` 27 `),g(12,"th"),e(13,` 28 `),a(),e(14,` 29 `))}function ht(t,n){if(t&1&&e(0),t&2){let i=m(3).$implicit;x(` 30 (`,i.numberOfSessions,` sessions) 31 `)}}function ut(t,n){if(t&1&&(e(0),T(1,"sprocketCurrency"),c(2,ht,1,1)),t&2){let i=m(2).$implicit;x(` 32 `,I(1,2,i.pricePerSession),` / session 33 `),s(2),d(i.numberOfSessions?2:-1)}}function ft(t,n){if(t&1&&(e(0),T(1,"sprocketCurrency")),t&2){let i=m(2).$implicit;x(` 34 `,I(1,1,i.price),` 35 `)}}function Tt(t,n){if(t&1&&(e(0,` 36 `),c(1,ut,3,4),c(2,ft,2,3)),t&2){let i=m().$implicit;s(),d(i.pricePerSession?1:-1),s(),d(i.pricePerSession?-1:2)}}function vt(t,n){t&1&&e(0,` 37 N/A 38 `)}function yt(t,n){if(t&1&&(e(0),T(1,"sprocketCurrency")),t&2){let i=m(3).$implicit;x(` 39 `,I(1,1,i.minSessionPrice||i.maxSessionPrice),` 40 `)}}function bt(t,n){if(t&1&&(e(0,` 41 `),c(1,vt,1,0),c(2,yt,2,3)),t&2){let i=m(2).$implicit;s(),d(!i.minSignUpPrice&&!i.maxSessionPrice?1:-1),s(),d(i.minSessionPrice||i.maxSessionPrice?2:-1)}}function It(t,n){if(t&1&&(e(0),T(1,"sprocketCurrency")),t&2){let i=m(3).$implicit;x(` 42 `,I(1,1,i.minSessionPrice),` 43 `)}}function wt(t,n){if(t&1&&(e(0),T(1,"sprocketCurrency"),T(2,"sprocketCurrency")),t&2){let i=m(3).$implicit;j(` 44 `,I(1,2,i.minSessionPrice),` - 45 `,I(2,4,i.maxSessionPrice),` 46 `)}}function Dt(t,n){if(t&1&&(e(0,` 47 `),c(1,It,2,3),c(2,wt,3,6)),t&2){let i=m(2).$implicit;s(),d(i.minSessionPrice===i.maxSessionPrice?1:-1),s(),d(i.minSessionPrice!==i.maxSessionPrice?2:-1)}}function Et(t,n){if(t&1&&(e(0,` 48 `),c(1,bt,3,2)(2,Dt,3,2)),t&2){let i=m().$implicit;s(),d(!i.minSessionPrice||!i.maxSessionPrice?1:2)}}function Pt(t,n){if(t&1&&(e(0,` 49 `),o(1,"a",25),e(2),a(),e(3,` 50 `)),t&2){let i=m().$implicit,r=m(6);s(),_("routerLink",de(3,mt,r.selectedPlayer.playerID,i.registrationID))("state",ce(6,ct,r.RegistrationTemplateType.PLAYER_TIME_SLOTS)),s(),x(` 51 `,i.registerButtonText??"View Sessions",` 52 `)}}function Rt(t,n){if(t&1&&(e(0,` 53 `),o(1,"button",26),e(2),a(),e(3,` 54 `)),t&2){let i=m().$implicit;s(),_("disabled",!0),s(),x(` 55 `,i.registerButtonText??"View Sessions",` 56 `)}}function Mt(t,n){if(t&1&&(e(0,` 57 `),o(1,"div",27),e(2,` 58 `),o(3,"app-inline-alert",28),e(4,` 59 `),o(5,"span",29),e(6),a(),e(7,` 60 `),a(),e(8,` 61 `),a(),e(9,` 62 `)),t&2){let i=m().$implicit;s(3),_("isInline",!0),s(3),x(` 63 `,i.note,` 64 `)}}function kt(t,n){if(t&1&&(e(0,` 65 `),o(1,"tr"),e(2,` 66 `),o(3,"td"),e(4),a(),e(5,` 67 `),o(6,"td"),e(7),a(),e(8,` 68 `),o(9,"td"),e(10,` 69 `),c(11,Tt,3,2),c(12,Et,3,1),a(),e(13,` 70 `),o(14,"td"),e(15,` 71 `),o(16,"div"),e(17,` 72 `),c(18,Pt,4,8),c(19,Rt,4,2),a(),e(20,` 73 `),c(21,Mt,10,2),a(),e(22,` 74 `),a(),e(23,` 75 `)),t&2){let i=n.$implicit,r=m(6);s(4),x(` 76 `,i.name,` 77 `),s(3),x(` 78 `,i.shortDescription,` 79 `),s(4),d(i.registrationCostTypeID!==r.RegistrationCostType.VARIABLE?11:-1),s(),d(i.registrationCostTypeID===r.RegistrationCostType.VARIABLE?12:-1),s(6),d(i.canRegister?18:-1),s(),d(!i.canRegister&&!i.note?19:-1),s(2),d(i.note?21:-1)}}function Ut(t,n){if(t&1&&(e(0,` 80 `),o(1,"tr"),e(2,` 81 `),o(3,"td",30),e(4,` 82 No available registrations 83 `),a(),e(5,` 84 `),a(),e(6,` 85 `)),t&2){let i=n.$implicit;s(3),se("colspan",i?i.length:5)}}function Vt(t,n){if(t&1){let i=b();e(0,` 86 `),o(1,"div",6),e(2,` 87 `),o(3,"div",16),e(4,` 88 `),o(5,"div",3),e(6,` 89 `),o(7,"h2",17),e(8),a(),e(9,` 90 `),c(10,Ct,5,3),o(11,"div",18),e(12,` 91 `),o(13,"p-table",19),e(14,` 92 `),u(15,St,15,0,"ng-template",20),e(16,` 93 `),u(17,kt,24,7,"ng-template",21),e(18,` 94 `),u(19,Ut,7,1,"ng-template",22),e(20,` 95 `),a(),e(21,` 96 `),a(),e(22,` 97 `),o(23,"div"),e(24,` 98 `),o(25,"button",23),f("click",function(){let l=C(i).$implicit,p=m(5);return S(p.showTrainingSessions(l.programID))}),e(26,` 99 View Currently Available Sessions 100 `),a(),e(27,` 101 `),a(),e(28,` 102 `),a(),e(29,` 103 `),a(),e(30,` 104 `),a(),e(31,` 105 `)}if(t&2){let i=n.$implicit;s(8),x(` 106 `,i.name,` 107 `),s(2),d(i.details?10:-1),s(3),_("value",i.registrations)("lazy",!1)("paginator",!1)("totalRecords",i.registrations==null?null:i.registrations.length)}}function Ot(t,n){if(t&1&&(e(0,` 108 `),E(1,Vt,32,6,null,null,D)),t&2){let i=m(4);s(),P(i.programs)}}function At(t,n){if(t&1&&(e(0,` 109 `),o(1,"div",4),e(2,` 110 `),o(3,"app-inline-alert",28),e(4,` 111 `),o(5,"span",31),e(6),a(),e(7,` 112 `),a(),e(8,` 113 `),a(),e(9,` 114 `)),t&2){let i=m(4);s(3),_("isInline",!0),s(3),x(` 115 `,i.selectedPlayer.user.firstName,` is currently not eligible for any training sessions. 116 `)}}function Ft(t,n){if(t&1&&(e(0,` 117 `),c(1,Ot,3,0)(2,At,10,2)),t&2){let i=m(3);s(),d(i.programs!=null&&i.programs.length?1:2)}}function $t(t,n){if(t&1){let i=b();e(0,` 118 `),o(1,"div",6),e(2,` 119 `),o(3,"div",7),e(4,` 120 `),o(5,"div",3),e(6,` 121 `),o(7,"div",8),e(8,` 122 Available sessions for: 123 `),a(),e(9,` 124 `),o(10,"div",11),e(11,` 125 `),o(12,"div",12),e(13,` 126 `),o(14,"app-player-profile-photo",13),e(15,` 127 `),a(),e(16,` 128 `),a(),e(17,` 129 `),o(18,"div",14),e(19,` 130 `),o(20,"p-select",15),f("ngModelChange",function(l){C(i);let p=m(2);return S(p.playerChange(l))}),e(21,` 131 `),a(),e(22,` 132 `),a(),e(23,` 133 `),a(),e(24,` 134 `),a(),e(25,` 135 `),a(),e(26,` 136 `),a(),e(27,` 137 `),c(28,xt,3,1),c(29,Ft,3,1)}if(t&2){let i=m(2);s(14),_("player",i.selectedPlayer)("largeCircle",!0)("initialsOnly",i.hidePlayerPhotos),s(6),_("ngModel",i.selectedPlayer.playerID)("options",i.playerDropdown),s(8),d(i.loadingPrograms?28:-1),s(),d(i.loadingPrograms?-1:29)}}function Lt(t,n){t&1&&(e(0,` 138 `),o(1,"div",4),e(2,` 139 `),o(3,"app-inline-alert",32),e(4,` 140 `),o(5,"span",33),e(6,` 141 It looks like you haven't added any players yet. Please return to the `),o(7,"a",34),e(8,"dashboard"),a(),e(9,` to add your first player. 142 `),a(),e(10,` 143 `),a(),e(11,` 144 `),a(),e(12,` 145 `))}function jt(t,n){if(t&1&&(e(0,` 146 `),c(1,$t,30,7)(2,Lt,13,0)),t&2){let i=m();s(),d(i.players!=null&&i.players.length?1:2)}}function Bt(t,n){t&1&&(e(0,` 147 `),o(1,"div",6),e(2,` 148 `),o(3,"div",16),e(4,` 149 `),o(5,"div",3),e(6,` 150 `),g(7,"app-skeleton-template"),e(8,` 151 `),a(),e(9,` 152 `),a(),e(10,` 153 `),a(),e(11,` 154 `))}function Nt(t,n){t&1&&(e(0,` 155 `),E(1,Bt,12,0,null,null,D)),t&2&&(s(),P(me(0,dt)))}function Wt(t,n){if(t&1){let i=b();e(0,` 156 `),o(1,"p-dialog",35),V("visibleChange",function(l){C(i);let p=m();return U(p.showTrainingSessionsDialog,l)||(p.showTrainingSessionsDialog=l),S(l)}),e(2,` 157 `),g(3,"app-time-slot",36,1),e(5,` 158 `),a(),e(6,` 159`)}if(t&2){let i=m();s(),k("visible",i.showTrainingSessionsDialog),_("modal",!0)("closable",!0)("draggable",!0)("styleClass","standardWidthDialog"),s(2),_("registrationID",i.registrationID)("playerID",i.playerID)("componentView",i.TimeSlotComponentView.ADMIN_OVERVIEW)("fixedHeight",!0)}}var Qe=(()=>{let n=class n{constructor(r,l,p){this.siteDataService=r,this.playerService=l,this.userService=p,this.unsubscribe$=new A,this.loadingPlayers=!0,this.loadingPrograms=!0,this.playerDropdown=[],this.RegistrationCostType=Ee,this.showTrainingSessionsDialog=!1,this.TimeSlotComponentView=z,this.RegistrationTemplateType=ke,this.hidePlayerPhotos=!1}ngOnInit(){this.siteDataService.getClubSettings().pipe(y(this.unsubscribe$)).subscribe({next:r=>{this.hidePlayerPhotos=r.clubOptions?.find(l=>l.optionID===we.HIDE_PLAYER_PROFILE_PHOTO)?.boolValue||!1}}
159),this.siteDataService.hideSiteLoader(),this.userService.getCurrentUserPlayers(!1).pipe(ie(1500),ne(r=>{this.players=r,this.players?.length&&(this.selectedPlayer=this.players[0],this.playerDropdown=this.players.map(l=>({label:`${l.user.firstName} ${l.user.lastName}`,value:l.playerID}))),this.loadingPlayers=!1}),F(()=>this.playerService.getEligibleTrainingSessionPrograms(this.selectedPlayer.playerID)),y(this.unsubscribe$)).subscribe({next:r=>{this.programs=r,this.loadingPrograms=!1},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}playerChange(r){this.selectedPlayer=this.players.find(l=>l.playerID===r),this.loadingPrograms=!0,this.playerService.getEligibleTrainingSessionPrograms(this.selectedPlayer.playerID).pipe(y(this.unsubscribe$)).subscribe({next:l=>{this.programs=l,console.log(this.programs),this.loadingPrograms=!1},error:()=>{this.siteDataService.showSiteErrorAlertDefaultGET()}})}showTrainingSessions(r){this.showTrainingSessionsDialog=!0,this.registrationID=this.programs.find(l=>l.programID===r).registrations[0].registrationID,this.playerID=this.selectedPlayer.playerID}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};n.\u0275fac=function(l){return new(l||n)(h(W),h(je),h(De))},n.\u0275cmp=w({type:n,selectors:[["app-training-sessions-search"]],standalone:!1,decls:18,vars:3,consts:[["programsLoader",""],["timeSlots",""],["routerLink","/dashboard",1,"btn","btn-naked","btn-icon-chevron-left","pl-0"],[1,"card"],[1,"d-flex","justify-content-center"],[1,"text-header-2"],[1,"row"],[1,"col-md-6"],[1,"mb-3","text-uppercase","text-grey"],["height","3rem"],[4,"ngTemplateOutlet"],[1,"d-flex","align-items-center"],[1,"mr-3"],[3,"player","largeCircle","initialsOnly"],[1,"full-width"],["required","","styleClass","full-width","name","playerID",3,"ngModelChange","ngModel","options"],[1,"col-md-12"],[1,"text-header-3"],[1,"mb-3"],[1,"table","table-striped","table-sm",3,"value","lazy","paginator","totalRecords"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],["type","button",1,"btn","btn-naked","btn-icon-calendar","text-medium","pl-0",3,"click"],[1,"mb-3",3,"innerHtml"],[1,"btn","btn-sm",3,"routerLink","state"],["type","button",1,"btn","btn-sm","disabled",3,"disabled"],[1,"text-left","d-inline-block","session-item-note"],["alertType","warning",3,"isInline"],[1,"text-small"],[2,"text-align","left"],[1,"text-medium"],["alertType","warning"],[1,"fw-600"],["routerLink","/dashboard",1,"btn","btn-naked"],["header","Available Sessions",3,"visibleChange","visible","modal","closable","draggable","styleClass"],[3,"registrationID","playerID","componentView","fixedHeight"]],template:function(l,p){l&1&&(o(0,"a",2),e(1,"Back"),a(),e(2,` 160`),o(3,"div",3),e(4,` 161 `),o(5,"div",4),e(6,` 162 `),o(7,"h1",5),e(8,"Sessions"),a(),e(9,` 163 `),a(),e(10,` 164 165 `),c(11,_t,17,1),c(12,jt,3,1),a(),e(13,` 166 167`),u(14,Nt,3,1,"ng-template",null,0,_e),e(16,` 168 169`),c(17,Wt,7,9)),l&2&&(s(11),d(p.loadingPlayers?11:-1),s(),d(p.loadingPlayers?-1:12),s(5),d(p.showTrainingSessionsDialog?17:-1))},dependencies:[ge,Ce,he,Se,B,N,Y,Me,Ue,H,Re,G,Ne,Pe,$e],styles:[".session-item-note[_ngcontent-%COMP%]{max-width:300px}"]});let t=n;return t})();var Xe=(()=>{let n=class n{constructor(r){this.webAPI=r}};n.\u0275fac=function(l){return new(l||n)(ae(ye))},n.\u0275prov=oe({token:n,factory:n.\u0275fac});let t=n;return t})();function Ht(t,n){if(t&1&&(e(0,` 170 `),o(1,"div",12),e(2,` 171 `),o(3,"h5",10),e(4,` 172 Your package 173 `),a(),e(5,` 174 `),o(6,"div",13),e(7,` 175 `),o(8,"div",14),e(9),a(),e(10,` 176 `),o(11,"div",15),e(12,` 177 `),o(13,"div",16),e(14),T(15,"date"),a(),e(16,` 178 `),a(),e(17,` 179 `),a(),e(18,` 180 `),a(),e(19,` 181 `)),t&2){let i=m(3);s(9),x(` 182 `,i.playerRegistration.registration.name,` 183 `),s(5),j(` 184 `,i.playerRegistration.registration.numberOfSessions-i.registeredTimeSlots.length,` Sessions Remaining (Expires 185 `,pe(15,3,i.playerRegistration.registration.program.endDate,"MM/dd
185/yyyy"),`) 186 `)}}function Yt(t,n){if(t&1){let i=b();e(0,` 187 `),o(1,"div",17),e(2,` 188 `),o(3,"app-scheduled-slot",18),f("cancelClicked",function(){let l=C(i).$implicit,p=m(5);return S(p.showCancelTimeSlot(l))}),a(),e(4,` 189 `),a(),e(5,` 190 `)}if(t&2){let i=n.$implicit,r=m(5);s(),_("@componentInOut",void 0),s(2),_("showCancel",r.clubAllowsSessionCancellations)("enableCancel",r.canCancelTimeSlot(i))("signUpTimeSlot",i)}}function qt(t,n){if(t&1&&(e(0,` 191 `),E(1,Yt,6,4,null,null,D)),t&2){let i=m(4);s(),P(i.registeredTimeSlots)}}function zt(t,n){t&1&&(e(0,` 192 `),o(1,"div",17),e(2,` 193 You have not scheduled any sessions yet. 194 `),a(),e(3,` 195 `))}function Gt(t,n){if(t&1&&(e(0,` 196 `),o(1,"div",12),e(2,` 197 `),o(3,"h5",10),e(4,` 198 Your scheduled sessions 199 `),a(),e(5,` 200 `),c(6,qt,3,0)(7,zt,4,0),a(),e(8,` 201 `)),t&2){let i=m(3);s(6),d(i.registeredTimeSlots.length?6:7)}}function Jt(t,n){if(t&1&&(e(0,` 202 `),o(1,"div",17),e(2,` 203 `),g(3,"app-scheduled-slot",19),e(4,` 204 `),a(),e(5,` 205 `)),t&2){let i=m(4);s(),_("@componentInOut",void 0),s(2),_("showCancel",!1)("signUpTimeSlot",i.rescheduleTimeSlot)}}function Kt(t,n){if(t&1&&(e(0,` 206 `),o(1,"div",12),e(2,` 207 `),o(3,"h5",10),e(4,` 208 You are rescheduling this session: 209 `),a(),e(5,` 210 `),c(6,Jt,6,3),a(),e(7,` 211 `)),t&2){let i=m(3);s(6),d(i.registeredTimeSlots.length?6:-1)}}function Qt(t,n){if(t&1){let i=b();e(0,` 212 `),o(1,"div",8),e(2,` 213 `),o(3,"div",9),e(4,"Sessions"),a(),e(5,` 214 `),o(6,"h2"),e(7),a(),e(8,` 215 `),g(9,"hr"),e(10,` 216 `),e(11,` 217 `),c(12,Ht,20,6),c(13,Gt,9,1),c(14,Kt,8,1),o(15,"div"),e(16,` 218 `),o(17,"h5",10),e(18,` 219 Available Sessions 220 `),a(),e(19,` 221 `),g(20,"hr"),e(21,` 222 `),o(22,"app-time-slot",11),f("onTimeSlotSelected",function(l){C(i);let p=m(2);return S(p.timeSlotChosen(l))})("onSignUp",function(l){C(i);let p=m(2);return S(p.timeSlotChosen(l))}),e(23,` 223 `),a(),e(24,` 224 `),a(),e(25,` 225 `),a(),e(26,` 226 `)}if(t&2){let i=m(2);s(7),le(i.playerRegistration.registration.program.name),s(5),d(i.playerRegistration.registration.numberOfSessions?12:-1),s(),d(i.registeredTimeSlots&&!i.signUpTimeSlotID?13:-1),s(),d(i.signUpTimeSlotID?14:-1),s(8),_("playerRegistrationID",i.playerRegistration.playerRegistrationID)("preSelectTimeSlotIDs",i.registeredTimeSlotIDs)("componentView",i.TimeSlotComponentView.MANAGE_REGISTRATION)("registrationNumberOfSessions",i.playerRegistration.registration.numberOfSessions)("playerID",i.playerID)("fixedHeight",!0)}}function Xt(t,n){if(t&1&&(e(0,` 227 `),o(1,"div",3),e(2,` 228 `),o(3,"div",4),e(4,` 229 `),o(5,"a",5),e(6,` 230 `),g(7,"i",6),o(8,"span",7),e(9,"Back"),a(),e(10,` 231 `),a(),e(11,` 232 `),o(12,"div"),e(13,` 233 `),c(14,Qt,27,10),e(15,` 234 `),a(),e(16,` 235 `),a(),e(17,` 236 `),a(),e(18,` 237 `)),t&2){let i,r=m();s(5),_("routerLink",r.returnUrl?r.returnUrl:"/"),s(9),d((i=r.currentStep)===r.ScheduleSignUpSignupSteps.SELECTION?14:-1)}}function Zt(t,n){t&1&&(e(0,` 238 `),o(1,"div",8),e(2,` 239 `),g(3,"app-skeleton-template",20),e(4,` 240 `),a(),e(5,` 241 `))}function ei(t,n){t&1&&(e(0,` 242 `),o(1,"div",12),e(2,` 243 Are you sure you want to sign up for this session? 244 `),a(),e(3,` 245 `))}function ti(t,n){t&1&&(e(0,` 246 `),o(1,"div",12),e(2,` 247 Are you sure you want to reschedule your current session for this one? 248 `),a(),e(3,` 249 `))}function ii(t,n){if(t&1&&(e(0,` 250 `),o(1,"div"),e(2,` 251 `),c(3,ei,4,0),c(4,ti,4,0),o(5,"div",21),e(6,` 252 `),g(7,"app-scheduled-slot",19),e(8,` 253 `),a(),e(9,` 254 `),a(),e(10,` 255 `)),t&2){let i=m();s(3),d(i.signUpTimeSlotID?-1:3),s(),d(i.signUpTimeSlotID?4:-1),s(3),_("showCancel",!1)("signUpTimeSlot",i.selectedTimeSlot)}}function ni(t,n){t&1&&(e(0,` 256 `),g(1,"app-button-loader"),e(2,` 257 Confirming... 258 `))}function oi(t,n){t&1&&e(0,` 259 Yes, I'm sure 260 `)}function ai(t,n){if(t&1){let i=b();e(0,` 261 `),o(1,"app-dialog-footer"),e(2,` 262 `),R(3,22),e(4,` 263 `),o(5,"button",23),f("click",function(){C(i);let l=m();return S(l.showConfirmTimeSlot=!1)}),e(6,"Cancel"),a(),e(7,` 264 `),M(),e(8,` 265 `),R(9,24),e(10,` 266 `),o(11,"button",25),f("click",function(){C(i);let l=m();return S(l.confirmTimeSlot())}),e(12,` 267 `),c(13,ni,3,0),c(14,oi,1,0),a(),e(15,` 268 `),M(),e(16,` 269 `),a(),e(17,` 270 `)}if(t&2){let i=m();s(11),_("disabled",i.saving),s(2),d(i.saving?13:-1),s(),d(i.saving?-1:14)}}function ri(t,n){t&1&&(e(0,` 271 `),o(1,"div",12),e(2,` 272 Are you sure you want to cancel this session? 273 `),a(),e(3,` 274 `))}function si(t,n){if(t&1&&(e(0,` 275 `),o(1,"div"),e(2,` 276 `),c(3,ri,4,0),o(4,"div",21),e(5,` 277 `),g(6,"app-scheduled-slot",19),e(7,` 278 `),a(),e(8,` 279 `),a(),e(9,` 280 `)),t&2){let i=m();s(3),d(i.signUpTimeSlotID?-1:3),s(3),_("showCancel",!1)("signUpTimeSlot",i.selectedTimeSlot)}}function li(t,n){t&1&&(e(0,` 281 `),g(1,"app-button-loader"),e(2,` 282 Canceling... 283 `))}function mi(t,n){t&1&&e(0,` 284 Yes, I'm sure 285 `)}function ci(t,n){if(t&1){let i=b();e(0,` 286 `),o(1,"app-dialog-footer"),e(2,` 287 `),R(3,22),e(4,` 288 `),o(5,"button",23),f("click",function(){C(i);let l=m();return S(l.showCancel=!1)}),e(6,"No"),a(),e(7,` 289 `),M(),e(8,` 290 `),R(9,24),e(10,` 291 `),o(11,"button",25),f("click",function(){C(i);let l=m();return S(l.cancelTimeSlot())}),e(12,` 292 `),c(13,li,3,0),c(14,mi,1,0),a(),e(15,` 293 `),M(),e(16,` 294 `),a(),e(17,` 295 `)}if(t&2){let i=m();s(11),_("disabled",i.saving),s(2),d(i.saving?13:-1),s(),d(i.saving?-1:14)}}var Ze=(()=>{let n=class n{constructor(r,l,p,J,v,tt,it){this.siteDataService=r,this.route=l,this.authorizeService=p,this.timeSlotService=J,this.playerRegistrationService=v,this.router=tt,this.clubCalendarService=it,this.showCancel=!1,this.loading=!0,this.saving=!1,this.showError=!1,this.refreshingSession=!1,this.currentStep=Z.SELECTION,this.isPlayer=!1,this.TimeSlotComponentView=z,this.showConfirmTimeSlot=!1,this.ScheduleSignUpSignupSteps=Z,this.SignUpType=We,this.unsubsribe$=new A}ngOnInit(){this.authorizeService.getUser().pipe(te(1)).subscribe({next:r=>{this.user=r}}),this.route.queryParams.subscribe(r=>{r.ReturnUrl&&(this.returnUrl=r.ReturnUrl),r.timeSlotID&&(this.signUpTimeSlotID=+r.timeSlotID)}),this.route.params.pipe(F(r=>(this.entityRegistrationID=+r.playerRegistrationID,this.playerID=+r.playerID,ee({playerRegistrationConfirmation:this.playerRegistrationService.getEntityRegistration(this.playerID,this.entityRegistrationID,!1,!0),registeredTimeSlots:this.playerRegistrationService.getPlayerRegistrationSelectedTimeSlots(this.playerID,this.entityRegistrationID),clubCalendarSettings:this.clubCalendarService.getClubCalendarSettings()}))),y(this.unsubsribe$)).subscribe({next:r=>{this.playerRegistration=r.playerRegistrationConfirmation?r.playerRegistrationConfirmation.find(l=>l.entityRegistrationID===this.entityRegistrationID):null,this.registeredTimeSlots=r.registeredTimeSlots,this.signUpTimeSlotID&&(this.rescheduleTimeSlot=this.registeredTimeSlots.find(l=>l.signUpTimeSlotID===this.signUpTimeSlotID),this.rescheduleTimeSlot?this.registeredTimeSlots=this.registeredTimeSlots.filter(l=>l.signUpTimeSlotID!==this.signUpTimeSlotID):(this.signUpTimeSlotID=null,this.router.navigate([],{queryParams:{timeSlotID:null},queryParamsHandling:"merge"}))),this.clubCalendarSettings=r.clubCalendarSettings,this.registeredTimeSlotIDs=this.registeredTimeSlots.map(l
295=>l.signUpTimeSlotID),this.showError=!1,this.siteDataService.hideSiteLoader(),this.loading=!1}})}refreshTimeSlots(){this.refreshingSession=!0,this.playerRegistrationService.getPlayerRegistrationSelectedTimeSlots(this.playerID,this.entityRegistrationID).pipe(y(this.unsubsribe$)).subscribe({next:r=>{this.registeredTimeSlots=r,this.registeredTimeSlotIDs=this.registeredTimeSlots.map(l=>l.signUpTimeSlotID),this.showError=!1,this.refreshingSession=!1}})}timeSlotChosen(r){this.selectedTimeSlot=r,this.showConfirmTimeSlot=!0}confirmTimeSlot(){this.saving=!0,this.playerRegistrationService.reserveTimeSlot(this.playerID,this.entityRegistrationID,this.selectedTimeSlot.signUpTimeSlotID,this.signUpTimeSlotID).pipe(y(this.unsubsribe$)).subscribe({next:()=>{this.showConfirmTimeSlot=!1,this.saving=!1,this.siteDataService.showSiteSuccessAlert("The session has been reserved."),this.registeredTimeSlots.push(this.selectedTimeSlot),this.registeredTimeSlots.sort((r,l)=>new Date(l.startDate).getTime()-new Date(r.startDate).getTime()),this.registeredTimeSlotIDs=this.registeredTimeSlots.map(r=>r.signUpTimeSlotID),this.signUpTimeSlotID&&(this.signUpTimeSlotID=null,this.router.navigate([],{queryParams:{timeSlotID:null},queryParamsHandling:"merge"}),this.siteDataService.hideSiteLoader())},error:r=>{this.saving=!1,this.showConfirmTimeSlot=!1,r?.error?this.siteDataService.showSiteErrorAlert("There was a problem reserving the session: "+r.error):this.siteDataService.showSiteErrorAlert("There was a problem reserving the session. Please try again."),this.refreshTimeSlots()}})}get clubAllowsSessionCancellations(){return this.clubCalendarSettings?.canCancelPaidSignUp!==!1}canCancelTimeSlot(r){let l=new Ie;return l.startDate=r.startDate,l.clubEventTypeID=be.SIGN_UP,this.clubCalendarService.canUpdateCalendarEventRSVP(l,this.clubCalendarSettings)}showCancelTimeSlot(r){this.selectedTimeSlot=r,this.showConfirmTimeSlot=!1,this.showCancel=!0}cancelTimeSlot(){this.saving=!0,this.playerRegistrationService.cancelTimeSlot(this.playerID,this.entityRegistrationID,this.selectedTimeSlot.signUpTimeSlotID).pipe(y(this.unsubsribe$)).subscribe({next:()=>{this.siteDataService.showSiteSuccessAlert("The session has been cancelled."),this.showCancel=!1,this.saving=!1;let r=this.registeredTimeSlots.findIndex(l=>l.signUpTimeSlotID===this.selectedTimeSlot.signUpTimeSlotID);this.registeredTimeSlots.splice(r,1),this.registeredTimeSlotIDs=this.registeredTimeSlots.map(l=>l.signUpTimeSlotID)},error:r=>{this.saving=!1,r?.error?this.siteDataService.showSiteErrorAlert("There was a problem cancelling the session: "+r.error):this.siteDataService.showSiteErrorAlert("There was a problem cancelling the session. Please try again.")}})}ngOnDestroy(){this.unsubsribe$.next(),this.unsubsribe$.complete()}};n.\u0275fac=function(l){return new(l||n)(h(W),h(ue),h(ve),h(Ye),h(q),h(Te),h(Le))},n.\u0275cmp=w({type:n,selectors:[["app-training-sessions-manage"]],inputs:{scheduleSignUpID:"scheduleSignUpID",showCancel:"showCancel"},standalone:!1,decls:19,vars:14,consts:[[1,"container"],["header","Please Confirm",3,"visibleChange","visible","modal","closable","draggable","styleClass"],["pTemplate","footer"],[1,"d-flex","full-width","justify-content-center"],[1,"col-10"],[1,"text-grey","text-large",3,"routerLink"],[1,"far","fa-arrow-left"],[1,"ml-1"],[1,"card"],[1,"text-large"],[1,"text-h5","mb-3"],[3,"onTimeSlotSelected","onSignUp","playerRegistrationID","preSelectTimeSlotIDs","componentView","registrationNumberOfSessions","playerID","fixedHeight"],[1,"mb-5"],[1,"border-all","border-radius","p-2","bg-white","mb-2","d-flex","justify-content-between","align-items-center"],[1,"row","no-gutters","mb-1","text-large","bold"],[1,"row","no-gutters","mb-1"],[1,"row","no-gutters","mb-1","text-medium"],[1,"border-all","border-radius","p-2","bg-white","mb-2","d-flex","justify-content-between","align-items-center","text-small"],[3,"cancelClicked","showCancel","enableCancel","signUpTimeSlot"],[3,"showCancel","signUpTimeSlot"],["skeletonType","form-no-buttons"],[1,"border-all","border-radius","p-2","bg-white","mb-5","d-flex","justify-content-between","align-items-center"],["slot","secondary"],[1,"btn",3,"click"],["slot","primary"],[1,"btn","btn-primary",3,"click","disabled"]],template:function(l,p){l&1&&(o(0,"main"),e(1,` 296 `),o(2,"div",0),e(3,` 297 `),c(4,Xt,19,2),c(5,Zt,6,0),a(),e(6,` 298`),a(),e(7,` 299 300`),o(8,"p-dialog",1),V("visibleChange",function(v){return U(p.showConfirmTimeSlot,v)||(p.showConfirmTimeSlot=v),v}),e(9,` 301 `),c(10,ii,11,4),u(11,ai,18,3,"ng-template",2),e(12,` 302`),a(),e(13,` 303 304`),o(14,"p-dialog",1),V("visibleChange",function(v){return U(p.showCancel,v)||(p.showCancel=v),v}),e(15,` 305 `),c(16,si,10,3),u(17,ci,18,3,"ng-template",2),e(18,` 306`),a()),l&2&&(s(4),d(p.loading?-1:4),s(),d(p.loading||p.refreshingSession?5:-1),s(3),k("visible",p.showConfirmTimeSlot),_("modal",!0)("closable",!1)("draggable",!1)("styleClass","standardWidthDialog"),s(2),d(p.showConfirmTimeSlot?10:-1),s(4),k("visible",p.showCancel),_("modal",!0)("closable",!1)("draggable",!1)("styleClass","standardWidthDialog"),s(2),d(p.showCancel?16:-1))},dependencies:[B,N,Y,Fe,Ve,H,G,He,xe],styles:["@media(max-width:768px){.registration-wrapper[_ngcontent-%COMP%] .sidebar-nav[_ngcontent-%COMP%]{order:0}.registration-wrapper[_ngcontent-%COMP%] .checkout-sidebar[_ngcontent-%COMP%]{order:1;margin-top:1rem}.registration-wrapper[_ngcontent-%COMP%] .registration-body-wrapper[_ngcontent-%COMP%]{order:2;margin-top:1rem}}.width-50[_ngcontent-%COMP%]{width:50%;text-align:center}"],data:{animation:[Ae,Oe]}});let t=n;return t})();var et=(()=>{let n=class n{};n.\u0275fac=function(l){return new(l||n)},n.\u0275mod=L({type:n}),n.\u0275inj=$({imports:[X.forChild([{path:"",component:Ke,children:[{path:"players/:playerID/registrations/:playerRegistrationID",component:Ze,data:{bodyClass:"training-sessions-manage-package"}},{path:"",component:Qe,data:{bodyClass:"training-sessions-overview"}}]}]),X]});let t=n;return t})();var wn=(()=>{let n=class n{};n.\u0275fac=function(l){return new(l||n)},n.\u0275mod=L({type:n}),n.\u0275inj=$({providers:[Xe,q],imports:[Be,et,Ge,qe,ze]}
306);let t=n;return t})();export{wn as TrainingSessionsModule};
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.