1import{a as hi,b as Pi}from"./chunk-BYWT7M6J.js";import{a as Ri,b as wi}from"./chunk-IAGBH4HM.js";import{a as z}from"./chunk-MJKUV2I5.js";import{a as bi,b as Ii}from"./chunk-N5PZSBUY.js";import{b as Ft,c as Di}from"./chunk-4T73AMAL.js";import{c as K}from"./chunk-G2OHGTWE.js";import"./chunk-NAW6KKAQ.js";import{a as vi}from"./chunk-GNX3F6NH.js";import{a as Ei}from"./chunk-VFXJ4ZBD.js";import{d as Ot}from"./chunk-QQKJHWTF.js";import"./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{a as fi,d as Si,e as Fi}from"./chunk-XNSH6ILV.js";import{a as xi,b as yi,d as gi,g as Ti}from"./chunk-IZKA562T.js";import"./chunk-BROSYERN.js";import{k as oi}from"./chunk-Y2KCFOCP.js";import"./chunk-Z52L74DH.js";import{d as Dt}from"./chunk-VVVN3YIZ.js";import"./chunk-FSUBAQYH.js";import"./chunk-7CVCGK4Q.js";import{a as Tt,b as Pt}from"./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{a as St}from"./chunk-NXTJBJRP.js";import{a as ni}from"./chunk-U22BTVEZ.js";import{$b as Rt,Af as pi,Dg as Ci,Ec as mi,Ef as dt,Gb as at,Gd as st,Kb as vt,Kg as bt,Mb as rt,Qc as ci,Sc as Et,Vb as di,Wc as lt,Xb as _i,id as Y,ja as $,jb as ri,ka as gt,kh as ui,la as ti,lb as li,mb as si,qa as ii,ra as ft,ta as ht,ua as ei,xa as ai}from"./chunk-X5J6QTCG.js";import{$ as ct,$a as m,$c as Qt,Aa as Nt,Ad as wt,E as $t,Fa as r,Fb as B,Gb as q,H as Vt,Ib as t,Ie as te,Jb as F,Ka as E,Kb as C,Lb as qt,Ma as O,Na as Ct,Qb as j,Rb as H,Sa as U,Sb as W,Th as Kt,U as w,Ve as Gt,W as mt,Wc as Wt,Xa as Lt,Xe as Xt,Yb as jt,Yc as xt,_c as I,bb as c,be as yt,cc as M,d as V,db as T,dc as Ht,di as Zt,eb as P,ec as ut,fa as f,fb as D,ga as h,gb as u,hb as o,ib as a,jb as x,k as Z,lc as g,ma as pt,mc as S,nb as N,nc as it,ob as L,oc as et,pb as It,pj as Q,qb as R,qc as J,qh as Jt,sb as v,tb as _,u as kt,vd as nt,wd as Yt,xb as tt,xd as zt,ya as Bt,yb as A,yd as ot,zb as k}from"./chunk-SMW7PHYX.js";import{h as Zi}from"./chunk-BMIYOSOG.js";var Ui=(()=>{let l=class l{constructor(n,s){this.playerService=n,this.route=s,this.unsubscribe$=new V}ngOnInit(){this.route.params.subscribe(n=>{n.id&&(this.playerService.playerID=+n.id)})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};l.\u0275fac=function(s){return new(s||l)(E(dt),E(nt))},l.\u0275cmp=O({type:l,selectors:[["ng-component"]],standalone:!1,decls:1,vars:0,template:function(s,d){s&1&&x(0,"router-outlet")},dependencies:[Yt],encapsulation:2});let i=l;return i})();var Wi=Zi(te());var X=(function(i){return i[i.CHANGE_FORM=1]="CHANGE_FORM",i[i.CONFIRM=2]="CONFIRM",i})(X||{});function ie(i,l){if(i&1){let e=R();t(0,` 2 `),o(1,"div",5),t(2,` 3 `),o(3,"button",6),v("click",function(){f(e);let s=_(3);return h(s.showEditDialog=!0)}),t(4,` 4 Edit 5 `),a(),t(5,` 6 `),a(),t(6,` 7 `)}}function ee(i,l){i&1&&(t(0,` 8 `),o(1,"th"),t(2,` 9 Fee 10 `),a(),t(3,` 11 `))}function ne(i,l){if(i&1&&t(0),i&2){let e=_(3).$implicit;C(` 12 `,e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues[0].registrationOptionValue.label,` 13 `)}}function oe(i,l){if(i&1&&t(0),i&2){let e=_(3).$implicit;C(` 14 `,e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues[0].value,` 15 `)}}function ae(i,l){if(i&1&&(t(0,`
16 `),m(1,ne,1,1),m(2,oe,1,1)),i&2){let e=_(2).$implicit;r(),c(e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues[0].registrationOptionValue?1:-1),r(),c(e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues[0].registrationOptionValue?-1:2)}}function re(i,l){i&1&&(t(0,` 17 `),x(1,"i",9),t(2,` 18 `))}function le(i,l){i&1&&(t(0,` 19 `),x(1,"i",10),t(2,` 20 `))}function se(i,l){if(i&1){let e=R();t(0,` 21 `),o(1,"div",7),v("click",function(){f(e);let s=_(2).$implicit,d=_(3);return h(d.expandedRegistrationOptions[s.registrationOptionID]=!d.expandedRegistrationOptions[s.registrationOptionID])}),t(2,` 22 Multiple Selections 23 `),o(3,"span"),t(4,` 24 `),o(5,"a",8),t(6,` 25 `),m(7,re,3,0),m(8,le,3,0),a(),t(9,` 26 `),a(),t(10,` 27 `),a(),t(11,` 28 `)}if(i&2){let e=_(2).$implicit,n=_(3);r(),u("title",n.expandedRegistrationOptions[e.registrationOptionID]?"Collapse":"Expand"),r(6),c(n.expandedRegistrationOptions[e.registrationOptionID]?-1:7),r(),c(n.expandedRegistrationOptions[e.registrationOptionID]?8:-1)}}function de(i,l){if(i&1&&(t(0,` 29 `),m(1,ae,3,2),m(2,se,12,3)),i&2){let e=_().$implicit;r(),c((e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues==null?null:e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues.length)===1?1:-1),r(),c((e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues==null?null:e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues.length)>1?2:-1)}}function _e(i,l){i&1&&t(0,` 30 N/A 31 `)}function me(i,l){if(i&1&&(t(0,` 32 `),o(1,"td",11),t(2),g(3,"currency"),a(),t(4,` 33 `)),i&2){let e=_().$implicit;r(2),C(` 34 `,!(e.registrationOption==null||e.registrationOption.entityRegistrationOptions[0]==null)&&e.registrationOption.entityRegistrationOptions[0].fee?S(3,1,e.registrationOption.entityRegistrationOptions[0].fee):"",` 35 `)}}function ce(i,l){if(i&1&&t(0),i&2){let e=_().$implicit;C(` 36 `,e.registrationOptionValue.label,` 37 `)}}function pe(i,l){if(i&1&&t(0),i&2){let e=_().$implicit;C(` 38 `,e.value,` 39 `)}}function Ce(i,l){if(i&1&&(t(0,` 40 `),o(1,"td"),t(2,` 41 `),o(3,"div"),t(4),g(5,"currency"),a(),t(6,` 42 `),a(),t(7,` 43 `)),i&2){let e=_().$implicit;r(4),C(` 44 `,S(5,1,e.registrationOptionValue.fee),` 45 `)}}function ue(i,l){if(i&1&&(t(0,` 46 `),o(1,"tr",12),t(2,` 47 `),x(3,"td"),t(4,` 48 `),o(5,"td"),t(6,` 49 `),o(7,"div",13),t(8,` 50 `),m(9,ce,1,1),m(10,pe,1,1),a(),t(11,` 51 `),a(),t(12,` 52 `),m(13,Ce,8,3),a(),t(14,` 53 `)),i&2){let e=l.$implicit,n=_(2).$implicit,s=_(3);r(),u("hidden",!s.expandedRegistrationOptions[n.registrationOptionID]),r(8),c(e.registrationOptionValue?9:-1),r(),c(e.registrationOptionValue?-1:10),r(3),c(s.registrationOptions&&s.playerRegistrationOptionsFee>0?13:-1)}}function xe(i,l){if(i&1&&(t(0,` 54 `),P(1,ue,15,4,null,null,T)),i&2){let e=_().$implicit;r(),D(e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues)}}function ye(i,l){if(i&1&&(t(0,` 55 `),o(1,"tr"),t(2,` 56 `),o(3,"td"),t(4,` 57 `),o(5,"div"),t(6),a(),t(7,` 58 `),a(),t(8,` 59 `),o(9,"td"),t(10,` 60 `),m(11,de,3,2)(12,_e,1,0),a(),t(13,` 61 `),m(14,me,5,3),a(),t(15,` 62 `),m(16,xe,3,0)),i&2){let e=l.$implicit,n=_(3);r(6),C(` 63 `,e.registrationOption.label,` 64 `),r(5),c(e.registrationOption.entityRegistrationOptions!=null&&e.registrationOption.entityRegistrationOptions.length?11:12),r(3),c(n.registrationOptions&&n.playerRegistrationOptionsFee>0?14:-1),r(2),c(e.registrationOption.entityRegistrationOptions!=null&&e.registrationOption.entityRegistrationOptions.length&&(e.registrationOption.entityRegistrationOptions[0]==null||e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues==null?null:e.registrationOption.entityRegistrationOptions[0].entityRegistrationOptionValues.length)>1?16:-1)}}function ge(i,l){if(i&1&&(t(0,` 65 `),o(1,"tr",14),t(2,` 66 `),x(3,"td"),t(4,` 67 `),x(5,"td"),t(6,` 68 `),o(7,"td"),t(8),g(9,"currency"),a(),t(10,` 69 `),a(),t(11,` 70 `)),i&2){let e=_(3);r(8),C(` 71 `,S(9,1,e.playerRegistrationOptionsFee),` 72 `)}}function fe(i,l){if(i&1&&(t(0,` 73 `),o(1,"div",0),t(2,` 74 `),o(3,"div",1),t(4,` 75 `),o(5,"div",2),t(6,` 76 `),o(7,"h3"),t(8,"Option(s)"),a(),t(9,` 77 `),a(),t(10,` 78 `),m(11,ie,7,0),a(),t(12,` 79 `),o(13,"div",1),t(14,` 80 `),o(15,"div",3),t(16,` 81 `),o(17,"table",4),t(18,` 82 `),o(19,"thead"),t(20,` 83 `),o(21,"tr"),t(22,` 84 `),o(23,"th"),t(24,"Option"),a(),t(25,` 85 `),o(26,"th"),t(27,"Selection(s)"),a(),t(28,` 86 `),m(29,ee,4,0),a(),t(30,` 87 `),a(),t(31,` 88 `),o(32,"tbody"),t(33,` 89 `),P(34,ye,17,4,null,null,T),m(36,ge,12,3),a(),t(37,` 90 `),a(),t(38,` 91 `),a(),t(39,` 92 `),a(),t(40,` 93 `),a(),t(41,` 94 `)),i&2){let e=_(2);r(11),c(e.playerRegistrationHasEditableOptions?11:-1),r(18),c(e.registrationOptions&&e.playerRegistrationOptionsFee>0?29:-1),r(5),D(e.getDisplayRegistrationOptions()),r(2),c(e.registrationOptions&&e.playerRegistrationOptionsFee>0?36:-1)}}function he(i,l){if(i&1&&(t(0,` 95 `),m(1,fe,42,3)),i&2){let e=_();r(),c(e.registrationOptions!=null&&e.registrationOptions.length?1:-1)}}function Se(i,l){i&1&&(t(0,` 96 `),o(1,"div",15),t(2,`
97 `),x(3,"app-skeleton-template",16),t(4,` 98 `),a(),t(5,` 99`)),i&2&&(r(3),u("invertBg",!0))}function ve(i,l){if(i&1){let e=R();t(0,` 100 `),o(1,"div"),t(2,` 101 `),o(3,"app-shared-player-registration-options-edit",22),v("registrationOptionChange",function(s){f(e);let d=_(2);return h(d.onRegistrationOptionChange(s))}),t(4,` 102 `),a(),t(5,` 103 `),a(),t(6,` 104 `)}if(i&2){let e=_(2);r(3),u("registrationID",e.registrationID)("registrationOptions",e.registrationOptions)("playerRegistrationID",e.entityRegistrationID)}}function Re(i,l){i&1&&t(0,` 105 This balance will be added to a new payment that will be due today. 106 `)}function Ee(i,l){i&1&&t(0,` 107 This balance will need to be paid today in order to proceed. 108 `)}function be(i,l){if(i&1&&(t(0,` 109 `),m(1,Re,1,0),m(2,Ee,1,0)),i&2){let e=_(4);r(),c(e.isAdmin?1:-1),r(),c(e.isAdmin?-1:2)}}function Te(i,l){i&1&&t(0,` 110 This balance will be added to the next payment. 111 `)}function Pe(i,l){if(i&1&&(t(0),g(1,"currency"),m(2,be,3,2),m(3,Te,1,0)),i&2){let e=_(3);C(` 112 an outstanding balance of `,S(1,3,e.calcResults.newCost-e.calcResults.oldCost),`. 113 `),r(2),c(e.calcResults.newPayment?2:-1),r(),c(e.calcResults.newPayment?-1:3)}}function De(i,l){i&1&&t(0,` 114 This amount will be reduced from the next payment. 115 `)}function Fe(i,l){if(i&1&&(t(0),g(1,"currency")),i&2){let e=_(5);C(` 116 `,S(1,1,e.calcResults.paymentDeductionAmount),` will be reduced from future payments. 117 `)}}function Ie(i,l){if(i&1&&(t(0,` 118 `),m(1,De,1,0)(2,Fe,2,3)),i&2){let e=_(4);r(),c(e.calcResults.oldCost-e.calcResults.newCost===e.calcResults.paymentDeductionAmount?1:2)}}function we(i,l){i&1&&t(0,` 119 This amount will be refunded. 120 `)}function Oe(i,l){if(i&1&&(t(0),g(1,"currency")),i&2){let e=_(5);C(` 121 `,S(1,1,e.calcResults.refundAmount),` will be refunded. 122 `)}}function Ue(i,l){if(i&1&&(t(0,` 123 `),m(1,we,1,0)(2,Oe,2,3)),i&2){let e=_(4);r(),c(e.calcResults.oldCost-e.calcResults.newCost===e.calcResults.refundAmount?1:2)}}function Me(i,l){if(i&1&&(t(0),g(1,"currency"),m(2,Ie,3,1),m(3,Ue,3,1)),i&2){let e=_(3);C(` 124 a refund of `,S(1,3,e.calcResults.oldCost-e.calcResults.newCost),`. 125 `),r(2),c(e.calcResults.paymentDeductionAmount?2:-1),r(),c(e.calcResults.refundAmount?3:-1)}}function Ae(i,l){i&1&&t(0,` 126 Click "Pay Now" to make the payment. 127 `)}function ke(i,l){i&1&&t(0,` 128 Click "Save" to submit changes. 129 `)}function $e(i,l){if(i&1&&(t(0,` 130 `),o(1,"div"),t(2,` 131 The selected changes result in 132 `),m(3,Pe,4,5)(4,Me,4,5),m(5,Ae,1,0),m(6,ke,1,0),a(),t(7,` 133 `)),i&2){let e=_(2);r(3),c(e.calcResults.newCost>e.calcResults.oldCost?3:4),r(2),c(e.paymentRequired?5:-1),r(),c(e.paymentRequired?-1:6)}}function Ve(i,l){i&1&&(t(0,` 134 `),x(1,"app-button-loader"),t(2,` 135 Saving... 136 `))}function Be(i,l){i&1&&t(0,` 137 Pay Now 138 `)}function Ne(i,l){i&1&&t(0,` 139 Save 140 `)}function Le(i,l){if(i&1&&(t(0,` 141 `),m(1,Be,1,0)(2,Ne,1,0)),i&2){let e=_(2);r(),c(e.step===e.PlayerRegistrationOptionChangeStep.CONFIRM&&e.paymentRequired?1:2)}}function qe(i,l){if(i&1){let e=R();t(0,` 142 `),o(1,"p-dialog",17),W("visibleChange",function(s){f(e);let d=_();return H(d.showEditDialog,s)||(d.showEditDialog=s),h(s)}),t(2,` 143 `),m(3,ve,7,3)(4,$e,8,3),t(5,` 144 `),o(6,"div",18),t(7,` 145 `),o(8,"div",19),t(9,` 146 `),o(10,"button",20),v("click",function(){f(e);let s=_();return h(s.cancelEdit())}),t(11,` 147 Cancel 148 `),a(),t(12,` 149 `),t(13,` 150 `),o(14,"button",21),v("click",function(){f(e);let s=_();return h(s.save())}),t(15,` 151 `),m(16,Ve,3,0),m(17,Le,3,1),a(),t(18,` 152 `),a(),t(19,` 153 `),a(),t(20,` 154`),a(),t(21,` 155`)}if(i&2){let e,n=_();r(),j("visible",n.showEditDialog),u("showHeader",!0)("closable",!1)("modal",!0)("draggable",!1),r(2),c((e=n.step)===n.PlayerRegistrationOptionChangeStep.CHANGE_FORM?3:e===n.PlayerRegistrationOptionChangeStep.CONFIRM?4:-1),r(7),u("disabled",n.saving),r(4),u("disabled",n.saving),r(2),c(n.saving?16:-1),r(),c(n.saving?-1:17)}}var Bi=(()=>{let l=class l{get playerRegistrationOptionsFee(){let n=0;return this.registrationOptions?.length&&this.registrationOptions.forEach(s=>{s.registrationOption.entityRegistrationOptions?.length&&s.registrationOption.entityRegistrationOptions.forEach(d=>{d.fee>0&&(n+=d.fee)})}),n}get playerRegistrationHasEditableOptions(){return this.registrationOptions?.length&&!this.isCancelled&&!this.hasSurcharges?this.registrationOptions.some(n=>n.isEditable):!1}get paymentRequired(){return!!(this.calcResults&&this.calcResults.newCost>this.calcResults.oldCost&&this.calcResults.newPayment&&!this.isAdmin)}constructor(n,s){this.playerRegistrationService=n,this.siteDataService=s,this.isAdmin=!1,this.isPlayerRegistration=!0,this.isCancelled=!1,this.hasSurcharges=!1,this.onSave=new pt,this.expandedRegistrationOptions={},this.newOptions=[],this.step=X.CHANGE_FORM,this.PlayerRegistrationOptionChangeStep=X,this.loading=!0,this.showEditDialog=!1,this.saving=!1,this.showPaymentDialog=!1,this.unsubscribe$=new V}ngOnInit(){this.registrationOptions?.length?(this.registrationOptions.forEach(n=>this.expandedRegistrationOptions[n.registrationOptionID]=!1),this.playerRegistrationService.getCompletedEntityRegistrationOptions(this.playerID,this.entityRegistrationID,this.isPlayerRegistration).pipe(w(this.unsubscribe$)).subscribe({next:n=>{this.setData(n),this.loading=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem loading data")}})):this.loading=!1}getDisplayRegistrationOptions(){return this.registrationOptions.filter(n=>n.registrationOption.entityRegistrationOptions?.length)}setData(n){this.registrationOptions.forEach(s=>{s.registrationOption.entityRegistrationOptions=[]}
155),n?.length&&n.forEach(s=>{if(s.entityRegistrationOptionValues.some(d=>d.value||d.registrationOptionValueID)){let d=this.registrationOptions.find(p=>p.registrationOptionID===s.registrationOptionID);d&&(d.registrationOption.entityRegistrationOptions=[s])}})}onRegistrationOptionChange(n){n.registrationTemplateRegistrationOption.registrationOption.registrationOptionTypeID,vi.TEXT_FIELD}save(){switch(this.step){case X.CHANGE_FORM:this.form?.valid?(this.saving=!0,this.newOptions=this.form.valueOptions,this.playerRegistrationService.calculateEntityRegistrationOptionsCostChange(this.playerID,this.entityRegistrationID,this.newOptions,this.isPlayerRegistration).pipe(mt(n=>{this.calcResults=n}),$t(n=>n.newCost!==n.oldCost?Z(null):this.playerRegistrationService.saveEntityRegistrationOptionsChange(this.playerID,this.entityRegistrationID,this.newOptions,this.isPlayerRegistration)),w(this.unsubscribe$)).subscribe({next:n=>{n?(this.siteDataService.showSiteSuccessAlert("Options saved successfully"),this.cancelEdit(),this.playerRegistrationService.optionsChanged(n)):this.step=X.CONFIRM,this.saving=!1},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving data"),this.saving=!1}})):(this.saving=!1,this.form.showValidationMessages());break;case X.CONFIRM:this.saving=!0,this.playerRegistrationService.saveEntityRegistrationOptionsChange(this.playerID,this.entityRegistrationID,this.newOptions,this.isPlayerRegistration).pipe(w(this.unsubscribe$)).subscribe({next:n=>{this.siteDataService.showSiteSuccessAlert("Options saved successfully"),this.cancelEdit(),this.playerRegistrationService.optionsChanged(n),this.saving=!1,this.paymentRequired&&(this.showPaymentDialog=!0)},error:()=>{this.siteDataService.showSiteErrorAlert("There was a problem saving data"),this.saving=!1}});break}}cancelEdit(){this.showEditDialog=!1,setTimeout(()=>{this.step=X.CHANGE_FORM},500)}back(){this.step=this.step-1}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};l.\u0275fac=function(s){return new(s||l)(E(z),E(Q))},l.\u0275cmp=O({type:l,selectors:[["app-entity-registration-options"]],viewQuery:function(s,d){if(s&1&&tt(Ft,5),s&2){let p;A(p=k())&&(d.form=p.first)}},inputs:{registrationOptions:"registrationOptions",playerID:"playerID",entityRegistrationID:"entityRegistrationID",registrationID:"registrationID",isAdmin:"isAdmin",isPlayerRegistration:"isPlayerRegistration",isCancelled:"isCancelled",hasSurcharges:"hasSurcharges"},outputs:{onSave:"onSave"},standalone:!1,decls:3,vars:2,consts:[[1,"player-registration-options-table","summary-table"],[1,"row"],[1,"col-lg-4"],[1,"col-lg-12"],[1,"temp-table"],[1,"col-lg-8"],["type","button",1,"btn","btn-naked","btn-icon-edit","pull-right",3,"click"],[1,"player-registration-option-label",3,"click","title"],["href","javascript:void(0);",1,"registration-option-toggle"],[1,"fa","fa-angle-down"],[1,"fa","fa-angle-up"],[1,"player-registration-option-total-fee"],[3,"hidden"],[1,"player-registration-option-selection-label"],[1,"totals-row"],[1,"mb-3"],[3,"invertBg"],["header","Edit Options","styleClass","standardWidthDialog",3,"visibleChange","visible","showHeader","closable","modal","draggable"],[1,"row","form-action"],[1,"col"],[1,"btn","btn-secondary","btn-lg",3,"click","disabled"],[1,"btn","btn-primary","btn-lg","pull-right",3,"click","disabled"],[3,"registrationOptionChange","registrationID","registrationOptions","playerRegistrationID"]],template:function(s,d){s&1&&(m(0,he,2,1)(1,Se,6,1),m(2,qe,22,10)),s&2&&(c(d.loading?1:0),r(2),c(!d.loading&&(d.registrationOptions!=null&&d.registrationOptions.length)?2:-1))},dependencies:[lt,st,at,Ft,I],encapsulation:2});let i=l;return i})();var Qe=["refundOverlay"],Ye=()=>({"max-width":"500px"});function ze(i,l){if(i&1&&(t(0,` 156 `),o(1,"div",5),t(2),a(),t(3,` 157 `)),i&2){let e=_();r(2),F(e.playerRegistration.registration.program.name)}}function Ge(i,l){if(i&1&&t(0),i&2){let e=_();C(` 158 `,e.playerRegistration.registration.program.playerProgramAssignments[0].team.registrationLabelOverride||e.playerRegistration.registration.name,` 159 `)}}function Xe(i,l){if(i&1&&t(0),i&2){let e=_();C(` 160 `,e.playerRegistration.registration.name,` 161 `)}}function Je(i,l){if(i&1&&(t(0,` 162 `),o(1,"app-pill",6),t(2),a(),t(3,` 163 `)),i&2){let e=_();r(),u("status",e.paymentStatusPillStatus(e.playerRegistration.paymentStatus)),r(),F(e.paymentStatusPillText(e.playerRegistration.paymentStatus))}}function Ke(i,l){i&1&&(t(0,` 164 `),o(1,"span",7),t(2,"\u2022"),a(),t(3,` 165 `))}function Ze(i,l){if(i&1&&t(0),i&2){let e=_();qt(` 166 Registered By `,e.playerRegistration.createdByClubUser.user.firstName," ",e.playerRegistration.createdByClubUser.user.lastName,` 167 `)}}function tn(i,l){i&1&&(t(0,` 168 `),o(1,"span",7),t(2,"\u2022"),a(),t(3,` 169 `))}function en(i,l){i&1&&(t(0,` 170 `),o(1,"span",10),t(2,` 171 `),x(3,"i",11),t(4,` 172 `),a(),t(5,` 173 This registration has been cancelled 174 `))}function nn(i,l){i&1&&t(0,` 175 This registration has been issued one or more refunds 176 `)}function on(i,l){if(i&1){let e=R();t(0,` 177 `),o(1,"a",12),v("mouseover",function(s){f(e);let d=_(2);return h(d.showRefundOverlay(s))})("mouseleave",function(){f(e);let s=_(2);return h(s.hideRefundOverlay())}),t(2,` 178 `),o(3,"span",13),t(4,` 179 `),x(5,"i",14),t(6,` 180 `),a(),t(7,` 181 `),a(),t(8,` 182 `)}}function an(i,l){if(i&1&&(t(0,` 183 `),o(1,"div",8),t(2,` 184 `),o(3,"div",9),t(4,`
185 `),m(5,en,6,0),m(6,nn,1,0),m(7,on,9,0),a(),t(8,` 186 `),a(),t(9,` 187 `)),i&2){let e=_();r(),B("cancel-note",e.playerRegistration.isCancelled),r(4),c(e.playerRegistration.isCancelled?5:-1),r(),c(e.playerRegistration.isCancelled?-1:6),r(),c(e.playerRegistration.refundRequests!=null&&e.playerRegistration.refundRequests.length||e.playerRegistration.refundCredits!=null&&e.playerRegistration.refundCredits.length?7:-1)}}function rn(i,l){i&1&&t(0,` 188 Approved 189 `)}function ln(i,l){i&1&&t(0,` 190 Pending 191 `)}function sn(i,l){if(i&1&&(t(0,` 192 `),o(1,"tr"),t(2,` 193 `),o(3,"td"),t(4),g(5,"currency"),a(),t(6,` 194 `),o(7,"td"),t(8,` 195 `),m(9,rn,1,0),m(10,ln,1,0),a(),t(11,` 196 `),a(),t(12,` 197 `)),i&2){let e=l.$implicit,n=_(4);r(4),F(S(5,3,e.refundAmount)),r(5),c(e.refundRequestStatusID===n.refundRequestStatus.APPROVED?9:-1),r(),c(e.refundRequestStatusID===n.refundRequestStatus.PENDING?10:-1)}}function dn(i,l){if(i&1&&(t(0,` 198 `),o(1,"div",15),t(2,` 199 This registration was issued the following refund(s) 200 `),a(),t(3,` 201 `),o(4,"div",16),t(5,` 202 `),o(6,"table",17),t(7,` 203 `),o(8,"thead"),t(9,` 204 `),o(10,"tr"),t(11,` 205 `),o(12,"th"),t(13,"Amount"),a(),t(14,` 206 `),o(15,"th"),t(16,"Status"),a(),t(17,` 207 `),a(),t(18,` 208 `),a(),t(19,` 209 `),o(20,"tbody"),t(21,` 210 `),P(22,sn,13,5,null,null,T),a(),t(24,` 211 `),a(),t(25,` 212 `),a(),t(26,` 213 `)),i&2){let e=_(3);r(22),D(e.playerRegistration.refundRequests)}}function _n(i,l){if(i&1&&(t(0),g(1,"number")),i&2){let e=_(2).$implicit;C(` 214 `,S(1,1,e.value),`% off 215 `)}}function mn(i,l){if(i&1&&(t(0,` 216 `),m(1,_n,2,3)),i&2){let e=_().$implicit,n=_(4);r(),c(e.creditTypeID===n.CreditTypes.CREDIT?1:-1)}}function cn(i,l){if(i&1&&(t(0),g(1,"currency")),i&2){let e=_(2).$implicit;C(` 217 `,S(1,1,e.value),` 218 `)}}function pn(i,l){if(i&1&&(t(0,` 219 `),m(1,cn,2,3)),i&2){let e=_().$implicit,n=_(4);r(),c(e.creditTypeID===n.CreditTypes.CREDIT?1:-1)}}function Cn(i,l){if(i&1&&(t(0,` 220 `),o(1,"tr"),t(2,` 221 `),o(3,"td"),t(4),a(),t(5,` 222 `),o(6,"td"),t(7,` 223 `),m(8,mn,2,1),m(9,pn,2,1),a(),t(10,` 224 `),a(),t(11,` 225 `)),i&2){let e=l.$implicit,n=_(4);r(4),F(e.name),r(4),c(e.clubCreditTypeID===n.ClubCreditTypes.PERCENTAGE?8:-1),r(),c(e.clubCreditTypeID===n.ClubCreditTypes.FIXED_AMOUNT?9:-1)}}function un(i,l){if(i&1&&(t(0,` 226 `),o(1,"div",15),t(2,` 227 This registration was issued the following refund credit(s) 228 `),a(),t(3,` 229 `),o(4,"div",16),t(5,` 230 `),o(6,"table",17),t(7,` 231 `),o(8,"thead"),t(9,` 232 `),o(10,"tr"),t(11,` 233 `),o(12,"th"),t(13,"Credit/Discount Name"),a(),t(14,` 234 `),o(15,"th"),t(16,"Amount"),a(),t(17,` 235 `),a(),t(18,` 236 `),a(),t(19,` 237 `),o(20,"tbody"),t(21,` 238 `),P(22,Cn,12,3,null,null,T),a(),t(24,` 239 `),a(),t(25,` 240 `),a(),t(26,` 241 `)),i&2){let e=_(3);r(22),D(e.playerRegistration.refundCredits)}}function xn(i,l){if(i&1&&(t(0,` 242 `),m(1,dn,27,0),m(2,un,27,0)),i&2){let e=_(2);r(),c(e.playerRegistration.refundRequests!=null&&e.playerRegistration.refundRequests.length?1:-1),r(),c(e.playerRegistration.refundCredits!=null&&e.playerRegistration.refundCredits.length?2:-1)}}function yn(i,l){if(i&1&&(t(0,` 243 `),m(1,xn,3,2)),i&2){let e=_();r(),c(e.playerRegistration&&(e.playerRegistration.refundCredits!=null&&e.playerRegistration.refundCredits.length||e.playerRegistration.refundRequests!=null&&e.playerRegistration.refundRequests.length)?1:-1)}}var Li=(()=>{let l=class l{constructor(){this.refundRequestStatus=Ei,this.CreditTypes=Tt,this.ClubCreditTypes=Pt}paymentStatusPillStatus(n){switch(n){case K.FULLY_PAID:return"success";case K.PAYMENT_OVERDUE:return"error";
243case K.PARTIALLY_PAID:default:return"warning"}}paymentStatusPillText(n){switch(n){case K.FULLY_PAID:return"Fully Paid";case K.PARTIALLY_PAID:return"Partially Paid";case K.PAYMENT_OVERDUE:return"Payment Overdue";default:return""}}get playerRegistrationOptionsFee(){let n=0,s=this.playerRegistration.entityRegistrationOptions;return s?.length&&s.forEach(d=>{d.fee>0&&(n+=d.fee)}),n}showRefundOverlay(n){this.refundOverlay.show(n)}hideRefundOverlay(){this.refundOverlay.hide()}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=O({type:l,selectors:[["app-entity-registration-summary"]],viewQuery:function(s,d){if(s&1&&tt(Qe,5),s&2){let p;A(p=k())&&(d.refundOverlay=p.first)}},inputs:{playerRegistration:"playerRegistration"},standalone:!1,decls:29,vars:16,consts:[["refundOverlay",""],["content",""],[1,"player-registration-summary"],[1,"registration-name","mb-1"],["appendTo","body",3,"dismissable"],[1,"small-label"],[3,"status"],[1,"mx-2"],[1,"row","mb-3"],[1,"col-lg-12"],[2,"margin-right","5px"],[1,"fas","fa-times"],["href","javascript:void(0)",3,"mouseover","mouseleave"],[1,"text-primary-link","ml-2"],[1,"far","fa-info-circle"],[1,"overlay-payment-plan-name"],[1,"overlay-payment-plan-payments"],[1,"table"]],template:function(s,d){s&1&&(o(0,"div",2),t(1,` 244 `),o(2,"div"),t(3,` 245 `),m(4,ze,4,1),o(5,"h2",3),t(6,` 246 `),m(7,Ge,1,1)(8,Xe,1,1),a(),t(9,` 247 248 `),o(10,"div"),t(11,` 249 `),m(12,Je,4,2),m(13,Ke,4,0),m(14,Ze,1,2),m(15,tn,4,0),t(16),g(17,"utcDate"),a(),t(18,` 250 251 `),m(19,an,10,5),a(),t(20,` 252`),a(),t(21,` 253 254 255`),o(22,"p-popover",4,0),t(24,` 256 `),U(25,yn,2,1,"ng-template",null,1,J),t(27,` 257`),a(),t(28,` 258`)),s&2&&(r(4),c(d.playerRegistration.registration.program!=null&&d.playerRegistration.registration.program.name?4:-1),r(3),c(d.playerRegistration.registration.program.playerProgramAssignments&&d.playerRegistration.registration.program.playerProgramAssignments[0]&&d.playerRegistration.registration.program.playerProgramAssignments[0].team?7:8),r(5),c(d.playerRegistration.paymentStatus?12:-1),r(),c(d.playerRegistration.paymentStatus&&(d.playerRegistration.createdByClubUser!=null&&d.playerRegistration.createdByClubUser.user)?13:-1),r(),c(d.playerRegistration.createdByClubUser!=null&&d.playerRegistration.createdByClubUser.user?14:-1),r(),c(d.playerRegistration.paymentStatus||d.playerRegistration.createdByClubUser!=null&&d.playerRegistration.createdByClubUser.user?15:-1),r(),C(` 259 `,et(17,11,d.playerRegistration.completedOn,"MMM d, y, h:mm a",!0),` 260 `),r(3),c(d.playerRegistration.isCancelled||d.playerRegistration.refundRequests!=null&&d.playerRegistration.refundRequests.length||d.playerRegistration.refundCredits!=null&&d.playerRegistration.refundCredits.length?19:-1),r(3),q(M(15,Ye)),u("dismissable",!0))},dependencies:[vt,bt,xt,I,Y],encapsulation:2});let i=l;return i})();var hn=(i,l)=>["/training-sessions","players",i,"registrations",l],Sn=i=>({ReturnUrl:i});function vn(i,l){if(i&1&&(t(0,` 261 `),o(1,"div",5),t(2,` 262 `),o(3,"a",6),t(4,` 263 Manage 264 `),a(),t(5,` 265 `),a(),t(6,` 266 `)),i&2){let e=_(2);r(3),u("routerLink",ut(2,hn,e.playerID,e.entityRegistrationID))("queryParams",Ht(5,Sn,e.returnUrl))}}function Rn(i,l){if(i&1){let e=R();t(0,` 267 `),o(1,"div",7),t(2,` 268 `),o(3,"app-scheduled-slot",8),v("cancelClicked",function(){let s=f(e).$implicit,d=_(2);return h(d.promptCancel(s))}),a(),t(4,` 269 `),a(),t(5,` 270 `)}if(i&2){let e=l.$implicit,n=_(2);r(3),u("showCancel",n.allowCancel)("enableCancel",!0)("signUpTimeSlot",e.signUpTimeSlot)("price",e.price)("showPrice",!!e.price)("collapsedView",!0)}}function En(i,l){if(i&1&&(t(0,` 271 `),o(1,"div",2),t(2,` 272 `),o(3,"div",3),t(4,` 273 `),o(5,"div",4),t(6,` 274 `),o(7,"h3"),t(8),a(),t(9,` 275 `),a(),t(10,` 276 `),m(11,vn,7,7),a(),t(12,` 277 `),P(13,Rn,6,6,null,null,T),a(),t(15,` 278`)),i&2){let e=_();r(8),C("Selected Sessions (",e.timeSlots.length,")"),r(3),c(e.showManageLink?11:-1),r(2),D(e.timeSlots)}}function bn(i,l){i&1&&(t(0,` 279 `),o(1,"app-inline-alert",12),t(2,` 280 This is the last remaining time slot \u2014 cancelling it will cancel the entire registration. 281 `),a(),t(3,` 282 `)),i&2&&(r(),u("isInline",!0))}function Tn(i,l){i&1&&t(0,` 283 Are you sure you want to cancel this time slot? It will be removed from the calendar and returned to the bundle to 284 use in the future. 285 `)}function Pn(i,l){i&1&&t(0,` 286 How would you like to handle the cancellation for this time slot? 287 `)}function Dn(i,l){if(i&1&&(t(0,` 288 `),o(1,"div"),t(2),a(),t(3,` 289 `)),i&2){let e=l.$implicit;r(2),F(e)}}function Fn(i,l){if(i&1&&(t(0,` 290 `),o(1,"app-inline-alert",13),t(2,` 291 `),P(3,Dn,4,1,null,null,T),a(),t(5,` 292 `)),i&2){let e=_(2);r(),u("isInline",!0),r(2),D(e.cancelFailures)}}function In(i,l){if(i&1&&(t(0,` 293 `),m(1,bn,4,1),o(2,"div",9),t(3,` 294 `),m(4,Tn,1,0)(5,Pn,1,0),a(),t(6,` 295 `),o(7,"div",10),t(8,` 296 `),x(9,"app-scheduled-slot",11),t(10,` 297 `),a(),t(11,` 298 `),m(12,Fn,6,1)),i&2){let e=_();r(),c(e.isLastTimeSlot?1:-1),r(3),c(e.isBundle?4:5),r(5),u("showCancel",!1)("signUpTimeSlot",e.selectedTimeSlot.signUpTimeSlot)("price",e.selectedTimeSlot.price)("showPrice",!!e.selectedTimeSlot.price),r(3),c(e.cancelFailures.length?12:-1)}}function wn(i,l){i&1&&(t(0," "),x(1,"app-button-loader"),t(2," "))}function On(i,l){if(i&1){let e=R();t(0,` 299 `),o(1,"button",17),v("click",function(){f(e);let s=_(2);return h(s.cancelTimeSlot(!1))}),t(2,` 300 `),m(3,wn,3,0),t(4),a(),t(5,` 301 `)}if(i&2){let e=_(2);r(),u("disabled",e.saving),r(2),c(e.saving?3:-1),r(),C(` 302 `,e.saving?"Cancelling...":"Yes, I'm sure",` 303 `)}}function Un(i,l){i&1&&(t(0," "),x(1,"app-button-loader"),t(2," "))}function Mn(i,l){i&1&&(t(0," "),x(1,"app-button-loader"),t(2," "))}function An(i,l){if(i&1){let e=R();t(0,` 304 `),o(1,"button",18),v("click",function(){f(e);let s=_(2);return h(s.cancelTimeSlot(!0))}),t(2,` 305 `),m(3,Un,3,0),t(4,` 306 Issue Credit 307 `),a(),t(5,` 308 `),o(6,"button",19),v("click",function(){f(e);let s=_(2);return h(s.cancelTimeSlot(!1))}),t(7,` 309 `),m(8,Mn,3,0),t(9,` 310 Issue Refund 311 `),a(),t(10,` 312 `)}if(i&2){let e=_(2);r(),u("disabled",e.saving),r(2),c(e.saving?3:-1),r(3),u("disabled",e.saving),r(2),c(e.saving?8:-1)}}function kn(i,l){if(i&1){let e=R();t(0,` 313 `),o(1,"app-dialog-footer"),t(2,` 314 `),N(3,14),t(4,` 315 `),o(5,"button",15),v("click",function(){f(e);let s=_();return h(s.closeCancelDialog())}),t(6),a(),t(7,` 316 `),L(),t(8,` 317 `),N(9,16),t(10,` 318 `),m(11,On,6,3)(12,An,11,4),L(),t(13,` 319 `),a(),t(14,` 320 `)}if(i&2){let e=_();r(5),u("disabled",e.saving),r(),C(` 321 `,e.isBundle?"No":"Cancel",` 322 `),r(5),c(e.isBundle?11:12)}}var ji=(()=>{let l=class l{get isBundle(){return!!this.selectedTimeSlot?.isBundleSession}constructor(n,s){this.playerRegistrationsService=n,this.siteDataService=s,this.showManageLink=!1,this.allowCancel=!1,this.cancelled=new pt,this.showCancelDialog=!1,this.saving=!1,this.cancelFailures=[],this.currencyPipe=new I("en-US"),this.unsubscribe$=new V}ngOnInit(){this.returnUrl=window.location.pathname}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}get isLastTimeSlot(){return this.timeSlots?.length===1}promptCancel(n){this.selectedTimeSlot=n,this.cancelFailures=[],this.showCancelDialog=!0}closeCancelDialog(){this.showCancelDialog=!1,this.selectedTimeSlot=null,this.cancelFailures=[]}cancelTimeSlot(n){if(!this.selectedTimeSlot||!this.playerID||!this.entityRegistrationID){this.siteDataService.showSiteErrorAlert("Unable to cancel this session: missing registration details.");return}let s=this.selectedTimeSlot.signUpTimeSlotID;this.saving=!0,this.cancelFailures=[],this.playerRegistrationsService.adminCancelRegistrationTimeSlot(this.playerID,this.entityRegistrationID,s,n).pipe(w(this.unsubscribe$)).subscribe({next:d=>{this.saving=!1,this.handleCancelResult(d,s)},error:d=>{this.saving=!1;let p=d?.error;if(p?.failures?.length){this.handleCancelResult(p,s);return}this.siteDataService.showSiteErrorAlert("There was a problem cancelling this time slot. Please try again.")}})}
322handleCancelResult(n,s){if(n?.failures?.length){this.cancelFailures=n.failures.map(d=>d.reason);return}if(!n?.isSuccess){this.siteDataService.showSiteErrorAlert("There was a problem cancelling this time slot. Please try again.");return}this.siteDataService.showSiteSuccessAlert(this.getSuccessMessage(n)),this.timeSlots=this.timeSlots.filter(d=>d.signUpTimeSlotID!==s),this.closeCancelDialog(),this.cancelled.emit(s)}getSuccessMessage(n){return this.isBundle?"Time slot cancelled and returned to the bundle.":n.wasCredit&&n.amount?`Time slot cancelled and a credit of ${this.currencyPipe.transform(n.amount)} was added.`:n.wasRefunded&&n.amount?`Time slot cancelled and a refund of ${this.currencyPipe.transform(n.amount)} was initiated.`:"Time slot cancelled."}};l.\u0275fac=function(s){return new(s||l)(E(z),E(Q))},l.\u0275cmp=O({type:l,selectors:[["app-entity-registration-time-slots"]],inputs:{timeSlots:"timeSlots",showManageLink:"showManageLink",playerID:"playerID",entityRegistrationID:"entityRegistrationID",allowCancel:"allowCancel"},outputs:{cancelled:"cancelled"},standalone:!1,decls:8,vars:6,consts:[["footer",""],["header","Please Confirm","appendTo","body","styleClass","standardWidthDialog",3,"visibleChange","onHide","visible","modal","closable","draggable"],[1,"player-registration-payment-summary","summary-table"],[1,"row"],[1,"col-lg-4","payments-label"],[1,"col-lg-8"],[1,"btn-icon-edit","pull-right",3,"routerLink","queryParams"],[1,"border-all","border-radius","p-2","bg-white","mb-2","d-md-flex","d-block","justify-content-between","align-items-center","width-50"],["cancelText","Cancel Time Slot",3,"cancelClicked","showCancel","enableCancel","signUpTimeSlot","price","showPrice","collapsedView"],["data-testid","registration-slot-cancel-message",1,"mb-4"],[1,"border-all","border-radius","p-2","bg-white","mb-4","d-flex","justify-content-between","align-items-center"],[3,"showCancel","signUpTimeSlot","price","showPrice"],["alertType","warning",1,"mb-3",3,"isInline"],["alertType","error",1,"mb-3",3,"isInline"],["slot","secondary"],["type","button","data-testid","registration-slot-cancel-dismiss",1,"btn",3,"click","disabled"],["slot","primary"],["type","button","data-testid","registration-slot-cancel-confirm",1,"btn","btn-primary",3,"click","disabled"],["type","button","data-testid","registration-slot-cancel-credit",1,"btn",3,"click","disabled"],["type","button","data-testid","registration-slot-cancel-refund",1,"btn","btn-red","btn-primary",3,"click","disabled"]],template:function(s,d){if(s&1){let p=R();m(0,En,16,2),o(1,"p-dialog",1),W("visibleChange",function(b){return f(p),H(d.showCancelDialog,b)||(d.showCancelDialog=b),h(b)}),v("onHide",function(){return d.closeCancelDialog()}),t(2,` 323 `),m(3,In,13,7),U(4,kn,15,3,"ng-template",null,0,J),t(6,` 324`),a(),t(7,` 325`)}s&2&&(c(d.timeSlots!=null&&d.timeSlots.length?0:-1),r(),j("visible",d.showCancelDialog),u("modal",!0)("closable",!1)("draggable",!1),r(2),c(d.selectedTimeSlot?3:-1))},dependencies:[ot,rt,st,Et,at,bi],encapsulation:2});let i=l;return i})();function Bn(i,l){if(i&1&&(t(0,` 326 `),o(1,"app-inline-alert",2),t(2,` 327 `),x(3,"span",3),g(4,"safeHtml"),t(5,` 328 `),a(),t(6,` 329 `)),i&2){let e=_().$implicit;r(),u("isInline",!1),r(2),u("innerHtml",S(4,2,e.registrationIntegration.registrationSummaryNote),Bt)}}function Nn(i,l){if(i&1&&(t(0,` 330 `),o(1,"app-inline-alert",2),t(2,` 331 `),o(3,"span",4),t(4),a(),t(5,` 332 `),a(),t(6,` 333 `)),i&2){let e=_(2).$implicit;r(),u("isInline",!1),r(3),C(` 334 This registration is covered by 335 `,(e.registrationIntegration==null?null:e.registrationIntegration.displayName)||"Sports Fee Insurance",`. 336 `)}}function Ln(i,l){if(i&1&&(t(0,` 337 `),m(1,Nn,7,2),t(2,` 338 `)),i&2){let e,n=_().$implicit,s=_(2);r(),c((e=n.registrationIntegrationID)===s.RegistrationIntegration.USSCI?1:-1)}}function qn(i,l){if(i&1&&(t(0,` 339 `),o(1,"div",1),t(2,` 340 `),m(3,Bn,7,4),m(4,Ln,3,1),a(),t(5,` 341 `)),i&2){let e=l.$implicit;r(3),c(e.registrationIntegration!=null&&e.registrationIntegration.registrationSummaryNote?3:-1),r(),c(e.registrationIntegration!=null&&e.registrationIntegration.registrationSummaryNote?-1:4)}}function jn(i,l){if(i&1&&(t(0,` 342 `),o(1,"div",0),t(2,` 343 `),o(3,"h3"),t(4,` 344 Add-Ons 345 `),a(),t(5,` 346 `),P(6,qn,6,2,null,null,T),a(),t(8,` 347`)),i&2){let e=_();r(6),D(e.entityRegistration.entityRegistrationIntegrations)}}var Hi=(()=>{let l=class l{constructor(){this.RegistrationIntegration=pi}};l.\u0275fac=function(s){return new(s||l)},l.\u0275cmp=O({type:l,selectors:[["app-entity-registration-integrations"]],inputs:{entityRegistration:"entityRegistration"},standalone:!1,decls:1,vars:1,consts:[[1,"mt-3"],[1,"my-3"],["alertType","info",3,"isInline"],[3,"innerHtml"],[1,"mr-1"]],template:function(s,d){s&1&&m(0,jn,9,0),s&2&&c(d.entityRegistration.entityRegistrationIntegrations!=null&&d.entityRegistration.entityRegistrationIntegrations.length?0:-1)},dependencies:[rt,li],encapsulation:2});let i=l;return i})();var zn=["paymentForm"],Gn=["donationPaymentForm"],Xn=["paymentOptionsMenu"],Jn=["applyToFuturePaymentsForm"],Kn=["appliedCreditsOverlay"],Zn=["pendingCreditsOverlay"],to=()=>({width:"auto"}),At=()=>({"min-width":"650px"}),io=()=>({"max-width":"500px"}),eo=()=>[".."],no=()=>["completed"];function oo(i,l){if(i&1&&(t(0,` 348 `),o(1,"div",11),t(2,` 349 `),o(3,"a",12),t(4),a(),t(5,` 350 `),a(),t(6,` 351 `)),i&2){let e=_(3);r(3),u("routerLink",M(2,eo)),r(),C(` 352 `,e.player.user.firstName,`'s Registrations 353 `)}}function ao(i,l){if(i&1&&(t(0,` 354 `),o(1,"div",21),t(2,` 355 `),o(3,"div",23),t(4,` 356 Price 357 `),a(),t(5,` 358 `),o(6,"div",24),t(7),g(8,"currency"),a(),t(9,` 359 `),a(),t(10,` 360 `)),i&2){let e=_(3).$implicit;r(7),C(` 361 `,S(8,1,e.registrationPrice),` 362 `)}}function ro(i,l){i&1&&t(0,` 363 Price (including options) 364 `)}function lo(i,l){i&1&&t(0,` 365 Price 366 `)}function so(i,l){if(i&1&&(t(0,` 367 `),o(1,"div",21),t(2,` 368 `),o(3,"div",23),t(4,` 369 `),m(5,ro,1,0)(6,lo,1,0),a(),t(7,` 370 `),o(8,"div",24),t(9),g(10,"currency"),a(),t(11,` 371 `),a(),t(12,` 372 `)),i&2){let e=_(3).$implicit;r(5),c(e.registrationPrice>0?5:6),r(4),C(` 373 `,S(10,2,e.totalRegistrationPrice),` 374 `)}}function _o(i,l){i&1&&t(0,` 375 Pay Offline 376 `)}function mo(i,l){i&1&&t(0,` 377 Pay Upfront 378 `)}function co(i,l){if(i&1&&t(0),i&2){let e=_(5).$implicit;C(` 379 `,e.paymentInstallmentPlan.shortName,` 380 `)}}function po(i,l){if(i&1&&(t(0,` 381 `),m(1,mo,1,0),m(2,co,1,1)),i&2){let e=_(4).$implicit;r(),c(e.paymentInstallmentPlan?-1:1),r(),c(e.paymentInstallmentPlan?2:-1)}}function Co(i,l){if(i&1&&(t(0,` 382 `),o(1,"div",21),t(2,` 383 `),o(3,"div",25),t(4,` 384 Payment Plan 385 `),a(),t(5,` 386 `),o(6,"div",26),t(7,` 387 `),m(8,_o,1,0),m(9,po,3,2),a(),t(10,` 388 `),a(),t(11,` 389 `)),i&2){let e=_(3).$implicit;r(8),c(e.paidOffline?8:-1),r(),c(e.paidOffline?-1:9)}}function uo(i,l){if(i&1){let e=R();t(0,` 390 `),o(1,"div",21),t(2,` 391 `),o(3,"div",23),t(4,` 392 Remaining Credits/Discounts 393 `),a(),t(5,` 394 `),o(6,"div",24),t(7),g(8,"currency"),o(9,"a",27),v("mouseover",function(s){f(e);let d=_(3).$implicit,p=_(3);return h(p.showPendingCreditsOverlay(d,s))})("mouseleave",function(){f(e);let s=_(6);return h(s.hidePendingCreditsOverlay())}),t(10,` 395 `),o(11,"span",28),t(12,` 396 `),x(13,"i",29),t(14,` 397 `),a(),t(15,` 398 `),a(),t(16,` 399 `),a(),t(17,` 400 `),a(),t(18,` 401 `)}if(i&2){let e=_(3).$implicit;r(7),C(` 402 `,S(8,1,e.pendingCreditsUsed),` 403 `)}}function xo(i,l){if(i&1&&(t(0,` 404 `),m(1,ao,11,3),m(2,so,13,4),m(3,Co,12,2),m(4,uo,19,3)),i&2){let e=_(2).$implicit;r(),c(e.registrationPrice>0?1:-1),r(),c(e.totalRegistrationPrice>e.registrationPrice?2:-1),r(),c(e.enableCheckout?-1:3),r(),c(e.pendingCreditsUsed>0?4:-1)}}function yo(i,l){if(i&1&&(t(0,` 405 `),o(1,"div"),t(2,` 406 `),o(3,"div",30),t(4,` 407 `),o(5,"app-inline-alert",31),t(6,` 408 `),o(7,"span"),t(8),o(9,"a",32),t(10,` 409 select how you want to pay 410 `),a(),t(11,` 411 `),a(),t(12,` 412 `),a(),t(13,` 413 `),a(),t(14,` 414 `),a(),t(15,` 415 `)),i&2){let e=_(5);r(8),C(` 416 `,e.player.user.firstName," has been registered, but you'll need to "),r(),u("routerLink",M(2,no))}}function go(i,l){i&1&&(t(0,` 417 `),o(1,"th"),t(2,` 418 Applied Credits/Discounts 419 `),a(),t(3,` 420 `))}function fo(i,l){i&1&&(t(0,` 421 `),o(1,"th"),t(2,` 422 Payment Options 423 `),a(),t(3,` 424 `))}function ho(i,l){i&1&&(t(0,` 425 `),x(1,"th"),t(2,` 426 `))}function So(i,l){if(i&1&&(t(0),g(1,"date")),i&2){let e=_().$implicit;C(` 427 `,it(1,1,e.dueDate,"MMM d, y"),` 428 `)}}function vo(i,l){if(i&1&&(t(0,` 429 `),o(1,"app-tooltip",38),t(2,` 430 `),a(),t(3,` 431 `)),i&2){let e=_().$implicit,n=_(7);r(),u("tooltipText",n.paymentAmountDueTooltipText(e))}}function Ro(i,l){if(i&1){let e=R();t(0,` 432 `),o(1,"a",27),v("mouseover",function(s){f(e);let d=_(2).$implicit,p=_(7);return h(p.showAppliedCreditsOverlay(d,s))})("mouseleave",function(){f(e);let s=_(9);return h(s.hideAppliedCreditsOverlay())}),t(2,` 433 `),o(3,"span",28),t(4,` 434 `),x(5,"i",29),t(6,` 435 `),a(),t(7,` 436 `),a(),t(8,` 437 `)}}function Eo(i,l){if(i&1&&(t(0,` 438 `),o(1,"td"),t(2),g(3,"currency"),m(4,Ro,9,0),a(),t(5,` 439 `)),i&2){let e=_().$implicit;r(2),C(` 440 `,S(3,2,e.creditsUsed||
4400),` 441 `),r(2),c(e.creditsUsed>0?4:-1)}}function bo(i,l){i&1&&(t(0,` 442 `),o(1,"a",40),t(2,` 443 `),o(3,"span",28),t(4,` 444 `),x(5,"i",41),t(6,` 445 `),a(),t(7,` 446 `),a(),t(8,` 447 `))}function To(i,l){if(i&1&&(t(0,` 448 `),o(1,"a",40),t(2,` 449 `),o(3,"span",28),t(4,` 450 `),x(5,"i",42),t(6,` 451 `),a(),t(7,` 452 `),a(),t(8,` 453 `)),i&2){let e=_(3).$implicit;r(5),u("pTooltip","This payment was disputed and is under review. The customer provided the following reason for the dispute: "+e.clubUserPayment.dispute.disputeReason.description)}}function Po(i,l){if(i&1&&(t(0,` 454 `),o(1,"span",39),t(2,` 455 Disputed 456 `),a(),t(3,` 457 `),m(4,bo,9,0),m(5,To,9,1)),i&2){let e=_(2).$implicit,n=_(7);r(4),c(!n.isAdmin||e.clubUserPayment.paymentVendorID===n.PaymentVendor.PAYRIX?4:-1),r(),c(n.isAdmin&&e.clubUserPayment.paymentVendorID===n.PaymentVendor.STRIPE?5:-1)}}function Do(i,l){i&1&&(t(0,` 458 `),x(1,"i",44),t(2,` 459 `))}function Fo(i,l){i&1&&(t(0,` 460 `),x(1,"i",45),t(2,` 461 `))}function Io(i,l){if(i&1&&(t(0,` 462 `),m(1,Do,3,0),m(2,Fo,3,0)),i&2){let e=_(3).$implicit;r(),c(e.isPendingRefund?-1:1),r(),c(e.isPendingRefund?2:-1)}}function wo(i,l){i&1&&(t(0,` 463 `),x(1,"i",46),t(2,` 464 `))}function Oo(i,l){i&1&&t(0,` 465 Refund Pending 466 `)}function Uo(i,l){i&1&&t(0,` 467 Refund Failed 468 `)}function Mo(i,l){if(i&1&&(t(0,` 469 Refunded 470 `),o(1,"app-tooltip",47),g(2,"date"),t(3,` 471 `),a(),t(4,` 472 `)),i&2){let e=_(5).$implicit;r(),u("tooltipText","Refunded on "+S(2,1,e.paymentCompletedDate))}}function Ao(i,l){if(i&1&&(t(0,` 473 `),m(1,Uo,1,0),m(2,Mo,5,3)),i&2){let e=_(4).$implicit;r(),c(e.clubUserPayment!=null&&e.clubUserPayment.paymentFailed?1:-1),r(),c(e.clubUserPayment!=null&&e.clubUserPayment.paymentFailed?-1:2)}}function ko(i,l){if(i&1&&(t(0,` 474 `),m(1,Oo,1,0),m(2,Ao,3,2)),i&2){let e=_(3).$implicit;r(),c(e.isPendingRefund?1:-1),r(),c(e.isPendingRefund?-1:2)}}function $o(i,l){if(i&1&&(t(0,` 475 `),o(1,"a",40),t(2,` 476 `),o(3,"span",28),t(4,` 477 `),x(5,"i",42),t(6,` 478 `),a(),t(7,` 479 `),a(),t(8,` 480 `)),i&2){let e=_(4).$implicit,n=_(7);r(5),u("pTooltip",n.paymentStatusTooltipText(e))}}function Vo(i,l){if(i&1&&(t(0,` 481 Completed 482 `),m(1,$o,9,1)),i&2){let e=_(3).$implicit,n=_(7);r(),c(!e.isCancelled&&n.paymentStatusTooltipText(e)?1:-1)}}function Bo(i,l){if(i&1&&(t(0,` 483 `),o(1,"span",43),t(2,` 484 `),m(3,Io,3,2),m(4,wo,3,0),m(5,ko,3,2)(6,Vo,2,1),a(),t(7,` 485 `)),i&2){let e=_(2).$implicit,n=_(7);
485r(),B("payment-failed",e.clubUserPayment==null?null:e.clubUserPayment.paymentFailed)("payment-completed",!e.isPendingRefund&&!(e.clubUserPayment!=null&&e.clubUserPayment.paymentFailed))("payment-past-due",e.isPendingRefund&&!(e.clubUserPayment!=null&&e.clubUserPayment.paymentFailed)),r(2),c(e.clubUserPayment!=null&&e.clubUserPayment.paymentFailed?-1:3),r(),c(e.clubUserPayment!=null&&e.clubUserPayment.paymentFailed?4:-1),r(),c(e.transactionTypeID===n.transactionType.REFUND?5:6)}}function No(i,l){if(i&1&&(t(0,` 486 `),m(1,Po,6,2)(2,Bo,8,9)),i&2){let e=_().$implicit,n=_(7);r(),c(e.clubUserPayment!=null&&e.clubUserPayment.dispute&&(e.clubUserPayment==null||e.clubUserPayment.dispute==null?null:e.clubUserPayment.dispute.disputeStatusID)!==n.DisputeStatus.WON?1:2)}}function Lo(i,l){i&1&&(t(0,` 487 `),o(1,"span",39),t(2,` 488 Processing... 489 `),a(),t(3,` 490 `))}function qo(i,l){i&1&&(t(0,` 491 `),o(1,"span",48),t(2,` 492 `),x(3,"i",46),t(4,` 493 Cancelled 494 `),a(),t(5,` 495 `))}function jo(i,l){i&1&&(t(0,` 496 `),o(1,"span",39),t(2,` 497 `),x(3,"i",46),t(4,` 498 Failed 499 `),a(),t(5,` 500 `))}function Ho(i,l){i&1&&(t(0,` 501 `),o(1,"span",39),t(2,` 502 Due Today 503 `),a(),t(3,` 504 `))}function Wo(i,l){i&1&&(t(0,` 505 `),o(1,"span",48),t(2,` 506 `),x(3,"i",46),t(4,` 507 Not Scheduled 508 `),a(),t(5,` 509 `))}function Qo(i,l){i&1&&(t(0,` 510 `),o(1,"a",40),t(2,` 511 `),o(3,"span",28),t(4,` 512 `),x(5,"i",50),t(6,` 513 `),a(),t(7,` 514 `),a(),t(8,` 515 `))}function Yo(i,l){if(i&1&&(t(0,` 516 `),o(1,"span",43),t(2),a(),t(3,` 517 `),o(4,"span",49),t(5,` 518 `),m(6,Qo,9,0),a(),t(7,` 519 `)),i&2){let e=_(7).$implicit,n=_(7);r(),B("card-expiration-warning",n.isCardExpiringBeforePayment(e)),r(),C(` 520 `,n.paymentStatusText(e),` 521 `),r(4),c(n.isCardExpiringBeforePayment(e)?6:-1)}}function zo(i,l){if(i&1&&(t(0,` 522 `),m(1,Wo,6,0),m(2,Yo,8,4)),i&2){let e=_(6).$implicit;r(),c(e.clubUserPaymentMethodID?-1:1),r(),c(e.clubUserPaymentMethodID?2:-1)}}function Go(i,l){if(i&1&&(t(0,` 523 `),m(1,Ho,4,0),m(2,zo,3,2)),i&2){let e=_(5).$implicit;r(),c(e.dueToday?1:-1),r(),c(e.dueToday?-1:2)}}function Xo(i,l){i&1&&(t(0,` 524 `),o(1,"span",48),t(2,` 525 Overdue 526 `),a(),t(3,` 527 `))}function Jo(i,l){if(i&1&&(t(0,` 528 `),m(1,Go,3,2),m(2,Xo,4,0)),i&2){let e=_(4).$implicit,n=_(7);r(),c(n.isPaymentOverdue(e)?-1:1),r(),c(n.isPaymentOverdue(e)?2:-1)}}function Ko(i,l){if(i&1&&(t(0,` 529 `),m(1,jo,6,0),m(2,Jo,3,2)),i&2){let e=_(3).$implicit;r(),c(e.clubUserPayment&&e.clubUserPayment.paymentFailed?1:-1),r(),c(e.clubUserPayment?-1:2)}}function Zo(i,l){if(i&1&&(t(0,` 530 `),o(1,"a",51),t(2,` 531 `),o(3,"span",28),t(4,` 532 `),x(5,"i",42),t(6,` 533 `),a(),t(7,` 534 `),a(),t(8,` 535 `)),i&2){let e=_(3).$implicit,n=_(7);r(5),u("pTooltip",n.paymentStatusTooltipText(e))}}function ta(i,l){if(i&1&&(t(0,` 536 `),m(1,qo,6,0),m(2,Ko,3,2),m(3,Zo,9,1)
536),i&2){let e=_(2).$implicit,n=_(7);r(),c(e.isCancelled?1:-1),r(),c(!e.isCancelled&&e.remainingBalance>0?2:-1),r(),c(!e.isCancelled&&n.paymentStatusTooltipText(e)?3:-1)}}function ia(i,l){if(i&1&&(t(0,` 537 `),m(1,Lo,4,0),m(2,ta,4,3)),i&2){let e=_().$implicit;r(),c(e.isProcessing?1:-1),r(),c(e.isProcessing?-1:2)}}function ea(i,l){if(i&1){let e=R();t(0,` 538 `),o(1,"span",52),t(2,` 539 `),o(3,"button",53),v("click",function(){f(e);let s=_().$implicit,d=_(4).$implicit,p=_(3);return h(p.getFailedPaymentDetails(d.entityRegistrationID,s))}),t(4,` 540 View Details 541 `),a(),t(5,` 542 `),a(),t(6,` 543 `)}}function na(i,l){if(i&1){let e=R();t(0,` 544 `),o(1,"span",52),t(2,` 545 `),o(3,"button",53),v("click",function(){f(e);let s=_(2).$implicit,d=_(7);return h(d.showFailedPaymentAttempts(s))}),t(4,` 546 View Failed Payment Attempts 547 `),a(),t(5,` 548 `),a(),t(6,` 549 `)}}function oa(i,l){if(i&1&&(t(0,` 550 `),m(1,na,7,0)),i&2){let e=_().$implicit;r(),c(e.failedPaymentAttempts!=null&&e.failedPaymentAttempts.length?1:-1)}}function aa(i,l){i&1&&t(0,` 551 You do not have access to make payments for this 552 user 553 `)}function ra(i,l){if(i&1){let e=R();t(0,` 554 `),o(1,"button",54),v("click",function(){f(e);let s=_(5).$implicit,d=_(4).$implicit,p=_(3);return h(p.openPaymentModal(d,s))}),t(2,` 555 Pay Now 556 `),a(),t(3,` 557 `)}}function la(i,l){if(i&1){let e=R();t(0,` 558 `),o(1,"button",54),v("click",function(s){f(e);let d=_(5).$implicit,p=_(4).$implicit,y=_(3);return h(y.togglePaymentOptionsMenu(p,d,s))}),t(2,` 559 `),x(3,"i",55),t(4,` 560 Manage 561 `),a(),t(5,` 562 `)}if(i&2){let e=_(5).$implicit,n=_(7);r(),B("btn-primary",n.isCardExpiringBeforePayment(e))}}function sa(i,l){if(i&1&&(t(0,` 563 `),m(1,ra,4,0),m(2,la,6,2)),i&2){let e=_(4).$implicit,n=_(7);r(),c(!e.isProcessing&&(n.isPaymentOverdue(e)||e.dueToday)?1:-1),r(),c(!e.isProcessing&&!n.isPaymentOverdue(e)&&!e.dueToday?2:-1)}}function da(i,l){if(i&1&&(t(0,` 564 `),m(1,sa,3,2)),i&2){let e=_(3).$implicit;r(),c(!e.paymentCompleted&&!e.clubUserPayment?1:-1)}}function _a(i,l){if(i&1&&(t(0,` 565 `),m(1,aa,1,0),m(2,da,2,1)),i&2){let e=_(9);r(),c(e.allowPayments?-1:1),r(),c(e.allowPayments?2:-1)}}function ma(i,l){if(i&1&&(t(0,` 566 `),o(1,"td"),t(2,` 567 `),m(3,_a,3,2),a(),t(4,` 568 `)),i&2){let e=_().$implicit;r(3),c(!e.isCancelled&&!e.isProcessing?3:-1)}}function ca(i,l){i&1&&(t(0,` 569 `),x(1,"app-button-loader"),t(2,` 570 `))}function pa(i,l){i&1&&(t(0,` 571 `),o(1,"span"),t(2,"Please wait..."),a(),t(3,` 572 `))}function Ca(i,l){i&1&&(t(0,` 573 `),o(1,"span"),t(2,"Mark as Failed"),a(),t(3,` 574 `))}function ua(i,l){if(i&1){let e=R();t(0,` 575 `),o(1,"button",56),v("click",function(){f(e);let s=_(2).$implicit,d=_(4).$implicit,p=_(3);return h(p.markPaymentAsFailed(d.entityRegistrationID,s))}),t(2,` 576 `),m(3,ca,3,0),m(4,pa,4,0),m(5,Ca,4,0),a(),t(6,` 577 `)}if(i&2){let e=_(9);r(),u("disabled",e.markingAsFailed),r(2),c(e.markingAsFailed?3:-1),r(),c(e.markingAsFailed?4:-1),r(),c(e.markingAsFailed?-1:5)}}function xa(i,l){if(i&1&&(t(0,` 578 `),o(1,"td"),t(2,` 579 `),m(3,ua,7,4),a(),t(4,` 580 `)),i&2){let e=_().$implicit;r(3),c(e.paymentCompleted&&e.clubUserPayment&&!e.clubUserPayment.paymentFailed?3:-1)}}function ya(i,l){if(i&1&&(t(0,` 581 `),o(1,"tr"),t(2,` 582 `),o(3,"td"),t(4,` 583 `),m(5,So,2,4),a(),t(6,` 584 `),o(7,"td"),t(8),g(9,"currency"),m(10,vo,4,1),a(),t(11,` 585 `),m(12,Eo,6,4),o(13,"td"),t(14),g(15,"currency"),a(),t(16,` 586 `),o(17,"td"),t(18),g(19,"currency"),a(),t(20,` 587 `),o(21,"td"),t(22,` 588 `),o(23,"div",37),t(24,` 589 `),m(25,No,3,1)(26,ia,3,2),m(27,ea,7,0)(28,oa,2,1),a(),t(29,` 590 `),a(),t(30,` 591 `),m(31,ma,5,1),m(32,xa,5,1),a(),t(33,` 592 `)),i&2){let e=l.$implicit,n=_(4).$implicit,s=_(3);r(5),c(e.transactionTypeID===s.transactionType.PAYMENT?5:-1),r(2),B("strike-through",(e.clubUserPayment==null?null:e.clubUserPayment.paymentFailed)||e.isCancelled),r(),C(` 593 `,S(9,16,e.amountDue),` 594 `),r(2),c(s.paymentAmountDueTooltipText(e)?10:-1),r(2),c(n.creditsUsed>0?12:-1),r(),B("strike-through",(e.clubUserPayment==null?null:e.clubUserPayment.paymentFailed)||e.isCancelled),r(),C(` 595 `,S(15,18,e.amountPaid||0),` 596 `),r(3),B("strike-through",(e.clubUserPayment==null?null:e.clubUserPayment.paymentFailed)||e.isCancelled),r(),C(` 597 `,S(19,20,e.remainingBalance),` 598 `),r(7),c(e.paymentCompleted&&!e.isProcessing||e.transactionTypeID===s.transactionType.REFUND?25:26),r(2),c(e.clubUserPayment&&e.clubUserPayment.paymentFailed&&(e.clubUserPayment.paymentVendorID===s.PaymentVendor.PAYRIX||e.clubUserPayment.dispute&&s.isAdmin)?27:28),r(4),c(!s.isAdmin&&s.anyPaymentsRemaining(n)?31:-1),r(),c(s.show
598FailButton?32:-1)}}function ga(i,l){if(i&1&&(t(0,` 599 `),o(1,"td"),t(2),g(3,"currency"),a(),t(4,` 600 `)),i&2){let e=_(4).$implicit;r(2),C(` 601 `,S(3,1,e.creditsUsed),` 602 `)}}function fa(i,l){i&1&&(t(0,` 603 `),o(1,"td"),t(2,` 604 `),a(),t(3,` 605 `))}function ha(i,l){i&1&&(t(0,` 606 `),x(1,"td"),t(2,` 607 `))}function Sa(i,l){if(i&1&&(t(0,` 608 `),o(1,"div",33),t(2,` 609 `),o(3,"div",34),t(4,` 610 `),o(5,"table",35),t(6,` 611 `),o(7,"thead"),t(8,` 612 `),o(9,"tr"),t(10,` 613 `),o(11,"th"),t(12,"Due Date"),a(),t(13,` 614 `),o(14,"th"),t(15,"Amount Due"),a(),t(16,` 615 `),m(17,go,4,0),o(18,"th"),t(19,"Amount Paid"),a(),t(20,` 616 `),o(21,"th"),t(22,"Remaining Balance"),a(),t(23,` 617 `),o(24,"th"),t(25,"Payment Status"),a(),t(26,` 618 `),m(27,fo,4,0),m(28,ho,3,0),a(),t(29,` 619 `),a(),t(30,` 620 `),o(31,"tbody"),t(32,` 621 `),P(33,ya,34,22,null,null,T),o(35,"tr",36),t(36,` 622 `),x(37,"td"),t(38,` 623 `),o(39,"td"),t(40),g(41,"currency"),a(),t(42,` 624 `),m(43,ga,5,3),o(44,"td"),t(45),g(46,"currency"),a(),t(47,` 625 `),o(48,"td"),t(49),g(50,"currency"),a(),t(51,` 626 `),x(52,"td"),t(53,` 627 `),m(54,fa,4,0),m(55,ha,3,0),a(),t(56,` 628 `),a(),t(57,` 629 `),a(),t(58,` 630 `),a(),t(59,` 631 `),a(),t(60,` 632 `)),i&2){let e=_(3).$implicit,n=_(3);r(17),c(e.creditsUsed>0?17:-1),r(10),c(!n.isAdmin&&n.anyPaymentsRemaining(e)?27:-1),r(),c(n.showFailButton?28:-1),r(5),D(e.payments),r(7),C(` 633 `,S(41,9,e.amountDue),` 634 `),r(3),c(e.creditsUsed>0?43:-1),r(2),C(` 635 `,S(46,11,e.amountPaid),` 636 `),r(4),C(` 637 `,S(50,13,e.remainingBalance),` 638 `),r(5),c(!n.isAdmin&&n.anyPaymentsRemaining(e)?54:-1),r(),c(n.showFailButton?55:-1)}}function va(i,l){if(i&1&&(t(0,` 639 `),m(1,Sa,61,15)),i&2){let e=_(2).$implicit;r(),c((e.payments==null?null:e.payments.length)>1||e.amountDue>0?1:-1)}}function Ra(i,l){if(i&1&&(t(0,` 640 `),o(1,"section",19),t(2,` 641 `),o(3,"div",20),t(4,` 642 `),o(5,"div",21),t(6,` 643 `),o(7,"div",22),t(8,` 644 `),o(9,"h3"),t(10,"Payments"),a(),t(11,` 645 `),a(),t(12,` 646 `),a(),t(13,` 647 `),t(14,` 648 `),m(15,xo,5,4),m(16,yo,16,3)(17,va,2,1),a(),t(18,` 649 `),a(),t(19,` 650 `)),i&2){let e=_().$implicit,n=_(3);r(15),c(e.totalRegistrationPrice>0||e.registrationPrice>0?15:-1),r(),c(e.enableCheckout&&n.isPlayerRegistration&&!n.isAdmin&&n.allowPayments?16:17)}}function Ea(i,l){if(i&1&&(t(0,` 651 `),o(1,"div",19),t(2,` 652 `),o(3,"app-entity-registration-questions",57),t(4,` 653 `),a(),t(5,` 654 `),a(),t(6,` 655 `)),i&2){let e=_().$implicit,n=_(3);r(3),u("questionResponses",n.regQuestionResponses)("playerID",n.playerID)("registrationID",e.registrationID)("entityRegistrationID",e.entityRegistrationID)("isAdmin",n.isAdmin)("isPlayerRegistration",n.isPlayerRegistration)}}function ba(i,l){if(i&1&&(t(0,` 656 `),o(1,"app-entity-registration-options",58),t(2,` 657 `),a(),t(3,` 658 `)),i&2){let e=_().$implicit,n=_(3);r(),u("registrationOptions",n.regOptions[e.registrationID])("playerID",n.playerID)("registrationID",e.registrationID)("isPlayerRegistration",n.isPlayerRegistration)("entityRegistrationID",e.entityRegistrationID)("isCancelled",e.isCancelled)("isAdmin",n.isAdmin)("hasSurcharges",n.hasSurcharges)}}function Ta(i,l){i&1&&(t(0,` 659 `),o(1,"th"),t(2,` 660 Payment Options 661 `),a(),t(3,` 662 `))}function Pa(i,l){i&1&&(t(0,` 663 `),o(1,"span",64),t(2,` 664 `),x(3,"i",44),t(4,` 665 Completed 666 `),a(),t(5,` 667 `))}function Da(i,l){i&1&&(t(0,` 668 `),o(1,"span",39),t(2,` 669 `),x(3,"i",46),t(4,` 670 Failed 671 `),a(),t(5,` 672 `))}function Fa(i,l){if(i&1&&(t(0,` 673 `),m(1,Pa,6,0),m(2,Da,6,0)),i&2){let e=_(3).$implicit;r(),c(e.userClubDonation.clubUserPayment.paymentFailed?-1:1),r(),c(e.userClubDonation.clubUserPayment.paymentFailed?2:-1)}}function Ia(i,l){i&1&&(t(0,` 674 `),o(1,"span",39),t(2,` 675 `),x(3,"i",46),t(4,`
676 Not Completed 677 `),a(),t(5,` 678 `))}function wa(i,l){i&1&&(t(0,` 679 `),o(1,"td"),t(2,` 680 `),a(),t(3,` 681 `))}function Oa(i,l){if(i&1&&(t(0,` 682 `),o(1,"tr"),t(2,` 683 `),o(3,"td"),t(4),a(),t(5,` 684 `),o(6,"td"),t(7),g(8,"currency"),a(),t(9,` 685 `),o(10,"td"),t(11,` 686 `),m(12,Fa,3,2),m(13,Ia,6,0),a(),t(14,` 687 `),m(15,wa,4,0),a(),t(16,` 688 `)),i&2){let e=l.$implicit,n=_(2).$implicit,s=_(3);r(4),F(e.clubDonationOption.title),r(3),F(S(8,5,e.amount)),r(5),c(n.userClubDonation.clubUserPayment?12:-1),r(),c(n.userClubDonation.clubUserPayment?-1:13),r(2),c(s.isDonationCompleted(n.userClubDonation)?-1:15)}}function Ua(i,l){i&1&&(t(0,` 689 `),o(1,"span",64),t(2,` 690 `),x(3,"i",44),t(4,` 691 Completed 692 `),a(),t(5,` 693 `))}function Ma(i,l){i&1&&(t(0,` 694 `),o(1,"span",39),t(2,` 695 `),x(3,"i",46),t(4,` 696 Failed 697 `),a(),t(5,` 698 `))}function Aa(i,l){if(i&1&&(t(0,` 699 `),o(1,"a",40),t(2,` 700 `),o(3,"span",28),t(4,` 701 `),x(5,"i",42),t(6,` 702 `),a(),t(7,` 703 `),a(),t(8,` 704 `)),i&2){let e=_(3).$implicit,n=_(3);r(5),u("pTooltip",n.donationTooltipText(e))}}function ka(i,l){if(i&1&&(t(0,` 705 `),m(1,Ua,6,0),m(2,Ma,6,0),m(3,Aa,9,1)),i&2){let e=_(2).$implicit,n=_(3);r(),c(e.userClubDonation.clubUserPayment.paymentFailed?-1:1),r(),c(e.userClubDonation.clubUserPayment.paymentFailed?2:-1),r(),c(n.donationTooltipText(e)?3:-1)}}function $a(i,l){i&1&&(t(0,` 706 `),o(1,"span",39),t(2,` 707 `),x(3,"i",46),t(4,` 708 Not Completed 709 `),a(),t(5,` 710 `))}function Va(i,l){i&1&&t(0,` 711 You do not have access to make payments for this user 712 `)}function Ba(i,l){if(i&1){let e=R();t(0,` 713 `),o(1,"button",54),v("click",function(){f(e);let s=_(3).$implicit,d=_(3);return h(d.openDonationsModal(s,s.userClubDonation))}),t(2,` 714 Pay Now 715 `),a(),t(3,` 716 `)}}function Na(i,l){if(i&1&&(t(0,` 717 `),o(1,"td"),t(2,` 718 `),m(3,Va,1,0),m(4,Ba,4,0),a(),t(5,` 719 `)),i&2){let e=_(5);r(3),c(e.allowPayments?-1:3),r(),c(e.allowPayments?4:-1)}}function La(i,l){if(i&1&&(t(0,` 720 `),o(1,"div",59),t(2,` 721 `),o(3,"div",21),t(4,` 722 `),o(5,"div",60),t(6,` 723 `),o(7,"h3"),t(8),a(),t(9,` 724 `),a(),t(10,` 725 `),a(),t(11,` 726 `),o(12,"div",21),t(13,` 727 `),o(14,"div",61),t(15,` 728 `),o(16,"table",35),t(17,` 729 `),o(18,"thead"),t(19,` 730 `),o(20,"tr"),t(21,` 731 `),o(22,"th"),t(23),a(),t(24,` 732 `),o(25,"th"),t(26,"Amount"),a(),t(27,` 733 `),o(28,"th"),t(29,"Payment Status"),a(),t(30,` 734 `),m(31,Ta,4,0),a(),t(32,` 735 `),a(),t(33,` 736 `),o(34,"tbody"),t(35,` 737 `),P(36,Oa,17,7,null,null,T),o(38,"tr",62),t(39,` 738 `),o(40,"td",63),t(41,"Total"),a(),t(42,` 739 `),o(43,"td",63),t(44),g(45,"currency"),a(),t(46,` 740 `),o(47,"td"),t(48,` 741 `),m(49,ka,4,3),m(50,$a,6,0),a(),t(51,` 742 `),m(52,Na,6,2),a(),t(53,` 743 `),a(),t(54,` 744 `),a(),t(55,` 745 `),a(),t(56,` 746 `),a(),t(57,` 747 `),a(),t(58,` 748 `)),i&2){let e=_().$implicit,n=_(3);r(8),F(n.club.isNonProfit?"Donations":"Contributions"),r(15),C("",n.club.isNonProfit?"Donation":"Contribution",` Option 749 `),r(8),c(n.isDonationCompleted(e.userClubDonation)?-1:31),r(5),D(n.donationOptions(e)),r(8),C(` 750 `,S(45,7,n.donationsTotal(n.donationOptions(e))),` 751 `),r(5),c(e.userClubDonation.clubUserPayment?49:-1),r(),c(e.userClubDonation.clubUserPayment?-1:50),r(2),c(n.isDonationCompleted(e.userClubDonation)?-1:52)}}function qa(i,l){if(i&1&&(t(0,` 752 `),o(1,"tr"),t(2,` 753 `),o(3,"td"),t(4),a(),t(5,` 754 `),o(6,"td"),t(7),a(),t(8,` 755 `),a(),t(9,` 756 `)),i&2){let e=l.$implicit;r(4),F(e.clubDonationOption.title),r(3),F(e.value)}}function ja(i,l){if(i&1&&(t(0,` 757 `),o(1,"div",65),t(2,` 758 `),o(3,"div",21),t(4,` 759 `),o(5,"div",66),t(6,` 760 `),o(7,"h3"),t(8,"Volunteering"),a(),t(9,` 761 `),a(),t(10,` 762 `),a(),t(11,` 763 `),o(12,"div",21),t(13,` 764 `),o(14,"div",61),t(15,` 765 `),o(16,"table",35),t(17,` 766 `),o(18,"thead"),t(19,` 767 `),o(20,"tr"),t(21,` 768 `),o(22,"th"),t(23,"Volunteer Option"),a(),t(24,` 769 `),o(25,"th"),t(26,"Choice"),a(),t(27,` 770 `),a(),t(28,` 771 `),a(),t(29,` 772 `),o(30,"tbody"),t(31,` 773 `),P(32,qa,10,2,null,null,T),a(),t(34,` 774 `),a(),t(35,` 775 `),a(),t(36,` 776 `),a(),t(37,` 777 `),a(),t(38,` 778 `)),i&2){let e=_().$implicit,n=_(3);r(32),D(n.volunteeringOptions(e))}}function Ha(i,l){if(i&1&&(t(0,` 779 `),o(1,"div",19),t(2,` 780 `),o(3,"h3"),t(4,"Program Details"),a(),t(5,` 781 `),o(6,"app-clamped-html",67),t(7,` 782 `),a(),t(8,` 783 `),a(),t(9,` 784 `)),i&2){let e=_().$implicit;
784r(6),u("html",e.registration.program.details)("clampLines",3)}}function Wa(i,l){if(i&1&&(t(0),g(1,"date")),i&2){let e=_(4).$implicit;C(` 785 \u2013 `,it(1,1,e.registration.sessionOverrideEndDate,"MM/dd/yyyy"),` 786 `)}}function Qa(i,l){if(i&1&&(t(0,` 787 `),o(1,"div"),t(2),g(3,"date"),m(4,Wa,2,4),a(),t(5,` 788 `)),i&2){let e=_(3).$implicit;r(2),C(` 789 `,it(3,2,e.registration.sessionOverrideStartDate,"MM/dd/yyyy"),` 790 `),r(2),c(e.registration.sessionOverrideEndDate?4:-1)}}function Ya(i,l){i&1&&t(0," , ")}function za(i,l){if(i&1&&(t(0),m(1,Ya,1,0)),i&2){let e=l.$implicit,n=l.$index,s=l.$count,d=_(8);C(` 791 `,d.getDayOfWeek(e)),r(),c(n!==s-1?1:-1)}}function Ga(i,l){if(i&1&&(t(0,` 792 `),P(1,za,2,2,null,null,T)),i&2){let e=_(4).$implicit;r(),D(e.registration.daysOfWeek)}}function Xa(i,l){if(i&1&&t(0),i&2){let e=_(5).$implicit,n=_(3);C(` 793 - `,n.formatTime(e.registration.endTime),` 794 `)}}function Ja(i,l){if(i&1&&(t(0),m(1,Xa,1,1)),i&2){let e=_(4).$implicit,n=_(3);C(` 795 \u2022 `,n.formatTime(e.registration.startTime),` 796 `),r(),c(e.registration.endTime?1:-1)}}function Ka(i,l){if(i&1&&(t(0,` 797 `),o(1,"div"),t(2,` 798 `),x(3,"i",69),t(4,` 799 `),m(5,Ga,3,0),m(6,Ja,2,2),a(),t(7,` 800 `)),i&2){let e=_(3).$implicit;r(5),c(e.registration.daysOfWeek!=null&&e.registration.daysOfWeek.length?5:-1),r(),c(e.registration.startTime?6:-1)}}function Za(i,l){if(i&1&&(t(0,` 801 `),o(1,"a",71),t(2),a(),t(3,` 802 `)),i&2){let e=_(4).$implicit;r(),u("href",jt("http://www.google.com/maps/place/",e.registration.practiceFacility.latitude,",",e.registration.practiceFacility.longitude),Nt),r(),F(e.registration.practiceFacility.name)}}function tr(i,l){if(i&1&&(t(0,` 803 `),o(1,"span"),t(2),a(),t(3,` 804 `)),i&2){let e=_(4).$implicit;r(2),F(e.registration.practiceFacility.name)}}function ir(i,l){if(i&1&&(t(0,` 805 `),o(1,"div"),t(2,` 806 `),x(3,"i",70),t(4,` 807 `),m(5,Za,4,4)(6,tr,4,1),a(),t(7,` 808 `)),i&2){let e=_(3).$implicit;r(5),c(e.registration.practiceFacility.latitude?5:6)}}function er(i,l){if(i&1&&(t(0,` 809 `),o(1,"div",68),t(2,` 810 `),m(3,Qa,6,5),m(4,Ka,8,2),m(5,ir,8,1),a(),t(6,` 811 `)),i&2){let e=_(2).$implicit;r(3),c(e.registration.sessionOverrideStartDate?3:-1),r(),c(e.registration.daysOfWeek!=null&&e.registration.daysOfWeek.length||e.registration.startTime?4:-1),r(),c(e.registration.practiceFacility?5:-1)}}function nr(i,l){if(i&1&&(t(0,` 812 `),o(1,"app-clamped-html",67),t(2,` 813 `),a(),t(3,` 814 `)),i&2){let e=_(2).$implicit;r(),u("html",e.registration.details)("clampLines",3)}}function or(i,l){if(i&1&&(t(0,` 815 `),o(1,"div",19),t(2,` 816 `),o(3,"h3"),t(4,"Registration Details"),a(),t(5,` 817 `),m(6,er,7,3),m(7,nr,4,2),a(),t(8,` 818 `)),i&2){let e=_().$implicit,n=_(3);r(6),c(n.hasScheduleData(e.registration)?6:-1),r(),c(e.registration.details?7:-1)}}function ar(i,l){if(i&1){let e=R();t(0,` 819 `),o(1,"div",13),t(2,` 820 `),o(3,"app-entity-registration-summary",14),t(4,` 821 `),a(),t(5,` 822 `),a(),t(6,` 823 `),o(7,"div",15),t(8,` 824 `),o(9,"div",16),t(10,`
825 `),m(11,Ra,20,2),m(12,Ea,7,6),o(13,"app-entity-registration-integrations",17),t(14,` 826 `),a(),t(15,` 827 `),m(16,ba,4,8),o(17,"app-entity-registration-time-slots",18),v("cancelled",function(){f(e);let s=_(3);return h(s.reloadAfterTimeSlotCancelled())}),a(),t(18,` 828 `),m(19,La,59,9),m(20,ja,39,0),m(21,Ha,10,2),m(22,or,9,2),a(),t(23,` 829 `),t(24,` 830 `),a(),t(25,` 831 `)}if(i&2){let e=l.$implicit,n=_(3);r(3),u("playerRegistration",e),r(8),c(e.totalRegistrationPrice>0||(e.payments==null?null:e.payments.length)>1||e.amountDue>0?11:-1),r(),c(n.regQuestionResponses!=null&&n.regQuestionResponses.length?12:-1),r(),u("entityRegistration",e),r(3),c(n.regOptions&&(n.regOptions[e.registrationID]!=null&&n.regOptions[e.registrationID].length)&&!e.enableCheckout?16:-1),r(),u("timeSlots",e.entityRegistrationSignUpTimeSlots)("showManageLink",!n.isAdmin&&e.registration.registrationCostTypeID!==n.RegistrationCostType.VARIABLE)("playerID",n.playerID)("allowCancel",n.isAdmin&&n.isPlayerRegistration&&!e.isCancelled)("entityRegistrationID",e.entityRegistrationID),r(2),c(n.donationOptions(e)?19:-1),r(),c(n.volunteeringOptions(e)?20:-1),r(),c(e.registration.program.details?21:-1),r(),c(e.registration.details||n.hasScheduleData(e.registration)?22:-1)}}function rr(i,l){if(i&1&&(t(0,` 832 `),o(1,"div"),t(2,` 833 `),m(3,oo,7,3),P(4,ar,26,14,null,null,T),a(),t(6,` 834 `)),i&2){let e=_(2);r(3),c(!e.isAdmin&&e.isPlayerRegistration?3:-1),r(),D(e.entityRegistrations)}}function lr(i,l){if(i&1&&(t(0,` 835`),o(1,"div"),t(2,` 836 `),m(3,rr,7,1),a(),t(4,` 837`)),i&2){let e=_();r(3),c(e.entityRegistrations&&e.entityRegistrations.length>0?3:-1)}}function sr(i,l){i&1&&(t(0,` 838 `),o(1,"div",13),t(2,` 839 `),x(3,"app-skeleton-template",72),t(4,` 840 `),a(),t(5,` 841`)),i&2&&(r(3),u("invertBg",!0))}function dr(i,l){if(i&1){let e=R();t(0,` 842`),o(1,"app-player-registration-payment",73),v("onClose",function(){f(e);let s=_();return h(s.closePaymentModal())})("onMakePayment",function(s){f(e);let d=_();return h(d.onMakePayment(s))})("onUpdatePayment",function(s){f(e);let d=_();return h(d.onSetPaymentMethod(s))}),t(2,` 843`),a(),t(3,` 844`)}if(i&2){let e=_();r(),u("playerID",e.playerID)("entityRegistrationID",e.selectedPlayerRegistrationPayment.entityRegistrationID)("entityRegistrationPaymentID",e.selectedPlayerRegistrationPayment.entityRegistrationPaymentID)("programID",e.selectedPlayerRegistration.registration.programID)("payment",e.selectedPlayerRegistrationPayment)("editing",e.editingPayment)("required",!e.paymentDialogClosable)}}function _r(i,l){if(i&1&&(t(0,` 845 `),o(1,"div",77),t(2,` 846 `),o(3,"div",78),t(4),a(),t(5,` 847 `),o(6,"div",79),t(7),g(8,"currency"),a(),t(9,` 848 `),a(),t(10,` 849 `)),i&2){let e=_(2);r(4),C(` 850 `,e.donationClubPaymentFee.paymentType.feeDescription,` 851 `),r(3),C(` 852 `,S(8,2,e.donationClubPaymentFee.userFee),` 853 `)}}function mr(i,l){if(i&1){let e=R();t(0,` 854 `),o(1,"app-payment-form",81,4),v("paymentTypeChanged",function(s){f(e);let d=_(2);return h(d.donationPaymentTypeChange(s.clubPaymentFee))})("stripeSetupAttempted",function(s){f(e);let d=_(2);return h(d.handleDonationStripeSetupAttempt(s))}),a(),t(3,` 855 `)}if(i&2){let e=_(2);r(),u("includeHeader",!1)("paymentIntentMetadata",e.paymentIntentMetadata)("paymentData",e.donationPaymentData)("sitePaymentTypeID",e.SitePaymentType.DONATION)("useSetupIntents",!0)("horizontalForm",!1)}}function cr(i,l){if(i&1&&(t(0,` 856 `),o(1,"div",74),t(2,` 857 `),o(3,"div",75),t(4,` 858 Payment Breakdown 859 `),a(),t(5,` 860 `),o(6,"div",76),t(7,` 861 `),o(8,"div",77),t(9,` 862 `),o(10,"div",78),t(11,"Amount Due"),a(),t(12,` 863 `),o(13,"div",79),t(14),g(15,"currency"),a(),t(16,` 864 `),a(),t(17,` 865 `),m(18,_r,11,4),o(19,"div",80),t(20,` 866 `),o(21,"div",78),t(22,` 867 `),o(23,"strong"),t(24,` 868 Due Now 869 `),a(),t(25,` 870 `),a(),t(26,` 871 `),o(27,"div",79),t(28,` 872 `),o(29,"strong"),t(30),g(31,"currency"),a(),t(32,` 873 `),a(),t(33,` 874 `),a(),t(34,` 875 `),a(),t(35,` 876 `),a(),t(36,` 877 `),m(37,mr,4,6)),i&2){let e=_();r(14),C(` 878 `,S(15,4,e.donationsTotal(e.selectedUserClubDonation.userClubDonationOptions)),` 879 `),r(4),c((e.donationClubPaymentFee==null?null:e.donationClubPaymentFee.userFee)>0?18:-1),r(12),C(` 880 `,S(31,6,e.donationsTotal(e.selectedUserClubDonation.userClubDonationOptions)+((e.donationClubPaymentFee==null?null:e.donationClubPaymentFee.userFee)||0)),` 881 `),r(7),c(e.paymentIntentMetadata&&(e.donationPaymentData!=null&&e.donationPaymentData.length)?37:-1)}}function pr(i,l){i&1&&(t(0,` 882 `),x(1,"span",85),t(2,` 883 `))}function Cr(i,l){if(i&1){let e=R();t(0,` 884 `),o(1,"button",84),v("click",function(){f(e);let s=_(2);return h(s.makeDonationPayment())}),t(2,` 885 `),m(3,pr,3,0),t(4),a(),t(5,` 886 `)}if(i&2){let e=_(2);r(),u("disabled",e.submittingDonationsModal||!(e.donationPaymentForm!=null&&e.donationPaymentForm.isValid)),r(2),c(e.submittingDonationsModal?3:-1),r(),C(` 887 `,e.submittingDonationsModal?"Processing...":"Pay",` 888 `)}}function ur(i,l){if(i&1){let e=R();t(0,` 889 `),o(1,"app-dialog-footer"),t(2,` 890 `),N(3,82),t(4,` 891 `),o(5,"button",56),v("click",function(){f(e);let s=_();return h(s.closeDonationsModal())}),t(6,"Cancel"),a(),t(7,` 892 `),L(),t(8,` 893 `),N(9,83),t(10,` 894 `),m(11,Cr,6,3),L(),t(12,` 895 `),a(),t(13,` 896 `)}if(i&2){let e=_();r(5),u("disabled",e.submittingDonationsModal),r(6),c(e.showDonationsModal?11:-1)}}function xr(i,l){if(i&1&&(t(0,` 897 `),o(1,"tr"),t(2,` 898 `),o(3,"td"),t(4),a(),t(5,` 899 `),o(6,"td"),t(7),g(8,"currency"),a(),t(9,` 900 `),a(),t(10,` 901 `)),i&2){let e=l.$implicit;r(4),F(e.name),r(3),F(S(8,2,e.amountUsed))}}function yr(i,l){if(i&1&&(t(0,` 902 `),o(1,"div",86),t(2,` 903 This registration is eligible for the following credits/discounts, which will be applied according to your 904 payment plan. 905 `),a(),t(3,` 906 `),o(4,"div",87),t(5,` 907 `),o(6,"table",35),t(7,` 908 `),o(8,"thead"),t(9,` 909 `),o(10,"tr"),t(11,` 910 `),o(12,"th"),t(13,"Credit/Discount Name"),a(),t(14,` 911 `),o(15,"th"),t(16,"Amount"),a(),t(17,` 912 `),a(),t(18,` 913 `),a(),t(19,` 914 `),o(20,"tbody"),t(21,` 915 `),P(22,xr,11,4,null,null,T),a(),t(24,` 916 `),a(),t(25,` 917 `),a(),t(26,` 918 `)),i&2){let e=_(2);r(22),D(e.selectedPendingCredits)}}function gr(i,l){if(i&1&&(t(0,` 919 `),m(1,yr,27,0)),i&2){let e=_();r(),c(e.selectedPendingCredits?1:-1)}}function fr(i,l){if(i&1&&(t(0),g(1,"number")),i&2){let e=_(2).$implicit;C(` 920 (`,S(1,1,e.clubCredit.value),`%) 921 `)}}function hr(i,l){if(i&1&&(t(0,` 922 `),m(1,fr,2,3)),i&2){let e=_().$implicit,n=_(3);r(),c(e.clubCredit.creditTypeID===n.CreditTypes.CREDIT?1:-1)}}function Sr(i,l){if(i&1&&(t(0,` 923 `),o(1,"div",88),t(2),a(),t(3,` 924 `)),i&2){let e=_().$implicit;r(2),C(` 925 Promo code: `,e.clubCredit.promoCode,` 926 `)}}function vr(i,l){if(i&1&&(t(0,` 927 `),o(1,"tr"),t(2,` 928 `),o(3,"td"),t(4,` 929 `),o(5,"div"),t(6),m(7,hr,2,1),a(),t(8,` 930 `),m(9,Sr,4,1),a(),t(10,` 931 `),o(11,"td"),t(12),g(13,"currency"),a(),t(14,` 932 `),o(15,"td"),t(16),g(17,"utcDate"),a(),t(18,` 933 `),a(),t(19,` 934 `)),i&2){let e=l.$implicit,n=_(3);r(6),C(` 935 `,e.clubCredit.name,` 936 `),r(),c(e.clubCredit.clubCreditTypeID===n.ClubCreditTypes.PERCENTAGE?7:-1),r(2),c(e.clubCredit.isPromoCode?9:-1),r(3),C(` 937 `,S(13,5,e.amountUsed),` 938 `),r(4),C(` 939 `,it(17,7,e.savedDate,"MMM d, y"),` 940 `)}}function Rr(i,l){if(i&1&&(t(0,` 941 `),o(1,"div",87),t(2,` 942 `),o(3,"table",35),t(4,` 943 `),o(5,"thead"),t(6,` 944 `),o(7,"tr"),t(8,` 945 `),o(9,"th"),t(10,"Credit/Discount Name"),a(),t(11,` 946 `),o(12,"th"),t(13,"Amount"),a(),t(14,` 947 `),o(15,"th"),t(16,"Applied On"),a(),t(17,` 948 `),a(),t(18,` 949 `),a(),t(19,` 950 `),o(20,"tbody"),t(21,` 951 `),P(22,vr,20,10,null,null,T),a(),t(24,` 952 `),a(),t(25,` 953 `),a(),t(26,` 954 `)),i&2){let e=_(2);r(22),D(e.selectedAppliedCredits)}}function Er(i,l){if(i&1&&(t(0,` 955 `),m(1,Rr,27,0)),i&2){let e=_();r(),c(e.selectedAppliedCredits?1:-1)}}function br(i,l){if(i&1){let e=R();t(0,` 956`),o(1,"app-payment-method-edit",89),v("cancel",function(){f(e);let s=_();return h(s.editingPaymentMethod=!1)})("tokenSave",function(s){f(e);let d=_();return h(d.tokenSaved(s))}),t(2,` 957`),a(),t(3,` 958`)}if(i&2){let e=_();r(),u("paymentVendorID",e.selectedPlayerRegistrationPayment.club
958UserPaymentMethod.paymentVendorID)("clubUserPaymentMethodID",e.selectedPlayerRegistrationPayment.clubUserPaymentMethodID)("paymentTypeID",e.selectedPlayerRegistrationPayment.paymentTypeID)("dialogHeader",e.selectedPlayerRegistrationPayment.clubUserPaymentMethod.fullDisplayName)("showRemove",!1)}}function Tr(i,l){if(i&1&&(t(0,` 959 `),o(1,"app-inline-alert",90),t(2,` 960 `),o(3,"span",91),t(4),a(),t(5,` 961 `),a(),t(6,` 962 `)),i&2){let e=_(3);r(),u("isInline",!0),r(3),C(` 963 `,e.failureData.text,` 964 `)}}function Pr(i,l){i&1&&(t(0,` 965 `),o(1,"app-inline-alert",92),t(2,` 966 `),o(3,"span",91),t(4,` 967 Unable to retrieve any transaction details at this time. Please try again later. 968 `),a(),t(5,` 969 `),a(),t(6,` 970 `)),i&2&&(r(),u("isInline",!0))}function Dr(i,l){if(i&1&&(t(0,` 971 `),m(1,Tr,7,2),m(2,Pr,7,1)),i&2){let e=_(2);r(),c(e.failureData?1:-1),r(),c(e.failureData?-1:2)}}function Fr(i,l){i&1&&(t(0,` 972 `),x(1,"app-skeleton-template",93),t(2,` 973 `))}function Ir(i,l){if(i&1&&(t(0,` 974 `),m(1,Dr,3,2),m(2,Fr,3,0)),i&2){let e=_();r(),c(e.loadingFailureData?-1:1),r(),c(e.loadingFailureData?2:-1)}}function wr(i,l){if(i&1){let e=R();t(0,` 975 `),o(1,"app-dialog-footer"),t(2,` 976 `),It(3,82),t(4,` 977 `),N(5,83),t(6,` 978 `),o(7,"button",94),v("click",function(){f(e);let s=_();return h(s.showFailureDataModal=!1)}),t(8,"Close"),a(),t(9,` 979 `),L(),t(10,` 980 `),a(),t(11,` 981 `)}}function Or(i,l){if(i&1&&(t(0,` 982 `),o(1,"li"),t(2,` 983 `),o(3,"div",99),t(4,` 984 `),o(5,"span"),t(6,` 985 `),o(7,"app-inline-alert",90),t(8),a(),t(9,` 986 `),a(),t(10,` 987 `),o(11,"span",98),t(12),g(13,"utcDate"),a(),t(14,` 988 `),a(),t(15,` 989 `),a(),t(16,` 990 `)),i&2){let e=l.$implicit,n=l.$index,s=l.$count;r(),B("border-bottom",n!==s-1)("pb-3",n!==s-1)("mb-3",n!==s-1),r(6),u("isInline",!0),r(),C(` 991 `,e.message,` 992 `),r(4),C(` 993 `,it(13,9,e.savedOn,"MM/dd/yy hh:mm a"),` 994 `)}}function Ur(i,l){if(i&1&&(t(0,` 995 `),o(1,"ul",95),t(2,` 996 `),o(3,"li",96),t(4,` 997 `),o(5,"div",97),t(6,` 998 `),o(7,"span",52),t(8,` 999 Failure Reason 1000 `),a(),t(9,` 1001 `),o(10,"span",98),t(11,` 1002 Attempted Date 1003 `),a(),t(12,` 1004 `),a(),t(13,` 1005 `),a(),t(14,` 1006 `),P(15,Or,17,12,null,null,T),g(17,"slice"),a(),t(18,` 1007 `)),i&2){let e=_(2);r(15),D(et(17,0,e.selectedPlayerRegistrationPayment==null?null:e.selectedPlayerRegistrationPayment.failedPaymentAttempts,0,5))}}function Mr(i,l){i&1&&(t(0,` 1008 `),N(1),t(2,` 1009 `),o(3,"app-inline-alert",92),t(4,` 1010 `),o(5,"span",91),t(6,` 1011 Unable to retrieve any transaction details at this time. Please try again later. 1012 `),a(),t(7,` 1013 `),a(),t(8,` 1014 `),L(),t(9,` 1015 `)),i&2&&(r(3),u("isInline",!0))}function Ar(i,l){if(i&1&&(t(0,` 1016 `),m(1,Ur,19,4)(2,Mr,10,1)),i&2){let e=_();r(),c(!(e.selectedPlayerRegistrationPayment==null||e.selectedPlayerRegistrationPayment.failedPaymentAttempts==null)&&e.selectedPlayerRegistrationPayment.failedPaymentAttempts.length?1:2)}}function kr(i,l){if(i&1){let e=R();t(0,` 1017 `),o(1,"app-dialog-footer"),t(2,` 1018 `),It(3,82),t(4,` 1019 `),N(5,83),t(6,` 1020 `),o(7,"button",94),v("click",function(){f(e);let s=_();return h(s.showFailedPaymentAttemptsModal=!1)}),t(8,"Close"),a(),t(9,` 1021 `),L(),t(10,` 1022 `),a(),t(11,` 1023 `)}}var Qi=(()=>{let l=class l{get allowPayments(){return this.sessionSettings?this.sessionSettings.allowPayments||this.fullAccess:!1}get showFailButton(){let n=window.location.host.indexOf(".sprocketsports.com")>-1;return this.isSuperAdmin&&(!n||this.canFail)}constructor(n,s,d,p,y,b,_t,Gi,Xi,Ji,Ki){this.siteDataService=n,this.playerRegistrationService=s,this.playerService=d,this.route=p,this.formService=y,this.userService=b,this.sessionService=_t,this.clubService=Gi,this.authorizeService=Xi,this.paymentService=Ji,this.analyticsService=Ki,this.unsubscribe$=new V,this.loading=!0,this.CreditTypes=Tt,this.ClubCreditTypes=Pt,this.loadingPaymentModal=!1,this.showPaymentModal=!1,this.editingPayment=!1,this.editingLastPayment=!1,this.submittingPaymentModel=!1,this.paymentDialogClosable=!0,this.showDonationsModal=!1,this.submittingDonationsModal=!1,this.transactionType=ti,this.isPlayerRegistration=!0,this.editingPaymentMethod=!1,this.markingAsFailed=!1,this.paymentOptions=[],this.applyToFuturePaymentsFields=[new _i({controlName:"applyPaymentMethodToFuturePayments",key:"applyPaymentMethodToFuturePayments",dynamicFormFieldTypeID:di.CHECKBOX,label:"Apply this payment method to future payments?"}
1023)],this.showFailureDataModal=!1,this.loadingFailureData=!1,this.PaymentVendor=ht,this.SitePaymentType=gt,this.paymentIntentMetadata=new xi(gt.DONATION),this.DisputeStatus=fi,this.RegistrationCostType=Ot,this.hasSurcharges=!1,this.showFailedPaymentAttemptsModal=!1,this.canFail=!1,this.isSuperAdmin=!1}ngOnInit(){this.authorizeService.getUser().pipe(Vt(1)).subscribe(n=>{n&&(n[Kt.FullMemberAccess]&&(this.fullAccess=!0),this.canFail=Jt.includes(+n.userID),this.isSuperAdmin=this.authorizeService.isSuperAdmin(n.role))}),this.siteDataService.hideSiteLoader(),this.route.params.subscribe(n=>{if(this.playerID=this.playerService.playerID,this.entityRegistrationID=+n.playerRegistrationID,!this.playerID){let d=this.route.parent;for(;d;)if(d.snapshot.data.admin!==void 0&&(this.isAdmin=d.snapshot.data.admin===!0),d.snapshot.data.player!==void 0&&(this.isPlayerRegistration=d.snapshot.data.player),this.isPlayerRegistration&&d.snapshot.params.id){this.playerID=+d.snapshot.params.id;break}else d=d.parent}let s={entityRegistrations:this.playerRegistrationService.getEntityRegistration(this.playerID,this.entityRegistrationID,!1,this.isPlayerRegistration,!0),player:!this.isAdmin&&this.isPlayerRegistration?this.playerService.getPlayer(this.playerID):Z(null),session:this.isAdmin?Z(null):this.sessionService.getSessionSettings(),club:this.clubService.getAnonymousClub(),regOptions:this.playerRegistrationService.getCompletedEntityRegistrationAvailableRegistrationTemplateOptions(this.playerID,this.entityRegistrationID,!0,this.isPlayerRegistration),regQuestionResponses:this.isPlayerRegistration?this.playerRegistrationService.getCompletedEntityRegistrationQuestionResponses(this.playerID,this.entityRegistrationID):Z(null)};kt(s).pipe(mt(d=>{this.entityRegistrations=d.entityRegistrations,this.entityRegistrations&&this.entityRegistrations.forEach(p=>{p.payments&&p.payments.forEach(y=>{let b=new Date;b.setHours(0,0,0,0),new Date(y.dueDate).getTime()===b.getTime()&&(y.dueToday=!0),y.clubUserPayment&&(y.clubUserPayment.surcharge??0)>0&&(this.hasSurcharges=!0)})}),!this.isAdmin&&this.isPlayerRegistration&&(this.player=d.player),this.isAdmin||(this.sessionSettings=d.session),this.club=d.club,d.regOptions&&(this.regOptions=d.regOptions),d.regQuestionResponses&&(this.regQuestionResponses=d.regQuestionResponses)}),w(this.unsubscribe$)).subscribe(()=>{this.loading=!1})}),this.playerRegistrationService.optionsChange$.pipe(w(this.unsubscribe$)).subscribe(n=>{let s=this.entityRegistrations.findIndex(d=>d.entityRegistrationID===n.playerRegistrationID);this.entityRegistrations.splice(s,1,n.playerRegistration),n.newPayment&&!this.isAdmin&&(this.selectedPlayerRegistration=this.entityRegistrations.find(d=>d.entityRegistrationID===n.playerRegistrationID),this.selectedPlayerRegistrationPayment=this.selectedPlayerRegistration.payments.find(d=>d.playerRegistrationPaymentID===n.newPayment.playerRegistrationPaymentID),this.paymentDialogClosable=!1,this.openPaymentModal(this.selectedPlayerRegistration,this.selectedPlayerRegistrationPayment))})}reloadAfterTimeSlotCancelled(){this.playerRegistrationService.getEntityRegistration(this.playerID,this.entityRegistrationID,!1,this.isPlayerRegistration,!0).pipe(w(this.unsubscribe$)).subscribe({next:n=>{this.entityRegistrations=n},error:()=>{this.siteDataService.showSiteErrorAlert("The session was cancelled but the page could not be refreshed. Please reload.")}})}isPaymentInfoRequired(n){return n.pendingRemainingBalance>0}isPaymentOverdue(n){return!!Xt(new Date(n.dueDate))}hasScheduleData(n){return!!(n?.sessionOverrideStartDate||n?.daysOfWeek?.length||n?.practiceFacility)}getDayOfWeek(n){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"][n]||""}formatTime(n){return n?(0,Wi.default)(n,"HH:mm:ss").format("h:mm A"):""}anyPaymentsRemaining(n){return!!(n.payments&&n.payments.some(s=>s.remainingBalance>0&&!s.isProcessing&&!s.clubUserPayment&&!s.isCancelled))}isCardExpiringBeforePayment(n){return!!(n.clubUserPaymentMethod&&n.clubUserPaymentMethod.paymentTypeID===$.CARD&&n.clubUserPaymentMethod.expirationMonth&&n.clubUserPaymentMethod.expirationYear&&new Date(n.clubUserPaymentMethod.expirationYear,n.clubUserPaymentMethod.expirationMonth,0)<=new Date(n.dueDate))}paymentHasFee(n){return!!(n.paymentType&&n.paymentType.feePercentage>0||n?.clubUserPayment?.paymentFee&&!n.clubUserPayment?.paymentFailed)}paymentFeeText(n){let s="";return n.paymentCompleted&&n.clubUserPayment?.paymentFee>0&&(s="This payment was charged a service fee of "+new I("en-US").transform(n.clubUserPayment.paymentFee)),s}paymentStatusTooltipText(n){if(this.isPaymentRequired(n)){let s=n.paymentCompleted||n.clubUserPayment?this.paymentStatusText(n):"";if(n.paymentCompleted){let d=this.summarizeSurchargeData(n,!1),p=n.clubUserPayment?.paymentFee>0&&!n.clubUserPayment?.paymentFailed;if(d.length>0||p){let y="This payment was charged ";if(d.length>0){let b=d.map(_t=>`${new I("en-US").transform(_t.totalAmount)} for ${_t.surchargeName}`);y+=b.join(", "),p&&(y+=` and a service fee of ${new I("en-US").transform(n.clubUserPayment.paymentFee)}`)}else p&&(y+=`a service fee of ${new I("en-US").transform(n.clubUserPayment.paymentFee)}`);s+=y}}return s}else return"Payment not required"}paymentDueTooltipText(n){let s="";if(this.isPaymentRequired(n)&&!n.paymentCompleted&&!n.isCancelled){let d=this.summarizeSurchargeData(n,!0);if(d.length>0){s="This payment will include an estimated ";let p=d.map(y=>`${new I("en-US").transform(y.totalAmount)} for ${y.surchargeName}`);s+=p.join(", ")}}return s}paymentAmountDueTooltipText(n){let s="",d=[];n.hasAdminFeeWaived&&n.adminFeeReductionAmount>0?d.push(`The admin fee was reduced by ${new I("en-US").transform(n.adminFeeReductionAmount)} for this payment.`):!n.hasAdminFeeWaived&&n.adminFeeApplied>0&&d.push(`This payment has an admin fee of ${new I("en-US").transform(n.adminFeeApplied)}.`);let p=this.paymentDueTooltipText(n);return p&&d.push(p),s=d.join(" "),s}collectSurchargeData(n){let s=[];if(!n.paymentCompleted)return s;n?.entityRegistrationPaymentRegistrationOptionValues&&n.entityRegistrationPaymentRegistrationOptionValues.forEac
1023h(p=>{p.clubSurchargeID!==null&&s.push({amount:p.surchargeAmount,clubSurchargeID:p.clubSurchargeID,surchargeName:p.clubSurcharge?.surchargeName})});let d=s.reduce((p,y)=>p+(y.amount||0),0);return n.clubUserPayment?.clubUserPaymentFees&&n.clubUserPayment.clubUserPaymentFees.forEach(p=>{p.clubSurchargeID!==null&&s.push({amount:p.amount-d,clubSurchargeID:p.clubSurchargeID,surchargeName:p.clubSurcharge?.surchargeName})}),s}collectEstimatedSurchargeData(n){let s=[];return n?.entityRegistrationPaymentRegistrationOptionValues&&n.entityRegistrationPaymentRegistrationOptionValues.forEach(d=>{d.estimatedClubSurchargeID!==null&&s.push({amount:d.estimatedSurchargeAmount,clubSurchargeID:d.estimatedClubSurchargeID,surchargeName:d.estimatedSurchargeName})}),n.estimatedClubSurchargeID&&s.push({amount:n.estimatedSurchargeAmount,clubSurchargeID:n.estimatedClubSurchargeID,surchargeName:n.estimatedSurchargeName}),s}summarizeSurchargeData(n,s){let d;s?d=this.collectEstimatedSurchargeData(n):d=this.collectSurchargeData(n);let p={};return d.forEach(y=>{p[y.clubSurchargeID]?p[y.clubSurchargeID].totalAmount+=y.amount:p[y.clubSurchargeID]={surchargeName:y.surchargeName,totalAmount:y.amount}}),Object.keys(p).map(y=>({clubSurchargeID:+y,surchargeName:p[+y].surchargeName,totalAmount:p[+y].totalAmount}))}isPaymentRequired(n){return n.remainingBalance>0?!0:!(n.paymentTypeID===null||n.paymentTypeID===$.PAYMENT_NOT_REQUIRED)}paymentStatusText(n){if(this.isPaymentRequired(n)){if(n.clubUserPaymentID)return this.clubUserPaymentText(n.clubUserPayment);if(n.clubUserPaymentMethod)return n.clubUserPaymentMethod.clubUser.clubUserID!==this.userService.loggedInClubUser.clubUserID?`Scheduled by ${n.clubUserPaymentMethod.clubUser.user.firstName} ${n.clubUserPaymentMethod.clubUser.user.lastName}`:"Scheduled using "+this.clubUserPaymentMethodText(n.clubUserPaymentMethod)}else return"Payment not required"}clubUserPaymentText(n){let s=new Y().transform(n.submittedDate.toString(),"MMM d, y");if(n.clubUserID!==this.userService.loggedInClubUser.clubUserID){if(n.paymentFailed)return`This payment was processed on ${s}, but something went wrong. `;{let d=`Completed by ${n.clubUser.user.firstName} ${n.clubUser.user.lastName} on ${s}`;if(this.isAdmin&&n.clubUserPaymentMethod)d+=` via ${this.clubUserPaymentMethodText(n.clubUserPaymentMethod)}. `;else if(this.isAdmin)switch(n.paymentTypeID){case $.CARD:d+=" via card. ";break;case $.ACH:d+=" via ACH. ";break;case $.OFFLINE:d+=" offline. ";break}return d}}else{let d="via ";if(n.clubUserPaymentMethod)d+=this.clubUserPaymentMethodText(n.clubUserPaymentMethod);else switch(n.paymentTypeID){case $.CARD:d=d+"card";break;case $.ACH:d=d+"ACH";break;case $.OFFLINE:d="offline";break}return n.paymentFailed?d=`This payment was processed on ${s} `+d+", but something went wrong. ":d=`Completed on ${s} ${d}. `,d}}clubUserPaymentMethodText(n){let s="";if(n){switch(n.paymentTypeID){case $.CARD:n.ccNumber?s=(n.cardType||"")+" "+n.ccNumber:s="card";break;case $.ACH:n.accountNumber?s=(n.bankAccountType.description||"")+" "+n.accountNumber:s="ACH";break}n.accountNickname&&(s+=" ("+n.accountNickname+")")}return s}donationTooltipText(n){if(n.userClubDonation.clubUserPayment){let s=this.clubUserPaymentText(n.userClubDonation.clubUserPayment);return!n.userClubDonation.clubUserPayment.paymentFailed&&n.userClubDonation.clubUserPayment.paymentFee&&(s+=`. This payment was charged a service fee of ${new I("en-US").transform(n.userClubDonation.clubUserPayment.paymentFee)}.`),s}else return null}isDonationCompleted(n){return!!(n.paidOffline&&n.paidInFull||n.clubUserPayment&&!n.clubUserPayment.paymentFailed)}donationOptions(n){if(n.userClubDonation&&n.userClubDonation.userClubDonationOptions){let s=n.userClubDonation.userClubDonationOptions.filter(d=>d.clubDonationOption.clubDonationOptionTypeID===Dt.DONATION);if(s&&s.length>0)return s}return null}donationsTotal(n){if(n){let s=0;return n.forEach(d=>{d.clubDonationOption.clubDonationOptionTypeID===Dt.DONATION&&(s+=d.amount)}),s}return null}volunteeringOptions(n){if(n.userClubDonation&&n.userClubDonation.userClubDonationOptions){let s=n.userClubDonation.userClubDonationOptions.filter(d=>d.clubDonationOption.clubDonationOptionTypeID===Dt.VOLUNTEER);if(s&&s.length>0)return s}return null}togglePaymentOptionsMenu(n,s,d){this.selectedPlayerRegistration=n,this.selectedPlayerRegistrationPayment=s,this.paymentOptions=[{label:"Payment Options",items:[]}];let p=n.registration.program.programTypeID===ai.SUBSCRIPTION||n.registration.registrationCostTypeID===Ot.SUBSCRIPTION;(this.isPaymentOverdue(s)||!p||!this.isPaymentLastPaymentForPlayerRegistration(s)&&Gt(new Date(s.dueDate),new Date))&&this.paymentOptions[0].items.push({label:"Pay Now",icon:"fas fa-dollar-sign",command:()=>{this.openPaymentModal(this.selectedPlayerRegistration,this.selectedPlayerRegistrationPayment)}}),this.paymentOptions[0].items.push({label:s.clubUserPaymentMethod?"Change Payment Method":"Set Payment Method",icon:"fas fa-edit",command:()=>{this.openPaymentModal(this.selectedPlayerRegistration,this.selectedPlayerRegistrationPayment,!0)}}),s.clubUserPaymentMethod&&this.paymentOptions[0].items.push({label:"Edit Payment Method",icon:"fas fa-edit",command:()=>{this.editPaymentMethod()}}),this.paymentOptionsMenu.toggle(d)}showAppliedCreditsOverlay(n,s){this.selectedPlayerRegistrationPayment=n,n.playerClubCreditUsages?.length>0?this.selectedAppliedCredits=n.playerClubCreditUsages.filter(d=>!d.isPending):n.teamClubCreditUsages?.length>0&&(this.selectedAppliedCredits=n.teamClubCreditUsages.filter(d=>!d.isPending)),this.appliedCreditsOverlay.show(s)}hideAppliedCreditsOverlay(){this.appliedCreditsOverlay.hide()}showPendingCreditsOverlay(n,s){this.selectedPendingCredits=[],n.payments?.length>
10230&&n.payments.forEach(d=>{this.getPaymentPendingCredits(d).forEach(p=>{let y=this.selectedPendingCredits.find(b=>b.clubCreditID===p.clubCreditID);y?y.amountUsed+=p.amountUsed:this.selectedPendingCredits.push({clubCreditID:p.clubCreditID,name:p.clubCredit.name,amountUsed:p.amountUsed})})}),this.pendingCreditsOverlay.show(s)}hidePendingCreditsOverlay(){this.pendingCreditsOverlay.hide()}getPaymentPendingCredits(n){return n.playerClubCreditUsages?.length>0?n.playerClubCreditUsages.filter(s=>s.isPending):[]}openPaymentModal(n,s,d=!1){this.editingPayment=d,this.selectedPlayerRegistrationPayment=s,this.selectedPlayerRegistration=n,this.editingLastPayment=this.isPaymentLastPaymentForPlayerRegistration(this.selectedPlayerRegistrationPayment),this.showPaymentModal=!0}closePaymentModal(){this.selectedPlayerRegistrationPayment=void 0,this.showPaymentModal=!1,this.editingPayment=!1,this.editingLastPayment=!1,this.paymentDialogClosable=!0}editPaymentMethod(){this.editingPaymentMethod=!0}tokenSaved(n){let s=this.selectedPlayerRegistrationPayment.clubUserPaymentMethodID;this.entityRegistrations.forEach(d=>{d.payments?.length&&d.payments.forEach(p=>{p.clubUserPaymentMethod?.clubUserPaymentMethodID===s&&(p.clubUserPaymentMethod.accountNickname=n.accountNickname),p.clubUserPayment?.clubUserPaymentMethodID===s&&(p.clubUserPayment.clubUserPaymentMethod.accountNickname=n.accountNickname)})})}onMakePayment(n){let s=this.entityRegistrations.find(y=>y.entityRegistrationID===this.selectedPlayerRegistrationPayment.entityRegistrationID),d=s.payments.find(y=>y.entityRegistrationPaymentID===this.selectedPlayerRegistrationPayment.entityRegistrationPaymentID),p=s.payments.findIndex(y=>y.entityRegistrationPaymentID===this.selectedPlayerRegistrationPayment.entityRegistrationPaymentID);s.payments.splice(p,1,n),this.closePaymentModal(),s.remainingBalance-=n.amountPaid||0,s.amountPaid+=n.amountPaid||0,(d.creditsUsed||0)<(n.creditsUsed||0)&&(s.creditsUsed+=(n.creditsUsed||0)-(d.creditsUsed||0)),(d.amountDue||0)>(n.amountDue||0)&&(s.amountDue+=(d.amountDue||0)-(n.amountDue||0))}handleFailedPayment(n){n.makePaymentResultCode===ft.Declined?(this.formService.showFormErrorMessage("Payment was declined"),this.siteDataService.showSiteErrorAlert("Payment was declined")):n.makePaymentResultCode===ft.InvalidCreditCardNumber?(this.siteDataService.showSiteErrorAlert("Invalid credit card"),this.formService.showFormErrorMessage("The credit card number is either invalid or not accepted at this time.")):n.makePaymentResultCode===ft.InvalidExpirationDate?(this.siteDataService.showSiteErrorAlert("Invalid expiration date"),this.formService.showFormErrorMessage("Invalid expiration date.")):n.errorMessages&&n.errorMessages.length>0?(this.formService.showFormErrorMessage(n.errorMessages[0].text),this.siteDataService.showSiteErrorAlert(n.errorMessages[0].text)):n.requestMessages&&n.requestMessages.length>0?(this.formService.showFormErrorMessage(n.requestMessages[0].text),this.siteDataService.showSiteErrorAlert(n.requestMessages[0].text)):(this.formService.showFormErrorMessage("There was an error completing your payment"),this.siteDataService.showSiteErrorAlert("There was an error completing your payment"))}onSetPaymentMethod(n){let s=this.entityRegistrations.find(d=>d.playerRegistrationID===this.selectedPlayerRegistrationPayment.playerRegistrationID);s.payments=n,this.closePaymentModal()}donationPaymentTypeChange(n){this.donationClubPaymentFee=n}openDonationsModal(n,s){this.selectedUserClubDonation=s,this.paymentIntentMetadata.userClubDonationID=this.selectedUserClubDonation.userClubDonationID,this.donationPaymentData=[{sitePaymentTypeID:gt.DONATION,amount:s?.paymentAmount||this.donationsTotal(this.donationOptions(n))}],this.showDonationsModal=!0}closeDonationsModal(){this.selectedUserClubDonation=void 0,this.showDonationsModal=!1}makeDonationPayment(){this.donationPaymentForm.isValid?(this.submittingDonationsModal=!0,this.donationPaymentForm.activePaymentVendor===ht.STRIPE&&(!this.donationPaymentForm.value.clubUserPaymentMethodID||this.donationPaymentForm.value.clubUserPaymentMethodID===-1)?this.paymentService.submitSetupIntent():this.payForDonation()):this.donationPaymentForm.submitForm(
1023)}handleDonationStripeSetupAttempt(n){n.success?this.payForDonation():this.submittingDonationsModal=!1}payForDonation(){this.playerRegistrationService.payUserClubDonation(this.selectedUserClubDonation.userClubDonationID,this.donationPaymentForm.value).pipe(w(this.unsubscribe$)).subscribe({next:n=>{if(n&&n.paymentResult&&n.paymentResult.paymentMadeSuccessfully){this.siteDataService.showSiteSuccessAlert("Payment made successfully");let s=this.entityRegistrations.find(d=>d.playerRegistrationID===n.userClubDonation.playerRegistrationID);s.userClubDonation=n.userClubDonation,this.trackDonationPurchase(n.userClubDonation),this.closeDonationsModal()}else this.handleFailedPayment(n.paymentResult);this.submittingDonationsModal=!1},error:()=>{this.formService.showFormErrorMessage("There was an error completing your payment"),this.siteDataService.showSiteErrorAlert("There was an error completing your payment"),this.submittingDonationsModal=!1}})}trackDonationPurchase(n){let s=n.paymentAmount??this.selectedUserClubDonation?.paymentAmount??0;this.analyticsService.makeSingleItemPurchase(`donation_${n.userClubDonationID}`,s,"Donation","Donation")}markPaymentAsFailed(n,s){this.markingAsFailed=!0,this.playerRegistrationService.markPaymentAsFailed(this.playerID,n,s.entityRegistrationPaymentID).pipe(w(this.unsubscribe$)).subscribe({next:()=>{this.markingAsFailed=!1,s.clubUserPayment.paymentFailed=!0,this.siteDataService.showSiteSuccessAlert("Payment failed successfully")},error:()=>{this.markingAsFailed=!1,this.siteDataService.showSiteErrorAlert("Failing the payment failed")}})}getFailedPaymentDetails(n,s){s.clubUserPayment.paymentVendorID===ht.PAYRIX?(this.loadingFailureData=!0,this.showFailureDataModal=!0,this.playerRegistrationService.getTransactionFailureData(this.playerID,n,s.entityRegistrationPaymentID).pipe(w(this.unsubscribe$)).subscribe({next:d=>{this.loadingFailureData=!1,this.failureData=d},error:()=>{this.loadingFailureData=!1,this.siteDataService.showSiteErrorAlertDefaultGET()}})):s.clubUserPayment.dispute&&(this.failureData=new ii,this.failureData.text="The customer disputed this payment and won. The customer provided the following reason for their dispute: "+s.clubUserPayment.dispute.disputeReason.description,this.showFailureDataModal=!0)}showFailedPaymentAttempts(n){this.selectedPlayerRegistrationPayment=n,this.showFailedPaymentAttemptsModal=!0}isPaymentLastPaymentForPlayerRegistration(n){let s=this.entityRegistrations.find(d=>d.entityRegistrationID===n.entityRegistrationID);return s&&s.payments?s.payments.length===0?!0:!s.payments.some(d=>d.entityRegistrationPaymentID!==n.entityRegistrationPaymentID&&new Date(d.dueDate)>new Date(n.dueDate)):!1}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};l.\u0275fac=function(s){return new(s||l)(E(Q),E(z),E(dt),E(nt),E(Rt),E(ei),E(ni),E(St),E(Zt),E(yi),E(oi))},l.\u0275cmp=O({type:l,selectors:[["app-registration-confirmation"]],viewQuery:function(s,d){if(s&1&&tt(zn,5)(Gn,5)(Xn,5)(Jn,5)(Kn,5)(Zn,5),s&2){let p;A(p=k())&&(d.paymentForm=p.first),A(p=k())&&(d.donationPaymentForm=p.first),A(p=k())&&(d.paymentOptionsMenu=p.first),A(p=k())&&(d.applyToFuturePaymentsForm=p.first),A(p=k())&&(d.appliedCreditsOverlay=p.first),A(p=k())&&(d.pendingCreditsOverlay=p.first)}},standalone:!1,decls:40,vars:36,consts:[["paymentOptionsMenu",""],["pendingCreditsOverlay",""],["content",""],["appliedCreditsOverlay",""],["donationPaymentForm",""],["appendTo","body",3,"model","popup"],["header","Pay Now",3,"visibleChange","onHide","visible","closable","modal","focusTrap","focusOnShow"],["pTemplate","footer"],["appendTo","body",3,"dismissable"],["header","Failure Details",3,"visibleChange","visible","closable","modal"],["header","Payment Attempt Details",3,"visibleChange","visible","closable","modal"],[1,"row","header-back"],[1,"btn","btn-naked","btn-icon-chevron-left",3,"routerLink"],[1,"mb-3"],[3,"playerRegistration"],[1,"player-registration","row"],[1,"col-12"],[3,"entityRegistration"],[3,"cancelled","timeSlots","showManageLink","playerID","allowCancel","entityRegistrationID"],[1,"card"],[1,"player-registration-payment-summary"],[1,"row"],[1,"col-lg-4","payments-label"],[1,"col-lg-3"],[1,"col-lg-9","registration-price"],[1,"col-lg-3","payment-installment-plan"],[1,"col-lg-9","payment-installment-plan-name"],["href","javascript:void(0)",3,"mouseover","mouseleave"],[1,"text-primary-link","ml-2","d-inline-block"],[1,"far","fa-info-circle"],[1,"mt-3"],["alertType","warning"],[1,"btn","btn-sm","btn-naked","pl-0","text-medium",3,"routerLink"],[1,"row","summary-table","border-top"],[1,"col-lg-12","scroll-shadows"],[1,"table"],[1,"totals-row"],[1,"d-flex","align-items-center","nowrap"],[3,"tooltipText"],[1,"payment-status","payment-failed"],["href","javascript:void(0)"],["pTooltip","This payment was disputed and is under review","tooltipStyleClass","sp-tooltip",1,"far","fa-info-circle"],["tooltipStyleClass","sp-tooltip",1,"far","fa-info-circle",3,"pTooltip"],[1,"payment-status"],[1,"fas","fa-check"],[1,"far","fa-clock"],[1,"fas","fa-times"],["iconClass","far fa-info-circle",3,"tooltipText"],[1,"payment-status","payment-past-due"],[1,"payment-status","card-expiration-warning"],["pTooltip","This card may be expiring before this payment. Please verify and/or update your payment information.","tooltipStyleClass","sp-tooltip",1,"far","fa-info-circle"],["href","javascript:void(0)",1,"ml-2"],[1,""],["type","button",1,"btn","btn-sm","btn-naked",3,"click"],[1,"btn","btn-sm","btn-primary","full-width",3,"click"],[1,"fas","fa-bars"],["type","button",1,"btn",3,"click","disabled"],[3,"questionResponses","playerID","registrationID","entityRegistrationID","isAdmin","isPlayerRegistration"],[3,"registrationOptions","playerID","registrationID","isPlayerRegistration","entityRegistrationID","isCancelled","isAdmin","hasSurcharges"],[1,"player-registration-donation","summary-table"],[1,"col-lg-4","donations-label"],[1,"col-lg-12"],[1,"donations-total-row"],[1,"bold-cell"],[1,"payment-status","payment-completed"],[1,"player-registration-volunteer","summary-table"],[1,"col-lg-4","volunteer-label"],[3,"html","clampLine
1023s"],[1,"mt-3","mb-3"],[1,"fal","fa-calendar","mr-2"],[1,"fal","fa-location-dot","mr-2"],["target","_blank","rel","noopener noreferrer",3,"href"],[3,"invertBg"],[3,"onClose","onMakePayment","onUpdatePayment","playerID","entityRegistrationID","entityRegistrationPaymentID","programID","payment","editing","required"],[1,"payment-description","px-3","py-3","mb-3"],[1,"text-navy","fw-600"],[1,"text-medium"],[1,"row","payment-row","mt-3"],[1,"col-md-8","label","d-flex","align-items-center"],[1,"col-md-4","d-flex","justify-content-end","align-items-center"],[1,"row","payment-row","mt-3","border-top"],[3,"paymentTypeChanged","stripeSetupAttempted","includeHeader","paymentIntentMetadata","paymentData","sitePaymentTypeID","useSetupIntents","horizontalForm"],["slot","secondary"],["slot","primary"],["type","button",1,"btn","btn-primary",3,"click","disabled"],["role","status","aria-hidden","true",1,"spinner-border","spinner-border-sm"],[1,"overlay-payment-plan-name"],[1,"overlay-payment-plan-payments"],[1,"text-small"],[3,"cancel","tokenSave","paymentVendorID","clubUserPaymentMethodID","paymentTypeID","dialogHeader","showRemove"],["alertType","error",3,"isInline"],[1,"fw-800","text-medium"],["alertType","warning",3,"isInline"],["height","3rem"],["type","button",1,"btn","btn-large","btn-naked",3,"click"],[1,"no-bullets"],[1,"border-bottom","pb-3","mb-3","fw-800"],[1,"d-flex","align-items-center"],[1,"d-flex","justify-content-end","ml-auto"],[1,"d-flex","align-items-center","text-medium"]],template:function(s,d){if(s&1){let p=R();m(0,lr,5,1)(1,sr,6,1),o(2,"p-menu",5,0),t(4,` 1024`),a(),t(5,` 1025 1026`),m(6,dr,4,7),o(7,"p-dialog",6),W("visibleChange",function(b){return f(p),H(d.showDonationsModal,b)||(d.showDonationsModal=b),h(b)}),v("onHide",function(){return d.closeDonationsModal()}),t(8,` 1027 `),m(9,cr,38,8),U(10,ur,14,2,"ng-template",7),t(11,` 1028`),a(),t(12,` 1029 1030`),o(13,"p-popover",8,1),t(15,` 1031 `),U(16,gr,2,1,"ng-template",null,2,J),t(18,` 1032`),a(),t(19,` 1033 1034`),o(20,"p-popover",8,3),t(22,` 1035 `),U(23,Er,2,1,"ng-template",null,2,J),t(25,` 1036`),a(),t(26,` 1037 1038`),m(27,br,4,5),o(28,"p-dialog",9),W("visibleChange",function(b){return f(p),H(d.showFailureDataModal,b)||(d.showFailureDataModal=b),h(b)}),t(29,` 1039 `),m(30,Ir,3,2),U(31,wr,12,0,"ng-template",7),t(32,` 1040`),a(),t(33,` 1041 1042`),o(34,"p-dialog",10),W("visibleChange",function(b){return f(p),H(d.showFailedPaymentAttemptsModal,b)||(d.showFailedPaymentAttemptsModal=b),h(b)}),t(35,` 1043 `),m(36,Ar,3,1),U(37,kr,12,0,"ng-template",7),t(38,` 1044`),a(),t(39,` 1045`)}s&2&&(c(d.loading?1:0),r(2),q(M(31,to)),u("model",d.paymentOptions)("popup",!0),r(4),c(d.showPaymentModal?6:-1),r(),q(M(32,At)),j("visible",d.showDonationsModal),u("closable",!0)("modal",!0)("focusTrap",!1)("focusOnShow",!1),r(2),c(d.selectedUserClubDonation?9:-1),r(4),q(M(33,io)),u("dismissable",!0),r(7),u("dismissable",!0),r(7),c(d.editingPaymentMethod?27:-1),r(),q(M(34,At)),j("visible",d.showFailureDataModal),u("closable",!0)("modal",!0),r(2),c(d.showFailureDataModal?30:-1),r(4),q(M(35,At)),j("visible",d.showFailedPaymentAttemptsModal),u("closable",!0)("modal",!0),r(2),c(d.showFailedPaymentAttemptsModal?36:-1))},dependencies:[ot,ci,yt,lt,rt,st,Et,Ci,at,ri,bt,si,gi,hi,Si,Ri,Bi,Li,ji,Hi,Qt,xt,I,Wt,Y],styles:[".payment-description[_ngcontent-%COMP%]{background:var(--grey-75)}"]});let i=l;return i})();var $r=(i,l)=>["/players",i,"player-registrations",l],Vr=()=>({ReturnUrl:"/account/manage/registrations"});function Br(i,l){i&1&&(t(0,` 1046 `),o(1,"tr"),t(2,` 1047 `),o(3,"th"),t(4,` 1048 Program 1049 `),a(),t(5,` 1050 `),o(6,"th"),t(7,` 1051 Registration 1052 `),a(),t(8,` 1053 `),o(9,"th"),t(10,` 1054 Status 1055 `),a(),t(11,` 1056 `),o(12,"th"),t(13,` 1057 Date Registered 1058 `),a(),t(14,` 1059 `),a(),t(15,` 1060 `))}function Nr(i,l){if(i&1&&(t(0,` 1061 `),o(1,"div",7),t(2),a(),t(3,` 1062 `)),i&2){let e=_().$implicit;r(2),C(` 1063 `,e.registration.registrationGroup.name,` 1064 `)}}function Lr(i,l){if(i&1&&t(0),i&2){let e=_().$implicit;C(` 1065 `,e.registration.program.playerProgramAssignments[0].team.registrationLabelOverride||e.registration.name,` 1066 `)}}function qr(i,l){if(i&1&&t(0),i&2){let e=_().$implicit;C(` 1067 `,e.registration.name,` 1068 `)}}function jr(i,l){i&1&&(t(0,` 1069 `),x(1,"app-pill",8),t(2,` 1070 `))}function Hr(i,l){i&1&&(t(0,` 1071 `),x(1,"app-pill",9),t(2,` 1072 `))}function Wr(i,l){if(i&1&&(t(0,` 1073 `),o(1,"tr"),t(2,` 1074 `),o(3,"td"),t(4,` 1075 `),o(5,"div"),t(6),a(),t(7,` 1076 `),m(8,Nr,4,1),a(),t(9,` 1077 `),o(10,"td"),t(11,` 1078 `),o(12,"a",5),t(13,` 1079 `),m(14,Lr,1,1)(15,qr,1,1),a(),t(16,` 1080 `),a(),t(17,` 1081 `),o(18,"td"),t(19,` 1082 `),m(20,jr,3,0),m(21,Hr,3,0),a(),t(22,` 1083 `),o(23,"td",6),t(24),g(25,"utcDate"),a(),t(26,` 1084 `),a(),t(27,` 1085 `)),i&2){let e=l.$implicit;r(6),F(e.registration.program.name),r(2),c(e.registration.registrationGroup?8:-1),r(4),u("routerLink",ut(12,$r,e.playerID,e.playerRegistrationID))("queryParams",M(15,Vr)),r(2),c(e.registration.program.playerProgramAssignments&&e.registration.program.playerProgramAssignments[0]&&e.registration.program.playerProgramAssignments[0].team?14:15),r(6),c(e.isCancelled?20:-1),r(),c(e.isCancelled?-1:21),r(3),C(` 1086 `,et(25,8,e.completedOn,"MMM d, y, h:mm a",!1),` 1087 `)}}function Qr(i,l){if(i&1&&(t(0,` 1088 `),o(1,"tr"),t(2,` 1089 `),o(3,"td",10),t(4,` 1090 This player does not have any registrations yet! 1091 `),a(),t(5,` 1092 `),a(),t(6,` 1093 `)),i&2){let e=l.$implicit;r(3),Lt("colspan",e?e.length:4)}}function Yr(i,l){if(i&1&&(t(0,` 1094`),o(1,"div",0),t(2,` 1095 `),o(3,"h3"),t(4,"Registrations"),a(),t(5,` 1096 `),o(6,"p-table",1),t(7,` 1097 `),U(8,Br,16,0,"ng-template",2),t(9,` 1098 `),U(10,Wr,28,16,"ng-template",3),t(11,` 1099 `),U(12,Qr,7,1,"ng-template",4),t(13,` 1100 `),a(),t(14,` 1101`),a(),t(15,` 1102`)),i&2){let e=_();r(6),u("value",e.playerRegistrations)("lazy",!1)("paginator",!1)("totalRecords",e.playerRegistrations.length)("rows",100)}}function zr(i,l){i&1&&(t(0,` 1103`),o(1,"div",11),t(2,`
1104 `),x(3,"app-skeleton-template",12),t(4,` 1105`),a(),t(5,` 1106`)),i&2&&(r(3),u("invertBg",!0))}var Yi=(()=>{let l=class l{constructor(n,s,d,p,y){this.siteDataService=n,this.playerService=s,this.formService=d,this.route=p,this.router=y,this.unsubscribe$=new V,this.loading=!0}ngOnInit(){this.route.params.subscribe(n=>{this.playerID=this.playerService.playerID||this.getPlayerIDFromRoute(this.route.snapshot),this.playerService.getCompletedPlayerRegistrations(this.playerID).pipe(w(this.unsubscribe$)).subscribe(s=>{this.playerRegistrations=s,this.loading=!1,this.siteDataService.hideSiteLoader()},s=>{this.siteDataService.showSiteErrorAlert("There was a problem loading data.")})})}getPlayerIDFromRoute(n){return n.params&&n.params.id?+n.params.id:n.parent?this.getPlayerIDFromRoute(n.parent):null}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}};l.\u0275fac=function(s){return new(s||l)(E(Q),E(dt),E(Rt),E(nt),E(zt))},l.\u0275cmp=O({type:l,selectors:[["app-entity-registrations-completed"]],standalone:!1,decls:2,vars:1,consts:[[1,"card"],[1,"table","table-striped","table-sm",3,"value","lazy","paginator","totalRecords","rows"],["pTemplate","header"],["pTemplate","body"],["pTemplate","emptymessage"],[3,"routerLink","queryParams"],[2,"width","20%"],[1,"text-small"],["status","error","text","cancelled"],["status","active","text","completed"],[2,"text-align","left"],[1,"mb-3"],["height","5rem",3,"invertBg"]],template:function(s,d){s&1&&m(0,Yr,16,5)(1,zr,6,1),s&2&&c(d.loading?1:0)},dependencies:[ot,yt,vt,lt,mi,Y],encapsulation:2});let i=l;return i})();var zi=(()=>{let l=class l{};l.\u0275fac=function(s){return new(s||l)},l.\u0275mod=Ct({type:l}),l.\u0275inj=ct({imports:[wt.forChild([{path:"",component:Ui,children:[{path:"",component:Yi},{path:":playerRegistrationID",component:Qi}]}]),wt]});let i=l;return i})();var y0=(()=>{let l=class l{};l.\u0275fac=function(s){return new(s||l)},l.\u0275mod=Ct({type:l}),l.\u0275inj=ct({providers:[z,St],imports:[ui,zi,Ti,Pi,Di,Fi,Ii,wi]});let i=l;return i})();export{y0 as EntityRegistrationsModule};
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.