1import{a as Y,b as Pi,c as Qe,d as Ei,e as K,f as Oe,g as xi}from"./chunk-AIIOBJJS.js";import{a as pt,b as bi,c as Ai,d as Vi,e as mt,f as Mi}from"./chunk-53HMPXE2.js";import{a as ni}from"./chunk-WHBGUACM.js";import{a as yt,b as ai}from"./chunk-TTNHB4YN.js";import{b as Ti}from"./chunk-MQC2YKXX.js";import"./chunk-4EO3COSW.js";import"./chunk-AO6EENYW.js";import"./chunk-MNXT3EZP.js";import{a as ri,b as pi}from"./chunk-Q3S4W56Y.js";import{a as dt}from"./chunk-DAUVOF4D.js";import"./chunk-HSJLEOYO.js";import{b as oi}from"./chunk-ACUKUB2U.js";import{$ as ue,$d as Me,Aa as G,Ab as Vt,Ae as ei,Ba as ae,Bc as Bt,Bd as et,Cd as Ve,Ch as yi,Db as Mt,Dd as Lt,Df as mi,Ea as Et,Eb as Tt,Ec as zt,Ed as tt,Ef as ci,Fb as Ke,Fc as qe,Ga as h,Gd as kt,Ge as ti,Gf as gi,Ha as N,Hb as Ye,Hd as _t,Ia as R,Id as it,Ih as Ci,J as Rt,Ja as ge,Jc as Ft,Jd as qt,Ke as ii,Kf as We,Lc as Je,Lf as hi,M as wt,Me as ee,Ne as ot,Nh as X,Oh as Ne,P as Pt,Pa as D,Pc as Wt,Ph as Ii,Qa as L,Qh as Re,R as n,Ra as k,Rc as Nt,Rh as ce,S as U,Sd as nt,Se as si,Sh as Si,Uc as Ae,Ud as Ee,Uh as Ri,Vc as J,Vd as Qt,Vh as lt,Wa as ve,Wc as Ot,Wd as rt,X as x,Xb as $,Ya as xt,Za as ne,Zh as wi,_ as ie,_a as bt,_d as pe,ab as s,ae as me,bb as d,be as Ut,cb as _e,ce as jt,ea as V,ec as re,fb as vt,ga as Pe,ge as Ht,gf as li,hb as Ze,he as Te,ja as m,je as Gt,ka as o,ke as Be,kf as di,la as l,le as Ce,lh as fi,ma as Z,me as Ie,mh as st,ne as ze,nh as ui,ob as At,oe as Fe,oh as vi,pb as se,pe as Se,qb as le,qe as at,qh as _i,ra as O,s as Ge,se as Zt,sf as te,t as fe,ta as T,te as Kt,tf as Ct,ua as u,ue as Yt,v as ke,vd as Xe,ve as Jt,we as Xt,x as I,xd as $e,xe as $t,y as S,ya as j,yb as de,za as H,zb as ye,zd as Dt}from"./chunk-RF5BZFFS.js";import{a as ut,b as It,i as St}from"./chunk-ODN5LVDJ.js";var Ki=[],Bi=(()=>{let p=class p{};p.\u0275fac=function(i){return new(i||p)},p.\u0275mod=ue({type:p}),p.\u0275inj=fe({imports:[Ae.forChild(Ki),Ae]});let r=p;return r})();function Yi(r,p){if(r&1){let t=O();o(0,"li",4)(1,"a",5),s(2,"translate"),s(3,"titlecase"),T("click",function(i){let e=I(t).index,c=u();return i.preventDefault(),S(c.handleAttendeeLinkClick(e))}),o(4,"span",6),h(5),l(),o(6,"span",6),h(7),s(8,"translate"),s(9,"titlecase"),l()()()}if(r&2){let t=p.$implicit,a=p.index;n(),m("title",t.FName||t.LName?t.FName+" "+t.FName:d(3,9,d(2,7,"events.registration.wizard.attendees.attendee-tab-prefix"))+(a+1)),n(3),m("hidden",!t.FName&&!t.LName),n(),ge("",t.FName," ",t.LName),n(),m("hidden",t.FName||t.LName),n(),ge("",d(9,13,d(8,11,"events.registration.wizard.attendees.attendee-tab-prefix")),"",a+1)}}var zi=(()=>{let p=class p{constructor(){this.attendees=[],this.enableNewButton=!1,this.onAddAttendee=new U,this.onAttendeeClick=new U}handleNewAttendeeClick(){this.onAddAttendee.emit()}handleAttendeeLinkClick(a){a<0||!this.attendees||this.onAttendeeClick.emit(a)}};p.\u0275fac=function(i){return new(i||p)},p.\u0275cmp=ie({type:p,selectors:[["wl-event-v4-registration-wizard-attendee-tab-nav"]],inputs:{attendees:"attendees",enableNewButton:"enableNewButton"},outputs:{onAddAttendee:"onAddAttendee",onAttendeeClick:"onAttendeeClick"},standalone:!1,decls:7,vars:7,consts:[["type","button",1,"btn","btn-primary","btn-sm","wl-add-attendee-btn",3,"click","hidden"],[1,"glyphicon","glyphicon-plus"],[1,"list-unstyled","wl-attendee-links"],["class","wc-truncate-ellipsis",4,"ngFor","ngForOf"],[1,"wc-truncate-ellipsis"],["href","#",3,"click","title"],[3,"hidden"]],template:function(i,e){i&1&&(o(0,"button",0),T("click",function(){return e.handleNewAttendeeClick()}),Z(1,"span",1),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"ul",2),V(6,Yi,10,15,"li",3),l()),i&2&&(m("hidden",!e.enableNewButton),n(2),R(" ",d(4,5,d(3,3,"events.registration.wizard.attendees.new-attendee-button-label")),` 2`),n(4),m("ngForOf",e.attendees))},dependencies:[se,de,re],styles:[".wl-add-attendee-btn[_ngcontent-%COMP%]{margin-bottom:0}.wl-attendee-links[_ngcontent-%COMP%]{margin-top:5px}"]});let r=p;return r})();var en=["attendeeForm"];function tn(r,p){if(r&1&&(o(0,"p"),Z(1,"wl-busy",11),l()),r&2){let t=u();n(),m("show",t._loading)}}function nn(r,p){r&1&&(o(0,"p"),h(1),s(2,"translate"),l()),r&2&&(n(),N(d(2,1,"events.registration.wizard.attendees.no-attendees-added")))}
2function rn(r,p){if(r&1){let t=O();o(0,"div",12)(1,"wl-event-v4-registration-wizard-attendee",13),T("responseChange",function(i){let e=I(t).$implicit,c=u();return S(c.onResponseChange(i,e))})("onItemSelectionChanged",function(i){let e=I(t).$implicit,c=u();return S(c.attendeeItemSelectionChanged(i,e))})("remove",function(){let i=I(t).$implicit,e=u();return S(e.removeAttendee(i))}),l()()}if(r&2){let t=p.$implicit,a=p.index,i=u();n(),m("attendee",t)("eventItems",t.Items)("customFields",i.allPossibleCustomFields)("searchAllProfiles",i.searchAllProfiles)("editingRegistration",i.registration==null?null:i.registration.IsEdit)("registrationProfileId",i.registrationProfile&&i.registrationProfile.OrgInd?i.registrationProfile.ProfileId:0)("event",i.event)("attendeeNumber",a+1)}}function an(r,p){if(r&1){let t=O();o(0,"div",14)(1,"button",15),T("click",function(){I(t);let i=u();return S(i.addNewAttendee())}),h(2),s(3,"translate"),s(4,"uppercase"),l()()}if(r&2){let t=u();n(),m("disabled",t._loading||!t.canAddNewAttendee),n(),R(" ",d(4,4,d(3,2,"events.registration.wizard.attendees.add-another-attendee-button-label"))," ")}}var Wi=(()=>{let p=class p{constructor(a,i,e,c,P,b,_,B){this._utilService=a,this._eventItemService=i,this._translationService=e,this._registrationService=c,this._eventCustomRegFieldService=P,this._el=b,this._configSettingService=_,this._changeDetector=B,this.registrationProfile=null,this.customFieldResponseChangeEmitter=new U,this.onCancel=new U,this.onIncrementStepper=new U,this.onDecrementStepper=new U,this.registration=new Y,this.event=new X,this.initialLoadComplete=!1,this._loading=!1,this.signUpOrAttendeeType=2,this._iAmAsloAnAttendeeConfigSetting=!1,this.loadData=()=>{let v=[];return this._loading=!0,v.push(this.updateAllPossibleCustomFields()),this.registrationId>0&&v.push(this._registrationService.getRegistrationAttendeesMin(this.registrationId).then(w=>{this.registration.Attendees=w,this.registration.Attendees.forEach((A,F)=>{A.Items&&A.Items.forEach(f=>f.Selected=!0),this.addAllowedRegistrationAttendeeItemsToAttendee(A,!1)})})),this._iAmAsloAnAttendeeConfigSetting=this._configSettingService.getConfigSettingValueFromCollectionAsBoolean("IAmAlsoAnAttendee",this.configSettings),Promise.all(v).then(()=>{this.initialLoadComplete=!0,this._loading=!1},()=>this._loading=!1)},this.getValidationResult=()=>{let v=new te;v.isValid=!0;let w=this.registration.Attendees.filter(E=>this._utilService.isNotNullEmptyOrWhitespace(E.Email)||this._utilService.isNotNullEmptyOrWhitespace(E.FName)||this._utilService.isNotNullEmptyOrWhitespace(E.LName)),A=!this.registration.Attendees.some(E=>!E.Items.some(g=>g.Selected&&g.AttendeesForItem>0)),F=this.registration.Items.filter(E=>E.Quantity>0).reduce((E,g)=>E+g.Quantity*g.AttendeesForItem,0);if(F>0&&this.registration.Attendees.length>F?(v.isValid=!1,v.errors.push(this._translationService.getInstant("events.registration.wizard.attendees.max-attendees-exceeded"))):A==!1?(v.isValid=!1,v.errors.push(this._translationService.getInstant("events.registration.wizard.attendees.attendees-not-assigned-to-item-validation-error"))):v.isValid=!0,!this.verifyAllRequiredFieldsAreSet()){v.isValid=!1;let E=this._translationService.getInstant("events.registration.wizard.attendees.attendee-required-fields-validation-error")+": ";for(let g of this.requiredFieldsNotPopulated)E=E+" "+g+" ";v.errors.push(E)}return v},this.updateAvailableAttendeeRegistrationItems=v=>{if(this.updateCanAddNewAttendee(),this.canAddNewAttendee&&v){for(let f of this.registration.Attendees)this.addAllowedRegistrationAttendeeItemsToAttendee(f,!1);let w=this.registration.Items.filter(f=>f.AttendeesForItem>0&&this.getAttendeesRemainingForRegistrationItem(f.EventItemId)>0),A=0,F=50;for(;w.length>0&&A<F;){A++;for(let f=0;f<w.length;f++){let E=w[f],g=this.getAttendeesRemainingForRegistrationItem(E.EventItemId);if(g<=0)continue;let y=this.registration.Attendees.find(C=>!C.Items.some(z=>z.EventItemId===E.EventItemId&&z.Selected));if(y&&(!E.CreateSeparateAttendee||!y.Items.some(C=>C.Selected))){let C=y.Items.find(z=>z.EventItemId===E.EventItemId);if(C){C.Selected=!0;for(let z of this.attendeeComponents)z.attendeeItemSelectionChanged(C);g=this.getAttendeesRemainingForRegistrationItem(E.EventItemId)}}g<=0&&(w.splice(f,1),f--)}}for(this.updateCanAddNewAttendee();this.canAddNewAttendee;)this.newAttendee();for(let f of this.registration.Attendees)this.addAllowedRegistrationAttendeeItemsToAttendee(f,!0)}else v&&this.registration.Attendees.length&&this.handleEventItemsAdjustment()},this.updateAllPossibleCustomFields=()=>this._eventCustomRegFieldService.getEventCustomRegFields(this.event.EventId).then(v=>{this.allPossibleCustomFields=new Array;for(let w of v.Result)w.StaffOnly||this.allPossibleCustomFields.push(w)}),this.getRegistrationItem=v=>{let w=this.registration.Items.filter(A=>A.EventItemId==v);return w.length>0?w[0]:new Qe},this.getAttendeesForRegistrationItem=v=>{let w=new Array;for(let A of this.registration.Attendees)for(let F of A.Items)F.Selected===!0&&F.EventItemId===v&&w.push(A);return w},this.getAttendeesRemainingForRegistrationItem=v=>{let w=0,A=this.getRegistrationItem(v);if(A.Quantity>0){let f=this.getAttendeesForRegistrationItem(v).length;w=A.AttendeesForItem*A.Quantity-f}return w},this.addAllowedRegistrationAttendeeItemsToAttendee=(v,w)=>{for(let A of this.registration.Items.filter(F=>F.AttendeesForItem>0&&F.Quantity>0))if(!v.Items.find(f=>f.EventItemId===A.EventItemId)){let f=new Pi;this._utilService.map(A,f),f.Remaining=this.getAttendeesRemainingForRegistrationItem(A.EventItemId),w&&(f.Selected=f.Remaining>0),v.Items.push(f),v.Items=v.Items.sort((E,g)=>E.DisplayOrder-g.DisplayOrder)}},this.getPotentialAttendeesForRegistrationItem=v=>{let w=0,A=this.getRegistrationItem(v);if(w=A.AttendeesForItem,A.Quantity>0){w=A.AttendeesForItem*A.Quantity;let F=this.getAttendeesForRegistrationItem(v);w-F.length}return w<0&&(w=0),A.CreateSeparateAttendee&&w==0&&w++,w},this.attendeeItemSelectionChanged=(v,w)=>{if(v.Selected&&this.getAttendeesRemainingForRegistrationItem(v.EventItemId)<0){let F=this.registration.Attendees.filter(f=>f!=w).map(f=>f.Items.filter(E=>E.EventItemId==v.EventItemId&&E.Selected)).filter(f=>f.length>0);F.length&&(F[0][0].Selected=!1)}w.Items=[...w.Items],this.registration.Attendees=this.registration.Attendees.map(A=>A===w?It(ut({},A),{Items:[...w.Items]}):ut({},A)),this.updateCanAddNewAttendee()},this.newAttendee=()=>{let v=new Ii;v.OrgName=this.registration.Registration.OrgName,v.ProfileId=0,this.registration.Attendees.length<=0&&this._iAmAsloAnAttendeeConfigSetting&&(this._utilService.mapSafe(this.registration.Registration,v),v.NameForBadge=v.FName+" "+v.LName,this.registration.Registration.relatedProfileId>0&&this.registration.Registration.relatedProfileIsOrg==!1?v.ProfileId=this.registration.Registration.relatedProfileId:v.ProfileId=0),this.addAllowedRegistrationAttendeeItemsToAttendee(v,!0),this.registration.Attendees.push(v),this.updateCanAddNewAttendee()},this.removeAttendee=v=>{this._utilService.arrayRemoveEntry(this.registration.Attendees,v),this.updateCanAddNewAttendee()},this.updateCanAddNewAttendee=()=>{let v=!1;for(let w of this.registration.Items)w.Quantity>0&&this.getAttendeesRemainingForRegistrationItem(w.EventItemId)>0&&(v=!0);this.canAddNewAttendee!=v&&(this.canAddNewAttendee=v)},this.onResponseChange=(v,w)=>{this.customFieldResponseChangeEmitter.emit(v)},this.requiredField=v=>v==2||v==3,this.verifyAllRequiredFieldsAreSet=()=>{let v=!0,w=1,A=this._translationService.getInstant("events.registration.wizard.attendees.attendee-label");this.requiredFieldsNotPopulated=new Array;for(let F of this.registration.Attendees){this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(F.Address1)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.address1"))),this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(F.City)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.city"))),this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(F.State)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.state"))),this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(F.Zip)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.zip"))),this.displayField(this.event.RegCompanyNameVisible)&&this.requiredField(this.event.RegCompanyNameRequired)&&this._utilService.isNullEmptyOrWhitespace(F.OrgName)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.organization-name"))),this.displayField(this.event.RegEmailVisible)&&this.requiredField(this.event.RegEmailRequired)&&this._utilService.isNullEmptyOrWhitespace(F.Email)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.email"))),this.displayField(this.event.RegFNameVisible)&&this.requiredField(this.event.RegFNameRequired)&&this._utilService.isNullEmptyOrWhitespace(F.FName)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.first-name"))),this.displayField(this.event.RegLNameVisible)&&this.requiredField(this.event.RegLNameRequired)&&this._utilService.isNullEmptyOrWhitespace(F.LName)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.last-name"))),this.displayField(this.event.RegNameForBadgeVisible)&&this.requiredField(this.event.RegNameForBadgeRequired)&&this._utilService.isNullEmptyOrWhitespace(F.NameForBadge)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.name-for-badge"))),this.displayField(this.event.RegPhoneVisible)&&this.requiredField(this.event.RegPhoneRequired)&&this._utilService.isNullEmptyOrWhitespace(F.Phone)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.phone"))),this.displayField(this.event.RegPrefixVisible)&&this.requiredField(this.event.RegPrefixRequired)&&this._utilService.isNullEmptyOrWhitespace(F.Prefix)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.prefix"))),this.displayField(this.event.RegTitleVisible)&&this.requiredField(this.event.RegTitleRequired)&&this._utilService.isNullEmptyOrWhitespace(F.Title)&&(v=!1,this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+this._translationService.getInstant("common.personal-information.title")));for(let f of F.CustomFieldResponses)(f.CustomField.Required==2||f.CustomField.Required==3)&&this._utilService.isNullEmptyOrWhitespace(f.Response)&&(this.requiredFieldsNotPopulated.push(A+" "+w.toString()+" "+f.CustomField.FieldName+" "+this._translationService.getInstant("common.required")),v=!1);w=w+1}return v},this.searchAllProfiles=!1,this.availableEventItems=new Array,this.canAddNewAttendee=!1,this.allPossibleCustomFields=new Array,this.requiredFieldsNotPopulated=new Array}cancel(){this.onCancel.emit(!0)}incrementStepper(){this.onIncrementStepper.emit(!0)}decrementStepper(){this.onDecrementStepper.emit(!0)}handleEventItemsAdjustment(){let a=this.registration.Items.filter(e=>e.AttendeesForItem>0&&(!e.Quantity||e.Quantity<=0));if(a.length){let e=a.map(c=>c.EventItemId);for(let c of this.registration.Attendees.filter(P=>P.Items.some(b=>e.includes(b.EventItemId))))c.Items=c.Items.filter(P=>!e.includes(P.EventItemId));this.registration.Attendees=this.registration.Attendees.filter(c=>c.AttendeeId>0||c.Items.length>0)}let i=this.getOverBookedEventItems();for(;i.length;
2)i.forEach(e=>{let c=this.registration.Attendees.map(P=>P.Items.filter(b=>b.EventItemId===e.EventItemId&&b.Selected)).filter(P=>P.length>0);c.length&&(c[c.length-1][0].Selected=!1)}),i=this.getOverBookedEventItems()}getOverBookedEventItems(){return this.registration.Items.filter(a=>this.getAttendeesForRegistrationItem(a.EventItemId).length>0&&this.getAttendeesRemainingForRegistrationItem(a.EventItemId)<0)}setWillBeLoadingNext(){this._loading=!0}addNewAttendee(){this._loading||(this.newAttendee(),setTimeout(()=>this.scrollToAttendee(this.registration.Attendees.length-1)))}scrollToAttendee(a){this.scrollToElement(".wc-event-reg-wiz-attendee-"+a)}scrollToElement(a){let i=jQuery(a,this._el.nativeElement).offset(),e=jQuery(window),c=e.offset()||{top:0},P=i.top-c.top-20,b=e.height(),_=e.scrollTop(),B=_+b-60;(P<_||P>B)&&e.animate({scrollY:P},{duration:900,step:v=>window.scrollTo(0,v)})}displayField(a){return(a&2)>0}};p.\u0275fac=function(i){return new(i||p)(x($),x(ce),x(J),x(K),x(Re),x(Rt),x(ee),x(Ze))},p.\u0275cmp=ie({type:p,selectors:[["wl-event-v4-registration-wizard-attendees"]],viewQuery:function(i,e){if(i&1&&(j(en,5),j(lt,5)),i&2){let c;H(c=G())&&(e.attendeeForm=c.first),H(c=G())&&(e.attendeeComponents=c)}},inputs:{registrationProfile:"registrationProfile"},outputs:{customFieldResponseChangeEmitter:"customFieldResponseChange",onCancel:"onCancel",onIncrementStepper:"onIncrementStepper",onDecrementStepper:"onDecrementStepper"},standalone:!1,features:[ve([ce,Re])],decls:22,vars:20,consts:[["attendeeForm","ngForm"],[1,"container-fluid"],[1,"form-horizontal"],[4,"ngIf"],[1,"attendees-container"],["class","wc-event-reg-wiz-attendee highlight-box has-violator-tag mobile-padding",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","center",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end"],[1,"cancel","mr-12","f-wb","mv-5",3,"click"],[1,"atlas-btn","atlas-btn-secondary","mr-12",3,"click"],[1,"atlas-btn","atlas-btn-primary",3,"click","disabled"],[3,"show"],[1,"wc-event-reg-wiz-attendee","highlight-box","has-violator-tag","mobile-padding"],[3,"responseChange","onItemSelectionChanged","remove","attendee","eventItems","customFields","searchAllProfiles","editingRegistration","registrationProfileId","event","attendeeNumber"],["fxLayout","row","fxLayoutAlign","center"],["type","button",1,"atlas-btn","atlas-btn-primary","mt-5","mb-10",3,"click","disabled"]],template:function(i,e){if(i&1){let c=O();o(0,"form",null,0)(2,"div",1)(3,"div",2),V(4,tn,2,1,"p",3)(5,nn,3,3,"p",3),o(6,"div",4),V(7,rn,2,8,"div",5),l()(),V(8,an,5,
26,"div",6),o(9,"div",7)(10,"a",8),T("click",function(){return I(c),S(e.cancel())}),h(11),s(12,"translate"),s(13,"uppercase"),l(),o(14,"button",9),T("click",function(){return I(c),S(e.decrementStepper())}),h(15),s(16,"translate"),s(17,"uppercase"),l(),o(18,"button",10),T("click",function(){return I(c),S(e.incrementStepper())}),h(19),s(20,"translate"),s(21,"uppercase"),l()()()()}if(i&2){let c=ae(1);n(4),m("ngIf",e._loading),n(),m("ngIf",!e._loading&&!e.registration.Attendees.length),n(2),m("ngForOf",e.registration.Attendees),n(),m("ngIf",(e.registration.Attendees==null?null:e.registration.Attendees.length)>0),n(3),R(" ",d(13,10,d(12,8,"common.cancel"))," "),n(4),R(" ",d(17,14,d(16,12,"common.back"))," "),n(3),m("disabled",!c.valid),n(),R(" ",d(21,18,d(20,16,"events.registration.wizard.attendees.continue-to-payment-label"))," ")}},dependencies:[Xe,lt,se,le,Se,Ce,Ie,me,pe,ye,re],styles:[".attendees-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:20px;align-items:stretch;overflow-anchor:none}.wc-event-reg-wiz-attendee[_ngcontent-%COMP%]{flex:0 1 calc(50% - 20px);box-sizing:border-box;border:none;box-shadow:none;margin-top:0}@media(max-width:768px){.wc-event-reg-wiz-attendee[_ngcontent-%COMP%]{flex:0 1 100%}}@media screen and (max-width:440px){.mobile-padding[_ngcontent-%COMP%]{padding:0!important}}.wl-attendee-row[_ngcontent-%COMP%]{border-radius:8px;border:1px solid #e0e0e0;background-color:#fff;padding:32px;box-shadow:0 2px 4px #0000001a;margin-bottom:20px}.wl-attendee-row[_ngcontent-%COMP%] .form-group[_ngcontent-%COMP%]{margin-bottom:20px}.wl-attendee-row[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{padding:10px 14px;border-radius:4px}"]});let r=p;return r})();var ln=["profileOrgDupChecker"],dn=["profileIndDupChecker"],pn=["contactForm"];function mn(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function cn(r,p){if(r&1){let t=O();o(0,"div")(1,"label",10),h(2),s(3,"translate"),s(4,"titlecase"),V(5,mn,2,0,"span",11),l(),o(6,"input",12),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.OrgName,i)||(e.registration.Registration.OrgName=i),S(i)}),T("blur",function(i){I(t);let e=u();return S(e.onOrgNameChange(i))}),l()()}if(r&2){let t=u();n(2),R(" ",d(4,6,d(3,4,"events.registration.wizard.contact.org-name-label"))," "),n(3),m("ngIf",t.event.RegCompanyNameRequired==1||t.event.RegCompanyNameRequired==3),n(),D("ngModel",t.registration.Registration.OrgName),m("required",t.event.RegCompanyNameRequired==1||t.event.RegCompanyNameRequired==3)}}function gn(r,p){if(r&1){let t=O();o(0,"div")(1,"label",14),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"div")(6,"wl-related-profile-selector",15),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.relatedProfileId,i)||(e.registration.Registration.relatedProfileId=i),S(i)}),T("onProfileChanged",function(i){I(t);let e=u();return S(e.relatedProfileChanged(i))}),l()()()}if(r&2){let t=u();n(2),N(d(4,7,d(3,5,"events.registration.wizard.contact.profile-related-lookup-label"))),n(4),D("ngModel",t.registration.Registration.relatedProfileId),m("relatedProfileId",t.registration.Registration.ProfileId)("disabled",t._checkingMainContact),Pe("aria-labelledby","profile-related-lookup-label")}}function hn(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function fn(r,p){if(r&1){let t=O();o(0,"div",16)(1,"label",17),h(2),s(3,"translate"),s(4,"titlecase"),V(5,hn,2,0,"span",11),l(),o(6,"div")(7,"input",18),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Prefix,i)||(e.registration.Registration.Prefix=i),S(i)}),l()()()}if(r&2){let t=u();n(2),R(" ",d(4,6,d(3,4,"events.registration.wizard.contact.prefix-label"))," "),n(3),m("ngIf",t.event.RegPrefixRequired==1||t.event.RegPrefixRequired==3),n(2),m("required",t.event.RegPrefixRequired==1||t.event.RegPrefixRequired==3),D("ngModel",t.registration.Registration.Prefix)}}function un(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function vn(r,p){if(r&1){let t=O();o(0,"div")(1,"label",19),h(2),s(3,"translate"),s(4,"titlecase"),V(5,un,2,0,"span",11),l(),o(6,"input",20),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.FName,i)||(e.registration.Registration.FName=i),S(i)}),l()()}if(r&2){let t=u();n(2),R(" ",d(4,6,d(3,4,"events.registration.wizard.contact.first-name-label"))," "),n(3),m("ngIf",t.event.RegFNameRequired==1||t.event.RegFNameRequired==3),n(),m("required",t.event.RegFNameRequired==1||t.event.RegFNameRequired==3),D("ngModel",t.registration.Registration.FName)}}function _n(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}
2function yn(r,p){if(r&1){let t=O();o(0,"div")(1,"label",21),h(2),s(3,"translate"),s(4,"titlecase"),V(5,_n,2,0,"span",11),l(),o(6,"div")(7,"input",22),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.LName,i)||(e.registration.Registration.LName=i),S(i)}),T("blur",function(){I(t);let i=u();return S(i.onLastNameChange())}),l()()()}if(r&2){let t=u();n(2),R(" ",d(4,6,d(3,4,"events.registration.wizard.contact.last-name-label"))," "),n(3),m("ngIf",t.event.RegLNameRequired==1||t.event.RegLNameRequired==3),n(2),m("required",t.event.RegLNameRequired==1||t.event.RegLNameRequired==3),D("ngModel",t.registration.Registration.LName)}}function Cn(r,p){if(r&1){let t=O();o(0,"div")(1,"wl-email-input",23),s(2,"translate"),s(3,"titlecase"),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Email,i)||(e.registration.Registration.Email=i),S(i)}),l()()}if(r&2){let t=u();n(),m("label",d(3,8,d(2,6,"events.registration.wizard.contact.email-label")))("required",t.event.RegEmailRequired==1||t.event.RegEmailRequired==3)("disabled",!1)("name","contact-email")("id","contact-email"),D("ngModel",t.registration.Registration.Email)}}function In(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function Sn(r,p){if(r&1){let t=O();o(0,"div")(1,"label",24),h(2),s(3,"translate"),s(4,"titlecase"),V(5,In,2,0,"span",11),l(),o(6,"div")(7,"input",25),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Title,i)||(e.registration.Registration.Title=i),S(i)}),l()()()}if(r&2){let t=u();n(2),R(" ",d(4,6,d(3,4,"events.registration.wizard.contact.title-label"))," "),n(3),m("ngIf",t.event.RegTitleRequired==1||t.event.RegTitleRequired==3),n(2),m("required",t.event.RegTitleRequired==1||t.event.RegTitleRequired==3),D("ngModel",t.registration.Registration.Title)}}function Rn(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function wn(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function Pn(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function En(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function xn(r,p){if(r&1){let t=O();o(0,"div")(1,"div",26)(2,"div")(3,"label",27),h(4),s(5,"translate"),s(6,"titlecase"),V(7,Rn,2,0,"span",11),l(),o(8,"input",28),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Address1,i)||(e.registration.Registration.Address1=i),S(i)}),l()(),o(9,"div")(10,"label",29),h(11),s(12,"translate"),s(13,"titlecase"),l(),o(14,"input",30),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Address2,i)||(e.registration.Registration.Address2=i),S(i)}),l()()(),o(15,"div",31)(16,"div")(17,"label",32),h(18),s(19,"translate"),s(20,"titlecase"),V(21,wn,2,0,"span",11),l(),o(22,"input",33),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.City,i)||(e.registration.Registration.City=i),S(i)}),l()(),o(23,"div")(24,"label",34),h(25),s(26,"translate"),s(27,"titlecase"),V(28,Pn,2,0,"span",11),l(),o(29,"wl-state-selector",35,1),s(31,"translate"),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.State,i)||(e.registration.Registration.State=i),S(i)}),l()(),o(32,"div")(33,"label",36),h(34),s(35,"translate"),s(36,"titlecase"),V(37,En,2,0,"span",11),l(),o(38,"input",37),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Zip,i)||(e.registration.Registration.Zip=i),S(i)}),l()()()()}if(r&2){let t=u();n(4),R(" ",d(6,22,d(5,20,"events.registration.wizard.contact.address-label"))," "),n(3),m("ngIf",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),n(),m("required",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),D("ngModel",t.registration.Registration.Address1),n(3),R(" ",d(13,26,d(12,24,"events.registration.wizard.contact.address2-label"))," "),n(3),D("ngModel",t.registration.Registration.Address2),n(4),R(" ",d(20,30,d(19,28,"events.registration.wizard.contact.city-label"))," "),n(3),m("ngIf",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),n(),m("required",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),D("ngModel",t.registration.Registration.City),n(3),R(" ",d(27,34,d(26,32,"events.registration.wizard.contact.state-label"))," "),n(3),m("ngIf",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),n(),m("skipPreSelect",!0),D("ngModel",t.registration.Registration.State),m("required",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),Pe("aria-label",d(31,36,"events.registration.wizard.contact.state-label")),n(5),R(" ",d(36,40,d(35,38,"events.registration.wizard.contact.zip-label"))," "),n(3),m("ngIf",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),n(),m("required",t.event.RegAddressRequired==1||t.event.RegAddressRequired==3),D("ngModel",t.registration.Registration.Zip)}}
2function bn(r,p){if(r&1){let t=O();o(0,"div")(1,"label",38),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"div")(6,"wl-country-selector",39),s(7,"translate"),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Country,i)||(e.registration.Registration.Country=i),S(i)}),l()()()}if(r&2){let t=u();n(2),N(d(4,5,d(3,3,"events.registration.wizard.contact.country-label"))),n(4),D("ngModel",t.registration.Registration.Country),Pe("aria-label",d(7,7,"events.registration.wizard.contact.country-label"))}}function An(r,p){r&1&&(o(0,"span",13),h(1,"*"),l())}function Vn(r,p){if(r&1){let t=O();o(0,"div",16)(1,"label",40),h(2),s(3,"translate"),s(4,"titlecase"),V(5,An,2,0,"span",11),l(),o(6,"div")(7,"input",41),k("ngModelChange",function(i){I(t);let e=u();return L(e.registration.Registration.Phone,i)||(e.registration.Registration.Phone=i),S(i)}),l()()()}if(r&2){let t=u();n(2),R(" ",d(4,6,d(3,4,"events.registration.wizard.contact.phone-label"))," "),n(3),m("ngIf",t.event.RegPhoneRequired==1||t.event.RegPhoneRequired==3),n(2),m("required",t.event.RegPhoneRequired==1||t.event.RegPhoneRequired==3),D("ngModel",t.registration.Registration.Phone)}}var Di=(()=>{let p=class p{constructor(a,i,e,c,P,b){this._profileService=c,this.registration=new Y,this.event=new X,this.initialLoadComplete=!1,this.onRegistrationProfileChanged=new U,this.onCancel=new U,this.onIncrementStepper=new U,this._checkingMainContact=!1,this.loadData=()=>{this.initialLoadComplete=!0,this._checkingMainContact=!1,this.allowSelectiveProfileAssignment=this._configSettingService.getConfigSettingValueFromCollectionAsBoolean("SelectiveProfileAssignment",this.configSettings);let _=this._userService.getCurrentUserProfileExtended().then(B=>(this.currentUserProfile=B,B.ProfileId>0&&(this.isLoggedIn=!0),Promise.resolve(!0)));Promise.all([_]).then(()=>{if(this.registration.Registration.LoggedInProfileId=0,this.isLoggedIn==!0)if(this.registration.Registration.LoggedInProfileId=this.currentUserProfile.ProfileId,this.currentUserProfile.OrgInd==!0){this.registration.Registration.ProfileId=this.currentUserProfile.ProfileId,this.registration.Registration.relatedProfileId=0;let B=new Ee;this._utilService.mapSafe(this.currentUserProfile,B),this.registrationProfileChanged(B)}else this.allowSelectiveProfileAssignment==!0?this._profileService.getMainOrFirstRelatedOrg(this.currentUserProfile.ProfileId).then(B=>{B||(B=new Ct),this.registration.Registration.ProfileId=B.ProfileId,this.registration.Registration.relatedProfileId=this.currentUserProfile.ProfileId,this.registration.Registration.relatedProfileIsOrg=this.currentUserProfile.OrgInd,this.registration.Registration.ForceMemberPricing=!B.Member&&this.currentUserProfile.Member;let v=new Ee;this._utilService.mapSafe(B,v);let w=new Ee;this._utilService.mapSafe(this.currentUserProfile,w),this.registrationProfileChanged(v),this.relatedProfileChanged(w)}):this._profileService.getMainOrFirstRelatedOrg(this.currentUserProfile.ProfileId).then(B=>{B||(B=new Ct),this.registration.Registration.ProfileId=this.currentUserProfile.ProfileId,this.currentUserProfile.OrgInd?this.registration.Registration.relatedProfileId=B.ProfileId:this.registration.Registration.relatedProfileId=this.currentUserProfile.ProfileId;let v=new Ee;this._utilService.mapSafe(B,v);let w=new Ee;this._utilService.mapSafe(this.currentUserProfile,w),this.registrationProfileChanged(w),this.relatedProfileChanged(v)})})},this.getValidationResult=()=>{let _=new te;if(_.isValid=!0,this._utilService.isNotNullEmptyOrWhitespace(this.registration.Registration.Email)||this._utilService.isNotNullEmptyOrWhitespace(this.registration.Registration.FName)||this._utilService.isNotNullEmptyOrWhitespace(this.registration.Registration.LName)||this._utilService.isNotNullEmptyOrWhitespace(this.registration.Registration.OrgName)?_.isValid=!0:(_.isValid=!1,_.errors.push(this._translationService.getInstant("events.registration.wizard.contact.add-registration-name-validation-error"))),!this.verifyAllRequiredFieldsAreSet()){_.isValid=!1;let v=this._translationService.getInstant("events.registration.wizard.contact.contact-required-fields-validation-error")+": ";for(let w of this.requiredFieldsNotPopulated)v=v+" "+w+" ";_.errors.push(v)}return _},this.registrationProfileChanged=_=>{this.initialLoadComplete==!0&&(this.registration.IsEdit==!1||_.ProfileId!=this.registration.Registration.ProfileId)&&(this.registration.Registration.ProfileId=_.ProfileId,this.registration.Registration.IsMember=_.Member||this.currentUserProfile&&this.currentUserProfile.Member,this.registration.Registration.OrgName=_.OrgName,this.registration.Registration.Prefix=_.Prefix,this.registration.Registration.FName=_.FirstName,this.registration.Registration.LName=_.LastName,this.registration.Registration.Title=_.Title,this.registration.Registration.Address1=_.Address1,this.registration.Registration.Address2=_.Address2,this.registration.Registration.City=_.City,this.registration.Registration.State=_.State,this.registration.Registration.Zip=_.Zip,this.registration.Registration.Email=_.Email,this.registration.Registration.Phone=_.WorkPhone,this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Phone)&&(this.registration.Registration.Phone=_.CellPhone),this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Phone)&&(this.registration.Registration.Phone=_.HomePhone),this._regProfileEmail=_.Email,!this.registration.IsEdit&&_.ProfileId>0||(this.registration.Registration.relatedProfileId=0,this.relatedProfileChanged(new Ee)),this.onRegistrationProfileChanged.emit(_))},this.relatedProfileChanged=_=>{this.initialLoadComplete==!0&&_.ProfileId!=this.registration.Registration.CommunicateWithProfileId&&(this.registration.Registration.CommunicateWithProfileId=_.ProfileId,_.OrgInd?this.registration.Registration.OrgName=_.OrgName:(this.registration.Registration.Prefix=_.Prefix,this.registration.Registration.Title=_.Title,this.registration.Registration.FName=_.FirstName,this.registration.Registration.LName=_.LastName),_.ProfileId>0&&(this.allowSelectiveProfileAssignment||!_.OrgInd)?this.registration.Registration.Email=_.Email:_.ProfileId==0&&(this.registration.Registration.Email=this._regProfileEmail))},this.onOrgNameChange=_=>{if(this.registration.Registration.OrgName==""){this.profileOrgDupChecker&&this.profileOrgDupChecker.hide();return}this.registration.Registration.ProfileId<=0&&this.registration.Registration.CreateProfile==!0&&this.profileOrgDupChecker.getPossibleDuplicates(this.registration.Registration.OrgName).then(B=>{this.profileOrgDupChecker&&(B.length>0?this.profileOrgDupChecker.show():this.profileOrgDupChecker.hide())})},this.onLastNameChange=()=>{if(this.registration.Registration.LName==""){this.profileIndDupChecker&&this.profileIndDupChecker.hide();return}if(this.registration.Registration.ProfileId<=0&&this.registration.Registration.CreateProfile==!0&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.OrgName)){let _=this.registration.Registration.LName;this._utilService.isNotNullEmptyOrWhitespace(this.registration.Registration.FName)&&(_=this.registration.Registration.FName+" "+this.registration.Registration.LName),this.profileIndDupChecker.getPossibleDuplicates(_).then(B=>{B.length>0?this.profileIndDupChecker.show():this.profileIndDupChecker.hide()})}},this.onDupCheckerOrgNameProfileSelected=_=>{this.registrationProfileChanged(_)},this.onDupCheckerIndNameProfileSelected=_=>{this.registrationProfileChanged(_)},this.displayField=_=>_==1||_==3,this.requiredField=_=>_==1||_==3,this.verifyAllRequiredFieldsAreSet=()=>{let _=!0;return this.requiredFieldsNotPopulated=new Array,this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Address1)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.address1"))),this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.City)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.city"))),this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.State)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.state"))),this.displayField(this.event.RegAddressVisible)&&this.requiredField(this.event.RegAddressRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Zip)&&
2(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.zip"))),this.displayField(this.event.RegCompanyNameVisible)&&this.requiredField(this.event.RegCompanyNameRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.OrgName)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.organization-name"))),this.displayField(this.event.RegEmailVisible)&&this.requiredField(this.event.RegEmailRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Email)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.email"))),this.displayField(this.event.RegFNameVisible)&&this.requiredField(this.event.RegFNameRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.FName)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.first-name"))),this.displayField(this.event.RegLNameVisible)&&this.requiredField(this.event.RegLNameRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.LName)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.last-name"))),this.displayField(this.event.RegPhoneVisible)&&this.requiredField(this.event.RegPhoneRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Phone)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.phone"))),this.displayField(this.event.RegTitleVisible)&&this.requiredField(this.event.RegTitleRequired)&&this._utilService.isNullEmptyOrWhitespace(this.registration.Registration.Title)&&(_=!1,this.requiredFieldsNotPopulated.push(this._translationService.getInstant("common.personal-information.title"))),_},this._utilService=a,this._translationService=i,this._registrationService=e,this._configSettingService=P,this._userService=b,this.onRegistrationProfileChanged=new U,this.registrationId=0,this.initialLoadComplete=!1,this.allowSelectiveProfileAssignment=!1,this.isLoggedIn=!1,this.requiredFieldsNotPopulated=new Array,this.userInfo=new Je,this.isLoggedIn=!1,this.currentUserProfile=new et,this._regProfileEmail=""}ngOnInit(){}cancel(){this.onCancel.emit(!0)}incrementStepper(){this.onIncrementStepper.emit(!0)}};p.\u0275fac=function(i){return new(i||p)(x($),x(J),x(K),x(Ve),x(ee),x(tt))},p.\u0275cmp=ie({type:p,selectors:[["wl-event-v4-registration-wizard-contact"]],viewQuery:function(i,e){if(i&1&&(j(ln,5),j(dn,5),j(pn,5)),i&2){let c;H(c=G())&&(e.profileOrgDupChecker=c.first),H(c=G())&&(e.profileIndDupChecker=c.first),H(c=G())&&(e.contactForm=c.first)}},outputs:{onRegistrationProfileChanged:"onRegistrationProfileChanged",onCancel:"onCancel",onIncrementStepper:"onIncrementStepper"},standalone:!1,decls:27,vars:21,consts:[["contactForm","ngForm"],["regState",""],["fxLayout","column","fxLayoutGap","27px"],[4,"ngIf"],["class","form-group",4,"ngIf"],["gdColumns.gt-sm","1fr 1fr","gdColumns.lt-md","1fr","gdGap","27px"],["gdColumns.gt-sm","3fr 1fr","gdColumns.lt-md","1fr","gdGap","27px"],["fxLayout","row","fxLayoutAlign","end"],[1,"atlas-btn","atlas-btn-secondary","mr-12",3,"click"],[1,"atlas-btn","atlas-btn-primary",3,"click","disabled"],["for","registrationContactOrgName"],["class","text-danger",4,"ngIf"],["type","text","id","registrationContactOrgName","name","registrationContactOrgName","wlTrimInput","",1,"form-control",3,"ngModelChange","blur","ngModel","required"],[1,"text-danger"],["id","profile-related-lookup-label","for","profileRelatedLookup"],["name","profileRelatedLookup",3,"ngModelChange","onProfileChanged","ngModel","relatedProfileId","disabled"],[1,"form-group"],["for","registrationPrefix"],["type","text","id","registrationPrefix","name","registrationPrefix",1,"form-control",3,"ngModelChange","required","ngModel"],["for","registrationFirstName"],["type","text","id","registrationFirstName","name","registrationFirstName","wlTrimInput","",1,"form-control",3,"ngModelChange","required","ngModel"],["for","registrationLastName"],["type","text","id","registrationLastName","name","registrationLastName","wlTrimInput","",1,"form-control",3,"ngModelChange","blur","required","ngModel"],[3,"ngModelChange","label","required","disabled","name","id","ngModel"],["for","registrationTitle"],["type","text","id","registrationTitle","name","registrationTitle",1,"form-control",3,"ngModelChange","required","ngModel"],["gdColumns.gt-sm","1fr 1fr","gdColumns.lt-md","1fr","gdGap","27px",1,"mb-27"],["for","registrationAddress1"],["type","text","id","registrationAddress1","name","registrationAddress1",1,"form-control",3,"ngModelChange","required","ngModel"],["for","registrationAddress2"],["type","text","id","registrationAddress2","name","registrationAddress2",1,"form-control",3,"ngModelChange","ngModel"],["gdColumns.gt-sm","1fr 1fr 1fr","gdColumns.lt-md","1fr","gdGap","27px"],["for","registrationCity"],["type","text","id","registrationCity","name","registrationCity",1,"form-control",3,"ngModelChange","required","ngModel"],["for","registrationState"],["name","state","id","registrationState",3,"ngModelChange","skipPreSelect","ngModel","required"],["for","registrationZip"],["type","text","id","registrationZip","name","registrationZip",1,"form-control",3,"ngModelChange","required","ngModel"],["for","registrationCountry"],["name","country","id","registrationCountry",3,"ngModelChange","ngModel"],["for","registrationPhone"],["type","text","id","registrationPhone","name","registrationPhone",1,"form-control",3,"ngModelChange","required","ngModel"]],template:function(i,e){if(i&1){let c=O();o(0,"form",null,0)(2,"div",2),V(3,cn,7,8,"div",3)(4,gn,7,9,"div",3),o(5,"div"),V(6,fn,8,8,"div",4),l(),o(7,"div",5)(8,"div"),V(9,vn,7,8,"div",3),l(),V(10,yn,8,8,"div",3),l(),o(11,"div",6),V(12,Cn,4,10,"div",3)(13,Sn,8,8,"div",3),l(),V(14,xn,39,42,"div",3),o(15,"div",5),V(16,bn,8,9,"div",3)(17,Vn,8,8,"div",4),l(),o(18,"div",7)(19,"button",8),T("click",function(){return I(c),S(e.cancel())}),h(20),s(21,"translate"),s(22,"uppercase"),l(),o(23,"button",9),T("click",function(){return I(c),S(e.incrementStepper())}),h(24),s(25,"translate"),s(26,"uppercase"),l()()()()}if(i&2){let c=ae(1);n(3),m("ngIf",e.event.RegCompanyNameVisible==1||e.event.RegCompanyNameVisible==3),n(),m("ngIf",e.currentUserProfile.OrgInd&&e.isLoggedIn),n(2),m("ngIf",e.event.RegPrefixVisible==1||e.event.RegPrefixVisible==3),n(3),m("ngIf",e.event.RegFNameVisible==1||e.event.RegFNameVisible==3),n(),m("ngIf",e.event.RegLNameVisible==1||e.event.RegLNameVisible==3),n(2),m("ngIf",e.event.RegEmailVisible==1||e.event.RegEmailVisible==3),n(),m("ngIf",e.event.RegTitleVisible==1||e.event.RegTitleVisible==3),n(),m("ngIf",e.event.RegAddressVisible==1||e.event.RegAddressVisible==3),n(2),m("ngIf",e.event.RegAddressVisible==1||e.event.RegAddressVisible==3),n(),m("ngIf",e.event.RegPhoneVisible==1||e.event.RegPhoneVisible==3),n(3),R(" ",d(22,15,d(21,13,"common.cancel"))," "),n(3),m("disabled",!c.valid),n(),R(" ",d(26,19,d(25,17,"events.registration.wizard.contact.continue-items"))," ")}},dependencies:[mi,ci,_i,Si,ui,le,Se,Te,Be,Ce,$t,Fe,Ie,me,Me,pe,We,hi,ye,de,re],encapsulation:2});let r=p;return r})();var we=r=>({"disabled-price":r}),zn=r=>({memberSavings:r}),Fn=(r,p)=>[r,p],Li=r=>({attendeeCount:r});function Wn(r,p){if(r&1&&(o(0,"div")(1,"h5",2),h(2),s(3,"translate"),s(4,"titlecase"),l()()),r&2){let t=u();n(),m("ngClass",ne(6,we,!t.userHasMemberPriceAccess)),n(),R(" ",d(4,4,d(3,2,"events.registration.wizard.items.member-price-label"))," ")}}function Nn(r,p){if(r&1&&(o(0,"div"),Z(1,"i",30),h(2),s(3,"translate"),s(4,"ucfirst"),l()),r&2){let t=u(2).$implicit;n(2),R(" ",d(4,4,_e(3,1,"events.registration.wizard.items.includes-attendee-label",ne(6,Li,t.AttendeesForItem)))," ")}}function On(r,p){if(r&1&&(o(0,"div",2),h(1),s(2,"currency"),s(3,"translate"),s(4,"uppercase"),l()),r&2){let t=u(2).$implicit,a=u();m("ngClass",ne(8,we,!a.userHasMemberPriceAccess||a.invoicesOverDue)),n(),R(" ",t.MemberPrice>0?d(2,2,t.MemberPrice):d(4,6,d(3,4,"common.free"))," ")}}
2function Dn(r,p){if(r&1){let t=O();o(0,"button",31),T("click",function(){I(t);let i=u(2).$implicit,e=u();return S(e.incrementQuantity(i))}),h(1," + "),l()}if(r&2){let t=u(2).$implicit,a=u();m("disabled",a.isItemSoldOut(t))}}function Ln(r,p){r&1&&(o(0,"span"),h(1),s(2,"translate"),s(3,"uppercase"),l()),r&2&&(n(),R(" ",d(3,3,d(2,1,"events.registration.wizard.attendees.item-sold-out-label"))," "))}function kn(r,p){if(r&1){let t=O();o(0,"div")(1,"button",32),T("click",function(){I(t);let i=u(2).$implicit,e=u();return S(e.decrementQuantity(i))}),h(2,"-"),l(),o(3,"span",33),h(4),l(),o(5,"button",34),T("click",function(){I(t);let i=u(2).$implicit,e=u();return S(e.incrementQuantity(i))}),h(6," + "),l()()}if(r&2){let t=u(2).$implicit,a=u();n(4),N(t.Quantity),n(),m("disabled",a.isIncrementDisabled(t))}}function qn(r,p){if(r&1&&(o(0,"div",21)(1,"div",22)(2,"div",23),h(3),o(4,"span",7),h(5),s(6,"number"),s(7,"translate"),l()(),Z(8,"div",24),V(9,Nn,5,8,"div",1),l(),V(10,On,5,10,"div",25),o(11,"div",2),h(12),s(13,"currency"),s(14,"translate"),s(15,"uppercase"),l(),o(16,"div",26),h(17),s(18,"currency"),l(),o(19,"div",27),V(20,Dn,2,1,"button",28)(21,Ln,4,5,"span",1)(22,kn,7,2,"div",1),l(),o(23,"div",29)(24,"span",7),h(25),s(26,"translate"),s(27,"titlecase"),l(),o(28,"span",7),h(29),s(30,"translate"),s(31,"titlecase"),l()()()),r&2){let t=u().$implicit,a=u();n(3),R(" ",t.Descr," "),n(),m("hidden",t.MaxItemsAvail==0||a.isItemSoldOut(t)),n(),ge("(",_e(6,19,t.Remaining-t.Quantity,"1.0-0")," ",d(7,22,"common.available"),")"),n(3),m("innerHTML",t.LongDescription,wt),n(),m("ngIf",t.AttendeesForItem>1),n(),m("ngIf",a.hasMemberPricing),n(),m("ngClass",ne(40,we,a.userHasMemberPriceAccess&&a.hasMemberPricing)),n(),R(" ",t.NonMemberPrice>0?d(13,24,t.NonMemberPrice):d(15,28,d(14,26,"common.free"))," "),n(5),N(t.Quantity==0?"-":d(18,30,t.DisplayPrice)),n(2),m("hidden",a.userIsRestrictedFromChoosingItem(t)),n(),m("ngIf",t.Quantity==0&&!a.isItemSoldOut(t)),n(),m("ngIf",a.isItemSoldOut(t)),n(),m("ngIf",t.Quantity>0),n(),m("hidden",!a.userIsRestrictedFromChoosingItem(t)),n(),m("hidden",a.currentUserProfile.ProfileId>0),n(),R(" ",t.TeaserMessage?t.TeaserMessage:d(27,34,d(26,32,"events.registration.wizard.items.log-in-to-register"))," "),n(3),m("hidden",a.currentUserProfile.ProfileId==0),n(),R(" ",t.RestrictedMessage?t.RestrictedMessage:d(31,38,d(30,36,"events.registration.wizard.items.access-restricted"))," ")}}function Qn(r,p){if(r&1&&(o(0,"div",19),V(1,qn,32,42,"div",20),Z(2,"hr"),l()),r&2){let t=p.$implicit,a=u();n(),m("ngIf",!a.userIsRestrictedFromViewingItem(t))}}function Un(r,p){if(r&1&&(o(0,"div",45),Z(1,"i",30),h(2),s(3,"translate"),s(4,"ucfirst"),l()),r&2){let t=u().$implicit;n(2),R(" ",d(4,4,_e(3,1,"events.registration.wizard.items.includes-attendee-label",ne(6,Li,t.AttendeesForItem)))," ")}}function jn(r,p){if(r&1&&(o(0,"div")(1,"span",46),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"div",46),h(6),s(7,"currency"),s(8,"translate"),s(9,"uppercase"),l()()),r&2){let t=u().$implicit,a=u();n(),m("ngClass",ne(14,we,!a.userHasMemberPriceAccess)),n(),N(d(4,6,d(3,4,"events.registration.wizard.items.member-price-label"))),n(3),m("ngClass",ne(16,we,!a.userHasMemberPriceAccess)),n(),R(" ",t.MemberPrice>0?d(7,8,t.MemberPrice):d(9,12,d(8,10,"common.free"))," ")}}function Hn(r,p){r&1&&(o(0,"span"),h(1),s(2,"translate"),s(3,"uppercase"),l()),r&2&&(n(),R(" ",d(3,3,d(2,1,"events.registration.wizard.attendees.item-sold-out-label"))," "))}function Gn(r,p){if(r&1){let t=O();o(0,"div",35)(1,"div",36)(2,"div")(3,"label",37),h(4),o(5,"span",7),h(6),s(7,"number"),s(8,"translate"),l()(),o(9,"div",38),h(10),l(),V(11,Un,5,8,"div",39),l()(),o(12,"div",40)(13,"div"),V(14,jn,10,18,"div",1),o(15,"input",41),T("change",function(){I(t);let i=u();return S(i.quantityChanged())}),k("ngModelChange",function(i){let e=I(t).$implicit;return L(e.Quantity,i)||(e.Quantity=i),S(i)}),l(),V(16,Hn,4,5,"span",1),o(17,"div",7)(18,"span",7),h(19),s(20,"translate"),s(21,"titlecase"),l(),o(22,"span",7),h(23),s(24,"translate"),s(25,"titlecase"),l()()(),o(26,"div")(27,"div")(28,"div",42),h(29),s(30,"translate"),s(31,"titlecase"),l(),o(32,"div",42),h(33),s(34,"currency"),s(35,"translate"),s(36,"uppercase"),l(),o(37,"div",43),h(38),s(39,"translate"),s(40,"titlecase"),l(),o(41,"div",44),h(42),s(43,"currency"),l(
2)()()(),Z(44,"hr"),l()}if(r&2){let t=p.$implicit,a=u();n(3),m("for","quantity-"+t.ItemNum),n(),R("",t.Descr," "),n(),m("hidden",t.MaxItemsAvail==0||a.isItemSoldOut(t)),n(),ge("(",_e(7,25,t.Remaining-t.Quantity,"1.0-0")," ",d(8,28,"common.available"),")"),n(4),N(t.LongDescription),n(),m("ngIf",t.AttendeesForItem>1),n(3),m("ngIf",a.hasMemberPricing),n(),m("name",t.EventItemId)("hidden",a.userIsRestrictedFromChoosingItem(t)||a.isItemSoldOut(t)),D("ngModel",t.Quantity),m("max",t.MaxItemsAvail>0?t.Remaining:null)("id","quantity-"+t.ItemNum),n(),m("ngIf",a.isItemSoldOut(t)),n(),m("hidden",!a.userIsRestrictedFromChoosingItem(t)),n(),m("hidden",a.currentUserProfile.ProfileId>0),n(),R(" ",t.TeaserMessage?t.TeaserMessage:d(21,32,d(20,30,"events.registration.wizard.items.log-in-to-register"))," "),n(3),m("hidden",a.currentUserProfile.ProfileId==0),n(),R(" ",t.RestrictedMessage?t.RestrictedMessage:d(25,36,d(24,34,"events.registration.wizard.items.access-restricted"))," "),n(5),m("ngClass",ne(54,we,a.userHasMemberPriceAccess&&a.hasMemberPricing)),n(),R(" ",d(31,40,d(30,38,"events.registration.wizard.items.price-label"))," "),n(3),m("ngClass",ne(56,we,a.userHasMemberPriceAccess&&a.hasMemberPricing)),n(),R(" ",t.NonMemberPrice>0?d(34,42,t.NonMemberPrice):d(36,46,d(35,44,"common.free"))," "),n(5),R(" ",d(40,50,d(39,48,"events.registration.wizard.items.total-label"))," "),n(4),N(d(43,52,t.DisplayPrice))}}var ki=(()=>{let p=class p{get registration(){return this._registration}set registration(a){this._registration=a,this.updateSelectedItemQuantityTracking()}constructor(a,i,e,c,P,b,_,B,v,w,A,F,f,E){this._identityProviderService=A,this._profileContextService=F,this._navigationService=f,this._financialService=E,this.event=new X,this.initialLoadComplete=!1,this.hasMemberPricing=!1,this.memberSavings=0,this.onCancel=new U,this.onIncrementStepper=new U,this.onDecrementStepper=new U,this._registration=new Y,this._eventFieldVisibleRequiredEnum=Ne,this._selectedEventItemIds=[],this.allPossibleCustomFields=[],this.signUpOrAttendeeType=1,this.isMember=!1,this.hasSelectedItems=!1,this.invoicesOverDue=!1,this.userHasMemberPriceAccess=!1,this.loadData=()=>{let g=[],y=[],C=[];return g.push(this._eventCustomRegFieldService.getEventCustomRegFields(this.event.EventId).then(z=>{for(let M of z.Result)M.StaffOnly||this.allPossibleCustomFields.push(M);this.allPossibleCustomFields=this.allPossibleCustomFields.sort((M,Q)=>M.DisplayOrder<Q.DisplayOrder?-1:M.DisplayOrder>Q.DisplayOrder?1:0)})),g.push(this._userService.getCurrentUserProfileExtended().then(z=>{if(z.ProfileId>0){this.isLoggedIn=!0,this.currentUserProfile=z,this.isMember=this.userIsMemberOrRelatedToMember();for(var M of this.currentUserProfile.RelatedProfiles)M.Member&&(this.registration.Registration.IsRelatedToMember=!0);this._changeDetector.detectChanges(),this.checkForOverDueDuesInvoices(z.ProfileId)}})),this.event.EventId&&this.registration.IsEdit&&(g.push(this._registrationService.getRegistrationCustomFieldResponses(this.registrationId).then(z=>{y=z})),g.push(this._registrationService.getRegistrationItemsMin(this.registrationId).then(z=>{C=z}))),Promise.all(g).then(()=>{if(!this.event.EventId)return;this.registration.Items=new Array,this.originalItems=new Array;let z=this._utilService.getDateWithoutTime(new Date);for(let M of this.event.Items)if(M.IsPublic&&this._utilService.getDateWithoutTime(M.StartDate)<=z&&this._utilService.getDateWithoutTime(M.EndDate)>=z){let Q=new Qe;this._utilService.map(M,Q),Q.Selected=!1;for(let W of C)W.EventItemId==M.EventItemId&&this._utilService.mapSafe(W,Q);
2this.registration.Items.push(Q);let q=new Qe;this._utilService.mapSafe(Q,q),this.originalItems.push(q)}if(this.hasMemberPricing=this.registration.Items.findIndex(M=>M.HasMemberPricing)!=-1,this.updateSelectedItemQuantityTracking(),this.registration.IsEdit){let M=new Array;for(let Q of y)(Q.CustomField.Visible==Ne.RegistrationOnly||Q.CustomField.Visible==Ne.BothRegistrationAndAttendee)&&(Q.AttendeeHeaderId==null||Q.AttendeeHeaderId<=0)&&M.push(Q);this.registration.Registration.EventCustomRegFieldResponses=M}return this.onRegistrationItemsChanged.emit(this.registration.Items),this.getItemTotals(),this.initialLoadComplete=!0,this.registration.Items})},this.getValidationResult=()=>{let g=new te;g.isValid=!0;let y=this.registration.Items.filter(C=>C.Quantity>0);if(y.length<=0&&(g.isValid=!1,g.errors.push(this._translationService.getInstantCapitalizeFirstCharacter("events.registration.wizard.items.no-item-selected-validation-message"))),y.find(C=>C.LimitPerRegistration>0&&C.Quantity>C.LimitPerRegistration)&&(g.isValid=!1,g.errors.push(this._translationService.getInstantCapitalizeFirstCharacter("events.registration.wizard.items.item-quantity-greater-than-limit"))),y.find(C=>C.MaxItemsAvail>0&&C.Quantity>C.Remaining)&&(g.isValid=!1,g.errors.push(this._translationService.getInstantCapitalizeFirstCharacter("events.registration.wizard.items.item-quantity-greater-than-remaining"))),this.registration.Registration.EventCustomRegFieldResponses)for(let C of this.registration.Registration.EventCustomRegFieldResponses)(C.CustomField.Required==1||C.CustomField.Required==3)&&this._utilService.isNotNullOrUndefined(C.Response)&&this._utilService.isNullEmptyOrWhitespace(C.Response)&&(g.isValid=!1,g.errors.push(C.CustomField.FieldName+" "+this._translationService.getInstant("common.required")));return g},this.getMaxItemInput=g=>{let y=g.LimitPerRegistration?g.LimitPerRegistration:999999999;return g.MaxItemsAvail>0&&(y=Math.min(y,g.Remaining)),y},this.quantityChanged=()=>{this.updateSelectedItemQuantityTracking(),setTimeout(()=>this.getItemTotals())},this.hasCustomRegFields=g=>this.registration.Registration.EventCustomRegFieldResponses&&this.registration.Registration.EventCustomRegFieldResponses.some(y=>(y.CustomField.Visible==Ne.RegistrationOnly||y.CustomField.Visible==Ne.BothRegistrationAndAttendee)&&y.CustomField.EventItemIds&&y.CustomField.EventItemIds.some(C=>C==g)),this.showCustomFields=()=>this.registration.Registration.EventCustomRegFieldResponses.length>0,this.onResponseChange=g=>{this.getItemTotals()},this.checkIfItemsHaveChanged=()=>{if(this.registration.ItemsChanged=!1,this.registration.ItemsChanged==!1&&this.registration.IsEdit){let g=0;for(let y of this.registration.Items)this.originalItems[g].EventItemId==y.EventItemId&&(this.originalItems[g].Quantity!=y.Quantity||this.originalItems[g].ExtendedPrice!=y.ExtendedPrice)&&(this.registration.ItemsChanged=!0),g=g+1}},this.userHasRequiredAffCode=g=>{let y=!1;if(this.isLoggedIn){for(let C of g)for(let z of this.currentUserProfile.Affiliations)if(this._utilService.toLowerTrim(z.AffCode)==this._utilService.toLowerTrim(C))return y=!0,y}return y},this.userIsMemberOrRelatedToMember=()=>{let g=!1;if(this.isLoggedIn){if(this.currentUserProfile.Member)g=!0,this.memberProfileId=this.currentUserProfile.ProfileId;else for(let y of this.currentUserProfile.RelatedProfiles)if(y.Member&&y.PrimaryRelation){g=!0,this.memberProfileId=y.ProfileId;break}}return g},this.userIsRestrictedFromChoosingItem=g=>{let y=!1;if(g.MembersOnly&&(g.AllowRelateProfileMemberPrice?y=!this.userIsMemberOrRelatedToMember():y=!this.currentUserProfile.Member,this.event.LimitOverdueMembers&&!this.checkForMemberPricingAccess()&&(y=!0)),g.RestrictForAffiliations){y=!0;for(let C of this.currentUserProfile.Affiliations)for(let z of g.AffiliationRestrictions)if(this._utilService.toLowerTrim(z)==this._utilService.toLowerTrim(C.AffCode)){y=!1;break}}return y},this.getRestrictedItemMessageOrDefault=g=>g.RestrictForAffiliations||g.MembersOnly?this._utilService.isNotNullEmptyOrWhitespace(g.RestrictedMessage)?g.RestrictedMessage:this._translationService.getInstant("events.registration.wizard.items.logged-in-but-item-restricted-message"):"",this.getTeaserMessageOrDefault=g=>
2g.RestrictForAffiliations||g.MembersOnly?this._utilService.isNotNullEmptyOrWhitespace(g.TeaserMessage)?g.TeaserMessage:this._translationService.getInstant("events.registration.wizard.items.log-in-above-message"):"",this.userIsRestrictedFromViewingItem=g=>{let y=!1;return this.userIsRestrictedFromChoosingItem(g)&&g.ShowForEligibleUsersOnly==!0&&(y=!0),y},this._utilService=a,this._eventItemService=i,this._translationService=e,this._eventCustomRegFieldService=c,this._registrationService=P,this._configSettingService=b,this._affCodeService=_,this._profileService=B,this._userService=w,this.availableItems=new Array,this.onRegistrationItemsChanged=new U,this.itemTotal=0,this.registrationId=0,this.originalItems=new Array,this.isLoggedIn=!1,this.currentUserProfile=new et,this._changeDetector=v}ngOnInit(){this._profileContextService.getProfilePortalList$().subscribe(a=>{this.portalProfileList=a})}getItemTotals(){this.registration.Items.forEach(i=>i.Quantity=Math.round(i.Quantity));let a=this.registration.Items.filter(i=>i.Quantity>0);this.onRegistrationItemsChanged.emit(a),setTimeout(()=>{this.itemTotal=0;let i=0;this._registrationService.calculateTotals(this.registration),this.checkIfItemsHaveChanged(),this.itemTotal=this.registration.Registration.PreTaxAmount,this.hasMemberPricing&&this.userHasMemberPriceAccess==!1&&this.calculateMemberSavings()})}updateSelectedItemQuantityTracking(){let a=this.registration&&this.registration.Items?this.registration.Items:[];this._selectedEventItemIds=a.filter(i=>i.Quantity>0).map(i=>i.EventItemId),this.hasSelectedItems=this._selectedEventItemIds.length>0}calculateMemberSavings(){let a=0;this.registration.Items.filter(i=>i.Quantity>0).forEach(i=>{a+=i.Quantity*i.MemberPrice}),this.memberSavings=this.registration.Registration.PreTaxPreDiscountAmount-a}isItemSoldOut(a){return a.MaxItemsAvail>0&&Math.round(a.Remaining)<1}isIncrementDisabled(a){return a.MaxItemsAvail>0&&Math.round(a.Remaining-a.Quantity)<1||a.LimitPerRegistration>0&&a.Quantity>=a.LimitPerRegistration}incrementQuantity(a){a.Quantity++,this.quantityChanged()}decrementQuantity(a){a.Quantity--,this.quantityChanged()}cancel(){this.onCancel.emit(!0)}incrementStepper(){this.onIncrementStepper.emit(!0)}decrementStepper(){this.onDecrementStepper.emit(!0)}login(){this._identityProviderService.initialize(),this._identityProviderService.authorizeCodeFlowRequestCode(window.location.href)}navigateToOnlineBillPay(){this._navigationService.navigateToOpenInvoices()}checkForOverDueDuesInvoices(a){this.event.LimitOverdueMembers&&this.isMember?this._financialService.GetPrimaryRelationsDuesInvoiceDueDates(a).then(i=>{if(i&&i.length>0){for(let e of i)if(e.Member&&!e.HasOpenDuesInvoice){this.invoicesOverDue=!1;break}else if(e.Member&&e.HasOpenDuesInvoice){let c=this._utilService.calculateDaysBetween(e.MaxInvoiceDueDate);if(this.invoicesOverDue=c>this.event.OverdueInvoiceOffset,!this.invoicesOverDue)break}}this.registration.Registration.DuesInvoiceOverDue=this.invoicesOverDue,this.userHasMemberPriceAccess=this.checkForMemberPricingAccess(),this.registration.Registration.UserHasMemberPriceAccess=this.userHasMemberPriceAccess}):(this.userHasMemberPriceAccess=this.checkForMemberPricingAccess(),this.registration.Registration.UserHasMemberPriceAccess=this.userHasMemberPriceAccess)}checkForMemberPricingAccess(){return this.isMember&&!this.invoicesOverDue}};p.\u0275fac=function(i){return new(i||p)(x($),x(ce),x(J),x(Re),x(K),x(ee),x(ot),x(Ve),x(Ze),x(tt),x($e),x(Qt),x(rt),x(oi))},p.\u0275cmp=ie({type:p,selectors:[["wl-event-v4-registration-wizard-items"]],outputs:{onRegistrationItemsChanged:"onRegistrationItemsChanged",onCancel:"onCancel",onIncrementStepper:"onIncrementStepper",onDecrementStepper:"onDecrementStepper"},standalone:!1,features:[ve([ce,Re,K,ot])],decls:59,vars:75,consts:[["fxHide","","fxShow.gt-sm","","gdColumns","3fr 1fr 1fr 1fr 1fr"],[4,"ngIf"],[2,"text-align","right",3,"ngClass"],[1,"mv-0",2,"text-align","right"],["fxShow","","fxHide.lt-sm","",4,"ngFor","ngForOf"],["fxHide","","fxShow.lt-sm","",4,"ngFor","ngForOf"],["gdColumns","5fr 1fr"],[3,"hidden"],[3,"click"],["fxLayout.lt-sm","column"],[1,"f-wb","t-ar"],[1,"ml-27","t-ar"],["fxLayout.gt-sm","row","fxLayout.lt-sm","column","fxLayoutAlign","space-between",1,"mt-27","mobile-margin"],[3,"responseChange","customFields","responses","visibilityFilter","eventItemIds","signUpOrAttendeeType"],["fxLayout.gt-sm","row","fxLayout.lt-sm","column","fxLayoutAlign","end",1,"mt-27","mobile-margin"],["fxLayoutGap.lt-sm","3px","fxLayoutGap.gt-sm","12px"],[1,"cancel","f-wb","mv-5",3,"click"],[1,"atlas-btn","atlas-btn-secondary",3,"click"],[1,"atlas-btn","atlas-btn-primary",3,"click","disabled"],["fxShow","","fxHide.lt-sm",""],["gdColumns","3fr 1fr 1fr 1fr 1fr","class","mb-27",4,"ngIf"],["gdColumns","3fr 1fr 1fr 1fr 1fr",1,"mb-27"],["fxLayout","column"],[1,"mb-7"],[1,"light-text","mb-7","f-12",3,"innerHTML"],["style","text-align: right",3,"ngClass",4,"ngIf"],[2,"text-align","right"],["fxLayoutAlign","center center",3,"hidden"],["class","atlas-btn quantity-button w-50","style","height: 50px",3,"disabled","click",4,"ngIf"],[1,"t-ac",3,"hidden"],[1,"pi","pi-user","mr-3"],[1,"atlas-btn","quantity-button","w-50",2,"height","50px",3,"click","disabled"],[1,"atlas-btn","quantity-button",2,"height","50px","width","30px",3,"click"],[1,"mh-15"],[1,"atlas-btn","quantity-button",2,"height","50px","width","30px",3,"click","disabled"],["fxHide","","fxShow.lt-sm",""],["gdColumns","1fr"],[1,"mb-7",3,"for"],[1,"light-text","mb-7"],["class","mv-10",4,"ngIf"],["gdColumns","1fr 1fr"],["type","number","min","0",1,"form-control","mt-15",3,"change","ngModelChange","name","hidden","ngModel","max","id"],[1,"t-ar",3,"ngClass"],[1,"f-wb","t-ar","mt-10"],[1,"t-ar"],[1,"mv-10"],[3,"ngClass"]],template:function(i,e){i&1&&(o(0,"div",0)(1,"h5"),h(2),s(3,"translate"),s(4,"titlecase"),l(),V(5,Wn,5,8,"div",1),o(6,"div")(7,"h5",2),h(8),s(9,"translate"),s(10,"titlecase"),l()(),o(11,"h5",3),h(12),s(13,"translate"),s(14,"titlecase"),l(),Z(15,"div"),l(),V(16,Qn,3,1,"div",4)(17,Gn,45,58,"div",5),o(18,"div",6)(19,"div")(20,"span",7),h(21),s(22,"currency"),s(23,"translate"),s(24,"ucfirst"),o(25,"a",8),T("click",function(){return e.login()}),h(26),s(27,"translate"),l()(),o(28,"span",7)(29,"a",8),T("click",function(){return e.navigateToOnlineBillPay()}),h(30),s(31,"translate"),l()()(),o(32,"div",9)(33,"span",10),h(34),s(35,"translate"),s(36,"titlecase"),l(),o(37,"span",11),h(38),s(39,"currency"),l(
2)()(),Z(40,"hr"),o(41,"div",12)(42,"wl-event-v4-registration-custom-reg-fields",13),T("responseChange",function(P){return e.onResponseChange(P)}),l()(),o(43,"div",14)(44,"div",15)(45,"a",16),T("click",function(){return e.cancel()}),h(46),s(47,"translate"),s(48,"uppercase"),l(),o(49,"button",17),T("click",function(){return e.decrementStepper()}),h(50),s(51,"translate"),s(52,"uppercase"),l(),o(53,"button",18),T("click",function(){return e.incrementStepper()}),h(54),s(55,"translate"),s(56,"uppercase"),s(57,"translate"),s(58,"uppercase"),l()()()),i&2&&(n(2),N(d(4,25,d(3,23,"events.registration.wizard.items.item-label"))),n(3),m("ngIf",e.hasMemberPricing),n(2),m("ngClass",ne(68,we,e.userHasMemberPriceAccess&&e.hasMemberPricing)),n(),R(" ",d(10,29,d(9,27,"events.registration.wizard.items.price-label"))," "),n(4),N(d(14,33,d(13,31,"events.registration.wizard.items.total-label"))),n(4),m("ngForOf",e.registration.Items),n(),m("ngForOf",e.registration.Items),n(3),m("hidden",e.memberSavings==0||e.invoicesOverDue),n(),R("",d(24,40,_e(23,37,"events.registration.wizard.items.members-save-message-label",ne(70,zn,d(22,35,e.memberSavings))))," - "),n(5),N(d(27,42,"common.login")),n(2),m("hidden",!e.invoicesOverDue),n(2),N(d(31,44,"events.registration.wizard.items.overdue-invoice-access-message-label")),n(4),N(d(36,48,d(35,46,"events.registration.wizard.items.total-label"))),n(4),N(d(39,50,e.registration.Registration.PreTaxPreDiscountAmount)),n(4),m("customFields",e.allPossibleCustomFields)("responses",e.registration.Registration.EventCustomRegFieldResponses)("visibilityFilter",bt(72,Fn,e._eventFieldVisibleRequiredEnum.RegistrationOnly,e._eventFieldVisibleRequiredEnum.BothRegistrationAndAttendee))("eventItemIds",e._selectedEventItemIds)("signUpOrAttendeeType",e.signUpOrAttendeeType),n(4),R(" ",d(48,54,d(47,52,"common.cancel"))," "),n(4),R(" ",d(52,58,d(51,56,"common.back"))," "),n(3),m("disabled",!e.hasSelectedItems),n(),R(" ",e.registration.Attendees.length==0?d(56,62,d(55,60,"events.registration.wizard.attendees.continue-to-payment-label")):d(58,66,d(57,64,"events.registration.wizard.items.continue-to-attendees-label"))," "))},dependencies:[Ri,At,se,le,Te,at,Be,Xt,Jt,Fe,me,Me,pe,jt,Ut,We,zt,ye,Mt,de,Ke,re],styles:["@media only screen and (min-width:768px)and (max-width:989px){.break[_ngcontent-%COMP%]{word-break:break-word}}.limit-warning[_ngcontent-%COMP%]{font-size:.85em;color:#a94442;margin:0}.disabled-price[_ngcontent-%COMP%]{text-decoration:line-through;color:#ccc}.cancel[_ngcontent-%COMP%]{color:var(--primary-brand-color)}@media screen and (max-width:440px){.mobile-margin[_ngcontent-%COMP%]{margin-top:0!important}}.quantity-button[_ngcontent-%COMP%]{background-color:transparent;border-style:solid!important;border-color:var(--hyperlink-brand-color)!important;color:var(--hyperlink-brand-color)!important}.quantity-button[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{background-color:transparent;border-style:solid!important;border-color:var(--hyperlink-brand-color)!important;color:var(--hyperlink-brand-color)}"]});let r=p;return r})();var Le=(()=>{let p=class p{constructor(a){this._eventApiService=a,this._eventServiceBaseUrl="/event/v2/promocode/",this.getEventPromoCodes=i=>{let e=`${this._eventServiceBaseUrl}event/${i.toString()}/promo-codes`;return this._eventApiService.get(e)},this.getEventPromoCode=i=>{let e=this._eventApiService+i.toString();return this._eventApiService.get(e)}}};p.\u0275fac=function(i){return new(i||p)(ke(nt))},p.\u0275prov=Ge({token:p,factory:p.\u0275fac});let r=p;return r})();var be=class{constructor(){this.ProfileBenefitId=0,this.EventBenefitId=0,this.BenefitTypeId=0,this.BenefitType="",this.QuantityToApply=0,this.ValueToApply=0,this.ProfileId=0,this.LimitType=0,this.RegistrationId=0,this.LimitAmount=0,this.EventPriceId=0}};var ft=(()=>{let p=class p{constructor(a,i){this._translationService=a,this._eventApiService=i,this._eventServiceBaseUrl="/event/v2/paymentmethod/",this.getEventPaymentMethods=e=>{let c=`${this._eventServiceBaseUrl}event/${e.toString()}/event-payment-methods`;return this._eventApiService.get(c).then(P=>{if(!P)return P;let b=P.map(_=>{let B="";switch(_.PaymentMethodId){case 1:B="enum.payment-method-type.bill-later";break;case 2:B="enum.payment-method-type.pay-at-door";break;case 3:B="enum.payment-method-type.credit-card";break;case 4:B="enum.payment-method-type.purchase-order";break;case 5:B="enum.payment-method-type.cash-check";break}return B?this._translationService.getTitlecase(B).then(v=>_.Descr=v):Promise.resolve("")});return Promise.all(b).then(()=>P)})},this.getEventPaymentMethod=e=>{let c=this._eventServiceBaseUrl+e.toString();return this._eventApiService.get(c)}}};p.\u0275fac=function(i){return new(i||p)(ke(J),ke(nt))},p.\u0275prov=Ge({token:p,factory:p.\u0275fac});let r=p;return r})();var Jn=["creditCardInputComponent"],Xn=["paymentInfoForm"],$n=()=>({width:"100%"});function er(r,p){r&1&&(o(0,"span",37),h(1),s(2,"translate"),l()),r&2&&(n(),N(d(2,1,"events.registration.wizard.payment-info.this-is-not-a-valid-promo-code")))}function tr(r,p){r&1&&(o(0,"span",37),h(1),s(2,"translate"),l()),r&2&&(n(),N(d(2,1,"events.registration.wizard.payment-info.promo-code-not-available")))}
2function ir(r,p){if(r&1&&(o(0,"span"),h(1),s(2,"currency"),l()),r&2){let t=u().$implicit;n(),R("-",d(2,1,t.Discount))}}function nr(r,p){if(r&1&&(o(0,"span"),h(1),s(2,"percent"),l()),r&2){let t=u().$implicit;n(),R("-",d(2,1,t.Discount/100))}}function rr(r,p){if(r&1){let t=O();o(0,"tr")(1,"td",38),V(2,ir,3,3,"span",6)(3,nr,3,3,"span",6),l(),o(4,"td",39),h(5),l(),o(6,"td",40)(7,"button",41),T("click",function(){let i=I(t).$implicit,e=u(2);return S(e.removePromoCode(i.PromoCodeId))}),h(8),s(9,"translate"),s(10,"titlecase"),l()()()}if(r&2){let t=p.$implicit,a=u(2);n(2),m("ngIf",t.DiscountType==a.promoCodeDiscountType.Dollar),n(),m("ngIf",t.DiscountType==a.promoCodeDiscountType.Percent),n(2),R(" ",t.Code," "),n(3),R(" ",d(10,6,d(9,4,"events.registration.wizard.payment-info.remove-promo-code"))," ")}}function ar(r,p){if(r&1){let t=O();o(0,"div",28)(1,"div",29)(2,"label",30),h(3),s(4,"translate"),s(5,"titlecase"),l(),V(6,er,3,3,"span",31)(7,tr,3,3,"span",31),l(),o(8,"div",32)(9,"div",33)(10,"input",34),k("ngModelChange",function(i){I(t);let e=u();return L(e.promoCodeToApply,i)||(e.promoCodeToApply=i),S(i)}),l()(),o(11,"div",35)(12,"button",36),T("click",function(){I(t);let i=u();return S(i.applyPromoCode())}),h(13),s(14,"translate"),s(15,"uppercase"),l()()(),o(16,"div")(17,"p-table",13),V(18,rr,11,8,"ng-template",9),l()()()}if(r&2){let t=u();n(3),N(d(5,9,d(4,7,"events.registration.wizard.payment-info.apply-promo-code-title"))),n(3),m("ngIf",t.showInvalidPromoCodeMessage),n(),m("ngIf",t.showPromocodeNotAvailable),n(3),D("ngModel",t.promoCodeToApply),n(2),m("disabled",t.promoCodeToApply==""),n(),R(" ",d(15,13,d(14,11,"events.registration.wizard.payment-info.apply-promo-code"))," "),n(4),m("value",t.registration.PromoCodes)}}function or(r,p){if(r&1){let t=O();o(0,"input",50),k("ngModelChange",function(i){I(t);let e=u(2);return L(e.selectedRegistrationBenefit.ValueToApply,i)||(e.selectedRegistrationBenefit.ValueToApply=i),S(i)}),l()}if(r&2){let t=u(2);D("ngModel",t.selectedRegistrationBenefit.ValueToApply),m("step",1)("placeholder",0)}}function sr(r,p){if(r&1){let t=O();o(0,"input",51),k("ngModelChange",function(i){I(t);let e=u(2);return L(e.selectedRegistrationBenefit.QuantityToApply,i)||(e.selectedRegistrationBenefit.QuantityToApply=i),S(i)}),T("ngModelChange",function(i){I(t);let e=u(2);return S(e.onBenefitQuantityToApplyChange(i))}),l()}if(r&2){let t=u(2);D("ngModel",t.selectedRegistrationBenefit.QuantityToApply),m("step",1)("placeholder",0)}}function lr(r,p){if(r&1){let t=O();o(0,"button",52),T("click",function(){I(t);let i=u(2);return S(i.removeBenefits())}),h(1),s(2,"translate"),s(3,"titlecase"),l()}r&2&&(n(),R(" ",d(3,3,d(2,1,"common.remove"))," "))}function dr(r,p){if(r&1){let t=O();o(0,"div")(1,"div"),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"div",42)(6,"div",43)(7,"p-select",44),s(8,"translate"),s(9,"titlecase"),k("ngModelChange",function(i){I(t);let e=u();return L(e.selectedEventBenefit.EventBenefitId,i)||(e.selectedEventBenefit.EventBenefitId=i),S(i)}),T("ngModelChange",function(i){I(t);let e=u();return S(e.onBenefitChange(i))}),l()(),o(10,"div",45),V(11,or,1,3,"input",46)(12,sr,1,3,"input",47),l(),o(13,"div")(14,"button",48),T("click",function(){I(t);let i=u();return S(i.applyBenefit())}),h(15),s(16,"translate"),s(17,"uppercase"),l(),V(18,lr,4,5,"button",49),l()()()}if(r&2){let t=u();n(2),N(d(4,12,d(3,10,"events.registration.wizard.payment-info.use-member-benefits-label"))),n(5),Et(xt(22,$n)),m("options",t.availableBenefitsToUse),D("ngModel",t.selectedEventBenefit.EventBenefitId),m("placeholder",d(9,16,d(8,14,"events.registration.wizard.payment-info.select-a-benefit-label"))),n(4),m("ngIf",t.selectedEventBenefit.LimitType==0),n(),m("ngIf",t.selectedEventBenefit.LimitType==1),n(3),R(" ",d(17,20,d(16,18,"events.registration.wizard.payment-info.apply-benefit-label"))," "),n(3),m("ngIf",t.registration.Registration.BenefitsToApplyTotal>0)}}function pr(r,p){if(r&1&&(o(0,"span"),h(1),s(2,"currency"),s(3,"translate"),s(4,"uppercase"),l()),r&2){let t=u().$implicit;n(),R(" ",t.EventItem.MemberPrice>0?d(2,1,t.EventItem.MemberPrice):d(4,5,d(3,3,"common.free"))," ")}}function mr(r,p){if(r&1&&(h(0),s(1,"currency"),s(2,"translate"),s(3,"uppercase")),r&2){let t=u().$implicit;R(" ",t.EventItem.NonMemberPrice>0?d(1,1,t.EventItem.NonMemberPrice):d(3,5,d(2,3,"common.free"))," ")}}
2function cr(r,p){if(r&1&&(o(0,"tr")(1,"td"),h(2),l(),o(3,"td",54),h(4),s(5,"currency"),l()()),r&2){let t=p.$implicit;n(2),N(t.Value),n(2),N(d(5,2,t.TotalAmount))}}function gr(r,p){if(r&1&&(o(0,"tr")(1,"td"),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"td",54),h(6),s(7,"currency"),l()()),r&2){let t=u(2);n(2),N(d(4,4,d(3,2,"common.revenue.subtotal"))),n(4),N(d(7,6,t.registration.Registration.PreTaxPreDiscountAmount))}}function hr(r,p){if(r&1&&(o(0,"tr")(1,"td"),h(2),s(3,"translate"),l(),o(4,"td",54),h(5),s(6,"currency"),l()()),r&2){let t=u(2);n(2),N(d(3,2,"events.registration.wizard.payment-info.promo-codes-applied")),n(3),R("-",d(6,4,t.registration.Registration.DiscountTotal-t.registration.Registration.BenefitsToApplyTotal))}}function fr(r,p){if(r&1&&(o(0,"tr")(1,"td"),h(2),s(3,"translate"),l(),o(4,"td",54),h(5),s(6,"currency"),l()()),r&2){let t=u(2);n(2),N(d(3,2,"events.registration.wizard.payment-info.member-benefits-applied")),n(3),R("-",d(6,4,t.registration.Registration.BenefitsToApplyTotal))}}function ur(r,p){if(r&1&&(o(0,"tr")(1,"td"),h(2),s(3,"translate"),l(),o(4,"td",54),h(5),s(6,"currency"),l()()),r&2){let t=u(2);n(2),N(d(3,2,"events.registration.wizard.payment-info.tax-amount")),n(3),N(d(6,4,t.registration.Registration.TaxAmount))}}function vr(r,p){if(r&1&&(o(0,"tr")(1,"td"),h(2),l(),o(3,"td",54),h(4),s(5,"currency"),l()()),r&2){let t=u(2);n(2),N(t.registration.Registration.SelectedPaymentMethod.FeeDescr),n(2),N(d(5,2,t.registration.Registration.PaymentOptionFeeAmount))}}function _r(r,p){r&1&&(o(0,"tr",55),Z(1,"td")(2,"td"),l())}function yr(r,p){if(r&1&&(o(0,"tr",58)(1,"td"),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"td",54),h(6),s(7,"currency"),l()()),r&2){let t=u(2);n(2),N(d(4,4,d(3,2,"common.revenue.total"))),n(4),R(" ",d(7,6,t.registration.Registration.TotalAmount)," ")}}function Cr(r,p){if(r&1&&(o(0,"tr")(1,"td")(2,"div")(3,"div"),h(4),l(),o(5,"div"),h(6),V(7,pr,5,7,"span",53)(8,mr,4,7,"ng-template",null,3,vt),l()()(),o(10,"td",54),h(11),s(12,"currency"),l()(),V(13,cr,6,4,"tr",27),o(14,"tr",55),Z(15,"td")(16,"td"),l(),V(17,gr,8,8,"tr",6)(18,hr,7,6,"tr",6)(19,fr,7,6,"tr",6)(20,ur,7,6,"tr",6)(21,vr,6,4,"tr",6)(22,_r,3,0,"tr",56)(23,yr,8,8,"tr",57)),r&2){let t=p.$implicit,a=p.rowIndex,i=ae(9),e=u();n(4),R(" ",t.EventItem.Descr," "),n(2),R(" ",t.EventItem.Quantity," x "),n(),m("ngIf",e.registration.Registration.UserHasMemberPriceAccess&&t.EventItem.HasMemberPricing)("ngIfElse",i),n(4),N(d(12,13,t.ItemTotal)),n(2),m("ngForOf",t.DisplayCustomFieldResponses),n(4),m("ngIf",e.registration.Registration.EventItemTotals.length-1==a),n(),m("ngIf",e.registration.Registration.DiscountTotal-e.registration.Registration.BenefitsToApplyTotal>0&&e.registration.Registration.EventItemTotals.length-1==a),n(),m("ngIf",e.registration.Registration.BenefitsToApplyTotal&&e.registration.Registration.EventItemTotals.length-1==a),n(),m("ngIf",e.registration.Registration.EventItemTotals.length-1==a),n(),m("ngIf",e.registration.Registration.PaymentOptionFeeAmount&&e.registration.Registration.EventItemTotals.length-1==a),n(),m("ngIf",e.registration.Registration.EventItemTotals.length-1==a),n(),m("ngIf",e.registration.Registration.EventItemTotals.length-1==a)}}function Ir(r,p){if(r&1){let t=O();o(0,"div",63)(1,"p-radioButton",64),k("ngModelChange",function(i){I(t);let e=u(2);return L(e.registration.Registration.PaymentOption,i)||(e.registration.Registration.PaymentOption=i),S(i)}),T("ngModelChange",function(i){I(t);let e=u(2);return S(e.onPaymentOptionChange(i))}),l(),o(2,"label",65),h(3),l()()}if(r&2){let t=p.$implicit,a=u(2);n(),m("inputId","payment-method-"+t.PaymentMethodId)("value",t.PaymentMethodId),D("ngModel",a.registration.Registration.PaymentOption),n(),m("for","payment-method-"+t.PaymentMethodId),n(),N(t.Descr)}}function Sr(r,p){if(r&1&&(o(0,"div",59)(1,"div",60),h(2),s(3,"translate"),s(4,"titlecase"),l(),o(5,"div",61),V(6,Ir,4,5,"div",62),l()()),r&2){let t=u();n(2),R(" ",d(4,5,d(3,3,"events.registration.wizard.payment-info.payment-option-label"))," "),n(3),Pe("aria-labelledby","payment-option-label"),n(),m("ngForOf",t.paymentMethods)}}function Rr(r,p){if(r&1&&(o(0,"option",13),h(1),l()),r&2){let t=p.$implicit;m("value",t.CcPaymentProfileId),n(),R(" ",t.CardNumber," ")}}
2function wr(r,p){if(r&1){let t=O();o(0,"div",66)(1,"re-captcha",67),T("resolved",function(i){I(t);let e=u();return S(e.onReCaptchaResponse(i))}),l()()}if(r&2){let t=u();n(),m("siteKey",t.recaptchaSiteKey)}}function Pr(r,p){r&1&&Z(0,"hr")}function Er(r,p){if(r&1&&(o(0,"div")(1,"div",68),h(2),s(3,"translate"),l(),o(4,"div",68),h(5),l(),o(6,"div",68),h(7),s(8,"translate"),s(9,"titlecase"),s(10,"date"),l(),V(11,Pr,1,0,"hr",6),l()),r&2){let t=p.$implicit,a=p.last;n(2),R("",d(3,6,"events.registration.wizard.payment-info.individual-already-registered"),":"),n(3),ge("",t.FirstName," ",t.LastName),n(2),ge(" ",d(9,10,d(8,8,"events.registration.wizard.contact.registration-date-label")),": ",_e(10,12,t.RegistrationDate,"longDate")," "),n(4),m("ngIf",!a)}}function xr(r,p){if(r&1){let t=O();o(0,"button",69),T("click",function(){I(t);let i=u();return S(i.goBack())}),h(1),s(2,"translate"),s(3,"uppercase"),l(),o(4,"button",70),T("click",function(){I(t);let i=u();return S(i.emitSave())}),h(5),s(6,"translate"),s(7,"uppercase"),l()}r&2&&(n(),R(" ",d(3,4,d(2,2,"events.registration.wizard.payment-info.go-back"))," "),n(4),R(" ",d(7,8,d(6,6,"events.registration.wizard.payment-info.register-anyway"))," "))}var Qi=(()=>{let p=class p{constructor(a,i,e,c,P,b,_,B,v,w,A,F){this._utilService=a,this._translationService=i,this._paymentMethodService=e,this._eventPromoCodesService=c,this._registrationService=P,this._configSettingService=b,this._creditCardService=_,this._benefitService=B,this._creditCardGatewayService=v,this._attendeeService=w,this._configService=A,this._notificationService=F,this.isSaving=!1,this.exceedsMaxAttendeeCount=!1,this.registrationSuccess=!1,this.hasSelectedEventItems=!1,this.contactFormValid=!1,this.attendeeFormValid=!1,this.onDecrementStepper=new U,this.onCancel=new U,this.onSave=new U,this.promoCodeDiscountType=Ei,this.registrationId=0,this.registration=new Y,this.event=new X,this.initialLoadComplete=!1,this.creditCardPaymentInfo=new _t,this.paymentMethods=new Array,this.allPaymentMethodsAllowedForEvent=new Array,this.paymentMethodsAllowedForSelectedEventItems=new Array,this.eventPromoCodes=new Array,this.selectedPromoCode=0,this.originalAmountPaid=0,this.hasEventItemPaymentMethodMismatch=!1,this.showInvalidPromoCodeMessage=!1,this.showPromocodeNotAvailable=!1,this.hasCardOnFile=!1,this.hasCreditCardOnFileEnabled=!1,this.gatewayCustomerProfile=new bi,this.selectedGatewayPaymentProfile=new it,this.gatewayPaymentProfiles=new Array,this.selectedCcPaymentProfileId=0,this.availableEventBenefits=new Array,this.availableProfileBenefits=new Array,this.availableBenefitsToUse=new Array,this.selectedProfileBenefit=new Ai,this.selectedEventBenefit=new Vi,this.selectedRegistrationBenefit=new be,this.hasBenefitsThatCanBeUsed=!1,this.benefitsAcceptDaysPastDueAmount=0,this.displayPromoCodes=!1,this.reCaptchaResponseToken="",this.showDuplicateCheckDialog=!1,this.potentialDuplicates=[],this.checkingForDuplicates=!1,this.recaptchaSiteKey="",this.loadData=()=>{this.benefitsAcceptDaysPastDueAmount=this._configSettingService.getConfigSettingValueFromCollectionAsInteger("BenefitsAcceptDaysPastDueAmount",this.configSettings),(!this.benefitsAcceptDaysPastDueAmount||this.benefitsAcceptDaysPastDueAmount<0)&&(this.benefitsAcceptDaysPastDueAmount=0);let f=this._paymentMethodService.getEventPaymentMethods(this.event.EventId).then(C=>{this.allPaymentMethodsAllowedForEvent=C,this.updateAvailablePaymentMethods()}),E=this._eventPromoCodesService.getEventPromoCodes(this.event.EventId).then(C=>{this.eventPromoCodes=C}),g=this._registrationService.getRegistrationAmountPaid(this.registrationId).then(C=>{this.registration.Registration.PaymentAmount=C,this.registration.Registration.AlreadyPaidAmountForEdit=C,this.originalAmountPaid=C,this.getItemTotals(),this.initialLoadComplete=!0}),y=this._registrationService.getRegistrationPromoCodes(this.registrationId).then(C=>{this.registration.PromoCodes=C});Promise.all([f,E,g,y]).then(()=>{}),this.checkCardOnFileConfig(),this.refreshBenefits(),this.checkCardConnect()},this.getValidationResult=()=>{let f=new te;if(f.isValid=!0,this.registration&&this.registration.ModificationOptions&&this.registration.ModificationOptions.DoNotModifyInvoice)return f;let E=this.registration.Items.filter(g=>g.Quantity>0&&g.ExtendedPrice>0);if(this.registration.Registration.AdditionalPaymentAmountForEdit>0){let g=this.selectedGatewayPaymentProfile&&this.selectedGatewayPaymentProfile.CcPaymentProfileId>0;E.length>0&&this.registration.Registration.PaymentOption==3&&!g&&(f=this.creditCardInputComponent.getValidationResult()),f.isValid==!1||(this.registration.Registration.PaymentOption==1||this.registration.Registration.PaymentOption==2?f.isValid=!0:this._utilService.isNullOrLessThanOrEqualToZero(this.registration.Registration.PaymentOption)&&(f.isValid=!1,f.errors.push(this._translationService.getInstant("events.registration.wizard.payment-info.payment-option-payment-info-needed-validation-error")))),this.registration.Registration.PaymentOption===3&&this.registration.Registration.AdditionalPaymentAmountForEdit>0&&!g&&!this.registration.Registration.CreditCardPayment.CreditCardContactInfo.State&&(f.isValid=!1,f.errors.push(this._translationService.getInstant("events.registration.wizard.payment-info-state-required")))}return this.registration.IsEdit&&this.registration.ItemsChanged&&this.registration.ModificationOptions.CreateUnappliedPayments==!0&&this.registration.ModificationOptions.UnappliedPaymentPaymentypeId<=0&&(f.isValid=!1,f.errors.push(this._translationService.getInstant("events.registration.wizard.payment-info.modification-option-unapplied-payment-type-needed-validation-error"))),this.registration.IsEdit&&this.registration.ItemsChanged&&this.originalAmountPaid>0&&this.registration.ModificationOptions.PaymentAdjustmentTypeId<=0&&(f.isValid=!1,f.errors.push(this._translationService.getInstant("events.registration.wizard.payment-info.modification-option-payment-adjustment-type-needed-validation-error"))),this.registration.IsEdit&&this.registration.ItemsChanged&&this.registration.ModificationOptions.InvoiceAdjustmentTypeId<=0&&(f.isValid=!1,f.errors.push(this._translationService.getInstant("events.registration.wizard.payment-info.modification-option-invoice-adjustment-type-needed-validation-error"))),this.registration.Registration.TotalAmount>0&&this.hasEventItemPaymentMethodMismatch&&(f.isValid=!1,f.errors.push(this._translationService.getInstant("events.registration.wizard.payment-info.event-item-payment-method-mismatch-vali
2dation-message"))),f},this.checkCardConnect=()=>{this._creditCardGatewayService.hasCardConnectCreditCardGateways().then(f=>{f&&(this.creditCardInputComponent.useCardConnect=!0)})},this.checkCardOnFileConfig=()=>{this._creditCardService.hasCreditCardOnFileEnabled().then(f=>{this.hasCreditCardOnFileEnabled=f})},this.loadCardOnFileData=(f,E)=>{this._creditCardService.getGatewayCustomerProfile(f,E).then(g=>{this.gatewayCustomerProfile=g,this.gatewayPaymentProfiles=this.gatewayCustomerProfile?.PaymentProfiles})},this.onGatewayPaymentProfileChange=f=>{var E=parseInt(f),g=this.gatewayPaymentProfiles.find(y=>y.CcPaymentProfileId==E);g||(g=new it),this.selectedGatewayPaymentProfile=g,this.copySelectedCardOnFile()},this.updateAvailablePaymentMethods=()=>{this.hasEventItemPaymentMethodMismatch=!1,this.paymentMethods=new Array;let f=new Array;for(let g of this.registration.Items)g.Quantity>0&&f.push(g.EventItemId);let E=new qt;for(let g of this.allPaymentMethodsAllowedForEvent)if(g.Accept&&g.EventItemPaymentMethods.length>0){let y=new Array;for(let C of g.EventItemPaymentMethods)C.Accept==!0&&y.push(C.EventItemId);y.length>0&&f.every(z=>y.indexOf(z)>-1)&&(this.paymentMethods.push(g),g.PaymentMethodId==3&&(E=g))}this.paymentMethods.length==0&&(this.hasEventItemPaymentMethodMismatch=!0),this.paymentMethods.length==0&&this.hasEventItemPaymentMethodMismatch==!1&&this.paymentMethods.push(E),this.paymentMethods.length>0&&(E.PaymentMethodId>0&&E.Accept?(this.registration.Registration.PaymentOption=E.PaymentMethodId,this.hasCreditCardOnFileEnabled==!0&&this.loadCardOnFileData(this.registration.Registration.LoggedInProfileId,0)):this.registration.Registration.PaymentOption=this.paymentMethods[0].PaymentMethodId),this.updateRegistrationWithSelectedPaymentMethod()},this.updateRegistrationWithSelectedPaymentMethod=()=>{for(let f of this.paymentMethods)f.PaymentMethodId==this.registration.Registration.PaymentOption&&(this.registration.Registration.SelectedPaymentMethod=f,f.PaymentMethodId==3&&this.copyContactInfoToCCContactInfo())},this.onPaymentOptionChange=f=>{this.registration.Registration.PaymentOption=parseInt(f),this.updateRegistrationWithSelectedPaymentMethod(),this._registrationService.calculateTotals(this.registration),this.hasCreditCardOnFileEnabled==!0&&this.gatewayPaymentProfiles?.length<=1&&this.loadCardOnFileData(this.registration.Registration.LoggedInProfileId,0)},this.applyPromoCode=()=>{this.showInvalidPromoCodeMessage=!1,this.showPromocodeNotAvailable=!1;let f=!1,E=!1;if(this._utilService.isNotNullEmptyOrWhitespace(this.promoCodeToApply)){for(let g of this.eventPromoCodes)if(this._utilService.toLowerTrim(g.Code)==this._utilService.toLowerTrim(this.promoCodeToApply)||this._utilService.toLowerTrim(g.Name)==this._utilService.toLowerTrim(this.promoCodeToApply)){let y=new Date(g.EndDate.getFullYear(),g.EndDate.getMonth(),g.EndDate.getDate(),0,0,0),C=new Date;C=new Date(C.getFullYear(),C.getMonth(),C.getDate(),0,0,0);let z=new Date(g.StartDate.getFullYear(),g.StartDate.getMonth(),g.StartDate.getDate(),0,0,0);g.MaxUses>0&&g.Used>=g.MaxUses||z>C||y<C?E=!0:this.registration.PromoCodes.some(M=>M.Code==g.Code)||this.registration.PromoCodes.push(g),f=!0}}f==!1?this.showInvalidPromoCodeMessage=!0:E&&(this.showPromocodeNotAvailable=!0),this.selectedPromoCode=0,this.promoCodeToApply="",this.getItemTotals()},this.hidePromoCode=(f,E)=>this.registration.PromoCodes.some(g=>g.PromoCodeId==f)||E.length>0&&!E.some(g=>this.registration.Items.some(y=>y.EventItemId==g&&y.Quantity>0)),this.removePromoCode=f=>{this.showInvalidPromoCodeMessage=!1;let E=this.registration.PromoCodes.findIndex(g=>g.PromoCodeId==f);E>-1&&this.registration.PromoCodes.splice(E,1),this.getItemTotals()},this.getItemTotals=()=>{this._registrationService.calculateTotals(this.registration)},this.quantityChanged=()=>{this.getItemTotals()},this.refreshBenefits=()=>{if(this.hasBenefitsThatCanBeUsed=!1,this.availableEventBenefits=new Array,this.availableProfileBenefits=new Array,this.availableBenefitsToUse=new Array,this.registration.Registration.ProfileId>0){let f=this._benefitService.getEventBenefits(this.event.EventId).then(g=>{let y=this.registration.Items.filter(C=>C.Quantity>0).map(C=>C.EventItemId);this.availableEventBenefits=g.filter(C=>C.EventItems.some(z=>y.indexOf(z.EventPriceId)>-1))}
2),E=this._benefitService.getProfileEventBenefits(this.registration.Registration.ProfileId,this.event.EventId).then(g=>{this.availableProfileBenefits=g});Promise.all([f,E]).then(()=>{if(this.availableEventBenefits.length>0&&this.availableProfileBenefits.length>0){this.availableBenefitsToUse=new Array;let g=new Date;for(let y of this.availableProfileBenefits){let C=new Date(y.ExpirationDate);if(C.setDate(C.getDate()+this.benefitsAcceptDaysPastDueAmount),(y.QuantityRemaining>0||y.ValueRemaining>0)&&C>g)for(let z of this.availableEventBenefits)z.BenefitTypeId==y.BenefitTypeId&&(this.hasBenefitsThatCanBeUsed=!0,this.availableBenefitsToUse.push(z))}}if(this.registration.Registration.BenefitsPreviouslyAppliedTotal>0&&this.registration.Registration.BenefitsPreviouslyApplied.length>0){let g=this.registration.Registration.BenefitsPreviouslyApplied[0].EventBenefitId,y=0,C=0;for(let z of this.registration.Registration.BenefitsPreviouslyApplied)y=y+z.QuantityToApply,C=C+z.ValueToApply;this.registration.Registration.BenefitsToApply=this.registration.Registration.BenefitsPreviouslyApplied,this.registration.Registration.BenefitsToApplyTotal=this.registration.Registration.BenefitsPreviouslyAppliedTotal,this.onBenefitChange(g.toString()),this.selectedRegistrationBenefit.ValueToApply=C,this.selectedRegistrationBenefit.QuantityToApply=y}})}else this.availableEventBenefits=new Array,this.availableProfileBenefits=new Array},this.onBenefitChange=f=>{this.selectedRegistrationBenefit=new be;let E=parseInt(f);this.selectedEventBenefit.EventBenefitId=E;let g=this.availableBenefitsToUse.find(y=>y.EventBenefitId==E);if(this._utilService.isNotNullOrUndefined(g)){this._utilService.mapSafe(g,this.selectedEventBenefit),this.selectedEventBenefit.EventItems=[];for(let C of g.EventItems){let z=new Mi;this._utilService.mapSafe(C,z),this.selectedEventBenefit.EventItems.push(z)}let y=this.availableProfileBenefits.find(C=>C.BenefitTypeId==g.BenefitTypeId);this._utilService.isNotNullOrUndefined(y)&&(this._utilService.mapSafe(y,this.selectedProfileBenefit),this.selectedRegistrationBenefit=new be,this.selectedRegistrationBenefit.BenefitType=this.selectedEventBenefit.BenefitType,this.selectedRegistrationBenefit.BenefitTypeId=this.selectedProfileBenefit.BenefitTypeId,this.selectedRegistrationBenefit.EventBenefitId=this.selectedEventBenefit.EventBenefitId,this.selectedRegistrationBenefit.ProfileBenefitId=this.selectedProfileBenefit.Id,this.selectedRegistrationBenefit.ProfileId=this.selectedProfileBenefit.ProfileId,this.selectedRegistrationBenefit.LimitType=this.selectedEventBenefit.LimitType,this.selectedRegistrationBenefit.LimitAmount=this.selectedEventBenefit.LimitAmount,this.updateBenefitSuggestedAmountToUse())}},this.updateBenefitSuggestedAmountToUse=()=>{let f=this.getMaxBenefitAmountAllowed();this.selectedRegistrationBenefit.ValueToApply=f},this.getMaxAmtOfBenefitsThatCanBeUsedForItems=()=>{let f=0;for(let E of this.registration.Registration.EventItemTotals)f=f+E.Total;return f},this.getMaxBenefitAmountAllowed=()=>{let f=this.getMaxAmtOfBenefitsThatCanBeUsedForItems();return this.selectedProfileBenefit.ValueRemaining<f&&(f=this.selectedProfileBenefit.ValueRemaining),this.selectedRegistrationBenefit.LimitAmount>0&&this.selectedRegistrationBenefit.LimitAmount<f&&(f=this.selectedRegistrationBenefit.LimitAmount),f},this.getMaxBenefitQuantityAllowed=()=>{let f=this.getMaxAmtOfBenefitsThatCanBeUsedForItems();return this.selectedProfileBenefit.QuantityRemaining<f&&(f=this.selectedProfileBenefit.QuantityRemaining),this.selectedRegistrationBenefit.LimitAmount>0&&this.selectedRegistrationBenefit.LimitAmount<f&&(f=this.selectedRegistrationBenefit.LimitAmount),f},this.applyBenefit=()=>{if(this.registration.Registration.BenefitsToApply=new Array,this._registrationService.calculateTotals(this.registration),this.selectedRegistrationBenefit.BenefitTypeId>0){let f=0,E=0,g=this.getMaxAmtOfBenefitsThatCanBeUsedForItems(),y,C;this.selectedEventBenefit.LimitType==1?(f=this.selectedProfileBenefit.QuantityRemaining,y=this.selectedRegistrationBenefit.QuantityToApply,y>f&&(y=f)):(E=this.getMaxBenefitAmountAllowed(),C=this.selectedRegistrationBenefit.ValueToApply,C>E&&(C=E));let z=0;for(let M of this.registration.Items)if(M.Quantity>0&&(y>0||C>0)&&z<g){let Q=this.selectedEventBenefit.EventItems.find(q=>q.EventPriceId==M.EventItemId);if(this._utilService.isNotNullOrUndefined(Q)){let q=this._utilService.round(M.ExtendedPrice/M.Quantity,2),W=new be;this._utilService.mapSafe(this.selectedRegistrationBenefit,W),W.EventPriceId=M.EventItemId,W.LimitType==1?(W.QuantityToApply=Math.min(M.Quantity,y),W.ValueToApply=q*W.QuantityToApply,y-=W.QuantityToApply):(W.QuantityToApply=0,W.ValueToApply=Math.min(q*M.Quantity,C),
2C-=W.ValueToApply),z+=W.ValueToApply,z>g&&(W.ValueToApply=Math.max(0,W.ValueToApply-(g-z))),this.registration.Registration.BenefitsToApply.push(W)}}}this._registrationService.calculateTotals(this.registration)},this.onBenefitAmountToApplyChange=()=>{},this.onBenefitQuantityToApplyChange=f=>{let E=parseInt(f.toString());f=E.toString(),this.selectedRegistrationBenefit.QuantityToApply=E}}ngOnInit(){this._configService.getRecaptchaSiteKey().then(a=>{this.recaptchaSiteKey=a})}showPromoCodes(){this.displayPromoCodes=this.eventPromoCodes.some(a=>a.EventItemIds.length==0)||this.registration.Items.some(a=>a.Quantity>0&&this.eventPromoCodes.some(i=>i.EventItemIds.some(e=>e==a.EventItemId)))}copySelectedCardOnFile(){this.registration.Registration.GatewayPaymentProfile||(this.registration.Registration.GatewayPaymentProfile=new it),this.registration.Registration.GatewayPaymentProfile=this.selectedGatewayPaymentProfile}copyContactInfoToCCContactInfo(){this.registration.Registration.CreditCardPayment||(this.registration.Registration.CreditCardPayment=new _t),this.registration.Registration.CreditCardPayment.CreditCardContactInfo||(this.registration.Registration.CreditCardPayment.CreditCardContactInfo=new kt),this.registration.Registration.CreditCardPayment.CreditCardContactInfo.FirstName=this.registration.Registration.FName,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.LastName=this.registration.Registration.LName,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.OrgName=this.registration.Registration.OrgName,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.Address1=this.registration.Registration.Address1,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.Address2=this.registration.Registration.Address2,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.City=this.registration.Registration.City,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.State=this.registration.Registration.State,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.Zip=this.registration.Registration.Zip,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.ZipExt=this.registration.Registration.ZipExt,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.Country=this.registration.Registration.Country,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.Phone=this.registration.Registration.Phone,this.registration.Registration.CreditCardPayment.CreditCardContactInfo.Email=this.registration.Registration.Email}removeBenefits(){this.registration.Registration.BenefitsToApply=new Array,this._registrationService.calculateTotals(this.registration)}onReCaptchaResponse(a){this.reCaptchaResponseToken=a}decrementStepper(){this.onDecrementStepper.emit(!0)}wizardSave(){this.checkingForDuplicates=!0,this._attendeeService.checkDuplicateAttendee(this.registration.Attendees,this.registration.EventId).then(a=>{this.checkingForDuplicates=!1,a.length>0?(this.showDuplicateCheckDialog=!0,this.potentialDuplicates=a):this.emitSave()})}cancel(){this.onCancel.emit(!0)}goBack(){this.showDuplicateCheckDialog=!1,this.decrementStepper()}emitSave(){return St(this,null,function*(){if(this.showDuplicateCheckDialog=!1,this.creditCardInputComponent?.usePreczn&&this.registration.Registration.PaymentOption==3&&!(this.selectedGatewayPaymentProfile?.CcPaymentProfileId>0)&&this.registration.Registration.AdditionalPaymentAmountForEdit>0)try{yield this.creditCardInputComponent.prepareForSubmit()}catch(a){this._notificationService.error(a?.message??this._translationService.getInstant("revenue.credit-card-input.tokenize-error"));return}this.onSave.emit(this.reCaptchaResponseToken)})}};p.\u0275fac=function(i){return new(i||p)(x($),x(J),x(ft),x(Le),x(K),x(ee),x(st),x(mt),x(dt),x(xi),x(Dt),x(qe))},p.\u0275cmp=ie({type:p,selectors:[["wl-event-v4-registration-wizard-payment-info"]],viewQuery:function(i,e){if(i&1&&(j(Jn,5),j(Xn,5)),i&2){let c;H(c=G())&&(e.creditCardInputComponent=c.first),H(c=G())&&(e.paymentInfoForm=c.first)}},inputs:{isSaving:"isSaving",exceedsMaxAttendeeCount:"exceedsMaxAttendeeCount",registrationSuccess:"registrationSuccess",hasSelectedEventItems:"hasSelectedEventItems",contactFormValid:"c
2ontactFormValid",attendeeFormValid:"attendeeFormValid"},outputs:{onDecrementStepper:"onDecrementStepper",onCancel:"onCancel",onSave:"onSave"},standalone:!1,features:[ve([ft,st,Le,K,mt,dt],[{provide:Gt,useExisting:ze}])],decls:60,vars:60,consts:[["paymentInfoForm","ngForm"],["creditCardInputComponent",""],["footer",""],["nonMemberPricing",""],[2,"max-width","80%","margin","auto"],["class","mb-50 mobile-margin",4,"ngIf"],[4,"ngIf"],[1,"mv-50","mobile-margin"],["styleClass","p-datatable-striped",3,"value"],["pTemplate","body"],["class","mb-50",4,"ngIf"],[3,"hidden"],["name","paymentProfileId","aria-label","Payment Profile",1,"form-control",3,"ngModelChange","ngModel"],[3,"value"],[3,"value",4,"ngFor","ngForOf"],["name","ccInput","ngModelGroup","creditCardFields",3,"ngModelChange","ngModel","freeMode"],[1,"mt-10",3,"hidden"],["type","checkbox","id","saveToCardOnFile","name","saveToCardOnFile",3,"ngModelChange","ngModel"],["for","saveToCardOnFile",1,"ml-10"],["type","text","name","registrationPO",1,"form-control",3,"ngModelChange","ngModel"],["fxLayout","row","fxLayoutAlign","end","class","mv-10",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end","fxLayoutGap","12px"],[1,"f-wb","mv-5",3,"click"],["type","button",1,"atlas-btn","atlas-btn-secondary",3,"click"],["type","button",1,"atlas-btn","atlas-btn-primary",3,"click","disabled"],[3,"show"],["modal","true","styleClass","atlas-dialog-m",3,"visibleChange","draggable","header","visible"],[4,"ngFor","ngForOf"],[1,"mb-50","mobile-margin"],["fxLayout","row"],["for","promoCodeToApply"],["class","ml-15 text-danger",4,"ngIf"],["gdColumns","7fr 1fr","gdColumns.lt-sm","1fr",1,"mb-10"],[1,"mr-27","mv-15"],["type","text","id","promoCodeToApply","name","promoCodeToApply",1,"form-control",3,"ngModelChange","ngModel"],[1,"mv-15"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"ml-15","text-danger"],[1,"w-15"],[1,"w-80"],[1,"w-5"],["type","button",1,"btn","btn-danger",2,"margin","auto",3,"click"],["gdColumns","5fr 2fr 1fr","gdColumns.lt-sm","1fr"],[1,"mv-10","mr-27"],["name","selectedEventBenefit","optionLabel","BenefitType","optionValue","EventBenefitId","appendTo","body",3,"ngModelChange","options","ngModel","placeholder"],[1,"mr-27"],["type","number","class","form-control text-right mv-10","name","valueToApply",3,"ngModel","step","placeholder","ngModelChange",4,"ngIf"],["type","number","class","form-control text-right mv-10","name","quantityToApply",3,"ngModel","step","placeholder","ngModelChange",4,"ngIf"],[1,"btn","btn-primary","mv-10",3,"click"],["class","btn btn-danger mv-10",3,"click",4,"ngIf"],["type","number","name","valueToApply",1,"form-control","text-right","mv-10",3,"ngModelChange","ngModel","step","placeholder"],["type","number","name","quantityToApply",1,"form-control","text-right","mv-10",3,"ngModelChange","ngModel","step","placeholder"],[1,"btn","btn-danger","mv-10",3,"click"],[4,"ngIf","ngIfElse"],[1,"t-ar"],[2,"height","40px"],["style","height: 40px",4,"ngIf"],["class","f-wb",4,"ngIf"],[1,"f-wb"],[1,"mb-50"],["id","payment-option-label",1,"mb-15"],["fxLayout","row","fxLayoutGap","27px","role","radiogroup"],["fxLayout","row","fxLayoutAlign","start center",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start center"],["wlSimpleBindingValidator","","name","paymentMethod",3,"ngModelChange","inputId","value","ngModel"],[1,"ml-7","mv-5",3,"for"],["fxLayout","row","fxLayoutAlign","end",1,"mv-10"],[3,"resolved","siteKey"],[1,"t-ac"],[1,"atlas-btn","atlas-btn-secondary","mr-12",3,"click"],[1,"atlas-btn","atlas-btn-primary",3,"click"]],template:function(i,e){if(i&1){let c=O();o(0,"div",4)(1,"div"),V(2,ar,19,15,"div",5)(3,dr,19,23,"div",6),o(4,"div",7)(5,"p-table",8),V(6,Cr,24,15,"ng-template",9),l()(),V(7,Sr,7,7,"div",10),o(8,"div")(9,"div",11)(10,"div",11)(11,"div")(12,"div")(13,"select",12),k("ngModelChange",function(b){return I(c),L(e.selectedCcPaymentProfileId,b)||(e.selectedCcPaymentProfileId=b),S(b)}),T("ngModelChange",function(b){return I(c),S(e.onGatewayPaymentProfileChange(b))}),o(14,"option",13),h(15),s(16,"translate"),s(17,"titlecase"),l(),V(18,Rr,2,2,"option",14),l()()()(),o(19,"div",11)(20,"form",null,0)(22,"wl-credit-card-input",15,1),k("ngModelChange",function(b){return I(c),L(e.registration.Registration.CreditCardPayment,b)||(e.registration.Registration.CreditCardPayment=b),S(b)}),l()()(),o(24,"div",16)(25,"input",17),s(26,"translate"),k("ngModelChange",function(b){return I(c),L(e.registration.Registration.SaveToCardOnFile,b)||(e.registration.Registration.SaveToCardOnFile=b),S(b)}),l(),o(27,"label",18),h(28),s(29,"translate"),s(30,"titlecase"),l()()(),o(31,"div",11)(32,"label"),h(33),s(34,"translate"),s(35,"titlecase"),l(),o(36,"div")(37,"input",19),k("ngModelChange",function(b){return I(c),L(e.registration.Registration.PO,b)||(e.registration.Registration.PO=b),S(b)}),l()()()(),o(38,"div"),V(39,wr,2,1,"div",20),o(40,"div",21)(41,"a",22),T("click",function(){return I(c),S(e.cancel())}),h(42),s(43,"translate"),s(44,"uppercase"),l(),o(45,"button",23),T("click",function(){return I(c),S(e.decrementStepper())}),h(46),s(47,"translate"),s(48,"titlecase"),l(),o(49,"button",24),T("click",function(){return I(c),S(e.wizardSave())}),h(50),s(51,"translate"),s(52,"titlecase"),Z(53,"wl-busy",25),l()()()()(),o(54,"p-dialog",26),s(55,"translate"),s(56,"titlecase"),k("visibleChange",function(b){return I(c),L(e.showDuplicateCheckDialog,b)||(e.showDuplicateCheckDialog=b),S(b)}),V(57,Er,12,15,"div",27)(58,xr,8,10,"ng-template",null,2,vt),l()}if(i&2){let c=ae(21);n(2),m("ngIf",e.displayPromoCodes),n(),m("ngIf",e.hasBenefitsThatCanBeUsed),n(2),m("value",e.registration.Registration.EventItemTotals),n(2),m("ngIf",e.registration.Registration.AdditionalPaymentAmountForEdit>0),n(2),m("hidden",e.registration.Registration.PaymentOption!=3||e.registration.Registration.AdditionalPaymentAmountForEdit<=0),n(),m("hidden",e.hasCreditCardOnFileEnabled==!1||e.registration.Registration.ProfileId<=0),n(3),D("ngModel",e.selectedCcPaymentProfileId),n(),m("value",0),n(),N(d(17,32,d(16,30,"events.registration.wizard.payment-info.card-on-file-new-card"))),n(3),m("ngForOf",e.gatewayPaymentProfiles),n(),m("hidden",e.selectedCcPaymentProfileId>0),n(3),D("ngModel",e.registration.Registration.CreditCardPayment),m("freeMode",e.registration.Registration.AdditionalPaymentAmountForEdit<=0),n(2),m("hidden",e.hasCreditCardOnFileEnabled==!1||e.selectedCcPaymentProfileId>0||e.registration.Registration.ProfileId<=0),n(),D("ngModel",e.registration.Registration.SaveToCardOnFile),Pe("aria-label",d(26,34,"events.registration.wizard.payment-info.save-credit-card-label")),n(3),R(" ",d(30,38,d(29,36,"events.registration.wizard.payment-info.save-credit-card-label"))," "),n(3),m("hidden",e.registration.Registration.PaymentOption!=4||e.registration.Registration.AdditionalPaymentAmountForEdit<=0),n(2),R(" ",d(35,42,d(34,40,"events.registration.wizard.payment-info.purchase-order-label"))," "),n(4),D("ngModel",e.registration.Registration.PO),n(2),m("ngIf",e.re
2captchaSiteKey),n(3),R(" ",d(44,46,d(43,44,"common.cancel"))," "),n(4),R(" ",d(48,50,d(47,48,"common.back"))," "),n(3),m("disabled",!e.reCaptchaResponseToken||!c.valid&&e.selectedCcPaymentProfileId==0&&e.registration.Registration.PaymentOption==3&&e.registration.Registration.AdditionalPaymentAmountForEdit>0||!e.contactFormValid||!e.attendeeFormValid||!e.hasSelectedEventItems||e.isSaving||e.checkingForDuplicates||e.exceedsMaxAttendeeCount),n(),R(" ",d(52,54,d(51,52,"events.registration.wizard.submit-registration"))," "),n(3),m("show",e.isSaving),n(),m("draggable",!1)("header",d(56,58,d(55,56,"events.registration.wizard.payment-info.duplicate-registrations"))),D("visible",e.showDuplicateCheckDialog),n(3),m("ngForOf",e.potentialDuplicates)}},dependencies:[Xe,vi,yi,Ci,Bt,se,le,Se,Kt,Yt,Te,at,Ht,Zt,Be,Ce,Fe,ze,Ie,me,Me,pe,We,si,di,ti,li,ye,Tt,de,Ke,Vt,re],styles:[".wc-event-reg-wiz-payment-info-total[_ngcontent-%COMP%]{border-top:1px solid #999}@media screen and (max-width:440px){.mobile-margin[_ngcontent-%COMP%]{margin-top:15px!important;margin-bottom:15px!important}}"]});let r=p;return r})();var Vr=["registrationForm"],Mr=["registrationWizardTabsComponent"],Tr=["registrationWizardItemsTab"],Br=["registrationWizardContactTab"],zr=["registrationWizardAttendeesTab"],Fr=["registrationWizardPaymentTab"],Wr=["registrationWizardSponsorTab"],Nr=["registrationWizardAttendeesComponent"],Or=["registrationWizardItemsComponent"],Dr=["registrationWizardContactComponent"],Lr=["registrationWizardPaymentInfoComponent"],kr=["registrationWizardSponsorComponent"];function qr(r,p){if(r&1){let t=O();o(0,"div",23),T("click",function(){I(t);let i=u();return S(i.login())}),h(1),l()}if(r&2){let t=u();m("hidden",t.isLoggedIn),n(),R(" ",t.loginInfoText," ")}}function Qr(r,p){if(r&1){let t=O();o(0,"wl-event-v4-registration-wizard-attendee-tab-nav",24),T("onAddAttendee",function(){I(t);let i=u();return S(i.handleAttendeeNavAddNewAttendeeClick())})("onAttendeeClick",function(i){I(t);let e=u();return S(e.handleAttendeeNavAttendeeClick(i))}),l()}if(r&2){let t=u(),a=ae(29);m("attendees",t.registration==null?null:t.registration.Attendees)("enableNewButton",a.canAddNewAttendee)}}function Ur(r,p){if(r&1&&(o(0,"li"),h(1),l()),r&2){let t=p.$implicit;n(),R(" ",t," ")}}function jr(r,p){if(r&1&&(o(0,"div",25),h(1),o(2,"ul",16),s(3,"translate"),V(4,Ur,2,1,"li",26),l()()),r&2){let t=u();n(),R(" ",t.validationResult.errors[0]," "),n(),m("hidden",d(3,3,!t.validationResult.errors||t.validationResult.errors[0]!="events.registration.wizard.timeout-error")),n(2),m("ngForOf",t.validationResult.errors)}}function Hr(r,p){if(r&1&&(o(0,"div",25),h(1),l()),r&2){let t=u();n(),R(" ",t.saveError," ")}}var Ui=(()=>{let p=class p{constructor(a,i,e,c,P,b,_,B,v,w,A,F,f,E,g,y,C,z){this._entityService=g,this._tokenStorageService=y,this._identityProviderService=C,this._notificationService=z,this.eventId=0,this.registrationId=0,this.onRegistrationSaved=new U,this._registrationProfile=null,this.saveError="",this._attendeesLoaded=!1,this.initialLoadComplete=!1,this.registrationSuccess=!1,this.userName="",this.showLogout=!1,this.displayItemStepError=!1,this.displayAttendeeStepError=!1,this.displayPaymentStepError=!1,this.hideLoginButton=!1,this.registrationProfileChanged=M=>{this._registrationProfile=M,this.registrationWizardItemsComponent.getItemTotals(),this.registrationWizardPaymentInfoComponent.updateRegistrationWithSelectedPaymentMethod(),this.registrationWizardPaymentInfoComponent.refreshBenefits()},this.registrationItemsChanged=()=>{this.getAttendeesOverEventAttendeeMax().then(q=>{if(q>0&&this.lastItemsAttendeesOverMaxCount!=q){let W=this._translationService.getInstant("events.registration.wizard.exceeds-attendee-max-count-message-when-adding-attendees"),he=this.event.MaxAttendees-this.currentlySavedAttendeeCount;W=this._utilService.replaceAll(W,"{0}",he.toString()),this._notifyService.info(W)}this.lastItemsAttendeesOverMaxCount=q}),this.registrationWizardAttendeesComponent.updateAvailableAttendeeRegistrationItems(!this.registration.IsEdit||this._attendeesLoaded);let M=this.registration.Items.filter(q=>q.Quantity>0),Q=this.registration.Items.filter(q=>q.IsSponsorShip==!0&&q.Quantity>0);M.length>0?this.hasSelectedEventItems=!0:this.hasSelectedEventItems=!1,this.registrationWizardPaymentInfoComponent.updateAvailablePaymentMethods(),this.registrationWizardPaymentInfoComponent.updateRegistrationWithSelectedPaymentMethod(),this._registrationService.calculateTotals(this.registration),this.registration.Registration.TotalAmount==0&&this.registration.Registration.DiscountTotal==0,this.registrationWizardPaymentInfoComponent.refreshBenefits(),this.registrationWizardPaymentInfoComponent.showPromoCodes(),(this.items.length==3&&this.registration.Attendees.length>0||this.items.length==4&&this.registration.Attendees.length==0)&&(this.isMobileScreen?this.generateMobileViewSteps():this.generateSteps())},this.wizardCancel=()=>{this._translationService.get("events.registration.wizard.registration-are-you
2-sure-you-want-to-cancel-message").then(M=>{confirm(M)&&this._navService.navigateToEventDetail(this.eventId)})},this.wizardSave=M=>{this.reCaptchaResponseToken=M;let Q=JSON.parse(JSON.stringify(this.registration));Q.Items=Q.Items.filter(W=>W.Quantity>0);for(let W of Q.Attendees)W.CreateProfile==!0&&(W.ProfileId=0),W.Items=W.Items.filter(he=>he.Selected==!0);Q.Registration.CreateProfile==!0&&(Q.Registration.ProfileId=0);let q=this.getValidationResult();if(q.isValid==!1){let W="";for(let he of q.errors)W=he+". ";return}else this.isSaving=!0,this.registrationSuccess=!1,this.saveError="",this._registrationService.upsertRegistration(Q,this.reCaptchaResponseToken).then(W=>{let he=W.RegistrationHeaderId,Gi=W.RegistrationGuid,Zi=W.PaymentFailed;if(this.registrationSuccess=W.RegistrationCreated,!Zi&&this.registrationSuccess)this._notifyService.success(this._translationService.getInstantTitlecase("events.registration.wizard.save-success-message"));else if(W.PaymentFailed&&(this._notificationService.error(W.ErrorMessage),!this.registrationSuccess))return this.isSaving=!1,!1;this.onRegistrationSaved.emit(he),this.registration=new Y,this._navService.navigateToEventRegistrationSummary(this.eventId,he,Gi,this._entityDomainId,this._secureRedirect,this._settingBatch)},W=>{this.validationResult.isValid=!1,(W.status==408||W.status==503)&&this.validationResult.errors.push(this._translationService.getInstant("events.registration.wizard.timeout-error")),this.validationResult.errors.push(W.error.Message),this.isSaving=!1}).finally(()=>{this.isSaving=!1})},this.getValidationResult=()=>{let M=new te;M.isValid=!0;let Q="";if(this.registrationWizardContactComponent.getValidationResult().isValid==!1){M.isValid=!1;for(let q of this.registrationWizardContactComponent.getValidationResult().errors)M.errors.push(q)}if(this.registrationWizardItemsComponent.getValidationResult().isValid==!1){M.isValid=!1;for(let q of this.registrationWizardItemsComponent.getValidationResult().errors)M.errors.push(q)}if(this.registrationWizardAttendeesComponent.getValidationResult().isValid==!1){M.isValid=!1;for(let q of this.registrationWizardAttendeesComponent.getValidationResult().errors)M.errors.push(q)}if(this.registrationWizardPaymentInfoComponent.getValidationResult().isValid==!1){M.isValid=!1;for(let q of this.registrationWizardPaymentInfoComponent.getValidationResult().errors)M.errors.push(q)}return this.reCaptchaResponseToken||(M.isValid=!1,M.errors.push(this._translationService.getInstant("common.please-submit-recaptcha"))),this.validationResult=M,M},this._utilService=c,this._route=e,this._navService=a,this._registrationService=P,this._dialogService=b,this._notifyService=_,this._translationService=B,this._profileService=v,this._configService=w,this._configSettingService=A,this._router=F,this._containerService=f,this._topNavBroadcastService=E,this.eventId=0,this._entityDomainId=0,this.registrationId=0,this.event=new X,this.registration=new Y,this._eventService=i,this.selectedTab=this.tabItems,this.validationResult=new te,this.hasSelectedEventItems=!1,this.isSaving=!1,this.initialLoadComplete=!1,this.appContext=new ii,this.assocInfo=new ni,this.userName="",this.assocName="",this.showLogout=!1,this.isLoggedIn=!1,this.configSettings=new Array,this.exceedsMaxAttendeeCount=!1,this.displayMaxAttendeeCountDialogMessage=!1,this.lastItemsAttendeesOverMaxCount=-99998,this.currentlySavedAttendeeCount=0,this.intialLoadComplete=!1,this.loginInfoText="",this.activeStepIndex=0}ngOnInit(){this.isMobileScreen=window.innerWidth<=520,this.isMobileScreen?this.generateMobileViewSteps():this.items=[{label:this._translationService.getInstantTitlecase("events.registration.wizard.contact.title")},{label:this._translationService.getInstantTitlecase("events.registration.wizard.items.title")},{label:this._translationService.getInstantTitlecase("common.submit")}],this.isLoggedIn=this._tokenStorageService.hasValidUserTypeAccessToken(),this._configService.getConfigSetting("SignInButtonText").then(a=>{this._utilService.isNotNullEmptyOrWhitespace(a.SettingValue)?this.loginInfoText=a.SettingValue:this._translationService.get("events.registration.wizard.click-to-log-in-message").then(i=>{this.loginInfoText=i})}),this._configService.getSpecificConfigSetting("EventRegistration","HideLogInButton").then(a=>{this.hideLoginButton=a.SettingValue.toLowerCase()=="true",this._utilService.isNotNullEmptyOrWhitespace(a.SettingValue)&&(a.SettingValue.toLowerCase()=="true"?this._topNavBroadcastService.broadcast({type:yt.hideLogin}):this._topNavBroadcastService.broadcast({type:yt.showLogin}))}),this._route.params.subscribe(a=>{if(this._utilService.isNotNullOrUndefined(a.id)){let i=a.id;this._utilService.isNumeric(i)&&(this.eventId=Number(i))}if(this._utilService.isNotNullOrUndefined(a.nameid)){let e=a.nameid.split("-");if(e.length>0){let c=e[e.length-1];this._utilService.isNumeric(c)&&(this.eventId=Number(c))}}if(this.eventId>0){let i=this._configService.getAssocInfo(),e=Promise.resolve(new Je),c=this._configSettingService.getConfigSettingsForSettingGroup("EventRegistration"),P=this._eventService.getEventRead(this.eventId);Promise.all([i,e,c,P]).then(b=>{this.assocInfo=b[0],this.configSettings=b[2],this.event=b[3],this.openRegistrationWizard(this.event,this.registrationId,0,this.configSettings);let _=this._utilService.getMediumDateStringNoTime(this.event.StartDateTimeUtc),B=this._utilService.getMediumDateStringNoTime(this.event.EndDateTimeUtc),v=this._utilService.getTimeString(this.event.StartDateTimeUtc),w=this._utilService.getTimeString(this.event.EndDateTimeUtc);if(this.dateHeader="",this.event.EventDateTimes?.length>1){let F=[...new Set(this.event.EventDateTimes.map(g=>g.EventDate))].sort((g,y)=>g.valueOf()-y.valueOf()),f=this._utilService.getMediumDateStringNoTime(F[0]),E=this._utilService.getMediumDateStringNoTime(F[F.length-1]);this.dateHeader=f+" - "+E}else if(this._utilService.isNotNullEmptyOrWhitespace(v))this.event.EndDateTimeUtc>this.event.StartDateTimeUtc&&(_==B?(this.dateHeader=_+" "+v,this.dateHeader+=" - "+w):(this.dateHeader=_+" "+v,this.dateHeader+=" - "+B+" "+w));else{var A=this.event.StartDateTimeUtc;
2A.setUTCHours(this.event.StartDateTimeUtc.getUTCHours()+this.event.StartDateTimeUtc.getTimezoneOffset()/60),this.dateHeader=this._utilService.getMediumDateStringNoTime(A)}this.event.IsAllDay&&(this.dateHeader=_,_!==B&&this._utilService.isNotNullEmptyOrWhitespace(B)&&(this.dateHeader+=" - "+B),this._translationService.get("events.registration.wizard.all-day-event").then(F=>{this.dateHeader+=" - "+F})),this.intialLoadComplete=!0})}}),this._route.queryParams.subscribe(a=>{this._utilService.isNotNullEmptyOrWhitespace(a.entityDomainId)&&(this._entityDomainId=Number(a.entityDomainId)),this._utilService.isNotNullEmptyOrWhitespace(a.secure)?this._secureRedirect=a.secure.toLocaleLowerCase()=="true":this._secureRedirect=!0,this._utilService.isNotNullEmptyOrWhitespace(a.settingBatch)&&(this._settingBatch=a.settingBatch)})}ngOnDestroy(){this._containerService.setComponentTitle(""),this._containerService.setComponentOrgNameText(""),this._containerService.setComponentSubTitle("")}openRegistrationWizard(a,i,e=0,c){this.initialLoadComplete=!1,this.saveError="",this._attendeesLoaded=!1,this._utilService.isNullOrUndefined(a)?this.event=new X:this.event=a,this.getAttendeesOverEventAttendeeMax().then(b=>{if(b>=0){let _=this._translationService.getInstant("events.registration.wizard.exceeds-attendee-max-count-message");this._notifyService.warn(_)}}),this.eventId=Number(a.EventId),this._utilService.isNullOrUndefined(i)&&(i=0),this.registrationId=Number(i),this.registration=new Y,this.registration.EventId=this.eventId,this.registration.RegistrationId=this.registrationId,this.registrationId>0?this.registration.IsEdit=!0:this.registration.IsEdit=!1,this.registrationWizardContactComponent.event=this.event,this.registrationWizardItemsComponent.event=this.event,this.registrationWizardAttendeesComponent.event=this.event,this.registrationWizardPaymentInfoComponent.event=this.event,this.registrationWizardContactComponent.configSettings=this.configSettings,this.registrationWizardItemsComponent.configSettings=this.configSettings,this.registrationWizardAttendeesComponent.configSettings=this.configSettings,this.registrationWizardPaymentInfoComponent.configSettings=this.configSettings,this._registrationService.getRegistrationHeaderMin(this.registrationId).then(b=>{if(this._utilService.mapSafe(b,this.registration.Registration),b&&b.ProfileId)return this._profileService.getProfileMin(b.ProfileId).then(_=>this._registrationProfile=_);this._registrationProfile=null}).then(()=>{this.initialLoadComplete=!0;let b=this;b.registrationWizardAttendeesComponent.setWillBeLoadingNext(),this.registrationWizardContactComponent.registration=this.registration,this.registrationWizardItemsComponent.registration=this.registration,this.registrationWizardAttendeesComponent.registration=this.registration,this.registrationWizardPaymentInfoComponent.registration=this.registration,this.registrationWizardContactComponent.registrationId=this.registrationId,this.registrationWizardItemsComponent.registrationId=this.registrationId,this.registrationWizardAttendeesComponent.registrationId=this.registrationId,this.registrationWizardPaymentInfoComponent.registrationId=this.registrationId,this.registrationWizardContactComponent.loadData();let _=()=>b.registrationWizardAttendeesComponent.loadData().then(()=>b._attendeesLoaded=!0,()=>b._attendeesLoaded=!0);this.registrationWizardItemsComponent.loadData().then(()=>_(),()=>_()),this.registrationWizardPaymentInfoComponent.loadData(),setTimeout(()=>{this.initialLoadComplete=!0},1e3)})}handleAttendeeCustomFieldResponseChange(){this._registrationService.calculateTotals(this.registration)}onReCaptchaResponse(a){this.reCaptchaResponseToken=a}handleAttendeeNavAddNewAttendeeClick(){this.tabAttendees.enabled&&(this.tabsComponent.select(this.tabAttendees),setTimeout(()=>this.registrationWizardAttendeesComponent.addNewAttendee()))}handleAttendeeNavAttendeeClick(a){this.tabAttendees.enabled&&(this.tabsComponent.select(this.tabAttendees),setTimeout(()=>this.registrationWizardAttendeesComponent.scrollToAttendee(a)))}getAttendeesOverEventAttendeeMax(){return this.event.MaxAttendees>0?this._eventService.getPotentialAttendeeCount(this.eventId).then(a=>{this.currentlySavedAttendeeCount=a;let i=this.event.MaxAttendees,e=0,c=0;e=this.currentlySavedAttendeeCount+this.registration.Attendees.length;let P=e-i;return e>i?this.exceedsMaxAttendeeCount=!0:this.exceedsMaxAttendeeCount=!1,this.registrationWizardPaymentInfoComponent.exceedsMaxAttendeeCount=this.exceedsMaxAttendeeCount,Promise.resolve(P)}):(this.exceedsMaxAttendeeCount=!1,this.registrationWizardPaymentInfoComponent.exceedsMaxAttendeeCount=this.exceedsMaxAttendeeCount,Promise.resolve(-99999))}onActiveIndexChange(a){this.activeStepIndex=a,this.isMobileScreen?this.generateMobileViewSteps():this.generateSteps(),this.setDisplayStepErrors()}incrementStepper(){this.activeStepIndex++,this.isMobileScreen?this.generateMobileViewSteps():this.generateSteps(),this.setDisplayStepErrors()}decrementStepper(){this.activeStepIndex--,this.isMobileScreen?this.generateMobileViewSteps():this.generateSteps(),this.setDisplayStepErrors()}
2login(){this._identityProviderService.initialize(),this._identityProviderService.authorizeCodeFlowRequestCode(window.location.href)}setDisplayStepErrors(){switch(this.activeStepIndex){case 1:this.displayItemStepError=!0;break;case 2:this.displayAttendeeStepError=!0;break;case 3:this.displayPaymentStepError=!0;break}}generateSteps(){let a=this._translationService.getInstantTitlecase("common.submit");this.registration.Registration.AdditionalPaymentAmountForEdit>0&&(a=this._translationService.getInstantTitlecase("events.registration.wizard.payment-info.submit-and-pay"));let i={label:this._translationService.getInstantTitlecase("events.registration.wizard.contact.title")+(this.registrationWizardContactComponent.contactForm.valid?"":"*"),styleClass:this.registrationWizardContactComponent.contactForm?.valid?"":"steps-error"},e={label:this._translationService.getInstantTitlecase("events.registration.wizard.items.title")+(!this.hasSelectedEventItems&&this.displayItemStepError?"*":""),styleClass:!this.hasSelectedEventItems&&this.displayItemStepError?"steps-error":""},c={label:this._translationService.getInstantTitlecase("events.registration.wizard.attendees.title")+(this.displayAttendeeStepError&&!this.registrationWizardAttendeesComponent.attendeeForm.valid?"*":""),styleClass:this.displayAttendeeStepError&&!this.registrationWizardAttendeesComponent.attendeeForm?.valid?"steps-error":""},P={label:a+(this.displayPaymentStepError&&!this.registrationWizardPaymentInfoComponent.paymentInfoForm.valid&&this.registrationWizardPaymentInfoComponent.selectedCcPaymentProfileId==0&&this.registration.Registration.AdditionalPaymentAmountForEdit>0&&this.registration.Registration.PaymentOption==3?"*":""),styleClass:this.displayPaymentStepError&&!this.registrationWizardPaymentInfoComponent.paymentInfoForm?.valid&&this.registrationWizardPaymentInfoComponent.selectedCcPaymentProfileId==0&&this.registration.Registration.AdditionalPaymentAmountForEdit>0&&this.registration.Registration.PaymentOption==3?"steps-error":""};this.items=[],this.items.push(i),this.items.push(e),this.registration.Attendees.length>0&&this.items.push(c),this.items.push(P)}generateMobileViewSteps(){let a=this._translationService.getInstantTitlecase("common.submit");this.registration.Registration.AdditionalPaymentAmountForEdit>0&&(a=this._translationService.getInstantTitlecase("events.registration.wizard.payment-info.submit-and-pay"));let i={label:this.activeStepIndex==0?this._translationService.getInstantTitlecase("events.registration.wizard.contact.title"):""},e={label:this.activeStepIndex==1?this._translationService.getInstantTitlecase("events.registration.wizard.items.title"):""},c={label:this.activeStepIndex==2?this._translationService.getInstantTitlecase("events.registration.wizard.attendees.title"):""},P={label:this.activeStepIndex==3?a:""};this.items=[],this.items.push(i),this.items.push(e),this.registration.Attendees.length>0&&this.items.push(c),this.items.push(P)}onWindowResize(){let a=window.innerWidth;a<=520&&!this.isMobileScreen?(this.isMobileScreen=!0,this.generateMobileViewSteps()):a>520&&this.isMobileScreen&&(this.isMobileScreen=!1,this.generateSteps())}};p.\u0275fac=function(i){return new(i||p)(x(rt),x(Oe),x(Wt),x($),x(K),x(Ot),x(qe),x(J),x(Ve),x(Lt),x(ee),x(Nt),x(ri),x(ai),x(pt),x(Ft),x($e),x(qe))},p.\u0275cmp=ie({type:p,selectors:[["wl-event-v4-event-v4-registration-wizard"]],viewQuery:function(i,e){if(i&1&&(j(Vr,5),j(Mr,5),j(Tr,5),j(Br,5),j(zr,5),j(Fr,5),j(Wr,5),j(Nr,5),j(Or,5),j(Dr,5),j(Lr,5),j(kr,5)),i&2){let c;H(c=G())&&(e.registrationForm=c.first),H(c=G())&&(e.tabsComponent=c.first),H(c=G())&&(e.tabItems=c.first),H(c=G())&&(e.tabContact=c.first),H(c=G())&&(e.tabAttendees=c.first),H(c=G())&&(e.tabPayment=c.first),H(c=G())&&(e.tabSponsor=c.first),H(c=G())&&(e.registrationWizardAttendeesComponent=c.first),H(c=G())&&(e.registrationWizardItemsComponent=c.first),H(c=G())&&(e.registrationWizardContactComponent=c.first),H(c=G())&&(e.registrationWizardPaymentInfoComponent=c.first),H(c=G())&&(e.registrationWizardSponsorComponent=c.first)}},hostBindings:function(i,e){i&1&&T("resize",function(P){return e.onWindowResize(P)},Pt)}
2,outputs:{onRegistrationSaved:"onRegistrationSaved"},standalone:!1,features:[ve([Oe,K,ee,pt])],decls:38,vars:28,consts:[["registrationWizardContactComponent",""],["registrationWizardItemsComponent",""],["registrationWizardAttendeesComponent",""],["registrationWizardPaymentInfoComponent",""],[1,"container-fluid",3,"hidden"],[1,"row"],[1,"col-sm-12"],["src","assets/img/loading_2x.gif","alt","Loading..."],[1,"mb-50"],["fxLayout","row","fxLayoutAlign","space-between center",1,"header","p-17",3,"hidden"],[1,"m-5"],["fxLayout","row","class","login-prompt p-17 mb-27 f-wb clickable","fxLayoutAlign","center center",3,"hidden","click",4,"ngIf"],[1,"highlight-box",3,"hidden"],[1,"mobile-width","width"],[3,"activeIndexChange","model","readonly","activeIndex"],["fxLayout","column","fxLayout.lt-md","column","fxLayoutAlign","space-between none",1,"mt-50",3,"hidden"],[3,"hidden"],[3,"onRegistrationProfileChanged","onCancel","onIncrementStepper"],[3,"onCancel","onIncrementStepper","onDecrementStepper","onRegistrationItemsChanged"],[3,"customFieldResponseChange","onCancel","onIncrementStepper","onDecrementStepper","registrationProfile"],["name","paymentInfoInput","ngModelGroup","registrationWizardPaymentInfoFields",3,"onCancel","onDecrementStepper","onSave","hasSelectedEventItems","isSaving","exceedsMaxAttendeeCount","registrationSuccess","contactFormValid","attendeeFormValid"],["fxLayout","column","fxLayoutAlign","space-between end",1,"mt-10"],["class","alert alert-danger",4,"ngIf"],["fxLayout","row","fxLayoutAlign","center center",1,"login-prompt","p-17","mb
2-27","f-wb","clickable",3,"click","hidden"],[3,"onAddAttendee","onAttendeeClick","attendees","enableNewButton"],[1,"alert","alert-danger"],[4,"ngFor","ngForOf"]],template:function(i,e){if(i&1){let c=O();o(0,"div",4)(1,"div",5)(2,"div",6),Z(3,"img",7),l()()(),o(4,"div",8)(5,"div",9)(6,"h1",10),h(7),l(),o(8,"h2",10),h(9),l()(),V(10,qr,2,2,"div",11),o(11,"div",12)(12,"h2"),h(13),s(14,"translate"),s(15,"titlecase"),l()()(),o(16,"div",13)(17,"p-steps",14),T("activeIndexChange",function(b){return I(c),S(e.onActiveIndexChange(b))}),l(),o(18,"div",15)(19,"form")(20,"div")(21,"div",16)(22,"wl-event-v4-registration-wizard-contact",17,0),T("onRegistrationProfileChanged",function(b){return I(c),S(e.registrationProfileChanged(b))})("onCancel",function(){return I(c),S(e.wizardCancel())})("onIncrementStepper",function(){return I(c),S(e.incrementStepper())}),l()(),o(24,"div",16)(25,"wl-event-v4-registration-wizard-items",18,1),T("onCancel",function(){return I(c),S(e.wizardCancel())})("onIncrementStepper",function(){return I(c),S(e.incrementStepper())})("onDecrementStepper",function(){return I(c),S(e.decrementStepper())})("onRegistrationItemsChanged",function(){return I(c),S(e.registrationItemsChanged())}),l()(),o(27,"div",16)(28,"wl-event-v4-registration-wizard-attendees",19,2),T("customFieldResponseChange",function(){return I(c),S(e.handleAttendeeCustomFieldResponseChange())})("onCancel",function(){return I(c),S(e.wizardCancel())})("onIncrementStepper",function(){return I(c),S(e.incrementStepper())})("onDecrementStepper",function(){return I(c),S(e.decrementStepper())}),l()(),o(30,"div",16)(31,"wl-event-v4-registration-wizard-payment-info",20,3),T("onCancel",function(){return I(c),S(e.wizardCancel())})("onDecrementStepper",function(){return I(c),S(e.decrementStepper())})("onSave",function(b){return I(c),S(e.wizardSave(b))}),l()()(),V(33,Qr,1,2,"ng-template"),l(),o(34,"div",21)(35,"div"),V(36,jr,5,5,"div",22)(37,Hr,2,1,"div",22),l()()()()}if(i&2){let c=ae(23),P=ae(29);m("hidden",e.intialLoadComplete==!0),n(5),m("hidden",e.intialLoadComplete==!1),n(2),N(e.event.EventName),n(2),N(e.dateHeader),n(),m("ngIf",!e.hideLoginButton),n(),m("hidden",e.intialLoadComplete==!1||e.event.DisableRegistration==!1),n(2),N(d(15,26,d(14,24,"events.registration.wizard.registration-disabled-message"))),n(4),m("model",e.items)("readonly",!1)("activeIndex",e.activeStepIndex),n(),m("hidden",e.intialLoadComplete==!1||e.event.DisableRegistration==!0),n(3),m("hidden",e.activeStepIndex!=0),n(3),m("hidden",e.activeStepIndex!=1),n(3),m("hidden",e.activeStepIndex!=2||e.registration.Attendees.length==0),n(),m("registrationProfile",e._registrationProfile),n(2),m("hidden",e.activeStepIndex!=3&&e.registration.Attendees.length>0||e.activeStepIndex!=2&&e.registration.Attendees.length==0),n(),m("hasSelectedEventItems",e.hasSelectedEventItems)("isSaving",e.isSaving)("exceedsMaxAttendeeCount",e.exceedsMaxAttendeeCount)("registrationSuccess",e.registrationSuccess)("contactFormValid",c.contactForm==null?null:c.contactForm.valid)("attendeeFormValid",P.attendeeForm==null?null:P.attendeeForm.valid),n(5),m("ngIf",!e.validationResult.isValid&&e.validationResult.errors.length>0),n(),m("ngIf",!e.registration.IsEdit&&e.saveError!="")}},dependencies:[se,le,Se,Ce,ze,Ie,me,pe,gi,zi,Wi,Di,ki,Qi,de,re],styles:[".header[_ngcontent-%COMP%]{background-color:#f1f1f1;text-align:center;width:100%}.login-prompt[_ngcontent-%COMP%]{background-color:var(--secondary-brand-color);color:var(--secondary-brand-fore-color)!important}.clickable[_ngcontent-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] .steps-error .p-steps-title{color:#ac1e2d!important}[_nghost-%COMP%] .p-menuitem-link, .p-menuitem-link[_ngcontent-%COMP%]:hover{text-decoration:none}[_nghost-%COMP%] .p-menuitem-link:focus{outline:none}@media screen and (max-width:440px){.mobile-width[_ngcontent-%COMP%]{max-width:100%;margin:auto}}@media screen and (min-width:450px){.width[_ngcontent-%COMP%]{max-width:80%;margin:auto}}"]});let r=p;return r})();var Gr=[{path:"register/:nameid",component:Ui,canActivate:[pi]}],ji=(()=>{let p=class p{};p.\u0275fac=function(i){return new(i||p)},p.\u0275mod=ue({type:p}),p.\u0275inj=fe({imports:[Ae.forChild(Gr),Ae]});let r=p;return r})();var Hi=(()=>{let p=class p{};p.\u0275fac=function(i){return new(i||p)},p.\u0275mod=ue({type:p}),p.\u0275inj=fe({imports:[ji,wi,fi,ei,Ti,Ye]});let r=p;return r})();var pl=(()=>{let p=class p{};p.\u0275fac=function(i){return new(i||p)},p.\u0275mod=ue({type:p}),p.\u0275inj=fe({imports:[Ye,Bi,Hi]});let r=p;return r})();export{pl as EventsV4Module};
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.