1"use strict";(self.webpackChunkvoyager_member_ui=self.webpackChunkvoyager_member_ui||[]).push([[672],{80672:(cs,J,m)=>{m.r(J),m.d(J,{PackagesModule:()=>ns});var b=m(69808),v=m(30325),w=m(22955),P=m(21793),ee=m(98723),M=m(92545),h=m(30839),Z=m(36317),k=m(76065),B=m(54120),N=m(46332),y=m(97800),q=m(71505),te=m(26253),e=m(5e3),ie=m(22313),O=m(48966),F=m(63578),G=m(24642),U=m(9169),c=m(93075),se=m(76247),re=m(47294),ae=m(69109);const Q=function(s){return{"category-active":s}};function ne(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"li",25)(1,"a",26),e.NdJ("click",function(){const a=e.CHM(t).$implicit,o=e.oxw(2);return o.getFilteredMembershipByCategory(a.MembershipCategoryID),o.triggerCustomPopUpEvents(o.popupTrigger.OnClick)})("mouseenter",function(r){return e.CHM(t),e.oxw(2).onMouseHover(r)}),e.TgZ(2,"div",24),e._uU(3),e.qZA(),e.TgZ(4,"span",27),e._uU(5),e.qZA()()()}if(2&s){const t=n.$implicit,i=e.oxw(2);e.Q6J("ngClass",e.VKq(3,Q,i.selectedMembershipCategory===t.MembershipCategoryID)),e.xp6(3),e.hij(" ",null==t?null:t.CategoryName,""),e.xp6(2),e.Oqu(null==t?null:t.MembershipCount)}}function oe(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",19)(1,"div",20)(2,"ul",21)(3,"li",22)(4,"a",23)(5,"div",24),e._uU(6,"Categories"),e.qZA()()(),e.TgZ(7,"li",25)(8,"a",26),e.NdJ("click",function(){e.CHM(t);const r=e.oxw();return r.getFilteredMembershipByCategory(0),r.triggerCustomPopUpEvents(r.popupTrigger.OnClick)})("mouseenter",function(r){return e.CHM(t),e.oxw().onMouseHover(r)}),e.TgZ(9,"div",24),e._uU(10,"All"),e.qZA(),e.TgZ(11,"span",27),e._uU(12),e.qZA()()(),e.YNc(13,ne,6,5,"li",28),e.qZA()()()}if(2&s){const t=e.oxw();e.xp6(7),e.Q6J("ngClass",e.VKq(3,Q,null===t.selectedMembershipCategory)),e.xp6(5),e.Oqu(t.totalRecord),e.xp6(1),e.Q6J("ngForOf",t.MembershipCategoryList)}}function me(s,n){if(1&s&&(e.TgZ(0,"h6"),e._uU(1),e.ALo(2,"currency"),e.ALo(3,"currency"),e.qZA()),2&s){const t=e.oxw(2).$implicit,i=e.oxw(2);e.xp6(1),e.hij(" ",null==t.DurationTypeID?e.gM2(2,1,t.SinglePrice,i.currencyFormat,"symbol","1.2-2"):e.gM2(3,6,t.RecurringPrice,i.currencyFormat,"symbol","1.2-2")," ")}}function he(s,n){1&s&&(e.TgZ(0,"h6"),e._uU(1,"\xa0"),e.qZA())}function le(s,n){if(1&s&&(e.TgZ(0,"p",42),e._uU(1),e.qZA()),2&s){const t=e.oxw(2).$implicit;e.xp6(1),e.Oqu(t.DurationTypeName)}}function de(s,n){1&s&&(e.TgZ(0,"p",42),e._uU(1,"\xa0"),e.qZA())}function ce(s,n){if(1&s&&(e.TgZ(0,"div",43)(1,"button",44),e._uU(2),e.qZA()()),2&s){const t=e.oxw(4);e.xp6(1),e.Q6J("disabled",!0),e.xp6(1),e.Oqu(t.isRevolution_Lifestyle?"Enquired":"Inquired")}}const ue=function(s){return["inquire-package",s]};function pe(s,n){if(1&s&&(e.TgZ(0,"div",43)(1,"button",45),e._uU(2),e.qZA()()),2&s){const t=e.oxw(2).$implicit,i=e.oxw(2);e.xp6(1),e.Q6J("disabled",t.IsCustomerSoldOut)("routerLink",e.VKq(3,ue,t.MembershipID)),e.xp6(1),e.Oqu(i.isRevolution_Lifestyle?"Enquire":"Inquire")}}function ge(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",43)(1,"a",46),e.NdJ("click",function(){e.CHM(t);const r=e.oxw(2).$implicit,a=e.oxw(2);return a.posMembershipDetails(r),a.triggerCustomPopUpEvents(a.popupTrigger.OnClick)})("mouseenter",function(r){return e.CHM(t),e.oxw(4).onMouseHover(r)}),e._uU(2,"Buy Now"),e.qZA()()}}function _e(s,n){1&s&&(e.TgZ(0,"div",43)(1,"button",44),e._uU(2,"Sold Out "),e.qZA()()),2&s&&(e.xp6(1),e.Q6J("disabled",!0))}function ye(s,n){1&s&&(e.TgZ(0,"div",43)(1,"button",44),e._uU(2,"Joined "),e.qZA()()),2&s&&(e.xp6(1),e.Q6J("disabled",!0))}function be(s,n){if(1&s&&(e.ynx(0),e.TgZ(1,"div",31)(2,"div",32),e._UZ(3,"img",33),e.TgZ(4,"div",34)(5,"h4"),e._uU(6),e.qZA(),e._UZ(7,"p",35),e.ALo(8,"safeHtml"),e.TgZ(9,"div",36)(10,"div",37),e.YNc(11,me,4,11,"h6",30),e.YNc(12,he,2,0,"h6",30),e.YNc(13,le,2,1,"p",38),e.YNc(14,de,2,0,"p",38),e.qZA(),e.TgZ(15,"div",39)(16,"div",40),e.YNc(17,ce,3,2,"div",41),e.YNc(18,pe,3,5,"div",41),e.YNc(19,ge,3,0,"div",41),e.YNc(20,_e,3,1,"div",41),e.YNc(21,ye,3,1,"div",41),e.qZA()()()()()(),e.BQk()),2&s){const t=e.oxw().$implicit,i=e.oxw(2);e.xp6(3),e.s9C("src",t.ImagePath,e.LSH),e.xp6(3),e.Oqu(t.MembershipName),e.xp6(1),e.Q6J("innerHtml",e.lcZ(8,12,t.Description),e.oJD),e.xp6(4),e.Q6J("ngIf",!t.IsHidePriceOnline),e.xp6(1),e.Q6J("ngIf",t.IsHidePriceOnline),e.xp6(1),e.Q6J("ngIf",t.DurationTypeName&&!t.IsHidePriceOnline),e.xp6(1),e.Q6J("ngIf",!t.DurationTypeName||t.IsHidePriceOnline),e.xp6(3),e.Q6J("ngIf",t.IsEnquired),e.xp6(1),e.Q6J("ngIf",!t.IsEnquired&&t.IsEnquiryAllowed&&i.IsShowInquireMembershipButtonOnline),e.xp6(1),e.Q6J("ngIf",!t.IsSoldOut&&!t.IsCustomerSoldOut),e.xp6(1),e.Q6J("ngIf",!(t.IsCustomerSoldOut&&t.IsSoldOut)&&t.IsSoldOut),e.xp6(1),e.Q6J("ngIf",t.IsCustomerSoldOut)}}
1function Me(s,n){if(1&s&&(e.ynx(0),e.YNc(1,be,22,14,"ng-container",30),e.BQk()),2&s){const t=n.$implicit;e.xp6(1),e.Q6J("ngIf",!t.IsSharedPrivately)}}function Ce(s,n){if(1&s&&(e.TgZ(0,"div",15),e.YNc(1,Me,2,1,"ng-container",29),e.ALo(2,"searchMemberShipName"),e.ALo(3,"sort"),e.qZA()),2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",e.xi3(2,1,e.xi3(3,4,t.posFilteredMemberships,t.sortByField),t.searchText))}}function ve(s,n){if(1&s&&(e.TgZ(0,"div",15)(1,"div",47)(2,"div",48)(3,"h5",49),e._uU(4),e.qZA()()()()),2&s){const t=e.oxw();e.xp6(4),e.hij("No ",t.pageTitle,"")}}let fe=(()=>{class s extends w.G{constructor(t,i,r,a,o,l,p,d,g,u){super(null),this._posMembershipService=t,this.sanitizer=i,this._dialog=r,this._messageService=a,this._dataSharingService=o,this._loginService=l,this._router=p,this._taxCalculationService=d,this.route=g,this._commonService=u,this.sortByField="MembershipName",this.searchText="",this.defaultImagePath="/assets/images/Membership-Header.jpg",this.MembershipCategoryList=[],this.membershipID=null,this.totalRecord=0,this.isUrlAppendedCategoryExists=!1,this.serverImageAddress="",this.messages=M.TS.Messages,this._durationType=h.Er,this._durationTypeName=M.GT,this.headerBannerEnum=h.bj,this.popupTrigger=h.sU,this.PricingStyleSetting=new P.IK}ngOnInit(){this.isHomeLoadSubscription=this._dataSharingService.isLoadedHome.subscribe(t=>{if(t){let i=super.getCurrentBranchSettings(this._dataSharingService);this.hasPaymentGatewayIntegrated=this.getBuyMembershipGatewayID()>0,this.branch=this._loginService.getBranch(),this.serverImageAddress=q.N.environment.imageUrl.replace("{CompanyID}",localStorage.getItem(y.R.CompanyID))+"BR"+localStorage.getItem(y.R.BranchID)+"/",this.setMembershipBanner(),this.isCompanyWhydrate=this.branch.CompanyID,this.isRevolution_Lifestyle=494===this.branch.CompanyID&&552===this.branch.BranchID||499===this.branch.CompanyID&&557===this.branch.BranchID,i&&(this.IsShowInquireMembershipButtonOnline=i.IsShowInquireMembershipButtonOnline),setTimeout(()=>{this.getPOSMemberships()},200),this.getCustomerDetail()}}),this.branchDetail=super.getCurrentBranch(this._dataSharingService),null!=this.branchDetail&&(this.currencyFormat=this.branchDetail.CurrencySymbol),this.getAndShowCustomPopUps()}ngOnDestroy(){var t,i,r,a;null===(t=this.isHomeLoadSubscription)||void 0===t||t.unsubscribe(),null===(i=this.isUserLoggedInSubscription)||void 0===i||i.unsubscribe(),null===(r=this.isGuestUserSubscription)||void 0===r||r.unsubscribe(),null===(a=this.delaySubscription)||void 0===a||a.unsubscribe()}setMembershipBanner(){let t=super.getCurrentBranchSettings(this._dataSharingService);t&&(this.PricingStyleSetting=t.PricingStyleSetting,this.BranchIncludeTax=t.BranchIncludeTax,this.pageTitle=this._commonService.setCustomNameForUrl(h.R1.Packages,t),t.Banner&&t.Banner.PackageBanner&&""!=t.Banner.PackageBanner?(this.bannerImagePath=this.serverImageAddress+t.Banner.PackageBanner,this.hasImage=!!this.bannerImagePath,this.bannerImagePath=this.serverImageAddress+t.Banner.PackageBanner):this.hasImage=!!this.bannerImagePath)}posMembershipDetails(t){this.membershipID=t.MembershipID,t.PackageTypeId=h.yR.Package,this.setCustomUrlParam(),this._dialog.open(te.L,{disableClose:!0,data:t}).componentInstance.isClosed.subscribe(r=>{r&&(this.membershipID=null,this.setCustomUrlParam())})}getPOSMemberships(){this.posMemberships=[],this._posMembershipService.getPOSMemberships(!0).subscribe(t=>{this.response=t},t=>{var i;return this._messageService.showErrorMessage(this.messages.get_error.replace("{0}",`${null===(i=this.pageTitle)||void 0===i?void 0:i.toLowerCase()}`))},()=>{var t,i;this.hasMemberships=!!(this.response&&this.response.Result&&this.response.Result.MembershipList&&this.response.Result.MembershipList.length>0),this.hasMemberships&&(this.posMemberships=this.response.Result.MembershipList,this.hasMemberships=(null===(t=this.posMemberships.filter(r=>0==r.IsSharedPrivately))||void 0===t?void 0:t.length)>0,this.MembershipCategoryList=this.response.Result.MembershipCategoryList?this.response.Result.MembershipCategoryList:[],this.totalRecord=null===(i=this.posMemberships.filter(r=>0==r.IsSharedPrivately))||void 0===i?void 0:i.length,this.posFilteredMemberships=this.posMemberships,this.selectedMembershipCategory=null,this.getFilteredMembershipByCategory(0),this.getMembershipCountByCategory(),this.posFilteredMemberships.forEach(r=>{var a,o,l,p;let d=null===(a=null==r?void 0:r.MembershipMediaList)||void 0===a?void 0:a.some(g=>g.IsDefault);if(r.ImagePath=(null==r?void 0:r.MembershipMediaList)&&(null===(o=null==r?void 0:r.MembershipMediaList)||void 0===o?void 0:o.length)>0&&d?this.serverImageAddress+(null===(p=null===(l=null==r?void 0:r.MembershipMediaList)||void 0===l?void 0:l.find(g=>g.IsDefault))||void 0===p?void 0:p.ImagePath):"../../assets/images/dummy_feed_image.png",null!=r.DurationTypeID)switch(r.DurationTypeID){case this._durationType.Days:r.DurationTypeName="Per "+this._durationTypeName.Day;break;case this._durationType.Months:r.DurationTypeName="Per "+this._durationTypeName.Month;break;case this._durationType.Quarter:r.DurationTypeName="Per "+this._durationTypeName.Quarter;break;case this._durationType.Weeks:r.DurationTypeName="Per "+this._durationTypeName.Week;break;case this._durationType.SixMonth:r.DurationTypeName="Per "+this._durationTypeName.SixMonth;break;case this._durationType.Fortnightly:r.DurationTypeName="Per "+this._durationTypeName.Fortnightly;break;case this._durationType.FourWeeks:r.DurationTypeName="Per "+this._durationTypeName.FourWeeks;break;case this._durationType.Yearly:r.DurationTypeName="Per "+this._durationTypeName.Yearly}r.RecurringPrice=this.BranchIncludeTax?this._taxCalculationService.getItemTotalPriceIncludingTax(r.RecurringPrice,r.RecurringTaxPercentage):r.RecurringPrice,r.SinglePrice=this.BranchIncludeTax?this._taxCalculationService.getItemTotalPriceIncludingTax(r.SinglePrice,r.SingleTaxPercentage):r.SinglePrice,r.FilteredPrice=r.RecurringPrice>0?r.RecurringPrice:r.SinglePrice})),this.setActivatedRoutQueryStringParams()})}setCustomUrlParam(){var i=this._router.createUrlTree([],{relativeTo:this.route,queryParams:{categoryID:this.membershipCategoryID?this.membershipCategoryID:null,packageID:null!=this.membershipID?this.membershipID:null}}).toString();this._router.navigateByUrl(i)}getFilteredMembershipByCategory(t){0===t?(this.posFilteredMemberships=this.posMemberships,this.selectedMembershipCategory=null,this.membershipCategoryID=null):(this.membershipCategoryID=t,null!=t&&(this.selectedMembershipCategory=t,this.posFilteredMemberships=this.posMemberships.filter(i=>i.MembershipCategoryID==t))),this.setCustomUrlParam()}getMembershipCountByCategory(){this.MembershipCategoryList.forEach(t=>{let i=this.posMemberships.filter(r=>r.MembershipCategoryID===t.MembershipCategoryID&&0==r.IsSharedPrivately);t.MembershipCount=i&&i.length>0?i.length:0,this.isUrlAppendedCategoryExists=t.MembershipCount>0}),this.MembershipCategoryList=this.MembershipCategoryList.filter(t=>t.MembershipCount>0)}setActivatedRoutQueryStringParams(){var t;if(this.route.queryParams.subscribe(i=>{let r=Object.assign(Object.assign({},i.keys),i);r&&0!==Object.keys(r).length&&(this.isUrl=!0,this.selectedMembershipCategory=i.categoryID?Number(i.categoryID):null,this.membershipID=i.packageID?Number(i.packageID):null)}),this.selectedMembershipCategory>0&&null!=this.selectedMembershipCategory?this.getFilteredMembershipByCategory(this.selectedMembershipCategory):(this.selectedMembershipCategory=null,this.getFilteredMembershipByCategory(0)),this.membershipID>0&&null!=this.membershipID){let i=null!=this.posMemberships?this.posMemberships.filter(r=>r.MembershipID==this.membershipID).length:0;null===(t=this.posMemberships)||void 0===t||t.forEach(r=>{r.MembershipID==this.membershipID&&this.posMembershipDetails(r)}),0==i&&this.isUrl&&this.isUrl&&this._commonService.navigateToDefaultLandingPage(this.branchDetail.DefaultLandingPageID,this.branchDetail.CompanyCode,this.branchDetail.BranchCode)}}onMousewheel(t){window.addEventListener("scroll",this._commonService.scrollEvent,!0)}handleKeyboardEvent(t){(38==t.keyCode||40==t.keyCode)&&window.addEventListener("scroll",this._commonService.scrollEvent,!0)}triggerCustomPopUpEvents(t){this._commonService.triggerCustomPopUpEvents(t)}getAndShowCustomPopUps(){this._commonService.getCustomPopUps(h.R1.Packages)}onMouseHover(t){this.triggerCustomPopUpEvents(h.sU.OnHover)}getCustomerDetail(){this.delaySubscription=(0,ee.H)(1e3).subscribe(()=>{this.isUserLoggedInSubscription=this._dataSharingService.isUserLoggedIn.subscribe(t=>{t&&(this.isUserLoggedIn=t,this.isUserLoggedIn=t&&!this.isGuestUser,this._dataSharingService.customerID.subscribe(i=>{i>0&&(this.customerID=i)}))}),this.isGuestUserSubscription=this._dataSharingService.isGuestUser.subscribe(t=>{this.isGuestUser=t,this.isUserLoggedIn=this.isUserLoggedIn&&!this.isGuestUser})})}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(Z.j),e.Y36(ie.H7),e.Y36(O.uw),e.Y36(k.e),e.Y36(F.j),e.Y36(B.r),e.Y36(v.F0),e.Y36(G.b),e.Y36(v.gz),e.Y36(N.v))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-packages"]],hostBindings:function(t,i){1&t&&e.NdJ("mousewheel",function(a){return i.onMousewheel(a)})("keydown",function(a){return i.handleKeyboardEvent(a)},!1,e.evT)},features:[e.qOj],decls:26,vars:9,consts:[[3,"bannerType"],[1,"section-head","no_header_form"],[1,"container"],[1,"row","justify-content-center"],[1,"col-md-8","d-flex","align-items-center","justify-content-lg-start","justify-content-center","title-icon"],[1,"fa-light","fa-box-open-full"],[1,"col-xl-2","col-md-5","col-sm-5","pl-0","mb-2","mb-sm-0","pr-sm-3","pr-0"],[1,"listing-filter-field","position-relative"],["type","text","name","search_product","placeholder","Search",1,"form-control",3,"ngModel","ngModelChange"],["aria-hidden","true",1,"far","fa-search"],[1,"col-xl-2","col-md-5","col-sm-5","pl-0","mb-2","mb-sm-0","listing-filter-field","pr-sm-3","pr-0"],[1,"select-label"],[1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue"],[1,"mt-5"],[1,"row"],["class","col-lg-3 col-md-12 listing-sidebar",4,"ngIf"],[1,"col-lg-9","col-md-12","pl-md-0"],["class","row",4,"ngIf"],[1,"col-lg-3","col-md-12","listing-sidebar"],[1,"simple-white-bg"],[1,"mob-scroll-nowrap"],[1,"active","mb-1"],["role","button"],[1,"cat_text"],[3,"ngClass"],["role","button",3,"click","mouseenter"],[1,"fa-pull-right"],[3,"ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"col-sm-12","col-md-6","col-lg-6","col-xl-4","cst-col-layout","pr-0"],[1,"item-square-box","mt-0","mx-0","mb-4"],[1,"img-fluid","img-round",3,"src"],[1,"item-square-box-desc"],[1,"content-limit","limit-3",3,"innerHtml"],[1,"row","slide-box-bottom"],[1,"col-xl-12","col-lg-12","col-md-12","pl-0"],["class","pb-0",4,"ngIf"],[1,"col-xl-12","col-lg-12","col-md-12","text-center","p-0"],[1,"row","full_btn_space","normal-margin"],["class","col px-2 m-0",4,"ngIf"],[1,"pb-0"],[1,"col","px-2","m-0"],[1,"cst-button","w-100","mt-0",3,"disabled"],[1,"cst-button","w-100","mt-0",3,"disabled","routerLink"],["role","button",1,"cst-button","orange-btn","w-100",3,"click","mouseenter"],[1,"col-md-12"],[1,"simple-white-bg","py-4"],[1,"no-record-found"]],template:function(t,i){1&t&&(e._UZ(0,"header-banner",0),e.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"h4"),e._uU(7),e.qZA()(),e.TgZ(8,"div",6)(9,"div",7)(10,"input",8),e.NdJ("ngModelChange",function(a){return i.searchText=a}),e.qZA(),e._UZ(11,"i",9),e.qZA()(),e.TgZ(12,"div",10)(13,"div",11)(14,"select",12),e.NdJ("ngModelChange",function(a){return i.sortByField=a}),e.TgZ(15,"option",13),e._uU(16,"Sort by Name"),e.qZA(),e.TgZ(17,"option",13),e._uU(18,"Sort by Price"),e.qZA()()()()()()(),e.TgZ(19,"div",14)(20,"div",2)(21,"div",15),e.YNc(22,oe,14,5,"div",16),e.TgZ(23,"div",17),e.YNc(24,Ce,4,7,"div",18),e.qZA()()(),e.YNc(25,ve,5,1,"div",18),e.qZA()),2&t&&(e.Q6J("bannerType",i.headerBannerEnum.Packages),e.xp6(7),e.Oqu(i.pageTitle),e.xp6(3),e.Q6J("ngModel",i.searchText),e.xp6(4),e.Q6J("ngModel",i.sortByField),e.xp6(1),e.Q6J("ngValue","MembershipName"),e.xp6(2),e.Q6J("ngValue","FilteredPrice"),e.xp6(5),e.Q6J("ngIf",!0===i.hasMemberships),e.xp6(2),e.Q6J("ngIf",i.posFilteredMemberships&&i.posFilteredMemberships.length>0),e.xp6(1),e.Q6J("ngIf",!1===i.hasMemberships))},directives:[U.B,c.Fj,c.JJ,c.On,c.EJ,c.YN,c.Kr,b.O5,b.mk,b.sg,v.rH],pipes:[se.Ty,re.U,ae.z,b.H9],encapsulation:2}),s})();var H=m(31319),I=m(43739),S=m(6359),_=m(70409),L=m(33874),Y=m(48651),V=m(35865),D=m(49979),j=m(19019);const De=["stepper"],Te=["membershipEnquiryForm"];
1function Se(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",28)(1,"span",29),e._uU(2," Already have an account? "),e.TgZ(3,"a",30),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onLogin()}),e._uU(4," Login"),e.qZA()(),e._UZ(5,"span",31),e.TgZ(6,"a",32),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onClearForm()}),e._uU(7,"Reset"),e.qZA()()}}function Pe(s,n){if(1&s&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.messages.validation_required," ")}}function Ie(s,n){if(1&s&&(e.TgZ(0,"div",33),e.YNc(1,Pe,2,1,"div",25),e.qZA()),2&s){const t=e.oxw(2),i=e.MAs(11);e.xp6(1),e.Q6J("ngIf",i.invalid||t.showValidationMessage)}}function Ae(s,n){if(1&s&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&s){const t=n.$implicit;e.Q6J("value",t.MembershipID),e.xp6(1),e.hij(" ",t.MembershipName," ")}}function xe(s,n){if(1&s&&(e.ynx(0),e._UZ(1,"app-personal-information",35),e.BQk()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("Customer",t.membershipEnquiry.Customer)("showValidation",t.showValidationMessage)("isFormDisabled",t.isUserLoggedIn)("isOnProfile",!1)("showOnlyHomeAddress",!0)("isShowOptionalFields",!0)("isHomeAddressNotRequired",t.IsHomeAddressNotRequired)("isMobileNumberRequired",t.IsMobileNumberRequired)}}const W=function(s){return{"mob-text-center":s}};function we(s,n){if(1&s){const t=e.EpF();e.ynx(0),e.TgZ(1,"div",11)(2,"div",12)(3,"div",3)(4,"div",13)(5,"div",14)(6,"div",15)(7,"div",16)(8,"h6",17),e._uU(9,"Personal Information "),e.qZA()(),e.YNc(10,Se,8,0,"div",18),e.qZA()()()(),e.TgZ(11,"div",13),e.YNc(12,Ie,2,1,"div",19),e.qZA(),e.TgZ(13,"div",3)(14,"div",20)(15,"label",21),e._uU(16," Select Plan "),e.qZA(),e.TgZ(17,"div",22)(18,"select",23),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw().membershipEnquiry.MembershipID=r})("ngModelChange",function(){return e.CHM(t),e.oxw().onMembershipChange()}),e.YNc(19,Ae,2,2,"option",24),e.qZA()()()(),e.YNc(20,xe,2,8,"ng-container",25),e.TgZ(21,"div",3)(22,"div",13)(23,"div",26)(24,"button",27),e._uU(25,"Send"),e.qZA()()()()()(),e.BQk()}if(2&s){const t=e.oxw(),i=e.MAs(11);
1e.xp6(5),e.Q6J("ngClass",e.VKq(6,W,!t.isUserLoggedIn)),e.xp6(5),e.Q6J("ngIf",!t.isUserLoggedIn),e.xp6(2),e.Q6J("ngIf",i.invalid&&i.submitted),e.xp6(6),e.Q6J("ngModel",t.membershipEnquiry.MembershipID),e.xp6(1),e.Q6J("ngForOf",t.membershipList),e.xp6(1),e.Q6J("ngIf",t.isLoadedPage)}}function Ze(s,n){if(1&s&&e._uU(0),2&s){const t=e.oxw(2);e.Oqu(t.isRevolution_Lifestyle?"Enquiry":"Inquiry")}}function ke(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",28)(1,"span",29),e._uU(2," Already have an account? "),e.TgZ(3,"a",30),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onLogin()}),e._uU(4," Login"),e.qZA()(),e._UZ(5,"span",31),e.TgZ(6,"a",32),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onClearForm()}),e._uU(7,"Reset"),e.qZA()()}}function Be(s,n){if(1&s&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.messages.validation_required," ")}}function Ne(s,n){if(1&s&&(e.TgZ(0,"div",33),e.YNc(1,Be,2,1,"div",25),e.qZA()),2&s){e.oxw();const t=e.MAs(1),i=e.oxw();e.xp6(1),e.Q6J("ngIf",t.invalid||i.showValidationMessage)}}
1function qe(s,n){if(1&s&&(e.TgZ(0,"option",34),e._uU(1),e.qZA()),2&s){const t=n.$implicit;e.Q6J("value",t.MembershipID),e.xp6(1),e.hij(" ",t.MembershipName," ")}}function Fe(s,n){if(1&s&&(e.ynx(0),e._UZ(1,"app-personal-information",35),e.BQk()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("Customer",t.membershipEnquiry.Customer)("showValidation",t.showValidationMessage)("isFormDisabled",t.isUserLoggedIn)("isOnProfile",!1)("showOnlyHomeAddress",!0)("isShowOptionalFields",!0)("isHomeAddressNotRequired",t.IsHomeAddressNotRequired)("isMobileNumberRequired",t.IsMobileNumberRequired)}}function Ue(s,n){1&s&&(e.TgZ(0,"button",27),e._uU(1,"Send"),e.qZA())}function Le(s,n){1&s&&(e.TgZ(0,"button",44),e._uU(1,"Next"),e.qZA())}function Ee(s,n){if(1&s&&e._uU(0),2&s){const t=e.oxw().$implicit;e.Oqu(t.FormName)}}function Re(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"mat-step"),e.YNc(1,Ee,1,1,"ng-template",38),e.TgZ(2,"membership-form",45),e.NdJ("onSubmitForms",function(r){return e.CHM(t),e.oxw(2).onSubmitFormsHandler(r)}),e.qZA()()}if(2&s){const t=n.$implicit,i=n.index,r=e.oxw(2);e.xp6(2),e.Q6J("customForms",t)("membershipDetails",r.membershipDetails)("formIndexFromParent",i)}}function Je(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"form",7,8),e.NdJ("keydown.enter",function(r){return r.preventDefault()})("ngSubmit",function(){e.CHM(t);const r=e.MAs(1);return e.oxw().saveMembershipEnquiryHandler(r.valid)}),e.TgZ(2,"mat-horizontal-stepper",36,37)(4,"mat-step"),e.YNc(5,Ze,1,1,"ng-template",38),e.TgZ(6,"div",11)(7,"div",12)(8,"div",3)(9,"div",13)(10,"div",14)(11,"div",39)(12,"div",16)(13,"h6",17),e._uU(14,"Personal Information "),e.qZA()(),e.YNc(15,ke,8,0,"div",18),e.qZA()()()(),e.TgZ(16,"div",13),e.YNc(17,Ne,2,1,"div",19),e.qZA(),e.TgZ(18,"div",3)(19,"div",20)(20,"label",21),e._uU(21," Select Plan "),e.qZA(),e.TgZ(22,"div",22)(23,"select",23),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw().membershipEnquiry.MembershipID=r})("ngModelChange",function(){return e.CHM(t),e.oxw().onMembershipChange()}),e.YNc(24,qe,2,2,"option",24),e.qZA()()()(),e.YNc(25,Fe,2,8,"ng-container",25),e.TgZ(26,"div",3)(27,"div",13)(28,"div",40),e.YNc(29,Ue,2,0,"button",41),e.YNc(30,Le,2,0,"button",42),e.qZA()()()()()(),e.YNc(31,Re,3,3,"mat-step",43),e.qZA()()}if(2&s){const t=e.MAs(1),i=e.oxw();
1e.xp6(10),e.Q6J("ngClass",e.VKq(9,W,!i.isUserLoggedIn)),e.xp6(5),e.Q6J("ngIf",!i.isUserLoggedIn),e.xp6(2),e.Q6J("ngIf",t.invalid&&t.submitted),e.xp6(6),e.Q6J("ngModel",i.membershipEnquiry.MembershipID),e.xp6(1),e.Q6J("ngForOf",i.membershipList),e.xp6(1),e.Q6J("ngIf",i.isLoadedPage),e.xp6(4),e.Q6J("ngIf",!(i.customFormView.length>0)),e.xp6(1),e.Q6J("ngIf",i.customFormView.length>0),e.xp6(1),e.Q6J("ngForOf",i.customFormView)}}let Oe=(()=>{class s extends w.G{constructor(t,i,r,a,o,l,p,d,g){super(null),this._route=t,this._posMembershipService=i,this._messageService=r,this._loginService=a,this._posSaleService=o,this._dataSharingService=l,this._router=p,this.AnalyticsService=d,this._commonService=g,this.membershipDetails=!1,this.hasSuccess=!1,this.hasError=!1,this.IsHomeAddressNotRequired=!1,this.maxBirthDate=new Date,this.hascurrencyFormated=!1,this.showValidationMessage=!1,this.formIndex=0,this.activeTabIndex=0,this.customFormView=[],this.addressFundamentals=new L.r9,this.purchaseRestrictedMembership=[],this.posMembershipDetail=new _.Kf,this.membershipEnquiry=new _.zZ,this.customerInfo=new S.QS,this.restrictedCustomerType=h.M2,this.serverImageAddress=q.N.environment.imageUrl.replace("{CompanyID}",localStorage.getItem(y.R.CompanyID))+"BR"+localStorage.getItem(y.R.BranchID)+"/",this.messages=M.TS.Messages,this.defaultCountry=M.TS.DefaultCountry,this.isLoadedPage=!1,this.defaultImagePath="/assets/images/Membership-Header.jpg",this.headerBannerEnum=h.bj}ngOnInit(){this.isHomeLoadSubscription=this._dataSharingService.isLoadedHome.subscribe(t=>{t&&(this.setMembershipBanner(),this.branch=this._loginService.getBranch(),this.isCompanyWhydrate=this.branch.CompanyID,this.isRevolution_Lifestyle=494===this.branch.CompanyID&&552===this.branch.BranchID||499===this.branch.CompanyID&&557===this.branch.BranchID,this.getMemberIdFromRoute(),this.getMembershipFundamentals(),setTimeout(()=>{this.getBranchSettings(),this.isGuestUserSubscription=this._dataSharingService.isGuestUser.subscribe(i=>{this.isGuestUser=i,this.isUserLoggedIn=this.isUserLoggedIn&&!this.isGuestUser,i&&(this.membershipEnquiry.Customer.Email=this._loginService.getEmail())}),this.isUserLoggedInSubscription=this._dataSharingService.isUserLoggedIn.subscribe(i=>{this.isUserLoggedIn=i&&!this.isGuestUser,i&&this.getCustomerDetails()})},100),this._dataSharingService.customerInfo.subscribe(i=>{i&&(this.customerInfo=i)}),setTimeout(()=>{this.activeMemberShipSubscription=this._dataSharingService.activeMemberShipList.subscribe(i=>{i&&i.length>0&&(this.isMemberHasActiveMembership=!0)})},300),this.currentBranchDetail=JSON.parse(JSON.stringify(this._loginService.getBranch())),this.currentBranchDetail&&(this.currencyFormat=this.currentBranchDetail.CurrencySymbol),setTimeout(()=>{this.getLeadForms()},500))})}ngOnDestroy(){var t;this.isUserLoggedInSubscription.unsubscribe(),this.isGuestUserSubscription.unsubscribe(),null===(t=this.activeMemberShipSubscription)||void 0===t||t.unsubscribe()}setMembershipBanner(){let t=super.getCurrentBranchSettings(this._dataSharingService);t&&(this.pageTitle=this._commonService.setCustomNameForUrl(h.R1.Packages,t),t.Banner&&t.Banner.PackageBanner&&""!=t.Banner.PackageBanner?(this.bannerImagePath=this.serverImageAddress+t.Banner.PackageBanner,this.hasImage=!!this.bannerImagePath,this.bannerImagePath=this.serverImageAddress+t.Banner.PackageBanner):this.hasImage=!!this.bannerImagePath)}onLogin(){this._loginService.showLoginDialog(this._router.url,!0)}onMembershipChange(){this.membershipEnquiry.MembershipID&&this.membershipEnquiry.MembershipID>0&&(this.getMembershipDetailsById(this.membershipEnquiry.MembershipID),this.GetAllMembershipPurchaseTypeRestriction())}onEmailUpdated(){!this.isUserLoggedIn&&this.membershipEnquiry.Customer.Email&&""!==this.membershipEnquiry.Customer.Email&&this.verifyCustomer()}onClearForm(){this.resetForm()}onBirthDateChange(t){setTimeout(()=>{this.membershipEnquiry.Customer.BirthDate=t})}getStatesByCountryId(t){this.stateCountyList&&this.stateCountyList.length>0&&(this.stateListByCountryId=this.stateCountyList.filter(i=>i.CountryID==t))}getMemberIdFromRoute(){this._route.paramMap.subscribe(t=>{this.membersihpID=+t.get("PackageID"),this.membersihpID&&this.membersihpID>0&&this.getMembershipDetailsById(this.membersihpID)})}getBranchSettings(){this.branchWidgetSettingSubscription=this._dataSharingService.branchWithSetting.subscribe(t=>{t&&(this.IsHomeAddressNotRequired=!!t.IsHomeAddressNotRequired&&t.IsHomeAddressNotRequired,this.IsMobileNumberRequired=t.IsMobileNumberRequired)})}getMembershipFundamentals(t){this._posMembershipService.getMembershipFundamentals().subscribe(i=>{this.response=i},i=>this._messageService.showErrorMessage(this.messages.dropdowns_load_error),()=>{this.membershipList=this.response.Result.MembershipList,this.membershipList=this.membershipList.filter(i=>!0===i.ShowAsPackage),this.genderList=this.response.Result.GenderList,this.titleList=this.response.Result.TitleList,this.stateCountyList=this.response.Result.StateCountyList,this.addressFundamentals.countryList=this.response.Result.CountryList,this.addressFundamentals.stateList=this.response.Result.StateCountyList,this.isLoadedPage=!0,this.setDefaultDropdowns(),t&&(this.membershipEnquiry.MembershipID=this.membershipList[0].MembershipID,this.onMembershipChange())})}getMembershipDetailsById(t){this._posMembershipService.getPOSMembershipDetail(t).subscribe(i=>{this.response=i},i=>{var r;return this._messageService.showErrorMessage(this.messages.get_error.replace("{0}",`${null===(r=this.pageTitle)||void 0===r?void 0:r.toLowerCase()}`))},()=>{this.response&&this.response.Result&&(this.posMembershipDetail=this.response.Result,this.membershipEnquiry.MembershipID=this.posMembershipDetail.MembershipID,this.posMembershipDetail.ImagePath=this.posMembershipDetail.ImagePath&&""!==this.posMembershipDetail.ImagePath?this.serverImageAddress+this.posMembershipDetail.ImagePath:"assets/images/dummy_feed_image.png")})}GetAllMembershipPurchaseTypeRestriction(){this._posSaleService.GetAllMembershipPurchaseTypeRestriction(this.membershipEnquiry.MembershipID).subscribe(t=>{this.response=t},()=>{this._messageService.showErrorMessage(this.messages.dropdowns_load_error)},()=>{if(this.response&&this.response.Result&&(this.purchaseRestrictedMembership=this.response.Result,this.purchaseRestrictedMembership&&this.purchaseRestrictedMembership.length>0))for(let t=0;t<this.purchaseRestrictedMembership.length;t++)this.CustomerTypeID===h.d2.Member?(this.purchaseRestrictedMembership[t].RestrictedCustomerTypeID===this.restrictedCustomerType.Member_with_active_memberships&&this.isMemberHasActiveMembership&&this.navigateToDefaultLandingPage(),this.purchaseRestrictedMembership[t].RestrictedCustomerTypeID===this.restrictedCustomerType.Member_with_inactive_memberships&&!this.isMemberHasActiveMembership&&this.navigateToDefaultLandingPage()):this.purchaseRestrictedMembership[t].RestrictedCustomerTypeID===this.CustomerTypeID&&this.navigateToDefaultLandingPage()})}navigateToDefaultLandingPage(){var t;this._messageService.showErrorMessage(this.messages.package_Not_Avaliable.replace("{0}",null===(t=this.pageTitle)||void 0===t?void 0:t.toLowerCase())),setTimeout(()=>{let i=this._commonService.landingPageUrl(this.currentBranchDetail.DefaultLandingPageID,this.currentBranchDetail.CompanyCode,this.currentBranchDetail.BranchCode);this._router.navigate([i])},1500)}getLeadForms(){let t=new _.MT;t.customerID=this.membershipEnquiry.Customer.CustomerID,this._posMembershipService.getLeadForms(t).subscribe(i=>{this.response=i},i=>{this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","GetLeadForms"))},()=>{this.response&&this.response.Result&&(this.customFormView=this.response.Result?this.response.Result:[],this.customFormView&&this.customFormView.length>
10&&this.customFormView.forEach(i=>{i.JsonText=JSON.parse(i.JsonText)}))})}onSubmitFormsHandler(t){"submit"===t.SkipSubmitIndicator?(this.formIndex=this.formIndex+1,this.customFormView.forEach(i=>{i.FormID===t.CustomFormView.FormID&&(i=JSON.parse(JSON.stringify(t.CustomFormView)))}),this.customFormView.length==this.formIndex?this.saveMembershipEnquiry(this.membershipEnquiryForm.valid):this.stepper.next()):(this.formIndex=this.formIndex-1,this.stepper.previous())}saveMembershipEnquiry(t){var i,r;if(t&&(this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.valid||this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.disabled)){this.showValidationMessage=!1,this.membershipEnquiry.Customer.CustomerTypeID=h.d2.Lead;let a=JSON.parse(JSON.stringify(this.membershipEnquiry));this.AnalyticsService.TrackGoogleEvent("inquire_package","Package",null===(i=this.posMembershipDetail)||void 0===i?void 0:i.Name,null===(r=this.posMembershipDetail)||void 0===r?void 0:r.TotalPrice),this.isUserLoggedIn&&(a.Customer=null),this.customFormView&&this.customFormView.length>0&&(a.MembershipForms=this.customFormView,a.MembershipForms.forEach(o=>{o.JsonText=JSON.stringify(o.JsonText)})),this.hasSuccess=!1,this.hasError=!1,this._posMembershipService.saveMembershipEnquiry(a).subscribe(o=>{this.response=o},o=>{this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","Inquiry"))},()=>{this.response&&this.response.MessageCode>0?(this.customerInfo.isEnquiredMemberShip=!0,this._dataSharingService.shareloginedCustomerInfo(this.customerInfo),this._router.navigate([this.branch.CompanyCode+"/"+this.branch.BranchCode+"/thank-you/3"])):-25===this.response.MessageCode?this._messageService.showErrorMessage(this.messages.duplicate_email):this.response&&-30==this.response.MessageCode?(this._messageService.showErrorMessage(this.messages.Lead_Membership_Exist),this.getMembershipFundamentals(!0)):this.response&&-31==this.response.MessageCode?(this._messageService.showErrorMessage(this.messages.Member_Membership_Exist),this.getMembershipFundamentals(!0)):this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","Inquiry"))})}else this.showValidationMessage=!0,this._messageService.showErrorMessage(this.messages.validation_required)}verifyCustomer(){this._posSaleService.verifyCustomer(this.membershipEnquiry.Customer.Email.toLowerCase()).subscribe(t=>{this.response=t},t=>{this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","Customer Detail"))},()=>{this.response&&this.response.MessageCode&&-30===this.response.MessageCode&&(this._dataSharingService.shareCustomerEmail(this.membershipEnquiry.Customer.Email),this._loginService.showLoginDialog(this._router.url),this.resetForm())})}getCustomerDetails(){this._posSaleService.getCustomerDetails().subscribe(t=>{this.response=t},t=>{},()=>{this.response&&this.response.Result&&(this.membershipEnquiry.Customer=this.response.Result,this.membershipEnquiry.MembershipID=this.membersihpID,this.defaultCountry=this.membershipEnquiry.Customer.Mobile?"":M.TS.DefaultCountry,this.CustomerTypeID=this.response.Result.CustomerTypeID,this.GetAllMembershipPurchaseTypeRestriction())})}setDefaultDropdowns(){this.membershipEnquiry.MembershipID=this.membersihpID,this.membershipEnquiry.Customer.CountryID=null==this.membershipEnquiry.Customer.CountryID?void 0:this.addressFundamentals.countryList[0].CountryID}resetForm(){this.membershipEnquiry=new _.zZ;for(let t=1;t<=3;t++){let i=new L.Ln;i.AddressTypeID=t,i.CountryID=null,this.membershipEnquiry.Customer.CustomerAddress.push(i)}setTimeout(()=>{this.setDefaultDropdowns()})}saveMembershipEnquiryHandler(t){this.customFormView&&this.customFormView.length>0?t&&(this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.valid||this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.disabled)&&(this.PersonalInformationComponent.datepicker.dateElement.valid||this.PersonalInformationComponent.datepicker.dateElement.disabled)?this.stepper.next():this._messageService.showErrorMessage(this.messages.val
1idation_required):t&&(this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.valid||this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.disabled)&&(this.PersonalInformationComponent.datepicker.dateElement.valid||this.PersonalInformationComponent.datepicker.dateElement.disabled)?this.saveMembershipEnquiry(t):(this.showValidationMessage=!0,this._messageService.showErrorMessage(this.messages.validation_required))}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(v.gz),e.Y36(Z.j),e.Y36(k.e),e.Y36(B.r),e.Y36(Y.D),e.Y36(F.j),e.Y36(v.F0),e.Y36(V.y),e.Y36(N.v))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-inquire-package"]],viewQuery:function(t,i){if(1&t&&(e.Gf(De,5),e.Gf(Te,5),e.Gf(H.r,5),e.Gf(I.i,5)),2&t){let r;e.iGM(r=e.CRH())&&(i.stepper=r.first),e.iGM(r=e.CRH())&&(i.membershipEnquiryForm=r.first),e.iGM(r=e.CRH())&&(i.customerAddressesComponent=r.first),e.iGM(r=e.CRH())&&(i.PersonalInformationComponent=r.first)}},features:[e.qOj],decls:15,vars:5,consts:[[3,"bannerType"],[1,"section-head","no_header_form"],[1,"container"],[1,"row"],[1,"col-md-12","d-flex","align-items-center","justify-content-center","title-icon"],[1,"fa-light","fa-box-open-full"],[1,"mt-4","inquire-full-form"],["novalidate","",3,"keydown.enter","ngSubmit"],["membershipEnquiryForm","ngForm"],[4,"ngIf","ngIfElse"],["withForms",""],[1,"simple-white-bg","wizard-form","m-2"],[1,"wizard_inside_padding","py-4","px-3"],[1,"col-md-12"],[3,"ngClass"],[1,"row","section-title","align-items-center","pb-3"],[1,"col-md-6","p-0"],[1,"mb-0"],["class","col-md-6 p-0 text-md-right",4,"ngIf"],["class","alert alert-danger",4,"ngIf"],[1,"col-lg-4","col-md-4","col-sm-6"],[1,"mem_label"],[1,"select-label"],["name","selected_membership","tabindex","1",1,"wizard_select","form-control",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"wizard-form-foot","m-0","text-right","border-top-0"],["tabindex","15","type","submit",1,"mem_btn","enquire_btn","detail_btn","full_filled_btn","w-100"],[1,"col-md-6","p-0","text-md-right"],[1,"already-login"],["role","button",3,"click"],[1,"c-seprator"],["role","button",1,"reset-text",3,"click"],[1,"alert","alert-danger"],[3,"value"],[3,"Customer","showValidation","isFormDisabled","isOnProfile","showOnlyHomeAddress","isShowOptionalFields","isHomeAddressNotRequired","isMobileNumberRequired"],["linear",""],["stepper",""],["matStepLabel",""],[1,"row","section-title","flex_align_center","pb-3"],[1,"wizard-form-foot","m-0","text-right"],["class","mem_btn enquire_btn detail_btn full_filled_btn w-100","tabindex","15","type","submit",4,"ngIf"],["type","button","class","mem_btn enquire_btn detail_btn full_filled_btn ml-2 w-100","type","submit",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","type","submit",1,"mem_btn","enquire_btn","detail_btn","full_filled_btn","ml-2","w-100"],[3,"customForms","membershipDetails","formIndexFromParent","onSubmitForms"]],template:function(t,i){if(1&t){const r=e.EpF();e._UZ(0,"header-banner",0),e.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"h4"),e._uU(7),e.qZA()()()()(),e.TgZ(8,"div",6)(9,"div",2)(10,"form",7,8),e.NdJ("keydown.enter",function(o){return o.preventDefault()})("ngSubmit",function(){e.CHM(r);const o=e.MAs(11);return i.saveMembershipEnquiryHandler(o.valid)}),e.YNc(12,we,26,8,"ng-container",9),e.qZA()()(),e.YNc(13,Je,32,11,"ng-template",null,10,e.W1O)}if(2&t){const r=e.MAs(14);e.Q6J("bannerType",i.headerBannerEnum.Packages),e.xp6(7),e.AsE("",i.isRevolution_Lifestyle?"Enquire":"Inquire"," ",i.pageTitle,""),e.xp6(5),e.Q6J("ngIf",i.customFormView&&0===i.customFormView.length)("ngIfElse",r)}},directives:[U.B,c._Y,c.JL,c.F,b.O5,b.mk,c.EJ,c.JJ,c.On,b.sg,c.YN,c.Kr,I.i,D.Vq,D.C0,D.VY,j.o],encapsulation:2}),s})();var Ge=m(47990),Qe=m(34936),He=m(35104),K=m(35312),Ye=m(4976),Ve=m(16489),je=m(69696),We=m(93264),Ke=m(32865),ze=m(35777),z=m(28037),$e=m(22661),$=m(18685),Xe=m(99738),E=m(92607),et=m(51770),tt=m(54244),R=m(7657),it=m(92936),st=m(19735),rt=m(29629),at=m(32789);const ot=["stepper"],mt=["membershipBuyForm"],ht=["saveShareMembershipRef"],lt=["addStripeDebitRef"];function dt(s,n){1&s&&e._uU(0,"Plan Details")}
1function ct(s,n){if(1&s&&(e.TgZ(0,"div",34)(1,"div",59),e._uU(2),e.qZA()()),2&s){const t=e.oxw();e.xp6(2),e.hij(" ",t.messages.Memebrships_Assigned_Alert," ")}}function ut(s,n){if(1&s&&(e.TgZ(0,"option",60),e._uU(1),e.qZA()),2&s){const t=n.$implicit;e.Q6J("ngValue",t.MembershipID),e.xp6(1),e.hij(" ",t.MembershipName,"")}}function pt(s,n){if(1&s&&(e.TgZ(0,"div",61)(1,"h3"),e._uU(2,"Validity Period"),e.qZA(),e.TgZ(3,"p"),e._uU(4,"Valid from "),e.TgZ(5,"b"),e._uU(6),e.ALo(7,"customdate"),e.qZA(),e._uU(8," to "),e.TgZ(9,"b"),e._uU(10),e.ALo(11,"customdate"),e.qZA(),e._uU(12,". "),e.qZA()()),2&s){const t=e.oxw();e.xp6(6),e.Oqu(e.xi3(7,2,t.buyMembershipModel.StartDate,t.dateFormat)),e.xp6(4),e.Oqu(e.xi3(11,5,t.buyMembershipModel.EndDate,t.dateFormat))}}function gt(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"input",69),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(2).buyMembershipModel.promoCode=r})("blur",function(){return e.CHM(t),e.oxw(2).trimSpaces()})("ngModelChange",function(r){return e.CHM(t),e.oxw(2).onChangePromoCode(r)}),e.qZA()}if(2&s){const t=e.oxw(2);e.Q6J("ngModel",t.buyMembershipModel.promoCode)}}function _t(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",70)(1,"div",71)(2,"div",72),e._UZ(3,"i",73),e.qZA(),e.TgZ(4,"div",74)(5,"p"),e._uU(6),e.qZA()(),e.TgZ(7,"div",75),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onRemovePromoCode()}),e._UZ(8,"i",76),e.qZA()()()}if(2&s){const t=e.oxw(2);e.xp6(6),e.Oqu(t.promoCodeDetail.PromoCode)}}function yt(s,n){1&s&&(e.TgZ(0,"div",77)(1,"div",78),e._UZ(2,"i",79),e.TgZ(3,"span"),e._uU(4,"Promo code applied. Click next to continue."),e.qZA()()())}function bt(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",62)(1,"div",63)(2,"div",34)(3,"div",64),e.YNc(4,gt,1,1,"input",65),e.YNc(5,_t,9,1,"div",66),e.TgZ(6,"button",67),e.NdJ("click",function(){return e.CHM(t),e.oxw().onApplyPromoCode()}),e._uU(7,"Apply"),e.qZA()()(),e.YNc(8,yt,5,0,"div",68),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(4),e.Q6J("ngIf",!t.isPromoCodeApplied),e.xp6(1),e.Q6J("ngIf",t.isPromoCodeApplied),e.xp6(1),e.Q6J("disabled",t.isPromoCodeBtnDisabled),e.xp6(2),e.Q6J("ngIf",t.isPromoCodeApplied)}}function Mt(s,n){1&s&&e._UZ(0,"img",86)}function Ct(s,n){if(1&s&&(e.TgZ(0,"div",90),e._UZ(1,"img",91),e.qZA()),2&s){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("src",i.serverImageAddress+t.ImagePath,e.LSH)}}function vt(s,n){if(1&s&&(e.ynx(0),e.TgZ(1,"ngx-slick-carousel",87,88),e.YNc(3,Ct,2,1,"div",89),e.qZA(),e.BQk()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("config",t.membershipDetailsCarousel),e.xp6(2),e.Q6J("ngForOf",null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)}}function ft(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",80),e.YNc(1,Mt,1,0,"img",81),e.YNc(2,vt,4,2,"ng-container",28),e.TgZ(3,"div",82)(4,"div",83)(5,"h3"),e._uU(6),e.qZA(),e.TgZ(7,"div",84),e._UZ(8,"p",85),e.qZA()()(),e.TgZ(9,"div",45)(10,"div",46),e._UZ(11,"hr"),e.TgZ(12,"button",47),e.NdJ("click",function(){return e.CHM(t),e.oxw().onMembershipPage()}),e._uU(13,"Back"),e.qZA(),e.TgZ(14,"button",48),e.NdJ("click",function(){return e.CHM(t),e.oxw().onContinue()}),e._uU(15,"Next"),e.qZA()()()()}if(2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",null==(null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)||0==(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)),e.xp6(1),e.Q6J("ngIf",(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)>0),e.xp6(4),e.Oqu(null==t.selectedMembership?null:t.selectedMembership.MembershipName),e.xp6(2),e.Q6J("innerHtml",null==t.selectedMembership?null:t.selectedMembership.Description,e.oJD),e.xp6(6),e.Q6J("disabled",!t.hasMemberhsipAlreadyAssigned)}}function Dt(s,n){1&s&&e._uU(0,"Share Plan")}function Tt(s,n){1&s&&e._UZ(0,"img",104)}function St(s,n){if(1&s&&(e.TgZ(0,"div",90),e._UZ(1,"img",105),e.qZA()),2&s){const t=n.$implicit,i=e.oxw(4);e.xp6(1),e.s9C("src",i.serverImageAddress+t.ImagePath,e.LSH)}}function Pt(s,n){if(1&s&&(e.TgZ(0,"ngx-slick-carousel",87,88),e.YNc(2,St,2,1,"div",89),e.qZA()),2&s){const t=e.oxw(3);e.Q6J("config",t.membershipDetailsCarousel),e.xp6(2),e.Q6J("ngForOf",null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)}}
1function It(s,n){if(1&s&&(e.TgZ(0,"div",99),e.YNc(1,Tt,1,0,"img",100),e.YNc(2,Pt,3,2,"ngx-slick-carousel",101),e.TgZ(3,"div",102)(4,"div",34)(5,"h4"),e._uU(6),e.qZA(),e.TgZ(7,"div",84),e._UZ(8,"p",85),e.qZA()(),e.TgZ(9,"div",34),e._UZ(10,"hr"),e.qZA(),e.TgZ(11,"div",103)(12,"h3"),e._uU(13,"Validity Period"),e.qZA(),e.TgZ(14,"p"),e._uU(15,"Valid from "),e.TgZ(16,"b"),e._uU(17),e.ALo(18,"customdate"),e.qZA(),e._uU(19," to "),e.TgZ(20,"b"),e._uU(21),e.ALo(22,"customdate"),e.qZA(),e._uU(23,". "),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",null==(null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)||0==(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)),e.xp6(1),e.Q6J("ngIf",(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)>0),e.xp6(4),e.Oqu(t.selectedMembership.MembershipName),e.xp6(2),e.Q6J("innerHtml",t.selectedMembership.Description,e.oJD),e.xp6(9),e.Oqu(e.xi3(18,6,t.membershipPaymentSummary.ValidFrom,t.dateFormat)),e.xp6(4),e.Oqu(e.xi3(22,9,t.membershipPaymentSummary.ValidTo,t.dateFormat))}}function At(s,n){if(1&s){const t=e.EpF();e.ynx(0),e.TgZ(1,"mat-step"),e.YNc(2,Dt,1,0,"ng-template",11),e.TgZ(3,"div",49)(4,"div",50),e.YNc(5,It,24,12,"div",51),e.qZA(),e.TgZ(6,"div",31)(7,"div",52)(8,"div",33)(9,"div",3)(10,"div",34)(11,"div",53)(12,"h6",92),e._uU(13,"Share Plan"),e.qZA(),e.TgZ(14,"p",93),e._uU(15,"Share plan with customers, your profile is shared with"),e.qZA()()()(),e.TgZ(16,"div",3)(17,"div",34),e._UZ(18,"save-share-membership",94,95),e.qZA()()(),e.TgZ(20,"div",45)(21,"div",46),e._UZ(22,"hr"),e.TgZ(23,"button",47),e.NdJ("click",function(){return e.CHM(t),e.oxw().onPrevious()}),e._uU(24,"Back"),e.qZA(),e.TgZ(25,"div",96)(26,"button",97),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSkip()}),e._uU(27,"Skip"),e.qZA(),e.TgZ(28,"button",98),e.NdJ("click",function(){return e.CHM(t),e.oxw().onContinue()}),e._uU(29,"Next"),e.qZA()()()()()()()(),e.BQk()}if(2&s){const t=e.oxw();e.xp6(5),e.Q6J("ngIf",t.selectedMembership),e.xp6(13),e.Q6J("sharedProfileList",t.sharedProfileList)}}function xt(s,n){1&s&&e._uU(0,"Payment Plan")}function wt(s,n){1&s&&e._UZ(0,"div")}function Zt(s,n){if(1&s&&(e.ynx(0),e.TgZ(1,"span",109),e._uU(2),e.qZA(),e.BQk()),2&s){const t=e.oxw(3);e.xp6(2),e.hij(" ",t.promoCodeDetail.PromoCode,"")}}function kt(s,n){if(1&s&&(e.ynx(0),e.TgZ(1,"del",110),e._uU(2),e.ALo(3,"currency"),e.qZA(),e.BQk()),2&s){const t=e.oxw().$implicit,i=e.oxw(2);e.xp6(2),e.hij(" ",e.gM2(3,1,t.OriginalPrice,i.currencyFormat,"symbol","1.2-2")," ")}}function Bt(s,n){if(1&s&&(e.TgZ(0,"div",108)(1,"div",39)(2,"h5",40),e._uU(3),e.qZA()(),e.TgZ(4,"div",41)(5,"h5",40),e._uU(6),e.qZA(),e.YNc(7,Zt,3,1,"ng-container",28),e.qZA(),e.TgZ(8,"div",41)(9,"h5",40),e._uU(10),e.ALo(11,"customdate"),e.qZA()(),e.TgZ(12,"div",41)(13,"h5"),e.YNc(14,kt,4,6,"ng-container",28),e._uU(15),e.ALo(16,"currency"),e.qZA()(),e.TgZ(17,"div",41)(18,"h5",40),e._uU(19),e.ALo(20,"currency"),e.qZA()(),e.TgZ(21,"div",41)(22,"h5",40),e._uU(23),e.ALo(24,"currency"),e.qZA()(),e.TgZ(25,"div",41)(26,"h5",40),e._uU(27),e.ALo(28,"currency"),e.qZA()()()),2&s){const t=n.$implicit,i=e.oxw(2);e.xp6(3),e.Oqu(t.MembershipPaymentName),e.xp6(3),e.hij(" ",t.MembershipPaymentTypeID===i.membershipPaymentType.Single?"Single":t.MembershipPaymentTypeID===i.membershipPaymentType.Recurring?"Recurring":""," "),e.xp6(1),e.Q6J("ngIf",t.isPromoCodeApplied),e.xp6(3),e.hij("",e.xi3(11,9,t.CollectionDate,i.dateFormat)," "),e.xp6(4),e.Q6J("ngIf",t.isPromoCodeApplied),e.xp6(1),e.hij(" ",e.gM2(16,12,t.Price,i.currencyFormat,"symbol","1.2-2")," "),e.xp6(4),e.hij(" ",e.gM2(20,17,t.ProRataPrice,i.currencyFormat,"symbol","1.2-2")," "),e.xp6(4),e.hij(" ",e.gM2(24,22,t.TaxAmount,i.currencyFormat,"symbol","1.2-2"),""),e.xp6(4),e.hij(" ",e.gM2(28,27,t.TotalPrice,i.currencyFormat,"symbol","1.2-2"),"")}}function Nt(s,n){if(1&s&&(e.TgZ(0,"div",106),e.YNc(1,Bt,29,32,"div",107),e.qZA()),2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.membershipPaymentSummary.MembershipPaymentSummaryList)}}function qt(s,n){1&s&&(e.TgZ(0,"div",42)(1,"p"),e._uU(2,"This membership is completely free of charge."),e.qZA()())}function Ft(s,n){1&s&&e._uU(0,"Your Details")}function Ut(s,n){1&s&&e._UZ(0,"img",104)}
1function Lt(s,n){if(1&s&&(e.TgZ(0,"div",90),e._UZ(1,"img",105),e.qZA()),2&s){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("src",i.serverImageAddress+t.ImagePath,e.LSH)}}function Et(s,n){if(1&s&&(e.TgZ(0,"ngx-slick-carousel",87,88),e.YNc(2,Lt,2,1,"div",89),e.qZA()),2&s){const t=e.oxw(2);e.Q6J("config",t.membershipDetailsCarousel),e.xp6(2),e.Q6J("ngForOf",null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)}}function Rt(s,n){if(1&s&&(e.TgZ(0,"div",99),e.YNc(1,Ut,1,0,"img",100),e.YNc(2,Et,3,2,"ngx-slick-carousel",101),e.TgZ(3,"div",102)(4,"div",34)(5,"h4"),e._uU(6),e.qZA(),e.TgZ(7,"div",84),e._UZ(8,"p",85),e.qZA()(),e.TgZ(9,"div",34),e._UZ(10,"hr"),e.qZA(),e.TgZ(11,"div",103)(12,"h3"),e._uU(13,"Validity Period"),e.qZA(),e.TgZ(14,"p"),e._uU(15,"Valid from "),e.TgZ(16,"b"),e._uU(17),e.ALo(18,"customdate"),e.qZA(),e._uU(19," to "),e.TgZ(20,"b"),e._uU(21),e.ALo(22,"customdate"),e.qZA(),e._uU(23,". "),e.qZA()()()()),2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",null==(null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)||0==(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)),e.xp6(1),e.Q6J("ngIf",(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)>0),e.xp6(4),e.Oqu(t.selectedMembership.MembershipName),e.xp6(2),e.Q6J("innerHtml",t.selectedMembership.Description,e.oJD),e.xp6(9),e.Oqu(e.xi3(18,6,t.membershipPaymentSummary.ValidFrom,t.dateFormat)),e.xp6(4),e.Oqu(e.xi3(22,9,t.membershipPaymentSummary.ValidTo,t.dateFormat))}}function Jt(s,n){1&s&&(e.TgZ(0,"div",53)(1,"h2",54),e._uU(2,"Bank Detail"),e.qZA()())}function Ot(s,n){1&s&&(e.TgZ(0,"div",53)(1,"h2",54),e._uU(2,"Card Detail"),e.qZA()())}function Gt(s,n){1&s&&(e.TgZ(0,"div",53)(1,"h2",54),e._uU(2,"Payment Method"),e.qZA()())}function Qt(s,n){1&s&&(e.TgZ(0,"div",53)(1,"h2",54),e._uU(2,"Bank Payment (iDeal)"),e.qZA()())}function Ht(s,n){1&s&&(e.TgZ(0,"div",53)(1,"h2",54),e._uU(2,"Card Detail"),e.qZA()())}function Yt(s,n){1&s&&(e.TgZ(0,"div",53)(1,"h2",54),e._uU(2,"Stripe Direct Debit"),e.qZA()())}function Vt(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",117)(1,"div",118)(2,"div",119)(3,"div",120),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onPaymentMethodOptionChange(!1)}),e.TgZ(4,"input",121),e.NdJ("ngModelChange",function(){return e.CHM(t),e.oxw(2).onPaymentMethodOptionChange(!1)}),e.qZA(),e.TgZ(5,"label",122),e._uU(6," Card"),e.qZA()()(),e.TgZ(7,"div",119)(8,"div",120),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onPaymentMethodOptionChange(!0)}),e.TgZ(9,"input",123),e.NdJ("ngModelChange",function(){return e.CHM(t),e.oxw(2).onPaymentMethodOptionChange(!0)}),e.qZA(),e.TgZ(10,"label",124),e._uU(11," Bank Payment"),e.qZA()()()()()}if(2&s){const t=e.oxw(2);e.xp6(3),e.Q6J("ngClass",t.isBankPayment?"":"active-checked"),e.xp6(1),e.Q6J("ngModel",!t.isBankPayment)("value",!0),e.xp6(4),e.Q6J("ngClass",t.isBankPayment?"active-checked":""),e.xp6(1),e.Q6J("ngModel",t.isBankPayment)("value",!0)}}function jt(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",128)(1,"input",129),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(3).cardId=r})("ngModelChange",function(){return e.CHM(t),e.oxw(3).onCardSelectionChange()}),e.qZA(),e.TgZ(2,"label",130),e._UZ(3,"span"),e._uU(4),e.qZA()()}if(2&s){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("id",t.CustomerPaymentGatewayID),e.Q6J("value",t.CustomerPaymentGatewayID)("ngModel",i.cardId),e.xp6(1),e.s9C("for",t.CustomerPaymentGatewayID),e.xp6(2),e.hij("\xa0",t.Title,"")}}function Wt(s,n){if(1&s&&(e.TgZ(0,"option",60),e._uU(1),e.qZA()),2&s){const t=n.$implicit;e.Q6J("ngValue",t.id),e.xp6(1),e.hij(" ",t.name," ")}}const f=function(s,n){return{"has-danger":s,"has-success":n}};function Kt(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",140)(1,"label",21),e._uU(2," Account Type "),e.qZA(),e.TgZ(3,"div",135)(4,"div",18)(5,"select",141,142),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(4).directDebitAccountDetail.AccountType=r})("ngModelChange",function(){return e.CHM(t),e.oxw(4).onSEPACountryChange()}),e.YNc(7,Wt,2,2,"option",20),e.qZA()()()()}if(2&s){const t=e.MAs(6),i=e.oxw(4);e.xp6(3),e.Q6J("ngClass",e.WLB(3,f,t.invalid&&(t.dirty||t.touched||i.showValidation),t.valid&&(t.dirty||t.touched))
1),e.xp6(2),e.Q6J("ngModel",i.directDebitAccountDetail.AccountType),e.xp6(2),e.Q6J("ngForOf",i.accountTypeList)}}function zt(s,n){if(1&s&&(e.TgZ(0,"option",60),e._uU(1),e.qZA()),2&s){const t=n.$implicit;e.Q6J("ngValue",t.ISOCode),e.xp6(1),e.hij(" ",t.CountryName," ")}}function $t(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",140)(1,"label",21),e._uU(2," Select Country "),e.qZA(),e.TgZ(3,"div",135)(4,"div",18)(5,"select",141,143),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(4).directDebitAccountDetail.CountryCode=r})("ngModelChange",function(){return e.CHM(t),e.oxw(4).onSEPACountryChange()}),e.YNc(7,zt,2,2,"option",20),e.qZA()()()()}if(2&s){const t=e.MAs(6),i=e.oxw(4);e.xp6(3),e.Q6J("ngClass",e.WLB(3,f,t.invalid&&(t.dirty||t.touched||i.isSubmitted),t.valid&&(t.dirty||t.touched))),e.xp6(2),e.Q6J("ngModel",i.directDebitAccountDetail.CountryCode),e.xp6(2),e.Q6J("ngForOf",i.sepaCountryList)}}function Xt(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",134)(1,"label",21),e._uU(2," Account Prefix Number "),e.qZA(),e.TgZ(3,"div",135)(4,"input",144,145),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(4).directDebitAccountDetail.PrefixAccountNumber=r}),e.qZA()()()}if(2&s){const t=e.MAs(5),i=e.oxw(4);e.xp6(3),e.Q6J("ngClass",e.WLB(3,f,t.invalid&&(t.dirty||t.touched||i.isSubmitted),t.valid&&(t.dirty||t.touched))),e.xp6(1),e.Q6J("ngModel",i.directDebitAccountDetail.PrefixAccountNumber)("maxlength",6)}}function ei(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",134)(1,"label",21),e._uU(2," Bank Code "),e.qZA(),e.TgZ(3,"div",135)(4,"input",146,147),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(4).directDebitAccountDetail.BankCode=r}),e.qZA()()()}if(2&s){const t=e.MAs(5),i=e.oxw(4);e.xp6(3),e.Q6J("ngClass",e.WLB(3,f,t.invalid&&(t.dirty||t.touched||i.showValidation),t.valid&&(t.dirty||t.touched))),e.xp6(1),e.Q6J("ngModel",i.directDebitAccountDetail.BankCode)("maxlength",i.bankCodeMax?i.bankCodeMax:i.paymentSortCodeLength.Default)}}function ti(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",134)(1,"label",21),e._uU(2," Branch Code "),e.qZA(),e.TgZ(3,"div",135)(4,"input",148,149),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(4).directDebitAccountDetail.BranchCode=r}),e.qZA()()()}if(2&s){const t=e.MAs(5),i=e.oxw(4);e.xp6(3),e.Q6J("ngClass",e.WLB(4,f,t.invalid&&(t.dirty||t.touched||i.showValidation),t.valid&&(t.dirty||t.touched))),e.xp6(1),e.Q6J("ngModel",i.directDebitAccountDetail.BranchCode)("branchCodeDirective",i.sepaDashAfterDigit)("maxlength",i.branchCodeMax?i.branchCodeMax:i.paymentSortCodeLength.Default)}}function ii(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",134)(1,"label",21),e._uU(2," Check "),e.qZA(),e.TgZ(3,"div",135)(4,"input",150,151),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(4).directDebitAccountDetail.Check=r}),e.qZA()()()}if(2&s){const t=e.MAs(5),i=e.oxw(4);e.xp6(3),e.Q6J("ngClass",e.WLB(3,f,t.invalid&&(t.dirty||t.touched||i.isSubmitted),t.valid&&(t.dirty||t.touched))),e.xp6(1),e.Q6J("ngModel",i.directDebitAccountDetail.Check)("maxlength",i.checkMax?i.checkMax:i.paymentSortCodeLength.Default)}}function si(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",131),e.YNc(1,Kt,8,6,"div",132),e.YNc(2,$t,8,6,"div",132),e.YNc(3,Xt,6,6,"div",133),e.TgZ(4,"div",134)(5,"label",21),e._uU(6," Account Holder Name "),e.qZA(),e.TgZ(7,"div",135)(8,"input",136,137),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(3).directDebitAccountDetail.AccountHolderName=r})("blur",function(){return e.CHM(t),e.oxw(3).onChangeNameOnCard(!1)}),e.qZA()()(),e.TgZ(10,"div",134)(11,"label",21),e._uU(12," Account Number "),e.qZA(),e.TgZ(13,"div",135)(14,"input",138,139),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(3).directDebitAccountDetail.AccountNumber=r}),e.qZA()()(),e.YNc(16,ei,6,6,"div",133),e.YNc(17,ti,6,7,"div",133),e.YNc(18,ii,6,6,"div",133),e.qZA()}if(2&s){const t=e.MAs(9),i=e.MAs(15),r=e.oxw(3);e.xp6(1),e.Q6J("ngIf",r.isACH),e.xp6(1),e.Q6J("ngIf",r.sepaCountryList&&r.sepaCountryList.length>0),e.xp6(1),e.Q6J("ngIf",r.directDebitAccountDetail.CountryCode==r.enu_SEPACountryCode.SK),e.xp6(4),e.Q6J("ngClass",e.WLB(12,f,t.invalid&&(t.dirty||t.touched||r.showValidation),t.valid&&(t.dirty||t.touched))
1),e.xp6(1),e.Q6J("ngModel",r.directDebitAccountDetail.AccountHolderName),e.xp6(5),e.Q6J("ngClass",e.WLB(15,f,i.invalid&&(i.dirty||i.touched||r.showValidation),i.valid&&(i.dirty||i.touched))),e.xp6(1),e.Q6J("ngModel",r.directDebitAccountDetail.AccountNumber)("accountCodeDirective",r.sepaDashAfterDigit)("maxlength",r.accountMax?r.accountMax:r.enu_PaymentAccount.Default),e.xp6(2),e.Q6J("ngIf",null!=r.bankCodeMax),e.xp6(1),e.Q6J("ngIf",r.branchCodeRequired),e.xp6(1),e.Q6J("ngIf",null!=r.checkMax)}}function ri(s,n){if(1&s&&(e.TgZ(0,"div",125),e.YNc(1,jt,5,5,"div",126),e.YNc(2,si,19,18,"div",127),e.qZA()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.savedCards),e.xp6(1),e.Q6J("ngIf",0===t.cardId)}}function ai(s,n){if(1&s&&(e.TgZ(0,"div",152)(1,"div",153)(2,"div",154),e._UZ(3,"app-bank-payment-name",155),e.TgZ(4,"p",156),e._uU(5,"Pay securely using your bank. You will be redirected to your bank to authorize the payment when you buy the package. Only the amount due today is paid this way."),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(3),e.Q6J("customerID",t.customerID)("amount",t.bankPaymentAmount)("email",null==t.buyMembershipModel||null==t.buyMembershipModel.Customer?null:t.buyMembershipModel.Customer.Email)("stripeAccountID",t.bankStripeAccountID)("stripePublishablekey",t.bankStripePublishablekey)("pendingStorageKey",t.idealPendingStorageKey)}}function ni(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",159)(1,"input",129),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(3).cardId=r})("ngModelChange",function(){return e.CHM(t),e.oxw(3).onCardSelectionChange()}),e.qZA(),e.TgZ(2,"label",160),e._UZ(3,"span"),e._uU(4),e.qZA()()}if(2&s){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("id",t.CustomerPaymentGatewayID),e.Q6J("value",t.CustomerPaymentGatewayID)("ngModel",i.cardId),e.xp6(1),e.s9C("for",t.CustomerPaymentGatewayID),e.xp6(2),e.hij("\xa0",t.Title,"")}}function oi(s,n){1&s&&(e.TgZ(0,"div",166)(1,"label",21),e._uU(2," Credit or Debit Card "),e.qZA(),e._UZ(3,"div",167),e.qZA())}function mi(s,n){if(1&s&&(e.TgZ(0,"div",34)(1,"label",21),e._uU(2," Credit or Debit Card "),e.qZA(),e._UZ(3,"app-pay-tabs",168),e.qZA()),2&s){const t=e.oxw(4);e.xp6(3),e.Q6J("customerID",t.customerID)("nameOnCard",t.nameOnCard)("isSaveCard",!0)("currencyCode",t.branchCurrency)("branchCountryID",t.branchCountry)("isHomeAddressMandatory",t.branchWidgetSetting.IsHomeAddressNotRequired)}}function hi(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",161)(1,"div",162)(2,"label",163),e._uU(3," Name on Card "),e.qZA(),e.TgZ(4,"div",135)(5,"input",164),e.NdJ("blur",function(){return e.CHM(t),e.oxw(3).onChangeNameOnCard(!0)}),e.qZA()()(),e.YNc(6,oi,4,0,"div",165),e.YNc(7,mi,4,6,"div",15),e.qZA()}if(2&s){const t=e.oxw(3);e.xp6(4),e.Q6J("ngClass",e.WLB(4,f,t.nameOnCard.invalid&&(t.nameOnCard.dirty||t.nameOnCard.touched||t.showValidation),t.nameOnCard.valid&&(t.nameOnCard.dirty||t.nameOnCard.touched))),e.xp6(1),e.Q6J("formControl",t.nameOnCard),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.Card),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId==t.paymentGateway.PayTabs)}}function li(s,n){if(1&s&&(e.TgZ(0,"div",152),e.YNc(1,ni,5,5,"div",157),e.YNc(2,hi,8,7,"div",158),e.qZA()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.savedCards),e.xp6(1),e.Q6J("ngIf",0===t.cardId)}}function di(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",174)(1,"input",175),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(3).cardId=r})("change",function(){return e.CHM(t),e.oxw(3).onStripeDebitCardSelectionChange()}),e.qZA(),e.TgZ(2,"label",130),e._UZ(3,"span"),e._uU(4),e.qZA()()}if(2&s){const t=n.$implicit,i=e.oxw(3);e.xp6(1),e.s9C("id",t.CustomerPaymentGatewayID),e.Q6J("value",t.CustomerPaymentGatewayID)("ngModel",i.cardId),e.xp6(1),e.s9C("for",t.CustomerPaymentGatewayID),e.xp6(2),e.hij("\xa0",t.Title,"")}}function ci(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",176)(1,"input",177),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(3).cardId=r})("change",function(){return e.CHM(t),e.oxw(3).onStripeDebitCardSelectionChange()}),e.qZA(),e.TgZ(2,"label",178),e._UZ(3,"span"),e._uU(4,"\xa0Add New Account"),e.qZA()()}if(2&s){const t=e.oxw(3);e.xp6(1),e.Q6J("value",-1)("ngModel",t.cardId)}}function ui(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"button",179),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).changeStripeAccount()}),e._uU(1,"Change Account"),e.qZA()}}const X=function(s){return{"border-bottom":s}};function pi(s,n){if(1&s&&(e.TgZ(0,"div",152)(1,"div",169),e.YNc(2,di,5,5,"div",170),e.qZA(),e.TgZ(3,"div",169),e.YNc(4,ci,5,2,"div",171),e.TgZ(5,"div",172),e.YNc(6,ui,2,0,"button",173),e.qZA()()()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.VKq(5,X,(null==t.savedCards?null:t.savedCards.length)>0)),e.xp6(1),e.Q6J("ngForOf",t.savedCards),e.xp6(1),e.Q6J("ngClass",e.VKq(7,X,t.paymentTypeId===t.paymentType.StripeDD&&(0===t.cardId||-1===t.cardId)&&t.isShowStripeDebit)),e.xp6(1),e.Q6J("ngIf",t.isShowStripeDDNewAccount),e.xp6(2),e.Q6J("ngIf",null==t.addStripeDebitRef?null:t.addStripeDebitRef.shouldDisable)}}function gi(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",180)(1,"div",181)(2,"div",182)(3,"div",183)(4,"input",184),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(2).isTermsAgreed=r}),e.qZA(),e.TgZ(5,"label",185),e._uU(6," Please confirm you are the account holder and you are the only person required to authorize debits from this account."),e.qZA()()(),e.TgZ(7,"div",186),e._UZ(8,"img",187),e.qZA()()()}if(2&s){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.isTermsAgreed)}}function _i(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",180)(1,"div",181)(2,"div",154)(3,"div",188)(4,"input",184),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(2).isTermsAgreed=r}),e.qZA(),e.TgZ(5,"label",185),e._uU(6," Please confirm you are the account holder and you are the only person required to authorize debits from this account."),e._UZ(7,"br"),e._uU(8," To validate the customers\u2019 card, we will be doing a test authorization for a micro amount, which will be refunded immediately. Cards cannot be added/used if this test authorization fails. "),e.qZA()()(),e.TgZ(9,"div",186),e._UZ(10,"img",189),e.qZA()()()}if(2&s){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.isTermsAgreed)}}function yi(s,n){if(1&s&&(e.TgZ(0,"div",180)(1,"div",181)(2,"div",154),e._UZ(3,"stripe-debit",190,191),e.qZA()()()),2&s){const t=e.oxw(2);e.xp6(3),e.Q6J("customerID",t.customerID)}}function bi(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",180)(1,"div",181)(2,"div",182)(3,"div",183)(4,"input",184),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(2).isTermsAgreed=r}),e.qZA(),e.TgZ(5,"label",185),e._uU(6," Please confirm you are the account holder and you are the only person required to authorize direct debits from this account."),e.qZA()()(),e.TgZ(7,"div",192),e._UZ(8,"img",193),e.qZA()()()}if(2&s){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.isTermsAgreed)}}function Mi(s,n){if(1&s&&(e.ynx(0),e.TgZ(1,"div",3)(2,"div",34),e.YNc(3,Jt,3,0,"div",111),e.YNc(4,Ot,3,0,"div",111),e.YNc(5,Gt,3,0,"div",111),e.YNc(6,Qt,3,0,"div",111),e.YNc(7,Ht,3,0,"div",111),e.YNc(8,Yt,3,0,"div",111),e.qZA()(),e.YNc(9,Vt,12,6,"div",112),e.TgZ(10,"div",113),e.YNc(11,ri,3,2,"div",114),e.YNc(12,ai,
16,6,"div",115),e.YNc(13,li,3,2,"div",115),e.YNc(14,pi,7,9,"div",115),e.qZA(),e.TgZ(15,"div",3),e.YNc(16,gi,9,1,"div",116),e.YNc(17,_i,11,1,"div",116),e.YNc(18,yi,5,1,"div",116),e.YNc(19,bi,9,1,"div",116),e.qZA(),e.BQk()),2&s){const t=e.oxw();e.xp6(3),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.Card&&!t.isBankPaymentAvailable),e.xp6(1),e.Q6J("ngIf",t.isBankPaymentAvailable&&!t.isBankOnlyGateway),e.xp6(1),e.Q6J("ngIf",t.isBankPayment&&t.isBankOnlyGateway),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentGateway.PayTabs),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.StripeDD),e.xp6(1),e.Q6J("ngIf",t.isBankPaymentAvailable&&!t.isBankOnlyGateway),e.xp6(2),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit),e.xp6(1),e.Q6J("ngIf",t.isBankPayment),e.xp6(1),e.Q6J("ngIf",(t.paymentTypeId===t.paymentType.Card||t.paymentTypeId==t.paymentGateway.PayTabs)&&!t.isBankPayment),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.StripeDD),e.xp6(2),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.Card&&0===t.cardId&&!t.isBankPayment),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentGateway.PayTabs&&0===t.cardId),e.xp6(1),e.Q6J("ngIf",(t.paymentTypeId===t.paymentType.StripeDD&&0===t.cardId||-1===t.cardId)&&t.isShowStripeDebit),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit&&0===t.cardId)}}function Ci(s,n){if(1&s&&e._uU(0),2&s){const t=e.oxw().$implicit;e.Oqu(t.FormName)}}function vi(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"mat-step"),e.YNc(1,Ci,1,1,"ng-template",11),e.TgZ(2,"membership-form",194),e.NdJ("onSubmitForms",function(r){return e.CHM(t),e.oxw().onSubmitFormsHandler(r)}),e.qZA()()}if(2&s){const t=n.$implicit,i=n.index,r=e.oxw();e.xp6(2),e.Q6J("customForms",t)("membershipDetails",r.membershipDetails)("formIndexFromParent",i)("membershipFormOption",r.membershipFormOption)}}function fi(s,n){if(1&s&&e._uU(0),2&s){const t=e.oxw(2);e.Oqu(t.branchWidgetSetting.RewardProgramFriendlyName)}}function Di(s,n){1&s&&e._UZ(0,"img",104)}function Ti(s,n){if(1&s&&(e.TgZ(0,"div",90),e._UZ(1,"img",105),e.qZA()),2&s){const t=n.$implicit,i=e.oxw(4);e.xp6(1),e.s9C("src",i.serverImageAddress+t.ImagePath,e.LSH)}}function Si(s,n){if(1&s&&(e.TgZ(0,"ngx-slick-carousel",87,88),e.YNc(2,Ti,2,1,"div",89),e.qZA()),2&s){const t=e.oxw(3);e.Q6J("config",t.membershipDetailsCarousel),e.xp6(2),e.Q6J("ngForOf",null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)}}function Pi(s,n){if(1&s&&(e.TgZ(0,"div",198),e.YNc(1,Di,1,0,"img",100),e.YNc(2,Si,3,2,"ngx-slick-carousel",101),e.TgZ(3,"div",199)(4,"div",34)(5,"h4"),e._uU(6),e.qZA(),e.TgZ(7,"div",84),e._UZ(8,"p",85),e.qZA()(),e.TgZ(9,"div",34),e._UZ(10,"hr"),e.qZA(),e.TgZ(11,"div",103)(12,"h3"),e._uU(13,"Validity Period"),e.qZA(),e.TgZ(14,"p"),e._uU(15,"Valid from "),e.TgZ(16,"b"),e._uU(17),e.ALo(18,"customdate"),e.qZA(),e._uU(19," to "),e.TgZ(20,"b"),e._uU(21),e.ALo(22,"customdate"),e.qZA(),e._uU(23,". "),e.qZA()()()()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",null==(null==t.selectedMembership?null:t.selectedMembership.MembershipMediaList)||0==(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)),e.xp6(1),e.Q6J("ngIf",(null==t.selectedMembership||null==t.selectedMembership.MembershipMediaList?null:t.selectedMembership.MembershipMediaList.length)>0),e.xp6(4),e.Oqu(t.selectedMembership.MembershipName),e.xp6(2),e.Q6J("innerHtml",t.selectedMembership.Description,e.oJD),e.xp6(9),e.Oqu(e.xi3(18,6,t.membershipPaymentSummary.ValidFrom,t.dateFormat)),e.xp6(4),e.Oqu(e.xi3(22,9,t.membershipPaymentSummary.ValidTo,t.dateFormat))}}function Ii(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"mat-step"),e.YNc(1,fi,1,1,"ng-template",11),e.TgZ(2,"div",29)(3,"div",50),e.YNc(4,Pi,24,12,"div",195),e.qZA(),e.TgZ(5,"div",31)(6,"div",196)(7,"app-customer-optin-reward-program-html",197),e.NdJ("onBackRewardProgram",function(){return e.CHM(t),e.oxw().onBackRewardProgramClicked()})("onJoin",function(r){return e.CHM(t),e.oxw().onJoinRewardProgramSubmitted(r)}),e.qZA()()()()()}if(2&s){const t=e.oxw();e.xp6(4),e.Q6J("ngIf",t.selectedMembership),e.xp6(3),e.Q6J("isCu
1stomerProfile",!1)}}function Ai(s,n){1&s&&e._uU(0,"Confirm")}function xi(s,n){1&s&&e._UZ(0,"div")}function wi(s,n){1&s&&(e.TgZ(0,"h2",54),e._uU(1," Your Bank Detail"),e.qZA())}function Zi(s,n){1&s&&(e.TgZ(0,"h2",54),e._uU(1," Your Card Detail"),e.qZA())}function ki(s,n){if(1&s&&(e.TgZ(0,"div",3)(1,"div",16)(2,"div",3)(3,"div",34)(4,"div",53),e.YNc(5,wi,2,0,"h2",210),e.YNc(6,Zi,2,0,"h2",210),e.qZA()()()()()),2&s){const t=e.oxw(3);e.xp6(5),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit||t.paymentTypeId===t.paymentType.StripeDD),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.Card||t.paymentTypeId===t.paymentGateway.PayTabs)}}function Bi(s,n){1&s&&(e.TgZ(0,"h5"),e._uU(1,"Payment Method"),e.qZA())}function Ni(s,n){if(1&s&&(e.TgZ(0,"p"),e._uU(1),e.ALo(2,"currency"),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij("Bank Payment - ",e.gM2(2,1,t.bankPaymentAmount,t.currencyFormat,"symbol","1.2-2")," due today")}}function qi(s,n){1&s&&(e.TgZ(0,"h5"),e._uU(1,"Card Details"),e.qZA())}function Fi(s,n){1&s&&(e.TgZ(0,"h5"),e._uU(1,"Card Details"),e.qZA())}function Ui(s,n){1&s&&(e.TgZ(0,"h5"),e._uU(1,"Bank Account Name"),e.qZA())}function Li(s,n){1&s&&(e.TgZ(0,"h5"),e._uU(1,"Stripe Direct Debit"),e.qZA())}function Ei(s,n){if(1&s&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.viewPaymentSummary.AccountDetails.CardNumber?t.viewPaymentSummary.AccountDetails.CardNumber:t.viewPaymentSummary.AccountDetails.AccountHolderName," ")}}function Ri(s,n){if(1&s&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.viewPaymentSummary.AccountDetails.CardNumber?t.viewPaymentSummary.AccountDetails.CardNumber:t.viewPaymentSummary.AccountDetails.AccountHolderName," ")}}function Ji(s,n){if(1&s&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.viewPaymentSummary.AccountDetails.AccountHolderName?t.viewPaymentSummary.AccountDetails.AccountHolderName:t.viewPaymentSummary.AccountDetails.AccountNumber," ")}}function Oi(s,n){if(1&s&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&s){const t=e.oxw(3);e.xp6(1),e.hij(" ",t.viewPaymentSummary.AccountDetails.AccountHolderName," ")}}function Gi(s,n){if(1&s&&(e.TgZ(0,"div",211)(1,"h5"),e._uU(2,"Bank Account Number"),e.qZA(),e.TgZ(3,"p"),e._uU(4),e.qZA()()),2&s){const t=e.oxw(3);e.xp6(4),e.hij(" ",t.viewPaymentSummary.AccountDetails.AccountNumber?t.viewPaymentSummary.AccountDetails.AccountNumber:""," ")}}function Qi(s,n){if(1&s&&(e.TgZ(0,"div",211)(1,"h5"),e._uU(2,"Branch/Sort Code"),e.qZA(),e.TgZ(3,"p"),e._uU(4),e.qZA()()),2&s){const t=e.oxw(3);e.xp6(4),e.hij(" ",t.viewPaymentSummary.AccountDetails.BankCode?t.viewPaymentSummary.AccountDetails.BankCode:t.viewPaymentSummary.AccountDetails.BranchCode," ")}}function Hi(s,n){if(1&s&&(e.TgZ(0,"div",211)(1,"h5"),e._uU(2,"Account Number"),e.qZA(),e.TgZ(3,"p"),e._uU(4),e.qZA()()),2&s){const t=e.oxw(3);e.xp6(4),e.hij(" ",t.viewPaymentSummary.AccountDetails.AccountNumber," ")}}const Yi=function(s,n){return{"col-xl-12":s,"col-xl-4":n}};function Vi(s,n){if(1&s&&(e.ynx(0),e.YNc(1,ki,7,2,"div",206),e.TgZ(2,"div",207)(3,"div",208),e.YNc(4,Bi,2,0,"h5",28),e.YNc(5,Ni,3,6,"p",28),e.YNc(6,qi,2,0,"h5",28),e.YNc(7,Fi,2,0,"h5",28),e.YNc(8,Ui,2,0,"h5",28),e.YNc(9,Li,2,0,"h5",28),e.YNc(10,Ei,2,1,"p",28),e.YNc(11,Ri,2,1,"p",28),e.YNc(12,Ji,2,1,"p",28),e.YNc(13,Oi,2,1,"p",28),e.qZA(),e.YNc(14,Gi,5,1,"div",209),e.YNc(15,Qi,5,1,"div",209),e.YNc(16,Hi,5,1,"div",209),e.qZA(),e.BQk()),2&s){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.StripeDD&&(null==t.viewPaymentSummary||null==t.viewPaymentSummary.AccountDetails?null:t.viewPaymentSummary.AccountDetails.AccountHolderName)),e.xp6(2),e.Q6J("ngClass",e.WLB(15,Yi,t.paymentTypeId===t.paymentType.Card||t.paymentTypeId===t.paymentGateway.PayTabs,t.paymentTypeId===t.paymentType.DirectDebit||t.paymentTypeId===t.paymentType.StripeDD)),e.xp6(1),e.Q6J("ngIf",t.isBankPayment),e.xp6(1),e.Q6J("ngIf",t.isBankPayment),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.Card&&!t.isBankPayment),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentGateway.PayTabs),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.StripeDD&&(null==t.viewPaymentSummary||null==t.viewPaymentSummary.AccountDetails?null:t.viewPaymentSummary.AccountDetails.AccountHolderName)),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.Card&&!t.isBankPayment),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentGateway.PayTabs),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.StripeDD&&(null==t.viewPaymentSummary||null==t.viewPaymentSummary.AccountDetails?null:t.viewPaymentSummary.AccountDetails.AccountHolderName)),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit&&0===t.cardId),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit&&0===t.cardId),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.StripeDD&&t.viewPaymentSummary.AccountDetails.AccountNumber)}}function ji(s,n){1&s&&(e.TgZ(0,"div",212)(1,"div",34)(2,"h5",40),e._uU(3,"The Direct Debit Guarantee"),e.qZA()()())}function Wi(s,n){1&s&&(e.TgZ(0,"div",213)(1,"ul",214)(2,"li"),e._uU(3,"The Guarantee is offered by all banks and building societies that accept instructions to pay Direct Debits."),e.qZA(),e.TgZ(4,"li"),e._uU(5,"If there are any changes to the amount, date or interval of your Direct Debit, GoCardless will notify you 3 working days in advance of your account being debited or as otherwise agreed. If you request GoCardless to collect a payment, confirmation of the amount and date will be given to you at the time of the request."),e.qZA(),e.TgZ(6,"li"),e._uU(7,"If an error is made in the payment of your Direct Debit, by GoCardless or your bank or building society, you are entitled to a full and immediate refund of the amount paid from your bank or building society - If you receive a refund you are not entitled to, you must pay it back when GoCardless asks you to."),e.qZA(),e.TgZ(8,"li"),e._uU(9,"You can cancel a Direct Debit at any time by simply contacting your bank or building society. Written confirmation may be required. Please also notify us."),e.qZA(),e.TgZ(10,"li"),e._uU(11,"Payment Provided by GoCardless. Read the updated GoCardless "),e.TgZ(12,"a",215),e._uU(13,"Privacy Notice"),e.qZA(),e._uU(14," to learn more about how they use personal data."),e.qZA()()())}function Ki(s,n){if(1&s&&(e.TgZ(0,"a",222),e._uU(1," Terms & Conditions"),e.qZA()),2&s){const t=e.oxw(3);e.s9C("href",t.companyTermsandContition,e.LSH)}}function zi(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",216)(1,"div",3)(2,"div",217)(3,"span",218),e._uU(4),e.qZA(),e.YNc(5,Ki,2,1,"a",219),e._UZ(6,"br"),e.TgZ(7,"div",183)(8,"input",220),e.NdJ("ngModelChange",function(r){return e.CHM(t),e.oxw(2).isCompanyTermsAgreed=r}),e.qZA(),e.TgZ(9,"label",221),e._uU(10," I have read and agree to the Terms & Conditions."),e.qZA()()()()()}if(2&s){const t=e.oxw(2);e.xp6(4),e.Oqu(t.companyName),e.xp6(1),e.Q6J("ngIf",t.companyTermsandContition),e.xp6(3),e.Q6J("ngModel",t.isCompanyTermsAgreed)}}function $i(s,n){if(1&s&&(e.TgZ(0,"div",33),e.YNc(1,Vi,17,18,"ng-container",28),e.TgZ(2,"div",3)(3,"div",34)(4,"div",53)(5,"h2",54),e._uU(6,"Billing Address"),e.qZA()()()(),e.TgZ(7,"div",200)(8,"div",201)(9,"h5"),e._uU(10,"Country"),e.qZA(),e.TgZ(11,"p"),e._uU(12),e.qZA()(),e.TgZ(13,"div",201)(14,"h5"),e._uU(15,"Address Line 1"),e.qZA(),e.TgZ(16,"p"),e._uU(17),e.qZA()(),e.TgZ(18,"div",201)(19,"h5"),e._uU(20,"Address Line 2"),e.qZA(),e.TgZ(21,"p"),e._uU(22),e.qZA()(),e.TgZ(23,"div",202)(24,"h5"),e._uU(25,"City"),e.qZA(),e.TgZ(26,"p"),e._uU(27),e.qZA()(),e.TgZ(28,"div",202)(29,"h5"),e._uU(30,"State/County"),e.qZA(),e.TgZ(31,"p"),e._uU(32),e.qZA()(),e.TgZ(33,"div",202)(34,"h5"),e._uU(35,"Postal Code/ Zip Code"),e.qZA(),e.TgZ(36,"p"),e._uU(37),e.qZA()()(),e.YNc(38,ji,4,0,"div",203),e.TgZ(39,"div",3),e.YNc(40,Wi,15,0,"div",204),e.YNc(41,zi,11,3,"div",205),e.qZA()()),2&s){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.isPaymentMethodRequired),e.xp6(11),e.Oqu(t.customerBillingAddress.CountryName?t.customerBillingAddress.CountryName:"N/A"),e.xp6(5),e.Oqu(t.customerBillingAddress.Address1?t.customerBillingAddress.Address1:"N/A"),e.xp6(5),e.Oqu(t.customerBillingAddress.Address2?t.customerBillingAddress.Address2:"N/A"),e.xp6(5),e.Oqu(t.customerBillingAddress.CityName?t.customerBillingAddress.CityName:"N/A"),e.xp6(5),e.Oqu(t.customerBillingAddress.StateCountyName?t.customerBillingAddress.StateCountyName:"N/A"),e.xp6(5),e.Oqu(t.customerBillingAddress.PostCode?t.customerBillingAddress.PostCode:"N/A"),e.xp6(1),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit&&t.isPaymentMethodRequired),e.xp6(2),e.Q6J("ngIf",t.paymentTypeId===t.paymentType.DirectDebit&&t.isPaymentMethodRequired),e.xp6(1),e.Q6J("ngIf",t.allowTermsandConditions)}}function Xi(s,n){if(1&s&&(e.TgZ(0,"div",3)(1,"div",226)(2,"h5"),e._uU(3),e.qZA()(),e.TgZ(4,"div",228)(5,"h5"),e._uU(6),e.ALo(7,"currency"),e.qZA()()()),2&s){const t=e.oxw(2);e.xp6(3),e.hij("",t.durationTypeName," Dues"),e.xp6(3),e.Oqu(e.gM2(7,2,null==t.summaryDetail?null:t.summaryDetail.MonthlyDues,t.currencyFormat,"symbol","1.2-2"))}}function es(s,n){if(1&s){const t=e.EpF();e.TgZ(0,"div",50)(1,"div",14)(2,"label",21),e._uU(3," Start Date "),e.qZA(),e.TgZ(4,"date-picker",223),e.NdJ("onDateChange",function(r){return e.CHM(t),e.oxw().onToDateChange(r,"startDate")}),e.qZA(),e.TgZ(5,"div",224),e._uU(6,"Summary"),e.qZA(),e.TgZ(7,"div",3)(8,"div",41)(9,"h5"),e._uU(10,"Initiation Fee"),e.qZA()(),e.TgZ(11,"div",225)(12,"h5"),e._uU(13),e.ALo(14,"currency"),e.qZA()()(),e.TgZ(15,"div",3)(16,"div",226)(17,"h5"),e._uU(18,"First Interval Dues"),e.qZA()(),e.TgZ(19,"div",225)(20,"h5"),e._uU(21),e.ALo(22,"currency"),e.qZA()()(),e.TgZ(23,"div",3)(24,"div",41)(25,"h5"),e._uU(26,"Sub Total"),e.qZA()(),e.TgZ(27,"div",225)(28,"h5"),e._uU(29),e.ALo(30,"currency"),e.qZA()(),e._UZ(31,"hr"),e.qZA(),e.TgZ(32,"div",3)(33,"div",41),e._UZ(34,"hr"),e.qZA()(),e.TgZ(35,"div",3)(36,"div",41)(37,"h5"),e._uU(38),e.qZA()(),e.TgZ(39,"div",225)(40,"h5"),e._uU(41),e.ALo(42,"currency"),e.qZA()()(),e.TgZ(43,"div",227)(44,"div",226)(45,"h5"),e._uU(46,"Total Due Today"),e.qZA()(),e.TgZ(47,"div",228)(48,"h5"),e._uU(49),e.ALo(50,"currency"),e.qZA()()(),e.YNc(51,Xi,8,7,"div",206),e.qZA()()}if(2&s){const t=e.oxw();e.xp6(4),e.Q6J("value",t.buyMembershipModel.StartDate)("min",t.minDate)("showClear",!1)("disabled",!0)("showClear",!t.isUserLoggedIn),e.xp6(9),e.Oqu(e.gM2(14,12,null==t.summaryDetail?null:t.summaryDetail.InitiationFee,t.currencyFormat,"symbol","1.2-2")),e.xp6(8),e.Oqu(e.gM2(22,17,null==t.summaryDetail?null:t.summaryDetail.FirstMonthDues,t.currencyFormat,"symbol","1.2-2")),e.xp6(8),e.hij(" ",e.gM2(30,22,((null==t.summaryDetail?null:t.summaryDetail.InitiationFee)>0?null==t.summaryDetail?null:t.summaryDetail.InitiationFee:0)+((null==t.summaryDetail?null:t.summaryDetail.FirstMonthDues)>0?null==t.summaryDetail?null:t.summaryDetail.FirstMonthDues:0),t.currencyFormat,"symbol","1.2-2")," "),e.xp6(9),e.Oqu(null==t.branchWidgetSetting?null:t.branchWidgetSetting.TaxLabelFriendlyName),e.xp6(3),e.Oqu(e.gM2(42,27,t.summaryDetail.TaxAmount,t.currencyFormat,"symbol","1.2-2")),e.xp6(8),e.hij(" ",e.gM2(50,32,(t.summaryDetail.InitiationFee>0?t.summaryDetail.InitiationFee:0)+(t.summaryDetail.FirstMonthDues>0?t.summaryDetail.FirstMonthDues:0)+(t.summaryDetail.TaxAmount>0?t.summaryDetail.TaxAmount:0),t.currencyFormat,"symbol","1.2-2")," "),e.xp6(2),e.Q6J("ngIf",t.isMothlyDuesShow)}}var A,x,T;const is=[{path:"",component:fe},{path:"inquire-package/:PackageID",component:Oe},{path:"buy-package/:PackageID",component:(()=>{class s extends w.G{constructor(t,i,r,a,o,l,p,d,g,u,C,os,ms,hs,ls,ds){super(null),this._route=t,this._loginService=i,this._dialog=r,this._dataSharingService=a,this._posMembershipService=o,this._posSaleService=l,this._homeService=p,this._messageService=d,this._router=g,this._taxCalculationService=u,this._dateTimeService=C,this._loaderService=os,this._dynamicScriptLoader=ms,this._commonService=hs,this.AnalyticsService=ls,this._stripeService=ds,this.membershipDetailsCarousel={slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:5e3,dots:!0,arrows:!1}
1,this.isShowStripeDDNewAccount=!0,this.hascurrencyFormated=!1,this.allowTermsandConditions=!0,this.isFromShareMembership=!1,this.hasMemberhsips=!0,this.hasMemberhsipAlreadyAssigned=!0,this.isPaymentMethodRequired=!1,this.isTermsAgreed=!1,this.isCompanyTermsAgreed=!1,this.customerRewardProgramId=0,this.customerID=0,this.cardId=0,this.hasPayments=!1,this.hasBillingAddress=!1,this.hasCustomerDetail=!1,this.hasStripeKeys=!1,this.hasSavedCards=!1,this.payTabsCardInfo=new Ye.L,this.restrictedCustomerType=h.M2,this.minDate=new Date,this.maxBirthDate=new Date,this.activeTabIndex=0,this.totalAmountForViewSummary=0,this.isBankPaymentSelected=!1,this.showMembershipPayment=!1,this.accountMax=null,this.branchCodeMax=null,this.bankCodeMax=null,this.checkMax=null,this.spaceMax=1,this.branchCodeRequired=!0,this.membershipDetails=!0,this.durationTypeName="",this.USCountryID=2,this.stripeConfigurationKeys=new S.Pq,this.branchWidgetSetting=new S.kv,this.nameOnCard=new c.NI,this.posMembershipDetail=new _.Kf,this.membershipPaymentSummary=new _.n8,this.membershipFormOption=new _.A$,this.personModel=new P.O8,this.customerBillingAddress=new P.wz,this.addressFundamentals=new L.r9,this.buyMembershipModel=new _.sf,this.paymentSummary=new _.FV,this.summaryDetail=new _.l2,this.customerInfo=new S.QS,this.customFormView=[],this.purchaseRestrictedMembership=[],this.authenticateCard=new _.sL,this.enu_SEPACountryScheme=h.kV,this.rewardProgramEnrollmentType=h.Lp,this.package=h.wq,this.shareMembershipArea=h.d1,this.isAllowMemberShipSharing=!1,this.sharedProfileList=[],this.savedCards=[],this.paymentPlanList=[],this.promoCodeDetail=new K.A8,this.maxDate=new Date,this.messages=M.TS.Messages,this.paymentType=h.uG,this.paymentGateway=h.HY,this.serverImageAddress="",this.wizardSteps=h.Hi,this.membershipPaymentType=h.Zi,this.dateFormat=M.TS.DateFormat,this.membershipDurationType=h.Er,this.membershipDurationTypeName=h.YC,this.datetimeFormatForSave=M.TS.DateFormatForSave,this.enu_SEPACountryCode=h.Vi,this.enu_PaymentAccount=h.P6,this.paymentSortCodeLength=h.Vm,this.sepaCountryAccountDetail=M.BU.SEPACountryAccountDetail,this.sepaCountryDigitAfterDashDetail=M.zs.SEPACountryDigitAfterDashDetail,this.isACH=!1,this.accountTypeList=M.TS.accountTypeList,this.isLoadedPage=!1,this.isLoadAddressComp=!1,this.defaultImagePath="/assets/images/Membership-Header.jpg",this.isPromoCodeApplied=!1,this.isPromoCodeBtnDisabled=!0,this.isRedeemPromoCodeOnWidget=!1,this.isMothlyDuesShow=!1,this.headerBannerEnum=h.bj,this.isShowStripeDebit=!0,this.idealPendingStorageKey=y.R.IdealPendingMembership,this.directDebitAccountDetail=new _.zh,this.stripeDD=new Qe.t}ngOnInit(){this.isFromShareMembership=!1,this.directDebitAccountDetail.AccountType=null,this.isHomeLoadedInSubscription=this._dataSharingService.isLoadedHome.subscribe(t=>{t&&(this.isLoadedPage=!0,this.setDefaultData())}),this.getDropdownFundamentals()}ngOnDestroy(){var t;this._dataSharingService.membershipLoginIndicator(!1),this.isUserLoggedInSubscription&&this.isUserLoggedInSubscription.unsubscribe(),this.isGuestUserSubscription&&this.isGuestUserSubscription.unsubscribe(),this.usrProfileUpdatedSubscription&&this.usrProfileUpdatedSubscription.unsubscribe(),this.isHomeLoadedInSubscription&&this.isHomeLoadedInSubscription.unsubscribe(),null===(t=this.activeMemberShipSubscription)||void 0===t||t.unsubscribe(),T=void 0,x=void 0}setDefaultData(){const t=Object.create(null,{getCurrentBranch:{get:()=>super.getCurrentBranch},getBranchDateFormat:{get:()=>super.getBranchDateFormat},getCurrentBranchSettings:{get:()=>super.getCurrentBranchSettings}});var i;return function(s,n,t,i){return new(t||(t=Promise))(function(a,o){function l(g){try{d(i.next(g))}catch(u){o(u)}}function p(g){try{d(i.throw(g))}catch(u){o(u)}}function d(g){g.done?a(g.value):function r(a){return a instanceof t?a:new t(function(o){o(a)})}(g.value).then(l,p)}d((i=i.apply(s,n||[])).next())})}(this,void 0,void 0,function*(){this.branchDetail=t.getCurrentBranch.call(this,this._dataSharingService),null!=this.branchDetail&&(this.countryID=this.branchDetail.CountryID,this.currencyFormat=this.branchDetail.CurrencySymbol,this.branchCurrency=this.branchDetail.Currency,this.branchCountry=this.branchDetail.CountryID),this.dateFormat=yield t.getBranchDateFormat.call(this,this._dataSharingService,h.Cx.DateFormat),this.buyMembershipModel.StartDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.getCurrentDateTimeForDScheduler()),this.minDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.getCurrentDateTimeForDScheduler()),this.branch=this._loginService.getBranch(),this.isCompanyWhydrate=this.branch.CompanyID,this.serverImageAddress=q.N.environment.imageUrl.replace("{CompanyID}",localStorage.getItem(y.R.CompanyID))+"BR"+localStorage.getItem(y.R.BranchID)+"/",this.setMembershipBanner(),this._paymentTypeID=this.getBuyMembershipGatewayID();let r=t.getCurrentBranchSettings.call(this,this._dataSharingService);r&&(this.pageTitle=this._commonService.setCustomNameForUrl(h.R1.Packages,r),this.branchWidgetSetting=r,this.isRedeemPromoCodeOnWidget=r.IsRedeemPromoCodeOnWidget,this.branchWidgetSetting.IsHomeAddressNotRequired=!!this.branchWidgetSetting.IsHomeAddressNotRequired&&this.branchWidgetSetting.IsHomeAddressNotRequired,this.IsMobileNumberRequired=this.branchWidgetSetting.IsMobileNumberRequired),this._paymentTypeID==this.paymentGateway.Stripe?(this._dataSharingService.shareBillingAddressOnCardTabChange(!1),this.loadScripts("stripejs")):this._paymentTypeID==this.paymentGateway.PayTabs?(this._dataSharingService.shareBillingAddressOnCardTabChange(!0),this.loadScripts(this.branchCountry==h.Sj.OMAN?"omanPaytabsjs":"paytabsjs")):(this._dataSharingService.shareBillingAddressOnCardTabChange(!0),this.loadScripts("stripejs")),this.getMembershipIdFromRoute(),setTimeout(()=>{this.activeMemberShipSubscription=this._dataSharingService.activeMemberShipList.subscribe(a=>{a&&a.length>0&&(this.isMemberHasActiveMembership=!0)})},300),this.getFundamentals(),this.defaultCountry=M.TS.DefaultCountry,this.saveMemberMembershipModel=new _.dP,this.isGuestUserSubscription=this._dataSharingService.isGuestUser.subscribe(a=>{this.isGuestUser=a,this.isUserLoggedIn=this.isUserLoggedIn&&!this.isGuestUser,a&&(this.buyMembershipModel.Customer.Email=this._loginService.getEmail(),this._dataSharingService.shareCustomerEmail(this.buyMembershipModel.Customer.Email))}),this.isUserLoggedInSubscription=this._dataSharingService.isUserLoggedIn.subscribe(a=>{this.isUserLoggedIn=a&&!this.isGuestUser,this.isUserLoggedIn?(this.customerIdSub
1scription=this._dataSharingService.customerID.subscribe(o=>{o&&o>0&&(this.customerID=o)}),this.getCustomerDetails(),setTimeout(()=>{this._dataSharingService.customerInfo.subscribe(o=>{o&&(this.customerInfo=o,this.isRewardProgramAllowed=!!o.RewardProgramAllowed,this.IsDefaultRewardProgram=!!o.IsDefaultRewardProgram,this.isSkipedRewardProgram=this.branchWidgetSetting.DefaultRewardProgramID===(o.CustomerRewardProgramFundamentals&&o.CustomerRewardProgramFundamentals.SkippedRewardProgramID?o.CustomerRewardProgramFundamentals.SkippedRewardProgramID:0),this.customerRewardProgramId=o.CustomerRewardProgramFundamentals&&o.CustomerRewardProgramFundamentals.CustomerRewardProgramID>0?o.CustomerRewardProgramFundamentals.CustomerRewardProgramID:0,this.saveMemberMembershipModel.CustomerCampaignUnsubscribe.MarketingEmailAllowed=o.MarketingEmailAllowed,this.saveMemberMembershipModel.CustomerCampaignUnsubscribe.MarketingSMSAllowed=o.MarketingSMSAllowed,this.saveMemberMembershipModel.CustomerCampaignUnsubscribe.MarketingWhatsAppAllowed=o.MarketingWhatsAppAllowed,this.saveMemberMembershipModel.CustomerCampaignUnsubscribe.MarketingPushNotificationAllowed=o.MarketingPushNotificationAllowed,this.saveMemberMembershipModel.CustomerCampaignUnsubscribe.CustomerID=o.CustomerID)})},300)):(this.isLoadAddressComp=!0,this.isRewardProgramAllowed=!0)}),this.isUserLoggedIn&&(null===(i=this._loaderService)||void 0===i||i.hide(),setTimeout(()=>{},1500)),this.usrProfileUpdatedSubscription=this._dataSharingService.isProfileUpdated.subscribe(a=>{a&&this.getCustomerDetails()}),this.companyInfoSubscription=this._dataSharingService.companyInfo.subscribe(a=>{a&&this.setPermissions(a.CompanyPackageID)}),this.buyMembershipModel.Customer.CustomerTypeID=h.d2.Client})}setMembershipBanner(){let t=super.getCurrentBranchSettings(this._dataSharingService);t&&(t.Banner&&t.Banner.PackageBanner&&""!=t.Banner.PackageBanner?(this.bannerImagePath=this.serverImageAddress+t.Banner.PackageBanner,this.hasImage=!!this.bannerImagePath,this.bannerImagePath=this.serverImageAddress+t.Banner.PackageBanner):this.hasImage=!!this.bannerImagePath)}getMembershipSpecificForms(){let t=new _.MT;t.membershipID=this.selectedMembership.MembershipID,t.customerID=this.buyMembershipModel.Customer.CustomerID,this._posMembershipService.getMembershipSpecificForms(t).subscribe(i=>{this.response=i},i=>{var r;this._messageService.showErrorMessage(this.messages.get_error.replace("{0}",`Get${null===(r=this.pageTitle)||void 0===r?void 0:r.toLowerCase()}SpecificForms`))},()=>{this.response&&this.response.Result&&(this.customFormView=[],this.customFormView=this.response.Result,this.customFormView&&this.customFormView.length>0&&this.customFormView.forEach(i=>{i.JsonText=JSON.parse(i.JsonText)}))})}onSubmitFormsHandler(t){"submit"===t.SkipSubmitIndicator?(this.stepper.next(),this.customFormView.forEach(i=>{i.FormID===t.CustomFormView.FormID&&((i=t.CustomFormView).IsSkipped=t.CustomFormView.IsSkipped,i.FormStatusID=t.CustomFormView.FormStatusID,i.JsonText=t.CustomFormView.JsonText)})):this.onPrevious()}onBackRewardProgramClicked(){this.onPrevious()}onJoinRewardProgramSubmitted(t){this._loaderService.show(),setTimeout(()=>{t&&(t.isCutomerViewedRewardProgramSkipped&&(this.customerInfo.CustomerRewardProgramFundamentals.SkippedRewardProgramID=t.cutomerViewedRewardProgramID),this.customerInfo.CustomerRewardProgramFundamentals.CustomerRewardProgramID=t.cutomerViewedRewardProgramID,this._dataSharingService.shareloginedCustomerInfo(this.customerInfo)),this.saveMemberMembershipModel.MemberMembership.customerViewedRewardProgramID=t.cutomerViewedRewardProgramID,this.saveMemberMembershipModel.MemberMembership.isSkippedRewardProgram=t.isCutomerViewedRewardProgramSkipped,this.stepper.next(),this._loaderService.hide()},1e3)}onMembershipChange(){this.getMembershipDetailsById(),this.getMembershipSpecificForms()}onMembershipStartDateChange(){this.getPaymentPlan()}GetAllMembershipPurchaseTypeRestriction(){this._posSaleService.GetAllMembershipPurchaseTypeRestriction(this.buyMembershipModel.MembershipID).subscribe(t=>{this.response=t},()=>{this._messageService.showErrorMessage(this.messages.dropdowns_load_error)},()=>{if(this.response&&this.response.Result&&(this.purchaseRestrictedMembership=this.response.Result,this.purchaseRestrictedMembership&&this.purchaseRestrictedMembership.length>0))for(let t=0;t<this.purchaseRestrictedMembership.length;t++)this.CustomerTypeID===h.d2.Member?(this.purchaseRestrictedMembership[t].RestrictedCustomerTypeID===this.restrictedCustomerType.Member_with_active_memberships&&this.isMemberHasActiveMembership&&this.navigateToDefaultLandingPage(),this.purchaseRestrictedMembership[t].RestrictedCustomerTypeID===this.restrictedCustomerType.Member_with_inactive_memberships&&!this.isMemberHasActiveMembership&&this.navigateToDefaultLandingPage()):this.purchaseRestrictedMembership[t].RestrictedCustomerTypeID===this.CustomerTypeID&&this.navigateToDefaultLandingPage()})}navigateToDefaultLandingPage(){var t;this._messageService.showErrorMessage(this.messages.package_Not_Avaliable.replace("{0}",null===(t=this.pageTitle)||void 0===t?void 0:t.toLowerCase())),setTimeout(()=>{let i=this._commonService.landingPageUrl(this.branchDetail.DefaultLandingPageID,this.branchDetail.CompanyCode,this.branchDetail.BranchCode);this._router.navigate([i])},2e3)}onContinue(){var t,i,r,a,o,l;let p=this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm;if(this.showValidation=!1,0===this.activeTabIndex&&(this.stepper.next(),this.isUserLoggedIn||this._dataSharingService.membershipLoginIndicator(!0),this.getPaymentPlan()),1===this.activeTabIndex&&(this.membershipBuyForm&&p&&this.isAllowMemberShipSharing?this.stepper.next():this.membershipBuyForm&&p&&!this.isAllowMemberShipSharing&&(this.stepper.next(),this.getDropdownFundamentals().then(()=>{this._dataSharingService.shareBillingAddressOnCardTabChange(this._paymentTypeID==this.paymentGateway.PayTabs||this._paymentTypeID==this.paymentGateway.GoCardles),this._paymentTypeID==this.paymentType.DirectDebit&&this.get
1SEPACounteries(),this._paymentTypeID<1&&(this._paymentTypeID=this.getBuyMembershipGatewayID()),this.paymentTypeId=this._paymentTypeID,this.onPaymentTypeChange(this.paymentTypeId),this.setCompanyNameAndTerms()}))),2===this.activeTabIndex)if(this.isAllowMemberShipSharing)this.stepper.next(),this.getDropdownFundamentals().then(()=>{this._dataSharingService.shareBillingAddressOnCardTabChange(this._paymentTypeID==this.paymentGateway.PayTabs||this._paymentTypeID==this.paymentGateway.GoCardles),this._paymentTypeID==this.paymentType.DirectDebit&&this.getSEPACounteries(),this._paymentTypeID<1&&(this._paymentTypeID=this.getBuyMembershipGatewayID()),this.paymentTypeId=this._paymentTypeID,this.onPaymentTypeChange(this.paymentTypeId),this.setCompanyNameAndTerms()});else{if(this.mapCustomerBillingAddress(),this.isStateCountyExist(),this._dataSharingService.shareCustomerEmail(this.buyMembershipModel.Customer.Email),!(this.membershipBuyForm&&this.membershipBuyForm.valid&&p&&(p.valid||p.disabled)&&(this.PersonalInformationComponent.datepicker.dateElement.valid||this.PersonalInformationComponent.datepicker.dateElement.disabled)))return this.membershipBuyForm&&(null===(t=this.membershipBuyForm.controls.person_mobile)||void 0===t?void 0:t.errors)?(this.showValidation=!0,void this._messageService.showErrorMessage(this.messages.mobile_invalid)):(this.showValidation=!0,void this._messageService.showErrorMessage(this.messages.validation_required));this.isPaymentMethodRequired?this.isSelectMembershipValid().then(d=>{d?(this.stepper.next(),this.mapCustomerBillingAddress(),this.setViewPaymentSummary(),this.getTotal(),this.setNextPaymentDay(),this.getMembershipPlanModel=this.getMemberMembershipModel()):this._dataSharingService.shareCustomerEmail(null)}):(this.stepper.next(),this.mapCustomerBillingAddress(),this.setViewPaymentSummary(),this.getTotal(),this.setNextPaymentDay(),this.getMembershipPlanModel=this.getMemberMembershipModel()),this.membershipBuyForm&&(null===(r=null===(i=this.membershipBuyForm.controls)||void 0===i?void 0:i.person_email)||void 0===r?void 0:r.errors)&&(this.showValidation=!0,this.membershipBuyForm&&(null===(a=this.membershipBuyForm.controls.person_email.errors)||void 0===a?void 0:a.pattern)?this._messageService.showErrorMessage(this.messages.email_invalid):this._messageService.showErrorMessage(this.messages.email_required))}if(3===this.activeTabIndex){if(this.mapCustomerBillingAddress(),this.isStateCountyExist(),this._dataSharingService.shareCustomerEmail(this.buyMembershipModel.Customer.Email),!(this.membershipBuyForm&&this.membershipBuyForm.valid&&p&&(p.valid||p.disabled)&&(this.PersonalInformationComponent.datepicker.dateElement.valid||this.PersonalInformationComponent.datepicker.dateElement.disabled)))return this.membershipBuyForm&&(null===(o=this.membershipBuyForm.controls.person_mobile)||void 0===o?void 0:o.errors)?(this.showValidation=!0,void this._messageService.showErrorMessage(this.messages.mobile_invalid)):(this.showValidation=!0,void this._messageService.showErrorMessage(this.messages.validation_required));this.isPaymentMethodRequired?this.isSelectMembershipValid().then(d=>{d?(this.stepper.next(),this.mapCustomerBillingAddress(),this.setViewPaymentSummary(),this.getTotal(),this.setNextPaymentDay(),this.getMembershipPlanModel=this.getMemberMembershipModel()):this._dataSharingService.shareCustomerEmail(null)}):(this.stepper.next(),this.mapCustomerBillingAddress(),this.setViewPaymentSummary(),this.getTotal(),this.setNextPaymentDay(),this.getMembershipPlanModel=this.getMemberMembershipModel()),this.membershipBuyForm&&(null===(l=this.membershipBuyForm.controls.person_email)||void 0===l?void 0:l.errors)&&(this.showValidation=!0,this._messageService.showErrorMessage(this.membershipBuyForm&&this.membershipBuyForm.controls.person_email.errors.pattern?this.messages.email_invalid:this.messages.email_required))}this.activeTabIndex=this.stepper.selectedIndex}onSkip(){this.sharedProfileList.forEach(t=>{t.IsMembershipAdded=!1}),this.onContinue()}onPrevious(){this.stepper.previous(),this.activeTabIndex=this.stepper.selectedIndex,2==this.activeTabIndex&&this.paymentTypeId==this.paymentGateway.PayTabs&&(this.paymentTypeId=0,setTimeout(()=>{var t;this.paymentTypeId=this.paymentGateway.PayTabs,null===(t=this.nameOnCard)||void 0===t||t.setValue("")},10)),2==this.activeTabIndex&&(null==this.authenticateCard.CustomerID||this.authenticateCard.CustomerID<=0)&&this._paymentTypeID!=this.paymentType.DirectDebit&&this._paymentTypeID!=this.paymentType.StripeDD&&this._paymentTypeID==this.paymentGateway.Stripe&&this.isPaymentMethodRequired&&!this.isUserLoggedIn&&(this.customerPaymentGatewayID=null,this.deleteNewCustomerGateway())}onMembershipPage(){this._router.navigate(["/"+this.branch.CompanyCode+"/"+this.branch.BranchCode+"/packages"])}onLogin(){this._loginService.showLoginDialog(this._router.url,!0)}onEmailUpdated(){!this.isUserLoggedIn&&this.buyMembershipModel.Customer.Email&&""!==this.buyMembershipModel.Customer.Email&&this.verifyCustomer()}onBuy(){this.isCompanyTermsAgreed?(this.setSaveMembershipModel(),this.isBankPayment?this.payViaBank():this.saveBuyMembership()):this._messageService.showErrorMessage(this.messages.Terms_Agreement_Required)}onPaymentTypeChange(t){this.paymentTypeId=t,this.paymentTypeId===this.paymentType.Card&&0===this.cardId&&setTimeout(()=>this.createStripeCardElement()),this.paymentTypeId===this.paymentGateway.PayTabs&&0===this.cardId&&setTimeout(()=>{var i;return null===(i=this.paytabsRef)||void 0===i?void 0:i.loadScripts()})}onToDateChange(t,i){setTimeout(()=>{"startDate"==i?(this.buyMembershipModel.StartDate=t,this.getMemberMembershipDuration(),this.setMembershipDetailsOption()):"dob"==i&&(this.buyMembershipModel.Customer.BirthDate=t)})}paymentMethodRequired(){this.isPaymentMethodRequired=this._commonService.memberShipPaymentMethodRequiredHandler(this.totalAmount,this.branchWidgetSetting.WidgetPartPaymentSetting.DontRequireMembershipPaymentMethodWhenTotalZero)}getMemberMembershipDuration(){this.buyMembershipModel.EndDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this.buyMembershipModel.StartDate),this.selectedMembership.MembershipLengthDurationTypeID==this.membershipDurationType.Days?this.buyMembershipModel.EndDate.setDate(this.buyMembershipModel.EndDate.getDate()+this.selectedMembership.MembershipLengthDurationValue-1):this.selectedMembership.MembershipLengthDurationTypeID==this.membershipDurationType.Weeks?this.buyMembershipModel.EndDate.setDate(this.buyMembershipModel.EndDate.getDate()+(7*this.selectedMembership.MembershipLengthDurationValue-1)):this.selectedMembership.MembershipLengthDurationTypeID==this.membershipDurationType.Months?this.buyMembershipModel.EndDate.setMonth(this.buyMembershipModel.EndDate.getMonth()+this.selectedMembership.MembershipLengthDurationValue):this.selectedMembership.MembershipLengthDurationTypeID==this.membershipDurationType.Quarter?this.buyMembershipModel.EndDate.setMonth(this.buyMembershipModel.EndDate.getMonth()+3*this.selectedMembership.MembershipLengthDurationValue):this.selectedMembership.MembershipLengthDurationTypeID==this.membershipDurationType.Yearly&&this.buyMembershipModel.EndDate.setFullYear(this.buyMembershipModel.EndDate.getFullYear()+this.selectedMembership.MembershipLengthDurationValue)}onCardSelectionChange(){0===this.cardId&&this.paymentTypeId===this.paymentType.Card&&setTimeout(()=>this.createStripeCardElement()),0===this.cardId&&this.paymentTypeId==this.paymentGateway.PayTabs&&(this._dataSharingService.shareBillingAddressOnCardTabChange(!0),setTimeout(()=>{var t;return null===(t=this.paytabsRef)||void 0===t?void 0:t.loadScripts()}))}
1onStripeDebitCardSelectionChange(){-1==this.cardId&&(this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=null)}onChangeMembehip(t){var i,r;t&&(this.selectedMembership=new _.G8,this.selectedMembership=t,this.setMembershipStartDateCalender(),this.selectedMembership.ImagePath=t.ImagePath&&""!==t.ImagePath?this.serverImageAddress+t.ImagePath:"assets/images/dummy_feed_image.png",this.paymentPlanList=JSON.parse(JSON.stringify(this.membershipList.find(a=>a.MembershipID===this.selectedMembership.MembershipID).MembershipPaymentPlan)),this.paymentPlanList.filter(a=>2===a.MembershipPaymentTypeID).length>0?(this.buyMembershipModel.DurationTypeID=null===(i=this.paymentPlanList.find(a=>2===a.MembershipPaymentTypeID))||void 0===i?void 0:i.DurationTypeID,this.buyMembershipModel.PaymentDayID=null===(r=this.paymentPlanList.find(a=>2===a.MembershipPaymentTypeID))||void 0===r?void 0:r.PaymentDayID,this.selectedMembership.DurationTypeID=this.buyMembershipModel.DurationTypeID):this.selectedMembership.DurationTypeID=this.selectedMembership.MembershipLengthDurationTypeID,this.getMemberMembershipDuration(),this.setMembershipDetailsOption())}setMembershipStartDateCalender(){setTimeout(()=>{var t,i,r,a,o,l,p;if(479==this.branch.CompanyID){const d=new Date("2025-12-20T00:00:00");this.maxDate=null,this.minDate=d,this.buyMembershipModel.StartDate=d}else if(4345==this.selectedMembership.MembershipID&&228==this.branch.CompanyID){this.selectedMembership.Calender
1StartDate="2025-06-16T00:00:00Z",this.selectedMembership.CalenderEndDate="2025-06-20T00:00:00Z",this.buyMembershipModel.StartDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this.buyMembershipModel.StartDate),null===(t=this.buyMembershipModel)||void 0===t||t.StartDate.setHours(0,0,0,0);let d=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.getCurrentDateTimeForDScheduler());d.setHours(0,0,0,0),this.selectedMembership.CalenderStartDate?(this.selectedMembership.CalenderStartDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.removeZoneFromDateTime(this.selectedMembership.CalenderStartDate)),null===(i=this.selectedMembership)||void 0===i||i.CalenderStartDate.setHours(0,0,0,0),(null===(r=this.buyMembershipModel)||void 0===r?void 0:r.StartDate)<(null===(a=this.selectedMembership)||void 0===a?void 0:a.CalenderStartDate)&&(this.buyMembershipModel.StartDate=this.selectedMembership.CalenderStartDate),this.minDate=this.selectedMembership.Calender
1StartDate&&this.selectedMembership.CalenderStartDate>d?this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.removeZoneFromDateTime(this.selectedMembership.CalenderStartDate)):this.minDate):this.minDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.getCurrentDateTimeForDScheduler()),this.selectedMembership.CalenderEndDate?(this.selectedMembership.CalenderEndDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.removeZoneFromDateTime(this.selectedMembership.CalenderEndDate)),null===(o=this.selectedMembership)||void 0===o||o.CalenderEndDate.setHours(0,0,0,0),(null===(l=this.buyMembershipModel)||void 0===l?void 0:l.StartDate)>(null===(p=this.selectedMembership)||void 0===p?void 0:p.CalenderEndDate)&&(this.buyMembershipModel.StartDate=this.selectedMembership.CalenderStartDate>d?this.selectedMembership.CalenderStartDate:d),this.maxDate=this.selectedMembership.CalenderEndDate?this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.removeZoneFromDateTime(this.selectedMembership.CalenderEndDate)):null):this.maxDate=null}else this.maxDate=null,this.minDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.getCurrentDateTimeForDScheduler()),this.buyMembershipModel.StartDate=this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this._dateTimeService.getCurrentDateTimeForDScheduler());this.getMemberMembershipDuration()},20)}setMembershipDetailsOption(){this.membershipFormOption.membershipOption=JSON.parse(JSON.stringify(this.selectedMembership)),this.membershipFormOption.StartDate=this.buyMembershipModel.StartDate,this.membershipFormOption.EndDate=this.buyMembershipModel.EndDate}onChangeNameOnCard(t){var i,r;t?this.nameOnCard.setValue(null===(i=this.nameOnCard.value)||void 0===i?void 0:i.trim()):this.directDebitAccountDetail.AccountHolderName=null===(r=this.directDebitAccountDetail.AccountHolderName)||void 0===r?void 0:r.trim()}GetUserAccounts(){this.isUserLoggedIn&&(this._paymentTypeID===this.paymentType.Card||this._paymentTypeID===this.paymentGateway.PayTabs?this.getSavedCards():this._paymentTypeID==this.paymentType.DirectDebit?this.getGoCardlessAccounts():this._paymentTypeID==this.paymentType.StripeDD&&this.getGetStripeACHAccounts())}buildMemberMembershipModelForSave(){let t=JSON.parse(JSON.stringify(this.saveMemberMembershipModel));return t.MemberMembership.StartDate=this._dateTimeService.convertDateObjToString(t.MemberMembership.StartDate,this.datetimeFormatForSave),t.MemberMembership.MembershipPaymentPlanDetailList.forEach(i=>{i.CollectionDate=this._dateTimeService.convertDateObjToString(i.CollectionDate,this.datetimeFormatForSave)}),this.customFormView&&this.customFormView.length>0&&(t.MembershipForms=JSON.parse(JSON.stringify(this.customFormView)),t.MembershipForms.forEach(i=>{i.JsonText=JSON.stringify(i.JsonText)})),t.MemberMembership.PromoCode=this.buyMembershipModel.promoCode,t}isBuyMembershipFormValid(){return this.membershipBuyForm.valid&&(this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.valid||this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.disabled)&&(this.PersonalInformationComponent.datepicker.dateElement.valid||this.PersonalInformationComponent.datepicker.dateElement.disabled)}get isBankOnlyGateway(){return this._paymentTypeID===this.paymentGateway.Stripe_Ideal}get bankStripeAccountID(){var t;return(null===(t=this.stripeConfigurationKeys)||void 0===t?void 0:t.StripeAccountID)||localStorage.getItem(y.R.StripeAccountID)}get bankStripePublishablekey(){var t;return(null===(t=this.stripeConfigurationKeys)||void 0===t?void 0:t.StripePublishablekey)||localStorage.getItem(y.R.StripePublishablekey)}get isBankPaymentAvailable(){return this.getIsIdealEnabledForBranch()&&this.isPaymentMethodRequired&&!!this.bankStripePublishablekey&&(this.isBankOnlyGateway||this._paymentTypeID===this.paymentGateway.Stripe&&this.paymentTypeId===this.paymentType.Card)}get isBankPayment(){return this.isBankPaymentAvailable&&(this.isBankOnlyGateway||this.isBankPaymentSelected)}get bankPaymentAmount(){var t,i,r;const a=((null===(t=this.summaryDetail)||void 0===t?void 0:t.InitiationFee)>0?this.summaryDetail.InitiationFee:0)+((null===(i=this.summaryDetail)||void 0===i?void 0:i.FirstMonthDues)>0?this.summaryDetail.FirstMonthDues:0)+((null===(r=this.summaryDetail)||void 0===r?void 0:r.TaxAmount)>0?this.summaryDetail.TaxAmount:0);return this._taxCalculationService.getRoundValue(a)}onPaymentMethodOptionChange(t){this.isBankPaymentSelected=t,!t&&this.paymentTypeId===this.paymentType.Card&&0===this.cardId&&setTimeout(()=>this.onPaymentTypeChange(this.paymentTypeId))}payViaBank(){if(!this.isBuyMembershipFormValid())return this.showValidation=!0,void this._messageService.showErrorMessage(this.messages.val
1idation_required);this.bankPaymentRef.confirmBankPayment(()=>this.storePendingIdealPackage()).then(t=>{t&&(sessionStorage.removeItem(y.R.IdealPendingMembership),this._messageService.showErrorMessage(this.messages.ideal_payment_failed.replace("{0}",t)))})}storePendingIdealPackage(){const t=this.bankPaymentAmount;if(!(t>0))return this.messages.ideal_amount_required;const i=this.buildMemberMembershipModelForSave();i.MemberMembership.SaleTypeID=h.Cb.Ideal,i.MemberMembership.CustomerPaymentGatewayID=0,i.MemberMembership.Card=null,i.MemberMembership.GatewayCustomerViewModel=null,i.MemberMembership.DirectDebit=null;const r=new Ge.kE;r.model=i,r.purchaseName="package",r.isUserLoggedIn=this.isUserLoggedIn,r.loggedInCustomerID=this.customerID,r.amount=t,r.companyCode=this.branch.CompanyCode,r.branchCode=this.branch.BranchCode;try{sessionStorage.setItem(y.R.IdealPendingMembership,JSON.stringify(r))}catch(a){return this.messages.error_processing_request}return null}saveBuyMembership(){let t=JSON.parse(JSON.stringify(this.saveMemberMembershipModel));this.AnalyticsService.TrackGoogleEvent("buy_package","Package",this.saveMemberMembershipModel.MemberMembership.MembershipName,this.totalAmount),t.MemberMembership.StartDate=this._dateTimeService.convertDateObjToString(t.MemberMembership.StartDate,this.datetimeFormatForSave),t.MemberMembership.MembershipPaymentPlanDetailList.forEach(i=>{i.CollectionDate=this._dateTimeService.convertDateObjToString(i.CollectionDate,this.datetimeFormatForSave)}),this.customFormView&&this.customFormView.length>0&&(t.MembershipForms=JSON.parse(JSON.stringify(this.customFormView)),t.MembershipForms.forEach(i=>{i.JsonText=JSON.stringify(i.JsonText)})),t.MemberMembership.PromoCode=this.buyMembershipModel.promoCode,this.membershipBuyForm.valid&&(this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.valid||this.PersonalInformationComponent.customerAddressesComponent.customerAddressForm.disabled)&&(this.PersonalInformationComponent.datepicker.dateElement.valid||this.PersonalInformationComponent.datepicker.dateElement.disabled)&&this._posMembershipService.saveBuyMembership(t).subscribe(i=>{this.response=i},i=>{var r;this._messageService.showErrorMessage(this.messages.save_error.replace("{0}",null===(r=this.pageTitle)||void 0===r?void 0:r.toLowerCase()))},()=>{var i;this.response&&(null!=this.response.MessageCode||null!=this.response.MessageCode)&&(-25===this.response.MessageCode?this._messageService.showErrorMessage(this.messages.duplicate_email):this.response&&-31==this.response.MessageCode?this._messageService.showErrorMessage(this.messages.Member_Membership_Exist):!this.response||-108!=this.response.MessageCode&&-422!=this.response.MessageCode?this.response&&-261==this.response.MessageCode?this._messageService.showErrorMessage(this.response.MessageText):this.response&&-1601==this.response.MessageCode?this._messageService.showErrorMessage(this.messages.Promo_Code_Invalid):!this.response||-30!=this.response.MessageCode&&-103!=this.response.MessageCode&&-109!=this.response.MessageCode&&-118!==this.response.MessageCode?this.response.MessageCode>0?this.response.Result.IsAuthenticationRequire?this._stripeService.confirmCardPayment(this.response.Result.ClientSecret,this.response.Result.PaymentMethod).then(r=>{r&&this._router.navigate(["/"+this.branch.CompanyCode+"/"+this.branch.BranchCode+"/thank-you/1"])},r=>{this._messageService.showErrorMessage(r),this._router.navigate(["/"+this.branch.CompanyCode+"/"+this.branch.BranchCode+"/thank-you/1"])}):(this._dataSharingService.membershipLoginIndicator(!0),this._router.navigate(["/"+this.branch.CompanyCode+"/"+this.branch.BranchCode+"/thank-you/1"])):this._messageService.showErrorMessage(this.messages.save_error.replace("{0}",null===(i=this.pageTitle)||void 0===i?void 0:i.toLowerCase())):(this._dataSharingService.shareCustomerEmail(null),this._messageService.showErrorMessage(this.response.MessageText)):(this._messageService.showErrorMessage(this.response.MessageText),this.getWidgetDefaultPaymentGateway()))})}getWidgetDefaultPaymentGateway(){this.widgetDefaultPaymentGateway=new He.B,this._homeService.getWidgetDefaultPaymentGateway().subscribe(t=>{this.response=t},t=>console.error(t),()=>{this.response.Result&&(this.widgetDefaultPaymentGateway=this.response.Result,this.reSetWi
1dgetDefaultPaymentGateway())})}getMembershipIdFromRoute(){this._route.paramMap.subscribe(t=>{this.buyMembershipModel.MembershipID=+t.get("PackageID")})}getFundamentals(){this.getMembershipList().then(t=>{t&&this.getMembershipSpecificForms()})}getDropdownFundamentals(){return new Promise((t,i)=>{this._posSaleService.getFundamentals().subscribe(r=>{this.response=r},r=>this._messageService.showErrorMessage(this.messages.dropdowns_load_error),()=>{this.response&&this.response.Result&&(this.countryList=this.response.Result.CountryList,this.addressFundamentals.countryList=this.response.Result.CountryList,this.addressFundamentals.stateList=this.response.Result.StateCountyList,this.stateList=this.response.Result.StateCountyList,this.cityList=this.response.Result.CityList,this.genderList=this.response.Result.GenderList,this.titleList=this.response.Result.TitleList,this.buyMembershipModel.MembershipID=this.buyMembershipModel.MembershipID&&this.buyMembershipModel.MembershipID>0?this.buyMembershipModel.MembershipID:this.membershipList[0].MembershipID,t(!0))})})}getMembershipList(){return new Promise((t,i)=>{this._posMembershipService.getMemberships().subscribe(r=>{this.response=r},r=>{this._messageService.showErrorMessage(this.messages.dropdowns_load_error)},()=>{if(this.hasMemberhsips=!!(this.response.Result&&this.response.Result.length>0),this.membershipList=this.response.Result,this.membershipList=this.membershipList.filter(r=>!0===r.ShowAsPackage),this.response&&this.response.Result){let r=this.membershipList.filter(a=>a.MembershipID===this.buyMembershipModel.MembershipID)[0];this.checkAllowMemberShipSharing(r),this.onChangeMembehip(r),t(!0)}else this.hasMemberhsipAlreadyAssigned=!0,this.selectedMembership=null,this.stepper.selectedIndex=0,this.activeTabIndex=this.stepper.selectedIndex,t(!1)})})}getMembershipDetailsById(){this._posMembershipService.getPOSMembershipDetail(this.buyMembershipModel.MembershipID).subscribe(t=>{this.response=t},t=>{var i;return this._messageService.showErrorMessage(this.messages.get_error.replace("{0}",null===(i=this.pageTitle)||void 0===i?void 0:i.toLowerCase()))},()=>{this.response&&this.response.Result&&(this.hasMemberhsipAlreadyAssigned=!0,this.posMembershipDetail=this.response.Result,this.checkAllowMemberShipSharing(this.posMembershipDetail),this.onChangeMembehip(this.posMembershipDetail),this.onRemovePromoCode())})}getStatesByCountryId(t){this.stateList&&this.stateList.length>0&&(this.stateListByCountryId=this.stateList.filter(i=>i.CountryID==t))}getCitiesByStateId(t){this.cityList&&this.cityList.length>0&&(this.cityListByStateId=this.cityList.filter(i=>i.StateCountyID==t))}getPaymentPlan(){this._posMembershipService.getMembershipPaymentPlan(this.buyMembershipModel.MembershipID,this.getFormatedDate(this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this.buyMembershipModel.StartDate)),this.buyMembershipModel.DurationTypeID,this.buyMembershipModel.PaymentDayID,this.isPromoCodeBtnDisabled?this.buyMembershipModel.promoCode:"").subscribe(t=>{this.response=t},t=>{this._messageService.showErrorMessage(this.messages.dropdowns_load_error)},()=>{this.response&&this.response.Result?(this.membershipPaymentSummary=this.response.Result,this.hasPayments=!!(this.membershipPaymentSummary.MembershipPaymentSummaryList&&this.membershipPaymentSummary.MembershipPaymentSummaryList.length>0),this.hasPayments?(this.getTotalPayments(),this.getTotalPayment(),this.getTaxAmount(),this.setViewPaymentSummary(),this.getTotal(),this.setSummaryDetails(),this.paymentPlanDues(),this.paymentMethodRequired(),this.checkMembershipPromoCodeAvailbility()):this.totalAmount=0):this.membershipPaymentSummary=new _.n8})}setMonthlyDues(){for(let t=0;t<this.membershipPaymentSummary.MembershipPaymentSummaryList.length;t++)if(this.membershipPaymentSummary.MembershipPaymentSummaryList[t].MembershipPaymentTypeID===this.membershipPaymentType.Recurring){let i;if(i=this.membershipPaymentSummary.MembershipPaymentSummaryList.filter(r=>r.MembershipPaymentTypeID==this.membershipPaymentType.Recurring&&r.ProRataPrice<=0)[0],!this.membershipPaymentSummary.MembershipPaymentSummaryList[t].isPromoCodeApplied){this.summaryDetail.MonthlyDues=null==i?void 0:i.OriginalPrice;break}this.summaryDetail.MonthlyDues=null==i?void 0:i.TotalPrice}this.isMothlyDuesShow=this.membershipPaymentSummary.MembershipPaymentSummaryList.some(t=>t.MembershipPaymentTypeID===this.membershipPaymentType.Recurring)}checkAllowMemberShipSharing(t){this.parentCustomerID=Number(localStorage.getItem("parentCustomerID")),t.IsAllowSharing&&t.SharedProfileList.length>0&&this.isUserLoggedIn&&this.customerID==this.parentCustomerID?(this.isAllowMemberShipSharing=!0,this.sharedProfileList=t.SharedProfileList):(this.isAllowMemberShipSharing=!1,this.sharedProfileList=[])}checkMembershipPromoCodeAvailbility(){let t=this.promoCodeDetail.PromoRecurringPaymentInterval,i=0==this.promoCodeDetail.PromoRecurringPaymentInterval;for(let r=0;r<this.membershipPaymentSummary.MembershipPaymentSummaryList.length;r++)if(!this.promoCodeDetail.IsPromoApplyOnMembership||this.promoCodeDetail.IsPromoApplyOnMembershipSinglePayment||this.promoCodeDetail.IsPromoApplyOnMembershipRecurringPayment){if(this.membershipPaymentSummary.MembershipPaymentSummaryList[r].isPromoCodeApplied=!(this.membershipPaymentSummary.MembershipPaymentSummaryList[r].MembershipPaymentTypeID!==this.membershipPaymentType.Single||!this.promoCodeDetail.IsPromoApplyOnMembershipSinglePayment||this.promoCodeDetail.PromoCodeTypeID!=h.QC.SaleLevel&&this.promoCodeDetail.PromoCodeTypeID!=h.QC.ItemLevel),!this.membershipPaymentSummary.MembershipPaymentSummaryList[r].isPromoCodeApplied)if(this.membershipPaymentSummary.MembershipPaymentSummaryList[r].MembershipPaymentTypeID!==this.membershipPaymentType.Recurring||!this.promoCodeDetail.IsPromoApplyOnMembershipRecurringPayment||this.promoCodeDetail.PromoCodeTypeID!=h.QC.SaleLevel&&this.promoCodeDetail.PromoCodeTypeID!=h.QC.ItemLevel)this.membershipPaymentSummary.MembershipPaymentSummaryList[r].isPromoCodeApplied=!1;else{if(t&&0!=t){for(let o=0;o<t;o++){this.membershipPaymentSummary.MembershipPaymentSummaryList[r].isPromoCodeApplied=!0;break}t-=1}i&&(this.membershipPaymentSummary.MembershipPaymentSummaryList[r].isPromoCodeApplied=!0)}}else this.membershipPaymentSummary.MembershipPaymentSummaryList[r].isPromoCodeApplied=!0}paymentPlanDues(){switch(this.selectedMembership.DurationTypeID){case this.membershipDurationType.Days:this.durationTypeName=this.membershipDurationTypeName.Days;break;case this.membershipDurationType.Weeks:this.durationTypeName=this.membershipDurationTypeName.Weeks;break;case this.membershipDurationType.Months:this.durationTypeName=this.membershipDurationTypeName.Months;break;case this.membershipDurationType.FourWeeks:this.durationTypeName=this.membershipDurationTypeName.FourWeeks;break;case this.membershipDurationType.Quarter:this.durationTypeName=this.membershipDurationTypeName.Quarter;break;case this.membershipDurationType.Fortnightly:this.durationTypeName=this.membershipDurationTypeName.Fortnightly;break;case this.membershipDurationType.SixMonth:this.durationTypeName=this.membershipDurationTypeName.SixMonth;break;case this.membershipDurationType.Yearly:this.durationTypeName=this.membershipDurationTypeName.Yearly;break;default:this.durationTypeName=this.membershipDurationTypeName.Months}}getFormatedDate(t){var i=(t.getMonth()+1).toString();i=i.length>1?i:"0"+i;var r=t.getDate().toString();return i+"/"+(r=r.length>1?r:"0"+r)+"/"+t.getFullYear()}getTotalPayments(){this.totalAmount=0,this.membershipPaymentSummary.MembershipPaymentSummaryList.forEach(t=>{this.totalAmount+=t.Price})}getMemberMembershipModel(){let t=new _.rH;return t.MembershipID=this.buyMembershipModel.MembershipID,t.StartDate=this.buyMembershipModel.StartDate,t.MembershipPaymentPlanDetailList=[],this.hasPayments&&this.paymentPlanList.forEach(i=>
1{let r=new _.Te;r.MembershipPaymentID=i.MembershipPaymentID,r.MembershipPaymentTypeID=i.MembershipPaymentTypeID,r.MembershipPaymentName=i.MembershipPaymentName,r.Price=1,r.CollectionDate=this._dateTimeService.convertDateObjToString(this.viewPaymentSummary.PaymentList[0].CollectionDate,this.datetimeFormatForSave),r.SkipProRata=!1,t.MembershipPaymentPlanDetailList.push(r)}),t}getTaxAmount(){this.membershipPaymentSummary.MembershipPaymentSummaryList.forEach(t=>{t.TaxAmount=(0,E.Et)(t.Price+t.ProRataPrice,this.membershipPaymentSummary.TotalTaxPercentage)})}getTotalTaxAmount(t,i){return(0,E.Et)(t,i)}getTotalPayment(){this.totalAmount=this._taxCalculationService.getRoundValue(this.membershipPaymentSummary.TotalPrice)}getTotal(){this.hasPaymentSummary=!!(this.viewPaymentSummary.PaymentList&&this.viewPaymentSummary.PaymentList.length>0);let t=0;this.viewPaymentSummary.TaxAmount=0,this.viewPaymentSummary.TotalAmount=0,this.viewPaymentSummary.PaymentList.forEach(i=>{this.viewPaymentSummary.TaxAmount+=this.viewPaymentSummary.TotalTaxPercentage?(0,E.Et)(i.Price+i.ProRataPrice,this.viewPaymentSummary.TotalTaxPercentage):0,i.TotalPrice=i.Price+i.ProRataPrice,t+=i.TotalPrice}),this.viewPaymentSummary.TotalAmount=this.roundValue(t+this.viewPaymentSummary.TaxAmount)}getStripeToken(t){this.showValidation=!1;var i=this;return i._loaderService.show(),new Promise((r,a)=>{this.nameOnCard.valid?A.createToken(T,{name:this.nameOnCard.value}).then(function(o){return i._loaderService.hide(),o.error?void a(o.error.message):i.isTermsAgreed?void r(t?o.token:o.token.id):void a(i.messages.Stripe_Account_Agreement_Required)},function(o){i._loaderService.hide(),a(o)}):(i._loaderService.hide(),this.showValidation=!0,a(i.messages.Name_On_Card_Required))})}getCustomerDetails(){let i=this.getBuyMembershipGatewayID();this.paymentGatewayID=i,this._posSaleService.getBuyMembershipCustomerDetails(i).subscribe(r=>{this.response=r},r=>{},()=>{var r;this.response&&this.response.Result&&(this.hasStripeKeys=!!this.response.Result.GatewayIntegrationStripe,this.hasCustomerDetail=!!this.response.Result.CustomerDetail,this.stripeConfigurationKeys=this.hasStripeKeys?this.response.Result.GatewayIntegrationStripe:new S.Pq,this.buyMembershipModel.Customer=this.hasCustomerDetail?this.response.Result.CustomerDetail:new P.O8,this.isLoadAddressComp=!0,this.hasSavedCards=!!(this.response.Result.CardInstrumentDetail&&this.response.Result.CardInstrumentDetail.length>0||this.response.Result.GoCardlessDetail&&this.response.Result.GoCardlessDetail.length>0),this.savedCards=this.hasSavedCards?this.response.Result.CardInstrumentDetail&&this.response.Result.CardInstrumentDetail.length>0?this.response.Result.CardInstrumentDetail:this.response.Result.GoCardlessDetail:this.savedCards,(i===h.HY.Stripe||i===h.HY.PayTabs)&&this.getSavedCards(),i===h.HY.Stripe_DD&&(this.savedCards=this.response.Result.StripeDDDetail&&this.response.Result.StripeDDDetail.length>0?this.response.Result.StripeDDDetail:this.savedCards,0==(null===(r=this.savedCards)||void 0===r?void 0:r.length)&&(this.cardId=-1)),this.getMembershipList().then(a=>{a&&this.getMembershipSpecificForms()}),2===this.activeTabIndex&&this.reInitStripe(),this.setUserAccounts(),this.defaultCountry=this.buyMembershipModel.Customer.Mobile?"":M.TS.DefaultCountry,this.CustomerTypeID=this.response.Result.CustomerDetail.CustomerTypeID,this.GetAllMembershipPurchaseTypeRestriction())})}reInitStripe(){x=void 0,T=void 0,this.loadScripts("stripejs"),setTimeout(()=>{this.createStripeCardElement()},300)}getSavedCards(){this.savedCards=[],this._posSaleService.getStripeCards(!0).subscribe(t=>{this.response=t},t=>{console.error(t)},()=>{this.response&&this.response.Result&&(this.savedCards=this.response.Result,this.hasSavedCards=!!(this.savedCards&&this.savedCards.length>0),this.savedCards&&this.savedCards.length>0&&(this.savedCards=this.savedCards.filter(t=>t.PaymentGatewayID==this._paymentTypeID),this.savedCards.forEach(t=>{t.Title=t.InstrumentName+" **** **** **** "+t.InstrumentLastDigit}),this.savedCards.push({CustomerPaymentGatewayID:0,InstrumentName:"",InstrumentLastDigit:"",Title:"Add New Card"}),this.cardId=this.savedCards[0].CustomerPaymentGatewayID))})}getGoCardlessAccounts(){this.customerID&&this.customerID>0&&(this.savedCards=[],this._posSaleService.getGoCardlessAccounts(this.customerID).subscribe(t=>{this.response=t},t=>{this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","Saved Accounts"))},()=>{this.response&&this.response.Result.length>0?(this.savedCards=this.response.Result,this.savedCards&&this.savedCards.length>0&&(this.savedCards.forEach(t=>{t.Title=t.InstrumentName+" ****"+t.InstrumentLastDigit}),this.savedCards.push({CustomerPaymentGatewayID:0,InstrumentName:"",InstrumentLastDigit:"",Title:"Add New Account"}),this.cardId=this.savedCards[0].CustomerPaymentGatewayID,this.accountId=this.savedCards[0].CustomerPaymentGatewayID)):this._messageService.showErrorMessage(this.response.MessageText)}))}getGetStripeACHAccounts(){this.savedCards=[],this.customerID&&this.customerID>0?this._posSaleService.getStripeDebitAccounts(this.customerID).subscribe(t=>{this.response=t},t=>{this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","Saved Accounts"))},()=>{this.response&&this.response.MessageCode>0?(this.savedCards=this.response.Result,this.savedCards&&this.savedCards.length>0?(this.savedCards.forEach(t=>{t.Title=t.InstrumentName+" **** **** **** "+t.InstrumentLastDigit}),this.isShowStripeDDNewAccount=!0,this.cardId=this.savedCards[0].CustomerPaymentGatewayID,this.accountId=this.savedCards[0].CustomerPaymentGatewayID):this.isShowStripeDDNewAccount=!0):this._messageService.showErrorMessage(this.response.MessageText)}):this.isShowStripeDDNewAccount=!0}setPermissions(t){switch(t){case this.package.WellnessTop:case this.package.Full:case this.package.ExceedPlus:this.allowTermsandConditions=!1,this.isCompanyTermsAgreed=!0}}setCompanyNameAndTerms(){this.companyName=localStorage.getItem(y.R.CompanyName),this.companyTermsandContition=localStorage.getItem(y.R.TermsOfServiceURL)}setSaveMembershipModel(){var t,i,r,a,o,l;this.buyMembershipModel.Customer.Email=this.buyMembershipModel.Customer.Email.toLowerCase(),this.saveMemberMembershipModel.MemberMembership.CustomerID=this.customerID>0?this.customerID:this.buyMembershipModel.Customer.CustomerID,this.saveMemberMembershipModel.MemberMembership.MembershipID=this.buyMembershipModel.MembershipID,this.saveMemberMembershipModel.MemberMembership.StartDate=this.buyMembershipModel.StartDate,this.saveMemberMembershipModel.MemberMembership.MembershipPaymentPlanDetailList=this.getMembershipPlanModel.MembershipPaymentPlanDetailList,this.saveMemberMembershipModel.MemberMembership.PaymentGatewayID=this._paymentTypeID,this.saveMemberMembershipModel.MemberMembership.SaleTypeID=this.saveMemberMembershipModel.MemberMembership.PaymentGatewayID===this.paymentGateway.Stripe||this.saveMemberMembershipModel.MemberMembership.PaymentGatewayID===this.paymentGateway.PayTabs?this.paymentType.Card:this.paymentTypeId,this.saveMemberMembershipModel.MemberMembership.Notes="",this.customerPaymentGatewayID&&(this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=this.customerPaymentGatewayID),this.paymentTypeId===this.paymentType.StripeDD?(this.saveMemberMembershipModel.MemberMembership.PaymentGatewayID=h.HY.Stripe_DD,this.saveMemberMembershipModel.MemberMembership.SaleTypeID=this.paymentType.DirectDebit,this.saveMemberMembershipModel.MemberMembership.PublicToken=null==(null===(t=this.addStripeDebitRef)||void 0===t?void 0:t.customerPaymentMethod)?"":null===(i=this.addStripeDebitRef)||void 0===i?void 0:i.customerPaymentMethod,this.saveMemberMembershipModel.MemberMembership.SetupIntentID=(null===(r=this.addStripeDebitRef)||void 0===r?void 0:r.setupintentID)?null===(a=this.addStripeDebitRef)||void 0===a?void 0:a.setupintentID:0,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=null==this.cardId||0==this.cardId||-1==this.cardId?0:this.cardId):this.saveMemberMembershipModel.MemberMembership.AccountDetail=null,this.buyMembershipModel.Customer.CustomerTypeID=h.d2.Member,this.saveMemberMembershipModel.Customer=this.buyMembershipModel.Customer,this.isAllowMemberShipSharing&&(this.saveMemberMembershipModel.MemberMembership.MembershipShare=[],null===(l=null===(o=this.saveShareMembershipRef)||void 0===o?void 0:o.sharedProfileList)||void 0===l||l.forEach(p=>{if(p.IsMembershipAdded){let d=new _.C4;d.ShareCustomerID=p.CustomerID,d.BranchID=0,d.IsArchived=0,d.CustomerMembershipID=0,d.CustomerMembershipShareID=0,d.MembershipID=0,this.saveMemberMembershipModel.MemberMembership.MembershipShare.push(d)}}))}setStripeCardAuthenticationModel(){this.authenticateCard.PaymentGatewayID=this.paymentTypeId,this.authenticateCard.SaleTypeID=this.paymentTypeId}setUserAccounts(){if(this.customerID&&this.customerID>0)if(this.savedCards&&this.savedCards.length>0)if(this.savedCards.forEach(i=>
1{i.Title=i.InstrumentName+" **** **** **** "+i.InstrumentLastDigit}),this.cardId=this.savedCards[0].CustomerPaymentGatewayID,this._paymentTypeID!==this.paymentType.StripeDD)this.savedCards.push({CustomerPaymentGatewayID:0,InstrumentName:"",InstrumentLastDigit:"",Title:"Add New Account"});else{var t=this.savedCards.find(i=>0==i.CustomerPaymentGatewayID);null==t&&null==t&&(this.isShowStripeDDNewAccount=!0)}else this._paymentTypeID===this.paymentType.StripeDD&&(this.isShowStripeDDNewAccount=!0);else this._paymentTypeID===this.paymentType.StripeDD&&(this.savedCards=[],this.isShowStripeDDNewAccount=!0)}setNextPaymentDay(){this.viewPaymentSummary.NextPaymentAmount&&this.viewPaymentSummary.NextPaymentAmount>0&&(this.nextPaymentDay=this.viewPaymentSummary.NextPaymentInterval===this.membershipDurationType.Weeks?this._dateTimeService.getDayNameFromDate(this.viewPaymentSummary.NextPaymentDate):this._dateTimeService.convertDateStringIntoDateObjectAccordingToBranchZone(this.viewPaymentSummary.NextPaymentDate).getDate())}setViewPaymentSummary(){var t,i,r,a,o,l;let p=this.membershipPaymentSummary.MembershipPaymentSummaryList,d=p.filter(u=>u.CollectionDate===p[0].CollectionDate),g=p.find(u=>u.MembershipPaymentTypeID===this.membershipPaymentType.Recurring&&u.CollectionDate>d[0].CollectionDate);this.membershipPaymentSummary.MembershipPaymentSummaryList.forEach(u=>{u.CollectionDate=this._dateTimeService.removeZoneFromDateTime(u.CollectionDate)}),this.viewPaymentSummary=new _.FV,this.viewPaymentSummary.CustomerID=this.buyMembershipModel.Customer.CustomerID,this.viewPaymentSummary.MembershipID=this.buyMembershipModel.MembershipID,this.viewPaymentSummary.PaymentDate=d[0].CollectionDate,this.viewPaymentSummary.TotalTaxPercentage=this.membershipPaymentSummary.TotalTaxPercentage,this.viewPaymentSummary.PaymentList=[],g&&g.DurationTypeID&&(g.ProRataPrice&&g.ProRataPrice>0?(this.viewPaymentSummary.NextPaymentAmount=g.Price+this.getTotalTaxAmount(g.Price,this.membershipPaymentSummary.TotalTaxPercentage),this.viewPaymentSummary.NextPaymentProRata=g.ProRataPrice+this.getTotalTaxAmount(g.ProRataPrice,this.membershipPaymentSummary.TotalTaxPercentage)):this.viewPaymentSummary.NextPaymentAmount=g.TotalPrice,this.viewPaymentSummary.NextPaymentInterval=g.DurationTypeID,this.viewPaymentSummary.NextPaymentDate=g.CollectionDate),this.viewPaymentSummary.AccountDetails=new _.uP,this.isPaymentMethodRequired&&(this.isBankPayment?this.viewPaymentSummary.SaleTypeID=h.Cb.Ideal:this.paymentTypeId===this.paymentType.Card&&(this.viewPaymentSummary.SaleTypeID=this.paymentType.Card,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID>0&&this.savedCards&&this.savedCards.length>0?(this.viewPaymentSummary.AccountDetails.AccountHolderName=null===(t=this.savedCards.find(u=>u.CustomerPaymentGatewayID===this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID))||void 0===t?void 0:t.Title,this.viewPaymentSummary.CustomerGatewayId=this.paymentGatewayID):(this.viewPaymentSummary.AccountDetails.AccountHolderName=null,this.viewPaymentSummary.AccountDetails.CardNumber=this.stripeCardInfo.card.brand+" **** **** **** "+this.stripeCardInfo.card.last4,this.viewPaymentSummary.AccountDetails.NameOnCard=this.stripeCardInfo.card.name,this.viewPaymentSummary.AccountDetails.Expiry=this.stripeCardInfo.card.exp_month+"/"+this.stripeCardInfo.card.exp_year,this.viewPaymentSummary.CustomerGatewayId=this.paymentGatewayID)),this.paymentTypeId==this.paymentGateway.PayTabs?(this.viewPaymentSummary.SaleTypeID=this.paymentType.Card,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID>0&&this.savedCards&&this.savedCards.length>0?(this.viewPaymentSummary.AccountDetails.AccountHolderName=null===(i=this.savedCards.find(u=>u.CustomerPaymentGatewayID===this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID))||void 0===i?void 0:i.Title,this.viewPaymentSummary.CustomerGatewayId=this.paymentGatewayID):(this.viewPaymentSummary.AccountDetails.AccountHolderName=null,this.viewPaymentSummary.AccountDetails.CardNumber=(null===(r=this.payTabsCardInfo)||void 0===r?void 0:r.CardScheme)+" **** **** **** "+(null===(a=this.payTabsCardInfo)||void 0===a?void 0:a.CardLast4Digit),this.viewPaymentSummary.AccountDetails.NameOnCard=this.nameOnCard.value,this.viewPaymentSummary.CustomerGatewayId=this.paymentGatewayID)):this.paymentTypeId===this.paymentType.DirectDebit?0===this.cardId?(this.viewPaymentSummary.AccountDetails.AccountHolderName=this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountHolderName,this.viewPaymentSummary.AccountDetails.AccountNumber=this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountNumber,this.viewPaymentSummary.AccountDetails.BranchCode=this.saveMemberMembershipModel.MemberMembership.DirectDebit.BranchCode,this.viewPaymentSummary.AccountDetails.BankCode=this.saveMemberMembershipModel.MemberMembership.DirectDebit.BankCode):this.viewPaymentSummary.AccountDetails.AccountHolderName=null===(o=this.savedCards.find(u=>u.CustomerPaymentGatewayID===this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID))||void 0===o?void 0:o.Title:this.paymentTypeId===this.paymentType.StripeDD&&(0===this.cardId?(this.viewPaymentSummary.AccountDetails.AccountHolderName=this.stripeDD&&this.stripeDD.Account?this.stripeDD.Account.Name:"",this.viewPaymentSummary.AccountDetails.AccountNumber=this.stripeDD&&this.stripeDD.Account?"**
1**"+this.stripeDD.Account.Mask:""):this.viewPaymentSummary.AccountDetails.AccountHolderName=null===(l=this.savedCards.find(u=>u.CustomerPaymentGatewayID===this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID))||void 0===l?void 0:l.Title)),this.totalAmountForViewSummary=0,d.forEach(u=>{let C=new _.bv;C.MembershipPaymentTypeID=u.MembershipPaymentTypeID,C.PaymentName=u.MembershipPaymentName,C.Price=u.Price,C.ProRataPrice=u.ProRataPrice,C.CollectionDate=u.CollectionDate,C.TaxAmount=u.TaxAmount,C.TotalPrice=u.TotalPrice,this.viewPaymentSummary.PaymentList.push(C),this.totalAmountForViewSummary+=u.TotalPrice}),this.showMembershipPayment=!0}setSummaryDetails(){var t,i;let a,r=JSON.parse(JSON.stringify(this.membershipPaymentSummary));this.summaryDetail=new _.l2,this.viewPaymentSummary.PaymentList.forEach(o=>{o.MembershipPaymentTypeID===this.membershipPaymentType.Single&&(this.summaryDetail.InitiationFee+=null==o?void 0:o.TotalPrice),o.MembershipPaymentTypeID===this.membershipPaymentType.Recurring&&(this.summaryDetail.FirstMonthDues+=o.TotalPrice),this.summaryDetail.TaxAmount+=o.TaxAmount}),a=null===(i=null===(t=r.MembershipPaymentSummaryList)||void 0===t?void 0:t.sort((o,l)=>l.Price-o.Price))||void 0===i?void 0:i.find(o=>o.MembershipPaymentTypeID==this.membershipPaymentType.Recurring&&o.ProRataPrice<=0),a&&(this.summaryDetail.MonthlyDues=null==a?void 0:a.TotalPrice),this.isMothlyDuesShow=this.membershipPaymentSummary.MembershipPaymentSummaryList.some(o=>o.MembershipPaymentTypeID===this.membershipPaymentType.Recurring)}setStripKeys(t,i){A=Stripe(i,t),x=A.elements()}reSetWidgetDefaultPaymentGateway(){localStorage.setItem(y.R.WidgetBuyMembershipPaymentGatewayID,this.widgetDefaultPaymentGateway.WidgetMembershipPaymentGatewayId.toString()),this._paymentTypeID=this.widgetDefaultPaymentGateway.WidgetMembershipPaymentGatewayId,this.paymentTypeId=this._paymentTypeID,this.stepper.selectedIndex=0,this.activeTabIndex=this.stepper.selectedIndex,this._paymentTypeID===this.paymentType.DirectDebit?(this.directDebitAccountDetail.AccountHolderName=null,this.directDebitAccountDetail.AccountNumber=null,this.directDebitAccountDetail.BankCode=null):this.nameOnCard.setValue(null),this.GetUserAccounts()}isSelectMembershipValid(){return new Promise((t,i)=>{this.isAccountDetailsValid().then(r=>r?void t(!0):(this._dataSharingService.shareCustomerEmail(null),void t(!1)))})}isAccountDetailsValid(){return new Promise((t,i)=>{var r;if(this.isBankOnlyGateway&&!this.isBankPayment)return this._messageService.showErrorMessage(this.messages.ideal_not_available),void t(!1);if(this.isBankPayment)return(null===(r=this.bankPaymentRef)||void 0===r?void 0:r.isElementComplete)?void t(!0):(this._messageService.showErrorMessage(this.messages.ideal_full_name_required),void t(!1));if(this.paymentTypeId!==h.HY.Cash){if(this.paymentTypeId===h.HY.Stripe)this.isCardDetailsValid().then(a=>{t(a)});else if(this.paymentTypeId===h.HY.PayTabs)this.checkCustomerAddress(h.HY.PayTabs)?this._messageService.showErrorMessage(this.messages.Required_Customer_Address_forPayTab):this.isPayTabsCardDetailsValid().then(a=>{t(a)});else if(this.paymentTypeId===h.HY.GoCardles){if(this.countryID!=this.USCountryID||this.CountryScheme!=this.enu_SEPACountryScheme.ach)return void t(this.isDirectDebitValid());if(!this.checkCustomerAddress(h.HY.GoCardles))return void t(this.isDirectDebitValid());this._messageService.showErrorMessage(this.branchWidgetSetting.IsHomeAddressNotRequired?this.messages.Required_Customer_Address_forGocardless:this.messages.Required_Customer_Address_forGocardlessHome)}else if(this.paymentTypeId===h.HY.Stripe_DD)return void t(this.isStripeDebitDetailsValid())}else t(!0)})}changeStripeAccount(){this._dialog.open(Xe.a,{disableClose:!0,data:this.messages.Change_Account_Warning}).componentInstance.confirm.subscribe(i=>{i&&this.onChangeStripeDebitState()})}onChangeStripeDebitState(){this.isShowStripeDebit=!1,setTimeout(()=>{this.isShowStripeDebit=!0},100)}isStripeDebitDetailsValid(){return new Promise(t=>{var i,r;if(-1===this.cardId||null===this.cardId||0===this.cardId){if(!(null===(i=this.addStripeDebitRef)||void 0===i?void 0:i.isTermsAgreed))return this._messageService.showErrorMessage(this.messages.Stripe_Debit_Account_Agreement_Required),void t(!1);null===(r=this.addStripeDebitRef)||void 0===r||r.confirmStripeSetup().then(a=>{if(!(null==a?void 0:a.success))return this._messageService.showErrorMessage("Stripe Setup Failed: "+(null==a?void 0:a.message)),void t(!1);this.addStripeDebitRef.shouldDisable=!0,t(!0)}).catch(a=>{this._messageService.showErrorMessage("Stripe Setup Exception: "+a),t(!1)})}else this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=this.cardId,t(!0)})}
1isPayTabsCardDetailsValid(){return new Promise((t,i)=>{if(0!=this.cardId)return this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=this.cardId,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID&&this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID>0?(this.saveMemberMembershipModel.MemberMembership.Card=null,void t(!0)):(this._messageService.showErrorMessage(this.messages.Select_Card),void t(!1));if(this.paytabsRef.isValidatedCard)t(!0);else{if(!this.nameOnCard.valid)return this._messageService.showErrorMessage(this.messages.Name_On_Card_Required),this.showValidation=!0,void t(!1);if(!this.isTermsAgreed)return this._messageService.showErrorMessage(this.messages.Stripe_Account_Agreement_Required),void t(!1);this._dataSharingService.onButtonSubmit(!0),this.paytabsRef.payByPayTabsCard((this.summaryDetail.InitiationFee>0?this.summaryDetail.InitiationFee:0)+(this.summaryDetail.FirstMonthDues>0?this.summaryDetail.FirstMonthDues:0)+(this.summaryDetail.TaxAmount>0?this.summaryDetail.TaxAmount:0)).then(a=>this.isUserLoggedIn?(this.payTabsCardInfo=a,this.customerPaymentGatewayID=a.CustomerPaymentGatewayID,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=a.CustomerPaymentGatewayID,t(!0),void this.getSavedCards()):(this.payTabsCardInfo=a,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel=new _.Z6,this.saveMemberMembershipModel.MemberMembership.Card=new _.Zb,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.Brand=a.CardScheme,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.GatewayCustomerID=this.paymentTypeId.toString(),this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.PaymentMethod="Card",this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.LastDigit=a.CardLast4Digit,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.IsSaveInstrument=a.IsSaveCard,this.saveMemberMembershipModel.MemberMembership.Card.PaymentGatewayToken=a.Token,void t(!0))).catch(a=>{this._messageService.showErrorMessage(a),t(!1)})}})}isCardDetailsValid(){return new Promise((t,i)=>{if(this.authenticateCard.CustomerID=this.customerID?this.customerID:0,0!==this.cardId)return this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=this.cardId,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID&&this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID>0?(this.saveMemberMembershipModel.MemberMembership.Card=null,void t(!0)):(this._messageService.showErrorMessage(this.messages.Select_Card),void t(!1));this.getStripeToken(!0).then(r=>{var a=this;a._loaderService.show(),this.stripeCardInfo=r,this.authenticateCard.CardToken=this.stripeCardInfo.id,this.setStripeCardAuthenticationModel(),this._stripeService.stripeCardAuthentication(this.authenticateCard).then(o=>(a._loaderService.hide(),this.isUserLoggedIn&&(this.customerPaymentGatewayID=o.CustomerPaymentGatewayId,this.authenticateCard.CustomerPaymentGatewayID=o.CustomerPaymentGatewayId),o&&o.Resolve?(this.isUserLoggedIn||(this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel=new _.Z6,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.Brand=o.Brand,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.LastDigit=o.LastDigit,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.PaymentMethod=o.PaymentMethod,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.IsSaveInstrument=o.IsSaveInstrument,this.saveMemberMembershipModel.MemberMembership.GatewayCustomerViewModel.GatewayCustomerID=o.GatewayCustomerID,this.authenticateCard.GatewayCustomerID=o.GatewayCustomerID),void t(!0)):(this.authenticateCard.GatewayCustomerID=o.GatewayCustomerID,o&&o.MessageCode<0?this._messageService.showErrorMessage(o.MessageText):(this.isUserLoggedIn?this.deleteExistingCustomerGateway():this.authenticateCard.GatewayCustomerID&&this.deleteNewCustomerGateway(),this.customerPaymentGatewayID=null),void t(!1))),o=>{a._loaderService.hide(),this._messageService.showErrorMessage(o),t(!1)})},r=>{this._messageService.showErrorMessage(r),t(!1)})})}isDirectDebitValid(){let t=!1;return 0===this.cardId?this.isTermsAgreed?(this.saveMemberMembershipModel.MemberMembership.DirectDebit=new _.zh,this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountHolderName=this.directDebitAccountDetail.AccountHolderName,this.verifyGoCardlessAccountDetail(),t=!0):this._messageService.showErrorMessage(this.messages.GoCardless_Account_Agreement_Required):(this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID=this.cardId,this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID&&this.saveMemberMembershipModel.MemberMembership.CustomerPaymentGatewayID>0?(this.saveMemberMembershipModel.MemberMembership.DirectDebit=null,t=!0):this._messageService.showErrorMessage(this.messages.Select_Account)),t}checkUserPurchasedMembership(){this.isUserLoggedIn&&(this.hasMemberhsipAlreadyAssigned=this.membershipList.some(t=>t.MembershipID===this.buyMembershipModel.MembershipID),this.hasMemberhsipAlreadyAssigned?(this.buyMembershipModel.MembershipID=this.buyMembershipModel.MembershipID,this.activeTabIndex>=2&&(this.stepper.selectedIndex=2,this.activeTabIndex=this.stepper.selectedIndex)):(this._messageService.showErrorMessage(this.messages.Memebrships_Already_Assigned),this.stepper.selectedIndex=0,this.activeTabIndex=this.stepper.selectedIndex,this.hasMemberhsipAlreadyAssigned=!0,this.buyMembershipModel.MembershipID=this.membershipList[0].MembershipID,this.onChangeMembehi
1p(this.membershipList[0]),this.nameOnCard.setValue(null)))}createStripeCardElement(){T||(T=x.create("card",{style:{base:{fontSize:"16px",color:"#32325d"}}})),T.mount("#card-element")}resetForm(){this.buyMembershipModel.Customer.Email=null}mapCustomerBillingAddress(){this.buyMembershipModel.Customer.CustomerAddress.forEach(t=>{(2==t.AddressTypeID&&t.CountryID>0&&t.Address1||1==t.AddressTypeID&&t.CountryID>0&&t.Address1)&&this.setCustomerBillingAddress(t)})}isStateCountyExist(){if(parseInt(localStorage.getItem(y.R.WidgetBuyMembershipPaymentGatewayID))==h.HY.GoCardles&&this.CountryScheme==this.enu_SEPACountryScheme.ach)for(let i=0;i<this.buyMembershipModel.Customer.CustomerAddress.length;i++){let r=this.addressFundamentals.stateList.filter(a=>a.StateCountyName==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName&&a.StateCountyCode==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyCode);r.length>0?this.buyMembershipModel.Customer.CustomerAddress[i].isRequireStateCounty=!1:(0==r.length&&this.buyMembershipModel.Customer.CustomerAddress[i].Address1&&this.buyMembershipModel.Customer.CustomerAddress[i].CityName&&this.buyMembershipModel.Customer.CustomerAddress[i].PostalCode&&(this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName=""),this.buyMembershipModel.Customer.CustomerAddress[i].isRequireStateCounty=!1,0==i&&(null==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName||""==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName)&&this.buyMembershipModel.Customer.CustomerAddress[i].Address1&&this.buyMembershipModel.Customer.CustomerAddress[i].CityName&&this.buyMembershipModel.Customer.CustomerAddress[i].PostalCode&&(this.buyMembershipModel.Customer.CustomerAddress[i].isRequireStateCounty=!0,this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName="",this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyCode="",this.buyMembershipModel.Customer.CustomerAddress[i].isStateUS=2==this.buyMembershipModel.Customer.CustomerAddress[i].CountryID&&2==this.countryID),1==i&&(null==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName||""==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName)&&this.buyMembershipModel.Customer.CustomerAddress[i].Address1&&this.buyMembershipModel.Customer.CustomerAddress[i].CityName&&this.buyMembershipModel.Customer.CustomerAddress[i].PostalCode&&(this.buyMembershipModel.Customer.CustomerAddress[i].isRequireStateCounty=!0,this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName="",this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyCode="",this.buyMembershipModel.Customer.CustomerAddress[i].isStateUS=2==this.buyMembershipModel.Customer.CustomerAddress[i].CountryID&&2==this.countryID),2==i&&(null==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName||""==this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName)&&this.buyMembershipModel.Customer.CustomerAddress[i].Address1&&this.buyMembershipModel.Customer.CustomerAddress[i].CityName&&this.buyMembershipModel.Customer.CustomerAddress[i].PostalCode&&(this.buyMembershipModel.Customer.CustomerAddress[i].isRequireStateCounty=!0,this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyName="",this.buyMembershipModel.Customer.CustomerAddress[i].StateCountyCode="",this.buyMembershipModel.Customer.CustomerAddress[i].isStateUS=2==this.buyMembershipModel.Customer.CustomerAddress[i].CountryID&&2==this.countryID))}return!1}checkCustomerAddress(t){let i=!0,r=this.buyMembershipModel.Customer.CustomerAddress.find(l=>l.AddressTypeID===h.DL.HomeAddress),a=this.buyMembershipModel.Customer.CustomerAddress.find(l=>l.AddressTypeID===h.DL.BillingAddress),o=this.buyMembershipModel.Customer.CustomerAddress.find(l=>l.AddressTypeID===h.DL.ShippingAddress);return t==h.HY.GoCardles?i=!!(a.isRequireStateCounty||r.isRequireStateCounty||o.isRequireStateCounty):(i=!(a.CountryID&&a.StateCountyName&&a.Address1&&a.CityName||r.CountryID&&r.StateCountyName&&r.Address1&&r.CityName||o.CountryID&&o.StateCountyName&&o.Address1&&o.CityName),i)}paytabsCustomerBillingAddress(){this._dataSharingService.customerBillingAddress.subscribe(t=>{t&&(this.customerBillingAddress.Address1=t.Address1,this.customerBillingAddress.Address2=t.Address2,this.customerBillingAddress.CityName=t.CityName,this.customerBillingAddress.StateCountyName=t.StateCountyName,this.customerBillingAddress.PostCode=t.PostalCode,this.customerBillingAddress.CountryID=t.CountryID,this.customerBillingAddress.CountryName=t.CountryID>0?this.addressFundamentals.countryList.find(i=>i.CountryID==t.CountryID).CountryName:null)})}setCustomerBillingAddress(t){this.customerBillingAddress.Address1=t.Address1,this.customerBillingAddress.Address2=t.Address2,this.customerBillingAddress.CityName=t.CityName,this.customerBillingAddress.StateCountyName=t.StateCountyName,this.customerBillingAddress.StateCountyCode=t.StateCountyCode,this.customerBillingAddress.PostCode=t.PostalCode,this.customerBillingAddress.CountryID=t.CountryID,this.customerBillingAddress.CountryName=t.CountryID>0?this.addressFundamentals.countryList.find(i=>i.CountryID==t.CountryID).CountryName:null,this._dataSharingService.shareCustomerBillingAddress(this.customerBillingAddress)}mapStripeConfiguration(){null!=localStorage.getItem(y.R.StripeAccountID)&&localStorage.getItem(y.R.StripePublishablekey)&&(this.stripeConfigurationKeys.StripeAccountID=localStorage.getItem(y.R.StripeAccountID),this.stripeConfigurationKeys.StripePublishablekey=localStorage.getItem(y.R.StripePublishablekey),this.setStripKeys(this.stripeConfigurationKeys.StripeAccountID,this.stripeConfigurationKeys.StripePublishablekey))}getSEPACounteries(){this._posMembershipService.getSEPACountries().subscribe(t=>{this.response=t},t=>{this._messageService.showErrorMessage(this.messages.dropdowns_load_error)},()=>{this.response&&this.response.MessageCode>0?this.enu_SEPACountryScheme.sepa_core==this.response.Result.Scheme?this.sepaCountryList=this.response.Result?this.response.Result.CountriesList:[]:(this.CountryScheme=this.response.Result.Scheme,this._dataSharingService.shareBillingAddressOnCardTabChange(this.CountryScheme==this.enu_SEPACountryScheme.ach&&this.countryID==this.USCountryID),this.enu_SEPACountryScheme.ach==this.response.Result.Scheme&&(this.bankCodeMax=9,this.branchCodeRequired=!1,this.isACH=!0),this.onSEPACountryChange(),this.directDebitAccountDetail.CountryCode=this.response.Result?this.response.Result.CountriesList[0].ISOCode:[]):this._messageService.showErrorMessage(this.response.MessageText)})}onSEPACountryChange(){setTimeout(()=>{let t;this.resetAccountDetail();let i=this.getAccountNumberDetail();switch(i&&(this.accountMax=i.AccountCodeMax,this.bankCodeMax=i.BankCodeMax,this.branchCodeMax=i.BranchCodeMax,this.checkMax=i.CheckMax,this.branchCodeRequired=!!i.BranchCodeMax),this.directDebitAccountDetail.CountryCode){case this.enu_SEPACountryCode.BE:let r=this.sepaCountryDigitAfterDashDetail.filter(a=>a.CountryCode===this.enu_SEPACountryCode.BE)[0];this.sepaDashAfterDigit=r.DashAfterDigit;break;case this.enu_SEPACountryCode.FR:t=this.sepaCountryDigitAfterDashDetail.filter(a=>a.CountryCode===this.enu_SEPACountryCode.FR)[0],this.sepaDashAfterDigit=t.DashAfterDigit;break;case this.enu_SEPACountryCode.AU:t=this.sepaCountryDigitAfterDashDetail.filter(a=>a.CountryCode===this.enu_SEPACountryCode.AU)[0],this.sepaDashAfterDigit=t.DashAfterDigit;break;case this.enu_SEPACountryCode.IE:t=this.sepaCountryDigitAfterDashDetail.filter(a=>a.CountryCode===this.enu_SEPACountryCode.IE)[0],this.sepaDashAfterDigit=t.DashAfterDigit;break;default:this.sepaDashAfterDigit=[]}},100)}getAccountNumberDetail(){return this.sepaCountryAccountDetail.filter(i=>i.CountryCode===this.directDebitAccountDetail.CountryCode)[0]||null}resetAccountDetail(){this.directDebitAccountDetail.AccountNumber=null,this.directDebitAccountDetail.AccountHolderName=null,this.directDebitAccountDetail.BankCode=null,this.directDebitAccountDetail.BranchCode=null,this.directDebitAccountDetail.Check=null}loadScripts(t){this._dynamicScriptLoader.load(t).then(i=>{"stripejs"===t&&this.mapStripeConfiguration()}).catch(i=>console.log(i))}payByDirectDebit(){let t=this;A.createSource(void 0,{type:"sepa_debit",currency:"eur",owner:{name:t.bankName,email:t.bankEmail},mandate:{notification_method:"email"}}).then(function(r){r.error?t._messageService.showErrorMessage(r.error.message):(console.log(r.source),t.saveBuyMembership())})}roundValue(t){return this._taxCalculationService.getRoundValue(t)}verifyCustomer(){this._posSaleService.verifyCustomer(this.buyMembershipModel.Customer.Email.toLowerCase()).subscribe(t=>{this.response=t},t=>{this._messageService.showErrorMessage(this.messages.get_error.replace("{0}","Customer Detail"))},()=>{this.response&&this.response.MessageCode&&-31!==this.response.MessageCode&&(this._dataSharingService.shareCustomerEmail(this.buyMembershipModel.Customer.Email),this._loginService.showLoginDialog(this._router.url),this.resetForm())})}verifyGoCardlessAccountDetail(){switch(null!=this.directDebitAccountDetail.BankCode&&(this.saveMemberMembershipModel.MemberMembership.DirectDebit.BankCode=this.directDebitAccountDetail.BankCode),null!=this.directDebitAccountDetail.BranchCode&&(this.saveMemberMembershipModel.MemberMembership.DirectDebit.BranchCode=this.directDebitAccountDetail.BranchCode),null!=this.directDebitAccountDetail.CountryCode&&(this.saveMemberMembershipModel.MemberMembership.DirectDebit.CountryCode=this.directDebitAccountDetail.CountryCode),null!=this.directDebitAccountDetail.AccountType&&(this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountType=this.directDebitAccountDetail.AccountType),this.directDebitAccountDetail.CountryCode){case this.enu_SEPACountryCode.FR:this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountNumber=this.directDebitAccountDetail.AccountNumber+" "+this.directDebitAccountDetail.Check;break;case this.enu_SEPACountryCode.PT:this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountNumber=this.directDebitAccountDetail.AccountNumber+this.directDebitAccountDetail.Check;break;case this.enu_SEPACountryCode.ES:this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountNumber=this.directDebitAccountDetail.Check+" "+this.directDebitAccountDetail.AccountNumber;break;case this.enu_SEPACountryCode.SK:this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountNumber=this.directDebitAccountDetail.PrefixAccountNumber+this.directDebitAccountDetail.AccountNumber;break;default:this.saveMemberMembershipModel.MemberMembership.DirectDebit.AccountNumber=this.directDebitAccountDetail.AccountNumber}}deleteNewCustomerGateway(){this._posMembershipService.deleteNewCustomerStripeCard(this.authenticateCard.GatewayCustomerID).subscribe(t=>{t&&t.MessageCode>0||this._messageService.showErrorMessage(t.MessageText)},t=>{this._messageService.showErrorMessage(t)})}deleteExistingCustomerGateway(){this._posMembershipService.deleteExistingCustomerStripeCard(this.authenticateCard).subscribe(t=>{t&&t.MessageCode>
10?this.getSavedCards():this._messageService.showErrorMessage(t.MessageText)},t=>{this._messageService.showErrorMessage(t)})}onApplyPromoCode(){let t={membershipID:this.buyMembershipModel.MembershipID,promoCode:this.buyMembershipModel.promoCode,customerID:this.customerID,startDate:this._dateTimeService.convertDateObjToString(this.buyMembershipModel.StartDate,this.datetimeFormatForSave),DurationTypeID:this.buyMembershipModel.DurationTypeID,PaymentDayID:this.buyMembershipModel.PaymentDayID};this._posSaleService.ApplyMembershipPromoCode(t).subscribe(i=>{i&&i.MessageCode>0?i.Result?(this.isPromoCodeApplied=!0,this.isPromoCodeBtnDisabled=!0,this.promoCodeDetail=i.Result,this.promoCodeDetail.PromoCodeName=this.promoCodeDetail.PromoCodeName):this._messageService.showErrorMessage("Promo code not found."):(this._messageService.showErrorMessage(i.MessageText),this.buyMembershipModel.promoCode="",this.isPromoCodeBtnDisabled=!0)})}trimSpaces(){var t,i;this.buyMembershipModel.promoCode=null===(t=this.buyMembershipModel.promoCode)||void 0===t?void 0:t.trim(),this.isPromoCodeBtnDisabled=!(this.buyMembershipModel.promoCode&&(null===(i=this.buyMembershipModel.promoCode)||void 0===i?void 0:i.length)>=4)}onRemovePromoCode(){this.promoCodeDetail=new K.A8,this.promoCodeDetail.PromoCodeName=null,this.isPromoCodeApplied=!1,this.buyMembershipModel.promoCode="",this.isPromoCodeBtnDisabled=!0}onChangePromoCode(t){this.isPromoCodeBtnDisabled=!((null==t?void 0:t.length)>=4)}}return s.\u0275fac=function(t){return new(t||s)(e.Y36(v.gz),e.Y36(B.r),e.Y36(O.uw),e.Y36(F.j),e.Y36(Z.j),e.Y36(Y.D),e.Y36(We.Y),e.Y36(k.e),e.Y36(v.F0),e.Y36(G.b),e.Y36(Ve.C),e.Y36(et.D),e.Y36(je.TN),e.Y36(N.v),e.Y36(V.y),e.Y36(Ke.t))},s.\u0275cmp=e.Xpm({type:s,selectors:[["app-buy-package"]],viewQuery:function(t,i){if(1&t&&(e.Gf(ot,5),e.Gf(mt,5),e.Gf(z.W,5),e.Gf(H.r,5),e.Gf(I.i,5),e.Gf(ht,5),e.Gf(lt,5),e.Gf($.i,5)),2&t){let r;e.iGM(r=e.CRH())&&(i.stepper=r.first),e.iGM(r=e.CRH())&&(i.membershipBuyForm=r.first),e.iGM(r=e.CRH())&&(i.paytabsRef=r.first),e.iGM(r=e.CRH())&&(i.customerAddressesComponent=r.first),e.iGM(r=e.CRH())&&(i.PersonalInformationComponent=r.first),e.iGM(r=e.CRH())&&(i.saveShareMembershipRef=r.first),e.iGM(r=e.CRH())&&(i.addStripeDebitRef=r.first),e.iGM(r=e.CRH())&&(i.bankPaymentRef=r.first)}},features:[e.qOj],decls:147,vars:41,consts:[[3,"bannerType"],[1,"section-head","no_header_form"],[1,"container"],[1,"row"],[1,"col-md-12","d-flex","align-items-center","justify-content-center","title-icon"],[1,"fa-light","fa-box-open-full"],[1,"mt-5"],["novalidate",""],["membershipBuyForm","ngForm"],["linear",""],["stepper",""],["matStepLabel",""],[1,"row","align-items-center","justify-content-center","membership-plan-details","products-container","mx-auto","my-3"],[1,"col-md-5","col-sm-12","pr-md-0","px-sm-2","pl-md-3","mb-md-0","mb-3"],[1,"simple-white-bg","membership-summary"],["class","col-md-12",4,"ngIf"],[1,"col-md-12","p-0"],[1,"mem-label","orange-color"],[1,"select-label"],["name","Membership","Membership","#ngModel",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"mem-label"],[3,"value","min","showClear","max","onDateChange"],[1,"col-md-12","p-0","mt-5","mb-2"],["class","col-md-12 membership-duration pt-1 p-0",4,"ngIf"],["class","gift-card-redeem apply-promo-code simple-white-bg px-3",4,"ngIf"],[1,"col-md-7","col-sm-12","pl-md-0","px-sm-2","pr-md-3"],["class","simple-white-bg membership-details",4,"ngIf"],[4,"ngIf"],[1,"row","align-items-center","justify-content-center","payment-plan-details","mob-plr-0"],[4,"ngTemplateOutlet"],[1,"col-lg-8","col-md-7","col-sm-12","pl-md-0","px-sm-2","pr-md-3"],[1,"simple-white-bg","buy-membership-list"],[1,"detail-box","pb-1","px-2","pt-3"],[1,"col-md-12"],[1,"heading-title","orange-color"],[1,"overflow-auto"],[1,"mob-custom-scroll"],[1,"row","class-header","list-view-class"],[1,"col","col-md-2"],[1,"text-left"],[1,"col"],[1,"row","lg-overflow-auto"],["class","col-md-12 p-0 payment-plans-list",4,"ngIf"],["class","row lg-overflow-auto",4,"ngIf"],[1,"row","wizard-sm-btn"],[1,"col-sm-12","col-md-12","pb-3","mob-buy-memb-btn"],["type","button",1,"secondary-btn-light","fa-pull-left",3,"click"],["type","button",1,"secondary-btn","fa-pull-right",3,"disabled","click"],[1,"row","align-items-center","justify-content-center","payment-plan-detail
1s","mob-parent-plr-0"],[1,"col-lg-4","col-md-5","col-sm-12","pr-md-0","px-sm-2","pl-md-3","mb-md-0","mb-3"],["class","simple-white-bg membership-summary py-3",4,"ngIf"],[1,"simple-white-bg","buy_membership_list"],[1,"section-title"],[1,"heading-title","orange-color","mb-0"],[3,"Customer","showValidation","showOnlyHomeAddress","isShowOptionalFields","isHomeAddressNotRequired","customerPreferences","termsAndConditionPolicy","privacyPolicyLink","isMobileNumberRequired"],[4,"ngFor","ngForOf"],["class","detail-box pb-1 px-2 pt-3",4,"ngIf"],["paymentPlanSummary",""],[1,"alert","alert-danger"],[3,"ngValue"],[1,"col-md-12","membership-duration","pt-1","p-0"],[1,"gift-card-redeem","apply-promo-code","simple-white-bg","px-3"],[1,"row","no-gutters"],[1,"d-flex","flex-wrap","flex-md-nowrap"],["type","text","name","PromoCode","class","form-control mb-0","placeholder","Promo Code","maxlength","30",3,"ngModel","ngModelChange","blur",4,"ngIf"],["class","g-card-contain d-flex align-items-center",4,"ngIf"],["type","button",1,"top_head_btn","ml-md-2","px-3",3,"disabled","click"],["class","col-md-12 mt-2",4,"ngIf"],["type","text","name","PromoCode","placeholder","Promo Code","maxlength","30",1,"form-control","mb-0",3,"ngModel","ngModelChange","blur"],[1,"g-card-contain","d-flex","align-items-center"],[1,"selected-g-card","d-inline-flex","align-items-center","justify-content-center"],[1,"g-icon"],[1,"fa-light","fa-tags"],[1,"g-text"],[1,"g-cancel","cursor-pointer",3,"click"],[1,"fa-light","fa-xmark"],[1,"col-md-12","mt-2"],[1,"alert","alert-success","d-flex","mb-0"],[1,"fa-solid","fa-circle-check"],[1,"simple-white-bg","membership-details"],["class","img-fluid","src","assets/images/dummy_feed_image.png",4,"ngIf"],[1,"row","detail-box","pt-4","px-2","pb-1"],[1,"col-md-12","pr-1"],[1,"membership-details-cont","inneer-scroll"],[1,"editor-content",3,"innerHtml"],["src","assets/images/dummy_feed_image.png",1,"img-fluid"],[1,"carousel","rounded-dots",3,"config"],["slickModal","slick-carousel"],["ngxSlickItem","","class","slide-box-content slide",4,"ngFor","ngForOf"],["ngxSlickItem","",1,"slide-box-content","slide"],[1,"img-fluid",3,"src"],[1,"heading-title","orange-color","mb-0","pb-1"],[1,"size-primary","pb-2"],[3,"sharedProfileList"],["saveShareMembershipRef",""],[1,"float-right","xs-float-none"],["type","button",1,"secondary-btn-light",3,"click"],["type","button",1,"secondary-btn","ml-2",3,"click"],[1,"simple-white-bg","membership-summary","py-3"],["class","img-fluid rounded","src","assets/images/dummy_feed_image.png",4,"ngIf"],["class","carousel rounded-dots",3,"config",4,"ngIf"],[1,"row","memship_box_desc","pt-2","pl-0","pr-0"],[1,"col-md-12","membership-duration","pt-1"],["src","assets/images/dummy_feed_image.png",1,"img-fluid","rounded"],[1,"img-fluid","rounded",3,"src"],[1,"col-md-12","p-0","payment-plans-list"],["class","row list-view-class",4,"ngFor","ngForOf"],[1,"row","list-view-class"],[1,"alert","warning-alert","table-alert","p-1","mt-1"],[1,"w-60px"],["class","section-title",4,"ngIf"],["class","pay-section-label",4,"ngIf"],[1,"row","setup-content"],["class","col-md-12 col-sm-12 space p-0",4,"ngIf"],["class","col-lg-12 col-sm-12 p-0",4,"ngIf"],["class","col-md-12 p-0 mob-pt-2",4,"ngIf"],[1,"pay-section-label"],[1,"row","mob-col-full","normal-margin"],[1,"col-xl","col-lg-6","col-md","col-sm-6","px-2"],[1,"checkbox","radio-container","mt-0",3,"ngClass","click"],["id","payByCard","name","payByCard","type","radio",2,"margin-left","8px",3,"ngModel","value","ngModelChange"],["for","payByCard"],["id","payByBank","name","payByBank","type","radio",2,"margin-left","8px",3,"ngModel","value","ngModelChange"],["for","payByBank"],[1,"col-md-12","col-sm-12","space","p-0"],["class","saved_cards",4,"ngFor","ngForOf"],["class","row mt-2",4,"ngIf"],[1,"saved_cards"],["type","radio","name","cardid",3,"id","value","ngModel","ngModelChange"],[3,"for"],[1,"row","mt-2"],["class","col-lg-4 col-md-6 ten_space",4,"ngIf"],["class","col-lg-4 col-md-6 col-sm-6",4,"ngIf"],[1,"col-lg-4","col-md-6","col-sm-6"],[3,"ngClass"],["tabindex","15","placeholder","Account Holder Name","name","account_holder_name","type","text","maxlength","18","required","",1,"form-control","xl-input",3,"ngModel","ngModelChange","blur"],["AccHolderName","ngModel"],["tabindex","16","placeholder","Account Number","name","account_number","type","text","required","",1,"form-control","xl-input",3,"ngModel","accountCodeDirective","maxlength","ngModelChange"],["AccNumber","ngModel"],[1,"col-lg-4","col-md-6","ten_space"],["tabindex","2","required","","name","AccHolderCountry",1,"form-control",3,"ngModel","ngModelChange"],["AccType","ngModel"],["AccHolderCountry","ngModel"],["placeholder","Account Prefix Number","name","account_prefix_number","type","text","required","",1,"form-control",3,"ngModel","maxlength","ngModelChange"],["PrefixAccNumber","ngModel"],["tabindex","17","placeholder","Bank Code","name","bank_code","type","text","required","",1,"form-control","xl-input",3,"ngModel","maxlength","ngModelChange"],["BankCode","ngModel"],["tabindex","17","placeholder","Branch/Sort Code","name","branch_code","type","text","required","",1,"form-control","xl-input",3,"ngModel","branchCodeDirective","maxlength","ngModelChange"],["BranchCode","ngModel"],["placeholder","Check","name","Check","type","text","required","",1,"form-control",3,"ngModel","maxlength","ngModelChange"],["Check","ngModel"],[1,"col-lg-12","col-sm-12","p-0"],[1,"row","pt-3","mx-0"],[1,"col-md-12","col-sm-12"],[3,"customerID","amount","email","stripeAccountID","stripePublishablekey","pendingStorageKey"],[1,"small-text","mb-0","pt-3"],["class","col-md-12 col-sm-12 saved_cards",4,"ngFor","ngForOf"],["class","row pt-3",4,"ngIf"],[1,"col-md-12","col-sm-12","saved_cards"],[1,"d-flex","align-items-center",3,"for"],[1,"row","pt-3"],[1,"col-md-6","col-sm-12"],["for","card-element",1,"mem-label"],["type","text","placeholder","Card Holder's Name","name","name_on_card","required","","minlength","3",1,"form-control","xl-input",3,"formControl","blur"],["class","col-md-6",4,"ngIf"],[1,"col-md-6"],["id","card-element"],[3,"customerID","nameOnCard","isSaveCard","currencyCode","branchCountryID","isHomeAddressMandatory"],[1,"row","border-bottom","mx-3","py-2",3,"ngClass"],["class","col-md-12 col-sm-12 saved_cards mx-0 no-border",4,"ngFor","ngForOf"],["class","col-lg-4 col-md-6 col-sm-6 saved_cards mx-0 no-border",4,"ngIf"],[1,"col-lg-8","col-md-6","col-sm-6","px-0"],["type","button","class","secondary-btn fa-pull-right",3,"click",4,"ngIf"],[1,"col-md-12","col-sm-12","saved_cards","mx-0","no-border"],["type","radio","name","cardid",3,"id","value","ngModel","ngModelChange","change"],[1,"col-lg-4","col-md-6","col-sm-6","saved_cards","mx-0","no-border"],["type","radio","id","-1","name","cardid",3,"value","ngModel","ngModelChange","change"],["for","-1",1,"mb-0"],["type","button",1,"secondary-btn","fa-pull-right",3,"click"],[1,"col-md-12","p-0","mob-pt-2"],[1,"row","flex_align_center"],[1,"col-md-10","col-sm-12"],[1,"checkbox","checkbox-primary","d-inline-flex"],["id","confirmPoilcy","name","confirmPoilcy","type","checkbox",2,"margin-left","8px",3,"ngModel","ngModelChange"],["for","confirmPoilcy"],[1,"col-md-12","col-sm-12","pt-2"],["
1width","240","src","assets/images/Cards.svg",1,"img-responsive","float-right"],[1,"checkbox","checkbox-primary","d-inline-flex","savedcard_btn"],["width","240px","src","assets/images/Cards.svg",1,"img-responsive","float-right"],[3,"customerID"],["addStripeDebitRef",""],[1,"col-md-2","col-sm-12"],["width","80","src","assets/images/direct-debit-terms-logo.png",1,"img-reponsive","float-right"],[3,"customForms","membershipDetails","formIndexFromParent","membershipFormOption","onSubmitForms"],["class","simple-white-bg membership-summary ptb-15",4,"ngIf"],[1,"simple-white-bg"],[3,"isCustomerProfile","onBackRewardProgram","onJoin"],[1,"simple-white-bg","membership-summary","ptb-15"],[1,"row","memship_box_desc","pt-2","px-0"],[1,"row","setup-content","pt-2","pb-4"],[1,"col-xl-4","col-md-12","col-sm-12","pb-4"],[1,"col-md-4","col-sm-6"],["class","row class-header",4,"ngIf"],["class","col-md-12 text-justify",4,"ngIf"],["class","col-md-12 col-sm-12 mobile_padding",4,"ngIf"],["class","row",4,"ngIf"],[1,"row","setup-content","pb-4"],[1,"col-md-6","col-sm-6",3,"ngClass"],["class","col-xl-4 col-md-6 col-sm-6",4,"ngIf"],["class","heading-title orange-color mb-0",4,"ngIf"],[1,"col-xl-4","col-md-6","col-sm-6"],[1,"row","class-header"],[1,"col-md-12","text-justify"],[1,"mb-0"],["href","https://gocardless.com/privacy/","target","_blank"],[1,"col-md-12","col-sm-12","mobile_padding"],[1,"col-md-12","p-0","mobile_padding"],[2,"font-weight","bold"],["target","_blank","class","terms_space",3,"href",4,"ngIf"],["id","confirmTerms","name","confirmTerms","type","checkbox",2,"margin-left","8px",3,"ngModel","ngModelChange"],["for","confirmTerms"],["target","_blank",1,"terms_space",3,"href"],[3,"value","min","showClear","disabled","onDateChange"],[1,"mem-summary-title"],[1,"col","text-right"],[1,"col","col-md-8"],[1,"row","mem-summary-total"],[1,"col","col-md-4","text-right"]],template:function(t,i){if(1&t&&(e._UZ(0,"header-banner",0),e.TgZ(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),e._UZ(5,"i",5),e.TgZ(6,"h4"),e._uU(7),e.qZA()()()()(),e.TgZ(8,"div",6)(9,"div",2)(10,"form",7,8)(12,"mat-horizontal-stepper",9,10)(14,"mat-step"),e.YNc(15,dt,1,0,"ng-template",11),e.TgZ(16,"div",12)(17,"div",13)(18,"div",14)(19,"div",3),e.YNc(20,ct,3,1,"div",15),e.TgZ(21,"div",16)(22,"label",17),e._uU(23," Choose Your Plan "),e.qZA(),e.TgZ(24,"div",18)(25,"select",19),e.NdJ("ngModelChange",function(a){return i.buyMembershipModel.MembershipID=a})("ngModelChange",function(){return i.onMembershipChange()}),e.YNc(26,ut,2,2,"option",20),e.qZA()()(),e.TgZ(27,"div",16)(28,"label",21),e._uU(29," Start Date "),e.qZA(),e.TgZ(30,"date-picker",22),e.NdJ("onDateChange",function(a){return i.onToDateChange(a,"startDate")}),e.qZA()(),e.TgZ(31,"div",23),e._UZ(32,"hr"),e.qZA(),e.YNc(33,pt,13,8,"div",24),e.qZA()(),e.YNc(34,bt,9,4,"div",25),e.qZA(),e.TgZ(35,"div",26),e.YNc(36,ft,16,5,"div",27),e.qZA()()(),e.YNc(37,At,30,2,"ng-container",28),e.TgZ(38,"mat-step"),e.YNc(39,xt,1,0,"ng-template",11),e.TgZ(40,"div",29),e.YNc(41,wt,1,0,"div",30),e.TgZ(42,"div",31)(43,"div",32)(44,"div",33)(45,"div",3)(46,"div",34)(47,"h2",35),e._uU(48,"Payment Plan"),e.qZA()()(),e.TgZ(49,"div",36)(50,"div",37)(51,"div",3)(52,"div",16)(53,"div",38)(54,"div",39)(55,"h5",40),e._uU(56,"Payment Name"),e.qZA()(),e.TgZ(57,"div",41)(58,"h5",40),e._uU(59,"Type"),e.qZA()(),e.TgZ(60,"div",41)(61,"h5",40),e._uU(62,"Due Date"),e.qZA()(),e.TgZ(63,"div",41)(64,"h5",40),e._uU(65,"Price"),e.qZA()(),e.TgZ(66,"div",41)(67,"h5",40),e._uU(68,"Pro Rata"),e.qZA()(),e.TgZ(69,"div",41)(70,"h5",40),e._uU(71,"Tax"),e.qZA()(),e.TgZ(72,"div",41)(73,"h5",40),e._uU(74,"Total"),e.qZA()()()()(),e.TgZ(75,"div",42),e.YNc(76,Nt,2,1,"div",43),e.qZA(),e.YNc(77,qt,3,0,"div",44),e.TgZ(78,"div",3)(79,"div",16)(80,"div",38)(81,"div",41)(82,"h5",40),e._uU(83,"Total"),e.qZA()(),e.TgZ(84,"div",41),e._UZ(85,"h5",40),e.qZA(),e.TgZ(86,"div",41),e._UZ(87,"h5",40),e.qZA(),e.TgZ(88,"div",41),e._UZ(89,"h5",40),e.qZA(),e.TgZ(90,"div",41),e._UZ(91,"h5",40),e.qZA(),e.TgZ(92,"div",41),e._UZ(93,"h5",40),e.qZA(),e.TgZ(94,"div",41)(95,"h5",40),e._uU(96),e.ALo(97,"currency"),e.qZA()()()()()()()(),e.TgZ(98,"div",45)(99,"div",46),e._UZ(100,"hr"),e.TgZ(101,"button",47),e.NdJ("click",function(){return i.onPrevious()}),e._uU(102,"Back"),e.qZA(),e.TgZ(103,"button",48),e.NdJ("click",function(){return i.onContinue()}),e._uU(104,"Next"),e.qZA()()()()()()(),e.TgZ(105,"mat-step"),e.YNc(106,Ft,1,0,"ng-template",11),e.TgZ(107,"div",49)(108,"div",50),e.YNc(109,Rt,24,12,"div",51),e.qZA(),e.TgZ(110,"div",31)(111,"div",52)(112,"div",33)(113,"div",3)(114,"div",16)(115,"div",3)(116,"div",34)(117,"div",53)(118,"h2",54),e._uU(119,"Personal Information"),e.qZA()()()()()(),e._UZ(120,"app-personal-information",55),e.YNc(121,Mi,20,15,"ng-container",28),e.qZA(),e.TgZ(122,"div",45)(123,"div",46),e._UZ(124,"hr"),e.TgZ(125,"button",47),e.NdJ("click",function(){return i.onPrevious()}),e._uU(126,"Back"),e.qZA(),e.TgZ(127,"button",48),e.NdJ("click",function(){return i.onContinue()}),e._uU(128,"Next"),e.qZA()()()()()()(),e.YNc(129,vi,3,4,"mat-step",56),e.YNc(130,Ii,8,2,"mat-step",28),e.TgZ(131,"mat-step"),e.YNc(132,Ai,1,0,"ng-template",11),e.TgZ(133,"div",29),e.YNc(134,xi,1,0,"div",30),e.TgZ(135,"div",31)(136,"div",52),e.YNc(137,$i,42,10,"div",57),e.TgZ(138,"div",45)(139,"div",46),e._UZ(140,"hr"),e.TgZ(141,"button",47),e.NdJ("click",function(){return i.onPrevious()}),e._uU(142,"Back"),e.qZA(),e.TgZ(143,"button",48),e.NdJ("click",function(){return i.onBuy()}),e._uU(144,"Confirm"),e.qZA()()()()()()()()(),e.YNc(145,es,52,37,"ng-template",null,58,e.W1O),e.qZA()()),2&t){const r=e.MAs(146);e.Q6J("bannerType",i.headerBannerEnum.Packages),e.xp6(7),e.Oqu(i.pageTitle),e.xp6(13),e.Q6J("ngIf",!i.hasMemberhsips),e.xp6(
15),e.Q6J("ngModel",i.buyMembershipModel.MembershipID),e.xp6(1),e.Q6J("ngForOf",i.membershipList),e.xp6(4),e.Q6J("value",i.buyMembershipModel.StartDate)("min",i.minDate)("showClear",!1)("max",i.maxDate)("showClear",!i.isUserLoggedIn),e.xp6(3),e.Q6J("ngIf",i.selectedMembership),e.xp6(1),e.Q6J("ngIf",i.isRedeemPromoCodeOnWidget),e.xp6(2),e.Q6J("ngIf",i.selectedMembership),e.xp6(1),e.Q6J("ngIf",i.isAllowMemberShipSharing),e.xp6(4),e.Q6J("ngTemplateOutlet",r),e.xp6(35),e.Q6J("ngIf",i.hasPayments),e.xp6(1),e.Q6J("ngIf",!i.hasPayments),e.xp6(19),e.Oqu(e.gM2(97,36,i.totalAmount,i.currencyFormat,"symbol","1.2-2")),e.xp6(7),e.Q6J("disabled",!i.hasMemberhsipAlreadyAssigned),e.xp6(6),e.Q6J("ngIf",i.selectedMembership),e.xp6(11),e.Q6J("Customer",i.buyMembershipModel.Customer)("showValidation",i.showValidation)("showOnlyHomeAddress",!1)("isShowOptionalFields",!0)("isHomeAddressNotRequired",i.branchWidgetSetting.IsHomeAddressNotRequired)("customerPreferences",null==i.saveMemberMembershipModel?null:i.saveMemberMembershipModel.CustomerCampaignUnsubscribe)("termsAndConditionPolicy",i.branchWidgetSetting.TermsOfServiceURL)("privacyPolicyLink",i.branchWidgetSetting.PrivacyPolicyURL)("isMobileNumberRequired",i.branchWidgetSetting.IsMobileNumberRequired),e.xp6(1),e.Q6J("ngIf",i.isPaymentMethodRequired),e.xp6(6),e.Q6J("disabled",!i.hasMemberhsipAlreadyAssigned),e.xp6(2),e.Q6J("ngForOf",i.customFormView),e.xp6(1),e.Q6J("ngIf",i.branchWidgetSetting.DefaultRewardProgramID>0&&i.branchWidgetSetting.RewardProgramEnrollmentTypeID===i.rewardProgramEnrollmentType.CustomerOptIn&&!i.isSkipedRewardProgram&&0===i.customerRewardProgramId&&i.isRewardProgramAllowed),e.xp6(4),e.Q6J("ngTemplateOutlet",r),e.xp6(3),e.Q6J("ngIf",i.hasPaymentSummary),e.xp6(6),e.Q6J("disabled",!i.hasMemberhsipAlreadyAssigned)}},directives:[U.B,c._Y,c.JL,c.F,D.Vq,D.C0,D.VY,b.O5,c.EJ,c.JJ,c.On,b.sg,c.YN,c.Kr,tt.L,c.Fj,c.nD,R.vE,R.Xg,ze._,b.tP,I.i,b.mk,c._,c.Q7,it.x,st.w,$.i,c.wO,c.oH,z.W,c.Wl,$e.F,j.o,rt.Q],pipes:[at.F,b.H9],encapsulation:2}),s})()}];let ss=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[v.Bz.forChild(is)],v.Bz]}),s})();var rs=m(91469),as=m(14486);let ns=(()=>{class s{}return s.\u0275fac=function(t){return new(t||s)},s.\u0275mod=e.oAB({type:s}),s.\u0275inj=e.cJS({imports:[[b.ez,ss,c.u5,c.UX,rs.m,as.X,R.Sv]]}),s})()}}]);
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.