1import{a as ye}from"./chunk-U37ZII7T.js";import{b as Ce,d as Se}from"./chunk-LLCDT2AR.js";import{$b as T,Cf as he,Da as B,Df as xe,Ea as G,Eb as W,Ff as _e,G as N,Ga as w,Gb as H,Gd as ee,Ha as I,He as de,Ia as v,If as Re,K as R,L as M,Ld as te,Le as pe,Me as me,Oe as fe,Of as Me,Re as ge,Rg as Ee,Se as ve,Ua as g,Va as x,Wb as U,Xg as C,Yb as K,Zb as z,_g as be,ba as l,dd as Z,ed as A,fb as P,fd as X,gd as Q,ha as p,hd as q,he as ne,hf as ue,hh as we,ib as j,ie,if as F,ja as V,ka as k,nb as Y,ne as oe,pc as $,pg as Oe,ra as u,re,rh as Ie,sa as h,ta as O,td as J,ua as E,va as b,wa as S,we as ae,xa as a,xe as se,ya as c,ye as le,za as f,ze as ce}from"./chunk-NHVDVYS6.js";import"./chunk-27WATYC3.js";var je=t=>[t,"EUR","symbol","1.2-2","nl"],Ye=t=>({parentContactFullName:t});function We(t,o){t&1&&(a(0,"div",4),f(1,"app-format-translation",8),c())}function He(t,o){t&1&&f(0,"div")}function Ue(t,o){if(t&1&&(a(0,"div",16)(1,"span",14),f(2,"app-format-translation",22),g(3,":\xA0"),a(4,"b"),g(5),c()()()),t&2){let i=v().$implicit;l(5),x(i.RowNumber)}}function Ke(t,o){if(t&1&&(a(0,"div",13)(1,"span",23),f(2,"app-format-translation",24),g(3,":\xA0"),a(4,"b"),g(5),c()()()),t&2){let i=v().$implicit;l(5),x(i.SeatNumber)}}function ze(t,o){if(t&1){let i=w();a(0,"div",10)(1,"div",11)(2,"mat-slide-toggle",12),I("change",function(e){let r=R(i).$implicit,d=v(4);return M(d.itemSelectChange(e,r))}),c()(),a(3,"div",13)(4,"span",14),f(5,"app-format-translation",15),g(6,":\xA0"),a(7,"b"),g(8),c()()(),u(9,Ue,6,1,"div",16),u(10,Ke,6,1,"div",13),a(11,"div",17)(12,"span",18),g(13),c()(),a(14,"div",19)(15,"span")(16,"span",20),f(17,"app-format-translation",21),g(18," :"),c(),a(19,"b"),g(20),j(21,"currency"),c()()()()}if(t&2){let i=o.$implicit;l(2),S("disableRipple",!0)("checked",i.Selected),l(6),x(i.ParentSectionShortName),l(),h(i.RowNumber!==null?9:-1),l(),h(i.SeatNumber!==null?10:-1),l(3),x(i.CustomerName),l(7),x(Y(21,7,P(13,je,i.PriceExVat+i.VAT)))}}function $e(t,o){if(t&1&&(a(0,"div")(1,"div",9)(2,"span"),g(3),c()(),E(4,ze,22,15,"div",10,O),c()),t&2){let i=o.$implicit;l(3),x(i.event),l(),b(i.reservations)}}function Ze(t,o){if(t&1&&E(0,$e,6,1,"div",null,O),t&2){let i=v(2);b(i.reservationGroups)}}function Xe(t,o){t&1&&(a(0,"div",5)(1,"div",25)(2,"div",26)(3,"span",27),g(4," = "),f(5,"app-format-translation",28),c()(),a(6,"div",29)(7,"span",30),g(8," = "),f(9,"app-format-translation",31),c()()()())}function Qe(t,o){if(t&1&&(a(0,"div"),f(1,"app-format-translation",32),c()),t&2){let i=v(2);l(),S("params",P(1,Ye,i.parentCustomer.ParentContactFullName))}}function qe(t,o){t&1&&(a(0,"div"),f(1,"app-format-translation",33),c())}function Je(t,o){if(t&1){let i=w();a(0,"div",7)(1,"div",34)(2,"app-button",35),I("click",function(){R(i);let e=v(2);return M(e.submitSelection())}),c()()()}if(t&2){let i=v(2);l(2),S("showLoader",i.saving)("disabled",i.submitDisabled())("text",i.orderText)}}function et(t,o){if(t&1&&(a(0,"div",3),B(1),u(2,We,2,0,"div",4),u(3,He,1,0,"div")(4,Ze,2,0),u(5,Xe,10,0,"div",5)(6,Qe,2,3,"div")(7,qe,2,0,"div"),f(8,"div",6),u(9,Je,3,3,"div",7),G(),c()),t&2){let i=v();l(2),h(i.reservationLinesHaveBeenRemoved?2:-1),l(),h(!i.reservationGroups||!(i.reservationGroups.length>0)?3:4),l(2),h(i.hasReservations()?5:!i.hasReservations()&&i.currentUserIsManagedBy?6:7),l(4),h(i.hasReservations()?9:-1)}}var D=class{},y=(()=>{let o=class o{constructor(n,e,r,d,s,m,_,Ae,Fe,De,Le,Ne,Ve,ke,Be){this.route=n,this.router=e,this.customerService=r,this.reservationService=d,this.pendingOrderService=s,this.contextService=m,this.logger=_,this.toaster=Ae,this.orderState=Fe,this.orderStateService=De,this.appLoader=Le,this.layoutService=Ne,this.shoppingCartService=Ve,this.customerIdentificationService=ke,this.confirmService=Be,this.reservationGroups=null,this.message=null,this.currentCustomerIdentificationStatus=null,this.reservationData=null,this.loading=!1,this.orderText="VIEWS.RESERVATIONS.MY.CONTINUE",this.currentUserIsManagedBy=!1,this.parentCustomer=null,this.saving=!1,this.pageReadyForRendering=!1,this.reservationLinesHaveBeenRemoved=!1,this.layoutService.updateLayout(new Q("VIEWS.RESERVATIONS.MY.TITLE",!0,"VIEWS.RESERVATIONS.MY.HELPTITLE","VIEWS.RESERVATIONS.MY.HELPTEXT")),this.route.params.subscribe(L=>{L.message&&(this.message=L.message)})}ngOnInit(){let n=this.appLoader.open("MyReservations@OnInit");this.orderState.redirectOnPendingOrderOrDoAction(()=>{this.loadPageData(n),this.pageReadyForRendering=!0},()=>{this.appLoader.close(n)})}removeUnusableReservations(n){let e=[];
1if(n.PurchaseRights!==null)for(let d of n.PurchaseRights){let s=n.Reservations.filter(m=>m.EventId===d.TargetEventId);if(d.AmountSelectable<0){let m=Math.abs(d.AmountSelectable);if(m<=s.length){s.splice(s.length-m,m);for(let _ of s)e.indexOf(_)<0&&e.push(_)}}else for(let m of s)e.indexOf(m)<0&&e.push(m)}let r=!1;n.Reservations!==null&&(r=n.Reservations.length!==e.length),n.Reservations=e,this.reservationLinesHaveBeenRemoved=r}loadPageData(n){this.loading=!0,this.customerService.getManagedBy().subscribe(e=>{this.handleGetManagedByResponse(e,n)})}handleGetManagedByResponse(n,e){if(n){this.parentCustomer=n,this.currentUserIsManagedBy=!0,this.loading=!1,this.appLoader.close(e);return}let r=this.shoppingCartService.getPendingOrderDetails();if(r!=null){this.pendingOrderService.getExpiration(r.Id).subscribe(d=>{this.handleGetExpirationResponse(d,r,e)});return}this.pendingOrderService.getCurrentActive().subscribe(d=>{this.handleGetCurrentActiveResponse(d,e)})}handleGetCurrentActiveResponse(n,e){if(n===null)this.loadMyReservations();else{this.shoppingCartService.setPendingOrderDetails(n);let r=this.shoppingCartService.getPendingOrderDetails();this.shoppingCartService.startOrUpdateTimer(r.Id),this.loadMyReservations()}this.logger.log("active pending order from server: ",n),this.appLoader.close(e)}handleGetExpirationResponse(n,e,r){n===0?this.contextService.clearOrderContext():this.shoppingCartService.startOrUpdateTimer(e.Id),this.loadMyReservations(),this.appLoader.close(r)}ngAfterViewInit(){if(this.message===null)return;let n=null;this.message==="reservationexpired"&&(n="MSG.RESERVATION-EXPIRED"),n!==null&&this.toaster.warn(n)}hasReservations(){return this.reservationGroups!==null&&this.reservationGroups.length>0}loadMyReservations(){let n=this.appLoader.open("MyReservations@loadMyReservations");this.reservationService.getReservation().subscribe(e=>{this.logger.log("got reservationdata: ",e),this.removeUnusableReservations(e),this.reservationData=e,this.processNewReservationData(),this.loading=!1,this.appLoader.close(n)})}processNewReservationData(){this.reservationData.Reservations.forEach(e=>{e.Selected=!0,e.TotalPrice=e.PriceExVat+e.VAT}),this.reservationGroups=[];let n=this.reservationData.Reservations.map(e=>e.EventName).filter((e,r,d)=>d.indexOf(e)===r);for(let e of n){let r=new D;r.reservations=this.reservationData.Reservations.filter(d=>d.EventName===e),r.event=e,this.reservationGroups.push(r)}}itemSelectChange(n,e){let r=n.source;e.Selected=r.checked}submitDisabled(){return this.reservationGroups===null||this.reservationGroups.length<=0}submitSelection(){this.saving=!0;let n=this.reservationData.Reservations.filter(function(s){if(s.Selected===!0)return s}),e=this.reservationData.Reservations.map(s=>s.ReservationId).filter((s,m,_)=>_.indexOf(s)===m),r=n.map(s=>s.ReservationLineId),d={ReservationIds:e,ReservationLineIds:r};this.pendingOrderService.fromReservations(d).subscribe(s=>{this.pendingOrderService.getCurrentActive().subscribe(m=>{this.shoppingCartService.setPendingOrderDetails(m),this.router.navigate(["/shopping-cart"])})},s=>{this.saving=!1,this.confirmService.confirm({okonly:!0,message:"GENERIC.CONFIRM.ERRORS.TITLE.AN-ERROR-HAS-OCCURED"}).subscribe()})}};o.\u0275fac=function(e){return new(e||o)(p(U),p(z),p(J),p(te),p(ee),p(ie),p(ne),p(Ee),p(F),p(F),p(re),p(q),p(ce),p(be),p(le))},o.\u0275cmp=V({type:o,selectors:[["app-my-reservations"]],standalone:!1,decls:4,vars:1,consts:[["fxLayout","column","fxLayout.lt-lg","column",2,"height","100%"],["backLink","/"],[1,"content"],[1,"my-renewals","content-pad"],[1,"alert","alert-danger"],[1,"my-renewals-legend"],[1,"my-renewals-footer-spacer"],[1,"my-renewals-footer"],["translationKey","VIEWS.RESERVATIONS.MY.FILTERED-RESERVATIONS"],[1,"my-renewals-section-header"],["fxLayout","row","fxLayoutWrap","wrap",1,"my-renewals-item",2,"background-color","#f5f5f5"],["fxFlex.lt-sm","65px","fxFlex","85px","fxFlexAlign","center"],[3,"change","disableRipple","checked"],["fxFlex.lt-sm","70px","fxFlex","100px","fxFlexAlign","center"],[1,"my-renewals-item-row"],["translationKey","VIEWS.RESERVATIONS.MY.SECTION"],["fxFlex.lt-sm","70px","fxFlex","70px","fxFlexAlign","center"],["fxFlex","","fxLayoutAlign","end center"],["fxHide.lt-md","true",1,"my-renewals-item-row","my-renewals-item-name"],["fxFlex.lt-sm","","fxFlex","150px","fxFlexAlign","center",1,"my-renewals-item-price"],["fxHide.xs","true"],["translationKey","VIEWS.RESERVATIONS.MY.PRICE"],["translationKey","VIEWS.RESERVATIONS.MY.ROW"],[1,"my-renewals-item-chair"],["translationKey","VIEWS.RESERVATIONS.MY.SEAT"],[1,"my-renewals-legend-container"],[1,"my-renewals-legend-on-image"],[1,"my-renewals-legend-on-text"],["translationKey","VIEWS.RESERVATIONS.MY.ORDER"],[1,"my-renewals-legend-off-image"],[1,"my-renewals-legend-off-text"],["translationKey","VIEWS.RESERVATIONS.MY.CANCEL"],["translationKey","VIEWS.RESERVATIONS.MY.MANAGED-BY-USER",3,"params"],["translationKey","VIEWS.RESERVATIONS.MY.NO-RESERVATIONS"],["fxLayout","row","fxLayoutAlign","flex-end"],["type","green","size","full","fxFlex","1 1 100%","fxFlex.gt-lg","1 1 50%",1,"my-renewals-footer-order-button",3,"click","
1showLoader","disabled","text"]],template:function(e,r){e&1&&(a(0,"div",0),f(1,"app-title-bar",1),a(2,"div",2),u(3,et,10,4,"div",3),c()()),e&2&&(l(3),h(r.pageReadyForRendering?3:-1))},dependencies:[se,ue,ae,ge,fe,me,de,pe,oe,W],styles:['.reset-pending-reservation[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#d8232a;cursor:pointer}.my-renewals[_ngcontent-%COMP%]{font-family:var(--base-font, Arial);font-weight:700}.my-renewals-friend[_ngcontent-%COMP%]{margin-top:8px}.my-renewals-friend[_ngcontent-%COMP%] .ng-invalid.ng-dirty[_ngcontent-%COMP%]{border:#ed1b23 1px solid}.my-renewals-top[_ngcontent-%COMP%]{margin-top:initial;height:40px;border-bottom:1px #eeeeee solid}.my-renewals-section-header[_ngcontent-%COMP%]{padding-top:20px;padding-bottom:4px}.my-renewals-section-header[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{height:23px;width:53px;color:#000;font-family:HelveticaNeueCondBold;font-size:1.25rem;line-height:24px}.my-renewals-item[_ngcontent-%COMP%]{background-color:#f5f5f5;height:55px;color:gray;font-size:16px;min-height:55px;margin:1px 0;padding:16px 8px}.my-renewals-item-section[_ngcontent-%COMP%]{background-color:#ff0}.my-renewals-item-row[_ngcontent-%COMP%]{padding-right:5px}.my-renewals-item-name[_ngcontent-%COMP%]{padding-right:16px}.my-renewals-item-row[_ngcontent-%COMP%], .my-renewals-item-chair[_ngcontent-%COMP%]{display:inline-block}.my-renewals-item-price[_ngcontent-%COMP%]{margin-right:16px;float:right}.my-renewals-item[_ngcontent-%COMP%] .mat-slide-toggle[_ngcontent-%COMP%]{padding-right:25px}.my-renewals-legend[_ngcontent-%COMP%]{padding-top:10px;text-transform:uppercase;font-size:11px;color:#9b9b9b;height:38px}.my-renewals-legend-container[_ngcontent-%COMP%]{display:inline-block}.my-renewals-legend-on-text[_ngcontent-%COMP%], .my-renewals-legend-off-text[_ngcontent-%COMP%]{padding-left:35px;transform:translate(2px)}.my-renewals-legend-on-image[_ngcontent-%COMP%]{float:left;height:20px;background-image:url("./media/ticket_switch_legend_on-LZZFBL7D.png");background-position:left;margin-top:10px;margin-bottom:8px;background-repeat:no-repeat;background-size:contain;padding-top:2px}.my-renewals-legend-off-image[_ngcontent-%COMP%]{float:left;background-image:url("./media/ticket_switch_legend_off-H2KZDQOB.png");height:20px;background-position:left;margin-top:10px;margin-bottom:8px;margin-left:20px;background-repeat:no-repeat;background-size:contain;padding-top:2px}.my-renewals-footer[_ngcontent-%COMP%]{background-color:#fff;padding:7px}@media(max-width:720px){.my-renewals-footer[_ngcontent-%COMP%]{position:fixed;left:0;right:0;bottom:0;z-index:2;border-top:1px solid #000}}.my-renewals-footer-spacer[_ngcontent-%COMP%]{height:130px}.my-renewals-footer-overview-spacer[_ngcontent-%COMP%]{margin:28px 20px 18px;border-top:#010101 1px solid;height:69px}.my-renewals-footer-order[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .my-renewals-footer-goto-pay[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:#fff;font-size:18px;font-weight:700}.my-renewals-footer-order[_ngcontent-%COMP%]{margin:7px 14px 7px 16px;background-color:#7eb541;height:48px;display:flex;justify-content:center;align-items:center}.my-renewals-footer-order[_ngcontent-%COMP%] .fa-chevron-down[_ngcontent-%COMP%]{color:#fff;transform:rotate(-90deg) translateY(50px) translate(-1px);position:absolute}.my-renewals-footer-goto-pay-button[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%], .my-renewals-footer-order-button[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%]{background-color:#7eb541;border:none;border-radius:0}.my-renewals-footer-goto-pay-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .my-renewals-footer-order-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:inline-flex}.my-renewals-footer-goto-pay-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after, .my-renewals-footer-order-button[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:after{color:#fff;font-family:"Font Awesome 6 Pro";content:"\\f078";font-weight:900;transform:rotate(-90deg) translateY(15px)}.my-renewals-footer-goto-pay[_ngcontent-%COMP%]{margin:7px 14px 7px 16px;background-color:#7eb541;height:48px;display:flex;justify-content:center;align-items:center}.my-renewals-footer-goto-pay[_ngcontent-%COMP%]:after{color:#fff;font-family:"Font Awesome 6 Pro";content:"\\f078";font-weight:900;transform:rotate(-90deg) translateY(15px)}']});let t=o;return t})();var Pe=[{path:"my",component:y,data:{title:"Dashboard"},canActivate:[C]},{path:"my/:message",component:y,data:{title:"Dashboard"},canActivate:[C]},{path:"",redirectTo:"my",pathMatch:"full"},{path:"**",redirectTo:"/system/404"}],Te=[{path:"my",component:y,data:{title:"Dashboard"},canActivate:[C]},{path:"my/:message",component:y,data:{title:"Dashboard"},canActivate:[C]},{path:"",redirectTo:"my",pathMatch:"full"},{path:"**",redirectTo:"/system/404"}];var Ht=(()=>{let o=class o{};o.\u0275fac=function(e){return new(e||o)}
1,o.\u0275mod=k({type:o}),o.\u0275inj=N({providers:[{provide:K,useFactory:n=>n.IsBusinessShop?Te:Pe,multi:!0,deps:[X]}],imports:[H,Z,Ie,A,Se,he,ye,xe,_e,Ce,ve,Me,Re,A,T.forChild([]),$,Oe.forRoot(),we.forRoot(),T]});let t=o;return t})();export{Ht as ReservationsModule};
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.