PageSourceSearch

https://entrelacs.com/5160.be5b8acc26b0ca92.js

js entrelacs.com collected 2026-09-25 04:51:26 UTC 234,414 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkpc=self.webpackChunkpc||[]).push([[5160],{55957:(bt,qe,m)=>{m.r(qe),m.d(qe,{ActivitePageModule:()=>aa});var O=m(16175),Ae=m(4673),at=m(20305),rt=m(66560),g=m(49823),ae=m(68901),ye=m(20986),lt=m(82889),G=m.n(lt),x=m(4407),S=m(89417),y=m(8953),Q=m(77339),X=m(51188),he=m(51611),Ie=m(49484),E=m(30049),We=m(35052),Ye=m(23294),j=m(25558),Y=m(96354),Je=m(99437),re=m(88141),Oe=m(5964),Ze=m(84572),De=m(27468),ie=m(7673),_t=m(1807),e=m(54438),ct=m(66345),v=m(51564),F=m(97803),Ne=m(98377),k=m(60177),dt=m(34006),ge=m(373),J=m(9310),I=m(89079),Ke=m(17446),et=m(59042),U=m(32102),ve=m(88834),z=m(36013),pt=m(32430),be=m(81405),se=m(88974),tt=m(58820),Et=m(33916),Re=m(75824),it=m(6220),nt=m(84529);const Rt=["stepper"],$t=["stepParticipants"],Lt=(o,r)=>r.get("id").value,yt=(o,r)=>r.id,Dt=()=>[];function Vt(o,r){if(1&o&&e.nrm(0,"vplus-loading-spinner",39),2&o){const i=e.XpG();e.Y8G("loadingFailed",i.dataLoadingFailed)}}function xt(o,r){1&o&&e.nrm(0,"i",63)}function Ft(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,17),e.k0s())}function Xt(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,18),e.k0s())}function Gt(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,19),e.k0s())}function kt(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,20),e.k0s())}function jt(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,21),e.k0s())}function Ut(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",46)(1,"div")(2,"h2"),e.pXf(3,8),e.k0s()(),e.j41(4,"div",64)(5,"form",65)(6,"div")(7,"div",66)(8,"mat-form-field")(9,"mat-label"),e.pXf(10,9),e.k0s(),e.nrm(11,"input",67),e.j41(12,"mat-error"),e.pXf(13,10),e.k0s()(),e.j41(14,"mat-form-field")(15,"mat-label"),e.pXf(16,11),e.k0s(),e.nrm(17,"input",68),e.j41(18,"mat-error"),e.pXf(19,12),e.k0s()()(),e.j41(20,"div",66)(21,"mat-form-field")(22,"mat-label"),e.pXf(23,13),e.k0s(),e.nrm(24,"input",69),e.DNE(25,Ft,2,0,"mat-error")(26,Xt,2,0,"mat-error")(27,Gt,2,0,"mat-error"),e.k0s(),e.j41(28,"mat-form-field")(29,"mat-label"),e.pXf(30,14),e.k0s(),e.nrm(31,"input",70),e.DNE(32,kt,2,0,"mat-error")(33,jt,2,0,"mat-error"),e.k0s()()()()(),e.j41(34,"div",53)(35,"button",54),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.back())}),e.pXf(36,15),e.k0s(),e.j41(37,"button",55),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextToSelectionAbonnements())}),e.pXf(38,16),e.k0s()()()}if(2&o){e.XpG();const i=e.sdS(7),t=e.XpG();e.Y8G("stepControl",t.citoyenSansCompteForm)("formGroup",t.citoyenSansCompteForm)("aria-labelledby",i.selectedIndex<t.EnumStepper.Identification?"readonly-title":null),e.R7$(5),e.Y8G("formGroup",t.citoyenSansCompteForm),e.R7$(20),e.vxM(25,null!=t.citoyenSansCompteForm.controls.courriel.errors&&t.citoyenSansCompteForm.controls.courriel.errors.required?25:-1),e.R7$(),e.vxM(26,t.citoyenSansCompteForm.controls.courriel.hasError("invalidEmail")?26:-1),e.R7$(),e.vxM(27,t.citoyenSansCompteForm.controls.courriel.hasError("courrielUtilise")?27:-1),e.R7$(4),e.Y8G("imask",t.appConfig.appConfig.telMaskObjet)("unmask",!0),e.R7$(),e.vxM(32,null!=t.citoyenSansCompteForm.controls.telephone.errors&&t.citoyenSansCompteForm.controls.telephone.errors.required?32:-1),e.R7$(),e.vxM(33,null!=t.citoyenSansCompteForm.controls.telephone.errors&&t.citoyenSansCompteForm.controls.telephone.errors.pattern?33:-1)}}function Qt(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"ordinal"),e.j41(3,"span"),e.pXf(4,24),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,25),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2).$implicit,n=e.XpG(2);e.R7$(),e.SpI("",e.i5U(2,2,i.ordre,n.isFr),"\xa0"),e.R7$(4),e.SpI("\xa0",e.i5U(6,5,t.get("tarif").value-i.montantRabais,n.localisation)," ")}}function zt(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"ordinal"),e.j41(3,"span"),e.pXf(4,26),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,27),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2).$implicit,n=e.XpG(2);e.R7$(),e.SpI("",e.i5U(2,2,i.ordre,n.isFr),"\xa0"),e.R7$(4),e.SpI("\xa0",e.i5U(6,5,t.get("tarif").value-i.montantRabais,n.localisation),"")}}function wt(o,r){if(1&o&&e.DNE(0,Qt,9,8,"p")(1,zt,9,8,"p"),2&o){const i=e.XpG(),t=i.$index,n=i.$count;e.vxM(0,t!==n-1?0:-1),e.R7$(),e.vxM(1,t===n-1?1:-1)}}function Ht(o,r){1&o&&e.DNE(0,wt,2,2),2&o&&e.vxM(0,0!==r.$index?0:-1)}function Bt(o,r){if(1&o&&(e.j41(0,"div",74)(1,"h3"),e.pXf(2,22),e.k0s(),e.Z7z(3,Ht,1,1,null,null,yt),e.j41(5,"p"),e.pXf(6,23),e.k0s()()),2&o){let i;const t=e.XpG().$implicit;e.R7$(3),e.Dyx(null!==(i=t.get("paliersRabaisFamilialOptions").value)&&void 0!==i?i:e.lJ4(0,Dt))}}function qt(o,r){if(1&o&&(e.j41(0,"mat-error",83)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QteAdmTropFaible," ",i.get("min").value," ",1===i.get("min").value?t.EnumLabelsErreurQte.QteUnAchat:t.EnumLabelsErreurQte.QteAchat,"")}}function Wt(o,r){if(1&o&&(e.j41(0,"mat-error",83)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QteAdmTropElevee," ",i.get("max").value," ",1===i.get("max").value?t.EnumLabelsErreurQte.QteUnAchat:t.EnumLabelsErreurQte.QteAchat,"")}}function Yt(o,r){if(1&o&&(e.j41(0,"mat-error",83)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.SjE("",t.EnumLabelsErreurQte.QteAdmTropFaible," ",i.get("min").value," ",t.EnumLabelsErreurQte.QteMax," ",i.get("max").value," ",t.EnumLabelsErreurQte.QteAchat,"")}}function Jt(o,r){if(1&o&&(e.j41(0,"mat-error",83)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QtesEgales," ",i.get("min").value," ",1===i.get("min").value?t.EnumLabelsErreurQte.QteUnAchat:t.EnumLabelsErreurQte.QteAchat,"")}}function Zt(o,r){if(1&o&&(e.j41(0,"div",82),e.DNE(1,qt,3,3,"mat-error",83)(2,Wt,3,3,"mat-error",83)(3,Yt,3,5,"mat-error",83)(4,Jt,3,3,"mat-error",83),e.k0s()),2&o){const i=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.vxM(1,i.hasError(t.EnumTypeErreurQte.QteTropFaible)&&i.touched?1:-1),e.R7$(),e.vxM(2,i.hasError(t.EnumTypeErreurQte.QteTropElevee)&&i.touched?2:-1),e.R7$(),e.vxM(3,i.hasError(t.EnumTypeErreurQte.QteHorsLimites)&&i.touched?3:-1),e.R7$(),e.vxM(4,i.hasError(t.EnumTypeErreurQte.QtesEgales)&&i.touched?4:-1)}}function Kt(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",49)(1,"div",71)(2,"div",72)(3,"div")(4,"span",73),e.EFF(5),e.k0s(),e.DNE(6,Bt,7,1,"div",74),e.k0s(),e.j41(7,"div",75)(8,"button",76),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.decreaseQte(n))}),e.nrm(9,"i",77),e.k0s(),e.j41(10,"input",78),e.bIt("blur",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.onBlurQte(n))}),e.k0s(),e.j41(11,"button",79),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.increaseQte(n))}),e.nrm(12,"i",80),e.k0s()(),e.j41(13,"span",81),e.EFF(14),e.k0s()(),e.DNE(15,Zt,5,4,"div",82),e.k0s()()}if(2&o){const i=r.$implicit,t=r.$index,n=e.XpG(2);e.Y8G("formGroupName",t),e.R7$(5),e.JRh(i.get("trfOptNom").value?i.get("trfOptNom").value:i.get("ftbNom").value),e.R7$(),e.vxM(6,i.get("isRabaisFamilial").value&&!n.isInvite?6:-1),e.R7$(2),e.Y8G("disabled","0"===i.get("qte").value),e.R7$(2),e.Y8G("imask",n.maskQte),e.R7$(4),e.SpI(" ",i.get("tarifFormatted").value,""),e.R7$(),e.vxM(15,(i.hasError(n.EnumTypeErreurQte.QteHorsLimites)||i.hasError(n.EnumTypeErreurQte.QteTropElevee)||i.hasError(n.EnumTypeErreurQte.QteTropFaible)||i.hasError(n.EnumTypeErreurQte.QtesEgales))&&i.touched?15:-1)}}function ei(o,r){1&o&&(e.j41(0,"mat-error",50),e.pXf(1,28),e.k0s())}function ti(o,r){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const i=e.XpG(3);e.R7$(),e.JRh(i.labels.unAbonnement)}}function ii(o,r){if(1&o&&(e.j41(0,"span")(1,"span"),e.pXf(2,29),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"span"),e.pXf(6,30),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(4),e.SpI(" ",i.qteDispo," ")}}function ni(o,r){if(1&o&&(e.j41(0,"mat-error",51),e.DNE(1,ti,2,1,"span")(2,ii,7,1),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,1===i.qteDispo?1:2)}}function oi(o,r){1&o&&(e.j41(0,"mat-error",51),e.pXf(1,31),e.k0s())}function si(o,r){if(1&o&&(e.j41(0,"mat-error",50)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(2),e.E5c("",i.EnumLabelsErreurQte.QteTropFaible," ",i.adhesion.min," ",1===i.adhesion.min?i.EnumLabelsErreurQte.QteUnAchat:i.EnumLabelsErreurQte.QteAchat,"")}}function ai(o,r){if(1&o&&(e.j41(0,"mat-error",50)(1,"span")(2,"span"),e.EFF(3),e.k0s()()()),2&o){const i=e.XpG(3);e.R7$(3),e.E5c("",i.EnumLabelsErreurQte.QteTropElevee," ",i.adhesion.max," ",1===i.adhesion.max?i.EnumLabelsErreurQte.QteUnAchat:i.EnumLabelsErreurQte.QteAchat,"")}}function ri(o,r){if(1&o&&(e.j41(0,"mat-error",50)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(2),e.SjE("",i.EnumLabelsErreurQte.QteTropFaible," ",i.adhesion.min," ",i.EnumLabelsErreurQte.QteMax," ",i.adhesion.max," ",i.EnumLabelsErreurQte.QteAchat,"")}}function li(o,r){if(1&o&&(e.j41(0,"mat-error",50)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(2),e.E5c("",i.EnumLabelsErreurQte.QtesEgales," ",i.adhesion.min," ",1===i.adhesion.min?i.EnumLabelsErreurQte.QteUnAchat:i.EnumLabelsErreurQte.QteAchat,"")}}function _i(o,r){if(1&o&&(e.j41(0,"div",52),e.DNE(1,si,3,3,"mat-error",50)(2,ai,4,3,"mat-error",50)(3,ri,3,5,"mat-error",50)(4,li,3,3,"mat-error",50),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteTropFaible)&&i.tarificationFA.touched?1:-1),e.R7$(),e.vxM(2,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteTropElevee)&&i.tarificationFA.touched?2:-1),e.R7$(),e.vxM(3,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteHorsLimites)&&i.tarificationFA.touched?3:-1),e.R7$(),e.vxM(4,i.tarificationFA.hasError(i.EnumTypeErreurQte.QtesEgales)&&i.tarificationFA.touched?4:-1)}}function ci(o,r){1&o&&(e.j41(0,"mat-error",51)(1,"span"),e.pXf(2,32),e.k0s()())}function di(o,r){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const i=e.XpG(3);e.R7$(),e.JRh(i.labels.unAbonnementAchat)}}function pi(o,r){if(1&o&&(e.j41(0,"span")(1,"span"),e.pXf(2,33),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s(),e.j41(5,"span"),e.pXf(6,34),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(4),e.SpI(" ",i.qteDispo," ")}}function Ei(o,r){if(1&o&&(e.j41(0,"mat-error",51),e.DNE(1,di,2,1,"span")(2,pi,7,1),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,1===i.qteDispo?1:2)}}function ui(o,r){if(1&o){const i=e.RV6();e.j41(0,"p",84),e.pXf(1,35),e.k0s(),e.j41(2,"a",85),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.displayDescription(n.adhesion.politiqueRemboursement))}),e.pXf(3,36),e.k0s()}}function Ci(o,r){if(1&o){const i=e.RV6();e.j41(0,"div")(1,"div")(2,"vplus-req-toolbar",40),e.bIt("back",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.backToActivite())}),e.k0s(),e.j41(3,"div",41)(4,"div",42)(5,"div",43)(6,"mat-horizontal-stepper",44,0),e.DNE(8,xt,1,0,"ng-template",45)(9,Ut,39,11,"mat-step",46),e.j41(10,"mat-step",47)(11,"div")(12,"h2"),e.pXf(13,2),e.k0s()(),e.j41(14,"div",48),e.Z7z(15,Kt,16,7,"div",49,Lt),e.k0s(),e.DNE(17,ei,2,0,"mat-error",50)(18,ni,3,1,"mat-error",51)(19,oi,2,0,"mat-error",51)(20,_i,5,4,"div",52),e.j41(21,"div",53)(22,"button",54),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.back())}),e.pXf(23,3),e.k0s(),e.j41(24,"button",55),e.bIt("click",function(){e.eBV(i);const n=e.XpG();
1return e.Njj(n.nextToSelectionAbonnes())}),e.pXf(25,4),e.k0s()()(),e.j41(26,"mat-step",56,1)(28,"vplus-activite-selection-participants",57),e.bIt("selectedFamId",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.handleSelectedFamId(n))})("selectedPerId",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.handleSelectedPerId(n))}),e.k0s(),e.j41(29,"div",53)(30,"button",58),e.pXf(31,5),e.k0s(),e.j41(32,"button",55),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.nextFromParticipants())}),e.j41(33,"span"),e.pXf(34,6),e.k0s()()()(),e.j41(35,"mat-step",59)(36,"vplus-square-card-payment",60),e.bIt("onLaunchedPayment",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.updateOrderLaunched(!0))})("onPreparedPayment",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.order(n))})("onErrorPayment",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.updateOrderLaunched(!1))})("onPaymentLater",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.onPaymentLater(n))})("onCardReady",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.onCardReady())})("onSquareDeconnecte",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.squareDeconnecte=n)}),e.k0s(),e.DNE(37,ci,3,0,"mat-error",51)(38,Ei,3,1,"mat-error",51)(39,ui,4,0),e.j41(40,"div",53)(41,"button",54),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.onStepperBack())}),e.pXf(42,7),e.k0s(),e.j41(43,"button",61),e.nrm(44,"vplus-button-icon",62),e.j41(45,"span"),e.EFF(46),e.k0s()()()()()()()()()()}if(2&o){const i=e.sdS(7),t=e.XpG();e.R7$(2),e.Y8G("title",t.adhesion.inscNom),e.R7$(7),e.vxM(9,t.isInvite?9:-1),e.R7$(),e.Y8G("stepControl",t.formStepTarifications)("formGroup",t.formStepTarifications)("aria-labelledby",i.selectedIndex<t.EnumStepper.Selection?"readonly-title":null),e.R7$(5),e.Dyx(t.tarificationFA.controls),e.R7$(2),e.vxM(17,t.formStepTarifications.get("tarifications").hasError("required")&&t.formStepTarifications.get("tarifications").touched&&(t.isLimiteAbonnementNaN||t.adhesion.limiteAbonnement-t.adhesion.nbrAbonnement>0)?17:-1),e.R7$(),e.vxM(18,t.formStepTarifications.get("tarifications").hasError("limiteDepasse")&&t.formStepTarifications.get("tarifications").touched?18:-1),e.R7$(),e.vxM(19,!t.isLimiteAbonnementNaN&&t.adhesion.limiteAbonnement-t.adhesion.nbrAbonnement<0?19:-1),e.R7$(),e.vxM(20,(t.tarificationFA.hasError(t.EnumTypeErreurQte.QteTropFaible)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QteTropElevee)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QteHorsLimites)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QtesEgales))&&t.tarificationFA.touched?20:-1),e.R7$(6),e.Y8G("stepControl",t.formStepParticipants)("formGroup",t.formStepParticipants)("aria-labelledby",i.selectedIndex<t.EnumStepper.Participants?"readonly-title":null),e.R7$(2),e.Y8G("tarificationFA",t.tarificationFA)("participantFA",t.membreFA)("user",t.user)("canOrderForCurrentUser",t.canOrderForCurrentUser)("isInvite",t.isInvite)("famillesCurrentUser",t.famillesCurrentUser)("familleMembreHashList",t.familleMembreHashList)("contexte",t.EnumTypeInscriptionCode.Adhesion)("isInvite",t.isInvite)("ageTrfs",t.ageTrfs)("isAllowedInscWithRestr",t.adhesion.isAllowedInscWithRestr),e.R7$(7),e.Y8G("completed",!1),e.R7$(),e.Y8G("items",t.itemsPayment)("unrequiredTaxes",t.adhesion.unrequiredTaxes)("optionsVersement",null==t.adhesion?null:t.adhesion.optionsVersement)("isConfigVersement",null==t.adhesion?null:t.adhesion.isConfigVersement)("isRequiredFraisService",t.adhesion.isRequiredFraisService)("orderLaunched",t.orderLaunched)("eventDate",t.eventDate)("activityNom",t.adhesionNom)("user",t.citoyenSansCompteForm.value)("addToFraisService",t.addToFraisService)("idCard",t.idCard)("isAllowedInscWithRestr",t.isAllowedInscWithRestr)("installationsBySite",t.installationsBySite),e.R7$(),e.vxM(37,0===t.limiteDepasseCode?37:-1),e.R7$(),e.vxM(38,1===t.limiteDepasseCode?38:-1),e.R7$(),e.vxM(39,t.adhesion.politiqueRemboursement.id?39:-1),e.R7$(4),e.Y8G("id","card-button"+t.idCard)("disabled",t.squareDeconnecte.deconnecte?t.squareDeconnecte.sectionVide:!t.isCardReady&&t.requiredCheckout),e.R7$(),e.Y8G("isSubmitting",t.orderLaunc
1hed),e.R7$(2),e.JRh(t.requiredCheckout&&!t.dateVersementSupp?t.labels.payerMntn:t.labels.passerCommande)}}let Si=(()=>{var o;class r{constructor(){var t;this.store=(0,e.WQX)(J.il),this.activiteService=(0,e.WQX)(Ie.Z),this.utilisateurService=(0,e.WQX)(Ke.$),this.router=(0,e.WQX)(X.Ix),this.activatedRoute=(0,e.WQX)(X.nX),this.location=(0,e.WQX)(k.hb),this.formBuilder=(0,e.WQX)(S.ok),this.actions$=(0,e.WQX)(Q.En),this.localisationService=(0,e.WQX)(Ne.A),this.asyncCourrielValidators=(0,e.WQX)(ct.H),this.appConfig=(0,e.WQX)(We.o),this.destroyRef=(0,e.WQX)(e.abz),this.dialog=(0,e.WQX)(dt.bZ),this.dataLoaded=!1,this.dataLoadingFailed=!1,this.EnumTypeInscriptionCode=F.bO,this.idAbonnementPlageSDV="C2D1FA57-2F3A-4F8A-92FB-CBCC123020CD",this.famillesCurrentUser=[],this.familleMembreHashList={},this.familles=[],this.addToFraisService=0,this.localisation=this.localisationService.getCurrentLocalisation(),this.currencyPipe=new E.aJo,this.maskQte={mask:"000000"},this.itemsPayment=[],this.isInvite=!(null===(t=this.router.routerState.snapshot.root.queryParams)||void 0===t||!t.invite),this.stepOneAndInvite=this.isInvite,this.defaultLocalisation=this.appConfig.appConfig.localisationDefaut,this.accesIds={},this.ageTrfs=new Map,this.isAllowedInscWithRestr=!1,this.installationsBySite=[],this.EnumTypeErreurQte=v.Hy,this.EnumLabelsErreurQte=v.oO,this.EnumStepper={Identification:0,Selection:0,Participants:0},this.labels={placeholderNom:"Nom",unAbonnement:"Il y a un abonnement disponible, veuillez ajuster votre s\xE9lection",unAbonnementAchat:"Il n'y a plus qu'un abonnement disponible, veuillez ajuster votre s\xE9lection",payerMntn:"Payer maintenant",passerCommande:"Passer la commande"},this.selectIsSearchHeaderVisible$=this.store.select(g.selectIsSearchHeaderVisible),this.participantFamilletListInscrit={},this.isFr=this.localisationService.getCurrentLocalisation()===v.fi.FR,this.idCard=(0,E.SiN)(),this.idempotencyKey=(0,E.SiN)(),this.isCardReady=!1,this.squareDeconnecte={deconnecte:!1,sectionVide:!1}}ngOnInit(){var t;const n=(0,E.SiN)();this.citoyenSansCompteForm=this.formBuilder.group({perId:new S.MJ(n),prenom:new S.MJ(null,[S.k0.required,(0,E.zl_)()]),nom:new S.MJ(null,[S.k0.required,(0,E.zl_)()]),courriel:new S.MJ(null,[(0,E.Bjz)()],this.asyncCourrielValidators.validateCourriel()),telephone:new S.MJ(null,[S.k0.required,S.k0.pattern(this.appConfig.appConfig.telPattern)]),langCom:this.localisationService.getCurrentLocalisation()===v.fi.FR?v.ch.FR:v.ch.EN}),null===(t=this.citoyenSansCompteForm.get("courriel"))||void 0===t||t.valueChanges.pipe((0,I.pQ)(this.destroyRef),(0,Ye.F)(),(0,j.n)(s=>this.utilisateurService.getInvite(s))).subscribe(({perId:s})=>{var a;null===(a=this.citoyenSansCompteForm.get("perId"))||void 0===a||a.patchValue(null!=s?s:n)}),(0,Ze.z)([this.store.select(g.selectCurrentUser),this.store.select(ae.xc)]).pipe((0,I.pQ)(this.destroyRef)).subscribe(([s,a])=>{var l,_,c;this.user=s;const d=JSON.parse(null!==(l=localStorage.getItem("activite"))&&void 0!==l?l:"{}");this.adhesion=!a&&Object.keys(d).length>0?d:a,this.eventDate=null===(_=this.adhesion)||void 0===_?void 0:_.perioNom,this.adhesionNom=null===(c=this.adhesion)||void 0===c?void 0:c.adhTypNom,this.isLimiteAbonnementNaN=this.limiteIsNan(this.adhesion.limiteAbonnement),this.adhesion.tarifications=this.adhesion.tarifications.filter(p=>p.trfOptTypId!==F.G5.Familial&&!p.invisibleEnLigne),this.adhesion.tarifications.forEach(p=>{var u,C;p.tarifFormatted=this.currencyPipe.transform(p.tarif,this.localisation),p.fteId=(0,E.SiN)(),p.acces=(0,E.NzR)(p.acces,this.localisationService.getCurrentLocalisation(),this.defaultLocalisation),this.accesIds[p.id]=p.acces.map(T=>T.id),this.ageTrfs.set(p.id,[null!==(u=p.ageMin)&&void 0!==u?u:null,null!==(C=p.ageMax)&&void 0!==C?C:null,null==p?void 0:p.dateMinRef,null==p?void 0:p.dateMaxRef])}),this.activatedRoute.snapshot.queryParams.adh||this.location.replaceState(null,null,`/activite/options-tarification?adh=${x.A.sanitize(this.adhesion.inscNom)}`,""),this.installationsBySite=(0,E.LO9)(this.adhesion.installations.map(p=>({siteNom:p.siteNom,installationNom:p.instNom,adresse:p.adresse}))),this.user?(0,De.p)([this.activiteService.checkDisponibiliteAdhesionMembre(this.adhesion.id,this.user.perId,this.user.courriel),this.utilisateurService.getFamilleByPerId(this.user.perId)]).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:([p,u])=>{this.canOrderForCurrentUser=p.canOrder,this.famillesCurrentUser=u.filter(C=>C.membres.filter(T=>T.perId!==this.user.perId).length>0),this.famillesCurrentUser.sort((C,T)=>C.nom.trim().localeCompare(T.nom.trim())),this.famillesCurrentUser.forEach(C=>{this.familleMembreHashList[C.id]=C.membres.filter(T=>T.perId!==this.user.perId)}),this.famillesCurrentUser.length>0&&(this.famIdSelected=this.famillesCurrentUser[0].id),this.initForm(),this.dataLoaded=!0}}):(this.initForm(),this.dataLoaded=!0),this.EnumStepper.Identification=this.isInvite?0:-1,this.EnumStepper.Selection=this.isInvite?1:0,this.EnumStepper.Participants=this.isInvite?2:1}),this.store.select(g.selectCurrentUser).pipe((0,I.pQ)(this.destroyRef)).subscribe(s=>{this.currentUser=s}),this.actions$.pipe((0,Q.gp)(ye.En.addChildFamilySuccess),(0,j.n)(()=>this.utilisateurService.getFamilleByPerId(this.currentUser.perId)),(0,I.pQ)(this.destroyRef)).subscribe(s=>{this.familles=s;const a=s.filter(l=>l.membres.some(_=>_.perId!==this.user.perId)).sort((l,_)=>l.nom.trim().localeCompare(_.nom.trim()));this.famillesCurrentUser.push(...a),this.famillesCurrentUser.sort((l,_)=>l.nom.trim().localeCompare(_.nom.trim())),this.famillesCurrentUser.forEach(l=>{this.familleMembreHashList[l.id]=l.membres.filter(_=>_.perId!==this.user.perId)})})}onCardReady(){this.isCardReady=!0}onContentClick(){this.store.dispatch(g.Actions.setIsSearchHeaderVisible({payload:!1}))}initForm(){var t,n;this.formStepTarifications=this.formBuilder.group({tarifications:new S.Yp([],[(0,y.YK)(),this.qteValidator(),(0,E.UW_)(null===(t=this.adhesion)||void 0===t?void 0:t.min,null===(n=this.adhesion)||void 0===n?void 0:n.max)])}),this.tarificationFA=this.formStepTarifications.get("tarifications"),this.tarificationFA.setDefaultControlBuilder(()=>(0,E.nqI)(this.formBuilder)),this.tarificationFA.patchValue(this.adhesion.tarifications),this.formStepParticipants=this.formBuilder.group({membres:new S.Yp([])}),this.membreFA=this.formStepParticipants.get("membres"),this.membreFA.setDefaultControlBuilder(this.createMembreAdhesionFormControl.bind(this))}
1nextToSelectionAbonnements(){this.citoyenSansCompteForm.invalid&&this.stepOneAndInvite?this.citoyenSansCompteForm.markAllAsTouched():(this.stepOneAndInvite=!1,this.user=this.citoyenSansCompteForm.value,this.activiteService.checkDisponibiliteAdhesionMembre(this.adhesion.id,this.user.perId,this.user.courriel).pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>this.canOrderForCurrentUser=t.canOrder),this.stepper.next())}onStepperBack(){this.stepper.previous()}onFirstNext(){this.formStepTarifications.markAllAsTouched()}qteValidator(){return t=>{let n=0;return(null==t?void 0:t.value.length)>=1&&t.value.forEach(s=>{var a,l;0!==(null==s||null===(a=s.trfOptOptions)||void 0===a?void 0:a.length)?null==s||null===(l=s.trfOptOptions)||void 0===l||l.forEach(_=>{n+=parseInt(_.qte)*s.qte}):n+=parseInt(s.qte)}),this.qteDispo=this.adhesion.limiteAbonnement-this.adhesion.nbrAbonnement,this.sommeQte=n,n+this.adhesion.nbrAbonnement>this.adhesion.limiteAbonnement&&!this.isLimiteAbonnementNaN?(this.limiteDepasseCode=null,{limiteDepasse:!0}):null}}increaseQte(t){(0,E.fKT)(t)}decreaseQte(t){(0,E.XOW)(t)}onBlurQte(t){(0,E.T6x)(t)}createMembreAdhesionFormControl(){const t=(0,y.cf)(this.formBuilder);t.addValidators((0,y.z3)(this.famillesCurrentUser,this.isInvite)),t.get("perId").addAsyncValidators(this.checkDisponibiliteAdhesionMembre(!0)),t.get("perId").updateValueAndValidity(),t.get("courriel").addAsyncValidators(this.checkDisponibiliteAdhesionMembre(!1)),t.get("courriel").updateValueAndValidity();const n=[(0,y.z3)(this.famillesCurrentUser,this.isInvite)];return this.adhesion.isAllowedInscWithRestr||n.push((0,y.uc)(this.accesIds,this.isInvite),(0,E.CBP)(this.ageTrfs,this.isInvite)),t.addValidators(n),t.updateValueAndValidity({emitEvent:!1}),t}onPaymentLater(t){this.dateVersementSupp=t}checkDisponibiliteAdhesionMembre(t){let n,s=null;return a=>""===a.value||null===a.value?(0,ie.of)(null):a.value===n?(0,ie.of)(s):(0,_t.O)(300).pipe((0,j.n)(()=>this.activiteService.checkDisponibiliteAdhesionMembre(this.adhesion.id,t?a.value:null,t?null:a.value)),(0,Y.T)(l=>(n=a.value,l.canOrder?(s=null,null):(s={existAbonnement:!0},{existAbonnement:!0}))),(0,Je.W)(()=>null))}nextToSelectionAbonnes(){if(this.tarificationFA.invalid)this.formStepTarifications.markAllAsTouched();else{if(this.stepParticipants.reset(),this.participantsComponent.generateParticipants(),["B1D379D7-71CE-479E-B305-ACA19B86E79B","AE439FC5-2A1B-4CAE-AA43-C4B932EB3834"].includes(this.adhesion.id)){const t=this.formStepTarifications.get("tarifications").value.reduce((n,s)=>n+parseInt(String(s.qte)),0);this.addToFraisService=30*t}this.adhesion.id===this.idAbonnementPlageSDV&&(this.addToFraisService=30),setTimeout(()=>{this.stepper.next()})}}nextFromParticipants(){if(this.formStepParticipants.invalid)return this.formStepParticipants.markAllAsTouched(),void this.store.dispatch(new g.Actions.ShowSnackBar("La commande ne peut pas \xEAtre effectu\xE9e car elle contient des \xE9l\xE9ments invalides",g.EnumSnackBarType.Echec));const t=this.tarificationFA.value.filter(s=>s.qte>0);if(this.requiredCheckout=0!==t.map(s=>s.tarif).reduce((s,a)=>s+a),1===this.famillesCurrentUser.length&&t.length>0){const s=this.famillesCurrentUser[0].id,a=t.map(l=>this.getParticipantsAdhesionInscritByFamId$(s,this.adhesion.id,l.ftbId));(0,De.p)(a).subscribe(()=>{this.processToNextFromParticipants(t),this.stepper.next()})}else this.processToNextFromParticipants(t),this.stepper.next();const n=this.formStepParticipants.get("membres");this.adhesion.isAllowedInscWithRestr&&(this.isAllowedInscWithRestr=n.controls.some(s=>{var a;return!(null!==(a=s.get("isAllRestrictionsRespected"))&&void 0!==a&&a.value)}))}processToNextFromParticipants(t){this.itemsPayment=t.map(n=>{var s;let a={totalWithRabais:null,membreWithRabais:null};return n.isRabaisFamilial&&!this.isInvite&&(a=(0,E.oAF)(n.paliersRabaisFamilialOptions,this.membreFA.value.filter(l=>l.optId===n.id),this.participantFamilletListInscrit[n.ftbId])),{id:n.id,nom:null!==(s=n.trfOptNom)&&void 0!==s?s:n.ftbNom,prix:n.tarif,prixFormatted:n.tarifFormatted,qte:n.qte,total:G()(n.tarif*n.qte,2),totalWithRabais:a.totalWithRabais,membreWithRabais:a.membreWithRabais}}),this.itemsPayment.forEach(n=>
1{n.totalWithRabais&&(n.totalWithRabaisFormatted=this.currencyPipe.transform(n.totalWithRabais,this.localisation)),n.total&&(n.totalFormatted=this.currencyPipe.transform(n.total,this.localisation))})}updateOrderLaunched(t){this.orderLaunched=t}order(t){this.activiteService.getLimiteAndNbrAdhesion(this.adhesion.id).pipe((0,re.M)(n=>{this.adhesion.limiteAbonnement=n.limiteAbonnement,this.isLimiteAbonnementNaN=this.limiteIsNan(this.adhesion.limiteAbonnement),this.adhesion.nbrAbonnement=n.nbrAbonnement,this.isLimiteAbonnementNaN||(this.adhesion.limiteAbonnement-n.nbrAbonnement==0?(this.limiteDepasseCode=0,this.orderLaunched=!1):this.sommeQte+n.nbrAbonnement>this.adhesion.limiteAbonnement&&(this.limiteDepasseCode=1,this.orderLaunched=!1,this.qteDispo=this.adhesion.limiteAbonnement-n.nbrAbonnement))}),(0,Oe.p)(n=>!this.orderRequested&&this.sommeQte+n.nbrAbonnement<=this.adhesion.limiteAbonnement||this.isLimiteAbonnementNaN),(0,j.n)(()=>{t.paymentBody&&(t.paymentBody.idempotencyKey=this.idempotencyKey),this.membreFA.value.forEach(s=>{s.perId===this.user.perId&&!s.familleId&&this.famIdSelected&&(s.familleId=this.famIdSelected)});const n={adhId:this.adhesion.id,membres:this.membreFA.value,citoyenRequerant:{id:this.user.perId,isInvite:this.isInvite,courriel:this.user.courriel,prenom:this.user.prenom,nom:this.user.nom,telephone:this.user.telephone},facture:{id:(0,E.SiN)(),items:this.tarificationFA.value.filter(s=>s.qte>0).map(s=>{let a={totalWithRabais:null,membreWithRabais:null};return s.isRabaisFamilial&&!this.isInvite&&this.famillesCurrentUser.length>0&&(a=(0,E.oAF)(s.paliersRabaisFamilialOptions,this.membreFA.value.filter(l=>l.optId===s.id),this.participantFamilletListInscrit[s.ftbId])),{id:s.fteId,facturableNom:s.ftbNom,facturableId:s.ftbId,montantFinal:s.tarif,qte:s.qte,total:G()(s.tarif*s.qte,2),totalWithRabais:a.totalWithRabais,membreWithRabais:a.membreWithRabais}})},unrequiredTaxes:this.adhesion.unrequiredTaxes,isRequiredFraisService:this.adhesion.isRequiredFraisService,resume:null==t?void 0:t.resume};return this.orderRequested=!0,this.requiredCheckout?this.activiteService.createAdhesionMembreCheckout(n,null==t?void 0:t.paymentBody):this.activiteService.insertAdhesionMmembreList(n)}),(0,I.pQ)(this.destroyRef)).subscribe({next:n=>{if(n.status!==v.B2.Completed&&this.requiredCheckout)this.store.dispatch(new g.Actions.ShowSnackBar("\xC9chec \xE0 la compl\xE9tion de paiement, le statut est"+` ${n.status}`,g.EnumSnackBarType.Echec));else{var s;this.canDeactivate=!0;const a=[...((null===(s=this.currentUser)||void 0===s?void 0:s.adhIds)||[]).filter(_=>null!=_),this.adhesion.id],l={...this.currentUser,adhIds:Array.from(new Set(a))};this.store.dispatch(new rt.UpdateUserSuccess(l)),this.router.navigate(["/activite/abonnement-confirmation"],{queryParamsHandling:"merge"}),localStorage.removeItem("activite")}},error:n=>{this.orderLaunched=this.orderRequested=!1,null!=n&&n.isSquareError&&(this.idempotencyKey=(0,E.SiN)()),(0,E.TuW)(n,this.store,g,this.requiredCheckout)}})}displayDescription(t){this.dialog.open(ge.V,{data:{title:"POLITIQUE DE REMBOURSEMENT",htmlContent:t.description,understandAction:!0},width:v.Uq.Medium})}limiteIsNan(t){return isNaN(t)||null===t}onInputBlur(t){var n;t.patchValue(null===(n=t.value)||void 0===n?void 0:n.trim())}backToActivite(){this.router.navigateByUrl("/activite")}back(){this.location.back()}handleSelectedFamId(t){this.famIdSelected=t}handleSelectedPerId(t){var n;const s=this.membreFA.value.find(_=>_.perId===t);if(!s)return;const l=null===(n=this.tarificationFA.value.filter(_=>_.qte>0).find(_=>_.isRabaisFamilial&&_.id===s.optId))||void 0===n?void 0:n.ftbId;l&&this.famIdSelected&&l&&this.getParticipantsAdhesionInscritByFamId$(this.famIdSelected,this.adhesion.id,l).subscribe()}getParticipantsAdhesionInscritByFamId$(t,n,s){return this.participantFamilletListInscrit[s]||(this.participantFamilletListInscrit[s]={}),this.participantFamilletListInscrit[s][t]||(this.participantFamilletListInscrit[s][t]=[]),this.activiteService.getParticipantsAdhesionInscritByFamId(t,n,s).pipe((0,I.pQ)(this.destroyRef),(0,re.M)(a=>{this.participantFamilletListInscrit[s][t]=a}))}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-activite-adhesion"]],viewQuery:function(t,n){if(1&t&&(e.GBs(Rt,5),e.GBs($t,5),e.GBs(he.D,5)),2&t){let s;e.mGM(s=e.lsd())&&(n.stepper=s.first),e.mGM(s=e.lsd())&&(n.stepParticipants=s.first),e.mGM(s=e.lsd())&&(n.participantsComponent=s.first)}},decls:5,vars:10,consts:()=>{let i,t,n,s,a,l,_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,L,H,B,q,W,te,_e,ce,de,pe,Ee,ue,Ce,Se,me,Te,fe;return i="S\xE9lection",t="Abonn\xE9s",n="R\xE9sum\xE9 et paiement",s="S\xE9lection des abonnements",a=" Retour ",l="Suivant",_="Retour",c="Suivant",d=" Retour ",p="Identification",u="Pr\xE9nom",C=" Champ obligatoire ",T="Nom",A=" Champ obligatoire ",N="Courriel",h="T\xE9l\xE9phone",f=" Retour ",$="Suivant",b="Champ obligatoire",D=" Courriel non valide ",V="Adresse courriel d\xE9j\xE0 utilis\xE9e par un compte citoyen",L=" Champ obligatoire ",H=" T\xE9l\xE9phone non valide ",B="Rabais familial appliqu\xE9 d\xE8s le 2e inscrit.",q="Calcul\xE9 au r\xE9sum\xE9 de la commande",W="inscrit :",te=" de r\xE9duction",_e="inscrit et plus :",ce=" de r\xE9duction par inscription additionnelle",de=" Veuillez pr\xE9ciser au moins une quantit\xE9 ",pe="Il y a ",Ee="abonnement(s) disponible(s), veuillez ajuster votre s\xE9lection",ue="Il n'y a plus d'abonnement disponible.",Ce="Il n'y a plus d'abonnement disponible.",Se="Il n'y a plus que",me="abonnement(s) disponible(s), veuillez ajuster votre s\xE9lection",Te=" En proc\xE9dant au paiement, vous acceptez notre ",fe="politique de remboursement",[["stepper",""],["stepParticipants",""],s,a,l,_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,L,H,B,q,W,te,_e,ce,de,pe,Ee,ue,Ce,Se,me,Te,fe,[1,"hide-desktop","mobile-header",3,"forceBackDefaultHref","defaultHref","headerTitle","returnButtonType","menuId"],["id","activiteOptionTarification",3,"click"],[3,"loadingFailed"],[3,"back","title"],[1,"standard-page-content"],[1,"stepper-container"],[1,"stepper-form-activite"],["linear","true",1,"inscription-stepper"],["matStepperIcon","edit"],["label","Identification",3,"stepControl","formGroup","aria-labelledby"],["label",i,3,"stepControl","formGroup","aria-labelledby"],["formArrayName","tarifications",1,"margin-top-2"],[3,"formGroupName"],[1,"custom-mat-error-message","action-delete","margin-top-1"],[1,"custom-mat-error-message","margin-top-1"],[1,"margin-top"],[1,"flex-space-between","spacing-top"],["type","button","mat-stroked-button","",1,"custom-button-standard","custom-button-stroked",3,"click"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click"],["label",t,3,"stepControl","formGroup","aria-labelledby"],[3,"selectedFamId","selectedPerId","tarificationFA","participantFA","user","canOrderForCurrentUser","isInvite","famillesCurrentUser","fam
1illeMembreHashList","contexte","ageTrfs","isAllowedInscWithRestr"],["type","button","mat-stroked-button","","matStepperPrevious","",1,"custom-button-standard","custom-button-stroked","custom-button-stepper"],["label",n,"aria-labelledby","readonly-title",3,"completed"],[3,"onLaunchedPayment","onPreparedPayment","onErrorPayment","onPaymentLater","onCardReady","onSquareDeconnecte","items","unrequiredTaxes","optionsVersement","isConfigVersement","isRequiredFraisService","orderLaunched","eventDate","activityNom","user","addToFraisService","idCard","isAllowedInscWithRestr","installationsBySite"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"id","disabled"],["iconClass","icon-shopping-cart",3,"isSubmitting"],[1,"icon-check"],[1,"margin-top-2"],[1,"max-720",3,"formGroup"],[1,"form-field-inline-section"],["required","","matInput","","type","text","formControlName","prenom"],["required","","matInput","","type","text","formControlName","nom"],["matInput","","type","email","required","true","formControlName","courriel"],["matInput","","type","tel","maskTelephoneEvents","","formControlName","telephone",3,"imask","unmask"],[1,"border-bottom","padding-tarification"],[1,"option-tarification-content"],[1,"option-tarification-nom"],[1,"rabais-familial"],[1,"stepper-input"],[3,"click","disabled"],[1,"icon-delete"],["matInput","","formControlName","qte",3,"blur","imask"],[3,"click"],[1,"icon-add"],[1,"option-tarification-montant"],[1,"small-margin-top","container-mat-errors"],[1,"action-delete"],[1,"inline-text"],[1,"politique",3,"click"]]},template:function(t,n){1&t&&(e.nrm(0,"vplus-mobile-header",37),e.j41(1,"ion-content",38),e.nI1(2,"async"),e.bIt("click",function(){return n.onContentClick()}),e.DNE(3,Vt,1,1,"vplus-loading-spinner",39)(4,Ci,47,44),e.k0s()),2&t&&(e.Y8G("forceBackDefaultHref",!0)("defaultHref","/activite")("headerTitle","")("returnButtonType","back-button")("menuId","activiteOpionTraification"),e.R7$(),e.AVh("filter-searche-global-active",e.bMT(2,8,n.selectIsSearchHeaderVisible$)),e.R7$(2),e.vxM(3,n.dataLoaded?4:3))},dependencies:[et.fg,U.rl,U.nJ,U.TL,ve.$z,z.V5,z.M6,z.FR,z.xJ,S.qT,S.me,S.BC,S.cb,S.YS,S.j4,S.JD,S.$R,S.v8,E.xGI,pt.Zq,be.f,se.W9,tt.x,Et.z,Re.N,it.X,he.D,k.Jj,nt.a,E.ihR],styles:[".order-btn{text-align:right}.option-tarification-montant{text-align:right;font-weight:550;white-space:nowrap}.option-tarification-nom{font-weight:450}vplus-activite-adhesion .ion-custom-button-standard i{margin-right:.5rem}vplus-activite-adhesion .custom-mat-error-message{display:block;font-size:14px}vplus-activite-adhesion .margin-top-minus-10{margin-top:-10px}vplus-activite-adhesion .custom-mat-error-field{font-size:13.5px}@media (max-width: 361px){vplus-activite-adhesion .flex-space-between{flex-direction:column-reverse;align-items:flex-end;gap:10px}}vplus-activite-adhesion .stepper-form-activite .mat-horizontal-content-container form{min-height:100px}.membre-container{padding-top:.5rem}.participant-actions-btn{display:flex;justify-content:flex-end}.step-two-form-content{display:flex;flex-wrap:wrap;justify-content:space-between}.step-two-form-content .field-container{margin-bottom:0!important}.step-two-form-content .mat-mdc-form-field,.step-two-form-content .field-custom-wrapper{flex-grow:1;width:100%;margin-bottom:1rem}@media (min-width: 960px){.step-two-form-content .mat-mdc-form-field,.step-two-form-content .field-custom-wrapper{min-width:calc(50% - 18px);max-width:calc(50% - 18px)}.step-two-form-content .mat-mdc-form-field.full-width,.step-two-form-content .field-custom-wrapper.full-width{min-width:initial;max-width:initial}}.extension-panel-container mat-expansion-panel{box-shadow:unset!important;border:1px solid #e5e5e5;margin-bottom:36px}.extension-panel-container .mat-expansion-panel-body{padding:0 24px 24px!important}.mat-step-header[aria-labelledby=readonly-title]{pointer-events:none}.mat-step-header[aria-labelledby=readonly-title] .mat-step-label{color:var(--disabled-mat-step-header)}\n"],encapsulation:2}),r})();var le=m(96697),ne=m(53160),Ti=m(37084);const fi=o=>({"filter-searche-global-active":o});function Ai(o,r){if(1&o&&e.nrm(0,"vplus-loading-spinner",5),2&o){const i=e.XpG();e.Y8G("loadingFailed",i.dataLoadingFailed)}}function hi(o,r){if(1&o){const i=e.RV6();e.qex(0),e.j41(1,"a",10),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.selectProgrammation(n))}),e.nrm(2,"i",11),e.j41(3,"h2"),e.EFF(4),e.k0s(),e.nrm(5,"ion-ripple-effect"),e.k0s(),e.bVm()}if(2&o){const i=r.$implicit;e.R7$(2),e.ZvI("card-icon ",i.icone,""),e.R7$(2),e.JRh(i.nom)}}function Ii(o,r){if(1&o&&(e.j41(0,"div",6)(1,"div",7)(2,"h2"),e.pXf(3,0),e.k0s()(),e.j41(4,"div",8),e.DNE(
15,hi,6,4,"ng-container",9),e.k0s()()),2&o){const i=e.XpG();e.R7$(5),e.Y8G("ngForOf",i.programmationList)}}let Ni=(()=>{var o;class r{constructor(){this.store=(0,e.WQX)(J.il),this.activiteService=(0,e.WQX)(Ie.Z),this.router=(0,e.WQX)(X.Ix),this.appMetaTags=(0,e.WQX)(Ti.W),this.route=(0,e.WQX)(X.nX),this.localisationService=(0,e.WQX)(Ne.A),this.destroyRef=(0,e.WQX)(e.abz),this.dataLoaded=!1,this.dataLoadingFailed=!1,this.selectIsSearchHeaderVisible$=this.store.select(g.selectIsSearchHeaderVisible)}get currentLocalisation(){return this.localisationService.getCurrentLocalisation()}onContentClick(){this.store.dispatch(g.Actions.setIsSearchHeaderVisible({payload:!1}))}ionViewWillEnter(){this.appMetaTags.updateMetaTags("Activit\xE9s");const t=this.activiteService.getProgrammationEnligneList(),n=this.route.queryParams,s=this.activiteService.getActiviteReservationList();(0,Ze.z)([t,n,s]).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:([a,l,_])=>{this.programmationList=a,this.routeParams=l,this.setActiviteList(_),l.act?(this.dataLoaded=!1,this.selectActiviteBySlug(l.act)):this.dataLoaded=!0},error:()=>{this.dataLoadingFailed=!0}})}selectProgrammation(t){this.router.navigate(["activite","recherche"],{state:{programmation:t},queryParams:{programmation:x.A.sanitize(t.nom),...this.routeParams}})}setActiviteList(t){this.activiteList=t,this.activiteList.forEach(n=>{n.nom=n.localisations.find(s=>s.lclzTag===this.currentLocalisation).nom}),this.activiteList=this.activiteList.filter(n=>!!n.nom)}selectActivite(t){this.activiteService.getActiviteReservation(t.id).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:n=>{n.nom=t.localisations.find(s=>s.lclzTag===this.currentLocalisation).nom,this.store.dispatch(ne.xm({payload:n})),(0,y.t5)(n),this.router.navigate(["activite","reservation"],{queryParams:{act:x.A.sanitize(t.nom)}})},error:()=>{this.dataLoaded=!0}})}selectActiviteBySlug(t){const n=t&&this.activiteList.find(s=>x.A.sanitize(s.nom)===t);n?this.selectActivite(n):this.selectLibreActiviteBySlug(t)}selectLibreActiviteBySlug(t){this.activiteService.getActivitePcRouteBySlug(t).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:n=>{if(null==n||!n.id||"LIBRE"!==n.modeCode)return void(this.dataLoaded=!0);const s=(n.inscriptions||[]).filter(l=>l.typeCode===F.bO.Entree||l.typeCode===F.bO.Session);if(1===s.length)return void this.navigateToLibreInscription(n.id,s[0].typeCode,s[0].allowInvite);const a=x.A.sanitize(n.progNom||n.progNomFr||n.progNomEn||"");a?this.router.navigate(["activite","recherche"],{queryParams:{programmation:a}}):this.dataLoaded=!0},error:()=>{this.dataLoaded=!0}})}navigateToLibreInscription(t,n,s){this.store.dispatch(ne.t2({payload:!!s})),this.activiteService.getActivite(t).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:a=>{var l,_;return n===F.bO.Entree&&a.inscriptionEntree?(a.inscriptionEntree.inscNom=null===(l=a.inscriptionEntree.localisations.find(c=>c.lclzTag===this.currentLocalisation))||void 0===l?void 0:l.nom,this.store.dispatch(ne.xm({payload:a})),(0,y.t5)(a),void this.router.navigate(["activite","entree-selection"],{queryParams:{act:x.A.sanitize(a.inscriptionEntree.inscNom),allowInvite:s}})):n===F.bO.Session&&a.inscriptionSession?(a.inscriptionSession.inscNom=null===(_=a.inscriptionSession.localisations.find(c=>c.lclzTag===this.currentLocalisation))||void 0===_?void 0:_.nom,this.store.dispatch(ne.xm({payload:a})),(0,y.t5)(a),void this.router.navigate(["activite","session-selection"],{queryParams:{act:x.A.sanitize(a.inscriptionSession.inscNom),allowInvite:s}})):void(this.dataLoaded=!0)},error:()=>{this.dataLoaded=!0}})}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-activite-choix"]],decls:5,vars:11,consts:()=>{let i;return i="Activit\xE9s",[i,[1,"hide-desktop","mobile-header",3,"defaultHref","headerTitle","returnButtonType","menuId"],["id","activiteChoix",3,"click","ngClass"],[3,"loadingFailed",4,"ngIf"],["class","main-page-container standard-page-content",4,"ngIf"],[3,"loadingFailed"],[1,"main-page-container","standard-page-content"],[1,"newsfeed-header"],[1,"cards-container"],[4,"ngFor","ngForOf"],[1,"card","ion-activatable","ripple-parent",3,"click"],[2,"color","var(--primary-color)"]]},template:function(t,n){1&t&&(e.nrm(0,"vplus-mobile-header",1),e.j41(1,"ion-content",2),e.nI1(2,"async"),e.bIt("click",function(){return n.onContentClick()}),e.DNE(3,Ai,1,1,"vplus-loading-spinner",3)(4,Ii,6,1,"div",4),e.k0s()),2&t&&(e.Y8G("defaultHref","/activite")("headerTitle","")("returnButtonType","home-button")("menuId","activiteChoix"),e.R7$(),e.Y8G("ngClass",e.eq3(9,fi,e.bMT(2,7,n.selectIsSearchHeaderVisible$))),e.R7$(2),e.Y8G("ngIf",!n.dataLoaded),e.R7$(),e.Y8G("ngIf",n.dataLoaded))},dependencies:[k.YU,k.Sq,k.bT,be.f,se.W9,se.S7,Re.N,k.Jj],encapsulation:2}),r})();var Mi=m(97586),oe=m.n(Mi),Z=m(26450),Tt=m(73910),Pi=m(88821);const Oi=["stepper"],gi=["stepRenseigements"],vi=["stepParticipants"],bi=(o,r)=>r.get("id").value,Ri=(o,r)=>r.id,$i=()=>[];function Li(o,r){if(1&o&&e.nrm(0,"vplus-loading-spinner",54),2&o){const i=e.XpG();e.Y8G("loadingFailed",i.dataLoadingFailed)}}function yi(o,r){1&o&&e.nrm(0,"i",89)}function Di(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,19),e.k0s())}function Vi(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,20),e.k0s())}function xi(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,21),e.k0s())}function Fi(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,22),e.k0s())}function Xi(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,23),e.k0s())}function Gi(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",61)(1,"div")(2,"h2"),e.pXf(3,10),e.k0s()(),e.j41(4,"div",90)(5,"form",91)(6,"div")(7,"div",92)(8,"mat-form-field")(9,"mat-label"),e.pXf(10,11),e.k0s(),e.nrm(11,"input",93),e.j41(12,"mat-error"),e.pXf(13,12),e.k0s()(),e.j41(14,"mat-form-field")(15,"mat-label"),e.pXf(16,13),e.k0s(),e.nrm(17,"input",94),e.j41(18,"mat-error"),e.pXf(19,14),e.k0s()()(),e.j41(20,"div",92)(21,"mat-form-field")(22,"mat-label"),e.pXf(23,15),e.k0s(),e.nrm(24,"input",95),e.DNE(25,Di,2,0,"mat-error")(26,Vi,2,0,"mat-error")(27,xi,2,0,"mat-error"),e.k0s(),e.j41(28,"mat-form-field")(29,"mat-label"),e.pXf(30,16),e.k0s(),e.nrm(31,"input",96),e.DNE(32,Fi,2,0,"mat-error")(33,Xi,2,0,"mat-error"),e.k0s()()()()(),e.j41(34,"div",73)(35,"button",74),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.back())}),e.pXf(36,17),e.k0s(),e.j41(37,"button",81),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextToPlages())}),e.pXf(38,18),e.k0s()()()}if(2&o){e.XpG();const i=e.sdS(7),t=e.XpG();e.Y8G("stepControl",t.citoyenSansCompteForm)("formGroup",t.citoyenSansCompteForm)("aria-labelledby",i.selectedIndex<t.EnumStepper.Identification?"readonly-title":null),e.R7$(5),e.Y8G("formGroup",t.citoyenSansCompteForm),e.R7$(20),e.vxM(25,null!=t.citoyenSansCompteForm.controls.courriel.errors&&t.citoyenSansCompteForm.controls.courriel.errors.required?25:-1),e.R7$(),e.vxM(26,t.citoyenSansCompteForm.controls.courriel.hasError("invalidEmail")?26:-1),e.R7$(),e.vxM(27,t.citoyenSansCompteForm.controls.courriel.hasError("courrielUtilise")?27:-1),e.R7$(4),e.Y8G("imask",t.appConfig.appConfig.telMaskObjet)("unmask",!0),e.R7$(),e.vxM(32,null!=t.citoyenSansCompteForm.controls.telephone.errors&&t.citoyenSansCompteForm.controls.telephone.errors.required?32:-1),e.R7$(),e.vxM(33,null!=t.citoyenSansCompteForm.controls.telephone.errors&&t.citoyenSansCompteForm.controls.telephone.errors.pattern?33:-1)}}function ki(o,r){1&o&&(e.j41(0,"th",97),e.pXf(1,24),e.k0s())}function ji(o,r){if(1&o&&(e.j41(0,"p",99)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"span"),e.pXf(4,25),e.k0s(),e.EFF(5),e.k0s()),2&o){const i=e.XpG(2).$implicit;e.R7$(2),e.SpI("",i.capacite-i.nbrParticipants<0?0:i.capacite-i.nbrParticipants,"\xa0"),e.R7$(3),e.SpI("\xa0/\xa0",i.capacite," ")}}function Ui(o,r){if(1&o&&(e.j41(0,"p",99),e.EFF(1),e.nI1(2,"vplusMoment"),e.nI1(3,"vplusCapitalizeFirstLetter"),e.k0s(),e.j41(4,"p",99),e.EFF(5),e.k0s(),e.DNE(6,ji,6,2,"p",99)),2&o){const i=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.JRh(e.bMT(3,8,e.ii3(2,3,i.dateHeureDebut,!1,"dddd, DD/MM/yyyy",null))),e.R7$(4),e.JRh(i.plageHoraire),e.R7$(),e.vxM(6,t.hideCapaciteColumn||i.capaciteIsNaN?-1:6)}}function Qi(o,r){if(1&o&&(e.EFF(0),e.nI1(1,"vplusMoment")),2&o){const i=e.XpG().$implicit;e.SpI(" ",e.ii3(1,1,i.dateHeureDebut,!1,"dddd, DD/MM/yyyy",null)," ")}}function zi(o,r){if(1&o&&(e.j41(0,"td",98),e.DNE(1,Ui,7,10)(2,Qi,2,6),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,i.hidePlageHoraireCol?1:2)}}function wi(o,r){if(1&o&&(e.j41(0,"th",100),e.pXf(1,26),e.k0s()),2&o){const i=e.XpG(2);e.Y8G("hidden",i.hidePlageHoraireCol)}}function Hi(o,r){if(1&o&&(e.j41(0,"td",101),e.EFF(1),e.k0s()),2&o){const i=r.$implicit,t=e.XpG(2);e.Y8G("hidden",t.hidePlageHoraireCol),e.R7$(),e.SpI(" ",i.plageHoraire,"")}}function Bi(o,r){if(1&o&&(e.j41(0,"th",100),e.pXf(1,27),e.k0s()),2&o){const i=e.XpG(2);e.Y8G("hidden",i.hidePlageHoraireCol||i.hideCapaciteColumn)}}function qi(o,r){if(1&o&&(e.EFF(0),e.j41(1,"span"),e.pXf(2,28),e.k0s(),e.EFF(3)),2&o){const i=e.XpG().$implicit;e.SpI(" ",i.capacite-i.nbrParticipants<0?0:i.capacite-i.nbrParticipants,"\xa0"),e.R7$(3),e.SpI("\xa0/\xa0",i.capacite," ")}}function Wi(o,r){if(1&o&&(e.j41(0,"td",101),e.DNE(1,qi,4,2),e.k0s()),2&o){const i=r.$implicit,t=e.XpG(2);e.Y8G("hidden",t.hidePlageHoraireCol||t.hideCapaciteColumn),e.R7$(),e.vxM(1,i.capaciteIsNaN?-1:1)}}function Yi(o,r){1&o&&e.nrm(0,"th",97)}function Ji(o,r){if(1&o){const i=e.RV6();e.j41(0,"td",98)(1,"button",102),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.select(n))}),e.j41(2,"span"),e.pXf(3,29),e.k0s()()()}if(2&o){const i=r.$implicit;e.R7$(),e.AVh("readonly-block",null!==i.capacite&&i.capacite-i.nbrParticipants<=0),e.Y8G("disabled",null!==i.capacite&&i.capacite-i.nbrParticipants<=0)}}function Zi(o,r){1&o&&e.nrm(0,"tr",103)}function Ki(o,r){1&o&&e.nrm(0,"tr",104)}function en(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"ordinal"),e.j41(3,"span"),e.pXf(4,32),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,33),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2).$implicit,n=e.XpG(2);e.R7$(),e.SpI("",e.i5U(2,2,i.ordre,n.isFr),"\xa0"),e.R7$(4),e.SpI("",e.i5U(6,5,t.get("tarif").value-i.montantRabais,n.localisation)," ")}}function tn(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"ordinal"),e.j41(3,"span"),e.pXf(4,34),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,35),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2).$implicit,n=e.XpG(2);e.R7$(),e.SpI("",e.i5U(2,2,i.ordre,n.isFr),"\xa0"),e.R7$(4),e.JRh(e.i5U(6,5,t.get("tarif").value-i.montantRabais,n.localisation))}}function nn(o,r){if(1&o&&e.DNE(0,en,9,8,"p")(1,tn,9,8,"p"),2&o){const i=e.XpG(),t=i.$index,n=i.$count;e.vxM(0,t!==n-1?0:-1),e.R7$(),e.vxM(1,t===n-1?1:-1)}}function on(o,r){1&o&&e.DNE(0,nn,2,2),2&o&&e.vxM(0,0!==r.$index?0:-1)}function sn(o,r){if(1&o&&(e.j41(0,"div",108)(1,"h3"),e.pXf(2,30),e.k0s(),e.Z7z(3,on,1,1,null,null,Ri),e.j41(5,"p"),e.pXf(6,31),e.k0s()()),2&o){let i;const t=e.XpG().$implicit;e.R7$(3),e.Dyx(null!==(i=t.get("paliersRabaisFamilialOptions").value)&&void 0!==i?i:e.lJ4(0,$i))}}function an(o,r){if(1&o&&(e.j41(0,"mat-error",117)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QteAdmTropFaible," ",i.get("min").value," ",1===i.get("min").value?t.EnumLabelsErreurQte.QteUnAchat:t.EnumLabelsErreurQte.QteAchat,"")}}function rn(o,r){if(1&o&&(e.j41(0,"mat-error",117)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QteAdmTropElevee," ",i.get("max").value," ",1===i.get("max").value?t.EnumLabelsErreurQte.QteUnAchat:t.EnumLabelsErreurQte.QteAchat,"")}}function ln(o,r){if(1&o&&(e.j41(0,"mat-error",117)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.SjE("",t.EnumLabelsErreurQte.QteAdmTropFaible," ",i.get("min").value," ",t.EnumLabelsErreurQte.QteMax," ",i.get("max").value," ",t.EnumLabelsErreurQte.QteAchat,"")}}function _n(o,r){if(1&o&&(e.j41(0,"mat-error",117)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QtesEgales," ",i.get("min").value," ",1===i.get("min").value?t.EnumLabelsErreurQte.QteUnAchat:t.EnumLabelsErreurQte.QteAchat,"")}}function cn(o,r){if(1&o&&(e.j41(0,"div",116),e.DNE(1,an,3,3,"mat-error",117)(2,rn,3,3,"mat-error",117)(3,ln,3,5,"mat-error",117)(4,_n,3,3,"mat-error",117),e.k0s()),2&o){const i=e.XpG().$implicit,t=e.XpG(2);e.R7$(),e.vxM(1,i.hasError(t.EnumTypeErreurQte.QteTropFaible)&&i.touched?1:-1),e.R7$(),e.vxM(2,i.hasError(t.EnumTypeErreurQte.QteTropElevee)&&i.touched?2:-1),e.R7$(),e.vxM(3,i.hasError(t.EnumTypeErreurQte.QteHorsLimites)&&i.touched?3:-1),e.R7$(),e.vxM(4,i.hasError(t.EnumTypeErreurQte.QtesEgales)&&i.touched?4:-1)}}function dn(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",77)(1,"div",105)(2,"div",106)(3,"div")(4,"span",107),e.EFF(5),e.k0s(),e.DNE(6,sn,7,1,"div",108),e.k0s(),e.j41(7,"div",109)(8,"button",110),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.decreaseQte(n))}),e.nrm(9,"i",111),e.k0s(),e.j41(10,"input",112),e.bIt("blur",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.onBlurQte(n))}),e.k0s(),e.j41(11,"button",113),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.increaseQte(n))}),e.nrm(12,"i",114),e.k0s()(),e.j41(13,"span",115),e.EFF(14),e.k0s()(),e.DNE(15,cn,5,4,"div",116),e.k0s()()}if(2&o){const i=r.$implicit,t=r.$index,n=e.XpG(2);e.Y8G("formGroupName",t),e.R7$(5),e.JRh(i.get("trfOptNom").value?i.get("trfOptNom").value:i.get("ftbNom").value),e.R7$(),e.vxM(6,!i.get("isRabaisFamilial").value||n.isInvite||n.inscriptionEntree.unrequiredIdentification?-1:6),e.R7$(2),e.Y8G("disabled","0"===i.get("qte").value),e.R7$(2),e.Y8G("imask",n.maskQte),e.R7$(4),e.SpI(" ",i.get("tarifFormatted").value,""),e.R7$(),e.vxM(15,(i.hasError(n.EnumTypeErreurQte.QteHorsLimites)||i.hasError(n.EnumTypeErreurQte.QteTropElevee)||i.hasError(n.EnumTypeErreurQte.QteTropFaible)||i.hasError(n.EnumTypeErreurQte.QtesEgales))&&i.touched?15:-1)}}function pn(o,r){1&o&&(e.j41(0,"mat-error",78),e.pXf(1,36),e.k0s())}function En(o,r){if(1&o&&(e.j41(0,"mat-error",78)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(2),e.E5c("",i.EnumLabelsErreurQte.QteTropFaible," ",i.activite.inscriptionEntree.min," ",1===i.activite.inscriptionEntree.min?i.EnumLabelsErreurQte.QteUnAchat:i.EnumLabelsErreurQte.QteAchat,"")}}function un(o,r){if(1&o&&(e.j41(0,"mat-error",78)(1,"span")(2,"span"),e.EFF(3),e.k0s()()()),2&o){const i=e.XpG(3);e.R7$(3),e.E5c("",i.EnumLabelsErreurQte.QteTropElevee," ",i.activite.inscriptionEntree.max," ",1===i.activite.inscriptionEntree.max?i.EnumLabelsErreurQte.QteUnAchat:i.EnumLabelsErreurQte.QteAchat,"")}}function Cn(o,r){if(1&o&&(e.j41(0,"mat-error",78)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(2),e.SjE("",i.EnumLabelsErreurQte.QteTropFaible," ",i.activite.inscriptionEntree.min," ",i.EnumLabelsErreurQte.QteMax," ",i.activite.inscriptionEntree.max," ",i.EnumLabelsErreurQte.QteAchat,"")}}function Sn(o,r){if(1&o&&(e.j41(0,"mat-error",78)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(3);e.R7$(2),e.E5c("",i.EnumLabelsErreurQte.QtesEgales," ",i.activite.inscriptionEntree.min," ",1===i.activite.inscriptionEntree.min?i.EnumLabelsErreurQte.QteUnAchat:i.EnumLabelsErreurQte.QteAchat,"")}}function mn(o,r){if(1&o&&(e.j41(0,"div",79),e.DNE(1,En,3,3,"mat-error",78)(2,un,4,3,"mat-error",78)(3,Cn,3,5,"mat-error",78)(4,Sn,3,3,"mat-error",78),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteTropFaible)&&i.tarificationFA.touched?1:-1),e.R7$(),e.vxM(2,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteTropElevee)&&i.tarificationFA.touched?2:-1),e.R7$(),e.vxM(3,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteHorsLimites)&&i.tarificationFA.touched?3:-1),e.R7$(),e.vxM(4,i.tarificationFA.hasError(i.EnumTypeErreurQte.QtesEgales)&&i.tarificationFA.touched?4:-1)}}function Tn(o,r){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const i=e.XpG(3);e.R7$(),e.JRh(i.labels.uneEntree)}}function fn(o,r){if(1&o&&(e.j41(0,"span"),e.pXf(1,37),e.k0s(),e.EFF(2),e.j41(3,"span"),e.pXf(4,38),e.k0s()),2&o){const i=e.XpG(3);e.R7$(2),e.SpI("\xa0",i.qteDispo,"\xa0")}}function An(o,r){if(1&o&&(e.j41(0,"mat-error",80),e.DNE(1,Tn,2,1,"span")(2,fn,5,1),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,1===i.qteDispo?1:2)}}function hn(o,r){if(1&o){const i=e.RV6();
1e.j41(0,"mat-step",82,1)(2,"vplus-activite-selection-participants",118),e.bIt("selectedFamId",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.handleSelectedFamId(n))})("selectedPerId",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.handleSelectedPerId(n))}),e.k0s(),e.j41(3,"div",73)(4,"button",119),e.pXf(5,39),e.k0s(),e.j41(6,"button",81),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextFromParticipants())}),e.j41(7,"span"),e.pXf(8,40),e.k0s()()()()}if(2&o){e.XpG();const i=e.sdS(7),t=e.XpG();e.Y8G("stepControl",t.formStepParticipants)("formGroup",t.formStepParticipants)("aria-labelledby",i.selectedIndex<t.EnumStepper.Participants?"readonly-title":null)("completed",i.selectedIndex>=t.EnumStepper.Participants),e.R7$(2),e.Y8G("tarificationFA",t.tarificationFA)("participantFA",t.participantFA)("user",t.user)("canOrderForCurrentUser",t.canOrderForCurrentUser)("famillesCurrentUser",t.famillesCurrentUser)("familleMembreHashList",t.familleMembreHashList)("isInvite",t.isInvite)("ageTrfs",t.ageTrfs)("contexte",t.EnumTypeInscriptionCode.Entree)("isAllowedInscWithRestr",t.inscriptionEntree.isAllowedInscWithRestr)}}function In(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,43),e.k0s())}function Nn(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",83,2),e.nrm(2,"vplus-activite-citoyen-renseignements-additionnels",120),e.DNE(3,In,2,0,"mat-error"),e.j41(4,"div",121)(5,"button",119),e.pXf(6,41),e.k0s(),e.j41(7,"button",122),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextFromRenseigementAdditionnels())}),e.pXf(8,42),e.k0s()()()}if(2&o){e.XpG();const i=e.sdS(7),t=e.XpG();e.Y8G("completed",(null==t.formStepParticipants?null:t.formStepParticipants.valid)&&i.selectedIndex>=2)("aria-labelledby",i.selectedIndex<t.EnumStepper.Renseignements?"readonly-title":null),e.R7$(2),e.Y8G("participantsFA",t.participantFA)("questSupp",null==t.activite?null:t.activite.questSupp)("form",t.formStepParticipants),e.R7$(),e.vxM(3,t.isRenseignementsAddTouchedAndInvalid?3:-1)}}function Mn(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",84,3)(2,"div",123)(3,"h2",124),e.pXf(4,44),e.k0s()(),e.nrm(5,"vplus-activite-articles-supplementaires-selecteur",125),e.j41(6,"div",73)(7,"button",119),e.pXf(8,45),e.k0s(),e.j41(9,"button",81),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextFromArticles())}),e.j41(10,"span"),e.pXf(11,46),e.k0s()()()()}if(2&o){e.XpG();const i=e.sdS(7),t=e.XpG();e.Y8G("completed",i.selectedIndex>=t.EnumStepper.Articles)("aria-labelledby",i.selectedIndex<t.EnumStepper.Articles?"readonly-title":null),e.R7$(5),e.Y8G("articlesFA",t.articlesFA)}}function Pn(o,r){1&o&&(e.j41(0,"mat-error",80)(1,"span"),e.pXf(2,47),e.k0s()())}function On(o,r){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const i=e.XpG(3);e.R7$(),e.JRh(i.labels.unEntreeAchat)}}function gn(o,r){if(1&o&&(e.j41(0,"span"),e.pXf(1,48),e.k0s(),e.EFF(2),e.j41(3,"span"),e.pXf(4,49),e.k0s()),2&o){const i=e.XpG(3);e.R7$(2),e.SpI("\xa0",i.qteDispo,"\xa0")}}function vn(o,r){if(1&o&&(e.j41(0,"mat-error",80),e.DNE(1,On,2,1,"span")(2,gn,5,1),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.vxM(1,1===i.qteDispo?1:2)}}function bn(o,r){if(1&o){const i=e.RV6();e.j41(0,"p",126),e.pXf(1,50),e.k0s(),e.j41(2,"a",127),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.displayDescription(n.inscriptionEntree.politiqueRemboursement))}),e.pXf(3,51),e.k0s(),e.EFF(4,". ")}}function Rn(o,r){if(1&o){const i=e.RV6();e.j41(0,"div")(1,"div")(2,"vplus-req-toolbar",55),e.bIt("back",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.backToActivite())}),e.k0s(),e.j41(3,"div",56)(4,"div",57)(5,"div",58)(6,"mat-horizontal-stepper",59,0),e.bIt("selectionChange",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.onStepChange(n))}),e.DNE(8,yi,1,0,"ng-template",60)(9,Gi,39,11,"mat-step",61),e.j41(10,"mat-step",62)(11,"div")(12,"h2"),e.pXf(13,4),e.k0s()(),e.j41(14,"div",63)(15,"div",64)(16,"table",65),e.qex(17,66),e.DNE(18,ki,2,0,"th",67)(19,zi,3,1,"td",68),e.bVm(),e.qex(20,66),e.DNE(21,wi,2,1,"th",69)(22,Hi,2,2,"td",70),e.bVm(),e.qex(23,66),e.DNE(24,Bi,2,1,"th",69)(25,Wi,2,2,"td",70),e.bVm(),e.qex(26,66),e.DNE(27,Yi,1,0,"th",67)(28,Ji,4,3,"td",68),e.bVm(),e.DNE(29,Zi,1,0,"tr",71)(30,Ki,1,0,"tr",72),e.k0s()(),e.j41(31,"div",73)(32,"button",74),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.isInvite?n.onStepperBack():n.back())}),e.pXf(33,5),e.k0s()()()(),e.j41(34,"mat-step",75)(35,"div")(36,"h2"),e.pXf(37,6),e.k0s()(),e.j41(38,"div",76),e.Z7z(39,dn,16,7,"div",77,bi),e.k0s(),e.DNE(41,pn,2,0,"mat-error",78)(42,mn,5,4,"div",79)(43,An,3,1,"mat-error",80),e.j41(44,"div",73)(45,"button",74),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.onStepperBack())}),e.pXf(46,7),e.k0s(),e.j41(47,"button",81),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.nextFromTarifications())}),e.pXf(48,8),e.k0s()()(),e.DNE(49,hn,9,14,"mat-step",82)(50,Nn,9,6,"mat-step",83)(51,Mn,12,3,"mat-step",84),e.j41(52,"mat-step",85)(53,"vplus-square-card-payment",86),e.bIt("onLaunchedPayment",function(){e.eBV(i);const n=e.XpG();
1return e.Njj(n.updateOrderLaunched(!0))})("onPreparedPayment",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.order(n))})("onErrorPayment",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.updateOrderLaunched(!1))})("onPaymentLater",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.onPaymentLater(n))})("onCardReady",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.onCardReady())})("onSquareDeconnecte",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.squareDeconnecte=n)}),e.k0s(),e.DNE(54,Pn,3,0,"mat-error",80)(55,vn,3,1,"mat-error",80)(56,bn,5,0),e.j41(57,"div",73)(58,"button",74),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.onStepperBack())}),e.pXf(59,9),e.k0s(),e.j41(60,"button",87),e.nrm(61,"vplus-button-icon",88),e.j41(62,"span"),e.EFF(63),e.k0s()()()()()()()()()()}if(2&o){const i=e.sdS(7),t=e.XpG();e.R7$(2),e.Y8G("title",t.inscriptionEntree.inscNom),e.R7$(7),e.vxM(9,t.isInvite?9:-1),e.R7$(),e.Y8G("aria-labelledby",i.selectedIndex<t.EnumStepper.Choix?"readonly-title":null),e.R7$(6),e.Y8G("dataSource",t.dataSourceSuggestion),e.R7$(),e.Y8G("matColumnDef",t.displayedColumns[0]),e.R7$(3),e.Y8G("matColumnDef",t.displayedColumns[1]),e.R7$(3),e.Y8G("matColumnDef",t.displayedColumns[2]),e.R7$(3),e.Y8G("matColumnDef",t.displayedColumns[3]),e.R7$(3),e.Y8G("matHeaderRowDef",t.displayedColumns),e.R7$(),e.Y8G("matRowDefColumns",t.displayedColumns),e.R7$(4),e.Y8G("stepControl",t.formStepTarifications)("formGroup",t.formStepTarifications)("aria-labelledby",i.selectedIndex<t.EnumStepper.Selection?"readonly-title":null),e.R7$(5),e.Dyx(t.tarificationFA.controls),e.R7$(2),e.vxM(41,t.tarifications.hasError("required")&&t.tarifications.touched?41:-1),e.R7$(),e.vxM(42,(t.tarificationFA.hasError(t.EnumTypeErreurQte.QteTropFaible)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QteTropElevee)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QteHorsLimites)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QtesEgales))&&t.tarificationFA.touched?42:-1),e.R7$(),e.vxM(43,t.tarifications.hasError("limiteDepasse")&&t.tarifications.touched?43:-1),e.R7$(6),e.vxM(49,t.inscriptionEntree.unrequiredIdentification?-1:49),e.R7$(),e.vxM(50,t.activite.isConfigSuppQuest&&t.hasAtLeastOneTrue&&!t.inscriptionEntree.unrequiredIdentification?50:-1),e.R7$(),e.vxM(51,t.hasArticlesSupp?51:-1),e.R7$(),e.Y8G("completed",!1),e.R7$(),e.Y8G("items",t.itemsPayment)("unrequiredTaxes",t.inscriptionEntree.unrequiredTaxes)("isRequiredFraisService",t.inscriptionEntree.isRequiredFraisService)("optionsVersement",null==t.inscriptionEntree?null:t.inscriptionEntree.optionsVersement)("activityNom",t.activityNom)("isConfigVersement",null==t.inscriptionEntree?null:t.inscriptionEntree.isConfigVersement)("orderLaunched",t.orderLaunched)("user",t.citoyenSansCompteForm.value)("addToFraisService",t.addToFraisService)("eventDate",t.eventDate)("installationsBySite",t.installationsBySite)("isActivityAndShouldModifyFS",t.isActivityAndShouldModifyFS)("isAllowedInscWithRestr",t.isAllowedInscWithRestr),e.R7$(),e.vxM(54,0===t.limiteDepasseCode?54:-1),e.R7$(),e.vxM(55,1===t.limiteDepasseCode?55:-1),e.R7$(),e.vxM(56,t.inscriptionEntree.politiqueRemboursement.id?56:-1),e.R7$(4),e.Y8G("disabled",t.squareDeconnecte.deconnecte?t.squareDeconnecte.sectionVide:!t.isCardReady&&t.requiredCheckout),e.R7$(),e.Y8G("isSubmitting",t.orderLaunched),e.R7$(2),e.JRh(t.requiredCheckout&&!t.dateVersementSupp?t.labels.payerMntn:t.labels.passerCommande)}}let $n=(()=>{var o;class r{constructor(){this.store=(0,e.WQX)(J.il),this.activiteService=(0,e.WQX)(Ie.Z),this.router=(0,e.WQX)(X.Ix),this.localisationService=(0,e.WQX)(Ne.A),this.activatedRoute=(0,e.WQX)(X.nX),this.actions$=(0,e.WQX)(Q.En),this.location=(0,e.WQX)(k.hb),this.formBuilder=(0,e.WQX)(S.ok),this.appConfig=(0,e.WQX)(We.o),this.asyncCourrielValidators=(0,e.WQX)(ct.H),this.utilisateurService=(0,e.WQX)(Ke.$),this.destroyRef=(0,e.WQX)(e.abz),this.dialog=(0,e.WQX)(dt.bZ),this.localisation=this.localisationService.getCurrentLocalisation(),this.currencyPipe=new E.aJo,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.EnumTypeInscriptionCode=F.bO,this.EnumLabelsErreurQte=v.oO,this.isRenseignementsAddTouchedAndInvalid=!1,this.famillesCurrentUser=[],this.familleMembreHashList={},this.familles=[],this.addToFraisService=0,this.idempotencyKey=(0,E.SiN)(),this.isCardReady=!1,this.EnumStepper={Identification:0,Choix:0,Selection:0,Participants:0,Renseignements:0,Articles:0,Resume:0},this.itemsPayment=[],this.maskQte={mask:"000000"},this.displayedColumns=["dateHeureDebut","entreesDispo","plageHoraire","Reserver"],this.hidePlageHoraireCol=!1,this.hideCapaciteColumn=!1,this.installationsBySite=[],this.accesIds={},this.ageTrfs=new Map,this.isActivityAndShouldModifyFS=!1,this.isAllowedInscWithRestr=!1,this.hasArticlesSupp=!1,this.EnumTypeErreurQte=v.Hy,this.labels={uneEntree:"Il y a une entr\xE9e disponible, veuillez ajuster votre s\xE9lection",unEntreeAchat:"Il n'y a plus qu'une entr\xE9e disponible, veuillez ajuster votre s\xE9lection",payerMntn:"Payer maintenant",passerCommande:"Passer la commande"},this.participantFamilletListInscrit={},this.squareDeconnecte={deconnecte:!1,sectionVide:!1},this.selectIsSearchHeaderVisible$=this.store.select(g.selectIsSearchHeaderVisible)}windowResized(){this.hidePlageHoraireCol=window.innerWidth<600}ngOnInit(){var t,n;this.isFr=this.localisationService.getCurrentLocalisation()===v.fi.FR,this.isInvite="1"===(null===(t=this.router.routerState.snapshot.root.queryParams)||void 0===t?void 0:t.invite),this.defaultLocalisation=this.appConfig.appConfig.localisationDefaut,this.stepOneAndInvite=this.isInvite;const s=(0,E.SiN)();this.citoyenSansCompteForm=this.formBuilder.group({perId:new S.MJ(s),prenom:new S.MJ(null,[S.k0.required,(0,E.zl_)()]),nom:new S.MJ(null,[S.k0.required,(0,E.zl_)()]),courriel:new S.MJ(null,[(0,E.Bjz)()],this.asyncCourrielValidators.validateCourriel()),telephone:new S.MJ(null,[S.k0.required,S.k0.pattern(this.appConfig.appConfig.telPattern)])}),null===(n=this.citoyenSansCompteForm.get("courriel"))||void 0===n||n.valueChanges.pipe((0,I.pQ)(this.destroyRef),(0,Ye.F)(),(0,j.n)(a=>
1this.utilisateurService.getInvite(a))).subscribe(({perId:a})=>{var l;null===(l=this.citoyenSansCompteForm.get("perId"))||void 0===l||l.patchValue(null!=a?a:s)}),(0,Ze.z)([this.store.select(g.selectCurrentUser),this.store.select(ae.FB)]).pipe((0,I.pQ)(this.destroyRef),(0,j.n)(([a,l])=>{var _,c,d;this.user=a;const p=JSON.parse(null!==(_=localStorage.getItem("activite"))&&void 0!==_?_:"{}");return this.activite=!l&&Object.keys(p).length>0?p:l,this.activityNom=(null===(c=this.activite.localisations)||void 0===c||null===(c=c.find(u=>u.lclzTag===(this.isFr?v.fi.FR:v.fi.EN)))||void 0===c?void 0:c.nom)||(null===(d=this.activite.localisations)||void 0===d||null===(d=d.find(u=>u.nom))||void 0===d?void 0:d.nom)||"",["D321B0CA-530D-4595-AA8A-511329E49C82","80A5DF09-C016-497D-8602-1D72C106D6A1"].includes(this.activite.id)&&(this.addToFraisService=5,this.isActivityAndShouldModifyFS=!0),this.hasAtLeastOneTrue=(0,E.Yl9)(this.activite.questSupp),this.hasArticlesSupp=this.activite.isConfigArticlesSupp&&this.activite.articlesSupp.length>0,this.activiteService.getPlageListActiviteEntree(this.activite.id)})).subscribe(a=>{a.forEach(_=>{_.plageHoraire=oe()(_.dateHeureDebut).format("LT")+" "+"\xE0"+" "+oe()(_.dateHeureFin).format("LT"),_.capaciteIsNaN=isNaN(_.capacite)||null===_.capacite}),this.hideCapaciteColumn=a.every(_=>_.capaciteIsNaN),this.dataSourceSuggestion=new Z.I6(a),this.inscriptionEntree=this.activite.inscriptionEntree,this.inscriptionEntree.tarifications=this.inscriptionEntree.tarifications.filter(_=>_.trfOptTypId!==F.G5.Familial&&!_.invisibleEnLigne),this.inscriptionEntree.tarifications.forEach(_=>{_.tarifFormatted=this.currencyPipe.transform(_.tarif,this.localisation),_.fteId=(0,E.SiN)()}),this.activatedRoute.snapshot.queryParams.act||this.location.replaceState(null,null,`/activite/entree-selection?act=${x.A.sanitize(this.inscriptionEntree.inscNom)}`,""),this.user?this.utilisateurService.getFamilleByPerId(this.user.perId).pipe((0,I.pQ)(this.destroyRef)).subscribe(_=>{var c;this.famillesCurrentUser=_.filter(d=>d.membres.filter(p=>p.perId!==this.user.perId).length>0),this.famillesCurrentUser.sort((d,p)=>d.nom.trim().localeCompare(p.nom.trim())),this.famillesCurrentUser.forEach(d=>{this.familleMembreHashList[d.id]=d.membres.filter(p=>p.perId!==this.user.perId)}),this.famillesCurrentUser.length>0&&(this.famIdSelected=this.famillesCurrentUser[0].id),this.initForm(),this.isInvite||null===(c=this.stepper)||void 0===c||c.reset(),this.dataLoaded=!0}):(this.initForm(),this.dataLoaded=!0);let l=0;this.EnumStepper.Identification=this.isInvite?l++:-1,this.EnumStepper.Choix=l++,this.EnumStepper.Selection=l++,this.EnumStepper.Participants=this.inscriptionEntree.unrequiredIdentification?-1:l++,this.EnumStepper.Renseignements=this.hasAtLeastOneTrue&&this.activite.isConfigSuppQuest&&!this.inscriptionEntree.unrequiredIdentification?l++:-1,this.EnumStepper.Articles=this.hasArticlesSupp?l++:-1,this.EnumStepper.Resume=l++}),this.store.select(g.selectCurrentUser).pipe((0,I.pQ)(this.destroyRef)).subscribe(a=>{this.currentUser=a}),this.actions$.pipe((0,Q.gp)(ye.En.addChildFamilySuccess),(0,I.pQ)(this.destroyRef),(0,j.n)(()=>this.utilisateurService.getFamilleByPerId(this.currentUser.perId))).subscribe(a=>{this.familles=a;const l=a.filter(_=>_.membres.some(c=>c.perId!==this.user.perId)).sort((_,c)=>_.nom.trim().localeCompare(c.nom.trim()));this.famillesCurrentUser.push(...l),this.famillesCurrentUser.sort((_,c)=>_.nom.trim().localeCompare(c.nom.trim())),this.famillesCurrentUser.forEach(_=>{this.familleMembreHashList[_.id]=_.membres.filter(c=>c.perId!==this.user.perId)})}),this.hidePlageHoraireCol=window.innerWidth<600}initForm(){var t,n;this.formStepTarifications=this.formBuilder.group({tarifications:new S.Yp([],[(0,y.YK)(),this.qteValidator(),(0,E.UW_)(null===(t=this.activite.inscriptionEntree)||void 0===t?void 0:t.min,null===(n=this.activite.inscriptionEntree)||void 0===n?void 0:n.max)])}),this.tarificationFA=this.formStepTarifications.get("tarifications"),this.tarificationFA.setDefaultControlBuilder(()=>(0,E.nqI)(this.formBuilder)),this.inscriptionEntree.tarifications.length>0&&this.inscriptionEntree.tarifications.forEach(s=>{var a,l;s.acces=(0,E.NzR)(s.acces,this.localisationService.getCurrentLocalisation(),this.defaultLocalisation),this.accesIds[s.id]=s.acces.map(_=>_.id),this.ageTrfs.set(s.id,[null!==(a=s.ageMin)&&void 0!==a?a:null,null!==(l=s.ageMax)&&void 0!==l?l:null,null==s?void 0:s.dateMinRef,null==s?void 0:s.dateMaxRef])}),this.tarificationFA.patchValue(this.inscriptionEntree.tarifications),this.formStepParticipants=this.formBuilder.group({participants:new S.Yp([])}),this.participantFA=this.formStepParticipants.get("participants"),this.participantFA.setDefaultControlBuilder(this.createMembreEntreeFormControl.bind(this)),this.formStepParticipants.statusChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(s=>{"VALID"===s&&(this.isRenseignementsAddTouchedAndInvalid=!1)}),this.formStepArticles=this.formBuilder.group({articlesSupp:new S.Yp([])}),this.articlesFA=this.formStepArticles.get("articlesSupp"),this.articlesFA.setDefaultControlBuilder(()=>(0,E.eqW)(this.formBuilder)),this.articlesFA.patchValue(this.activite.articlesSupp)}onContentClick(){this.store.dispatch(g.Actions.setIsSearchHeaderVisible({payload:!1}))}
1nextToPlages(){this.citoyenSansCompteForm.invalid&&this.stepOneAndInvite?this.citoyenSansCompteForm.markAllAsTouched():(this.stepOneAndInvite=!1,this.user=this.citoyenSansCompteForm.value,this.stepper.next())}select(t){this.evenement=t,this.activiteService.checkDisponibiliteEntree(this.evenement.eveActId,this.user.perId,this.user.courriel).pipe((0,I.pQ)(this.destroyRef)).subscribe(s=>this.canOrderForCurrentUser=s.canOrder);const n=(0,E.cA3)(this.evenement.dateHeureDebut,this.evenement.dateHeureFin,this.isFr,!0);this.eventDate=`${n.dateComplete} ${n.temps}`.trim(),this.installationsBySite=(0,E.LO9)([{siteNom:this.evenement.siteNom,installationNom:this.evenement.installationNom,adresse:this.evenement.adresse}]),this.stepper.next()}qteValidator(){return t=>{var n,s,a,l,_;let c=0;return(null==t?void 0:t.value.length)>=1&&t.value.forEach(d=>{var p,u;0!==(null==d||null===(p=d.trfOptOptions)||void 0===p?void 0:p.length)?null==d||null===(u=d.trfOptOptions)||void 0===u||u.forEach(C=>{c+=parseInt(C.qte)*d.qte}):c+=parseInt(d.qte)}),this.qteDispo=(null===(n=this.evenement)||void 0===n?void 0:n.capacite)-(null===(s=this.evenement)||void 0===s?void 0:s.nbrParticipants),this.sommeQte=c,c+(null===(a=this.evenement)||void 0===a?void 0:a.nbrParticipants)>(null===(l=this.evenement)||void 0===l?void 0:l.capacite)&&null!==(null===(_=this.evenement)||void 0===_?void 0:_.capacite)?(t.markAllAsTouched(),this.limiteDepasseCode=null,{limiteDepasse:!0}):null}}capaciteIsNan(t){return isNaN(t)||null===t}get tarifications(){return this.formStepTarifications.get("tarifications")}increaseQte(t){(0,E.fKT)(t)}decreaseQte(t){(0,E.XOW)(t)}onBlurQte(t){(0,E.T6x)(t)}nextFromTarifications(){var t;this.formStepTarifications.get("tarifications").invalid?this.formStepTarifications.markAllAsTouched():this.inscriptionEntree.unrequiredIdentification?this.stepper.next():(this.stepParticipants.reset(),null===(t=this.stepRenseigements)||void 0===t||t.reset(),this.participantsComponent.generateParticipants(),setTimeout(()=>{this.stepper.next()}))}onStepperBack(){this.stepper.previous()}createMembreEntreeFormControl(){const t=(0,y.cf)(this.formBuilder,this.citoyenRenseignementsAdd);t.addValidators((0,y.z3)(this.famillesCurrentUser,this.isInvite)),t.get("perId").addAsyncValidators(this.checkDisponibiliteEntree(!0)),t.get("perId").updateValueAndValidity(),t.get("courriel").addAsyncValidators(this.checkDisponibiliteEntree(!1)),t.get("courriel").updateValueAndValidity();const n=[(0,y.z3)(this.famillesCurrentUser,this.isInvite)];return this.inscriptionEntree.isAllowedInscWithRestr||n.push((0,y.uc)(this.accesIds,this.isInvite),(0,E.CBP)(this.ageTrfs,this.isInvite),(0,y._d)(this.tarificationFA,this.isInvite)),t.addValidators(n),t.updateValueAndValidity({emitEvent:!1}),t}checkDisponibiliteEntree(t){let n,s=null;return a=>""===a.value||null===a.value?(0,ie.of)(null):a.value===n?(0,ie.of)(s):(0,_t.O)(300).pipe((0,j.n)(()=>this.activiteService.checkDisponibiliteEntree(this.evenement.eveActId,t?a.value:null,t?null:a.value)),(0,Y.T)(l=>(n=a.value,l.canOrder?(s=null,null):(s={existAbonnement:!0},{existAbonnement:!0}))),(0,Je.W)(()=>null))}onPaymentLater(t){this.dateVersementSupp=t}nextFromParticipants(){if(this.stepRenseigements&&this.formStepParticipants.get("participants").controls.forEach(a=>{const l=a.get("renseigementAdditionnels");null==l||l.disable({emitEvent:!1}),null==l||l.updateValueAndValidity({onlySelf:!0})}),this.formStepParticipants.invalid)return this.formStepParticipants.markAllAsTouched(),void this.store.dispatch(new g.Actions.ShowSnackBar("La commande ne peut pas \xEAtre effectu\xE9e car elle contient des \xE9l\xE9ments invalides",g.EnumSnackBarType.Echec));const t=this.tarificationFA.value.filter(a=>a.qte>0),n=this.articlesFA.value.filter(a=>a.qte>0);if(this.resetRequiredCheckout(t,n),1===this.famillesCurrentUser.length&&t.length>0){const a=this.famillesCurrentUser[0].id,l=t.map(_=>this.getParticipantsEvenementEnregistrementInscritByFamId$(a,this.activite.id,_.ftbId));(0,De.p)(l).subscribe(()=>{this.stepper.next()})}else this.stepper.next();this.stepRenseigements&&this.formStepParticipants.get("participants").controls.forEac
1h(a=>{const l=a.get("renseigementAdditionnels");null==l||l.enable(),null==l||l.markAsUntouched({onlySelf:!1}),null==l||l.updateValueAndValidity()});const s=this.formStepParticipants.get("participants");this.inscriptionEntree.isAllowedInscWithRestr&&(this.isAllowedInscWithRestr=s.controls.some(a=>{var l;return!(null!==(l=a.get("isAllRestrictionsRespected"))&&void 0!==l&&l.value)}))}processFactureElementCheckout(t,n){const s=t.map(l=>{var _;let c={totalWithRabais:null,membreWithRabais:null};return l.isRabaisFamilial&&!this.isInvite&&(c=(0,E.oAF)(l.paliersRabaisFamilialOptions,this.participantFA.value.filter(d=>d.optId===l.id),this.participantFamilletListInscrit[l.ftbId])),{id:l.id,nom:null!==(_=l.trfOptNom)&&void 0!==_?_:l.ftbNom,prix:l.tarif,prixFormatted:l.tarifFormatted,qte:l.qte,total:G()(l.tarif*l.qte,2),totalWithRabais:c.totalWithRabais,membreWithRabais:c.membreWithRabais,occurrenceDate:(0,E.lll)(this.evenement.dateHeureDebut,this.evenement.dateHeureFin,this.isFr)}}),a=n.map(l=>(0,E.$iX)(l,this.localisation));this.itemsPayment=[...s,...a],this.itemsPayment.forEach(l=>{l.totalWithRabais&&(l.totalWithRabaisFormatted=this.currencyPipe.transform(l.totalWithRabais,this.localisation)),l.total&&(l.totalFormatted=this.currencyPipe.transform(l.total,this.localisation))})}nextFromRenseigementAdditionnels(){if(this.formStepParticipants.invalid)return this.formStepParticipants.markAllAsTouched(),void(this.isRenseignementsAddTouchedAndInvalid=!0);this.isRenseignementsAddTouchedAndInvalid=!1,this.stepper.next()}nextFromArticles(t=!0){const n=this.tarificationFA.value.filter(a=>a.qte>0),s=this.articlesFA.value.filter(a=>a.qte>0);this.resetRequiredCheckout(n,s),this.processFactureElementCheckout(n,s),t&&this.stepper.next()}resetRequiredCheckout(t,n){this.requiredCheckout=0!==t.map(s=>s.tarif).reduce((s,a)=>s+a)||n.length>0&&0!==n.map(s=>s.prix).reduce((s,a)=>s+a)}onStepChange(t){t.selectedIndex===this.EnumStepper.Resume&&-1===this.EnumStepper.Articles&&this.nextFromArticles(!1)}updateOrderLaunched(t){this.orderLaunched=t}order(t){this.activiteService.getCapaciteAndNbrParticipants(this.evenement.eveActId).pipe((0,I.pQ)(this.destroyRef),(0,re.M)(n=>{this.evenement.capacite=n.capacite,this.evenement.nbrParticipants=n.nbrParticipants,this.capaciteIsNan(this.evenement.capacite)||(this.evenement.capacite-n.nbrParticipants==0?(this.limiteDepasseCode=0,this.orderLaunched=!1):this.sommeQte+n.nbrParticipants>this.evenement.capacite&&(this.limiteDepasseCode=1,this.orderLaunched=!1,this.qteDispo=this.evenement.capacite-n.nbrParticipants))}),(0,Oe.p)(n=>!this.orderRequested&&this.capaciteIsNan(this.evenement.capacite)||this.sommeQte+n.nbrParticipants<=this.evenement.capacite),(0,j.n)(()=>{this.limiteDepasseCode=null;const n=this.tarificationFA.value.filter(c=>c.qte>0),s=this.articlesFA.value.filter(c=>c.qte>0),a=n.map(c=>{let d={totalWithRabais:null,membreWithRabais:null};return c.isRabaisFamilial&&!this.isInvite&&(d=(0,E.oAF)(c.paliersRabaisFamilialOptions,this.participantFA.value.filter(p=>p.optId===c.id),this.participantFamilletListInscrit[c.ftbId])),{id:c.fteId,facturableNom:c.ftbNom,facturableId:c.ftbId,montantFinal:c.tarif,qte:c.qte,totalWithRabais:d.totalWithRabais,total:G()(c.tarif*c.qte,2),membreWithRabais:d.membreWithRabais}}),l=s.map(c=>(0,E.$iX)(c,this.localisation));this.evenement.isSelectedForOrder=!0,t.paymentBody&&(t.paymentBody.idempotencyKey=this.idempotencyKey);const _={eveActId:this.evenement.eveActId,enregistrements:this.inscriptionEntree.unrequiredIdentification?he.D.generateParticipantsAnonymous(n):this.participantFA.value,citoyenRequerant:{id:this.user.perId,isInvite:this.isInvite,courriel:this.user.courriel,prenom:this.user.prenom,nom:this.user.nom,telephone:this.user.telephone},facture:{id:(0,E.SiN)(),items:[...a,...l]},unrequiredTaxes:this.inscriptionEntree.unrequiredTaxes,isRequiredFraisService:this.inscriptionEntree.isRequiredFraisService,resume:null==t?void 0:t.resume};return this.orderRequested=!0,this.requiredCheckout?this.activiteService.createEvenementEnregistrementCheckout(_,null==t?void 0:t.paymentBody):this.activiteService.insertEvenementEnregistrementList(_)})).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:n=>{n.status!==v.B2.Completed&&this.requiredCheckout?this.store.dispatch(new g.Actions.ShowSnackBar("\xC9chec \xE0 la compl\xE9tion de paiement, le statut est"+` ${n.status}
1`,g.EnumSnackBarType.Echec)):(this.canDeactivate=!0,this.router.navigate(["/activite/entree-confirmation"],{queryParamsHandling:"merge"}),localStorage.removeItem("activite"))},error:n=>{this.orderLaunched=this.orderRequested=!1,null!=n&&n.isSquareError&&(this.idempotencyKey=(0,E.SiN)()),(0,E.TuW)(n,this.store,g)}})}displayDescription(t){this.dialog.open(ge.V,{data:{title:"POLITIQUE DE REMBOURSEMENT",htmlContent:t.description,understandAction:!0},width:v.Uq.Medium})}backToActivite(){this.router.navigateByUrl("/activite")}back(){this.location.back()}handleSelectedFamId(t){this.famIdSelected=t}handleSelectedPerId(t){var n;const s=this.participantFA.value.find(_=>_.perId===t);if(!s)return;const l=null===(n=this.tarificationFA.value.filter(_=>_.qte>0).find(_=>_.isRabaisFamilial&&_.id===s.optId))||void 0===n?void 0:n.ftbId;l&&this.famIdSelected&&l&&this.getParticipantsEvenementEnregistrementInscritByFamId$(this.famIdSelected,this.activite.id,l).subscribe()}getParticipantsEvenementEnregistrementInscritByFamId$(t,n,s){return this.participantFamilletListInscrit[s]||(this.participantFamilletListInscrit[s]={}),this.participantFamilletListInscrit[s][t]||(this.participantFamilletListInscrit[s][t]=[]),this.activiteService.getParticipantsEvenementEnregistrementInscritByFamId(t,n,s).pipe((0,I.pQ)(this.destroyRef),(0,re.M)(a=>{this.participantFamilletListInscrit[s][t]=a}))}onCardReady(){this.isCardReady=!0}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-activite-entree"]],viewQuery:function(t,n){if(1&t&&(e.GBs(Oi,5),e.GBs(gi,5),e.GBs(vi,5),e.GBs(he.D,5),e.GBs(Ae.N,5)),2&t){let s;e.mGM(s=e.lsd())&&(n.stepper=s.first),e.mGM(s=e.lsd())&&(n.stepRenseigements=s.first),e.mGM(s=e.lsd())&&(n.stepParticipants=s.first),e.mGM(s=e.lsd())&&(n.participantsComponent=s.first),e.mGM(s=e.lsd())&&(n.citoyenRenseignementsAdd=s.first)}},hostBindings:function(t,n){1&t&&e.bIt("resize",function(){return n.windowResized()},!1,e.tSv)},decls:5,vars:10,consts:()=>{let i,t,n,s,a,l,_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,L,H,B,q,W,te,_e,ce,de,pe,Ee,ue,Ce,Se,me,Te,fe,R,xe,Fe,Xe,Ge,ke,je,Ue,Qe,ze,we,He,Be,M,gt,vt;return i="Plages horaires",t="S\xE9lection",n="Participants",s="Renseignements additionnels",a="Articles compl\xE9mentaires",l="R\xE9sum\xE9 et paiement",_="Plages horaires",c=" Retour ",d="S\xE9lection des entr\xE9es",p=" Retour ",u="Suivant",C=" Retour ",T="Identification",A="Pr\xE9nom",N=" Champ obligatoire ",h="Nom",f=" Champ obligatoire ",$="Courriel",b="T\xE9l\xE9phone",D=" Retour ",V="Suivant",L=" Champ obligatoire ",H=" Courriel non valide ",B=" Adresse courriel d\xE9j\xE0 utilis\xE9e par un compte citoyen ",q=" Champ obligatoire ",W=" T\xE9l\xE9phone non valide ",te="Date",_e="disponible(s)",ce="Plage horaire ",de=" Entr\xE9es disponibles ",pe=" disponible(s)",Ee="Choisir",ue="Rabais familial appliqu\xE9 d\xE8s le 2e inscrit.",Ce="Calcul\xE9 au r\xE9sum\xE9 de la commande",Se="inscrit :\xA0",me=" de r\xE9duction",Te="inscrit et plus :\xA0",fe=" de r\xE9duction par inscription additionnelle",R=" Veuillez pr\xE9ciser au moins une quantit\xE9 ",xe="Il y a",Fe="entr\xE9e(s) disponible(s), veuillez ajuster votre s\xE9lection",Xe="Retour",Ge="Suivant",ke="Retour",je="Suivant",Ue="Certains champs sont invalides",Qe="Articles compl\xE9mentaires",ze="Retour",we="Suivant",He="Il n'y a plus d'entr\xE9e disponible.",Be="Il n'y a plus que",M="entr\xE9e(s) disponible(s), veuillez ajuster votre s\xE9lection",gt=" En proc\xE9dant au paiement, vous acceptez notre ",vt="politique de remboursement",[["stepper",""],["stepParticipants",""],["stepRenseigements",""],["stepArticles",""],_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,L,H,B,q,W,te,_e,ce,de,pe,Ee,ue,Ce,Se,me,Te,fe,R,xe,Fe,Xe,Ge,ke,je,Ue,Qe,ze,we,He,Be,M,gt,vt,[1,"hide-desktop","mobile-header",3,"forceBackDefaultHref","defaultHref","headerTitle","returnButtonType","menuId"],["id","activiteEntreeSelection",3,"click"],[3,"loadingFailed"],[3,"back","title"],[1,"standard-page-content"],[1,"stepper-container"],[1,"stepper-form-activite"],["linear","true",1,"inscription-stepper",3,"selectionChange"],["matStepperIcon","edit"],["label","Identification",3,"stepControl","formGroup","aria-labelledby"],["label",i,3,"aria-labelledby"],[1,"margin-top-2","option-tarification-container"],[1,"responsive-table-stroked"],["mat-table","",3,"dataSource"],[3,"matColumnDef"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",3,"hidden",4,"matHeaderCellDef"],["mat-cell","",3,"hidden",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"flex-space-between","spacing-top"],["type","button","mat-stroked-button","",1,"custom-button-standard","custom-button-stroked",3,"click"],["label",t,3,"stepControl","formGroup","aria-labelledby"],["formArrayName","tarifications",1,"margin-top-2"],[3,"formGroupName"],[1,"custom-mat-error-message","action-delete","margin-top-1"],[1,"margin-top"],[1,"custom-mat-error-message","margin-top-1"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click"],["label",n,3,"stepControl","formGroup","aria-labelledby","completed"],["label",s,3,"completed","aria-labelledby"],["label",a,3,"completed","aria-labelledby"],["label",l,"aria-labelledby","readonly-title",3,"completed"],[3,"onLaunchedPayment","onPreparedPayment","onErrorPayment","onPaymentLater","onCardReady","onSquareDeconnecte","items","unrequiredTaxes","isRequiredFraisService","optionsVersement","activityNom","isConfigVersement","orderLaunc
1hed","user","addToFraisService","eventDate","installationsBySite","isActivityAndShouldModifyFS","isAllowedInscWithRestr"],["id","card-button","type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"disabled"],["iconClass","icon-shopping-cart",3,"isSubmitting"],[1,"icon-check"],[1,"margin-top-2"],[1,"max-720",3,"formGroup"],[1,"form-field-inline-section"],["required","","matInput","","type","text","formControlName","prenom"],["required","","matInput","","type","text","formControlName","nom"],["matInput","","type","email","required","true","formControlName","courriel"],["matInput","","type","tel","maskTelephoneEvents","","formControlName","telephone",3,"imask","unmask"],["mat-header-cell",""],["mat-cell",""],[1,"margin-auto"],["mat-header-cell","",3,"hidden"],["mat-cell","",3,"hidden"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["mat-header-row",""],["mat-row",""],[1,"border-bottom","padding-tarification"],[1,"option-tarification-content"],[1,"option-tarification-nom"],[1,"rabais-familial"],[1,"stepper-input"],[3,"click","disabled"],[1,"icon-delete"],["matInput","","formControlName","qte",3,"blur","imask"],[3,"click"],[1,"icon-add"],[1,"option-tarification-montant"],[1,"small-margin-top","container-mat-errors"],[1,"action-delete"],[3,"selectedFamId","selectedPerId","tarificationFA","participantFA","user","canOrderForCurrentUser","fam
1illesCurrentUser","familleMembreHashList","isInvite","ageTrfs","contexte","isAllowedInscWithRestr"],["type","button","mat-stroked-button","","matStepperPrevious","",1,"custom-button-standard","custom-button-stroked","custom-button-stepper"],[3,"participantsFA","questSupp","form"],[1,"flex-space-between","margin-top-2"],["type","button","color","primary","mat-raised-button","","matStepperNext","",3,"click"],[1,"margin-bottom-12"],[1,"form-section-title-underline"],[3,"articlesFA"],[1,"inline-text"],[1,"politique",3,"click"]]},template:function(t,n){1&t&&(e.nrm(0,"vplus-mobile-header",52),e.j41(1,"ion-content",53),e.nI1(2,"async"),e.bIt("click",function(){return n.onContentClick()}),e.DNE(3,Li,1,1,"vplus-loading-spinner",54)(4,Rn,64,39),e.k0s()),2&t&&(e.Y8G("forceBackDefaultHref",!0)("defaultHref","/activite")("headerTitle","")("returnButtonType","back-button")("menuId","activiteOpionTraification"),e.R7$(),e.AVh("filter-searche-global-active",e.bMT(2,8,n.selectIsSearchHeaderVisible$)),e.R7$(2),e.vxM(3,n.dataLoaded?4:3))},dependencies:[Z.Zl,Z.tL,Z.ji,Z.cC,Z.YV,Z.iL,Z.KS,Z.$R,Z.YZ,Z.NB,et.fg,U.rl,U.nJ,U.TL,ve.$z,z.V5,z.M6,z.F7,z.FR,z.xJ,S.qT,S.me,S.BC,S.cb,S.YS,S.j4,S.JD,S.$R,S.v8,E.xGI,pt.Zq,be.f,se.W9,tt.x,Et.z,Re.N,it.X,O.b,Ae.N,he.D,k.Jj,Tt.x,Pi.X,nt.a,E.ihR],styles:[".order-btn{text-align:right}.date{display:block;margin-top:6px}.stepper-form-activite .mat-horizontal-content-container form{min-height:auto!important}.option-tarification-montant{text-align:right;font-weight:550;white-space:nowrap}.option-tarification-nom{font-weight:450}vplus-activite-entree .icon-shopping-cart:before{color:#fff}vplus-activite-entree .ion-custom-button-standard i{margin-right:.5rem}vplus-activite-entree .custom-mat-error-message{font-size:14px}vplus-activite-entree .margin-top-minus-10{margin-top:-10px}vplus-activite-entree .custom-mat-error-field{font-size:13.5px}@media (max-width: 361px){vplus-activite-entree .flex-space-between{flex-direction:column-reverse;align-items:flex-end;gap:10px}}.membre-container{padding-top:.5rem}.participant-actions-btn{display:flex;justify-content:flex-end}.step-two-form-content{display:flex;flex-wrap:wrap;justify-content:space-between}.step-two-form-content .field-container{margin-bottom:0!important}.step-two-form-content .mat-mdc-form-field,.step-two-form-content .field-custom-wrapper{flex-grow:1;width:100%;margin-bottom:1rem}@media (min-width: 960px){.step-two-form-content .mat-mdc-form-field,.step-two-form-content .field-custom-wrapper{min-width:calc(50% - 18px);max-width:calc(50% - 18px)}.step-two-form-content .mat-mdc-form-field.full-width,.step-two-form-content .field-custom-wrapper.full-width{min-width:initial;max-width:initial}}.extension-panel-container mat-expansion-panel{box-shadow:unset!important;border:1px solid #e5e5e5;margin-bottom:36px}.extension-panel-container .mat-expansion-panel-body{padding:0 24px 24px!important}.mat-step-header[aria-labelledby=readonly-title]{pointer-events:none}.mat-step-header[aria-labelledby=readonly-title] .mat-step-label{color:var(--disabled-mat-step-header)}\n"],encapsulation:2}),r})();var w=m(10467),Me=m(54843);const ot=function(){var o=(0,w.A)(function*(r){if(r.canDeactivate)return!0;const i="Vos achats en cours seront perdus. \xCAtes-vous s\xFBr de vouloir quitter?",t=window.confirm(i);if(t&&r.sesHoldGroupeId&&r.activiteService)try{yield(0,Me._)(r.activiteService.releaseSessionHold(r.sesHoldGroupeId))}catch{}return t});return function(i){return o.apply(this,arguments)}}();var ft=m(983),Pe=m(67376),Ln=m(95390),yn=m(99172),ut=m(86600),Ct=m(53387),Dn=m(18359),At=m(82765),ht=m(82798),Vn=m(14823);let xn=(()=>{var o;class r{transform(t,n,s,a){const l=n.length;return 0===l||t.length===l?s:0!==t.length?t.map(_=>{var c;return null!==(c=_.nomLong)&&void 0!==c?c:_.nom}).join(", "):void 0}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275pipe=e.EJ8({name:"selectionDisplayMultiple",type:o,pure:!0}),r})();const Fn=(o,r)=>r.id,Xn=o=>({"select-autocommplete-long-panel":!0,"side-panel-autocomplete-fix":o}),Gn=(o,r)=>({"select-weight":o,"select-no-weight":r}),kn=o=>({"padding-left":o});function jn(o,r){if(1&o&&(e.j41(0,"mat-label",2),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.R7$(),e.JRh(i.labelFormField)}}function Un(o,r){if(1&o&&(e.j41(0,"span",4),e.nI1(1,"selectionDisplayMultiple"),e.EFF(2),e.nI1(3,"selectionDisplayMultiple"),e.k0s()),2&o){const i=e.XpG();e.Y8G("matTooltip",e.ii3(1,2,i.innerSelect.value,i.itemAllList,i.labelSelectAll,i.maxDisplayedChar)),e.R7$(2),e.SpI(" ",e.ii3(3,7,i.innerSelect.value,i.itemAllList,i.labelSelectAll,i.maxDisplayedChar)," ")}}function Qn(o,r){if(1&o&&(e.j41(0,"span",5)(1,"span"),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()),2&o){const i=e.XpG();e.Y8G("matTooltip",(null!=i.innerSelect.value[0]&&i.innerSelect.value[0].nomLong?null==i.innerSelect.value[0]||null==i.innerSelect.value[0].nomLong?null:i.innerSelect.value[0].nomLong.length:null==i.innerSelect.value[0]||null==i.innerSelect.value[0].nom?null:i.innerSelect.value[0].nom.length)>i.maxDisplayedChar?i.innerSelect.value[0].nomLong?i.innerSelect.value[0].nomLong:i.innerSelect.value[0].nom:""),e.R7$(2),e.JRh(i.labelSubTitleSelect),e.R7$(),e.SpI(" (",i.innerSelect.value.length===i.itemAllList.length?i.allLabel:i.innerSelect.value.length,") ")}}function zn(o,r){if(1&o&&(e.j41(0,"span",6),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.Y8G("matTooltip",(null!=i.innerSelect.value[0]&&i.innerSelect.value[0].nomLong?null==i.innerSelect.value[0]||null==i.innerSelect.value[0].nomLong?null:i.innerSelect.value[0].nomLong.length:null==i.innerSelect.value[0]||null==i.innerSelect.value[0].nom?null:i.innerSelect.value[0].nom.length)>i.maxDisplayedChar?i.innerSelect.value[0].nomLong?i.innerSelect.value[0].nomLong:i.innerSelect.value[0].nom:""),e.R7$(),e.SpI(" ",i.innerSelect.value.length===i.itemAllList.length?i.labelSelectAll.toLowerCase():i.innerSelect.value.length+" "+(1===i.innerSelect.value.length?i.labelSubTitleSelectSing:i.labelSubTitleSelectPlur)," ")}}function wn(o,r){if(1&o){const i=e.RV6();e.j41(0,"button",14),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.clearFilterControl())}),e.nrm(1,"i",15),e.k0s()}}function Hn(o,r){1&o&&e.nrm(0,"i",12)}function Bn(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-option",16),e.bIt("onSelectionChange",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.toogleOption(n))}),e.EFF(1),e.k0s()}if(2&o){const i=r.$implicit;e.Y8G("value",i)("ngStyle",e.eq3(4,kn,16+20*i.nestingIndex+"px"))("matTooltip",i.nom.length>60?i.nom:""),e.R7$(),e.SpI(" ",i.nom," ")}}function qn(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-checkbox",7),e.EFF(1),e.k0s(),e.nrm(2,"hr",8),e.j41(3,"mat-form-field",9)(4,"input",10),e.bIt("keydown",function(n){e.eBV(i);const s=e.XpG();return e.Njj(s.stopPropagation(n))}),e.k0s(),e.DNE(5,wn,2,0,"button",11)(6,Hn,1,0,"i",12),e.k0s(),e.Z7z(7,Bn,2,6,"mat-option",13,Fn)}if(2&o){const i=e.XpG();e.Y8G("formControl",i.selectAllFormControl)("indeterminate",i.selectAllIsIndeterminate),e.R7$(),e.SpI(" ",i.labelSelectAll," "),e.R7$(2),e.Y8G("floatLabel","never"),e.R7$(),e.Y8G("formControl",i.filterControl),e.R7$(),e.vxM(5,""!==i.filterControl.value?5:-1),e.R7$(),e.vxM(6,i.filterControl.value?-1:6),e.R7$(),e.Dyx(i.itemFiltredList)}}function Wn(o,r){if(1&o&&(e.j41(0,"mat-option",17),e.EFF(1),e.k0s()),2&o){const i=e.XpG();e.Y8G("value",i.optionsDisabled[0]),e.R7$(),e.SpI(" ",i.optionsDisabled[0].nom," ")}}function Yn(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,0),e.k0s())}let Jn=(()=>{var o;class r{set itemList(t){this.itemAllList=t.map(n=>(t.find(s=>
1s.id===n.parentId)||(n.nestingIndex=0,n.parentId=null,n.nomLong&&(n.nom=n.nomLong)),new Ct.d6(n))),this.itemFiltredList=this.itemAllList,this.refreshSelectAllIsIndeterminate()}constructor(t){this.changeDetectorRef=t,this.maxDisplayedChar=70,this.displayMode="COUNT",this.disabled=!1,this.inSideForm=!1,this.inSidePanel=!1,this.selectOptionDisabled=!1,this.applyEffect=!1,this.filterControl=new S.hs(""),this.itemAllList=[],this.itemFiltredList=[],this.selectAllIsIndeterminate=!1,this.allLabel="Tous",this.subs=new Dn.yU,this.selectionIds=[],this.optionsDisabled=[]}ngOnInit(){this.optionsDisabled=[{id:"optionDisabledId",nom:this.labelDisabled}],this.innerSelect=new S.hs(0===this.itemAllList.length&&this.selectOptionDisabled?this.optionsDisabled:[]),this.subs.add(this.selectFormControl.valueChanges.pipe((0,yn.Z)(this.selectFormControl.value),(0,Oe.p)(t=>!(0,Pe.isEqual)(this.selectionIds,t))).subscribe(t=>{this.selectionIds=t,this.innerSelect.patchValue(0===this.itemAllList.length&&this.selectOptionDisabled?this.optionsDisabled:this.itemAllList.filter(s=>t.includes(s.id))),this.refreshSelectAllIsIndeterminate()})),this.subs.add(this.filterControl.valueChanges.subscribe(t=>{this.itemFiltredList=""!==t?this.itemAllList.filter(n=>n.nom.toLocaleLowerCase().includes(t.toLowerCase())):this.itemAllList}))}ngAfterViewInit(){this.subs.add(this.selectAllFormControl.valueChanges.subscribe(t=>{const n=0!==this.itemAllList.length||!this.selectOptionDisabled;this.innerSelect.patchValue(t?n?this.itemAllList:this.optionsDisabled:[]),this.selectFormControl.patchValue(t?n?this.itemAllList.map(s=>s.id):this.optionsDisabled.map(s=>s.id):[])})),this.subs.add(this.matOptionsRef.changes.subscribe(()=>{this.refreshMatOptionsRef()}))}ngAfterViewChecked(){this.changeDetectorRef.detectChanges()}ngDoCheck(){!this.selectFormControl||!this.innerSelect||((0,Pe.isEqual)(this.innerSelect.errors,this.selectFormControl.errors)||this.innerSelect.setErrors(this.selectFormControl.errors),this.selectFormControl.touched&&!this.innerSelect.touched?this.innerSelect.markAsTouched({onlySelf:!0}):!this.selectFormControl.touched&&this.innerSelect.touched&&this.innerSelect.markAsUntouched({onlySelf:!0}))}toogleOption(t){if(t.isUserInput){let n=this.innerSelect.value;const s=t.source.value;if(t.source.selected)n=(0,Pe.uniqBy)([...n,s,...s.getAllChild()],a=>a.id);else{const a=[s,...s.getAllChild()].map(l=>l.id);n=n.filter(l=>!a.includes(l.id))}""===this.filterControl.value?this.selectionIds=n.map(a=>a.id):(this.selectionIds=this.selectionIds.filter(a=>!this.itemFiltredList.find(l=>l.id===a)),this.selectionIds=[...new Set([...this.selectionIds,...n.map(a=>a.id)])]),this.refreshMatOptionsRef(),this.refreshSelectAllIsIndeterminate(),this.selectAllFormControl.patchValue(this.selectionIds.length===this.itemAllList.length,{emitEvent:!1}),this.selectFormControl.patchValue(this.selectionIds)}}refreshMatOptionsRef(){this.matOptionsRef.forEach(n=>{var s,a;this.selectionIds.includes(null===(s=n.value)||void 0===s?void 0:s.id)||(null===(a=n.value)||void 0===a?void 0:a.id)===this.optionsDisabled[0].id?n.select():n.deselect()}),this.innerSelect.patchValue(0===this.itemAllList.length&&this.selectOptionDisabled?this.optionsDisabled:this.itemAllList.filter(n=>this.selectionIds.includes(n.id)))}refreshSelectAllIsIndeterminate(){this.selectAllIsIndeterminate=this.selectionIds.length%this.itemAllList.length!=0}clearFilterControl(){this.filterControl.patchValue("")}stopPropagation(t){t.stopPropagation()}onOpenedChange(t){t||this.clearFilterControl()}ngOnDestroy(){this.subs.unsubscribe()}}return(o=r).\u0275fac=function(t){return new(t||o)(e.rXU(e.gRc))},o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-select-autocomplete"]],viewQuery:function(t,n){if(1&t&&e.GBs(ut.wT,5),2&t){let s;e.mGM(s=e.lsd())&&(n.matOptionsRef=s)}},hostVars:2,hostBindings:function(t,n){2&t&&e.AVh("full-width",n.true)},inputs:{itemList:"itemList",selectFormControl:"selectFormControl",selectAllFormControl:"selectAllFormControl",maxDisplayedChar:"maxDisplayedChar",displayMode:"displayMode",disabled:"disabled",inSideForm:"inSideForm",inSidePanel:"inSidePanel",selectOptionDisabled:"selectOptionDisabled",labelNone:"labelNone",labelSubTitleSelect:"labelSubTitleSelect",labelSubTitleSelectSing:"labelSubTitleSelectSing",labelSubTitleSelectPlur:"labelSubTitleSelectPlur",applyEffect:"applyEffect",labelSelectAll:"labelSelectAll",labelDisabled:"labelDisabled",labelFormField:"labelFormField"},decls:10,vars:17,consts:()=>{let i,t;return i="Rechercher",t="Champ obligatoire",[t,[1,"mat-form-field-select","full-width"],[1,"label-select"],[3,"openedChange","placeholder","multiple","formControl","disabled","panelClass","ngClass"],["matTooltipShowDelay","500",1,"block","mat-option-ellipsis-end",3,"matTooltip"],["matTooltipShowDelay","500",1,"block","mat-option-ellipsis-start",3,"matTooltip"],["matTooltipShowDelay","500",1,"block","mat-option-ellipsis-start","custom-display-mode",3,"matTooltip"],["id","select-all-checkbox",3,"formControl","indeterminate"],[1,"hr-color"],["id","field-search",3,"floatLabel"],["autoComplete","off","matInput","","value","","placeholder",i,3,"keydown","formControl"],["matSuffix","","mat-icon-button",""],["matSuffix","",1,"icon-search"],["matTooltipShowDelay","500",3,"value","ngStyle","matTooltip"],["matSuffix","","mat-icon-button","",3,"click"],[1,"icon-x"],["matTooltipShowDelay","500",3,"onSelectionChange","value","ngStyle","matTooltip"],["disabled","",3,"value"]]},template:function(t,n){1&t&&(e.j41(0,"mat-form-field",1),e.DNE(1,jn,2,1,"mat-label",2),e.j41(2,"mat-select",3),e.bIt("openedChange",function(a){return n.onOpenedChange(a)}),e.j41(3,"mat-select-trigger"),e.DNE(4,Un,4,12,"span",4)(5,Qn,4,3,"span",5)(6,zn,2,2,"span",6),e.k0s(),e.DNE(7,qn,9,7)(8,Wn,2,2),e.k0s(),e.DNE(9,Yn,2,0,"mat-error"),e.k0s()),2&t&&(e.R7$(),e.vxM(1,n.inSideForm?1:-1),e.R7$(),e.Y8G("placeholder",n.labelNone)("multiple",!0)("formControl",n.innerSelect)("disabled",!0)("panelClass",e.eq3(12,Xn,n.inSidePanel))("ngClass",e.l_i(14,Gn,n.applyEffect&&n.selectionIds.length>0,n.applyEffect&&0===n.selectionIds.length)),e.R7$(2),e.vxM(4,"LIST"===n.displayMode?4:-1),e.R7$(),e.vxM(5,"COUNT"===n.displayMode?5:-1),e.R7$(),e.vxM(6,"CUSTOM"===n.displayMode?6:-1),e.R7$(),e.vxM(7,n.itemAllList.length>0?7:8),e.R7$(2),e.vxM(9,null!=n.innerSelect&&n.innerSelect.touched&&null!=n.innerSelect&&n.innerSelect.hasError("required")?9:-1))},dependencies:[et.fg,U.rl,U.nJ,U.TL,U.yw,ut.wT,At.So,ht.VO,ht.$2,ve.iY,Vn.oV,k.YU,k.B3,S.me,S.BC,S.l_,xn],styles:[".mat-mdc-select-panel.select-autocommplete-long-panel{max-height:355px!important}@media (max-width: 600px){  .mat-mdc-select-panel.select-autocommplete-long-panel{min-width:100%!important}}@media (min-width: 601px){  .mat-mdc-select-panel.select-autocommplete-long-panel{max-width:unset!important;min-width:-moz-fit-content;min-width:fit-content}}#select-all-checkbox[_ngcontent-%COMP%]{padding:0 16px;line-height:3em}#field-search[_ngcontent-%COMP%]{width:calc(100% - 35px);margin:0 5px 0 15px}.label-select[_ngcontent-%COMP%]{font-size:16px}.mat-form-field-select[_ngcontent-%COMP%]{margin-bottom:-1.75em;width:100%!important}.mat-form-field-select.mat-form-field-invalid[_ngcontent-%COMP%]{margin-bottom:0}  .mat-form-field-select .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple:before{border-bottom:none}.custom-display-mode[_ngcontent-%COMP%]{direction:ltr!important}
1.hr-color[_ngcontent-%COMP%]{background-color:var(--divider-color)}.select-weight[_ngcontent-%COMP%]{font-weight:500}.select-no-weight[_ngcontent-%COMP%]{font-weight:0}"]}),r})();const Zn=(o,r)=>r.id,Kn=(o,r)=>r.section,eo=(o,r)=>r.sesId,to=(o,r)=>[o,r],io=o=>({color:o});function no(o,r){if(1&o&&e.nrm(0,"vplus-loading-spinner",6),2&o){const i=e.XpG();e.Y8G("loadingFailed",i.dataLoadingFailed)}}function oo(o,r){if(1&o&&(e.j41(0,"div",20)(1,"b",21),e.EFF(2),e.k0s(),e.EFF(3,"\xa0:\xa0 "),e.j41(4,"span",24),e.EFF(5),e.j41(6,"span"),e.pXf(7,1),e.k0s(),e.EFF(8),e.k0s()()),2&o){const i=e.XpG().$implicit,t=e.XpG(2);e.R7$(2),e.SpI(" ",i.typeCode===t.EnumTypeInscriptionCode.Adhesion?t.labels.limiteParticipant.abonnement:t.labels.limiteParticipant.session," "),e.R7$(2),e.Y8G("ngStyle",e.eq3(4,io,i.limiteParticipant-i.nbrParticipant<=0?"var(--warn-color)":"black")),e.R7$(),e.SpI(" ",i.limiteParticipant-i.nbrParticipant<=0?0:i.limiteParticipant-i.nbrParticipant,"\xa0 "),e.R7$(3),e.SpI("\xa0/\xa0",i.limiteParticipant,"")}}function so(o,r){1&o&&(e.j41(0,"p")(1,"b")(2,"span"),e.pXf(3,2),e.k0s()()())}function ao(o,r){if(1&o&&(e.j41(0,"span",25),e.EFF(1),e.k0s()),2&o){const i=e.XpG().$implicit;e.R7$(),e.JRh(i.section)}}function ro(o,r){if(1&o&&(e.j41(0,"div",27),e.EFF(1),e.j41(2,"span"),e.EFF(3),e.j41(4,"span"),e.pXf(5,3),e.k0s(),e.EFF(6),e.k0s()()),2&o){const i=e.XpG().$implicit;e.AVh("session-closed",i.isClosed),e.R7$(),e.SpI(" ",i.nom,"\xa0:\xa0 "),e.R7$(),e.AVh("places",i.isClosed),e.R7$(),e.SpI(" ",i.nbrPlacesDisponibles," "),e.R7$(3),e.SpI(" \xa0/\xa0",i.capacite," ")}}function lo(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,ro,7,7,"div",26),e.k0s()),2&o){const i=r.$implicit;e.R7$(),e.vxM(1,i.capacite?1:-1)}}function _o(o,r){1&o&&e.nrm(0,"br")}function co(o,r){if(1&o&&(e.j41(0,"div"),e.DNE(1,ao,2,1,"span",25),e.k0s(),e.Z7z(2,lo,2,1,"div",null,eo),e.DNE(4,_o,1,0,"br")),2&o){const i=r.$implicit,t=e.XpG(3);e.R7$(),e.vxM(1,t.hasCapacite(i)&&""!=i.section?1:-1),e.R7$(),e.Dyx(i.sessions),e.R7$(2),e.vxM(4,""!=i.section?4:-1)}}function po(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",16)(1,"div",17)(2,"div",18),e.EFF(3),e.k0s(),e.nrm(4,"vplus-froala-container",19),e.j41(5,"div",20)(6,"b",21),e.pXf(7,0),e.k0s(),e.EFF(8),e.k0s(),e.DNE(9,oo,9,6,"div",20)(10,so,4,0,"p"),e.Z7z(11,co,5,2,null,null,Kn),e.j41(13,"div",22)(14,"ion-button",23),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(2);return e.Njj(s.inscrire(n))}),e.EFF(15),e.k0s()()()()}if(2&o){const i=r.$implicit,t=e.XpG(2);e.R7$(3),e.JRh(i.nom),e.R7$(),e.Y8G("content",i.description),e.R7$(4),e.SpI(" : ",i.sitesNom," "),e.R7$(),e.vxM(9,i.hasMultiSession||!e.l_i(7,to,t.EnumTypeInscriptionCode.Adhesion,t.EnumTypeInscriptionCode.Session).includes(i.typeCode)||i.isLimiteParticipantNaN?-1:9),e.R7$(),e.vxM(10,t.atLeastOneSessionCapacite[i.id]?10:-1),e.R7$(),e.Dyx(t.groupSessionsBySection(i.sessionParticipants)),e.R7$(3),e.Y8G("disabled",t.isDisabledInscription[i.id]),e.R7$(),e.SpI(" ",i.typeCode===t.EnumTypeInscriptionCode.Reservation?t.labels.btnAcheter.reserver:i.typeCode===t.EnumTypeInscriptionCode.Session?t.labels.btnAcheter.inscrire:t.labels.btnAcheter.acheter," ")}}function Eo(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",7)(1,"vplus-req-toolbar",8),e.bIt("back",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.backToActivite())}),e.k0s(),e.j41(2,"div",9)(3,"div",10)(4,"div",11)(5,"div",12),e.nrm(6,"vplus-select-autocomplete",13),e.k0s(),e.j41(7,"div",12),e.nrm(8,"vplus-select-autocomplete",14),e.k0s(),e.j41(9,"div",12),e.nrm(10,"vplus-select-autocomplete",13),e.k0s()(),e.j41(11,"div",15),e.Z7z(12,po,16,10,"div",16,Zn),e.k0s()()()()}if(2&o){const i=e.XpG();e.R7$(),e.Y8G("title",i.programmation.nom),e.R7$(5),e.Y8G("itemList",i.periodeProgList)("selectFormControl",i.form.get("selectPeriodeProg"))("selectAllFormControl",i.form.get("selectPeriodeProgAll"))("labelNone",i.labels.selectionPeriodeProg.subTitleSelect)("labelSubTitleSelect",i.labels.selectionPeriodeProg.subTitleSelect)("labelSelectAll",i.labels.selectionPeriodeProg.selectAll)("disabled",0===i.periodeProgList.length)("applyEffect",!0),e.R7$(2),e.Y8G("itemList",i.typeList)("selectFormControl",i.form.get("selectType"))("selectAllFormControl",i.form.get("selectTypeAll"))("labelNone",i.labels.selectionType.subTitleSelect)("labelSubTitleSelect",i.labels.selectionType.subTitleSelect)("labelSelectAll",i.labels.selectionType.selectAll)("applyEffect",!0),e.R7$(2),e.Y8G("itemList",i.siteList)("selectFormControl",i.form.get("selectSite"))("selectAllFormControl",i.form.get("selectSiteAll"))("labelNone",i.labels.selectionSite.subTitleSelect)("labelSubTitleSelect",i.labels.selectionSite.subTitleSelect)("labelSelectAll",i.labels.selectionSite.selectAll)("disabled",0===i.siteList.length)("applyEffect",!0),e.R7$(2),e.Dyx(i.inscriptionFiltredList)}}let uo=(()=>{var o;
1class r{constructor(){this.store=(0,e.WQX)(J.il),this.activiteService=(0,e.WQX)(Ie.Z),this.router=(0,e.WQX)(X.Ix),this.localisationService=(0,e.WQX)(Ne.A),this.formBuilder=(0,e.WQX)(S.ok),this.activatedRoute=(0,e.WQX)(X.nX),this.destroyRef=(0,e.WQX)(e.abz),this.dataLoaded=!1,this.dataLoadingFailed=!1,this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.EnumTypeInscriptionCode=F.bO,this.PeriodeInscriptionMode=F.aG,this.selectIsSearchHeaderVisible$=this.store.select(g.selectIsSearchHeaderVisible),this.typeList=[],this.periodeProgIdFiltredList=[],this.typeIdFiltredList=[],this.siteIdFiltredList=[],this.isDisabledInscription={},this.atLeastOneSessionCapacite={},this.isLoggedIn=!1,this.labels={btnAcheter:{acheter:"Acheter",reserver:"R\xE9server",inscrire:"S'inscrire"},limiteParticipant:{abonnement:"Nombre d'abonnements",session:"Place(s) disponible(s)"},selectionPeriodeProg:{subTitleSelect:"P\xE9riode",selectAll:"Toutes les p\xE9riodes"},selectionType:{subTitleSelect:"Type",selectAll:"Tous les types"},selectionSite:{subTitleSelect:"Lieu",selectAll:"Tous les lieux"}}}ngOnInit(){this.store.select(g.selectIsLoggedIn).pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>this.isLoggedIn=t)}inscriptionDisabled(t){return(t.hasMultiSession?t.sessionParticipants.every(s=>s.nbrParticipants>=s.capacite):t.limiteParticipant-t.nbrParticipant<=0)&&!t.isEnabledWaitingList}hasAtLeastOneSessionCapacite(t){return t.some(n=>n.capacite)}onContentClick(){this.store.dispatch(g.Actions.setIsSearchHeaderVisible({payload:!1}))}loadData(){const t=this.activatedRoute.snapshot.queryParams.programmation;this.activiteService.getProgrammationEnligneList().pipe((0,j.n)(n=>{var s;return this.programmation=null!==(s=n.find(a=>x.A.sanitize(a.nomFr)===t))&&void 0!==s?s:n.find(a=>x.A.sanitize(a.nomEn)===t),this.programmation||0!==n.length?!this.programmation&&n.length>=1?(this.router.navigate(["/activite"]),ft.w):(this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{programmation:x.A.sanitize(this.programmation.nom)},queryParamsHandling:"merge",replaceUrl:!0}),this.activiteService.getInscriptionEnligneList(this.programmation.id)):(this.router.navigate(["/accueil"]),ft.w)}),(0,I.pQ)(this.destroyRef)).subscribe({next:n=>{this.inscriptionList=this.inscriptionFiltredList=this.programmation.inscriptions,this.inscriptionList.sort((s,a)=>s.nom.localeCompare(a.nom,void 0,{numeric:!0})),this.periodeProgList=n.periodes,this.siteList=n.sites,this.isDisabledInscription=this.inscriptionList.reduce((s,a)=>(s[a.id]=this.inscriptionDisabled(a),s),{}),this.atLeastOneSessionCapacite=this.inscriptionList.reduce((s,a)=>(a.hasMultiSession&&(s[a.id]=this.hasAtLeastOneSessionCapacite(a.sessionParticipants)),s),{}),this.typeList=F.ah.filter(s=>this.inscriptionList.some(a=>a.typeCode===s.id)),this.inscriptionFiltredList.forEach(s=>
1{s.sessionParticipants.forEach(a=>{const l=oe()(),_=a.periodeInscriptionMode===F.aG.Parent?s.dateDebut:a.dateDebut,c=a.periodeInscriptionMode===F.aG.Parent?s.dateFin:a.dateFin,d=_?oe()(_):null,p=c?oe()(c):null;a.isClosed=d&&p&&!l.isBetween(d,p,void 0,"[]")||d&&!p&&l.isBefore(d)||!d&&p&&l.isAfter(p)}),s.isLimiteParticipantNaN=isNaN(s.limiteParticipant)}),this.initFormFiltre(),this.dataLoaded=!0},error:()=>{this.dataLoadingFailed=!0}})}groupSessionsBySection(t){if(!t)return[];const n={},s=[],a=[];if(t.forEach(_=>{const c=_.secNom;c&&""!==c.trim()?(n[c]||(n[c]=[]),n[c].push(_)):a.push(_)}),Object.keys(n).sort((_,c)=>_.localeCompare(c)).forEach(_=>{const c=n[_].sort((d,p)=>{var u,C;const T=String(null!==(u=d.nom)&&void 0!==u?u:""),A=String(null!==(C=p.nom)&&void 0!==C?C:"");return T.localeCompare(A,void 0,{numeric:!0,sensitivity:"base"})});s.push({section:_,sessions:c})}),a.length){const _=a.sort((c,d)=>{var p,u;const C=String(null!==(p=c.nom)&&void 0!==p?p:""),T=String(null!==(u=d.nom)&&void 0!==u?u:"");return C.localeCompare(T,void 0,{numeric:!0,sensitivity:"base"})});s.push({section:"",sessions:_})}return s}hasCapacite(t){var n;return null===(n=t.sessions)||void 0===n?void 0:n.some(s=>s.capacite>0)}inscrire(t){const n=t.typeCode,s=t.allowInvite;this.store.dispatch(ne.t2({payload:s})),n===F.bO.Reservation?this.activiteService.getActiviteReservation(t.actId).pipe((0,I.pQ)(this.destroyRef)).subscribe(a=>{a.nom=a.localisations.find(l=>l.lclzTag===this.currentLocalisation).nom,this.store.dispatch(ne.xm({payload:a})),(0,y.t5)(a),this.router.navigate(["activite","reservation"],{queryParams:this.getMergedQueryParams({act:x.A.sanitize(a.nom),allowInvite:s})})}):n===F.bO.Adhesion?this.activiteService.getAdhesion(t.id).pipe((0,I.pQ)(this.destroyRef)).subscribe(a=>{this.store.dispatch(ne.zI({payload:a})),(0,y.t5)(a),this.router.navigate(["activite","options-tarification"],{queryParams:this.getMergedQueryParams({adh:x.A.sanitize(a.inscNom),allowInvite:s})})}):n===F.bO.Entree?this.activiteService.getActivite(t.actId).pipe((0,I.pQ)(this.destroyRef)).subscribe(a=>{a.inscriptionEntree.inscNom=a.inscriptionEntree.localisations.find(l=>l.lclzTag===this.currentLocalisation).nom,this.store.dispatch(ne.xm({payload:a})),(0,y.t5)(a),this.router.navigate(["activite","entree-selection"],{queryParams:this.getMergedQueryParams({act:x.A.sanitize(a.inscriptionEntree.inscNom),allowInvite:s})})}):n===F.bO.Session&&this.activiteService.getActivite(t.actId).pipe((0,I.pQ)(this.destroyRef)).subscribe(a=>{a.inscriptionSession.inscNom=a.inscriptionSession.localisations.find(l=>l.lclzTag===this.currentLocalisation).nom,this.store.dispatch(ne.xm({payload:a})),(0,y.t5)(a),this.router.navigate(["activite","session-selection"],{queryParams:this.getMergedQueryParams({act:x.A.sanitize(a.inscriptionSession.inscNom),allowInvite:s})})})}backToActivite(){this.router.navigateByUrl("/activite")}getMergedQueryParams(t){return{...this.router.routerState.snapshot.root.queryParams,...t}}initFormFiltre(){this.form=this.formBuilder.group({selectPeriodeProg:new S.MJ([]),selectType:new S.MJ([]),selectSite:new S.MJ([]),selectPeriodeProgAll:new S.MJ(!1),selectTypeAll:new S.MJ(!1),selectSiteAll:new S.MJ(!1)}),this.form.get("selectPeriodeProg").valueChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{(0,Pe.isEqual)(this.periodeProgIdFiltredList,t)||(this.periodeProgIdFiltredList=t,this.applyFiltre())}),this.form.get("selectPeriodeProgAll").valueChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{this.periodeProgIdFiltredList=t?this.periodeProgList.map(n=>n.id):[],this.applyFiltre()}),this.form.get("selectType").valueChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{(0,Pe.isEqual)(this.typeIdFiltredList,t)||(this.typeIdFiltredList=t,this.applyFiltre())}),this.form.get("selectTypeAll").valueChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{this.typeIdFiltredList=t?this.typeList.map(n=>n.id):[],this.applyFiltre()}),this.form.get("selectSite").valueChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{(0,Pe.isEqual)(this.siteIdFiltredList,t)||(this.siteIdFiltredList=t,this.applyFiltre())}),this.form.get("selectSiteAll").valueChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{this.siteIdFiltredList=t?this.siteList.map(n=>n.id):[],this.applyFiltre()})}applyFiltre(){const t=!this.form.get("selectPeriodeProgAll").value&&0!==this.periodeProgIdFiltredList.length,n=!this.form.get("selectTypeAll").value&&0!==this.typeIdFiltredList.length,s=!this.form.get("selectSiteAll").value&&0!==this.siteIdFiltredList.length;this.inscriptionFiltredList=this.inscriptionList.filter(a=>(!t||this.periodeProgIdFiltredList.filter(l=>l===a.perioProgId).length>0)&&(!n||this.typeIdFiltredList.filter(l=>l===a.typeCode).length>0)&&(!s||this.siteIdFiltredList.find(l=>a.sites.find(_=>_.id===l))))}ionViewWillEnter(){this.loadData()}ionViewWillLeave(){this.dataLoaded=!1}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-activite-inscriptions"]],decls:5,vars:9,consts:()=>{let i,t,n,s;return i="Lieu",t=" disponible(s)",n="Place(s) disponible(s)",s="disponible(s)",[i,t,n,s,[1,"hide-desktop","mobile-header",3,"defaultHref","headerTitle","returnButtonType","menuId"],["id","activiteReservation",3,"click"],[3,"loadingFailed"],[1,"main-page-container"],[3,"back","title"],[1,"standard-page-content"],[1,"max-720"],[1,"filtre-content"],[1,"filter-combo"],[3,"itemList","selectFormControl","selectAllFormControl","labelNone","labelSubTitleSelect","labelSelectAll","disabled","applyEffect"],[3,"itemList","selectFormControl","selectAllFormControl","labelNone","labelSubTitleSelect","labelSelectAll","applyEffect"],[1,"margin-top-2"],[1,"margin-bottom-2"],[1,"inscription-detail-container","padding-top-1","padding-bottom-1","padding-left-1","padding-right-1"],[1,"inscription-detail-nom"],[1,"responsive-padding-bottom",3,"content"],[1,"margin-top-1"],[1,"inscription-detail-site"],[1,"margin-top-1","inscription-detail-inscrire-btn"],[1,"ion-custom-button-standard","ion-custom-button-full","ion-custom-table-button",3,"click","disabled"],[3,"ngStyle"],[1,"section-title"],[1,"inscription-places-disponibles",3,"session-closed"],[1,"inscription-places-disponibles"]]},template:function(t,n){1&t&&(e.nrm(0,"vplus-mobile-header",4),e.j41(1,"ion-content",5),e.nI1(2,"async"),e.bIt("click",function(){return n.onContentClick()}),e.DNE(3,no,1,1,"vplus-loading-spinner",6)(4,Eo,14,24),e.k0s()),2&t&&(e.Y8G("defaultHref","/activite")("headerTitle","")("returnButtonType","back-button")("menuId","activiteReservation"),e.R7$(),e.AVh("filter-searche-global-active",e.bMT(2,7,n.selectIsSearchHeaderVisible$)),e.R7$(2),e.vxM(3,n.dataLoaded?4:3))},dependencies:[k.B3,be.f,se.Jm,se.W9,Ln.m,Jn,tt.x,Re.N,k.Jj],styles:["@media (min-width: 601px){.filtre-content[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}}@media (max-width: 600px){.filtre-content[_ngcontent-%COMP%]{display:flex;flex-direction:column}}.session-closed[_ngcontent-%COMP%]{color:#9e9e9e;text-decoration:line-through;opacity:.7}.places[_ngcontent-%COMP%]{color:#9e9e9e}.section-title[_ngcontent-%COMP%]{font-weight:700;font-size:18px!important}.inscription-detail-container[_ngcontent-%COMP%]{border:1px solid var(--primary-color);border-radius:10px;max-width:800px}.inscription-detail-nom[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px;font-weight:500}.inscription-detail-site[_ngcontent-%COMP%]{font-weight:600}.inscription-detail-inscrire-btn[_ngcontent-%COMP%]{text-align:right}.filter-combo[_ngcontent-%COMP%]{padding-top:.6rem}.inscription-places-disponibles[_ngcontent-%COMP%]{padding:.3rem}"]}),r})();var Co=m(50505),It=m(67948),St=m(9454),So=m(22669);const mo=(o,r)=>r.secId,To=(o,r)=>r.value.id;function fo(o,r){1&o&&(e.j41(0,"span"),e.nrm(1,"i",15),e.EFF(2,"\xa0"),e.j41(3,"span"),e.pXf(4,2),e.k0s()(),e.nrm(5,"br")(6,"br"))}function Ao(o,r){1&o&&(e.j41(0,"span"),e.nrm(1,"i",16),e.EFF(2,"\xa0"),e.j41(3,"span"),e.pXf(4,3),e.k0s()(),e.nrm(5,"br")(6,"br"))}function ho(o,r){1&o&&(e.j41(0,"span"),e.nrm(1,"i",17),e.EFF(2,"\xa0"),e.j41(3,"span"),e.pXf(4,4),e.k0s()(),e.nrm(5,"br")(6,"br"))}function Io(o,r){if(1&o&&(e.j41(0,"span",28),e.EFF(1),e.k0s()),2&o){const i=e.XpG().$implicit;e.R7$(),e.JRh(null==i?null:i.secNom)}}function No(o,r){if(1&o&&(e.j41(0,"span",34),e.EFF(1),e.j41(2,"span"),e.pXf(3,6),e.k0s()()),2&o){const i=e.XpG().$implicit,t=e.XpG(3);e.R7$(),e.SpI(" ",null==t.sessionParticipants[i.value.id]?null:t.sessionParticipants[i.value.id].placesDisponibles," ")}}function Mo(o,r){1&o&&(e.j41(0,"button",36),e.nrm(1,"i",40),e.j41(2,"span"),e.pXf(3,7),e.k0s()())}function Po(o,r){if(1&o){const i=e.RV6();e.j41(0,"button",41),e.bIt("click",function(){e.eBV(i);const n=e.XpG().$implicit,s=e.XpG(2).$implicit,a=e.XpG();return e.Njj(a.addToWaitingList(n,s.value))}),e.nrm(1,"i",42),e.j41(2,"span"),e.pXf(3,8),e.k0s()()}}function Oo(o,r){if(1&o&&(e.j41(0,"p",38),e.EFF(1),e.k0s()),2&o){const i=e.XpG().$implicit,t=e.XpG(2).$implicit,n=e.XpG();e.R7$(),e.JRh(n.sessionReglesInfos[t.value.perId+"-"+(null==i.value?null:i.value.id)].message)}}function go(o,r){1&o&&(e.j41(0,"mat-error",39)(1,"span"),e.pXf(2,9),e.k0s()())}function vo(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",29)(1,"mat-checkbox",30),e.bIt("change",function(){const n=e.eBV(i).$implicit,s=e.XpG(2).$implicit,a=e.XpG();return e.Njj(a.onChecked(n,s.get("sessionList"),s.value.perId))}),e.j41(2,"div",31)(3,"span",32),e.EFF(4),e.k0s(),e.j41(5,"span",33),e.DNE(6,No,4,1,"span",34),e.j41(7,"span",35),e.EFF(8),e.k0s(),e.DNE(9,Mo,4,0,"button",36),e.k0s()(),e.DNE(10,Po,4,0,"button",37),e.k0s(),e.DNE(11,Oo,2,1,"p",38)(12,go,3,0,"mat-error",39),e.k0s()}if(2&o){const i=r.$implicit,t=e.XpG().$index,n=e.XpG().$implicit,s=e.XpG();e.R7$(),e.Y8G("formControl",i.get("checked")),e.R7$(3),e.JRh(i.value.nom),e.R7$(),e.AVh("with-waiting-btn",s.inscriptionSession.isEnabledWaitingList&&!s.refreshingCapaciteSessions[i.value.id]&&0===(null==s.sessionParticipants[i.value.id]?null:s.sessionParticipants[i.value.id].placesDisponibles)&&!i.get("checked").value&&!i.get("isWaitingList").value),e.R7$(),e.vxM(6,s.hasCapacite||null!=(null==s.sessionParticipants[i.value.id]?null:s.sessionParticipants[i.value.id].placesDisponibles)?6:-1),e.R7$(2),e.JRh(i.value.prixformatted),e.R7$(),e.vxM(9,i.value.isWaitingList?9:-1),e.R7$(),e.vxM(10,s.refreshingCapaciteSessions[i.value.id]||!s.inscriptionSession.isEnabledWaitingList||0!==(null==s.sessionParticipants[i.value.id]?null:s.sessionParticipants[i.value.id].placesDisponibles)||i.get("checked").value||i.get("isWaitingList").value?-1:10),e.R7$(),e.vxM(11,null!=s.sessionReglesInfos&&null!=s.sessionReglesInfos[n.value.perId+"-"+(null==i.value?null:i.value.id)]&&s.sessionReglesInfos[n.value.perId+"-"+(null==i.value?null:i.value.id)].message?11:-1),e.R7$(),e.vxM(12,n.get("sessionList").controls[t].get("checked").value&&s.sessionParticipants[i.value.id].placesDisponibles<0&&s.hasCapacite?12:-1)}}function bo(o,r){1&o&&e.nrm(0,"br")}function Ro(o,r){if(1&o&&(e.j41(0,"div",14),e.DNE(1,Io,2,1,"span",28),e.Z7z(2,vo,13,10,"div",29,To),e.DNE(4,bo,1,0,"br"),e.k0s()),2&o){const i=r.$implicit,t=r.$index,n=e.XpG(2);e.Y8G("formGroupName",t),e.R7$(),e.vxM(1,n.atLeastOneSessionHasSection?1:-1),e.R7$(),e.Dyx(i.items),e.R7$(2),e.vxM(4,n.atLeastOneSessionHasSection?4:-1)}}function $o(o,r){1&o&&(e.j41(0,"mat-error",24)(1,"span"),e.pXf(2,10),e.k0s()())}function Lo(o,r){if(1&o&&(e.j41(0,"div",25),e.EFF(1),e.k0s()),2&o){const i=e.XpG(2);e.R7$(),e.SpI(" ",i.sessionsIndisponiblesMessage," ")}}function yo(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",14)(1,"mat-expansion-panel",18,0),e.bIt("opened",function(){const n=e.eBV(i).$index,s=e.XpG();return e.Njj(s.openParticipant(n))})("closed",function(){const n=e.eBV(i).$index,s=e.sdS(2),a=e.XpG();return e.Njj(a.onPanelClosed(n,s))}),e.j41(3,"mat-expansion-panel-header",19)(4,"mat-panel-title",20)(5,"b"),e.EFF(6),e.nI1(7,"trim"),e.k0s()(),e.j41(8,"div",21),e.nrm(9,"i",22),e.k0s()(),e.j41(10,"div",23),e.Z7z(11,Ro,5,3,"div",14,mo),e.k0s(),e.DNE(13,$o,3,0,"mat-error",24)(14,Lo,2,1,"div",25),e.j41(15,"div",26)(16,"button",27),e.bIt("click",function(){const n=e.eBV(i).$index,s=e.XpG();return e.Njj(s.confirmParticipant(n))}),e.j41(17,"span"),e.pXf(18,5),e.k0s()()()()()}if(2&o){const i=r.$implicit,t=r.$index,n=r.$index,s=e.sdS(2),a=e.XpG();e.Y8G("formGroupName",t),e.R7$(),e.AVh("margin-top-2-imp",0!==n),e.Y8G("expanded",a.openedParticipantIndexArray.includes(t)||!!a.sessionsIndisponiblesMessage),e.R7$(2),e.Y8G("collapsedHeight","80px")("expandedHeight","80px"),e.R7$(3),e.E5c("",e.bMT(7,15,i.value.prenom),"\xa0",i.value.nom," - ",i.value.admission,""),e.R7$(3),e.AVh("icon-chevron-up",!s.expanded)("icon-chevron-down",s.expanded),e.R7$(2),e.Dyx(a.visibleSectionsByParticipant()[a.getParticipantKey(i)]),e.R7$(2),e.vxM(13,i.get("sessionList").touched&&i.get("sessionList").hasError("noSessionChecked")?13:-1),e.R7$(),e.vxM(14,a.sessionsIndisponiblesMessage?14:-1)}}let Nt=(()=>{var o;class r{get regleListConflit(){var t,n;return null!==(t=null===(n=this.regleList)||void 0===n?void 0:n.filter(s=>s.typeId===v.R1.Conflit))&&void 0!==t?t:[]}get regleListPrerequis(){var t,n;return null!==(t=null===(n=this.regleList)||void 0===n?void 0:n.filter(s=>s.typeId===v.R1.Prerequis))&&void 0!==t?t:[]}getParticipantKey(t){var n,s;return(null===(n=t.get("perId"))||void 0===n?void 0:n.value)||(null===(s=t.get("handleId"))||void 0===s?void 0:s.value)}refreshVisibleSections(){if(!this.participantList)return;const t={};
1this.participantList.controls.forEach(n=>{const s=this.getParticipantKey(n);if(!s)return;const a=n.get("sessionList"),l=this.groupBySectionPipe.transform(a.controls);t[s]=l.map(_=>({..._,items:_.items.filter(c=>this.isSessionVisibleForParticipant(c.get("id").value,a))})).filter(_=>_.items.length>0)}),this.visibleSectionsByParticipant.set(t)}isSessionVisibleForParticipant(t,n){const s=this.regleListPrerequis.filter(a=>{var l;return null===(l=a.sesIdList)||void 0===l?void 0:l.includes(t)});return 0===s.length||s.some(a=>{var l;const _=n.controls.find(c=>c.get("id").value===a.sesIdParent);return!0===(null==_||null===(l=_.get("checked"))||void 0===l?void 0:l.value)})}hasAnySelectedSessionWithCapacite(){return!!this.sessionParticipants&&this.activiteSessionFormService.getNbrParticiantsPerSelectedSession().some(n=>{const s=this.sessionParticipants[n.sesId];return s&&null!==s.capacite&&s.capacite>0})}constructor(){var t;this.localisationService=(0,e.WQX)(Ne.A),this.activiteService=(0,e.WQX)(Ie.Z),this.activiteSessionFormService=(0,e.WQX)(It.L),this.fb=(0,e.WQX)(S.ok),this.store=(0,e.WQX)(J.il),this.router=(0,e.WQX)(X.Ix),this.destroyRef=(0,e.WQX)(e.abz),this.localisation=this.localisationService.getCurrentLocalisation(),this.currencyPipe=new E.aJo,this.groupBySectionPipe=new E.CiT,this.sessionsChanged=new e.bkB,this.isInvite="1"===(null===(t=this.router.routerState.snapshot.root.queryParams)||void 0===t?void 0:t.invite),this.sessionReglesInfos=[],this.currentLocalisation=v.fi.FR,this.currentParticipantIds=[],this.atLeastOneSessionHasSection=!1,this.hasCheckedSession=!1,this.hasInscriptionClosed=!1,this.hasInscritionOpen=!1,this.refreshingCapaciteSessions={},this.sessionsIndisponiblesMessage=null,this.PeriodeInscriptionMode=F.aG,this.visibleSectionsByParticipant=(0,e.vPA)({}),this.currentLocalisation=this.localisationService.getCurrentLocalisation()}ngOnInit(){this.store.select(ae.FB).pipe((0,I.pQ)(this.destroyRef),(0,Ye.F)()).subscribe(t=>{var n,s,a;const l=JSON.parse(null!==(n=localStorage.getItem("activite"))&&void 0!==n?n:"{}"),_=!t&&Object.keys(l).length>0?l:t;null!=_&&_.inscriptionSession&&(this.sesConfigId=null===(s=_.sessionConfig)||void 0===s?void 0:s.id,this.inscriptionSession=_.inscriptionSession,this.hasCapacite=!(null===(a=_.sessionConfig)||void 0===a||!a.capacite)&&_.sessionConfig.capacite>0,this.refreshCapacite())}),this.openedParticipantIndexArray=[0],this.participantList=this.formStepSessions.get("participantList")}refreshCapacite(t){this.fetchAndComputeCapacite().pipe((0,I.pQ)(this.destroyRef)).subscribe(n=>{this.sessionParticipants=(0,E.RYJ)(n,"sesId"),t&&(this.refreshingCapaciteSessions[t]=!1)})}fetchAndComputeCapacite(){return this.activiteService.getCapaciteAndNbrParticipantsSessionMulti(this.sesConfigId,this.activiteSessionFormService.sesHoldGroupeId).pipe((0,Y.T)(t=>{const n=this.activiteSessionFormService.getNbrParticiantsPerSelectedSession();return t.forEach(s=>{var a;const l=n.find(c=>c.sesId===s.sesId),_=null!==(a=null==l?void 0:l.nbrParticipants)&&void 0!==a?a:0;s.placesDisponibles=null!==s.nbrPlacesDisponibles?Math.max(s.nbrPlacesDisponibles-_,0):null}),t}))}updateParticipantList(t,n=!1){for(let l=this.participantList.length-1;l>=0;l--){var s,a;const _=(null===(s=this.participantList.at(l).get("perId"))||void 0===s?void 0:s.value)||(null===(a=this.participantList.at(l).get("handleId"))||void 0===a?void 0:a.value);if(!t.includes(_)){this.participantList.removeAt(l);const c=this.currentParticipantIds.indexOf(_);-1!==c&&this.currentParticipantIds.splice(c,1),n&&(this.openedParticipantIndexArray=[0])}}}updateSessionsPerParticipant(){this.participantList=this.formStepSessions.get("participantList");const t=this.participantFA.value;this.fetchAndComputeCapacite().pipe((0,I.pQ)(this.destroyRef)).subscribe(n=>{this.sessionParticipants=(0,E.RYJ)(n,"sesId"),this.patchForm(t),this.refreshVisibleSections()})}patchForm(t){const n=t.map(c=>c.perId||c.handleId).filter(c=>!!c);if(!n.length||(0,Pe.isEqual)(n,this.currentParticipantIds)&&this.participantList.length===n.length){if(!n.length)return;const c=this.participantList,d=new Map;
1c.controls.forEach((p,u)=>{const C=p.value;this.currentParticipantIds.includes(C.perId)&&C.handleId&&d.set(C.handleId,u)});for(const p of this.participantFA.value){const u=d.get(null==p?void 0:p.handleId);if(null==u)continue;const C=c.at(u),T=C.value;var s,a,l,_;null!=T&&T.perId||C.patchValue({perId:null!==(s=p.perId)&&void 0!==s?s:null,prenom:null!==(a=p.prenom)&&void 0!==a?a:"",nom:null!==(l=p.nom)&&void 0!==l?l:"",familleId:null!==(_=p.familleId)&&void 0!==_?_:null},{emitEvent:!1})}this.updateParticipantList(n)}else this.activiteSessionFormService.mapSessionInscriptionPerPerson(n).pipe((0,I.pQ)(this.destroyRef)).subscribe(c=>{this.updateParticipantList(n,!0),t.forEach(d=>{if(null==d||!d.sessionArray)return;d.sessionArray=d.sessionArray?d.sessionArray.map(A=>{var N,h;return{...A,nom:(null===(N=A.localisations)||void 0===N||null===(N=N.find(f=>f.lclzTag===this.currentLocalisation))||void 0===N?void 0:N.nom)||(null===(h=A.localisations)||void 0===h||null===(h=h.find(f=>f.lclzTag===this.localisationService.getDefaultLocalisation()))||void 0===h?void 0:h.nom)}}):void 0;const p=this.participantList.controls.findIndex(A=>{var N,h,f,$;return(null===(N=A.get("perId"))||void 0===N?void 0:N.value)&&d.perId&&(null===(h=A.get("perId"))||void 0===h?void 0:h.value)===d.perId||(null===(f=A.get("handleId"))||void 0===f?void 0:f.value)&&d.handleId&&(null===($=A.get("handleId"))||void 0===$?void 0:$.value)===d.handleId});if(-1!==p){var u,C;const A=this.participantList.at(p);A.patchValue({perId:d.perId||(null===(u=A.get("perId"))||void 0===u?void 0:u.value),handleId:d.handleId,nom:d.nom,prenom:d.prenom,admission:d.optNom,admissionId:d.optId,familleId:d.familleId});const N=A.get("sessionList");this.hasCheckedSession=!1;const h=null===(C=A.get("perId"))||void 0===C?void 0:C.value;h&&!this.currentParticipantIds.includes(h)&&this.currentParticipantIds.push(h),null==N||N.setValidators(this.atLeastOneSessionChecked()),null==N||N.updateValueAndValidity(),this.applySessionInscriptions(N,c,h)}else{var T;const A=this.fb.group({handleId:d.handleId,perId:d.perId,nom:d.nom,prenom:d.prenom,admission:d.optNom,admissionId:d.optId,familleId:d.familleId,sessionList:this.fb.array(d.sessionArray.sort((f,$)=>f.nom.localeCompare($.nom,void 0,{numeric:!0,sensitivity:"base"})).map(f=>this.fb.group({id:f.id,nom:f.nom,prix:f.items[0].prix,prixformatted:this.currencyPipe.transform(f.items[0].prix,this.localisation),secNom:f.secNom,dateDebut:f.dateDebut,dateFin:f.dateFin,periodeInscriptionMode:f.periodeInscriptionMode,secId:f.secId,item:f.items[0],checked:!1,isWaitingList:!1,isPersisted:!1})))}),N=null===(T=A.get("perId"))||void 0===T?void 0:T.value;N&&!this.currentParticipantIds.includes(N)&&this.currentParticipantIds.push(N);const h=A.get("sessionList");h.controls.forEach(f=>{f.get("secId").value&&(this.atLeastOneSessionHasSection=!0)}),this.applySessionInscriptions(h,c,N),null==h||h.setValidators(this.atLeastOneSessionChecked()),null==h||h.updateValueAndValidity(),this.openedParticipantIndexArray=[0],this.participantList.push(A)}}),this.refreshVisibleSections()})}checkIfSessionHasAnothorSessionsInOneRue(t,n,s,a,l,_,c,d){_.filter(u=>u.sesIdList.includes(t)).flatMap(u=>u.sesIdList).filter(u=>u!==t).forEach(u=>{s.controls.forEach(C=>{var T;const A=d+"-"+u,N=C.get("id").value,h=C.get("checked");if(N===u)if(h.enabled&&a)h.disable({emitEvent:!1}),l[A]={message:(0,E.I4o)([n],c),sesIds:[t]};else if(!h.disabled||a||(null===(T=l[A])||void 0===T||null===(T=T.sesIds)||void 0===T?void 0:T.length)>0){if(h.disabled&&!h.value){const f=_.filter(b=>b.sesIdList.includes(N)).flatMap(b=>b.sesIdList).filter(b=>b!==N),$=s.controls.filter(b=>f.includes(b.get("id").value)&&b.get("checked").value).map(b=>b.get("nom").value);$.length>0?l[A]={message:(0,E.I4o)($,c),sesIds:f}:(h.enable({emitEvent:!1}),l[A]={message:null,sesIds:[]})}}else h.enable({emitEvent:!1}),l[A]={message:null,sesIds:[]}})})}atLeastOneSessionChecked(){return t=>{const n=t.value;return n?n.some(a=>!0===a.checked)?null:{noSessionChecked:"At least one session must be checked"}:null}}
1applySessionInscriptions(t,n,s){t.controls.forEach(a=>{var l,_,c,d,p;const u=a.get("id").value,C=(null===(l=a.get("periodeInscriptionMode"))||void 0===l?void 0:l.value)===F.aG.Parent,T=C?this.inscriptionSession.dateDebut:null===(_=a.get("dateDebut"))||void 0===_?void 0:_.value,A=C?this.inscriptionSession.dateFin:null===(c=a.get("dateFin"))||void 0===c?void 0:c.value,N=oe()(),h=T&&A?N.isBetween(T,A,void 0,"[]"):T?N.isSameOrAfter(T):!A||N.isSameOrBefore(A);var f;h||(null===(f=a.get("checked"))||void 0===f||f.disable(),this.hasInscriptionClosed=!0);const $=n.find(te=>te.sesId===u&&te.perId===s);var b,D,V,L,H,B,q;if($)$.isWaitingList||(null===(b=a.get("checked"))||void 0===b||b.setValue(!0),null===(D=a.get("checked"))||void 0===D||D.disable(),this.hasCheckedSession=!0,this.checkIfSessionHasAnothorSessionsInOneRue(a.get("id").value,a.get("nom").value,t,a.get("checked").value,this.sessionReglesInfos,this.regleListConflit,this.currentLocalisation,s)),$.isWaitingList&&(null===(V=a.get("checked"))||void 0===V||V.patchValue(!1,{emitEvent:!1}),null===(L=a.get("isWaitingList"))||void 0===L||L.setValue(!0),null===(H=a.get("isPersisted"))||void 0===H||H.setValue(!0),0===(null===(B=this.sessionParticipants[u])||void 0===B?void 0:B.nbrPlacesDisponibles)&&(null===(q=a.get("checked"))||void 0===q||q.disable()));else if(0===(null===(d=this.sessionParticipants[u])||void 0===d?void 0:d.nbrPlacesDisponibles)&&(null!==(p=this.sessionParticipants[u])&&void 0!==p&&p.capacite||this.hasCapacite)){var W;null===(W=a.get("checked"))||void 0===W||W.disable()}h&&(this.hasInscritionOpen=!0)})}onChecked(t,n,s){this.clearSessionsIndisponibles();const a=t.get("id").value;this.refreshingCapaciteSessions[a]=!0,this.participantList.value.forEach(l=>{l.sessionList.forEach(_=>{_.checked&&(_.isWaitingList=!1,_.isPersisted=!1)})}),this.checkIfSessionHasAnothorSessionsInOneRue(a,t.get("nom").value,n,t.get("checked").value,this.sessionReglesInfos,this.regleListConflit,this.currentLocalisation,s),this.uncheckHiddenConditionalSessions(n),this.refreshVisibleSections(),this.updateSessionChecked(),this.refreshCapacite(a)}uncheckHiddenConditionalSessions(t){0!==this.regleListPrerequis.length&&t.controls.forEach(n=>{const s=n.get("checked");null!=s&&s.disabled||!0!==(null==s?void 0:s.value)||this.isSessionVisibleForParticipant(n.get("id").value,t)||s.setValue(!1)})}confirmParticipant(t){if(this.participantList.get(`${t}`).invalid)return this.participantList.get(`${t}`).markAllAsTouched(),void(this.openedParticipantIndexArray=Array.from({length:this.participantList.length},(n,s)=>s));this.fetchAndComputeCapacite().pipe((0,I.pQ)(this.destroyRef)).subscribe(n=>{this.sessionParticipants=(0,E.RYJ)(n,"sesId");const s=this.getSessionsEnDepassement();if(s.length>0||this.sessionsIndisponiblesMessage)return s.length>0&&this.setSessionsIndisponibles(s),void(this.openedParticipantIndexArray=Array.from({length:this.participantList.length},(a,l)=>l));this.openedParticipantIndexArray=[t+1]})}getSessionsEnDepassement(){if(!this.sessionParticipants)return[];const t=[],n=new Set;return this.participantList.controls.forEach(s=>{s.get("sessionList").controls.forEach(l=>{const _=l.get("id").value;if(l.get("checked").value&&!l.get("checked").disabled&&!n.has(_)){n.add(_);const d=this.sessionParticipants[_];d&&null!=d.capacite&&d.nbrParticipants>d.capacite&&t.push({nom:l.get("nom").value})}})}),t}openParticipant(t){this.openedParticipantIndexArray.includes(t)||this.openedParticipantIndexArray.push(t)}onPanelClosed(t,n){if(this.sessionsIndisponiblesMessage)return void n.open();const s=this.openedParticipantIndexArray.indexOf(t);-1!==s&&this.openedParticipantIndexArray.splice(s,1)}setSessionsIndisponibles(t){if(t&&t.length>0){const n="\xAB ",s=" \xBB",a=t.map(l=>l.nom).filter(l=>!!l).map(l=>`${n}${l}${s}`).join(", ");this.sessionsIndisponiblesMessage="Les sessions suivantes ne sont plus disponibles : "+a+". "+"Veuillez ajuster votre s\xE9lection.",this.openedParticipantIndexArray=Array.from({length:this.participantList.length},(l,_)=>_)}else this.sessionsIndisponiblesMessage=null}clearSessionsIndisponibles(){this.sessionsIndisponiblesMessage=null}addToWaitingList(t,n){if(t.patchValue({isWaitingList:!0,checked:!1}
1),this.updateSessionChecked(),t.value.isPersisted)return;const s={...n,sessionChecked:[{sesId:t.value.id,item:t.value.item,nom:t.value.nom,isWaitingList:!0,isPersisted:!1}]};this.activiteService.insertSessionEnregistrementList({sesConfigId:this.inscriptionSession.sesId,enregistrements:[s],citoyenRequerant:{id:this.user.perId,isInvite:this.isInvite,courriel:this.user.courriel,prenom:this.user.prenom,nom:this.user.nom,telephone:this.user.telephone},facture:{id:void 0,items:[]},unrequiredTaxes:this.inscriptionSession.unrequiredTaxes,isRequiredFraisService:this.inscriptionSession.isRequiredFraisService,resume:null,sesHoldGroupeId:null}).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:()=>{t.patchValue({isPersisted:!0}),this.store.dispatch(new g.Actions.ShowSnackBar("Inscription \xE0 la liste d\u2019attente effectu\xE9e avec succ\xE8s",g.EnumSnackBarType.Succes))},error:()=>{t.patchValue({isWaitingList:!1}),this.store.dispatch(new g.Actions.ShowSnackBar("Une erreur est survenue lors de l'inscription \xE0 la liste d'attente",g.EnumSnackBarType.Echec))}})}updateSessionChecked(){this.participantList.value.forEach(t=>{const n=t.sessionList.filter(a=>a.checked||a.isWaitingList).map(a=>({sesId:a.id,item:a.item,nom:a.nom,isWaitingList:a.isWaitingList,isPersisted:a.isPersisted})),s=this.participantFA.value.findIndex(a=>a.handleId===t.handleId);this.participantFA.at(s)&&this.participantFA.at(s).get("sessionChecked").patchValue(n,{emitEvent:!1})}),this.participantFA.updateValueAndValidity({onlySelf:!1,emitEvent:!1}),this.sessionsChanged.emit(this.participantFA.value)}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-activite-selection-sessions"]],inputs:{participantFA:"participantFA",formStepSessions:"formStepSessions",regleList:"regleList",user:"user"},outputs:{sessionsChanged:"sessionsChanged"},decls:11,vars:4,consts:()=>{let i,t,n,s,a,l,_,c,d,p;return i="S\xE9lection des sessions",t=" Le participant est d\xE9j\xE0 inscrit. ",n=" L'inscription pour cette session est ferm\xE9e. ",s=" L'inscription pour cette session est disponible. ",a="Confirmer",l="place(s)",_="Liste d'attente",c="Liste d'attente",d="Cette session n'est plus disponible",p="La s\xE9lection d'au moins une session est obligatoire",[["expansionPanel",""],i,t,n,s,a,l,_,c,d,p,[1,"margin-bottom-2"],[3,"formGroup"],["formArrayName","participantList"],[3,"formGroupName"],[1,"icon-status-checked","icon-grey"],[1,"icon-status-unchecked","icon-grey"],[1,"icon-status-unchecked","icon-active"],["hideToggle","true",1,"extension-panel-wrapper",3,"opened","closed","expanded"],[3,"collapsedHeight","expandedHeight"],[1,"font-size-16"],[1,"margin-top-5"],[1,"expand-icon","inverted-color"],["formArrayName","sessionList"],[1,"margin-top-1"],["role","alert",1,"sessions-indisponibles-message","margin-top-1"],[1,"margin-top-1","participant-actions-btn"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click"],[1,"section-name"],[1,"session-line"],[3,"change","formControl"],[1,"mobile-wrapper"],[1,"session-nom"],[1,"session-right-container"],[1,"session-place-disponible"],[1,"session-prix"],["mat-raised-button","",1,"list-attente-badge"],["mat-raised-button","",1,"waiting-list-btn"],[1,"margin-bottom-0","line-height-normal"],[1,"margin-bottom-1"],[1,"icon-check"],["mat-raised-button","",1,"waiting-list-btn",3,"click"],[1,"icon-add"]]},template:function(t,n){1&t&&(e.j41(0,"div")(1,"h2",11),e.pXf(2,1),e.k0s(),e.DNE(3,fo,7,0)(4,Ao,7,0)(5,ho,7,0),e.nrm(6,"hr"),e.j41(7,"div",12)(8,"div",13),e.Z7z(9,yo,19,17,"div",14,e.Vm6),e.k0s()()()),2&t&&(e.R7$(3),e.vxM(3,n.hasCheckedSession?3:-1),e.R7$(),e.vxM(4,n.hasInscriptionClosed?4:-1),e.R7$(),e.vxM(5,n.hasInscritionOpen?5:-1),e.R7$(2),e.Y8G("formGroup",n.formStepSessions),e.R7$(2),e.Dyx(n.participantList.controls))},dependencies:[St.GK,St.Z2,St.WN,U.TL,At.So,ve.$z,S.BC,S.cb,S.l_,S.j4,S.$R,S.v8,So.T],styles:[".section-name{font-weight:700!important;font-size:16px!important;margin-bottom:15px;display:block}.waiting-list-btn{position:absolute;right:10px;top:50%;transform:translateY(-50%);z-index:10;pointer-events:auto;height:40px!important;background-color:var(--primary-color)!important;color:var(--primary-color-contrast-text)!important;font-weight:500}.waiting-list-btn i{font-size:11px!important}.mobile-wrapper{display:contents}.list-attente-badge{height:40px!important;margin-left:10px;color:var(--primary-color)!important;background:var(--primary-color-opacity-20)!important}.with-waiting-btn{padding-right:195px}.session-line{padding:.5rem;border:1px solid #dee2e6;border-radius:5px;margin-bottom:.5rem;cursor:pointer;transition:.3s;width:100%!important;position:relative}.session-line .mat-internal-form-field{width:100%}.session-line .mdc-label{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.waiting-list-btn{height:40px;white-space:nowrap}.session-right-container{flex-shrink:0}@media (max-width: 600px){.mobile-wrapper{display:flex!important;align-items:flex-start!important;width:100%}.session-nom{display:flex;align-items:center;height:100%;line-height:1}.session-line{padding-bottom:12px!important}.session-line .mdc-label{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.session-line .mdc-label{flex-direction:column!important;align-items:flex-start!important;gap:8px;width:100%}.session-line.with-waiting-btn,.session-line .with-waiting-btn{padding-right:0!important}.session-line .waiting-list-btn{position:relative!important;top:0!important;right:0!important;transform:none!important;margin-top:15px!important;margin-left:auto!important;display:flex!important;width:-moz-fit-content!important;width:fit-content!important}.session-right-container{width:auto;display:flex;justify-content:flex-end!important;flex-wrap:wrap;margin-left:auto;flex-shrink:1}.list-attente-badge{margin-top:22px}}mat-checkbox{display:flex!important;align-items:center!important}span.mat-checkbox-label{flex:1;display:flex;justify-content:space-between;align-items:center}.session-nom{font-size:1rem}.session-place-disponible-prix{display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.session-place-disponible{font-size:.8rem;margin-right:.8rem;margin-left:.8rem;text-wrap:nowrap}
1.session-prix{background:var(--primary-color-opacity-20);font-weight:600;padding:.3rem;border-radius:5px;text-wrap:nowrap}.extension-panel-wrapper{box-shadow:unset!important;border:1px solid #e5e5e5;margin-bottom:36px}.sessions-indisponibles-message{color:var(--error-color, #f44336);font-size:.875rem;padding:.25rem 0}.waiting-list-button{height:50px}\n"],encapsulation:2}),r})();var Do=m(40605);let Mt=(()=>{var o;class r{constructor(){this.destroyRef=(0,e.WQX)(e.abz),this.expiration=e.hFB.required(),this.totalDurationSeconds=e.hFB.required(),this.expired=new e.bkB,this.currentTime=(0,e.vPA)(new Date),this.secondsRemaining=(0,e.EWP)(()=>{const t=this.currentTime(),n=new Date(this.expiration()),s=Math.max(0,n.getTime()-t.getTime());return Math.floor(s/1e3)}),this.minutes=(0,e.EWP)(()=>Math.floor(this.secondsRemaining()/60)),this.seconds=(0,e.EWP)(()=>this.secondsRemaining()%60),this.isExpired=(0,e.EWP)(()=>this.secondsRemaining()<=0),this.isUrgent=(0,e.EWP)(()=>this.secondsRemaining()<=120&&!this.isExpired()),this.tempsRestant="Temps restant : ",this.labelMinutes="minutes",this.labelSecondes="secondes",this.progressRatio=(0,e.EWP)(()=>{const t=this.totalDurationSeconds();return t<=0?0:Math.max(0,Math.min(1,this.secondsRemaining()/t))}),this.circumference=2*Math.PI*20,this.strokeDashoffset=(0,e.EWP)(()=>this.circumference*(1-this.progressRatio())),this.hasEmittedExpired=!1}ngOnInit(){(0,Do.Y)(1e3).pipe((0,Y.T)(()=>new Date),(0,I.pQ)(this.destroyRef)).subscribe(t=>{this.currentTime.set(t),this.secondsRemaining()<=0&&!this.hasEmittedExpired&&(this.hasEmittedExpired=!0,this.expired.emit())})}padNumber(t){return t.toString().padStart(2,"0")}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-session-hold-countdown"]],inputs:{expiration:[e.Mj6.SignalBased,"expiration"],totalDurationSeconds:[e.Mj6.SignalBased,"totalDurationSeconds"]},outputs:{expired:"expired"},standalone:!0,features:[e.aNF],decls:11,vars:9,consts:()=>{let i;return i="Temps restant",[i,["role","timer","aria-live","polite",1,"hold-countdown"],[1,"hold-countdown__info"],[1,"hold-countdown__label"],[1,"hold-countdown__value"],[1,"hold-countdown__circles"],["width","44","height","44","viewBox","0 0 44 44","aria-hidden","true",1,"hold-countdown__ring"],["cx","22","cy","22","r","20","fill","none","stroke","currentColor","stroke-width","1","opacity","0.25",1,"hold-countdown__track"],["cx","22","cy","22","r","20","fill","none","stroke","currentColor","stroke-width","3","stroke-linecap","round","transform","rotate(-90 22 22)",1,"hold-countdown__progress"],[1,"hold-countdown__inner-circle"]]},template:function(t,n){1&t&&(e.j41(0,"div",1)(1,"div",2)(2,"span",3),e.pXf(3,0),e.k0s(),e.j41(4,"span",4),e.EFF(5),e.k0s()(),e.j41(6,"div",5),e.qSk(),e.j41(7,"svg",6),e.nrm(8,"circle",7)(9,"circle",8),e.k0s(),e.joV(),e.nrm(10,"div",9),e.k0s()()),2&t&&(e.AVh("urgent",n.isUrgent())("expired",n.isExpired()),e.BMQ("aria-label",n.tempsRestant+n.minutes()+" "+n.labelMinutes+" "+n.padNumber(n.seconds())+" "+n.labelSecondes),e.R7$(5),e.Lme(" ",n.minutes(),":",n.padNumber(n.seconds())," "),e.R7$(4),e.BMQ("stroke-dasharray",n.circumference)("stroke-dashoffset",n.strokeDashoffset()))},dependencies:[k.MD],styles:[".hold-countdown[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.hold-countdown__info[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}.hold-countdown__label[_ngcontent-%COMP%]{font-size:.7rem;color:var(--dark-text-color);text-transform:none}.hold-countdown__value[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:700;color:var(--primary-color, #1976d2);font-variant-numeric:tabular-nums;letter-spacing:.02em}.hold-countdown__circles[_ngcontent-%COMP%]{position:relative;width:44px;height:44px;flex-shrink:0}.hold-countdown__ring[_ngcontent-%COMP%]{display:block;width:44px;height:44px;color:var(--primary-color, #1976d2)}.hold-countdown__inner-circle[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:28px;height:28px;border-radius:50%;background-color:var(--primary-color, #1976d2)}.hold-countdown__progress[_ngcontent-%COMP%]{transition:stroke-dashoffset 1s linear}.hold-countdown.urgent[_ngcontent-%COMP%]   .hold-countdown__value[_ngcontent-%COMP%]{color:var(--warn-color, #ff9800)}.hold-countdown.urgent[_ngcontent-%COMP%]   .hold-countdown__inner-circle[_ngcontent-%COMP%]{background-color:var(--warn-color, #ff9800)}.hold-countdown.urgent[_ngcontent-%COMP%]   .hold-countdown__ring[_ngcontent-%COMP%]{color:var(--warn-color, #ff9800)}.hold-countdown.expired[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blink 1.25s linear infinite}.hold-countdown.expired[_ngcontent-%COMP%]   .hold-countdown__value[_ngcontent-%COMP%]{color:var(--error-color, #f44336)}.hold-countdown.expired[_ngcontent-%COMP%]   .hold-countdown__inner-circle[_ngcontent-%COMP%]{background-color:var(--error-color, #f44336)}.hold-countdown.expired[_ngcontent-%COMP%]   .hold-countdown__ring[_ngcontent-%COMP%]{color:var(--error-color, #f44336)}@keyframes _ngcontent-%COMP%_blink{0%,50%{opacity:1}51%,to{opacity:.3}}@media (max-width: 500px){.hold-countdown[_ngcontent-%COMP%]{gap:.375rem}.hold-countdown__label[_ngcontent-%COMP%]{font-size:.6rem}.hold-countdown__value[_ngcontent-%COMP%]{font-size:1.2rem}.hold-countdown__circles[_ngcontent-%COMP%], .hold-countdown__ring[_ngcontent-%COMP%]{width:36px;height:36px}.hold-countdown__inner-circle[_ngcontent-%COMP%]{width:22px;height:22px}}"]}),r})();const Vo=["stepper"],xo=["stepParticipants"],Fo=["stepRenseigements"],Xo=(o,r)=>r.id,Go=()=>[];function ko(o,r){if(1&o&&e.nrm(0,"vplus-loading-spinner",52),2&o){const i=e.XpG();e.Y8G("loadingFailed",i.dataLoadingFailed)}}function jo(o,r){if(1&o){const i=e.RV6();e.j41(0,"vplus-session-hold-countdown",59),e.bIt("expired",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.onHoldExpired())}),e.k0s()}if(2&o){const i=e.XpG(2);e.Y8G("expiration",i.holdDateExpiration)("totalDurationSeconds",i.holdTotalDurationSeconds)}}function Uo(o,r){1&o&&e.nrm(0,"i",82)}function Qo(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,20),e.k0s())}function zo(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,21),e.k0s())}function wo(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,22),e.k0s())}function Ho(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,23),e.k0s())}function Bo(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,24),e.k0s())}function qo(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",62)(1,"div")(2,"h2"),e.pXf(3,11),e.k0s()(),e.j41(4,"div",83)(5,"form",84)(6,"div")(7,"div",85)(8,"mat-form-field")(9,"mat-label"),e.pXf(10,12),e.k0s(),e.nrm(11,"input",86),e.j41(12,"mat-error"),e.pXf(13,13),e.k0s()(),e.j41(14,"mat-form-field")(15,"mat-label"),e.pXf(16,14),e.k0s(),e.nrm(17,"input",87),e.j41(18,"mat-error"),e.pXf(19,15),e.k0s()()(),e.j41(20,"div",85)(21,"mat-form-field")(22,"mat-label"),e.pXf(23,16),e.k0s(),e.nrm(24,"input",88),e.DNE(25,Qo,2,0,"mat-error")(26,zo,2,0,"mat-error")(27,wo,2,0,"mat-error"),e.k0s(),e.j41(28,"mat-form-field")(29,"mat-label"),e.pXf(30,17),e.k0s(),e.nrm(31,"input",89),e.DNE(32,Ho,2,0,"mat-error")(33,Bo,2,0,"mat-error"),e.k0s()()()()(),e.j41(34,"div",68)(35,"button",69),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.back())}),e.pXf(36,18),e.k0s(),e.j41(37,"button",70),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.nextToSelectionAbonnements())}),e.pXf(38,19),e.k0s()()()}if(2&o){e.XpG();const i=e.sdS(1),t=e.XpG(2);e.Y8G("stepControl",t.citoyenSansCompteForm)("formGroup",t.citoyenSansCompteForm)("aria-labelledby",i.selectedIndex<t.EnumStepper.Identification?"readonly-title":null),e.R7$(5),e.Y8G("formGroup",t.citoyenSansCompteForm),e.R7$(20),e.vxM(25,null!=t.citoyenSansCompteForm.controls.courriel.errors&&t.citoyenSansCompteForm.controls.courriel.errors.required?25:-1),e.R7$(),e.vxM(26,t.citoyenSansCompteForm.controls.courriel.hasError("invalidEmail")?26:-1),e.R7$(),e.vxM(27,t.citoyenSansCompteForm.controls.courriel.hasError("courrielUtilise")?27:-1),e.R7$(4),e.Y8G("imask",t.appConfig.appConfig.telMaskObjet)("unmask",!0),e.R7$(),e.vxM(32,null!=t.citoyenSansCompteForm.controls.telephone.errors&&t.citoyenSansCompteForm.controls.telephone.errors.required?32:-1),e.R7$(),e.vxM(33,null!=t.citoyenSansCompteForm.controls.telephone.errors&&t.citoyenSansCompteForm.controls.telephone.errors.pattern?33:-1)}}function Wo(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"ordinal"),e.j41(3,"span"),e.pXf(4,27),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,28),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2).$implicit,n=e.XpG(3);e.R7$(),e.SpI("",e.i5U(2,2,i.ordre,n.isFr),"\xa0"),e.R7$(4),e.SpI("\xa0",e.i5U(6,5,t.get("tarif").value-i.montantRabais,n.localisation)," ")}}function Yo(o,r){if(1&o&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"ordinal"),e.j41(3,"span"),e.pXf(4,29),e.k0s(),e.EFF(5),e.nI1(6,"vplusCurrency"),e.j41(7,"span"),e.pXf(8,30),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(2).$implicit,n=e.XpG(3);e.R7$(),e.SpI("",e.i5U(2,2,i.ordre,n.isFr),"\xa0"),e.R7$(4),e.SpI("\xa0",e.i5U(6,5,t.get("tarif").value-i.montantRabais,n.localisation),"")}}function Jo(o,r){if(1&o&&e.DNE(0,Wo,9,8,"p")(1,Yo,9,8,"p"),2&o){const i=e.XpG(),t=i.$index,n=i.$count;e.vxM(0,t!==n-1?0:-1),e.R7$(),e.vxM(1,t===n-1?1:-1)}}function Zo(o,r){1&o&&e.DNE(0,Jo,2,2),2&o&&e.vxM(0,0!==r.$index?0:-1)}function Ko(o,r){if(1&o&&(e.j41(0,"div",93)(1,"h3"),e.pXf(2,25),e.k0s(),e.Z7z(3,Zo,1,1,null,null,Xo),e.j41(5,"p"),e.pXf(6,26),e.k0s()()),2&o){let i;const t=e.XpG().$implicit;e.R7$(3),e.Dyx(null!==(i=t.get("paliersRabaisFamilialOptions").value)&&void 0!==i?i:e.lJ4(0,Go))}}function es(o,r){1&o&&e.nrm(0,"span")}function ts(o,r){if(1&o&&(e.j41(0,"span",100),e.EFF(1),e.k0s()),2&o){const i=e.XpG().$implicit;e.R7$(),e.SpI(" ",i.get("tarifFormatted").value,"")}}function is(o,r){if(1&o&&(e.j41(0,"mat-error",102)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(3);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QteAdmTropFaible," ",i.get("min").value," ",1===i.get("min").value?t.EnumLabelsErreurQte.QteUneSession:t.EnumLabelsErreurQte.QteSession,"")}}function ns(o,r){if(1&o&&(e.j41(0,"mat-error",102)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(3);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QteAdmTropElevee," ",i.get("max").value," ",1===i.get("max").value?t.EnumLabelsErreurQte.QteUneSession:t.EnumLabelsErreurQte.QteSession,"")}}function os(o,r){if(1&o&&(e.j41(0,"mat-error",102)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(3);e.R7$(2),e.SjE("",t.EnumLabelsErreurQte.QteAdmTropFaible," ",i.get("min").value," ",t.EnumLabelsErreurQte.QteMax," ",i.get("max").value," ",t.EnumLabelsErreurQte.QteSession,"")}}function ss(o,r){if(1&o&&(e.j41(0,"mat-error",102)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(2).$implicit,t=e.XpG(3);e.R7$(2),e.E5c("",t.EnumLabelsErreurQte.QtesEgales," ",i.get("min").value," ",1===i.get("min").value?t.EnumLabelsErreurQte.QteUneSession:t.EnumLabelsErreurQte.QteSession,"")}}function as(o,r){if(1&o&&(e.j41(0,"div",101),e.DNE(1,is,3,3,"mat-error",102)(2,ns,3,3,"mat-error",102)(3,os,3,5,"mat-error",102)(4,ss,3,3,"mat-error",102),e.k0s()),2&o){const i=e.XpG().$implicit,t=e.XpG(3);e.R7$(),e.vxM(1,i.hasError(t.EnumTypeErreurQte.QteTropFaible)&&i.touched?1:-1),e.R7$(),e.vxM(2,i.hasError(t.EnumTypeErreurQte.QteTropElevee)&&i.touched?2:-1),e.R7$(),e.vxM(3,i.hasError(t.EnumTypeErreurQte.QteHorsLimites)&&i.touched?3:-1),e.R7$(),e.vxM(4,i.hasError(t.EnumTypeErreurQte.QtesEgales)&&i.touched?4:-1)}}function rs(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",65)(1,"div",90)(2,"div",91)(3,"div")(4,"span",92),e.EFF(5),e.k0s(),e.DNE(6,Ko,7,1,"div",93),e.k0s(),e.DNE(7,es,1,0,"span"),e.j41(8,"div",94)(9,"button",95),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(3);return e.Njj(s.decreaseQte(n))}),e.nrm(10,"i",96),e.k0s(),e.j41(11,"input",97),e.bIt("blur",function(){const n=e.eBV(i).$implicit,s=e.XpG(3);return e.Njj(s.onBlurQte(n))}),e.k0s(),e.j41(12,"button",98),e.bIt("click",function(){const n=e.eBV(i).$implicit,s=e.XpG(3);return e.Njj(s.increaseQte(n))}),e.nrm(13,"i",99),e.k0s()(),e.DNE(14,ts,2,1,"span",100),e.k0s(),e.DNE(15,as,5,4,"div",101),e.k0s()()}if(2&o){const i=r.$implicit,t=r.$index,n=e.XpG(3);e.Y8G("formGroupName",t),e.R7$(2),e.AVh("option-tarification-content-multisession",n.isMultiSession),e.R7$(3),e.JRh(i.get("trfOptNom").value?i.get("trfOptNom").value:i.get("ftbNom").value),e.R7$(),e.vxM(6,i.get("isRabaisFamilial").value&&!n.isInvite?6:-1),e.R7$(),e.vxM(7,n.isMultiSession?7:-1),e.R7$(2),e.Y8G("disabled","0"===i.get("qte").value),e.R7$(2),e.Y8G("imask",n.maskQte),e.R7$(3),e.vxM(14,n.isMultiSession?-1:14),e.R7$(),e.vxM(15,(i.hasError(n.EnumTypeErreurQte.QteHorsLimites)||i.hasError(n.EnumTypeErreurQte.QteTropElevee)||i.hasError(n.EnumTypeErreurQte.QteTropFaible)||i.hasError(n.EnumTypeErreurQte.QtesEgales))&&i.touched?15:-1)}}function ls(o,r){1&o&&(e.j41(0,"mat-error",66),e.pXf(1,31),e.k0s())}function _s(o,r){1&o&&(e.j41(0,"mat-error",66)(1,"span"),e.pXf(2,32),e.k0s()())}function cs(o,r){if(1&o&&e.EFF(0),2&o){const i=e.XpG(5);e.SpI(" ",i.labels.uneSession," ")}}function ds(o,r){if(1&o&&(e.j41(0,"span"),e.pXf(1,33),e.k0s(),e.EFF(2),e.j41(3,"span"),e.pXf(4,34),e.k0s()),2&o){const i=e.XpG(5);e.R7$(2),e.SpI("\xa0",i.qteDispo,"\xa0")}}function ps(o,r){if(1&o&&(e.j41(0,"mat-error",66),e.DNE(1,cs,1,1)(2,ds,5,1),e.k0s()),2&o){const i=e.XpG(4);e.R7$(),e.vxM(1,1===i.qteDispo?1:2)}}function Es(o,r){if(1&o&&e.DNE(0,ps,3,1,"mat-error",66),2&o){const i=e.XpG(3);e.vxM(0,!i.isMultiSession&&i.formStepTarifications.get("tarifications").hasError("limiteDepasse")&&i.formStepTarifications.get("tarifications").touched?0:-1)}}function us(o,r){if(1&o&&(e.j41(0,"mat-error",103)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(4);e.R7$(2),e.E5c("",i.EnumLabelsErreurQte.QteTropFaible," ",i.activite.inscriptionSession.min," ",1===i.activite.inscriptionSession.min?i.EnumLabelsErreurQte.QteUneSession:i.EnumLabelsErreurQte.QteSession,"")}}function Cs(o,r){if(1&o&&(e.j41(0,"mat-error",103)(1,"span")(2,"span"),e.EFF(3),e.k0s()()()),2&o){const i=e.XpG(4);e.R7$(3),e.E5c("",i.EnumLabelsErreurQte.QteTropElevee," ",i.activite.inscriptionSession.max," ",1===i.activite.inscriptionSession.max?i.EnumLabelsErreurQte.QteUneSession:i.EnumLabelsErreurQte.QteSession,"")}}function Ss(o,r){if(1&o&&(e.j41(0,"mat-error",103)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(4);e.R7$(2),e.SjE("",i.EnumLabelsErreurQte.QteTropFaible," ",i.activite.inscriptionSession.min," ",i.EnumLabelsErreurQte.QteMax," ",i.activite.inscriptionSession.max," ",i.EnumLabelsErreurQte.QteSession,"")}}function ms(o,r){if(1&o&&(e.j41(0,"mat-error",103)(1,"span"),e.EFF(2),e.k0s()()),2&o){const i=e.XpG(4);e.R7$(2),e.E5c("",i.EnumLabelsErreurQte.QtesEgales," ",i.activite.inscriptionSession.min," ",1===i.activite.inscriptionSession.min?i.EnumLabelsErreurQte.QteUneSession:i.EnumLabelsErreurQte.QteSession,"")}}function Ts(o,r){if(1&o&&(e.j41(0,"div",67),e.DNE(1,us,3,3,"mat-error",103)(2,Cs,4,3,"mat-error",103)(3,Ss,3,5,"mat-error",103)(4,ms,3,3,"mat-error",103),e.k0s()),2&o){const i=e.XpG(3);e.R7$(),e.vxM(1,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteTropFaible)&&i.tarificationFA.touched?1:-1),e.R7$(),e.vxM(2,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteTropElevee)&&i.tarificationFA.touched?2:-1),e.R7$(),e.vxM(3,i.tarificationFA.hasError(i.EnumTypeErreurQte.QteHorsLimites)&&i.tarificationFA.touched?3:-1),e.R7$(),e.vxM(4,i.tarificationFA.hasError(i.EnumTypeErreurQte.QtesEgales)&&i.tarificationFA.touched?4:-1)}}function fs(o,r){1&o&&(e.j41(0,"mat-error",105)(1,"span"),e.pXf(2,37),e.k0s()())}function As(o,r){if(1&o&&(e.j41(0,"div",106),e.EFF(1),e.k0s()),2&o){const i=e.XpG(4);e.R7$(),e.SpI(" ",i.selectionSessionsComponent.sessionsIndisponiblesMessage," ")}}function hs(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",75,2)(2,"vplus-activite-selection-sessions",104),e.bIt("sessionsChanged",function(n){e.eBV(i);const s=e.XpG(3);return e.Njj(s.onSessionsChanged(n))}),e.k0s(),e.DNE(3,fs,3,0,"mat-error",105)(4,As,2,1,"div",106),e.j41(5,"div",107)(6,"button",73)(7,"span"),e.pXf(8,35),e.k0s()(),e.j41(9,"button",70),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.nextFromSessions())}),e.j41(10,"span"),e.pXf(11,36),e.k0s()()()()}if(2&o){e.XpG();const i=e.sdS(1),t=e.XpG(2);e.Y8G("aria-labelledby",i.selectedIndex<t.EnumStepper.SelectionSession?"readonly-title":null)("completed",i.selectedIndex>=t.EnumStepper.SelectionSession),e.R7$(2),e.Y8G("formStepSessions",t.formStepSessions)("participantFA",t.membreFA)("regleList",t.activite.sessionConfig.regleList)("user",t.user),e.R7$(),e.vxM(3,t.isSessionsTouchedAndInvalid?3:-1),e.R7$(),e.vxM(4,t.showGlobalSessionIndisponibleMessage&&null!=t.selectionSessionsComponent&&t.selectionSessionsComponent.sessionsIndisponiblesMessage?4:-1)}}function Is(o,r){1&o&&e.nrm(0,"vplus-loading-spinner")}function Ns(o,r){1&o&&(e.j41(0,"mat-error"),e.pXf(1,40),e.k0s())}function Ms(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",76,3),e.DNE(2,Is,1,0,"vplus-loading-spinner"),e.j41(3,"div",108),e.nrm(4,"vplus-activite-citoyen-rense
1ignements-additionnels",109),e.DNE(5,Ns,2,0,"mat-error"),e.j41(6,"div",107)(7,"button",110),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.onStepperBack())}),e.pXf(8,38),e.k0s(),e.j41(9,"button",111),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.nextFromRenseigementAdditionnels())}),e.pXf(10,39),e.k0s()()()()}if(2&o){e.XpG();const i=e.sdS(1),t=e.XpG(2);e.Y8G("aria-labelledby",i.selectedIndex<t.EnumStepper.Renseignements?"readonly-title":null)("completed",(null==t.formStepParticipants?null:t.formStepParticipants.valid)&&i.selectedIndex>=t.EnumStepper.Renseignements),e.R7$(2),e.vxM(2,t.isChargementRenseignements?2:-1),e.R7$(),e.Y8G("hidden",t.isChargementRenseignements),e.R7$(),e.Y8G("participantsFA",t.membreFA)("questSupp",null==t.activite?null:t.activite.questSupp)("form",t.formStepParticipants)("isSession",!0),e.R7$(),e.vxM(5,t.isRenseignementsAddTouchedAndInvalid?5:-1)}}function Ps(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-step",77,4)(2,"div",112)(3,"h2",113),e.pXf(4,41),e.k0s()(),e.nrm(5,"vplus-activite-articles-supplementaires-selecteur",114),e.j41(6,"div",68)(7,"button",110),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.onStepperBack())}),e.pXf(8,42),e.k0s(),e.j41(9,"button",70),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.nextFromArticles())}),e.j41(10,"span"),e.pXf(11,43),e.k0s()()()()}if(2&o){e.XpG();const i=e.sdS(1),t=e.XpG(2);e.Y8G("completed",i.selectedIndex>=t.EnumStepper.Articles)("aria-labelledby",i.selectedIndex<t.EnumStepper.Articles?"readonly-title":null),e.R7$(5),e.Y8G("articlesFA",t.articlesFA)}}function Os(o,r){1&o&&(e.j41(0,"mat-error",66)(1,"span"),e.pXf(2,44),e.k0s()())}function gs(o,r){if(1&o&&e.EFF(0),2&o){const i=e.XpG(4);e.SpI(" ",i.labels.uneSessionAchat," ")}}function vs(o,r){if(1&o&&(e.j41(0,"span"),e.pXf(1,45),e.k0s(),e.EFF(2),e.j41(3,"span"),e.pXf(4,46),e.k0s()),2&o){const i=e.XpG(4);e.R7$(2),e.SpI("\xa0",i.qteDispo,"\xa0")}}function bs(o,r){if(1&o&&(e.j41(0,"mat-error",66),e.DNE(1,gs,1,1)(2,vs,5,1),e.k0s()),2&o){const i=e.XpG(3);e.R7$(),e.vxM(1,1===i.qteDispo?1:2)}}function Rs(o,r){1&o&&(e.j41(0,"mat-error",66)(1,"span"),e.pXf(2,47),e.k0s()())}function $s(o,r){if(1&o){const i=e.RV6();e.j41(0,"p",115),e.pXf(1,48),e.k0s(),e.j41(2,"a",116),e.bIt("click",function(){e.eBV(i);const n=e.XpG(3);return e.Njj(n.displayDescription(n.inscriptionSession.politiqueRemboursement))}),e.pXf(3,49),e.k0s(),e.EFF(4,". ")}}function Ls(o,r){if(1&o){const i=e.RV6();e.j41(0,"mat-horizontal-stepper",60,0),e.bIt("selectionChange",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.onStepChange(n))}),e.DNE(2,Uo,1,0,"ng-template",61)(3,qo,39,11,"mat-step",62),e.j41(4,"mat-step",63)(5,"div")(6,"h2"),e.pXf(7,5),e.k0s()(),e.j41(8,"div",64),e.Z7z(9,rs,16,10,"div",65,e.Vm6),e.k0s(),e.DNE(11,ls,2,0,"mat-error",66)(12,_s,3,0,"mat-error",66)(13,Es,1,1)(14,Ts,5,4,"div",67),e.j41(15,"div",68)(16,"button",69),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.isInvite?n.backFromSelection():n.back())}),e.pXf(17,6),e.k0s(),e.j41(18,"button",70),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextToSelectionAbonnes())}),e.pXf(19,7),e.k0s()()(),e.j41(20,"mat-step",71,1)(22,"vplus-activite-selection-participants",72),e.bIt("selectedFamId",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.handleSelectedFamId(n))})("selectedPerId",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.handleSelectedPerId(n))}),e.k0s(),e.j41(23,"div",68)(24,"button",73),e.pXf(25,8),e.k0s(),e.j41(26,"button",74),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.nextFromParticipants())}),e.j41(27,"span"),e.pXf(28,9),e.k0s()()()(),e.DNE(29,hs,12,8,"mat-step",75)(30,Ms,11,9,"mat-step",76)(31,Ps,12,3,"mat-step",77),e.j41(32,"mat-step",78)(33,"vplus-square-card-payment",79),e.bIt("onLaunchedPayment",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.updateOrderLaunched(!0))})("onPreparedPayment",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.order(n))})("onErrorPayment",function(){e.eBV(i);const n=e.XpG(2);
1return e.Njj(n.updateOrderLaunched(!1))})("onPaymentLater",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.onPaymentLater(n))})("onCardReady",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.onCardReady())})("onSquareDeconnecte",function(n){e.eBV(i);const s=e.XpG(2);return e.Njj(s.squareDeconnecte=n)}),e.k0s(),e.DNE(34,Os,3,0,"mat-error",66)(35,bs,3,1,"mat-error",66)(36,Rs,3,0,"mat-error",66)(37,$s,5,0),e.j41(38,"div",68)(39,"button",69),e.bIt("click",function(){e.eBV(i);const n=e.XpG(2);return e.Njj(n.onStepperBack())}),e.pXf(40,10),e.k0s(),e.j41(41,"button",80),e.nrm(42,"vplus-button-icon",81),e.j41(43,"span"),e.EFF(44),e.k0s()()()()()}if(2&o){const i=e.sdS(1),t=e.XpG(2);e.R7$(3),e.vxM(3,t.isInvite?3:-1),e.R7$(),e.Y8G("stepControl",t.formStepTarifications)("formGroup",t.formStepTarifications)("aria-labelledby",i.selectedIndex<t.EnumStepper.Selection?"readonly-title":null),e.R7$(5),e.Dyx(t.tarificationFA.controls),e.R7$(2),e.vxM(11,t.formStepTarifications.get("tarifications").hasError("required")&&t.formStepTarifications.get("tarifications").touched?11:-1),e.R7$(),e.vxM(12,!t.isMultiSession&&!t.isCapaciteSessionNan&&t.inscriptionSession.capacite-t.inscriptionSession.nbrParticipantInclusPending<=0?12:13),e.R7$(2),e.vxM(14,(t.tarificationFA.hasError(t.EnumTypeErreurQte.QteTropFaible)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QteTropElevee)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QteHorsLimites)||t.tarificationFA.hasError(t.EnumTypeErreurQte.QtesEgales))&&t.tarificationFA.touched?14:-1),e.R7$(6),e.Y8G("stepControl",t.formStepParticipants)("formGroup",t.formStepParticipants)("completed",i.selectedIndex>=2)("aria-labelledby",i.selectedIndex<t.EnumStepper.Participants?"readonly-title":null),e.R7$(2),e.Y8G("sessionList",t.activite.sessionConfig.sessionList)("tarificationFA",t.tarificationFA)("participantFA",t.membreFA)("user",t.user)("canOrderForCurrentUser",t.canOrderForCurrentUser)("isInvite",t.isInvite)("famillesCurrentUser",t.famillesCurrentUser)("familleMembreHashList",t.familleMembreHashList)("contexte",t.EnumTypeInscriptionCode.Session)("ageTrfs",t.ageTrfs)("allowInvite",t.inscriptionSession.allowInvite)("isAllowedInscWithRestr",t.inscriptionSession.isAllowedInscWithRestr),e.R7$(4),e.Y8G("disabled",t.isChargementRenseignements),e.R7$(3),e.vxM(29,t.isMultiSession?29:-1),e.R7$(),e.vxM(30,t.activite.isConfigSuppQuest&&t.hasAtLeastOneTrue?30:-1),e.R7$(),e.vxM(31,t.hasArticlesSupp?31:-1),e.R7$(),e.Y8G("completed",!1),e.R7$(),e.Y8G("itemsGroup",t.itemsGroup)("items",t.itemsPayment)("unrequiredTaxes",t.inscriptionSession.unrequiredTaxes)("optionsVersement",null==t.inscriptionSession?null:t.inscriptionSession.optionsVersement)("activityNom",t.activityNom)("isConfigVersement",null==t.inscriptionSession?null:t.inscriptionSession.isConfigVersement)("isRequiredFraisService",t.inscriptionSession.isRequiredFraisService)("orderLaunched",t.orderLaunched)("user",t.citoyenSansCompteForm.value)("addToFraisService",t.addToFraisService)("eventDate",t.eventDate)("allOccurrences",t.allOccurrences)("installationsBySite",t.installationsBySite)("isActivityAndShouldModifyFS",t.isActivityAndShouldModifyFS)("isAllowedInscWithRestr",t.isAllowedInscWithRestr),e.R7$(),e.vxM(34,0!==t.limiteDepasseCode||t.isCapaciteSessionNan?-1:34),e.R7$(),e.vxM(35,1!==t.limiteDepasseCode||t.isCapaciteSessionNan?-1:35),e.R7$(),e.vxM(36,2!==t.limiteDepasseCode||t.isCapaciteSessionNan?-1:36),e.R7$(),e.vxM(37,t.inscriptionSession.politiqueRemboursement.id?37:-1),e.R7$(4),e.Y8G("disabled",t.squareDeconnecte.deconnecte?t.squareDeconnecte.sectionVide:!t.isCardReady&&t.requiredCheckout),e.R7$(),e.Y8G("isSubmitting",t.orderLaunched),e.R7$(2),e.JRh(t.requiredCheckout&&!t.dateVersementSupp?t.labels.payerMntn:t.labels.passerCommande)}}function ys(o,r){if(1&o){const i=e.RV6();e.j41(0,"div")(1,"div")(2,"vplus-req-toolbar",53),e.bIt("back",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.backToActivite())}),e.DNE(3,jo,1,2,"vplus-session-hold-countdown",54),e.k0s(),e.j41(4,"div",55)(5,"div",56)(6,"div",57),e.DNE(7,Ls,45,50,"mat-horizontal-stepper",58),e.k0s()()()()()}if(2&o){const i=e.XpG();e.R7$(2),e.Y8G("title",i.inscriptionSession.inscNom)("sticky",i.isHoldActive),e.R7$(),e.vxM(3,i.isHoldActive&&i.holdDateExpiration?3:-1),e.R7$(4),e.vxM(7,i.dataLoaded?7:-1)}}let Ds=(()=>{var o;
1class r{constructor(){var t;this.store=(0,e.WQX)(J.il),this.activiteService=(0,e.WQX)(Ie.Z),this.activiteSessionFormService=(0,e.WQX)(It.L),this.utilisateurService=(0,e.WQX)(Ke.$),this.router=(0,e.WQX)(X.Ix),this.actions$=(0,e.WQX)(Q.En),this.activatedRoute=(0,e.WQX)(X.nX),this.location=(0,e.WQX)(k.hb),this.formBuilder=(0,e.WQX)(S.ok),this.localisationService=(0,e.WQX)(Ne.A),this.asyncCourrielValidators=(0,e.WQX)(ct.H),this.appConfig=(0,e.WQX)(We.o),this.destroyRef=(0,e.WQX)(e.abz),this.dialog=(0,e.WQX)(dt.bZ),this.elementRef=(0,e.WQX)(e.aKT),this.localisation=this.localisationService.getCurrentLocalisation(),this.currencyPipe=new E.aJo,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.EnumTypeInscriptionCode=F.bO,this.famillesCurrentUser=[],this.familleMembreHashList={},this.isInvite="1"===(null===(t=this.router.routerState.snapshot.root.queryParams)||void 0===t?void 0:t.invite),this.stepOneAndInvite=this.isInvite,this.addToFraisService=0,this.isActivityAndShouldModifyFS=!1,this.installationsBySite=[],this.EnumStepper={Identification:0,Selection:0,Participants:0,SelectionSession:0,Renseignements:0,Articles:0},this.participantListUpdated=[],this.isAllowedInscWithRestr=!1,this.sesHoldGroupeId=null,this.holdDateExpiration=null,this.isHoldActive=!1,this.holdTotalDurationSeconds=0,this.itemsPayment=[],this.defaultLocalisation=this.appConfig.appConfig.localisationDefaut,this.accesIds={},this.maskQte={mask:"000000"},this.ageTrfs=new Map,this.familles=[],this.hasArticlesSupp=!1,this.isRenseignementsAddTouchedAndInvalid=!1,this.isSessionsTouchedAndInvalid=!1,this.showGlobalSessionIndisponibleMessage=!1,this.itemsGroup=null,this.actCampSDV="3C484D84-76A7-4BE3-A199-1AE326C122D6",this.isActCampSDV=!1,this.actCampSPB="D1D2EE83-7162-4A53-AB58-6EBBA00BE7BA",this.isActCampSPB=!1,this.participantFamilletListInscrit={},this.initialized=!1,this.idempotencyKey=(0,E.SiN)(),this.isCardReady=!1,this.EnumTypeErreurQte=v.Hy,this.EnumLabelsErreurQte=v.oO,this.isChargementRenseignements=!1,this.labels={placeholderNom:"Nom",uneSession:"Il y a une session disponible, veuillez ajuster votre s\xE9lection",uneSessionAchat:"Il n'y a plus qu'une session disponible, veuillez ajuster votre s\xE9lection",payerMntn:"Payer maintenant",passerCommande:"Passer la commande"},this.selectIsSearchHeaderVisible$=this.store.select(g.selectIsSearchHeaderVisible),this.isFr=this.localisationService.getCurrentLocalisation()===v.fi.FR,this.squareDeconnecte={deconnecte:!1,sectionVide:!1}}ngOnInit(){var t;this.initStepperClickInterceptor();const n=(0,E.SiN)();this.citoyenSansCompteForm=this.formBuilder.group({perId:new S.MJ(n),prenom:new S.MJ(null,[S.k0.required,(0,E.zl_)()]),nom:new S.MJ(null,[S.k0.required,(0,E.zl_)()]),courriel:new S.MJ(null,[(0,E.Bjz)()],this.asyncCourrielValidators.validateCourriel()),telephone:new S.MJ(null,[S.k0.required,S.k0.pattern(this.appConfig.appConfig.telPattern)]),langCom:this.localisationService.getCurrentLocalisation()===v.fi.FR?v.ch.FR:v.ch.EN}),null===(t=this.citoyenSansCompteForm.get("courriel"))||void 0===t||t.valueChanges.pipe((0,I.pQ)(this.destroyRef),(0,Ye.F)(),(0,j.n)(s=>this.utilisateurService.getInvite(s))).subscribe(({perId:s})=>{var a;null===(a=this.citoyenSansCompteForm.get("perId"))||void 0===a||a.patchValue(null!=s?s:n)}),this.loadData()}loadData(){this.initialized||(this.initialized=!0,(0,Ze.z)([this.store.select(g.selectCurrentUser),this.store.select(ae.FB)]).pipe((0,I.pQ)(this.destroyRef)).subscribe(([t,n])=>{var s,a,l,_,c,d,p,u,C;this.user=t;const T=JSON.parse(null!==(s=localStorage.getItem("activite"))&&void 0!==s?s:"{}");if(this.activite=!n&&Object.keys(T).length>0?T:n,this.inscriptionSession=this.activite.inscriptionSession,this.isActCampSDV=(null===(a=this.activite)||void 0===a?void 0:a.id)===this.actCampSDV,this.isActCampSPB=(null===(l=this.activite)||void 0===l?void 0:l.id)===this.actCampSPB,this.activityNom=(null===(_=this.activite.localisations)||void 0===_||null===(_=_.find(f=>f.lclzTag===(this.isFr?v.fi.FR:v.fi.EN)))||void 0===_?void 0:_.nom)||(null===(c=this.activite.localisations)||void 0===c||null===(c=c.find(f=>f.nom))||void 0===c?void 0:c.nom)||"",this.inscriptionSession=this.activite.inscriptionSession,this.activite.sessionConfig||(this.activite.sessionConfig={regleList:[],sessionList:[]}),this.activite.sessionConfig.regleList=(null!==(d=this.activite.sessionConfig.regleList)&&void 0!==d?d:[]).filter(f=>f.isActif),this.isCapaciteSessionNan=this.capaciteIsNan(this.inscriptionSession.capacite),this.hasAtLeastOneTrue=(0,E.Yl9)(this.activite.questSupp),this.isMultiSession=null===(p=this.activite.inscriptionSession)||void 0===p?void 0:p.hasMultiSession,this.hasArticlesSupp=this.activite.isConfigArticlesSupp&&this.activite.articlesSupp.length>0,this.inscriptionSession.tarifications=this.inscriptionSession.tarifications.filter(f=>f.trfOptTypId!==F.G5.Familial&&!f.invisibleEnLigne),this.inscriptionSession.tarifications.forEach(f=>{var $,b;f.tarifFormatted=this.currencyPipe.transform(f.tarif,this.localisation),f.fteId=(0,E.SiN)(),f.acces=(0,E.NzR)(f.acces,this.localisationService.getCurrentLocalisation(),this.defaultLocalisation),this.accesIds[f.id]=f.acces.map(D=>D.id),this.ageTrfs.set(f.id,[null!==($=f.ageMin)&&void 0!==$?$:null,null!==(b=f.ageMax)&&void 0!==b?b:null,null==f?void 0:f.dateMinRef,null==f?void 0:f.dateMaxRef])}),this.activatedRoute.snapshot.queryParams.act||this.location.replaceState(null,null,`/activite/session-selection?act=${x.A.sanitize(this.inscriptionSession.inscNom)}`,""),["D321B0CA-530D-4595-AA8A-511329E49C82","80A5DF09-C016-497D-8602-1D72C106D6A1"].includes(this.activite.id)&&(this.addToFraisService=5,this.isActivityAndShouldModifyFS=!0),this.isMultiSession=null!==(u=null===(C=this.activite.inscriptionSession)||void 0===C?void 0:C.hasMultiSession)&&void 0!==u&&u,this.isMultiSession)this.eventDate=this.activite.periode;else{var A;const f=((null===(A=this.activite)||void 0===A?void 0:A.evenements)||[]).filter($=>oe()($.dateHeureFin).isSameOrAfter(oe()(),"minute")).sort(($,b)=>oe()($.dateHeureDebut).diff(oe()(b.dateHeureDebut)));if(f.length>0){var N,h;const $=f[0],b=(0,E.cA3)($.dateHeureDebut,$.dateHeureFin,this.isFr,!0);this.eventDate=`${null!==(N=null==b?void 0:b.dateComplete)&&void 0!==N?N:""} ${null!==(h=null==b?void 0:b.temps)&&void 0!==h?h:""}`.trim(),this.allOccurrences=f.slice(1).map(D=>{const V=(0,E.cA3)(D.dateHeureDebut,D.dateHeureFin,this.isFr,!0);return`${V.dateComplete} ${V.temps}`.trim()})}else this.eventDate=this.activite.periode,this.allOccurrences=[]}this.installationsBySite=(0,E.LO9)(this.activite.installations.map(f=>({siteNom:f.siteNom,installationNom:f.instNom,adresse:f.adresse}))),this.user?(0,De.p)([this.activiteService.checkDisponibiliteSession(this.inscriptionSession.sesId,this.user.perId,this.user.courriel),this.utilisateurService.getFamilleByPerId(this.user.perId)]).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:([f,$])=>{var b;this.canOrderForCurrentUser=f.canOrder,this.famillesCurrentUser=$.filter(D=>D.membres.filter(V=>V.perId!==this.user.perId).length>0),this.famillesCurrentUser.sort((D,V)=>D.nom.trim().localeCompare(V.nom.trim())),this.famillesCurrentUser.forEach(D=>{this.familleMembreHashList[D.id]=D.membres.filter(V=>V.perId!==this.user.perId)}),this.famillesCurrentUser.length>0&&(this.famIdSelected=this.famillesCurrentUser[0].id),this.initForm(),this.isInvite||null===(b=this.stepper)||void 0===b||b.reset(),this.dataLoaded=!0}}):(this.initForm(),this.dataLoaded=!0),this.EnumStepper.Identification=this.isInvite?0:-1,this.EnumStepper.Selection=this.isInvite?1:0,this.EnumStepper.Participants=this.isInvite?2:1,this.EnumStepper.SelectionSession=this.isInvite?3:2,this.EnumStepper.Renseignements=this.activite.isConfigSuppQuest&&this.hasAtLeastOneTrue?this.isInvite&&this.isMultiSession?4:this.isInvite||this.isMultiSession?3:2:-1,this.EnumStepper.Articles=this.hasArticlesSupp?-1!==this.EnumStepper.Renseignements?this.EnumStepper.Renseignements+1:this.isInvite&&this.isMultiSession?4:this.isInvite||this.isMultiSession?3:2:-1}),this.store.select(g.selectCurrentUser).pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{this.currentUser=t}),this.actions$.pipe((0,Q.gp)(ye.En.addChildFamilySuccess),(0,I.pQ)(this.destroyRef),(0,j.n)(()=>this.utilisateurService.getFamilleByPerId(this.currentUser.perId))).subscribe(t=>{this.familles=t;const n=t.filter(s=>s.membres.some(a=>a.perId!==this.user.perId)).sort((s,a)=>s.nom.trim().localeCompare(a.nom.trim()));this.famillesCurrentUser.push(...n),this.famillesCurrentUser.sort((s,a)=>s.nom.trim().localeCompare(a.nom.trim())),this.famillesCurrentUser.forEach(s=>{this.familleMembreHashList[s.id]=s.membres.filter(a=>a.perId!==this.user.perId)})}))}ionViewWillEnter(){this.loadData()}ionViewWillLeave(){this.dataLoaded=!1,this.initialized=!1}onContentClick(){this.store.dispatch(g.Actions.setIsSearchHeaderVisible({payload:!1}))}onCardReady(){this.isCardReady=!0}initForm(){var t,n;this.formStepTarifications=this.formBuilder.group({tarifications:new S.Yp([],[(0,y.YK)(),this.qteValidator(),(0,E.UW_)(null===(t=this.activite.inscriptionSession)||void 0===t?void 0:t.min,null===(n=this.activite.inscriptionSession)||void 0===n?void 0:n.max)])}),this.tarificationFA=this.formStepTarifications.get("tarifications"),this.tarificationFA.setDefaultControlBuilder(()=>(0,E.nqI)(this.formBuilder)),this.tarificationFA.patchValue(this.inscriptionSession.tarifications),this.formStepParticipants=this.formBuilder.group({membres:new S.Yp([])}),this.membreFA=this.formStepParticipants.get("membres"),this.membreFA.setDefaultControlBuilder(this.createMembreFormControl.bind(this)),this.formStepParticipants.statusChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(s=>{"VALID"===s&&(this.isRenseignementsAddTouchedAndInvalid=!1)}),this.formStepSessions=this.formBuilder.group({participantList:this.formBuilder.array([])}),this.activiteSessionFormService.setStepSessionForm(this.formStepSessions),this.formStepArticles=this.formBuilder.group({articlesSupp:new S.Yp([])}),this.articlesFA=this.formStepArticles.get("articlesSupp"),this.articlesFA.setDefaultControlBuilder(()=>(0,E.eqW)(this.formBuilder)),this.articlesFA.patchValue(this.activite.articlesSupp),this.formStepSessions.statusChanges.pipe((0,I.pQ)(this.destroyRef)).subscribe(s=>{"VALID"===s&&(this.isSessionsTouchedAndInvalid=!1)})}
1nextToSelectionAbonnements(){this.citoyenSansCompteForm.invalid&&this.stepOneAndInvite?this.citoyenSansCompteForm.markAllAsTouched():(this.stepOneAndInvite=!1,this.user=this.citoyenSansCompteForm.value,this.activiteService.checkDisponibiliteSession(this.inscriptionSession.sesId,this.user.perId,this.user.courriel).pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>this.canOrderForCurrentUser=t.canOrder),this.stepper.next())}onStepperBack(){var t=this;return(0,w.A)(function*(){if(t.isHoldActive&&t.sesHoldGroupeId&&t.stepper.selectedIndex-1<=t.EnumStepper.SelectionSession){if(!(yield t.showPopupAvertissementRetour()))return;try{yield(0,Me._)(t.activiteService.releaseSessionHold(t.sesHoldGroupeId))}catch{}t.resetHoldState()}t.stepper.previous()})()}onFirstNext(){this.formStepTarifications.markAllAsTouched()}capaciteIsNan(t){return isNaN(t)||null===t}qteValidator(){return t=>{if(this.isMultiSession)return null;let n=0;return(null==t?void 0:t.value.length)>=1&&t.value.forEach(s=>{var a,l;0!==(null==s||null===(a=s.trfOptOptions)||void 0===a?void 0:a.length)?null==s||null===(l=s.trfOptOptions)||void 0===l||l.forEach(_=>{n+=parseInt(_.qte,10)*s.qte}):n+=parseInt(s.qte,10)}),this.qteDispo=this.inscriptionSession.capacite-this.inscriptionSession.nbrParticipantInclusPending,this.sommeQte=n,n+this.inscriptionSession.nbrParticipantInclusPending>this.inscriptionSession.capacite&&null!==this.inscriptionSession.capacite?(this.limiteDepasseCode=null,{limiteDepasse:!0}):null}}increaseQte(t){(0,E.fKT)(t)}decreaseQte(t){(0,E.XOW)(t)}onBlurQte(t){(0,E.T6x)(t)}createMembreFormControl(){var t,n,s,a;const l=(0,y.cf)(this.formBuilder,this.citoyenRenseignementsAdd);null===(t=l.get("perId"))||void 0===t||t.addAsyncValidators(this.checkDisponibiliteSession(!0)),null===(n=l.get("perId"))||void 0===n||n.updateValueAndValidity(),null===(s=l.get("courriel"))||void 0===s||s.addAsyncValidators(this.checkDisponibiliteSession(!1)),null===(a=l.get("courriel"))||void 0===a||a.updateValueAndValidity();const _=[(0,y.z3)(this.famillesCurrentUser,this.isInvite)];return this.inscriptionSession.isAllowedInscWithRestr||_.push((0,y.uc)(this.accesIds,this.isInvite),(0,E.CBP)(this.ageTrfs,this.isInvite),(0,y._d)(this.tarificationFA,this.isInvite)),l.addValidators(_),l.updateValueAndValidity({emitEvent:!1}),l}checkDisponibiliteSession(t){let n,s=null;return a=>""===a.value||null===a.value?(0,ie.of)(null):a.value===n?(0,ie.of)(s):(0,_t.O)(300).pipe((0,j.n)(()=>this.activiteService.checkDisponibiliteSession(this.inscriptionSession.sesId,t?a.value:null,t?null:a.value)),(0,Y.T)(l=>(n=a.value,l.canOrder?(s=null,null):(s={existAbonnement:!0},{existAbonnement:!0}))),(0,Je.W)(()=>null))}nextToSelectionAbonnes(){var t;this.tarificationFA.invalid?this.formStepTarifications.markAllAsTouched():(this.stepParticipants.reset(),null===(t=this.stepRenseigements)||void 0===t||t.reset(),this.participantsComponent.generateParticipants(),setTimeout(()=>{this.stepper.next()}))}preremplirTousLesRenseignements(){var t=this;return(0,w.A)(function*(){const n=t.formStepParticipants.get("membres");if(!n)return;const s=yield Promise.all(n.controls.map(function(){var a=(0,w.A)(function*(l){var _,c,d;const p=null===(_=l.get("courriel"))||void 0===_?void 0:_.value,C=null!==(c=(yield(0,Me._)(t.utilisateurService.getInvite(p))).perId)&&void 0!==c?c:null===(d=l.get("perId"))||void 0===d?void 0:d.value;var T;return C?(null===(T=l.get("perId"))||void 0===T||T.patchValue(C),{group:l,participant:yield(0,Me._)(t.activiteService.getParticipant(C,t.activite.id,null,null))}):{group:l}});return function(l){return a.apply(this,arguments)}}()));(0,ie.of)(s).pipe((0,I.pQ)(t.destroyRef)).subscribe(a=>{a.forEach(({group:l,participant:_})=>{const c=l.get("renseigementAdditionnels");if(c){var d;const p=(null==_?void 0:_.renseignementsSupplementaires)||{};0===Object.keys(p).length&&Object.keys(c.controls).forEach(A=>{p[A]=c.get(A)instanceof S.Yp?[]:""});const u=t.normalizeRenseignements(c,p,t.citoyenRenseignementsAdd.questSupp);c.patchValue(u),c.markAsUntouched(),c.updateValueAndValidity();const C=null===(d=c.get("isFraisGardeEnfant"))||void 0===d?void 0:d.value,T=c.get("personneACharge");C||(null==T||T.clearValidators(),null==T||T.clear()),null==T||T.controls.forEac
1h(A=>{var N,h;const f=null===(N=A.get("numeroAssuranceSociale"))||void 0===N?void 0:N.value;null===(h=A.get("isEditNas"))||void 0===h||h.setValue(!f)})}})})})()}normalizeRenseignements(t,n,s){const a=0===Object.keys(n).length,l={},_=[{prenom:"",nom:"",telephoneCellulaire:"",courriel:"",lien:""}],c=null==s?void 0:s.hasTuteurLeg;return Object.keys(t.controls).forEach(d=>{const p=t.get(d),u=n[d];l[d]=p instanceof S.Yp?a||!Array.isArray(u)?p.value:"tuteurLegal"===d&&c&&Array.isArray(u)&&0===u.length?_:u:a||null==u?p.value:u}),l}nextFromParticipants(){var t=this;return(0,w.A)(function*(){if(t.stepRenseigements&&t.formStepParticipants.get("membres").controls.forEach(s=>{const a=s.get("renseigementAdditionnels");null==a||a.disable({emitEvent:!1}),null==a||a.updateValueAndValidity({onlySelf:!0})}),t.formStepParticipants.invalid)return void t.formStepParticipants.markAllAsTouched();t.isChargementRenseignements=!0;try{t.stepRenseigements&&(yield t.preremplirTousLesRenseignements());const s=t.tarificationFA.value.filter(a=>a.isRabaisFamilial&&a.qte>0);if(1===t.famillesCurrentUser.length&&s.length>0){const a=t.famillesCurrentUser[0].id,l=s.map(_=>t.getParticipantsSessionEnregistrementInscritByFamId$(a,t.activite.id,_.ftbId));yield(0,Me._)((0,De.p)(l))}t.stepper.next(),t.enableStepRenseigements()}finally{t.isChargementRenseignements=!1}const n=t.formStepParticipants.get("membres");t.inscriptionSession.isAllowedInscWithRestr&&(t.isAllowedInscWithRestr=n.controls.some(s=>{var a;return!(null!==(a=s.get("isAllRestrictionsRespected"))&&void 0!==a&&a.value)}))})()}enableStepRenseigements(){this.stepRenseigements&&setTimeout(()=>{this.formStepParticipants.get("membres").controls.forEach(t=>{const n=t.get("renseigementAdditionnels");null==n||n.enable(),null==n||n.markAsUntouched({onlySelf:!1}),null==n||n.updateValueAndValidity()})})}initStepperClickInterceptor(){var t=this;this.elementRef.nativeElement.addEventListener("click",n=>{if(!this.isHoldActive||!this.sesHoldGroupeId)return;const s=n.target.closest(".mat-step-header");if(!s)return;const l=Array.from(this.elementRef.nativeElement.querySelectorAll(".mat-step-header")).indexOf(s);l<=this.EnumStepper.SelectionSession&&this.stepper.selectedIndex>this.EnumStepper.SelectionSession&&(n.stopPropagation(),n.preventDefault(),this.showPopupAvertissementRetour().then(function(){var _=(0,w.A)(function*(c){if(c)try{yield(0,Me._)(t.activiteService.releaseSessionHold(t.sesHoldGroupeId)),t.resetHoldState(),t.selectionSessionsComponent.refreshCapacite(),t.stepper.selectedIndex=l}catch{}});return function(c){return _.apply(this,arguments)}}()))},!0)}onStepChange(t){var n;switch(this.detectCurrentStep(t.selectedIndex)){case"renseignementAdditionnels":null===(n=this.content)||void 0===n||n.scrollToTop(0);break;case"sessions":this.selectionSessionsComponent.updateSessionsPerParticipant();break;case"resume":this.setPayment();break;default:return}}detectCurrentStep(t){return[{name:"identification",visibility:this.isInvite},{name:"selection",visibility:!0},{name:"participants",visibility:!0},{name:"sessions",visibility:this.isMultiSession},{name:"renseignementAdditionnels",visibility:this.activite.isConfigSuppQuest&&this.hasAtLeastOneTrue},{name:"articlesAdditionnels",visibility:this.hasArticlesSupp},{name:"resume",visibility:!0}].filter(a=>a.visibility)[t].name}onSessionsChanged(t){this.participantListUpdated=t,this.formStepSessions.get("participantList").patchValue(t),this.formStepSessions.get("participantList").updateValueAndValidity()}setPayment(){const t=this.tarificationFA.value.filter(a=>a.qte>0),n=this.articlesFA.value.filter(a=>a.qte>0);if(this.isMultiSession){var s;const a=null!==(s=this.participantListUpdated)&&void 0!==s?s:this.formStepSessions.get("participantList").value,l=[],_=[];let d,c={};t.map(p=>{d=(0,E.K5W)((0,E.eo)(this.participantFamilletListInscrit[p.ftbId]));const u=this.membreFA.value.filter(C=>C.optId===p.id).filter(C=>!d.has(C.perId));p.isRabaisFamilial&&!this.isInvite&&(c=(0,E.oAF)(p.paliersRabaisFamilialOptions,u,this.participantFamilletListInscrit[p.ftbId],!0))}),a.forEach((p,u)=>{p.sessionChecked.some(C=>!C.isWaitingList)&&_.push({nom:p.prenom+" "+p.nom+" - "+(p.admission||p.optNom),items:[]}),p.sessionChecked.filter(C=>!C.isWaitingList).forEach(C=>{var T,A,N;let h={totalWithRabais:null,membreWithRabais:null};(this.isActCampSDV&&null!=C&&null!==(T=C.nom)&&void 0!==T&&T.includes("CDJ")&&(null==C||null===(A=C.nom)||void 0===A||!A.includes("D\xc9COUVERTE"))||this.isActCampSPB&&null!=C&&null!==(N=C.nom)&&void 0!==N&&N.includes("CDJ")||!this.isActCampSDV&&!this.isActCampSPB)&&(h=d.has(p.perId)?(0,E.QvJ)(p.perId,d):(0,E.z7n)(p.perId,c));const f=(0,E.SiN)();l.push({id:f,nom:C.nom+" - "+C.item.nom,qte:1,prixFormatted:this.currencyPipe.transform(Number(C.item.prix),this.localisation),prix:Number(C.item.prix),total:Number(C.item.prix),totalWithRabais:h.totalWithRabais,membreWithRabais:h.membreWithRabais}),_[u].items.push({id:f,nom:C.nom,qte:1}
1)})}),n.length>0&&n.forEach(p=>{const u={nom:p.nom,items:[]};_.push(u);const C=(0,E.SiN)(),T={id:C,articleId:p.id,nom:p.nom,qte:p.qte,prix:Number(p.prix),prixFormatted:this.currencyPipe.transform(Number(p.prix),this.localisation),total:Number(p.prix)*p.qte,totalWithRabais:null,membreWithRabais:null};l.push(T),u.items.push({id:C,nom:p.nom,qte:p.qte})}),this.itemsPayment=l,this.itemsGroup=_,this.requiredCheckout=this.itemsPayment.length>0&&0!==this.itemsPayment.reduce((p,u)=>p+u.prix,0)}else{this.requiredCheckout=0!==t.map(_=>_.tarif).reduce((_,c)=>_+c,0)||0!==n.map(_=>_.prix*_.qte).reduce((_,c)=>_+c,0);const a=t.map(_=>{var c;let d={totalWithRabais:null,membreWithRabais:null};return _.isRabaisFamilial&&!this.isInvite&&(d=(0,E.oAF)(_.paliersRabaisFamilialOptions,this.membreFA.value.filter(p=>p.optId===_.id),this.participantFamilletListInscrit[_.ftbId])),{id:_.id,nom:null!==(c=_.trfOptNom)&&void 0!==c?c:_.ftbNom,prix:_.tarif,prixFormatted:_.tarifFormatted,qte:_.qte,total:G()(_.tarif*_.qte,2),totalWithRabais:d.totalWithRabais,membreWithRabais:d.membreWithRabais}}),l=n.map(_=>(0,E.$iX)(_,this.localisation));this.itemsPayment=[...a,...l],this.itemsPayment.forEach(_=>{_.totalWithRabais&&(_.totalWithRabaisFormatted=this.currencyPipe.transform(_.totalWithRabais,this.localisation)),_.total&&(_.totalFormatted=this.currencyPipe.transform(_.total,this.localisation))})}}nextFromRenseigementAdditionnels(){if(this.formStepParticipants.invalid)return this.formStepParticipants.markAllAsTouched(),void(this.isRenseignementsAddTouchedAndInvalid=!0);this.isRenseignementsAddTouchedAndInvalid=!1,this.stepper.next()}nextFromArticles(){this.stepper.next()}nextFromSessions(){var t=this;return(0,w.A)(function*(){var n,s,a,l,_;if(t.formStepSessions.invalid||0===(null===(n=t.formStepSessions.get("participantList").value)||void 0===n?void 0:n.length))return t.formStepSessions.markAllAsTouched(),t.isSessionsTouchedAndInvalid=!(null!==(l=t.selectionSessionsComponent)&&void 0!==l&&l.sessionsIndisponiblesMessage),void(t.showGlobalSessionIndisponibleMessage=!(null===(_=t.selectionSessionsComponent)||void 0===_||!_.sessionsIndisponiblesMessage));if(t.isSessionsTouchedAndInvalid=!1,t.showGlobalSessionIndisponibleMessage=!1,null!==(s=t.inscriptionSession)&&void 0!==s&&s.hasMultiSession&&null!==(a=t.selectionSessionsComponent)&&void 0!==a&&a.hasAnySelectedSessionWithCapacite()){if(!(yield t.showPopupInformation()))return;const C=t.activiteSessionFormService.getNbrParticiantsPerSelectedSession();try{var c,d,p;const T=yield(0,Me._)(t.activiteService.createSessionHold({sesConfigId:t.inscriptionSession.sesId,sessions:C.map(A=>({sesId:A.sesId,sesHoldNbrPlaces:A.nbrParticipants})),perId:t.isInvite?null:(null===(c=t.user)||void 0===c?void 0:c.perId)||null,perCourriel:t.isInvite?null===(d=t.citoyenSansCompteForm)||void 0===d||null===(d=d.get("courriel"))||void 0===d?void 0:d.value:(null===(p=t.user)||void 0===p?void 0:p.courriel)||null,nbrParticipants:t.membreFA.length}));if(!T.success)return t.selectionSessionsComponent.setSessionsIndisponibles(T.sessionsIndisponibles),t.selectionSessionsComponent.refreshCapacite(),void(t.showGlobalSessionIndisponibleMessage=!0);T.sesHoldGroupeId&&(t.sesHoldGroupeId=T.sesHoldGroupeId,t.holdDateExpiration=new Date(T.dateExpiration),t.holdTotalDurationSeconds=T.dureeTotaleSeconds,t.isHoldActive=!0,t.activiteSessionFormService.setHold(T.sesHoldGroupeId,t.holdDateExpiration))}catch{return void t.store.dispatch(new g.Actions.ShowSnackBar("Une erreur est survenue lors de la r\xE9servation des sessions. Veuillez r\xE9essayer.",g.EnumSnackBarType.Echec))}}t.stepper.next()})()}updateOrderLaunched(t){this.orderLaunched=t}onPaymentLater(t){this.dateVersementSupp=t}order(t){if(this.isMultiSession&&this.membreFA.value.find(s=>{var a;return 0===(null===(a=s.sessionChecked)||void 0===a?void 0:a.length)}))return(0,E.TuW)({code:v.zh.ERROR_MULTISESSION},this.store,g),this.orderLaunched=!1,void this.store.dispatch(ne.Jm());(0,ie.of)(this.isMultiSession).pipe((0,I.pQ)(this.destroyRef),(0,j.n)(n=>n?this.activiteService.getCapaciteAndNbrParticipantsSessionMulti(this.inscriptionSession.sesId,this.sesHoldGroupeId).pipe((0,Y.T)(s=>{const a=this.activiteSessionFormService.getNbrParticiantsPerSelectedSession(),l=s.some(_=>{var c;const d=null===(c=a.find(p=>p.sesId===_.sesId))||void 0===c?void 0:c.nbrParticipants;return _.capacite<_.nbrParticipants+d});
1return l&&(this.limiteDepasseCode=2,this.orderLaunched=!1),l}),(0,Oe.p)(s=>!this.orderRequested&&this.capaciteIsNan(this.inscriptionSession.capacite)||!s)):this.activiteService.getCapaciteAndNbrParticipantsSession(this.inscriptionSession.sesId,this.sesHoldGroupeId).pipe((0,re.M)(s=>{var a,l,_;if(this.inscriptionSession.capacite=null==s?void 0:s.capacite,this.inscriptionSession.nbrParticipantInclusPending=null==s?void 0:s.nbrParticipants,!this.capaciteIsNan(null===(a=this.inscriptionSession)||void 0===a?void 0:a.capacite))if((null===(l=this.inscriptionSession)||void 0===l?void 0:l.capacite)-(null==s?void 0:s.nbrParticipants)==0)this.limiteDepasseCode=0,this.orderLaunched=!1;else if(this.sommeQte+(null==s?void 0:s.nbrParticipants)>(null===(_=this.inscriptionSession)||void 0===_?void 0:_.capacite)){var c;this.limiteDepasseCode=1,this.orderLaunched=!1,this.qteDispo=(null===(c=this.inscriptionSession)||void 0===c?void 0:c.capacite)-(null==s?void 0:s.nbrParticipants)}}),(0,Oe.p)(s=>!this.orderRequested&&this.capaciteIsNan(this.inscriptionSession.capacite)||this.sommeQte+s.nbrParticipants<=this.inscriptionSession.capacite))),(0,j.n)(()=>{t.paymentBody&&(t.paymentBody.idempotencyKey=this.idempotencyKey);const n=new Map;this.membreFA.value.forEach(c=>{(c.sessionChecked||[]).filter(d=>d.isWaitingList&&!d.isPersisted).forEach(d=>{var p;const u=null===(p=d.item)||void 0===p?void 0:p.ftbIdRef;n.set(u,(n.get(u)||0)+1)})});const l=[...this.tarificationFA.value.filter(c=>c.qte>0).map(c=>{const d=n.get(c.ftbId)||0,p=c.qte-d;if(p<=0)return null;let u={totalWithRabais:null,membreWithRabais:null};const C=this.membreFA.value.filter(h=>h.optId===c.id),T=(0,E.K5W)((0,E.eo)(this.participantFamilletListInscrit[c.ftbId])),A=C.filter(h=>!T.has(h.perId));c.isRabaisFamilial&&!this.isInvite&&(u=(0,E.oAF)(c.paliersRabaisFamilialOptions,A,this.participantFamilletListInscrit[c.ftbId]));const N=(0,E.Js3)(u.membreWithRabais,C,T);return{id:c.fteId,facturableNom:c.ftbNom,facturableId:c.ftbId,montantFinal:c.tarif,qte:p,total:G()(c.tarif*c.qte,2),totalWithRabais:u.totalWithRabais,membreWithRabais:N}}).filter(Boolean),...this.articlesFA.value.filter(c=>c.qte>0).map(c=>(0,E.$iX)(c,this.localisation))],_={sesConfigId:this.inscriptionSession.sesId,enregistrements:this.membreFA.value,citoyenRequerant:{id:this.user.perId,isInvite:this.isInvite,courriel:this.user.courriel,prenom:this.user.prenom,nom:this.user.nom,telephone:this.user.telephone},facture:{id:l.length>0?(0,E.SiN)():void 0,items:l},unrequiredTaxes:this.inscriptionSession.unrequiredTaxes,isRequiredFraisService:this.inscriptionSession.isRequiredFraisService,resume:null==t?void 0:t.resume,sesHoldGroupeId:this.sesHoldGroupeId};return this.orderRequested=!0,this.requiredCheckout?this.activiteService.createSessionEnregistrementCheckout(_,null==t?void 0:t.paymentBody):this.activiteService.insertSessionEnregistrementList(_)})).subscribe({next:n=>{n.status!==v.B2.Completed&&this.requiredCheckout?this.store.dispatch(new g.Actions.ShowSnackBar("\xC9chec \xE0 la compl\xE9tion de paiement, le statut est"+` ${n.status}`,g.EnumSnackBarType.Echec)):(this.isHoldActive=!1,this.sesHoldGroupeId=null,this.holdDateExpiration=null,this.activiteSessionFormService.clearHold(),this.canDeactivate=!0,this.router.navigate(["/activite/session-confirmation"],{queryParamsHandling:"merge"}),localStorage.removeItem("activite"))},error:n=>{this.orderLaunched=this.orderRequested=!1,null!=n&&n.isSquareError&&(this.idempotencyKey=(0,E.SiN)()),(0,E.TuW)(n,this.store,g)}})}displayDescription(t){this.dialog.open(ge.V,{data:{title:"POLITIQUE DE REMBOURSEMENT",htmlContent:t.description,understandAction:!0},width:v.Uq.Medium})}onInputBlur(t){var n;t.patchValue(null===(n=t.value)||void 0===n?void 0:n.trim())}backToActivite(){this.router.navigateByUrl("/activite")}back(){this.location.back()}backFromSelection(){this.tarificationFA.controls.forEach(t=>{t.get("qte").reset("0")}),this.onStepperBack()}handleSelectedFamId(t){this.famIdSelected=t}handleSelectedPerId(t){var n;const s=this.membreFA.value.find(_=>_.perId===t);if(!s)return;const l=null===(n=this.tarificationFA.value.filter(_=>_.qte>0).find(_=>_.isRabaisFamilial&&_.id===s.optId))||void 0===n?void 0:n.ftbId;l&&l&&(s.type===v.z5.CurrentUser?this.famillesCurrentUser.forEach(_=>{this.getParticipantsSessionEnregistrementInscritByFamId$(_.id,this.activite.id,l).subscribe()}):this.famIdSelected&&this.getParticipantsSessionEnregistrementInscritByFamId$(this.famIdSelected,this.activite.id,l).subscribe())}getParticipantsSessionEnregistrementInscritByFamId$(t,n,s){return this.participantFamilletListInscrit[s]||(this.participantFamilletListInscrit[s]={}),this.participantFamilletListInscrit[s][t]||(this.participantFamilletListInscrit[s][t]=[]),this.activiteService.getParticipantsSessionEnregistrementInscritByFamId(t,n,s).pipe((0,I.pQ)(this.destroyRef),(0,re.M)(a=>{this.participantFamilletListInscrit[s][t]=a}))}unloadNotification(t){if(this.isHoldActive&&this.sesHoldGroupeId)return t.preventDefault(),!1}
1onPageHide(){this.isHoldActive&&this.sesHoldGroupeId&&this.activiteService.releaseSessionHold(this.sesHoldGroupeId).pipe((0,I.pQ)(this.destroyRef)).subscribe()}onHoldExpired(){const t=this.sesHoldGroupeId;this.isHoldActive=!1,this.sesHoldGroupeId=null,this.holdDateExpiration=null,this.activiteSessionFormService.clearHold(),t&&this.activiteService.releaseSessionHold(t).pipe((0,I.pQ)(this.destroyRef)).subscribe(),this.dialog.open(ge.V,{data:{title:"Temps \xE9coul\xE9",htmlContent:"Votre d\xE9lai pour compl\xE9ter l'inscription est expir\xE9. Votre s\xE9lection n'a pas \xE9t\xE9 r\xE9serv\xE9e. Veuillez de nouveau confirmer vos sessions.",actionCustom:{boutonPrimaire:"S\xE9lectionner les sessions"}},width:v.Uq.Medium,disableClose:!0}).afterClosed().pipe((0,le.s)(1)).subscribe(()=>{this.stepper.selectedIndex=this.EnumStepper.SelectionSession,this.selectionSessionsComponent.refreshCapacite()})}showPopupInformation(){return new Promise(t=>{this.dialog.open(ge.V,{data:{title:"Information",htmlContent:`<p>${"\xC0 partir de l'\xE9tape suivante, votre s\xE9lection sera enregistr\xE9e afin de vous laisser le temps de finaliser votre inscription."}</p><p>${"Les sessions choisies seront r\xE9serv\xE9es pendant 15 minutes par participant ajout\xE9."}</p><p>${"Pass\xE9 ce d\xE9lai, ou si vous quittez le processus avant la validation, les sessions seront automatiquement lib\xE9r\xE9es."}</p>`,actionCustom:{boutonPrimaire:"Continuer",boutonSecondaire:"Annuler"}},width:v.Uq.Medium,disableClose:!0}).afterClosed().pipe((0,le.s)(1)).subscribe(s=>{t(!0===s)})})}showPopupAvertissementRetour(){return new Promise(t=>{this.dialog.open(ge.V,{data:{title:"Attention",htmlContent:"Revenir \xE0 l'\xE9tape de s\xE9lection des sessions ou \xE0 une \xE9tape ant\xE9rieure entra\xEEnera la perte de leur r\xE9servation.",actionCustom:{boutonPrimaire:"Revenir et perdre ma r\xE9servation",boutonSecondaire:"Annuler"}},width:v.Uq.Medium,disableClose:!0}).afterClosed().pipe((0,le.s)(1)).subscribe(s=>{t(!0===s)})})}resetHoldState(){this.isHoldActive=!1,this.sesHoldGroupeId=null,this.holdDateExpiration=null,this.holdTotalDurationSeconds=0,this.activiteSessionFormService.clearHold()}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-activite-session"]],viewQuery:function(t,n){if(1&t&&(e.GBs(se.W9,5),e.GBs(Vo,5),e.GBs(xo,5),e.GBs(Fo,5),e.GBs(Nt,5),e.GBs(he.D,5),e.GBs(Ae.N,5)),2&t){let s;e.mGM(s=e.lsd())&&(n.content=s.first),e.mGM(s=e.lsd())&&(n.stepper=s.first),e.mGM(s=e.lsd())&&(n.stepParticipants=s.first),e.mGM(s=e.lsd())&&(n.stepRenseigements=s.first),e.mGM(s=e.lsd())&&(n.selectionSessionsComponent=s.first),e.mGM(s=e.lsd())&&(n.participantsComponent=s.first),e.mGM(s=e.lsd())&&(n.citoyenRenseignementsAdd=s.first)}},hostBindings:function(t,n){1&t&&e.bIt("beforeunload",function(a){return n.unloadNotification(a)},!1,e.tSv)("pagehide",function(){return n.onPageHide()},!1,e.tSv)},decls:5,vars:10,consts:()=>{let i,t,n,s,a,l,_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,L,H,B,q,W,te,_e,ce,de,pe,Ee,ue,Ce,Se,me,Te,fe,R,xe,Fe,Xe,Ge,ke,je,Ue,Qe,ze,we,He,Be;return i="S\xE9lection",t="Participants",n="S\xE9lection des sessions",s="Renseignements additionnels",a="Articles compl\xE9mentaires",l="R\xE9sum\xE9 et paiement",_="S\xE9lection",c=" Retour ",d="Suivant",p="Retour",u="Suivant",C=" Retour ",T="Identification",A="Pr\xE9nom",N=" Champ obligatoire ",h="Nom",f=" Champ obligatoire ",$="Courriel",b="T\xE9l\xE9phone",D=" Retour ",V="Suivant",L=" Champ obligatoire ",H=" Courriel non valide ",B=" Adresse courriel d\xE9j\xE0 utilis\xE9e par un compte citoyen ",q=" Champ obligatoire ",W=" T\xE9l\xE9phone non valide ",te="Rabais familial appliqu\xE9 d\xE8s le 2e inscrit.",_e="Calcul\xE9 au r\xE9sum\xE9 de la commande",ce="inscrit :",de=" de r\xE9duction",pe="inscrit et plus :",Ee=" de r\xE9duction par inscription additionnelle",ue=" Veuillez pr\xE9ciser au moins une quantit\xE9 ",Ce="Il n'y a plus de place disponible",Se="Il y a",me="place(s) disponible(s), veuillez ajuster votre s\xE9lection",Te="Retour",fe="Suivant",R="La s\xE9lection d'au moins une session par participant est obligatoire",xe="Retour",Fe="Suivant",Xe="Certains champs sont invalides",Ge="Articles compl\xE9mentaires",ke="Retour",je="Suivant",Ue="Il n'y a plus de place disponible",Qe="Il n'y a plus que",ze="place(s) disponible(s), veuillez ajuster votre s\xE9lection",we="Au moins une session s\xE9lectionn\xE9e n'est plus disponible, veuillez ajuster votre s\xE9lection",He=" En proc\xE9dant au paiement, vous acceptez notre ",Be="politique de remboursement",[["stepper",""],["stepParticipants",""],["stepSessions",""],["stepRenseigements",""],["stepArticles",""],_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,L,H,B,q,W,te,_e,ce,de,pe,Ee,ue,Ce,Se,me,Te,fe,R,xe,Fe,Xe,Ge,ke,je,Ue,Qe,ze,we,He,Be,[1,"hide-desktop","mobile-header",3,"forceBackDefaultHref","defaultHref","headerTitle","returnButtonType","menuId"],["id","activiteOptionTarification",3,"click"],[3,"loadingFailed"],[3,"back","title","sticky"],["reqToolbarExtra","",1,"session-hold-countdown-header",3,"expiration","totalDurationSeconds"],[1,"standard-page-content"],[1,"stepper-container"],[1,"stepper-form-activite"],["linear","true",1,"inscription-stepper"],["reqToolbarExtra","",1,"session-hold-countdown-header",3,"expired","expiration","totalDurationSeconds"],["linear","true",1,"inscription-stepper",3,"selectionChange"],["matStepperIcon","edit"],["label","Identification","name","identification",3,"stepControl","formGroup","aria-labelledby"],["label",i,"name","selection",3,"stepControl","formGroup","aria-labelledby"],["formArrayName","tarifications",1,"margin-top-2"],[3,"formGroupName"],[1,"custom-mat-error-message","margin-top-1"],[1,"margin-top"],[1,"flex-space-between","spacing-top"],["type","button","mat-stroked-button","",1,"custom-button-standard","custom-button-stroked",3,"click"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click"],["label",t,"name","participants",3,"stepControl","formGroup","completed","aria-labelledby"],[3,"selectedFamId","selectedPerId","sessionList","tarificationFA","participantFA","user","canOrderForCurrentUser","isInvite","famillesCurrentUser","fam
1illeMembreHashList","contexte","ageTrfs","allowInvite","isAllowedInscWithRestr"],["type","button","mat-stroked-button","","matStepperPrevious","",1,"custom-button-standard","custom-button-stroked","custom-button-stepper"],["type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click","disabled"],["label",n,3,"aria-labelledby","completed"],["label",s,3,"aria-labelledby","completed"],["label",a,3,"completed","aria-labelledby"],["label",l,"aria-labelledby","readonly-title",3,"completed"],[3,"onLaunchedPayment","onPreparedPayment","onErrorPayment","onPaymentLater","onCardReady","onSquareDeconnecte","itemsGroup","items","unrequiredTaxes","optionsVersement","activityNom","isConfigVersement","isRequiredFraisService","orderLaunched","user","addToFraisService","eventDate","allOccurrences","installationsBySite","isActivityAndShouldModifyFS","isAllowedInscWithRestr"],["id","card-button","type","button","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"disabled"],["iconClass","icon-shopping-cart",3,"isSubmitting"],[1,"icon-check"],[1,"margin-top-2"],[1,"max-720",3,"formGroup"],[1,"form-field-inline-section"],["required","","matInput","","type","text","formControlName","prenom"],["required","","matInput","","type","text","formControlName","nom"],["matInput","","type","email","required","true","formControlName","courriel"],["matInput","","type","tel","maskTelephoneEvents","","formControlName","telephone",3,"imask","unmask"],[1,"border-bottom","padding-tarification"],[1,"option-tarification-content"],[1,"option-tarification-nom"],[1,"rabais-familial"],[1,"stepper-input"],[3,"click","disabled"],[1,"icon-delete"],["matInput","","formControlName","qte",3,"blur","imask"],[3,"click"],[1,"icon-add"],[1,"option-tarification-montant"],[1,"small-margin-top","container-mat-errors-sessions"],[1,"action-delete"],[1,"custom-mat-error-message","action-delete","margin-top-1"],[3,"sessionsChanged","formStepSessions","participantFA","regleList","user"],[1,"margin-top-1"],["role","alert",1,"sessions-indisponibles-message","margin-top-1"],[1,"flex-space-between","margin-top-2"],[3,"hidden"],[3,"participantsFA","questSupp","form","isSession"],["type","button","mat-stroked-button","",1,"custom-button-standard","custom-button-stroked","custom-button-stepper",3,"click"],["type","button","color","primary","mat-raised-button","",1,"custom-button-full","custom-button-standard","custom-button-stepper",3,"click"],[1,"margin-bottom-12"],[1,"form-section-title-underline"],[3,"articlesFA"],[1,"inline-text"],[1,"politique",3,"click"]]},template:function(t,n){1&t&&(e.nrm(0,"vplus-mobile-header",50),e.j41(1,"ion-content",51),e.nI1(2,"async"),e.bIt("click",function(){return n.onContentClick()}),e.DNE(3,ko,1,1,"vplus-loading-spinner",52)(4,ys,8,4),e.k0s()),2&t&&(e.Y8G("forceBackDefaultHref",!0)("defaultHref","/activite")("headerTitle","")("returnButtonType","back-button")("menuId","activiteOpionTraification"),e.R7$(),e.AVh("filter-searche-global-active",e.bMT(2,8,n.selectIsSearchHeaderVisible$)),e.R7$(2),e.vxM(3,n.dataLoaded?4:3))},dependencies:[et.fg,U.rl,U.nJ,U.TL,ve.$z,z.V5,z.M6,z.FR,z.xJ,S.qT,S.me,S.BC,S.cb,S.YS,S.j4,S.JD,S.$R,S.v8,E.xGI,pt.Zq,be.f,se.W9,tt.x,Et.z,Re.N,it.X,O.b,Ae.N,Mt,he.D,Nt,k.Jj,nt.a,E.ihR],styles:[".session-hold-countdown-header{margin-left:auto}.order-btn{text-align:right}@media (max-width: 500px){.option-tarification-content .rabais-familial h3,.option-tarification-content .rabais-familial p{margin-top:0;margin-bottom:0}}.container-mat-errors-sessions{width:calc(86% + 10px)}@media (max-width: 500px){.option-tarification-content.option-tarification-content-multisession{grid-template-columns:1fr 0 95px}}.option-tarification-montant{text-align:right;font-weight:550;white-space:nowrap}.option-tarification-nom{font-weight:450}vplus-activite-session .ion-custom-button-standard i{margin-right:.5rem}vplus-activite-session .custom-mat-error-message{font-size:14px}vplus-activite-session .margin-top-minus-10{margin-top:-10px}vplus-activite-session .custom-mat-error-field{font-size:13.5px}@media (max-width: 361px){vplus-activite-session .flex-space-between{flex-direction:column-reverse;align-items:flex-end;
1gap:10px}}vplus-activite-session .stepper-form-activite .mat-horizontal-content-container form{min-height:100px}.membre-container{padding-top:.5rem}.participant-actions-btn{display:flex;justify-content:flex-end}.step-two-form-content{display:flex;flex-wrap:wrap;justify-content:space-between}.step-two-form-content .field-container{margin-bottom:0!important}.step-two-form-content .mat-mdc-form-field,.step-two-form-content .field-custom-wrapper{flex-grow:1;width:100%;margin-bottom:1rem}@media (min-width: 960px){.step-two-form-content .mat-mdc-form-field,.step-two-form-content .field-custom-wrapper{min-width:calc(50% - 18px);max-width:calc(50% - 18px)}.step-two-form-content .mat-mdc-form-field.full-width,.step-two-form-content .field-custom-wrapper.full-width{min-width:initial;max-width:initial}}.extension-panel-container mat-expansion-panel{box-shadow:unset!important;border:1px solid #e5e5e5;margin-bottom:36px}.extension-panel-container .mat-expansion-panel-body{padding:0 24px 24px!important}.mat-step-header[aria-labelledby=readonly-title]{pointer-events:none}.mat-step-header[aria-labelledby=readonly-title] .mat-step-label{color:var(--disabled-mat-step-header)}\n"],encapsulation:2}),r})();var $e=m(55430),Le=m(52486),Pt=m(98472),Vs=m(37903),xs=m(52125),K=m(81387);const mt=()=>{const o=(0,e.WQX)(J.il),r=(0,e.WQX)(X.Ix),{state:i}=r.getCurrentNavigation().extras;return o.select(ae.FB).pipe((0,le.s)(1),(0,Y.T)(t=>{var n,s;if(t)return!0;const a=r.parseUrl(r.url),l=(null!==(n=null===(s=a.root.children.primary)||void 0===s?void 0:s.segments)&&void 0!==n?n:[]).map(c=>c.path).filter(c=>"connexion"!==c),_={...a.queryParams,...i};return r.createUrlTree(l,{queryParams:_,queryParamsHandling:"merge"}),!0}))},st=()=>{const o=(0,e.WQX)(J.il),r=(0,e.WQX)(Ke.$);return o.select(g.selectCurrentUser).pipe((0,le.s)(1),(0,j.n)(i=>null==i||!i.perId||i.invite?(0,ie.of)(!0):r.getCurrentUser().pipe((0,Y.T)(t=>(o.dispatch(new g.Actions.UpdateUserSuccess({...i,accesId:t.accesId,adhIds:t.adhIds,isAllRestrictionsRespected:t.isAllRestrictionsRespected})),!0)),(0,Je.W)(()=>(0,ie.of)(!0)))))};var Xs=m(17965),Gs=m(9183),ks=m(37e3),js=m(87748);const Us=["SquarePayment"],Ot=(o,r)=>r.id;function Qs(o,r){if(1&o&&e.nrm(0,"vplus-loading-spinner",23),2&o){const i=e.XpG();e.Y8G("loadingFailed",i.dataLoadingFailed)}}function zs(o,r){if(1&o&&(e.j41(0,"div",47)(1,"div")(2,"span"),e.EFF(3),e.nI1(4,"vplusMoment"),e.k0s(),e.j41(5,"span"),e.EFF(6),e.k0s(),e.j41(7,"span"),e.EFF(8),e.k0s()(),e.j41(9,"span"),e.EFF(10),e.nI1(11,"vplusCurrency"),e.k0s()()),2&o){const i=r.$implicit,t=e.XpG(3);e.R7$(3),e.SpI(" ",e.ii3(4,6,i.dateDemande,!1,t.isFr?"DD/MM/YYYY":"MM/DD/YYYY",null)," "),e.R7$(3),e.JRh(t.EnumTypeTransactionLabel[i.transType]),e.R7$(2),e.JRh(t.EnumMethodePaiementLabelByCode[i.methode]),e.R7$(),e.AVh("warn",i.transType===t.ArrayTypeTransaction.Refund.id),e.R7$(),e.SpI(" ",e.i5U(11,11,i.montant,t.localisation)," ")}}function ws(o,r){if(1&o&&(e.j41(0,"div",46)(1,"h4"),e.pXf(2,9),e.k0s(),e.Z7z(3,zs,12,14,"div",47,Ot),e.k0s()),2&o){const i=e.XpG(2);e.AVh("transaction-mobile",i.isMobile()),e.R7$(3),e.Dyx(null==i.facture?null:i.facture.transactions)}}function Hs(o,r){1&o&&(e.j41(0,"span"),e.pXf(1,10),e.k0s())}function Bs(o,r){1&o&&(e.j41(0,"span"),e.pXf(1,11),e.k0s())}function qs(o,r){1&o&&(e.j41(0,"span"),e.pXf(1,12),e.k0s())}function Ws(o,r){1&o&&(e.j41(0,"span"),e.pXf(1,13),e.k0s())}function Ys(o,r){if(1&o&&(e.j41(0,"span"),e.pXf(1,15),e.k0s(),e.EFF(2),e.nI1(3,"date")),2&o){const i=e.XpG().$index,t=e.XpG(2);e.R7$(2),e.SpI("\xa0",e.ii3(3,1,null==t.transactionsPayed[i]?null:t.transactionsPayed[i].transDate,t.isFr?"d MMMM y":"mediumDate",null,t.isFr?null:"en-US")," ")}}function Js(o,r){if(1&o&&(e.j41(0,"span"),e.pXf(1,16),e.k0s(),e.EFF(2),e.nI1(3,"vplusMoment")),2&o){const i=e.XpG().$implicit,t=e.XpG(2);e.R7$(2),e.SpI("\xa0",e.ii3(3,1,i.date,!1,t.formatDateTime,null)," ")}}function Zs(o,r){if(1&o&&(e.j41(0,"div",48)(1,"div")(2,"span"),e.pXf(3,14),e.k0s(),e.EFF(4),e.nI1(5,"vplusCurrency"),e.k0s(),e.j41(6,"div"),e.DNE(7,Ys,4,6)(8,Js,4,6),e.k0s()()),2&o){const i=r.$implicit,t=r.$index,n=e.XpG(2);e.AVh("paid",n.transactionsPayed[t])("future",n.transactionsPayed[t-1]&&0!==(null==n.transactionsPayed[t-1]?null:n.transactionsPayed[t-1].montant)||!n.transactionsPayed[t]&&0===t)("timeline-failed",!n.transactionsPayed[t]&&(null==i?null:i.enRetard)),e.R7$(4),e.E5c("",t+1,"",n.isFr?" ":"",": ",e.i5U(5,12,i.montant,n.localisation)," "),e.R7$(2),e.AVh("action-delete",!n.transactionsPayed[t]&&(null==i?null:i.enRetard)),e.R7$(),e.vxM(7,n.transactionsPayed[t]&&0!==(null==n.transactionsPayed[t]?null:n.transactionsPayed[t].montant)?7:8)}}function Ks(o,r){1&o&&(e.j41(0,"div",41),e.nrm(1,"i",49),e.j41(2,"span"),e.pXf(3,17),e.k0s()())}function ea(o,r){1&o&&(e.j41(0,"div",51),e.nrm(1,"mat-progress-spinner",54),e.j41(2,"span",55),e.pXf(3,20),e.k0s()()),2&o&&(e.R7$(),e.Y8G("diameter",50))}function ta(o,r){if(1&o&&(e.j41(0,"div",50)(1,"span"),e.pXf(2,18),e.k0s(),e.EFF(3),e.nI1(4,"vplusCurrency"),e.j41(5,"span"),e.pXf(6,19),e.k0s()(),e.j41(7,"div"),e.DNE(8,ea,4,1,"div",51),e.j41(9,"form",52),e.nrm(10,"div",53),e.k0s()()),2&o){const i=e.XpG(2);e.R7$(3),e.SpI("\xa0",e.i5U(4,2,null==i.versement?null:i.versement.montant,i.localisation)," "),e.R7$(5),e.vxM(8,i.isCardReady?-1:8)}}function ia(o,r){if(1&o){const i=e.RV6();e.j41(0,"div",24)(1,"div",25)(2,"div",26)(3,"div",27)(4,"h2"),e.EFF(5),e.k0s(),e.j41(6,"span",28),e.EFF(7),e.k0s()(),e.j41(8,"div",29)(9,"div",30)(10,"div",31)(11,"strong"),e.pXf(12,0),e.k0s(),e.j41(13,"p"),e.EFF(14),e.nI1(15,"date"),e.k0s()(),e.j41(16,"div",31)(17,"strong"),e.pXf(18,1),e.k0s(),e.j41(19,"p"),e.EFF(20),e.k0s()()()(),e.j41(21,"div",32),e.nrm(22,"vplus-resume-commande",33),e.nI1(23,"vplusCurrency"),e.nI1(24,"vplusCurrency"),e.nI1(25,"vplusCurrency"),e.nI1(26,"vplusCurrency"),e.nI1(27,"vplusCurrency"),e.k0s(),e.DNE(28,ws,5,2,"div",34),e.j41(29,"div",35)(30,"h2",36),e.DNE(31,Hs,2,0,"span")(32,Bs,2,0),e.k0s(),e.j41(33,"h5")(34,"span"),e.pXf(35,2),e.k0s(),e.EFF(36),e.DNE(37,qs,2,0,"span")(38,Ws,2,0),e.k0s(),e.Z7z(39,Zs,9,15,"div",37,Ot),e.k0s()(),e.j41(41,"div",38)(42,"div")(43,"h2",39),e.pXf(44,3),e.k0s(),e.j41(45,"span"),e.pXf(46,4),e.k0s(),e.EFF(47),e.j41(48,"span"),e.pXf(49,5),e.k0s(),e.EFF(50),e.nI1(51,"vplusCurrency"),e.k0s(),e.j41(52,"div",40)(53,"h2",39),e.pXf(54,6),e.k0s(),e.DNE(55,Ks,4,0,"div",41)(56,ta,11,5),e.k0s(),e.j41(57,"div",42)(58,"button",43),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.cancelPayment())}),e.pXf(59,7),e.k0s(),e.j41(60,"button",44),e.bIt("click",function(){e.eBV(i);const n=e.XpG();return e.Njj(n.payInstallment())}),e.nrm(61,"vplus-button-icon",45),e.j41(62,"span"),e.pXf(63,8),e.k0s()()()()(),e.nrm(64,"app-copyright-footer"),e.k0s()}if(2&o){let i;const t=e.XpG();e.R7$(5),e.Lme("",t.labels.facture," ",t.facture.factureNumero,""),e.R7$(),e.xc7("color",t.EnumStatutSquareCouleursById[t.facture.statut]),e.R7$(),e.SpI(" ",t.EnumStatutSquareLabelsById[t.facture.statut]," "),e.R7$(7),e.JRh(e.ii3(15,29,t.facture.date,t.isFr?"d MMMM y HH:mm":"MMMM d, y, h:mm a",null,t.isFr?null:"en-US")),e.R7$(6),e.JRh(null!==(i=null==t.facture?null:t.facture.displayTitle)&&void 0!==i?i:t.labels.displayTitleCommande+" "+(null==t.facture?null:t.facture.factureNumero)),e.R7$(2),e.Y8G("isMultipleSession",t.isMultipleSession)("items",t.resumeItems)("multiSessionRows",t.resumeMultiSessionRows)("subTotal",e.i5U(23,34,t.facture.subTotal,t.localisation))("showFraisService",t.facture.fraisService>0)("fraisService",e.i5U(24,37,t.facture.fraisService,t.localisation))("unrequiredTaxes",!t.facture.tps&&!t.facture.tvq)("tps",e.i5U(25,40,t.facture.tps,t.localisation))("tvq",e.i5U(26,43,t.facture.tvq,t.localisation))("total",e.i5U(27,46,t.totalFacture,t.localisation))("localisation",t.localisation),e.R7$(6),e.vxM(28,null!=t.facture&&t.facture.transactions.length?28:-1),e.R7$(),e.AVh("spacing-top",!t.isMobile()),e.R7$(2),e.vxM(31,1===(null==t.facture||null==t.facture.optionVersement||null==t.facture.optionVersement.versements?null:t.facture.optionVersement.versements.length)?31:32),e.R7$(5),e.SpI("\xa0",null==t.facture||null==t.facture.optionVersement||null==t.facture.optionVersement.versements?null:t.facture.optionVersement.versements.length,"\xa0"),e.R7$(),e.vxM(37,1===(null==t.facture||null==t.facture.optionVersement||null==t.facture.optionVersement.versements?null:t.facture.optionVersement.versements.length)?37:38),e.R7$(2),e.Dyx(null==t.facture||null==t.facture.optionVersement?null:t.facture.optionVersement.versements),e.R7$(8),e.SpI("\xa0",null==t.ver
1sement?null:t.versement.order,"\xa0"),e.R7$(3),e.SpI("\xa0",e.i5U(51,49,null==t.versement?null:t.versement.montant,t.localisation),". "),e.R7$(5),e.vxM(55,t.notConnectedToSquare?55:56),e.R7$(5),e.Y8G("disabled",t.notConnectedToSquare||!t.isCardReady),e.R7$(),e.Y8G("isSubmitting",t.orderLaunched)}}let na=(()=>{var o;class r{constructor(){this.store=(0,e.WQX)(J.il),this.activiteService=(0,e.WQX)(Ie.Z),this.facturationService=(0,e.WQX)(Xs.M),this.appConfig=(0,e.WQX)(We.o),this.destroyRef=(0,e.WQX)(e.abz),this.document=(0,e.WQX)(k.qQ),this.localisationService=(0,e.WQX)(Ne.A),this.router=(0,e.WQX)(X.Ix),this.route=(0,e.WQX)(X.nX),this.injector=(0,e.WQX)(e.zZn),this.ngZone=(0,e.WQX)(e.SKi),this.ArrayTypeTransaction=v.y1,this.EnumStatutSquareLabelsById=v.Rb,this.EnumStatutSquareCouleursById=v.W1,this.EnumMethodePaiementLabelByCode=v.LT,this.EnumTypeTransactionLabel=v.cu,this.localisation=this.localisationService.getCurrentLocalisation(),this.ArrayMethodePaiement=v.xz,this.EnumStatutSquareIds=v.WJ,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.isFr=this.localisationService.getCurrentLocalisation()===v.fi.FR,this.formatDate=this.isFr?"dddd DD MMMM":"dddd, MMMM D",this.formatDateTime=this.isFr?"DD MMMM YYYY [\xe0] HH:mm":"MMMM D YYYY [at] HH:mm",this.transactionsPayed=[],this.isLienPaiement=!1,this.resumeItems=[],this.resumeMultiSessionRows=[],this.isMultipleSession=!1,this.isInvite=!1,this.isMobile=(0,E.Ubj)("(max-width: 767px)"),this.isCardReady=!1,this.notConnectedToSquare=!this.appConfig.isSquareConnected,this.defaultLocalisation=this.appConfig.appConfig.localisationDefaut,this.currentLocalisation=this.localisationService.getCurrentLocalisation(),this.labels={fileLabel:Ct.jm,aucunPayeur:"S.O",facture:"Facture n\xB0",displayTitleCommande:"Commande n\xB0 "}}ngOnInit(){this.route.paramMap.pipe((0,I.pQ)(this.destroyRef)).subscribe(t=>{this.handleNewFacId(t.get("facId"))})}handleNewFacId(t){this.factureId=t,this.orderLaunched=!1,this.dataLoaded=!1,this.dataLoadingFailed=!1,this.isCardReady=!1,this.teardownSquare(),this.isInvite=!!this.route.snapshot.queryParams.invite&&!this.document.defaultView.localStorage.getItem("token"),(this.isInvite?this.activiteService.getFactureForPaiement(t).pipe((0,re.M)(s=>this.payeur=s.payeur),(0,Y.T)(s=>[s])):this.store.select(g.selectCurrentUser).pipe((0,Oe.p)(s=>!!s),(0,le.s)(1),(0,re.M)(s=>this.currentUser=s),(0,j.n)(s=>this.facturationService.getCitoyenFactures(s.perId)))).pipe((0,I.pQ)(this.destroyRef)).subscribe({next:s=>{var a,l,_,c;const d=s.find(C=>C.id===this.factureId);if(!d)return this.router.navigate(["/page-inaccessible"]);if(this.facture={...d,transactions:(null!==(a=d.transactions)&&void 0!==a?a:[]).map(C=>({...C,dateDemande:(0,E.PVf)(C)}))},this.totalFacture=(0,E.r1l)(d),this.transactionsPayed=this.facture.transactions.filter(C=>C.transType===v.Oe.Payment),null!==(l=this.facture.optionVersement)&&void 0!==l&&l.versements&&(this.facture.optionVersement={...this.facture.optionVersement,versements:this.facture.optionVersement.versements.map(C=>({...C,enRetard:(0,E.NCT)(C.date,C.montant)}))}),this.transactionsPayed.length===(null===(_=this.facture)||void 0===_||null===(_=_.optionVersement)||void 0===_||null===(_=_.versements)||void 0===_?void 0:_.length))return this.router.navigate(this.isInvite?["accueil"]:["utilisateur","profil","facture"]);null===(c=this.facture)||void 0===c||null===(c=c.optionVersement)||void 0===c||null===(c=c.versements)||void 0===c||c.forEach((C,T)=>{var A;(!this.transactionsPayed[T]&&0===T||this.transactionsPayed[T-1]&&0!==(null===(A=this.transactionsPayed[T-1])||void 0===A?void 0:A.montant))&&(this.versement=C,this.versement.order=T+1)}),this.isLienPaiement=!this.facture.optionVersement&&this.facture.statut===v.WJ.UNPAID,(0,E.rK6)(this.facture.factureElements,this.currentLocalisation,this.defaultLocalisation);const p=(0,E.VCk)(d.factureElements,this.currentLocalisation);this.isMultipleSession=p.isMultipleSession,this.objGroupedByCitoyen=p.objGroupedByCitoyen,this.groupedByCitoyen=p.groupedByCitoyen;const u=(0,E.ryQ)(this.isMultipleSession,d.factureElements,this.objGroupedByCitoyen,this.groupedByCitoyen,this.isFr);this.resumeItems=u.items,this.resumeMultiSessionRows=u.multiSessionRows,this.dataLoaded=!0,this.notConnectedToSquare||(0,e.mal)(()=>{this.processCard()},{injector:this.injector})},error:()=>{this.dataLoadingFailed=!0}})}
1teardownSquare(){try{this.card&&"function"==typeof this.card.destroy&&this.card.destroy()}catch{}this.card=void 0,this.payments=void 0;const t=this.document.querySelector("#card-container-paiement");t&&(t.innerHTML="")}processCard(){var t=this;return(0,w.A)(function*(){if(!t.document.defaultView.Square)throw new Error("Square.js failed to load properly");try{var n,s;t.payments=t.document.defaultView.Square.payments(null===(n=t.appConfig.appConfig.configOAuthSquare)||void 0===n?void 0:n.appId,null===(s=t.appConfig.appConfig.configOAuthSquare)||void 0===s?void 0:s.locationId)}catch{throw new Error("appId or locationId is incorrect")}try{t.card=yield t.initializeCard(t.payments),t.isCardReady=!0,t.ngZone.run(()=>{t.isCardReady=!0})}catch{throw new Error("erreur in card initialization")}})()}initializeCard(t){var n=this;return(0,w.A)(function*(){yield t.setLocale(n.isFr?"fr-FR":"en-CA");const s=yield t.card();return yield s.attach("#card-container-paiement"),(0,E.AMs)("card-container-paiement",()=>n.card,n.destroyRef,n.document),s})()}tokenize(t){return(0,w.A)(function*(){const n=yield t.tokenize();if("OK"===n.status)return n.token;{let s=`Tokenization failed with status: ${n.status}`;throw n.errors&&(s+=` and errors: ${JSON.stringify(n.errors)}`),new Error(s)}})()}verifyBuyer(t,n){var s=this;return(0,w.A)(function*(){const l={amount:(100*(s.isLienPaiement?s.facture.total:s.versement.montant)).toFixed(),billingContact:{},currencyCode:"CAD",intent:"CHARGE"};return(yield t.verifyBuyer(n,l)).token})()}createPayment(t=null,n=null){const s=this.isLienPaiement?this.facture.total:this.versement.montant,a={idempotencyKey:(0,E.SiN)(),citoyenRequerant:this.buildCitoyenRequerantPayment(),methode:v.xz.CarteCredit.id,total:s,facId:this.facture.id,sourceId:t,verificationToken:n};return this.activiteService.payInstallment(a)}payInstallment(){var t=this;return(0,w.A)(function*(){if(!t.orderLaunched){t.orderLaunched=!0;try{const n=yield t.tokenize(t.card),s=yield t.verifyBuyer(t.payments,n);t.createPayment(n,s).pipe((0,I.pQ)(t.destroyRef)).subscribe({next:()=>{t.router.navigate(["/activite/payment-confirmation"],{queryParams:{isFacture:!0},queryParamsHandling:"merge"})}})}catch(n){t.orderLaunched=!1,n.message.includes("Tokenization")||(t.store.dispatch(new g.Actions.ShowSnackBar("Une erreur s'est produite lors du paiement.",g.EnumSnackBarType.Echec)),t.facturationService.logSquarePaymentErreur(n.message,"SCA",t.buildCitoyenRequerantPayment()).pipe((0,I.pQ)(t.destroyRef)).subscribe())}}})()}cancelPayment(){this.router.navigate(this.isInvite?["accueil"]:["utilisateur","profil","activite"])}buildCitoyenRequerantPayment(){var t,n,s,a,l,_,c,d;return this.isInvite?{id:null===(l=this.payeur)||void 0===l?void 0:l.id,prenom:null===(_=this.payeur)||void 0===_?void 0:_.prenom,nom:null===(c=this.payeur)||void 0===c?void 0:c.nom,courriel:null===(d=this.payeur)||void 0===d?void 0:d.courriel}:{id:null===(t=this.currentUser)||void 0===t?void 0:t.perId,prenom:null===(n=this.currentUser)||void 0===n?void 0:n.prenom,nom:null===(s=this.currentUser)||void 0===s?void 0:s.nom,courriel:null===(a=this.currentUser)||void 0===a?void 0:a.courriel}}}return(o=r).\u0275fac=function(t){return new(t||o)}
1,o.\u0275cmp=e.VBU({type:o,selectors:[["vplus-paiement-versement"]],viewQuery:function(t,n){if(1&t&&e.GBs(Us,5),2&t){let s;e.mGM(s=e.lsd())&&(n.paymentSquare=s.first)}},inputs:{evenement:"evenement"},decls:4,vars:5,consts:()=>{let i,t,n,s,a,l,_,c,d,p,u,C,T,A,N,h,f,$,b,D,V;return i="Factur\xE9 le",t="Li\xE9e \xE0",n="Paiement en",s="Versement",a="Vous \xEAtes sur le point de r\xE9gler le versement",l="d'un montant de",_="Paiement",c=" Annuler ",d="Payer maintenant",p="Transactions",u="Option de versement",C="Option de versements",T="versement",A="versements",N="Versement ",h="Pay\xE9 le",f="Payable le ou avant le",$="Aucun moyen de paiement n'a \xE9t\xE9 ajout\xE9. Veuillez contacter votre administration.",b="Un montant de",D="sera pr\xE9lev\xE9 aujourd'hui.",V="Chargement du module de paiement...",[i,t,n,s,a,l,_,c,d,p,u,C,T,A,N,h,f,$,b,D,V,["defaultHref","/utilisateur/profil/activite",1,"hide-desktop","mobile-header",3,"headerTitle","returnButtonType","forceDefault","menuId"],["id","activiteVersements","scrollEvents","true"],[3,"loadingFailed"],[1,"main-page-container","padding-top-20-imp"],[1,"max-720","versements-container"],[1,"facture-container"],[1,"facture-header"],[1,"status","uppercase"],[1,"facture-info"],[1,"info-row"],[1,"info-item"],[1,"resume-facture"],[3,"isMultipleSession","items","multiSessionRows","subTotal","showFraisService","fraisService","unrequiredTaxes","tps","tvq","total","localisation"],[1,"transactions-section","padding-30",3,"transaction-mobile"],[1,"versements-section"],[1,"form-section-title-underline","margin-bottom-24","no-margin-top"],[1,"versement",3,"paid","future","timeline-failed"],[1,"versements-content","margin-bottom-2"],[1,"form-section-title-underline","margin-bottom-12"],[1,"padding-top-24"],[1,"msg-container"],[1,"actions-container","flex-space-between","flex-nowrap","margin-top-2-5"],["type","button","mat-flat-button","","color","primary",1,"custom-button-stroked",3,"click"],["mat-button","","mat-raised-button","","type","button","color","primary",3,"click","disabled"],["iconClass","icon-shopping-cart",3,"isSubmitting"],[1,"transactions-section","padding-30"],[1,"transaction-item-row"],[1,"versement"],[1,"icon-alert-triangle","primary-color","on-position"],[1,"margin-top-12"],[1,"payment-loading-container"],["id","payment-form",1,"margin-top-2"],["id","card-container-paiement"],["color","primary","mode","indeterminate",1,"loading-spinner",3,"diameter"],[1,"payment-loading-text"]]},template:function(t,n){1&t&&(e.nrm(0,"vplus-mobile-header",21),e.j41(1,"ion-content",22),e.DNE(2,Qs,1,1,"vplus-loading-spinner",23)(3,ia,65,52),e.k0s()),2&t&&(e.Y8G("headerTitle","")("returnButtonType","back-button")("forceDefault",!0)("menuId","activiteVersements"),e.R7$(2),e.vxM(2,n.dataLoaded?3:2))},dependencies:[ve.$z,Gs.LG,S.qT,S.cb,S.cV,be.f,se.W9,Re.N,ks.V,it.X,js.G,k.vh,Tt.x,nt.a],styles:['.versements-content[_ngcontent-%COMP%]{padding:24px 18px 18px;margin:0 auto;max-width:1200px}.versements-container[_ngcontent-%COMP%]{font-size:14px!important;font-weight:500!important}.versements-container[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:1.2rem!important}.versements-section[_ngcontent-%COMP%]{padding:25px;border-top:1px solid #e5e7eb}.versements-section[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{font-size:inherit;font-weight:600;margin:0 0 1.5rem}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%]{position:relative;padding-left:36px}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{height:40px!important;font-size:12px!important}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(1){font-size:1rem;padding-bottom:.5rem}@media (min-width: 960px){.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(1){font-size:15px}}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){font-size:.85rem;color:var(--light-text-color)}@media (min-width: 960px){.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){font-size:13px}}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%]:not(:last-child){padding-bottom:1.5rem}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%]:before{content:"";height:1rem;width:1rem;border-radius:14px;border:1px solid var(--light-text-color);display:block;position:absolute;
1left:0;top:1rem;box-sizing:border-box}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%]:after{content:"";height:calc(100% - 1rem - 12px);width:1px;background-color:var(--light-text-color);display:block;position:absolute;left:7.5px;top:2.375rem}.versements-section[_ngcontent-%COMP%]   .versement[_ngcontent-%COMP%]:last-child:after{display:none}.versements-section[_ngcontent-%COMP%]   .versement.paid[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){color:var(--primary-color)}.versements-section[_ngcontent-%COMP%]   .versement.paid[_ngcontent-%COMP%]:before{content:"";border:none;background:var(--primary-color);box-shadow:0 0 5px 1px var(--primary-color)}.versements-section[_ngcontent-%COMP%]   .versement.future[_ngcontent-%COMP%]:before{content:"";box-shadow:0 0 6px var(--primary-color);border:1px solid var(--primary-color);opacity:1}.versements-section[_ngcontent-%COMP%]   .versement.timeline-failed[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:nth-child(2){color:var(--warn-color)}.versements-section[_ngcontent-%COMP%]   .versement.timeline-failed[_ngcontent-%COMP%]:before{content:"";border:none;background:var(--warn-color);box-shadow:0 0 5px 1px var(--warn-color)}.versements-section[_ngcontent-%COMP%]   .versement.timeline-failed[_ngcontent-%COMP%]:after{background:var(--warn-color)}.facture-container[_ngcontent-%COMP%]{background:#fff;overflow:hidden;border:1px solid var(--divider-color)}@media (min-width: 960px){.facture-container[_ngcontent-%COMP%]{border-radius:8px}}.facture-header[_ngcontent-%COMP%]{padding:14px 14px 14px 30px;display:flex;justify-content:space-between;align-items:center;background-color:#efefef}.facture-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-weight:600;font-size:17.5px}@media (min-width: 960px){.facture-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{font-size:24px}}.status[_ngcontent-%COMP%]{padding:6px 16px;font-size:14px;font-weight:600;letter-spacing:.5px}.facture-info[_ngcontent-%COMP%]{border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;padding:30px}.info-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:20px}@media (min-width: 960px){.info-row[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}.info-item[_ngcontent-%COMP%]   strong[_ngcontent-%COMP%]{display:block;font-size:14px;margin-bottom:6px;font-weight:600}.info-item[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:0;font-size:14px}.resume-facture[_ngcontent-%COMP%]{padding:20px 30px 30px}']}),r})();var Ve=m(52),ee=m(40129);const oa=X.iI.forChild([{path:"",canActivate:[xs.M],data:{module:Ct.AL.Activite},children:[{path:"",pathMatch:"full",component:Ni},{path:"recherche",component:uo},{path:"connexion/reservation",canActivate:[$e.Q],component:Le.n},{path:"reservation-confirmation",component:Ve.I,canActivate:[ee.n,K.U]},{path:"connexion/versements/:facId",canActivate:[$e.Q,o=>{const r=(0,e.WQX)(J.il),i=(0,e.WQX)(X.Ix),n=!!(0,e.WQX)(k.qQ).defaultView.localStorage.getItem("token");return r.select(g.selectIsLoggedIn).pipe((0,le.s)(1),(0,Y.T)(s=>{if(s||n){const a=o.paramMap.get("facId");return i.createUrlTree(["/activite/versements",a],{queryParams:o.queryParams})}return!0}))}],component:Le.n},{path:"versements/:facId",component:na,canActivate:[ee.n,K.U]},{path:"reservation",component:Co.T,canActivate:[ee.n,mt,K.U,st],canDeactivate:[ot]},{path:"options-tarification",component:Si,canActivate:[K.U,()=>{const o=(0,e.WQX)(J.il),r=(0,e.WQX)(X.Ix),{state:i}=r.getCurrentNavigation().extras;return o.select(ae.xc).pipe((0,le.s)(1),(0,Y.T)(t=>{var n,s;if(t)return!0;const a=r.parseUrl(r.url),l=(null!==(n=null===(s=a.root.children.primary)||void 0===s?void 0:s.segments)&&void 0!==n?n:[]).map(c=>c.path).filter(c=>"connexion"!==c),_={...a.queryParams,...i};return r.createUrlTree(l,{queryParams:_,queryParamsHandling:"merge"}),!0}))},ee.n,st],canDeactivate:[ot]},{path:"connexion/options-tarification",canActivate:[$e.Q],component:Le.n},{path:"abonnement-confirmation",component:Ve.I,canActivate:[ee.n,K.U]}
1,{path:"entree-selection",component:$n,canActivate:[K.U,mt,ee.n,st],canDeactivate:[ot]},{path:"connexion/entree-selection",canActivate:[$e.Q],component:Le.n},{path:"entree-confirmation",component:Ve.I,canActivate:[ee.n,K.U]},{path:"session-selection",component:Ds,canActivate:[K.U,mt,ee.n,st],canDeactivate:[ot]},{path:"connexion/session-selection",canActivate:[$e.Q],component:Le.n},{path:"session-confirmation",component:Ve.I,canActivate:[ee.n,K.U]},{path:"payment-confirmation",component:Ve.I,canActivate:[ee.n,K.U]},{path:"connexion/fiche-inscription",canActivate:[$e.Q],component:Le.n},{path:"fiche-inscription",component:Pt.n,canActivate:[ee.n,K.U],canDeactivate:[Vs.g]}]}]);var sa=m(10916);let aa=(()=>{var o;class r{}return(o=r).\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.$C({type:o}),o.\u0275inj=e.G2t({providers:[{provide:ut.de,useValue:E.FG3}],imports:[sa.G,at.A,oa,O.b,Ae.N,Pt.n,Mt]}),r})()},64940:(bt,qe,m)=>{m.d(qe,{m:()=>lt});var O=m(54438),Ae=m(88834),at=m(51188),rt=m(88974),g=m(60177);function ae(G,x){if(1&G&&(O.qex(0),O.j41(1,"button",4),O.EFF(2),O.k0s(),O.bVm()),2&G){const S=O.XpG();O.R7$(),O.Y8G("routerLink",S.buttonLink)("queryParams",S.buttonQueryParams),O.R7$(),O.JRh(S.buttonLabel)}}function ye(G,x){if(1&G){const S=O.RV6();O.j41(0,"button",5),O.bIt("click",function(){O.eBV(S);const Q=O.XpG();return O.Njj(Q.clickButton())}),O.EFF(1),O.k0s()}if(2&G){const S=O.XpG();O.R7$(),O.JRh(S.buttonLabel)}}let lt=(()=>{var G;class x{constructor(){this.onClickButton=new O.bkB}
1clickButton(){this.onClickButton.emit()}}return(G=x).\u0275fac=function(y){return new(y||G)},G.\u0275cmp=O.VBU({type:G,selectors:[["vplus-intro-card"]],inputs:{title:"title",imgSrc:"imgSrc",description:"description",buttonLabel:"buttonLabel",buttonLink:"buttonLink",buttonQueryParams:"buttonQueryParams"},outputs:{onClickButton:"onClickButton"},decls:10,vars:5,consts:[["showDialog",""],[1,"intro-card"],[3,"src"],[4,"ngIf","ngIfElse"],["mat-raised-button","","color","primary",1,"text-center",3,"routerLink","queryParams"],["mat-raised-button","","color","primary",1,"text-center",3,"click"]],template:function(y,Q){if(1&y&&(O.j41(0,"div",1),O.nrm(1,"img",2),O.j41(2,"div")(3,"h2"),O.EFF(4),O.k0s(),O.j41(5,"p"),O.EFF(6),O.k0s(),O.DNE(7,ae,3,3,"ng-container",3)(8,ye,2,1,"ng-template",null,0,O.C5r),O.k0s()()),2&y){const X=O.sdS(9);O.R7$(),O.Y8G("src",Q.imgSrc,O.B4B),O.R7$(3),O.JRh(Q.title),O.R7$(2),O.JRh(Q.description),O.R7$(),O.Y8G("ngIf",Q.buttonLink)("ngIfElse",X)}},dependencies:[Ae.$z,at.Wk,rt.N7,g.bT],styles:[".intro-card[_ngcontent-%COMP%]{text-align:center}.intro-card[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{color:var(--primary-color);font-size:160px}.intro-card[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:70%;align-self:baseline}.intro-card[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{color:var(--standard-text-color);margin-bottom:2rem}.intro-card[_ngcontent-%COMP%]   .mat-mdc-raised-button[_ngcontent-%COMP%]{width:100%}.intro-card[_ngcontent-%COMP%]   .mat-mdc-raised-button[_ngcontent-%COMP%]   .mat-mdc-button[_ngcontent-%COMP%]   .mdc-button__label[_ngcontent-%COMP%]{justify-content:center}@media (min-width: 960px){.intro-card[_ngcontent-%COMP%]{text-align:left;display:flex}.intro-card[_ngcontent-%COMP%]   .mat-mdc-raised-button[_ngcontent-%COMP%]{width:initial}.intro-card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-left:2rem}.intro-card[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:300px;max-width:40%}}@media (min-width: 1280px){.intro-card[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{margin-left:3rem}}"]}),x})()}}]);

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.