1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[4739],{98732:(Ut,at,o)=>{o.d(at,{S:()=>z});var t=o(94038),c=o(14026);let z=(()=>{class P extends t.X{constructor(){super(...arguments),this.logLabel="EventShowService"}shouldShow(b,L,O,F){switch(b){case"admin":return super.shouldShow("site-admin",L,O);case"attending":return this.checkAttending(L,O);case"paid-by-invoice":return this.checkAttending(L,O)||O.hasUnpaidInvoice();default:return super.shouldShow(b,L,O,F)}}shouldShowRoute(b,...L){return this.shouldShowTab(b.split("events.view.eventapp.")[1],...L)}shouldShowTab(b,...L){const[{attendees:O,chat:F,moreInfo:Y},nt,it]=L;switch(b){case"attendees":return O.enable&&Boolean(it?.bookable)&&this.shouldShow(O.show,nt,it);case"chat":return F.enable&&!this.isPublic(nt)&&this.shouldShow(F.show,nt,it);case"moreinfo":return Y.enable&&Boolean(it?.more_info?.length)&&this.shouldShow(Y.show,nt,it);case"description":return!0;default:return!1}}checkAttending(b,L){return!this.isPublic(b)&&(this.isSiteAdmin(b)||function f(P,k){return Boolean(P&&k?.owners?.includes(P.id))}(b,L)||L.isAttending(b)||L.isGuest(b))}}return P.\u0275fac=function(){let k;return function(L){return(k||(k=c.n5z(P)))(L||P)}}(),P.\u0275prov=c.Yz7({token:P,factory:P.\u0275fac,providedIn:"root"}),P})()},59085:(Ut,at,o)=>{o.r(at),o.d(at,{EventsModule:()=>go});var t=o(52805),c=o(33606),z=o(72922),f=o(74831),P=o(1057),k=o(79341),b=o(55324),L=o(36584),O=o(84416),F=o(79903),Y=o(6832),nt=o(45339),it=o(47958),H=o(6266),Q=o(80919),m=o(9099),x=o(20266),K=o(65606),tt=o(74449),ft=o(70460),X=o(64177),n=(o(58249),o(14026));let jt=(()=>{class r{}return r.\u0275fac=function(l){return new(l||r)},r.\u0275mod=n.oAB({type:r}),r.\u0275inj=n.cJS({imports:[X.ez]}),r})();var wt=o(60611),vt=o(20384),G=o(56949),gt=o(80733),Zt=o(5296),N=o(91183),Vt=o(94918),te=o(95517),Yt=o(41958),Pt=o(98411),Xt=o(31667),Rt=o(45877),Dt=o(89969),Nt=o(50725),lt=o(87563),Bt=o(48921),ct=o(59815),V=o(19807),S=o(68995),g=o(82530),u=o(87842);const v=r=>r.bookingModal;let T=(()=>{class r{constructor(){this.actions$=(0,n.f3M)(c.eX),this.alert=(0,n.f3M)(V.c),this.alertBooking=(0,n.f3M)(g.X),this.bookingRes=(0,n.f3M)(S.L),this.store=(0,n.f3M)(N.yh),this.aGuestChangeRejections=(0,c.GW)(()=>this.initGuestChangeRejections(),{dispatch:!1}),this.aIncGuests=(0,c.GW)(()=>this.initIncGuests()),this.aDecGuests=(0,c.GW)(()=>this.initDecGuests()),this.aRmGuest=(0,c.GW)(()=>this.initRmGuest()),this.aGuestUpdate=(0,c.GW)(()=>this.initGuestUpdate()),this.aOwnUpdate=(0,c.GW)(()=>this.initOwnUpdate()),this.aUpdateGuestAddons=(0,c.GW)(()=>this.initUpdateGuestAddons()),this.aUpdateOwnAddons=(0,c.GW)(()=>this.initUpdateOwnAddons())}initDecGuests(){return this.actions$.pipe((0,c.l4)(u.YR.type),this.withState(),(0,Rt.z)(([{by:l},d])=>this.bookingRes.rmGuests({guestIds:d.guestIds.slice(-l),id:d.bookingId}).pipe(this.pipeGuestRemoval())))}initGuestChangeRejections(){return this.actions$.pipe((0,c.l4)(u.DS.type),(0,Dt.b)(({msg:l})=>{this.alert.alertError({key:l,ns:"events"})}))}initGuestUpdate(){const l=this.actions$.pipe((0,c.l4)(u.$N.type),(0,Nt.U)(({guestId:Z,to:et})=>({guestId:Z,ticket:et}))),d=this.actions$.pipe((0,c.l4)(u.sF.type),(0,Nt.U)(Z=>(0,Vt.Z)(Z,"type","ticket"))),A=new ct.Z(()=>({busy:!1,queue:[]}));return(0,te.T)(l,d).pipe(this.withState(),(0,Rt.z)(([Z,{bookingId:et,isReservation:rt}])=>{if(!rt)return Yt.E;const zt={...Z,id:et},Jt=A.getOrInsert(Z.guestId);return Jt.queue.push(zt),Jt.busy?Yt.E:new Pt.y(Ht=>{let me;const Ft=()=>{const qe=Jt.queue.shift();qe?me=this.bookingRes.updateGuest(qe).subscribe(ho):(Ht.next((0,u.WH)({by:-1})),Ht.complete())},ho={complete:Ft,error:Ft};return Ht.next((0,u.WH)({by:1})),Jt.busy=!0,Ft(),()=>{Jt.busy=!1,me?.unsubscribe()}})}),(0,lt.K)((Z,et)=>((0,Zt.Ed)(Z)||console.error("[UserInfoModalBookingsFx.initGuestUpdate]",Z),et)))}initIncGuests(){return this.actions$.pipe((0,c.l4)(u.Jt.type),this.withState(),(0,Rt.z)(([{by:l},d])=>d.guestIds.length+l>(d.parentTicket.maximum_guests||Number.POSITIVE_INFINITY)?[(0,u.DS)({msg:"eChangeMaxGuestsReached"})]:this.bookingRes.addGuests({id:d.bookingId,count:l}).pipe((0,Nt.U)(u.ws),(0,lt.K)(et=>(this.alertBooking.negotiate(et),[(0,u.d1)()])),(0,Bt.O)((0,u.TO)()))))}initUpdateOwnAddons(){return this.baseInitUpdateAddons(u.oV,u.o2,u.z8,u.DG,"setAddons")}initUpdateGuestAddons(){return this.baseInitUpdateAddons(u.SR,u.NH,u.OQ,u.Lz,"setGuestAddons")}baseInitUpdateAddons(l,d,A,Z,et){return this.actions$.pipe((0,c.l4)(l.type),this.withState(),(0,Rt.z)(([rt,{bookingId:zt}])=>{const Jt={...(0,Vt.Z)(rt,"type"),id:zt};return this.bookingRes[et](Jt).pipe((0,Nt.U)(d),(0,lt.K)(Ht=>(this.alertBooking.negotiate(Ht),[A()])),(0,Bt.O)(Z()))}))}initOwnUpdate(){const l=[];let d=!1;return this.actions$.pipe((0,c.l4)(u.zi.type),this.withState(),(0,Rt.z)(([A,{bookingId:Z,isReservation:et}])=>{if(!et)return Yt.E;const rt=(0,Vt.Z)(A,"type");return rt.id=Z,l.push(rt),d?Yt.E:new Pt.y(zt=>{let Jt;const Ht=()=>{const Ft=l.shift();Ft?Jt=this.bookingRes.updateOwnUserInfo(Ft).subscribe(me):(zt.next((0,u.WH)({by:-1})),zt.complete())},me={complete:Ht,error:Ht};return zt.next((0,u.WH)({by:1})),d=!0,Ht(),()=>{d=!1,Jt?.unsubscribe()}})}),(0,lt.K)((A,Z)=>((0,Zt.Ed)(A)||console.error("[UserInfoModalBookingsFx.initOwnUpdate]",A),Z)))}initRmGuest(){return this.actions$.pipe((0,c.l4)(u.y1.type),this.withState(),(0,Rt.z)(([{idx:l},d])=>this.bookingRes.rmGuest({guestId:d.guestIds[l],id:d.bookingId}).pipe(this.pipeGuestRemoval())))}pipeGuestRemoval(){return(0,Xt.z)((0,Nt.U)(u.iR),(0,lt.K)(l=>(this.alertBooking.negotiate(l),[(0,u.yI)()])),(0,Bt.O)((0,u.N_)()))}withState(){return(0,c.IC)(()=>this.store.select(v))}}return r.\u0275fac=function(l){return new(l||r)},r.\u0275prov=n.Yz7({token:r,factory:r.\u0275fac}),r})();var ot=o(8239),q=o(4962),ht=o(40697),mt=o(50245),j=o(78771),kt=o(45178),Ct=o(4960),st=o(74174),B=o(49564),U=o(43632),y=o(58994),E=o(87638),I=o(40049),pt=o(75143),St=o(98732);const Wt=new n.OlP("IsFirstEntry"),ie=new n.OlP("TabGuard"),_t="events.view.eventapp",ut={resolveFn:()=>({value:!0}),token:Wt},de={deps:[Wt,q.Transition,St.S,st.wp,st.Ej,wt.Z,j.f],resolveFn(r,h,l,d,A,Z,et){if(!r.value)return;const rt=h.to().name;return rt&&rt!==_t&&(r.value=!1,!l.shouldShowRoute(rt,et.app,A,d))?(h.abort(),Z.go(`${_t}.description`,h.params(),h.options())):void 0},token:ie};var bt=o(32657),$=o(43927),D=o(662),C=o(35673),w=o(10067),M=o(3811),W=o(52264),J=o(97482),dt=o(49389),Tt=o(85960),Et=o(51248),yt=o(94795),At=o(10218),Lt=o(78798),Kt=o(22009),ee=o(65624),ne=o(74647);let xt=(()=>{class r{}return r.\u0275fac=function(l){return new(l||r)},r.\u0275dir=n.lG2({type:r,inputs:{event:"event"}}),r})();var Qt=o(39836),fe=o(8592),Te=o(85868),Se=o(56671),Ie=o(28091),tn=o(583
10),Ee=o(18416),ae=o(64683);const en=function(r){return{date:r}};function Ce(r,h){if(1&r&&(n._UZ(0,"i",4),n.ALo(1,"tr"),n.ALo(2,"date")),2&r){const l=n.oxw(2);n.Q6J("tooltip",n.xi3(1,1,"ticketSalesStartOn",n.VKq(8,en,n.Dn7(2,4,l.futureTicket.available_from,"short",l.futureTicketTzOffset))))}}function nn(r,h){if(1&r&&(n.TgZ(0,"h2",1),n.YNc(1,Ce,3,10,"i",2),n._UZ(2,"tg-event-price",3),n.qZA()),2&r){const l=n.oxw();n.Q6J("ngClass",l.availableTicket?"label-success":"label-warning"),n.xp6(1),n.Q6J("ngIf",l.futureTicket),n.xp6(1),n.Q6J("ticket",l.availableTicket||l.futureTicket)}}let De=(()=>{class r{constructor(l,d){this.timezoneSvc=l,this.user=d}ngOnChanges(l){!l.event||(this.availableTicket=this.event.findCheapestTicket(this.user,[0]),this.availableTicket||(this.futureTicket=this.event.findCheapestTicket(this.user,[2]),this.futureTicket?this.futureTicketTzOffset=this.timezoneSvc.getTimezoneOffset(this.futureTicket.available_from,this.event.timezone):this.availableTicket=this.event.findCheapestTicket(this.user,[3])))}}return r.\u0275fac=function(l){return new(l||r)(n.Y36(Ie.B),n.Y36(st.Ej))},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-price-tag"]],inputs:{event:"event"},features:[n._Bn([{provide:J.z,useValue:"events"}]),n.TTD],decls:1,vars:1,consts:[["class","label overlay-label",3,"ngClass",4,"ngIf"],[1,"label","overlay-label",3,"ngClass"],["class","fa fa-clock-o",3,"tooltip",4,"ngIf"],[3,"ticket"],[1,"fa","fa-clock-o",3,"tooltip"]],template:function(l,d){1&l&&n.YNc(0,nn,3,3,"h2",0),2&l&&n.Q6J("ngIf",d.availableTicket||d.futureTicket)},dependencies:[X.mk,X.O5,Te.G,tn.K,f.i9,Ee.r,X.uU,ae.H],styles:[".overlay-label[_ngcontent-%COMP%]{margin:0;position:absolute;right:0;z-index:1}","h2[_ngcontent-%COMP%]{font-size:100%;top:0}"],changeDetection:0}),r})();const on=["*"];let Pe=(()=>{class r{}return r.\u0275fac=function(l){return new(l||r)},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-box-overlay"]],inputs:{icon:"icon"},ngContentSelectors:on,decls:3,vars:1,consts:[[1,"fa","fa-4x",3,"ngClass"]],template:function(l,d){1&l&&(n.F$t(),n._UZ(0,"i",0),n.TgZ(1,"div"),n.Hsn(2),n.qZA()),2&l&&n.Q6J("ngClass",d.icon)},dependencies:[X.mk,Te.G],styles:["[_nghost-%COMP%]{align-items:center;color:#fff;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;opacity:.8;position:absolute;top:0;width:100%}.cancelled[_nghost-%COMP%], .sales-end[_nghost-%COMP%]{background:#a94442}.draft[_nghost-%COMP%]{background:#8a6d3b}.invisible-event[_nghost-%COMP%]{background:#333}.past[_nghost-%COMP%]{background:#333}.sold-out[_nghost-%COMP%]{background:#d43f3a}"],changeDetection:0}),r})();var sn=o(82156);const an=function(r){return{tz:r}};function Ue(r,h){if(1&r&&(n.TgZ(0,"small",4),n._UZ(1,"i",5)(2,"span",6),n.ALo(3,"formatTimezoneName"),n.qZA()),2&r){const l=n.oxw();n.xp6(2),n.Q6J("translate","evtInOtherTimezone")("tr-placeholders",n.VKq(4,an,n.lcZ(3,2,l.event.timezone)))}}function rn(r,h){if(1&r&&(n.TgZ(0,"tg-event-box-overlay",7),n._uU(1),n.ALo(2,"tr"),n.qZA()),2&r){const l=n.oxw();n.Q6J("ngClass",l.overlay.clazz)("icon",l.overlay.icon),n.xp6(1),n.hij("",n.lcZ(2,3,l.overlay.label),".")}}(0,fe.applyGlobalStyle)("tg-event-box-heading","tg-event-box-heading{cursor:pointer;display:block;position:relative}tg-event-box-heading>.tz{bottom:0;left:0;text-align:center}tg-event-box-heading tg-no-image{cursor:pointer!important}");let $t=(()=>{class r extends xt{constructor(l){super(),this.user=l,this.EventStatus=W.N}ngOnChanges(l){!l.event||(this.overlay=this.resolveOverlay(),this.isInOtherTimezone=this.event.isInOtherTimezone())}resolveOverlay(){if(!this.event.bookable)return null;if(this.event.status===W.N.CANCELLED)return{clazz:"cancelled",icon:"fa-ban",label:"cancelled"};if(this.event.status===W.N.DRAFT)return{clazz:"draft",icon:"fa-pencil-square-o",label:"draft"};if(this.event.isPast())return{clazz:"past",icon:"fa-clock-o",label:"ended"};if(this.event.invisible)return{clazz:"invisible-event",icon:"fa-eye-slash",label:"invisible"};const l=this.resolveTicketRolePredicate();let d=!0,A=!1,Z=!1,et=!1;for(const rt of this.event.tickets)if(rt.roles.some(l))switch(et=!0,rt.availability){case 0:case 2:A=!0,d=!1;break;case 1:Z=!0,d=!1}return A?null:et&&d?{clazz:"sold-out",icon:"fa-ticket",label:"ticket_state_sold-out"}:Z?{clazz:"sales-end",icon:"fa-ticket",label:"ticketSalesEnded"}:null}resolveTicketRolePredicate(){const l=new Set(this.user?.roles.length?[...this.user.roles,"public"]:void 0);return!l.size||1===l.size&&l.has("public")?d=>"public"===d:l.has("administrator")?Qt.Z:d=>"public"===d||l.has(d)}}return r.\u0275fac=function(l){return new(l||r)(n.Y36(st.Ej))},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-box-heading"]],features:[n.qOj,n.TTD],decls:4,vars:5,consts:[[3,"event"],["class","label label-info overlay-label tz",4,"ngIf"],[3,"ngClass","icon",4,"ngIf"],[3,"url","fullWidth"],[1,"label","label-info","overlay-label","tz"],[1,"fa","fa-info-circle"],[3,"translate","tr-placeholders"],[3,"ngClass","icon"]],template:function(l,d){1&l&&(n._UZ(0,"tg-event-price-tag",0),n.YNc(1,Ue,4,6,"small",1),n.YNc(2,rn,3,5,"tg-event-box-overlay",2),n._UZ(3,"tg-event-box-img",3)),2&l&&(n.Q6J("event",d.event),n.xp6(1),n.Q6J("ngIf",d.isInOtherTimezone),n.xp6(1),n.Q6J("ngIf",d.overlay),n.xp6(1),n.Q6J("url",d.event.image)("fullWidth",!0))},dependencies:[X.mk,X.O5,Te.G,At.P,Se.Y,De,Pe,ae.H,sn._],styles:[".overlay-label[_ngcontent-%COMP%]{margin:0;position:absolute;right:0;z-index:1}"],changeDetection:0}),r})();var _e=o(50339),Ze=o(43480),Re=o(57384),we=o(69260),ln=o(12934);function cn(r,h){if(1&r&&(n.TgZ(0,"tg-tag",3),n._uU(1),n.qZA()),2&r){const l=h.$implicit,d=n.oxw(2);n.Q6J("colour",d.colours[l]),n.xp6(1),n.Oqu(l)}}function un(r,h){if(1&r&&(n.TgZ(0,"div",1),n.YNc(1,cn,2,2,"tg-tag",2),n.qZA()),2&r){const l=n.oxw();n.xp6(1),n.Q6J("ngForOf",l.roles)}}let dn=(()=>{class r extends xt{constructor(l,d){super(),this.colours=l,this.user=d}ngOnChanges(l){if(!l.event)return;const d=this.user,A=this.event.roles||[],et=Boolean(d?.isSiteAdmin)?A:(0,we.Z)(A,[...d?.roles||[],"public"]);this.roles=[...new Set(et)]}}return r.\u0275fac=function(l){return new(l||r)(n.Y36(bt.EVENT_AUDIENCE_COLOURS),n.Y36(st.Ej))},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-audiences"]],features:[n.qOj,n.TTD],decls:1,vars:1,consts:[["class","inner-container",4,"ngIf"],[1,"inner-container"],[3,"colour",4,"ngFor","ngForOf"],[3,"colour"]],template:function(l,d){1&l&&n.YNc(0,un,2,1,"div",0),2&l&&n.Q6J("ngIf",d.colours&&(null==d.roles?null:d.roles.length))},dependencies:[X.sg,X.O5,ln.s],styles:["[_nghost-%COMP%]{height:100%}.inner-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;height:100%;min-width:0;width:100%}tg-tag[_ngcontent-%COMP%]{flex-grow:1;margin:3px;max-width:100%;overflow:hidden;text-overflow:ellipsis;text-transform:capitalize;white-space:nowrap}@media (min-width:768px){tg-tag[_ngcontent-%COMP%]{max-width:50%}}"],changeDetection:0}),r})();function pn(r,h){if(1&r&&n._UZ(0,"tg-event-time",11),2&r){const l=n.oxw();n.Q6J("startDate",l.event.start_date)("timezone",l.event.timezone)("fw",!0)}}function Ne(r,h){1&r&&n._UZ(0,"hr")}function gn(r,h){if(1&r&&n._UZ(0,"tg-event-audiences",4),2&r){const l=n.oxw(2);n.Q6J("event",l.event)}}function hn(r,h){if(1&r&&n.YNc(0,gn,1,1,"tg-event-audiences",12),2&r){const l=n.oxw();n.Q6J("ngIf",l.showAudiences)}}function fn(r,h){if(1&r&&(n.TgZ(0,"span",14),n._UZ(1,"i",15)(2,"span",16),n.qZA()),2&r){const l=h.ngIf;n.xp6(2),n.Q6J("translate",l)}}function Me(r,h){if(1&r&&n.YNc(0,fn,3,1,"span",13),2&r){const l=n.oxw(),d=n.MAs(10);n.Q6J("ngIf",l.attendingTxt)("ngIfElse",d)}}function ye(r,h){1&r&&(n.TgZ(0,"span",18),n._UZ(1,"i",19)(2,"span",16),n.qZA()),2&r&&(n.xp6(2),n.Q6J("translate","joinedWaitlist"))}function Le(r,h){if(1&r&&n.YNc(0,ye,3,1,"span",17),2&r){const l=n.oxw(),d=n.MAs(12);n.Q6J("ngIf",l.isWaiting)("ngIfElse",d)}}function vn(r,h){1&r&&(n.TgZ(0,"span",20),n._UZ(1,"i",21)(2,"span",16),n.qZA()),2&r&&(n.xp6(2),n.Q6J("translate","declined"))}const mn=function(r){return{eventId:r}};let Je=(()=>{class r extends xt{constructor(l){super(),this.user=l,this.showAudiences=!0}ngOnChanges(l){l.event&&(this.isDeclined=this.event.isDeclined(),this.isWaiting=this.event.isWaiting(
1),this.attendingTxt=this.resolveAttendingTxt())}resolveAttendingTxt(){return this.event.isAttending(this.user)?"gotBookedTicket":this.event.isGuest(this.user)?"bookedAsGuest":this.event.isAwaitingPayment(this.user)?"awaitingPayment":null}}return r.\u0275fac=function(l){return new(l||r)(n.Y36(st.Ej))},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-box-body"]],hostVars:2,hostBindings:function(l,d){2&l&&n.ekj("panel-body",!0)},inputs:{showAudiences:"showAudiences"},features:[n.qOj,n.TTD],decls:16,vars:10,consts:[[1,"event-box-title","line-4"],[3,"uiSref","uiParams"],[1,"timeloc"],[3,"startDate","timezone","fw",4,"ngIf"],[3,"event"],[4,"ngIf"],[1,"event-box-footer"],["tplAudiences",""],["tplCheckIfAttending",""],["tplCheckIfWaitlisting",""],["class","label label-danger",4,"ngIf","ngIfElse"],[3,"startDate","timezone","fw"],[3,"event",4,"ngIf"],["class","label label-info",4,"ngIf","ngIfElse"],[1,"label","label-info"],[1,"fa","fa-ticket"],[3,"translate"],["class","label label-warning",4,"ngIf","ngIfElse"],[1,"label","label-warning"],[1,"fa","fa-hourglass-half"],[1,"label","label-danger"],[1,"fa","calendar-times-o"]],template:function(l,d){if(1&l&&(n.TgZ(0,"h4",0)(1,"a",1),n._uU(2),n.qZA()(),n.TgZ(3,"div",2),n.YNc(4,pn,1,3,"tg-event-time",3),n.qZA(),n.TgZ(5,"div",2),n._UZ(6,"tg-event-location",4),n.qZA(),n.YNc(7,Ne,1,0,"hr",5),n.TgZ(8,"div",6),n.YNc(9,hn,1,1,"ng-template",null,7,n.W1O),n.YNc(11,Me,1,2,"ng-template",null,8,n.W1O),n.YNc(13,Le,1,2,"ng-template",null,9,n.W1O),n.YNc(15,vn,3,1,"span",10),n.qZA()),2&l){const A=n.MAs(14);n.xp6(1),n.Q6J("uiSref","events.view.eventapp.description")("uiParams",n.VKq(8,mn,d.event.id)),n.xp6(1),n.Oqu(d.event.title),n.xp6(2),n.Q6J("ngIf",d.event.date_shown),n.xp6(2),n.Q6J("event",d.event),n.xp6(1),n.Q6J("ngIf",d.isWaiting||d.showAudiences||d.attendingTxt||d.isDeclined),n.xp6(8),n.Q6J("ngIf",d.isDeclined)("ngIfElse",A)}},dependencies:[X.O5,Te.G,At.P,_e.k,z.UISref,z.AnchorUISref,Ze.x,Re.W,dn],styles:[".event-box-title[_ngcontent-%COMP%]{-webkit-box-orient:vertical;-webkit-line-clamp:4;color:#f47920;display:-webkit-box;line-height:20px;overflow:hidden}.line-4[_ngcontent-%COMP%]{height:82px}","[_nghost-%COMP%]{display:block;height:100%;margin-bottom:0}.timeloc[_ngcontent-%COMP%]{height:30px;line-height:14px;overflow:hidden}hr[_ngcontent-%COMP%]{margin-bottom:10px;margin-top:10px}.event-box-footer[_ngcontent-%COMP%]{height:100%}.event-box-footer[_ngcontent-%COMP%] > .label[_ngcontent-%COMP%]:not(:last-child){display:inline-block;margin-left:3px}"],changeDetection:0}),r})();const xe=function(r){return{eventId:r}};let $e=(()=>{class r extends xt{constructor(){super(...arguments),this.showAudiences=!0}}return r.\u0275fac=function(){let h;return function(d){return(h||(h=n.n5z(r)))(d||r)}}(),r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-box"]],hostVars:6,hostBindings:function(l,d){2&l&&n.ekj("col-md-3",!0)("col-sm-6",!0)("col-xs-12",!0)},inputs:{showAudiences:"showAudiences"},features:[n._Bn([{provide:J.z,useValue:"events"}]),n.qOj],decls:3,vars:7,consts:[[1,"panel","panel-default"],[3,"event","uiSref","uiParams"],[3,"event","showAudiences"]],template:function(l,d){1&l&&(n.TgZ(0,"div",0),n._UZ(1,"tg-event-box-heading",1)(2,"tg-event-box-body",2),n.qZA()),2&l&&(n.xp6(1),n.Q6J("event",d.event)("uiSref","events.view.eventapp.description")("uiParams",n.VKq(5,xe,d.event.id)),n.xp6(1),n.Q6J("event",d.event)("showAudiences",d.showAudiences))},dependencies:[z.UISref,$t,Je],styles:["[_nghost-%COMP%]{display:block;margin-bottom:20px}"],changeDetection:0}),r})();function Tn(r,h){if(1&r&&n._UZ(0,"tg-event-box",5),2&r){const l=h.$implicit,d=n.oxw(2);n.Q6J("event",l)("showAudiences",d.showAudiences)}}function En(r,h){if(1&r){const l=n.EpF();n.TgZ(0,"div",3),n.NdJ("scrolled",function(){n.CHM(l);const A=n.oxw();return n.KtG(A.scroller.scrolled())}),n.YNc(1,Tn,1,2,"tg-event-box",4),n.qZA()}if(2&r){const l=n.oxw();n.Q6J("immediateCheck",!0)("scrollWindow",!0)("infiniteScrollDisabled",l.busy||l.done),n.xp6(1),n.Q6J("ngForOf",l.events)("ngForTrackBy",l.TRACK_BY_ID)}}function Cn(r,h){if(1&r&&n._UZ(0,"div",6),2&r){const l=n.oxw();n.Q6J("translate",null!=l.events&&l.events.length?"noMoreEvents":"noEvents")}}function _n(r,h){1&r&&(n.TgZ(0,"div",7),n._UZ(1,"tg-loader-spinner-lg"),n.qZA())}let yn=(()=>
1{class r{constructor(l,d,A,Z,et,rt){this.scroller=l,this.evtRes=d,this.host=A,this.cdr=Z,this.eventConfig=et,this.loggedInUser=rt,this.TRACK_BY_ID=Tt.trackById,this.busy=!1,this.done=!1,this.showAudiences=this.eventConfig.showAudiences}ngOnDestroy(){(0,Et.unsubscribeFromAll)(this._sub)}ngOnInit(){this.scroller.useCursor(!1).setCallable(l=>this.evtRes.query({params:l})),this._sub=[this.scroller.mirrorDoneBusy(this.cdr,this,"busy","done"),this.scroller.alertOnErrors(),this.host.query$.pipe((0,C.T)(1),(0,w.b)(250),(0,Bt.O)(this.host.query),(0,M.w)(l=>{const d={limit:20,status:[W.N.PUBLISHED],...l};return this.loggedInUser?.isSiteAdmin&&d.status.push(W.N.DRAFT),this.scroller.setParams(d).getData(20)})).subscribe((0,D.e)(l=>{this.events=l,this.cdr.markForCheck()}))]}}return r.\u0275fac=function(l){return new(l||r)(n.Y36(dt.TgInfiniteScroller),n.Y36(yt.U),n.Y36($.A),n.Y36(n.sBO),n.Y36(j.f),n.Y36(st.Ej))},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-events-list"]],features:[n._Bn([dt.TgInfiniteScroller,{provide:J.z,useValue:"events"}])],decls:3,vars:3,consts:[["class","events-div row","infiniteScroll","",3,"immediateCheck","scrollWindow","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","alert alert-info text-center",3,"translate",4,"ngIf"],["class","text-center",4,"ngIf"],["infiniteScroll","",1,"events-div","row",3,"immediateCheck","scrollWindow","infiniteScrollDisabled","scrolled"],[3,"event","showAudiences",4,"ngFor","ngForOf","ngForTrackBy"],[3,"event","showAudiences"],[1,"alert","alert-info","text-center",3,"translate"],[1,"text-center"]],template:function(l,d){1&l&&(n.YNc(0,En,2,5,"div",0),n.YNc(1,Cn,1,1,"div",1),n.YNc(2,_n,2,0,"div",2)),2&l&&(n.Q6J("ngIf",d.events),n.xp6(1),n.Q6J("ngIf",d.done),n.xp6(1),n.Q6J("ngIf",d.busy||!d.events))},dependencies:[X.sg,X.O5,At.P,Lt.Z,Kt.a,ee.N,ne.Ry,$e],styles:[".events-div[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:wrap}.events-div[_ngcontent-%COMP%]:after, .events-div[_ngcontent-%COMP%]:before{display:none!important}"],changeDetection:0}),r})();var xn=o(48568),Fe=o(87399);function bn(r,h){1&r&&n._UZ(0,"tg-loader-spinner-lg")}function An(r,h){1&r&&(n.TgZ(0,"span"),n._uU(1),n.ALo(2,"tr"),n.qZA(),n._UZ(3,"a",8),n.TgZ(4,"span"),n._uU(5,"."),n.qZA()),2&r&&(n.xp6(1),n.AsE("",n.lcZ(2,4,"noCurrEvents"),"."," ",""),n.xp6(2),n.Q6J("uiSref","events.home.list")("translate","browseLatestEvents"))}function On(r,h){1&r&&n._UZ(0,"tg-event-box",11),2&r&&n.Q6J("event",h.$implicit)}function kn(r,h){if(1&r&&(n.TgZ(0,"div",9),n.YNc(1,On,1,1,"tg-event-box",10),n.qZA()),2&r){const l=n.oxw(2);n.xp6(1),n.Q6J("ngForOf",l.current)("ngForTrackBy",l.TRACK_BY_ID)}}function Sn(r,h){1&r&&n._UZ(0,"span",4),2&r&&n.Q6J("translate","noPastEvents")}function Mn(r,h){1&r&&n._UZ(0,"tg-event-box",11),2&r&&n.Q6J("event",h.$implicit)}function Bn(r,h){if(1&r&&(n.TgZ(0,"div",9),n.YNc(1,Mn,1,1,"tg-event-box",10),n.qZA()),2&r){const l=n.oxw(2);n.xp6(1),n.Q6J("ngForOf",l.past)("ngForTrackBy",l.TRACK_BY_ID)}}function In(r,h){if(1&r&&(n.TgZ(0,"div",3),n._UZ(1,"h2",4)(2,"span",4),n.qZA(),n.YNc(3,An,6,6,"ng-template",null,5,n.W1O),n.TgZ(5,"div",3),n._UZ(6,"h2",4),n.qZA(),n.YNc(7,kn,2,2,"div",6),n.YNc(8,Sn,1,1,"ng-template",null,7,n.W1O),n.TgZ(10,"div",3),n._UZ(11,"h2",4),n.qZA(),n.YNc(12,Bn,2,2,"div",6)),2&r){const l=n.MAs(4),d=n.MAs(9),A=n.oxw();n.xp6(1),n.Q6J("translate","events.own"),n.xp6(1),n.Q6J("translate","events.own.explainer"),n.xp6(4),n.Q6J("translate","currEvents"),n.xp6(1),n.Q6J("ngIf",A.current.length)("ngIfElse",l),n.xp6(4),n.Q6J("translate","pastEvents"),n.xp6(1),n.Q6J("ngIf",A.past.length)("ngIfElse",d)}}let Dn=(()=>{class r{constructor(l,d,A){this.cdr=l,this.evtRes=d,this.user=A,this.TRACK_BY_ID=Tt.trackById}ngOnDestroy(){this._sub?.unsubscribe()}ngOnInit(){const l=this.user?.id;l?this._sub=this.evtRes.userBookings({userId:l}).pipe((0,xn.g)((d,A)=>{const Z=Fe.tz(A.timezone);return(Fe.tz(A.end_date,A.timezone).isAfter(Z)?d.current:d.past).push(A),d},()=>({current:[],past:[]})),(0,Zt.H)("[OwnEventsComponent.init]")).subscribe((0,D.e)(d=>{this.current=d.current,this.past=d.past,this.cdr.markForCheck()})):this.current=this.past=[]}}return r.\u0275fac=function(l){return new(l||r)(n.Y36(n.sBO),n.Y36(yt.U),n.Y36(st.Ej))},r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-own-events"]],features:[n._Bn([{provide:J.z,useValue:"events"}])],decls:4,vars:2,consts:[["tplSpinner",""],[1,"container"],[3,"ngIf","ngIfElse"],[1,"page-header"],[3,"translate"],["tplNoCurrent",""],["class","row",4,"ngIf","ngIfElse"],["tplNoPast",""],[3,"uiSref","translate"],[1,"row"],[3,"event",4,"ngFor","ngForOf","ngForTrackBy"],[3,"event"]],template:function(l,d){if(1&l&&(n.YNc(0,bn,1,0,"ng-template",null,0,n.W1O),n.TgZ(2,"div",1),n.YNc(3,In,13,8,"ng-template",2),n.qZA()),2&l){const A=n.MAs(1);n.xp6(3),n.Q6J("ngIf",d.current)("ngIfElse",A)}},dependencies:[X.sg,X.O5,At.P,Lt.Z,_e.k,z.UISref,z.AnchorUISref,$e,ae.H],encapsulation:2,changeDetection:0}),r})();var Ye=o(92194),Gt=o(25336),Be=o(75372),Pn=o(60407),We=o(85597),Un=o(41383),re=o(20700),be=o(89758),Zn=o(66338),Rn=o(7670),Qe=o(10319),Ge=o(16354),wn=o(37666),Nn=o(39805);const Ln=["eventListAttendee",""];function Jn(r,h){1&r&&(n.TgZ(0,"span",6),n._uU(1),n.ALo(2,"tr"),n.qZA()),2&r&&(n.xp6(1),n.hij("[",n.lcZ(2,1,"guestDetailsNotSet"),"]"))}function $n(r,h){1&r&&(n.TgZ(0,"span",6),n._uU(1),n.ALo(2,"tr"),n.qZA()),2&r&&(n.xp6(1),n.hij("[",n.lcZ(2,1,"aDeletedMem"),"]"))}function Fn(r,h){if(1&r&&(n.TgZ(0,"a",7),n._UZ(1,"tg-user-name",8),n.qZA()),2&r){const l=n.oxw();n.Q6J("uiSref","addressbook.profile")("uiParams",l.userSrefParams),n.xp6(1),n.Q6J("user",l.attendee.user)("link",!0)}}function Yn(r,h){if(1&r){const l=n.EpF();
1n.TgZ(0,"span",9),n.NdJ("click.passive",function(){n.CHM(l);const A=n.oxw();return n.KtG(A.toggleOpen())}),n._UZ(1,"tg-caret",10),n.TgZ(2,"span"),n._uU(3),n.ALo(4,"applyTrPlaceholders"),n.ALo(5,"translateCount"),n.ALo(6,"tr"),n.qZA()()}if(2&r){const l=n.oxw();n.uIk("aria-pressed",l.open.toString()),n.xp6(1),n.Q6J("direction",l.open?"up":"down"),n.xp6(2),n.Oqu(n.xi3(4,3,n.xi3(5,6,n.lcZ(6,9,"nGuests"),l.numGuestsPH.num),l.numGuestsPH))}}function Wn(r,h){if(1&r&&(n.TgZ(0,"span"),n._uU(1),n.qZA()),2&r){const l=n.oxw(2).$implicit;n.xp6(1),n.AsE("",l.firstname," ",l.lastname,"")}}function pe(r,h){if(1&r&&(n._UZ(0,"img",15),n.YNc(1,Wn,2,2,"span",16)),2&r){const l=n.oxw().$implicit,d=n.oxw(2),A=n.MAs(1);n.Q6J("src",d.ANON_IMG,n.LSH),n.xp6(1),n.Q6J("ngIf",l.firstname)("ngIfElse",A)}}function Qn(r,h){if(1&r&&n._UZ(0,"tg-user-name",8),2&r){const l=n.oxw().$implicit;n.Q6J("user",l.user)("link",!0)}}function Gn(r,h){if(1&r&&(n.TgZ(0,"div"),n.YNc(1,pe,2,3,"ng-template",null,13,n.W1O),n.YNc(3,Qn,1,2,"tg-user-name",14),n.qZA()),2&r){const l=h.$implicit,d=n.MAs(2);n.xp6(3),n.Q6J("ngIf",l.user)("ngIfElse",d)}}function Hn(r,h){if(1&r&&(n._UZ(0,"hr"),n.TgZ(1,"div",11),n.YNc(2,Gn,4,2,"div",12),n.qZA()),2&r){const l=n.oxw();n.xp6(1),n.Q6J("@slideDownOnEntry",void 0)("@slideUpOnExit",void 0),n.xp6(1),n.Q6J("ngForOf",l.attendee.guests)}}let Kn=(()=>{class r{constructor(){this.ANON_IMG=Zn,this.open=!1}ngOnChanges(){const l=this.attendee.user?.id;this.userSrefParams=l?{userId:l}:void 0,this.hasGuests=Boolean(this.attendee.guests.length),this.hasGuests?this.numGuestsPH={num:this.attendee.guests.length}:this.open=!1}toggleOpen(){this.open=!this.open}}return r.\u0275fac=function(l){return new(l||r)},r.\u0275cmp=n.Xpm({type:r,selectors:[["","eventListAttendee",""]],inputs:{attendee:["eventListAttendee","attendee"]},features:[n.TTD],attrs:Ln,decls:8,vars:4,consts:[["tplNotSet",""],[1,"top"],["tplBinned",""],[3,"uiSref","uiParams",4,"ngIf","ngIfElse"],["class","guest-ctrl","role","button",3,"click.passive",4,"ngIf"],[3,"ngIf"],[1,"text-muted"],[3,"uiSref","uiParams"],[3,"user","link"],["role","button",1,"guest-ctrl",3,"click.passive"],[3,"direction"],[1,"guests"],[4,"ngFor","ngForOf"],["tryName",""],[3,"user","link",4,"ngIf","ngIfElse"],["alt","Photo","loading","lazy",3,"src"],[4,"ngIf","ngIfElse"]],template:function(l,d){if(1&l&&(n.YNc(0,Jn,3,3,"ng-template",null,0,n.W1O),n.TgZ(2,"div",1),n.YNc(3,$n,3,3,"ng-template",null,2,n.W1O),n.YNc(5,Fn,2,4,"a",3),n.YNc(6,Yn,7,11,"span",4),n.qZA(),n.YNc(7,Hn,3,3,"ng-template",5)),2&l){const A=n.MAs(4);n.xp6(5),n.Q6J("ngIf",d.userSrefParams)("ngIfElse",A),n.xp6(1),n.Q6J("ngIf",d.hasGuests),n.xp6(1),n.Q6J("ngIf",d.open)}},dependencies:[X.sg,X.O5,_e.k,z.UISref,z.AnchorUISref,Ge.j,O.K,wn.d,Nn.v,ae.H],styles:[".top[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between}.guest-ctrl[_ngcontent-%COMP%]{cursor:pointer}.guests[_ngcontent-%COMP%]{padding-left:35px}hr[_ngcontent-%COMP%]{margin:0}img[_ngcontent-%COMP%]{height:20px;margin-right:3px;width:20px}"],data:{animation:[Rn.Y,Qe.b]},changeDetection:0}),r})();function zn(r,h){1&r&&n._UZ(0,"tg-loader-spinner-lg")}function jn(r,h){if(1&r&&n._UZ(0,"div",3),2&r){const l=n.oxw();n.Q6J("translate",l.isPast?"noOneAttended":"noOneAttending")}}function ge(r,h){1&r&&n._UZ(0,"div",7),2&r&&n.Q6J("eventListAttendee",h.$implicit)}function ve(r,h){if(1&r&&(n.TgZ(0,"div",5),n.YNc(1,ge,1,1,"div",6),n.qZA()),2&r){const l=n.oxw(2);n.xp6(1),n.Q6J("ngForOf",l.bookings)("ngForTrackBy",l.trackByUserId)}}function Vn(r,h){if(1&r&&n.YNc(0,ve,2,2,"div",4),2&r){const l=n.oxw(),d=n.MAs(3);n.Q6J("ngIf",l.bookings.length)("ngIfElse",d)}}let He=(()=>{class r extends be.I{constructor(){super(...arguments),this.bookings=(0,n.f3M)(bt.EVENT_ATTENDEES),this.actions$=(0,n.f3M)(c.eX),this.evtCfg=(0,n.f3M)(j.f),this.evtRes=(0,n.f3M)(yt.U),this.uRes=(0,n.f3M)(I.q),this.uSvc=(0,n.f3M)(pt.KD)}static fetchBookings(l,d,A){const Z={status:re.EventBookingState.ATTENDING};return A.app.attendees.showAwaitingPayment&&(Z.status=[re.EventBookingState.ATTENDING,re.EventBookingState.AWAITING_PAYMENT]),d.getBookings({eventId:l},{params:Z})}ngOnInit(){super.ngOnInit(),this.isPast=this.event.isPast();const l=r.fetchBookings(this.event.id,this.evtRes,this.evtCfg).pi
1pe((0,Dt.b)(Z=>{this.bookings=Z,this.cdr.markForCheck()})),d=this.actions$.pipe((0,c.l4)("event:unbooked"),(0,M.w)(()=>this.uSvc.latest("user","id")),(0,M.w)(Z=>{if(!Z)return l;const et=this.bookings.findIndex(rt=>rt.user.id===Z);if(-1!==et){const rt=[...this.bookings];rt.splice(et,1),this.bookings=rt,this.cdr.markForCheck()}return Yt.E}),(0,Zt.H)("[EventAttendeesTab.onBookingCancel]")),A=this.actions$.pipe((0,Be.h)(Z=>"eventBooking:complete"===Z.type&&Z.value?.status!==re.EventBookingState.WAITLIST),(0,M.w)(Z=>this.uSvc.resourcefulStore.pipe((0,Pn.q)(1),(0,M.w)(({user:et})=>et?this.concatBookings(et,Z.value):l))),(0,Dt.b)(Z=>{this.bookings=Z,this.cdr.markForCheck()}),(0,Zt.H)("[EventAttendeesTab.onBooking]"));(0,te.T)(d,A).pipe((0,We.R)(this.destroyed$)).subscribe(Ye.V)}trackByUserId(l,d){return d.user?.id||`deleted-${l}`}concatBookings(l,d){const A=d.guests.reduce((Z,et)=>(et.user&&Z.push(et.user),Z),[]);return A?.length?this.uRes.query({params:{ids:A}}).pipe((0,Nt.U)(Z=>{const et=(0,Un.b)(Z,rt=>rt.id);return[d.$clone({guests:d.guests.map(rt=>rt.user?rt.$clone({user:et.get(rt.user)}):rt),user:l}),...this.bookings]})):(0,Gt.of)([d.$clone({user:l}),...this.bookings])}}return r.\u0275fac=function(){let h;return function(d){return(h||(h=n.n5z(r)))(d||r)}}(),r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-attendees-tab"]],features:[n._Bn([{provide:J.z,useValue:"events"}]),n.qOj],decls:5,vars:2,consts:[["tplSpinner",""],["tplNoAttendees",""],[3,"ngIf","ngIfElse"],[1,"alert","alert-info","text-center","mb0",3,"translate"],["class","list-group",4,"ngIf","ngIfElse"],[1,"list-group"],["class","list-group-item",3,"eventListAttendee",4,"ngFor","ngForOf","ngForTrackBy"],[1,"list-group-item",3,"eventListAttendee"]],template:function(l,d){if(1&l&&(n.YNc(0,zn,1,0,"ng-template",null,0,n.W1O),n.YNc(2,jn,1,1,"ng-template",null,1,n.W1O),n.YNc(4,Vn,1,2,"ng-template",2)),2&l){const A=n.MAs(1);n.xp6(4),n.Q6J("ngIf",d.bookings)("ngIfElse",A)}},dependencies:[X.sg,X.O5,At.P,Lt.Z,Kt.a,Kn],styles:[".mb0[_ngcontent-%COMP%]{margin-bottom:0}"],changeDetection:0}),r})();var Ke=o(36635);function Xn(r,h){if(1&r&&n._UZ(0,"tg-wysiwyg-viewer",1),2&r){const l=n.oxw();n.Q6J("content",l.event.description)}}let ze=(()=>{class r extends be.I{}return r.\u0275fac=function(){let h;return function(d){return(h||(h=n.n5z(r)))(d||r)}}(),r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-description-tab"]],features:[n.qOj],decls:1,vars:1,consts:[[3,"content",4,"ngIf"],[3,"content"]],template:function(l,d){1&l&&n.YNc(0,Xn,1,1,"tg-wysiwyg-viewer",0),2&l&&n.Q6J("ngIf",d.event)},dependencies:[X.O5,Ke.n],encapsulation:2,changeDetection:0}),r})();var qn=o(12943),to=o(12848),je=o(97119);function eo(r,h){if(1&r&&n._UZ(0,"tg-wysiwyg-viewer",4),2&r){const l=n.oxw().$implicit;n.Q6J("content",l.content)}}function le(r,h){1&r&&(n.TgZ(0,"tg-tab",2),n.ALo(1,"tr"),n.YNc(2,eo,1,1,"tg-wysiwyg-viewer",3),n.qZA()),2&r&&n.Q6J("title",h.$implicit.title||n.lcZ(1,1,"untitledSection"))}function ce(r,h){if(1&r&&(n.TgZ(0,"tg-tabs"),n.YNc(1,le,3,3,"tg-tab",1),n.qZA()),2&r){const l=n.oxw();n.xp6(1),n.Q6J("ngForOf",l.event.more_info)}}let no=(()=>{class r extends be.I{}return r.\u0275fac=function(){let h;return function(d){return(h||(h=n.n5z(r)))(d||r)}}(),r.\u0275cmp=n.Xpm({type:r,selectors:[["tg-event-more-info"]],features:[n._Bn([{provide:J.z,useValue:"events"}]),n.qOj],decls:1,vars:1,consts:[[4,"ngIf"],[3,"title",4,"ngFor","ngForOf"],[3,"title"],[3,"content",4,"tgTabContent"],[3,"content"]],template:function(l,d){1&l&&n.YNc(0,ce,2,1,"tg-tabs",0),2&l&&n.Q6J("ngIf",null==d.event.more_info?null:d.event.more_info.length)},dependencies:[X.sg,X.O5,Ke.n,qn.s,to.l,je.I,ae.H],styles:["tg-wysiwyg-viewer[_ngcontent-%COMP%]{margin-top:5px}"],changeDetection:0}),r})();var oo=o(4253);const io={deps:[pt.KD,I.q],resolveFn:(r,h)=>(0,ot.Z)(function*(){return(yield(0,ht.z)(r.resourcefulStore)).user||h.instantiate({roles:["public"]})})(),token:st.Ej},so={deps:[wt.Z,q.Transition,V.c,yt.U],resolveFn:(r,h,l,d)=>(0,ot.Z)(function*(){let A;try{A=yield(0,mt.n)(d.get(h.params().eventId,{params:{populate_primary_contact:!0}}))}catch(Z){if(l.negotiate(Z),401!==Z.status)return yield(0,mt.n)(r.goHome(h));throw Z}return A.booking&&(A.booking.ticket=A.tickets.find(Z=>Z.id===A.booking.ticket)),A})(),token:st.wp},Ve={deps:[Ct.N],resolveFn:r=>(0,ot.Z)(function*(){const h=yield(0,ht.z)(r.all),l=["primary","success","warning","danger","info","default"],d={};for(let A=0;A<h.length;A++)d[h[A].name]=l[A%l.length];return d})(),token:bt.EVENT_AUDIENCE_COLOURS};function Xe(r){return{deps:[j.f,kt.E],resolveFn:(h,l)=>h[r].show?(0,mt.n)(l.get("type"===r?"event_types":"event_categories")):[],token:"type"===r?bt.EVENT_TYPES:bt.EVENT_CATEGORIES}}function he(r){return oe.apply(this,arguments)}function oe(){return(oe=(0,ot.Z)(function*(r){if(r.dynamic())return;const h=r.injector(),[l,d,A]=yield Promise.all([h.getAsync(st.Ej),h.getAsync(st.wp),h.getAsync(bt.EVENT_IS_EXPIRED_MEMBERSHIP_MODE)]),Z=h.get(V.c),et=h.get(wt.Z),rt=r.params().ticket,zt=r.params().open,Jt=["events.view.eventapp.description",{eventId:r.params().eventId},{inherit:!1}];if(!rt&&zt||zt&&d.booking)return et.createTargetState(...Jt);if(!rt)return;const Ht=A?Ft=>
1Ft.rolesCanBuy(["public"]):d.createTicketsBuyableByRolesPredicate(l.roles);return 0!==d.tickets.find(Ft=>Ft.id===rt&&Ht(Ft))?.availability?(Z.alertError({key:"ticketNotAvailable",ns:"events"}),et.createTargetState(...Jt)):void 0})).apply(this,arguments)}const lo=[{abstract:!0,component:E.i$,name:"events",resolve:[B.resolveMembershipConfig,U.wf,(0,y.M)(bt.EVENT_IS_EXPIRED_MEMBERSHIP_MODE,[q.Transition],function(){var r=(0,ot.Z)(function*(h){const l=h.injector(),[d,A,Z]=yield Promise.all([l.getAsync(st.q),l.getAsync(j.f),l.getAsync(st.Ej)]);return d.enable&&A.expiredMembersAllowedToBookPublicTickets&&null!=Z&&!Z.isPublic&&!Z.hasValidMembership});return function(h){return r.apply(this,arguments)}}())],url:"/events"},{abstract:!0,component:$.A,dynamic:!0,name:"events.home",resolve:[Xe("type"),Xe("category")],url:"?type&category"},{component:yn,data:{requireLogin:{path:["events","list"]}},name:"events.home.list",resolve:[Ve],url:""},{data:{checkConfigEnabled:{path:"calendar",token:j.W}},loadChildren:()=>o.e(4198).then(o.bind(o,14198)).then(r=>r.EventCalendarModule),name:"events.home.calendar",url:"/calendar"},{component:Dn,data:{requireLogin:{path:["events","own"]}},name:"events.own",resolve:[U.wf,Ve],url:"/my"},{component:oo.E,name:"events.view",params:{open:{dynamic:!0,replace:[{from:"",to:!0}]},ticket:{dynamic:!0}},redirectTo:he,resolve:[io,so,B.resolveProfileConfig,B.resolveAddressbookConfig],url:"/{eventId:ObjectId}?{ticket:ObjectId}&{open:AltBoolean}"},{abstract:!0,component:E.i$,name:"events.view.eventapp",redirectTo:he,resolve:[ut,de],url:""},{component:no,data:{checkConfigEnabled:{path:["app","moreInfo","enable"],token:j.W},disableAutoscroll:!0},name:"events.view.eventapp.moreinfo",redirectTo:he,url:"/moreinfo"},{component:He,data:{checkConfigEnabled:{path:["app","attendees","enable"],token:j.W},disableAutoscroll:!0},name:"events.view.eventapp.attendees",redirectTo:he,resolve:[(0,y.M)(bt.EVENT_ATTENDEES,[yt.U,st.wp,j.f],(r,h,l)=>(0,mt.n)(He.fetchBookings(h.id,r,l)))],url:"/attendees"},{component:ze,data:{disableAutoscroll:!0},name:"events.view.eventapp.description",redirectTo:he,url:"/description"},{data:{checkConfigEnabled:{path:["app","chat","enable"],token:j.W}}
1,loadChildren:()=>Promise.all([o.e(7740),o.e(3355),o.e(8592),o.e(7186)]).then(o.bind(o,67186)).then(r=>r.EventChatTabModule),name:"events.view.eventapp.chat",redirectTo:he,url:"/chat"}];var co=o(43082),uo=o(78946),po=o(7808);let go=(()=>{class r{}return r.\u0275fac=function(l){return new(l||r)},r.\u0275mod=n.oAB({type:r}),r.\u0275inj=n.cJS({imports:[b.GlobalModule,Ze.x,Se.Y,uo.c,P.a,ft.TgInfiniteScrollModule,Y.Y,jt,Q.D,f.z8,tt.W,gt.x,F.g,t.u5,t.UX,L.g,k.F,z.UIRouterModule.forChild({config:wt.Z.config(lo)}),c.sQ.forFeature([T]),it.g,m.n,O.K,x.K,K.TgTabsModule,nt.W,vt.j,Re.W,co.M,H._,po.i,Ee.r,G.O]}),r})()},43927:(Ut,at,o)=>{o.d(at,{A:()=>B});var Nt,t=o(64762),c=o(14026),z=o(69962),f=o(9803),P=o(56625),k=o(48921),b=o(50725),L=o(85597),O=o(78771),F=o(74174),Y=o(48e3),nt=o(89763),it=o(32657),H=o(20321),Q=o(60611),m=o(64177),x=o(85868),K=o(62441),tt=o(72922),ft=o(52805),X=o(43082),Mt=o(10174),n=o(5296),It=o(26454),jt=o(94e3),wt=o(23055),vt=o(76538),G=o(3811),gt=o(52264),Zt=o(97482),N=o(76473),Vt=o(70840),te=o(10218),Yt=o(80499),Pt=o(69733),Xt=o(39539),Rt=o(85032),Dt=o(64683);function lt(U,y){if(1&U&&(c.TgZ(0,"option",14),c._uU(1),c.qZA()),2&U){const E=y.$implicit;c.Q6J("ngValue",E),c.xp6(1),c.Oqu(E)}}function Bt(U,y){if(1&U&&(c.TgZ(0,"div",2)(1,"select",11),c._UZ(2,"option",12),c.YNc(3,lt,2,2,"option",13),c.qZA()()),2&U){const E=c.oxw(),I=E.ctrl,pt=E.labelAll,St=E.items;c.xp6(1),c.Q6J("formControlName",I),c.xp6(1),c.Q6J("ngValue",null)("translate",pt),c.xp6(1),c.Q6J("ngForOf",St)}}function ct(U,y){if(1&U&&c.YNc(0,Bt,4,4,"div",10),2&U){const I=y.items;c.Q6J("ngIf",y.enabled&&(null==I?null:I.length))}}function V(U,y){if(1&U&&(c.TgZ(0,"div",15),c._UZ(1,"tg-dropdown-select",16),c.ALo(2,"tr"),c.qZA()),2&U){const E=c.oxw();c.xp6(1),c.Q6J("array",E.categories)("formControlName","category")("multi",!0)("label",c.lcZ(2,4,"selectCategories"))}}function S(U,y){if(1&U&&(c.ynx(0,20),c._UZ(1,"button",8),c.BQk()),2&U){const E=y.ctrl,I=y.labelWhenTruthy,pt=y.labelWhenFalsy,St=c.oxw(2);c.Q6J("formControlName",E)("selectedBtnStyle",St.BS_STYLE_DEFAULT),c.xp6(1),c.Q6J("tgBtnToggle",!0)("translate",St.ctrl.controls[E].value?I:pt)}}const g=function(){return{ctrl:"future",labelWhenTruthy:"showPastEvents",labelWhenFalsy:"hidePastEvents"}};function u(U,y){if(1&U&&c.GkF(0,21),2&U){c.oxw();const E=c.MAs(2);c.Q6J("ngTemplateOutletContext",c.DdM(2,g))("ngTemplateOutlet",E)}}const v=function(){return{ctrl:"incl_cancelled",labelWhenTruthy:"hideCancelledEvents",labelWhenFalsy:"showCancelledEvents"}};function T(U,y){if(1&U&&c.GkF(0,21),2&U){c.oxw();const E=c.MAs(2);c.Q6J("ngTemplateOutletContext",c.DdM(2,v))("ngTemplateOutlet",E)}}function ot(U,y){if(1&U&&(c.TgZ(0,"div",17),c.YNc(1,S,2,4,"ng-template",null,18,c.W1O),c.YNc(3,u,1,3,"ng-container",19),c.YNc(4,T,1,3,"ng-container",19),c.qZA()),2&U){const E=c.oxw();c.xp6(3),c.Q6J("ngIf",E.filterPast),c.xp6(1),c.Q6J("ngIf",E.filterCancelled)}}const q=function(U,y){return{enabled:U,items:y,ctrl:"type",labelAll:"allTypes"}},ht=Symbol("showStatusFilters");class mt extends N.S{constructor(y,E,I,pt,St,Wt){super(),this.evtSvc=y,this.evtCfg=I,this.routing=pt,this.types=St,this.categories=Wt,this.BS_STYLE_DEFAULT="default",this[Nt]=new f.X(!0),this.user=E,this.categoriesEnabled=I.category.show,this.typesEnabled=I.type.show,this.filterCancelled=I.filterCancelled,this.filterPast=I.filterPast}ngOnDestroy(){this[ht].complete(),super.ngOnDestroy()}ngOnInit(){super.ngOnInit(),["type","category"].forEach(this.initUrlParams,this)}normaliseWriteValue(y){return"object"==typeof y&&null!=y?{...this.defaultValue,...(0,It.Z)(y,Object.keys(this.defaultValue)),_useMyRoles:!(0,jt.Z)(y.roles)}:(0,wt.Z)(this.defaultValue)}registerOnChange(y){super.registerOnChange(y),this._onChangeFn(this.computeValue(this.showStatusFilters,this.ctrl.getRawValue()))}createCtrl(){const{type:y,category:E}=this.routing.params,I=this.fb,pt=I.group({_useMyRoles:I.control(!0),category:I.control(E&&this.categories.includes(E)?E:null),future:I.control(this.evtCfg.filterPast&&!this.evtCfg.showPastEventsByDefault),incl_cancelled:I.control(!1),location:I.control(null),title:I.control(null),type:I.control(y&&this.types.includes(y)?y:null)});return this.defaultValue=(0,wt.Z)(pt.getRawValue()),pt}valueChanges(){return this[ht].pipe((0,G.w)(y=>(0,Vt.observeControlValue)(this.ctrl).pipe((0,b.U)(E=>this.computeValue(y,E)))),(0,Mt.p)(),(0,n.H)("[EventHomeFilter.initValue]"))}computeValue(y,E){const I=(0,vt.Z)(E,Boolean);if(y){const pt=I.future?this.evtCfg.sort.eventListFuture:this.evtCfg.sort.eventListAll;pt&&(I.sort=JSON.stringify(pt))}return I.location?function j(U){const[y,E]=U.location.position.coordinates;U.location=`${E},${y},10000`}(I):(delete I.lat,delete I.lng,delete I.radius),y&&I.incl_cancelled&&(I.status=[gt.N.PUBLISHED,gt.N.CANCELLED]),delete I.incl_cancelled,I._useMyRoles&&(I.roles=this.evtSvc.getEventHomeRoles(this.user)),delete I._useMyRoles,I}initUrlParams(y){this.ctrl.controls[y].valueChanges.pipe((0,L.R)(this[ht].pipe((0,P.Z)()))).subscribe(E=>{const I=this.routing.cleanParams;E!==I[y]&&this.routing.go(this.routing.current.name,{...I,[y]:E}).catch(console.error)})}}function kt(U,y){1&U&&c._UZ(0,"tg-evt-membership-expired",3)}function Ct(U,y){if(1&U&&(c.TgZ(0,"button",6),c._UZ(1,"i",7),c.qZA()),2&U){const E=y.$implicit;c.Q6J("uiSref",E.sref)("uiSrefActive","btn-primary"),c.xp6(1),c.Q6J("ngClass",E.icon)}}function st(U,y){if(1&U&&(c.TgZ(0,"div",4),c.YNc(1,Ct,2,3,"button",5),c.qZA()),2&U){const E=c.oxw();c.xp6(1),c.Q6J("ngForOf",E.calendarLinks)}}Nt=ht,mt.\u0275fac=function(y){return new(y||mt)(c.Y36(H.n),c.Y36(F.Ej),c.Y36(O.f),c.Y36(Q.Z),c.Y36(it.EVENT_TYPES),c.Y36(it.EVENT_CATEGORIES))},mt.\u0275cmp=c.Xpm({type:mt,selectors:[["tg-event-home-filter"]],inputs:{showStatusFilters:"showStatusFilters"},features:[c._Bn([{provide:Zt.z,useValue:"events"},{multi:!0,provide:ft.JU,useExisting:(0,c.Gpc)(()=>mt)}]),c.qOj],decls:15,vars:24,consts:[[1,"inner","text-center","form-inline",3,"formGroup"],["tplMetaSelect",""],[1,"form-group"],[1,"form-control",3,"placeholder","formControlName"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","form-group category-select",4,"ngIf"],[3,"placeholder","raw","formControlName"],[1,"form-group","nw",3,"tgButtonToggleControl","formControlName","keepOneSelected"],[3,"tgBtnToggle","translate"],["class","form-group nw",4,"ngIf"],["class","form-group",4,"ngIf"],[1,"form-control",3,"formControlName"],[3,"ngValue","translate"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[1,"form-group","category-select"],[3,"array","formControlName","multi","label"],[1,"form-group","nw"],["tplStatusFilter",""],[3,"ngTemplateOutletContext","ngTemplateOutlet",4,"ngIf"],[3,"tgButtonToggleControl","formControlName","selectedBtnStyle"],[3,"ngTemplateOutletContext","ngTemplateOutlet"]],template:function(y,E){if
1(1&y&&(c.TgZ(0,"div",0),c.YNc(1,ct,1,1,"ng-template",null,1,c.W1O),c.TgZ(3,"div",2),c._UZ(4,"input",3),c.ALo(5,"tr"),c.qZA(),c.GkF(6,4),c.YNc(7,V,3,6,"div",5),c.TgZ(8,"div",2),c._UZ(9,"tg-search-place",6),c.ALo(10,"tr"),c.qZA(),c.TgZ(11,"div",7),c._UZ(12,"button",8)(13,"button",8),c.qZA(),c.YNc(14,ot,5,2,"div",9),c.qZA()),2&y){const I=c.MAs(2);c.Q6J("formGroup",E.ctrl),c.xp6(4),c.Q6J("placeholder",c.lcZ(5,16,"eventName"))("formControlName","title"),c.xp6(2),c.Q6J("ngTemplateOutlet",I)("ngTemplateOutletContext",c.WLB(21,q,E.typesEnabled,E.types)),c.xp6(1),c.Q6J("ngIf",E.categoriesEnabled),c.xp6(2),c.Q6J("placeholder",c.xi3(10,18,"location","events"))("raw",!1)("formControlName","location"),c.xp6(2),c.Q6J("formControlName","_useMyRoles")("keepOneSelected",!0),c.xp6(1),c.Q6J("tgBtnToggle",!0)("translate","eventsForMe"),c.xp6(1),c.Q6J("tgBtnToggle",!1)("translate","allEvents"),c.xp6(1),c.Q6J("ngIf",E.showStatusFilters&&(E.filterPast||E.filterCancelled))}},dependencies:[m.sg,m.O5,m.tP,te.P,K.h,Yt._,ft.YN,ft.Kr,ft.Fj,ft.EJ,ft.JJ,ft.JL,ft.sg,ft.u,Pt.T,Xt.C,Rt.U,Dt.H],styles:[".inner[_ngcontent-%COMP%]{margin-bottom:15px}@media (min-width:768px){.form-group[_ngcontent-%COMP%] + .form-group[_ngcontent-%COMP%]{margin-left:3px}.category-select[_ngcontent-%COMP%]{min-width:180px;width:20%}}.nw[_ngcontent-%COMP%]{white-space:nowrap}"],changeDetection:0}),(0,t.gn)([(0,Y.Z)(ht)],mt.prototype,"showStatusFilters",void 0);class B{constructor(y,E,I,pt,St){this.routingSvc=pt,this.cdr=St,this.isMembershipExpiredMode=(0,c.f3M)(it.EVENT_IS_EXPIRED_MEMBERSHIP_MODE),this.query$=new f.X({roles:y.getEventHomeRoles(I)}),this.calendarLinks=E.calendar?[{icon:"fa-list",sref:"events.home.list"},{icon:"fa-calendar",sref:"events.home.calendar"}]:null}ngOnDestroy(){this.query$.complete()}ngOnInit(){const y=this.query$.pipe((0,P.Z)());this.routingSvc.onSuccess({}).pipe((0,k.O)(null),(0,b.U)(()=>"events.home.list"===this.routingSvc.current.name),(0,nt.N)(this.showStatusFilters=!1),(0,L.R)(y)).subscribe(E=>{this.showStatusFilters=E,this.cdr.markForCheck()})}}B.\u0275fac=function(y){return new(y||B)(c.Y36(H.n),c.Y36(O.f),c.Y36(F.Ej),c.Y36(Q.Z),c.Y36(c.sBO))},B.\u0275cmp=c.Xpm({type:B,selectors:[["tg-events-home"]],hostVars:2,hostBindings:function(y,E){2&y&&c.ekj("container",!0)},decls:4,vars:4,consts:[[3,"ngModel","showStatusFilters","ngModelChange"],["class","mb-3",4,"ngIf"],["class","form-group text-center",4,"ngIf"],[1,"mb-3"],[1,"form-group","text-center"],["class","btn btn-default btn-lg",3,"uiSref","uiSrefActive",4,"ngFor","ngForOf"],[1,"btn","btn-default","btn-lg",3,"uiSref","uiSrefActive"],[1,"fa","fa-fw",3,"ngClass"]],template:function(y,E){1&y&&(c.TgZ(0,"tg-event-home-filter",0),c.NdJ("ngModelChange",function(pt){return E.query=pt}),c.qZA(),c.YNc(1,kt,1,0,"tg-evt-membership-expired",1),c.YNc(2,st,2,1,"div",2),c._UZ(3,"ui-view")),2&y&&(c.Q6J("ngModel",E.query)("showStatusFilters",E.showStatusFilters),c.xp6(1),c.Q6J("ngIf",E.isMembershipExpiredMode),c.xp6(1),c.Q6J("ngIf",E.calendarLinks))},dependencies:[m.mk,m.sg,m.O5,x.G,K.h,tt.UISref,tt.UIView,tt.UISrefActive,tt.UISrefStatus,ft.JJ,ft.On,X.M,mt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),(0,t.gn)([(0,Y.Z)("query$",{comparator:z.Z})],B.prototype,"query",void 0)},43082:(Ut,at,o)=>{o.d(at,{M:()=>F});
1var t=o(14026),c=o(55324),z=o(74174),f=o(97482),P=o(10218),k=o(22009),b=o(50339),L=o(72922),O=o(64683);let F=(()=>{class Y{constructor(){this.cdr=(0,t.f3M)(t.sBO),this.params={userId:(0,t.f3M)(z.Ej).id}}ngAfterViewInit(){this.cdr.detach()}}return Y.\u0275fac=function(it){return new(it||Y)},Y.\u0275cmp=t.Xpm({type:Y,selectors:[["tg-evt-membership-expired"]],standalone:!0,features:[t._Bn([],[{provide:f.z,useValue:"events"}]),t.jDz],decls:7,vars:7,consts:[[1,"alert","alert-warning","text-center","m-0"],[3,"uiSref","uiParams","translate"]],template:function(it,H){1&it&&(t.TgZ(0,"div",0)(1,"span"),t._uU(2),t.ALo(3,"tr"),t.qZA(),t._UZ(4,"a",1),t.TgZ(5,"span"),t._uU(6,"."),t.qZA()()),2&it&&(t.xp6(2),t.AsE("",t.lcZ(3,5,"membershipExpiredPrefix"),""," ",""),t.xp6(2),t.Q6J("uiSref","management.user.membership")("uiParams",H.params)("translate","membershipExpiredLink"))},dependencies:[c.GlobalModule,P.P,k.a,b.k,L.UISref,L.AnchorUISref,O.H],styles:["[_nghost-%COMP%]{display:block}.alert[_ngcontent-%COMP%]{display:inherit}"]}),Y})()},89758:(Ut,at,o)=>{o.d(at,{I:()=>b});var t=o(82668),c=o(14026),z=o(92706),f=o(35673),P=o(85597),k=o(4253);let b=(()=>{class L{constructor(){this.destroyed$=new z.c,this.cdr=(0,c.f3M)(c.sBO),this.host=(0,c.f3M)(k.E)}get event(){return this.host.event}set event(F){F!==this.event&&(this.host.event=F,this.host.cdr.markForCheck())}ngOnDestroy(){(0,t.t)(this.destroyed$)}ngOnInit(){this.host.event$.pipe((0,f.T)(1),(0,P.R)(this.destroyed$)).subscribe(()=>{this.cdr.detectChanges()})}}return L.\u0275fac=function(F){return new(F||L)},L.\u0275dir=c.lG2({type:L}),L})()},4253:(Ut,at,o)=>{o.d(at,{E:()=>Do});var t=o(14026),c=o(9803),z=o(74174),f=o(32657),P=o(60611),k=o(64177),b=o(43082),L=o(39836),O=o(50725),F=o(78771),Y=o(97482),nt=o(26583),it=o(85868),H=o(10218),Q=o(4678),m=o(75124);function x(i,s){if(1&i&&(t.TgZ(0,"tg-panel-body")(1,"google-map",3),t._UZ(2,"map-marker",4),t.qZA()()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("options",e.conf)("height",300)("width",null),t.xp6(1),t.Q6J("position",e.conf.center)}}let K=(()=>{class i{constructor(e,a,p){this.conf={...p.map.options,...a.mapOpts},this.mapReady$=e.maps$.pipe((0,O.U)(L.Z))}ngOnChanges(e){if("event"in e){const a=this.event.location?.position?.coordinates;a?(this.hasCoordinates=!0,this.conf={...this.conf,center:{lat:a[1],lng:a[0]}}):this.hasCoordinates=!1}}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(nt.p),t.Y36(F.f),t.Y36(z.zP))},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-map"]],hostVars:4,hostBindings:function(e,a){2&e&&t.ekj("panel-default",!0)("panel",!0)},inputs:{event:"event"},features:[t._Bn([{provide:Y.z,useValue:"events"}]),t.TTD],decls:5,vars:4,consts:[[1,"fa","fa-map-marker"],[3,"translate"],[4,"ngIf"],[3,"options","height","width"],[3,"position"]],template:function(e,a){1&e&&(t.TgZ(0,"tg-panel-heading"),t._UZ(1,"i",0)(2,"span",1),t.qZA(),t.YNc(3,x,3,4,"tg-panel-body",2),t.ALo(4,"async")),2&e&&(t.xp6(2),t.Q6J("translate","location"),t.xp6(1),t.Q6J("ngIf",a.hasCoordinates&&t.lcZ(4,2,a.mapReady$)))},dependencies:[k.O5,it.G,H.P,Q.Av,Q.Nk,m.b6,m.O_,k.Ov],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),i})();var tt=o(52264),ft=o(3973),X=o(5830),Mt=o(22009),n=o(50339),It=o(72922),jt=o(56671),wt=o(78946),vt=o(74831),G=o(7808),gt=o(64683);function Zt(i,s){if(1&i&&(t.TgZ(0,"div",11),t._UZ(1,"i",12)(2,"span",13),t.qZA()),2&i){const e=t.oxw();t.Q6J("ngClass",e.note.style),t.xp6(1),t.Q6J("ngClass",e.note.icon),t.xp6(1),t.Q6J("translate",e.note.text)}}function N(i,s){if(1&i&&(t.TgZ(0,"a",14),t.ALo(1,"tr"),t._UZ(2,"i",15),t.qZA()),2&i){const e=t.oxw();t.Q6J("uiSref","admin.events.edit")("uiParams",e.eventLinkParams)("tooltip",t.xi3(1,3,"edit","common"))}}function Vt(i,s){if(1&i&&t._UZ(0,"tg-event-calendar-links",7),2&i){const e=t.oxw();t.Q6J("event",e.event)}}let te=(()=>{class i{constructor(e,a){this.sanitiser=e,this.coverImg=null,this.isAdmin=Boolean(a?.isSiteAdmin)}ngOnChanges(e){if(!e.event)return;const a=this.event;this.coverImg=a.cover_image?this.sanitiser.bypassSecurityTrustStyle(`url(${JSON.stringify(a.cover_image)})`):null,this.isAttending=a.isAttending(),this.note=function Yt(i){switch(i.status){case tt.N.CANCELLED:return{icon:"fa-ban",style:"alert-danger",text:"cancelled"};case tt.N.DRAFT:return{icon:"fa-pencil",style:"alert-warning",text:"previewingDraft"};default:if(i.isPast())return{icon:"fa-hourglass-end",style:"alert-info",text:"ended"}}}(a),this.eventLinkParams={eventId:a.id}}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(ft.H7),t.Y36(z.Ej))},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-view-header"]],inputs:{event:"event"},features:[t._Bn([{provide:Y.z,useValue:"events"}]),t.TTD],decls:12,vars:7,consts:[[1,"container-fluid","event-cover-image"],[1,"event-heading","container"],[1,"event-title-panel"],["class","alert text-center",3,"ngClass",4,"ngIf"],[1,"row"],[1,"col-xs-12","col-sm-10"],["class","pull-right btn btn-default",3,"uiSref","uiParams","tooltip",4,"ngIf"],[3,"event"],[3,"event",4,"ngIf"],[1,"col-xs-12","col-sm-2"],[3,"url"],[1,"alert","text-center",3,"ngClass"],[1,"fa","fa-fw",3,"ngClass"],[3,"translate"],[1,"pull-right","btn","btn-default",3,"uiSref","uiParams","tooltip"],[1,"fa","fa-pencil"]],template:function(e,a){1&e&&(t.TgZ(0,"div",0)(1,"header",1)(2,"tg-panel",2)(3,"tg-panel-body"),t.YNc(4,Zt,3,3,"div",3),t.TgZ(5,"div",4)(6,"div",5),t.YNc(7,N,3,6,"a",6),t._UZ(8,"tg-event-header-text",7),t.YNc(9,Vt,1,1,"tg-event-calendar-links",8),t.qZA(),t.TgZ(10,"div",9),t._UZ(11,"tg-event-box-img",10),t.qZA()()()()()()),2&e&&(t.Udp("background-image",a.coverImg),t.xp6(4),t.Q6J("ngIf",a.note),t.xp6(3),t.Q6J("ngIf",a.isAdmin),t.xp6(1),t.Q6J("event",a.event),t.xp6(1),t.Q6J("ngIf",a.isAttending),t.xp6(2),t.Q6J("url",a.event.image))},dependencies:[k.mk,k.O5,it.G,H.P,X.K,Q.jl,Q.Av,Mt.a,n.k,It.UISref,It.AnchorUISref,jt.Y,wt.c,vt.i9,G.i,gt.H],styles:[".event-cover-image[_ngcontent-%COMP%]{background-color:#f5f5f5;background-position:top;background-repeat:no-repeat;background-size:cover;margin-top:-20px;min-height:400px;position:relative}",".event-heading[_ngcontent-%COMP%]{bottom:0;left:0;padding-top:9px 12px;position:absolute;right:0}"],changeDetection:0}),i})();var Pt=o(64762),Xt=o(45302),Rt=o(92194),Dt=o(5296),Nt=o(94e3),lt=o(25336),Bt=o(6281),ct=o(3811),V=o(89969),S=o(85597),g=o(56625),u=o(48921),v=o(91696),T=o(20700),ot=o(81018),q=o(83375),ht=o(48e3),mt=o(90489),j=o(78425),kt=o(84747),Ct=o(7647),st=o(16733),B=o(33606),U=o(40921),y=o(23055),E=o(62361),I=o(71050),pt=o(30288),St=o(11022),Wt=o(41958),ie=o(9004),_t=o(11083),ut=o(58614),de=o(45877),bt=o(60407),$=o(65399),D=o(87563),C=o(75372),w=o(5958),M=o(21217),W=o(15449),J=o(49
1037),dt=o(55324),Tt=o(27527),Et=o(38739);let yt=(()=>{class i{constructor(e){this.ref=e}static show(e,a,p,_){return e.show(i,{animated:!0,ignoreBackdropClick:!0,initialState:{body:p,svc:_,title:a}})}ngOnInit(){this.svc.dispatch({type:"eventBooking:timeout"})}ngOnDestroy(){this.svc.dispatch({type:"eventBooking:refreshEvent"})}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(J.UZ))},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-refresh-modal"]],standalone:!0,features:[t._Bn([],[{provide:Y.z,useValue:"events"}]),t.jDz],decls:5,vars:5,consts:[[3,"hide"],[1,"modal-body",3,"translate"],[3,"hideConfirmBtn","hide"]],template:function(e,a){1&e&&(t.TgZ(0,"tg-modal-header",0),t.NdJ("hide",function(){return a.ref.hide()}),t._uU(1),t.ALo(2,"tr"),t.qZA(),t._UZ(3,"div",1),t.TgZ(4,"tg-modal-confirm-footer",2),t.NdJ("hide",function(){return a.ref.hide()}),t.qZA()),2&e&&(t.xp6(1),t.Oqu(t.lcZ(2,3,a.title)),t.xp6(2),t.Q6J("translate",a.body),t.xp6(1),t.Q6J("hideConfirmBtn",!0))},dependencies:[dt.GlobalModule,H.P,gt.H,Tt.R,Et.I],encapsulation:2,changeDetection:0}),i})();class At{constructor(){this.actions$=(0,t.f3M)(B.eX),this.modalSvc=(0,t.f3M)(J.tT)}get bookingFinished$(){return this.actions$.pipe((0,B.l4)("eventBooking:cancel","eventBooking:complete","eventBooking:error","eventBooking:start"))}ngOnDestroy(){this.teardown()}teardown(){this.clearTimer()}clearTimer(){this.timerSub&&(this.timerSub.unsubscribe(),this.timerSub=void 0)}onTimeout(s,e){const[a,p]=this.getModalTitleAndBody(s,e);yt.show(this.modalSvc,a,p,e)}}At.\u0275fac=function(s){return new(s||At)},At.\u0275dir=t.lG2({type:At}),(0,Pt.gn)([(0,j.h)()],At.prototype,"onTimeout",null);let Lt=(()=>{class i extends At{constructor(){super(...arguments),this.type="availability_timer"}run(e,a){this.clearTimer();const p=Kt(e);this.timerSub=(0,W.H)(0,1e3).pipe((0,C.h)(()=>new Date>p),(0,bt.q)(1),(0,S.R)(this.bookingFinished$)).subscribe(()=>{this.onTimeout(e,a)})}shouldRun(e){return null!=Kt(e)}getModalTitleAndBody(e){return Kt(e).getTime()===e.ticket.available_until?.getTime()?["ticketNoLongerAvailable","ticketNoLongerAvailableBody"]:["ticketSalesEnded","ticketSalesEndedModalBody"]}}return i.\u0275fac=function(){let s;return function(a){return(s||(s=t.n5z(i)))(a||i)}}(),i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function Kt(i){const s=i.ticket.available_until,e=i.event.booking_cutoff_date;return s?e&&e<s?e:s:e||void 0}var ee=o(41383),ne=o(642),xt=o(68995);let Qt=(()=>{class i{patchBooking(e,a,p){const _=e.event.$clone({booking:p});a.patch({event:_},!1)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=t.lG2({type:i}),i})(),fe=(()=>{class i extends Qt{constructor(){super(...arguments),this.type="payment",this.bookRes=(0,t.f3M)(xt.L),this.paySvc=(0,t.f3M)(ne.t)}run(e,a){const p=e.user,_=e.event,R=_.booking,Ot=e.ticket.price+function Te(i,s){if(!s.guests.length||!i.guest_tickets.length)return 0;const e=(0,ee.b)(i.guest_tickets,a=>a.id);return s.guests.reduce((a,p)=>a+e.get(p.ticket).price+se(i,p.addons),0)}(_,R)+se(_,R.addons);return(0===Ot?this.bookRes.confirmFreeBooking({id:R.id}):this.paySvc.openEventCheckout({amount:Ot,booking:R.id,isPublicUser:p.isPublic,user:p.id}).pipe((0,O.U)(qt=>{if(!0===qt.interrupted)throw new w.EarlyTerminationError;return qt.response}))).pipe((0,g.Z)(),(0,O.U)(qt=>{this.patchBooking(e,a,qt)}))}shouldRun(e){return e.event.userCanBook(e.user)}}return i.\u0275fac=function(){let s;return function(a){return(s||(s=t.n5z(i)))(a||i)}}(),i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();function se(i,s){if(!s.length||!i.addon_tickets.length)return 0;const e=s.map(p=>"string"==typeof p?p:p.id),a=(0,ee.b)(i.addon_tickets,p=>p.id);return e.reduce((p,_)=>p+a.get(_).price,0)}var Se=o(91183);let Ie=(()=>{class i extends Qt{constructor(){super(...arguments),this.bookingRes=(0,t.f3M)(xt.L),this.store=(0,t.f3M)(Se.yh)}book(e,a,p){return this.bookingRes.create({eventId:e.event.id,status:p,ticket:e.ticket.id}).pipe((0,O.U)(_=>{this.patchBooking(e,a,_)}))}}return i.\u0275fac=function(){let s;return function(a){return(s||(s=t.n5z(i)))(a||i)}}(),i.\u0275dir=t.lG2({type:i,features:[t.qOj]}),i})(),tn=(()=>{class i extends Ie{constructor(){super(...arguments),this.type="reservation"}run(e,a){return this.book(e,a,T.EventBookingState.RESERVATION)}shouldRun(e){return e.event.userCanBook(e.user)}teardown(e){const a=e.event.booking;if(a?.status===T.EventBookingState.RESERVATION)return this.bookingRes.delete(a.id,{params:{status:T.EventBookingState.RESERVATION}}).pipe((0,O.U)(I.Z))}}return i.\u0275fac=function(){let s;return function(a){return(s||(s=t.n5z(i)))(a||i)}}(),i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var Ee=o(87399),ae=o(95517),en=o(50384),Ce=o(19807);let nn=(()=>{class i extends At{constructor(e,a){super(),this.alertSvc=e,this.evtCfg=a,this.type="start_timer"}run(e,a){return this.clearTimer(),this.getReservationTimeout(e).pipe((0,O.U)(p=>{if(p<=0)return this.onTimeout(e,a);const _=(0,W.H)(p).pipe((0,V.b)(()=>{this.onTimeout(e,a)})),R=Ee().add(p,"milliseconds"),Ot=this.alertSvc.alertInfo("",{key:"timeLeft",ns:"events"},{hideCloseBtn:!0,timeout:p}),ue=Ot.instance,qt=(0,W.H)(0,1e3).pipe((0,S.R)((0,ae.T)(this.bookingFinished$,_).pipe((0,bt.q)(1))),(0,O.U)(()=>Ee.duration(R.diff(Ee()))),(0,en.o)(ke=>ke.as("milliseconds")>0,!1),(0,V.b)(ke=>{ue.content=`${ke.minutes().toString().padStart(2,"0")}:${ke.seconds().toString().padStart(2,"0")}`,ue.cdr.markForCheck()}),(0,Dt.H)("[StartTimerStep.timer$]")).subscribe(Rt.V);qt.add(()=>{this.timerSub=void 0;try{Ot.destroy()}catch(ke){console.warn("Failed to destroy reservation timer",ke)}}),this.timerSub=qt}))}shouldRun(e){return e.event.userCanBook(e.user)}getModalTitleAndBody(){return["reservationTimedOut","reservationTimeoutInfo"]}getReservationTimeout(e){return e.event?.booking?.expiry&&e.event.booking.status===T.EventBookingState.RESERVATION?(0,lt.of)(e.event.booking.expiry.getTime()-Date.now()):(e.time?(0,lt.of)(e.time):this.evtCfg.latest().pipe((0,O.U)(_
1=>60*_.bookingTimeout))).pipe((0,O.U)(_=>1e3*_))}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(Ce.c),t.LFG(F.W))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var De=o(36709);let on=(()=>{class i{constructor(){this.type="user_info",this.actions$=(0,t.f3M)(B.eX),this.bookingRes=(0,t.f3M)(xt.L),this.inj=(0,t.f3M)(t.zs3)}run(e,a){const p=e.event,_=this.actions$.pipe((0,B.l4)("eventBooking:timeout"),(0,bt.q)(1));return De.M.show(this.inj,{event:p,submit:R=>this.bookingRes.prepareReservation({id:p.booking.id,termsandconditions:R.confirmEventsTos}),ticket:e.ticket,user:e.user}).pipe((0,S.R)(_),(0,ct.w)(R=>{R.ticket=e.ticket;const Ot=p.$clone({booking:R});return a.patch({event:Ot},!1),(0,pt.x)((0,lt.of)(void 0),St.z)}))}shouldRun({event:e,user:a}){return e.userCanBook(a)}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var Pe=o(43061);let sn=(()=>{class i extends Ie{constructor(e){super(),this.mod=e,this.type="waitlist"}run(e,a){return e.ticket?this.mod.confirmTranslated("confirmWaitlist","events",{ticket:e.ticket.name}).pipe((0,O.U)(L.Z),(0,$.d)(!1),(0,ct.w)(p=>{if(p)return this.book(e,a,T.EventBookingState.WAITLIST);throw new w.EarlyTerminationError})):(0,_t._)(()=>new Error("No eligible tickets"))}shouldRun(e){return!e.event.userCanBook(e.user)}}return i.\u0275fac=function(e){return new(e||i)(t.LFG(Pe.U))},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();var an=o(82668),Ue=o(10174),rn=o(32031),$t=o(52805),_e=o(94918),Ze=o(41241),Re=o(26454),we=o(98411),ln=o(42809),cn=o(58629),un=o(30450),dn=o(45339),pn=o(24290),Ne=o(65713),gn=o(6266),hn=o(49517),fn=o(31157),Me=o(40049),ye=o(75143),Le=o(56949),vn=o(61225),mn=o(26495),Je=o(3814),xe=o(62441),$e=o(80499),Tn=o(61958),En=o(70578);function Cn(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",13),t._UZ(1,"span",14),t.TgZ(2,"a",15),t.NdJ("click.passive",function(){t.CHM(e);const p=t.oxw();return t.KtG(p.cancel())}),t.qZA(),t._UZ(3,"span",14),t.qZA()}if(2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("translate","loginPrompt1"),t.xp6(1),t.Q6J("uiSref","login")("uiParams",e.loginLinkParams)("translate","loginPromptLink"),t.xp6(1),t.Q6J("translate","loginPrompt2")}}function _n(i,s){1&i&&t._uU(0),2&i&&t.hij("*"," ","")}function yn(i,s){if(1&i&&t._UZ(0,"tg-dropdown-select",23),2&i){t.oxw();const e=t.MAs(2),a=t.oxw(2);t.Q6J("array",a.allowedRoles)("formControlName","role")("container","body")("id",e.id)}}function xn(i,s){if(1&i&&t._UZ(0,"tg-address-edit",24),2&i){const e=t.oxw(2).$implicit;t.Q6J("formControlName",e.ctrl)("tgConsumeControlId",null)("addressRequired",e.required)}}function Fe(i,s){if(1&i&&(t.TgZ(0,"tg-help-block-container"),t._UZ(1,"tg-phone-number",25),t.ALo(2,"tr"),t.qZA()),2&i){const e=t.oxw(2).$implicit;t.xp6(1),t.Q6J("formControlName",e.ctrl)("placeholder",t.xi3(2,3,e.label,e.ns))("container","body")}}function bn(i,s){if(1&i&&(t._UZ(0,"input",26),t.ALo(1,"tr")),2&i){t.oxw();const e=t.MAs(2),a=t.oxw().$implicit;t.Q6J("type",a.type)("formControlName",a.ctrl)("placeholder",t.xi3(1,4,a.label,a.ns))("id",e.id)}}function An(i,s){if(1&i&&(t.TgZ(0,"div",5)(1,"label",17,18),t.YNc(3,_n,1,1,"ng-template",19),t.ynx(4),t._uU(5),t.ALo(6,"tr"),t.BQk(),t.qZA(),t.TgZ(7,"tg-help-block-container",20),t.YNc(8,yn,1,4,"ng-template",21),t.YNc(9,xn,1,3,"ng-template",21),t.YNc(10,Fe,3,6,"ng-template",21),t.YNc(11,bn,2,7,"ng-template",22),t.qZA()()),2&i){const e=t.MAs(2),a=t.oxw().$implicit;t.xp6(1),t.Q6J("autoId",!1)("for",e.id),t.xp6(2),t.Q6J("ngIf",a.required),t.xp6(2),t.hij("",t.xi3(6,8,a.label,a.ns),":"),t.xp6(2),t.Q6J("ngSwitch",a.type),t.xp6(1),t.Q6J("ngSwitchCase","role"),t.xp6(1),t.Q6J("ngSwitchCase","address"),t.xp6(1),t.Q6J("ngSwitchCase","tel")}}function On(i,s){if(1&i&&(t.ynx(0),t.YNc(1,An,12,11,"div",16),t.BQk()),2&i){const e=s.$implicit;t.xp6(1),t.Q6J("ngIf",e.show)}}function kn(i,s){1&i&&t._UZ(0,"tg-recaptcha-notice")}let Mn=(()=>{class i{constructor(){this.showLoginPrompt=!1,this.textFields=[],this.alert=(0,t.f3M)(Ce.c),this.cdr=(0,t.f3M)(t.sBO),this.emailValidate=(0,t.f3M)(Ne.a),this.fb=(0,t.f3M)($t.qu),this.inj=(0,t.f3M)(t.zs3),this.ref=(0,t.f3M)(J.UZ),this.showSvc=(0,t.f3M)(ot.Z),this.uRes=(0,t.f3M)(Me.q),this.uSvc=(0,t.f3M)(ye.KD)}get submitting(){return this.form.disabled}set submitting(e){e!==this.submitting&&(e?this.form.disable():this.form.enable())}get user$(){const e=this.initialState.event.booking;return e?.user&&"string"!=typeof e.user?(0,lt.of)(e.user.$value||e.user):this.uSvc.latest("user").pipe((0,O.U)(a=>a?(0,y.Z)(a):{}),(0,ln.d)(1))}static show(e,a){return(0,ie.D)([e.get(F.W).latest(),e.get(cn._).latest("company")]).pipe((0,ct.w)(([_,R])=>new we.y(Ot=>{const ue=e.get(J.tT).show(i,{animated:!0,ignoreBackdropClick:!0,initialState:{...a,company:R,publicSignup:_.publicSignup,subscriber:Ot,useRecaptcha:_.useGoogleRecaptcha}});return()=>{ue.hide()}})))}cancel(){this.subscriber.error(new w.EarlyTerminationError)}ngOnDestroy(){this.ref.hide(),this._sub?.unsubscribe()}ngOnInit(){this.loginLinkParams={redirect_url:location.pathname};const e=$t.kI.required;let a;this.useRecaptcha&&(this.reCaptchaSvc=this.inj.get(hn.q),this.reCaptchaSvc.init("EventRegistration"));try{const _=sessionStorage.getItem("tg-event-user-reg-form");a=_?JSON.parse(_):{}}catch{a={}}const p={tos:this.fb.control(!1,{nonNullable:!0,validators:$t.kI.requiredTrue})};for(const _ of this.publicSignup.fields){const R=_;if(R.show)if("role"===R.ctrl&&(this.allowedRoles=_.allowedRoles),"email"===R.ctrl)this.textFields.push(R),p[R.ctrl]=this.fb.control(a[R.ctrl]||null,{asyncValidators:this.emailValidate.validate,validators:[e,pn.t]});else{if("company"===R.ctrl&&!this.showSvc.shouldShow(this.company.field,void 0))continue;this.textFields.push(R),p[R.ctrl]=this.fb.control(a[R.ctrl]||null,{validators:R.required?e:null})}}this.form=this.fb.group(p),this._sub=this.form.valueChanges.pipe((0,O.U)(()=>(0,_e.Z)(this.form.getRawValue(),"tos")),(0,Ue.p)()).subscribe(_=>{sessionStorage.setItem("tg-event-user-reg-form",JSON.stringify(_))}),this.publicSignup.showLoginPrompt&&(this.showLoginPrompt=!0)}submit(){if(!this.form.valid)return;const e=(0,_e.Z)(this.form.getRawValue(),"tos");e.termsandconditions=e.privacypolicy=this.form.controls.tos.value;const a=p=>this.user$.pipe((0,ct.w)(_=>this.uRes.create({..._,...e,...p,isPublic:!0,signup_tags:["event"]})));this.submitting=!0,(this.reCaptchaSvc?.submit(a)??a()).pipe((0,V.b)(p=>{const _=["isPublic","signup_tags","id","roles",...(0,Ze.Z)(Object.keys(e),"tos")],R=(0,Re.Z)(p.$value,_);this.svc.patch({user:R}),(0,an.t)(this.subscriber)}),(0,Dt.H)("[EventRegistrationModal.submit]"),(0,rn.s)(this.reCaptchaSvc?.negotiate??this.alert.negotiate)).subscribe((0,Xt.d)(()=>{this.submitting=!1,this.cdr.markForCheck()}))}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-registration-modal"]],standalone:!0,features:[t._Bn([Ne.a],[{provide:Y.z,useValue:"events"}]),t.jDz],decls:24,vars:35,consts:[[3,"hide"],[1,"modal-body"],["class","alert alert-danger text-center",4,"ngIf"],[1,"form-horizontal",3,"formGroup"],[4,"ngFor","ngForOf"],[1,"form-group"],[1,"n
1obold"],["type","checkbox",3,"formControl"],[3,"heading","templateId"],[1,"modal-footer"],[1,"btn","btn-primary","book-btn",3,"disabled","translate","click.passive"],[1,"btn","btn-default",3,"disabled","translate","tr-namespace","click.passive"],[4,"ngIf"],[1,"alert","alert-danger","text-center"],[3,"translate"],[3,"uiSref","uiParams","translate","click.passive"],["class","form-group",4,"ngIf"],[3,"autoId","for"],["fieldId","id"],[3,"ngIf"],[3,"ngSwitch"],[3,"ngSwitchCase"],["ngSwitchDefault",""],[3,"array","formControlName","container","id"],[3,"formControlName","tgConsumeControlId","addressRequired"],[3,"formControlName","placeholder","container"],[1,"form-control",3,"type","formControlName","placeholder","id"]],template:function(e,a){1&e&&(t.TgZ(0,"tg-modal-header",0),t.NdJ("hide",function(){return a.cancel()}),t._uU(1),t.ALo(2,"tr"),t.qZA(),t.TgZ(3,"div",1),t.YNc(4,Cn,4,5,"div",2),t.TgZ(5,"form",3),t.YNc(6,On,2,1,"ng-container",4),t.TgZ(7,"div",5)(8,"label",6),t._UZ(9,"input",7),t.TgZ(10,"span"),t._uU(11),t.ALo(12,"tr"),t.qZA(),t._UZ(13,"tg-wysiwyg-cfg-modal",8),t.ALo(14,"tr"),t.TgZ(15,"span"),t._uU(16),t.ALo(17,"tr"),t.qZA(),t._UZ(18,"tg-wysiwyg-cfg-modal",8),t.ALo(19,"tr"),t.qZA()()()(),t.TgZ(20,"footer",9)(21,"button",10),t.NdJ("click.passive",function(){return a.submit()}),t.qZA(),t.TgZ(22,"button",11),t.NdJ("click.passive",function(){return a.cancel()}),t.qZA(),t.YNc(23,kn,1,0,"tg-recaptcha-notice",12),t.qZA()),2&e&&(t.xp6(1),t.Oqu(t.lcZ(2,21,"registration")),t.xp6(3),t.Q6J("ngIf",a.showLoginPrompt),t.xp6(1),t.Q6J("formGroup",a.form),t.xp6(1),t.Q6J("ngForOf",a.textFields),t.xp6(3),t.Q6J("formControl",a.form.controls.tos),t.xp6(2),t.lnq(""," ","",t.xi3(12,23,"iAcceptThe","signup"),""," ",""),t.xp6(2),t.Q6J("heading",t.xi3(14,26,"TC","signup"))("templateId","termsandconditions"),t.xp6(3),t.lnq(""," ","",t.xi3(17,29,"and","common"),""," ",""),t.xp6(2),t.Q6J("heading",t.xi3(19,32,"privacyPolicy","signup"))("templateId","privacypolicy"),t.xp6(3),t.Q6J("disabled",!a.form.valid||a.submitting)("translate",a.submitting?"registering":"register"),t.xp6(1),t.Q6J("disabled",a.submitting)("translate","close")("tr-namespace","common"),t.xp6(1),t.Q6J("ngIf",a.useRecaptcha))},dependencies:[dt.GlobalModule,k.sg,k.O5,k.RF,k.n9,k.ED,vn.c,H.P,mn.f,Je.u0,Je.k6,xe.h,Mt.a,n.k,It.UISref,It.AnchorUISref,$e._,Tn.y,gt.H,$t.UX,$t._Y,$t.Fj,$t.Wl,$t.JJ,$t.JL,$t.oH,$t.sg,$t.u,dn.W,un.x,En.b,Tt.R,Le.O,gn._,fn.r],styles:[".book-btn[_ngcontent-%COMP%]{padding:6px 36px}.form-horizontal[_ngcontent-%COMP%] > .form-group[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.nobold[_ngcontent-%COMP%]{font-weight:400}"],changeDetection:0}),i})(),Bn=(()=>{class i{constructor(){this.type="registration",this.actions$=(0,t.f3M)(B.eX),this.inj=(0,t.f3M)(t.zs3)}run(e,a){const p=this.actions$.pipe((0,B.l4)("eventBooking:timeout"),(0,bt.q)(1));return Mn.show(this.inj,{initialState:e,svc:a}).pipe((0,S.R)(p))}shouldRun({user:e}){return!e?.roles?.length||e.roles.includes("public")}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275prov=t.Yz7({token:i,factory:i.\u0275fac,providedIn:"root"}),i})();const In=new t.OlP("Event booking steps",{factory:()=>Object.freeze([Bn,Lt,tn,nn,on,sn,fe]),providedIn:"root"});var Ye=o(94795);class Gt extends mt.M{constructor(s,e,a,p,_){super(),this.evtRes=s,this.uRes=e,this.actions$=a,this.stepArray=_.map(R=>{const Ot=(0,t.f3M)(R);if(!function Dn(i){if(!i?.type||"function"!=typeof i.run||"function"!=typeof i.shouldRun)return!1;const s=typeof i.teardown;return"undefined"===s||"function"===s}(Ot))throw new Error(`Invalid booking step interface implementation for ${Ot.constructor.name} [${Ot.type}]`);return Ot}),this.init(),this.addCleanupFn(a.pipe((0,ut.M)(this.store),(0,de.z)(this.onAction)).subscribe(R=>{p.dispatch(R)}))}get onStart$(){return this.actions$.pipe((0,B.l4)("eventBooking:start"),(0,bt.q)(1))}book(s,e,a){return this.dispatch({event:s,ticket:a,type:"eventBooking:start",user:e}),this.pluck("endedWith").pipe((0,Ct.v)(1),(0,ct.w)(()=>this.runAllTeardowns()),(0,ct.w)(()=>this.latest()),(0,O.U)(p=>{switch(p.endedWith.type){case"eventBooking:cancel":throw new w.EarlyTerminationError;case"eventBooking:error":throw p.endedWith.value;default:return p.event}}),(0,S.R)(this.onStart$))}patch(s,e=!0){this.dispatch({type:"eventBooking:patch",useMerge:e,value:s})}reducer(s,e){if("eventBooking:start"===e.type){const{user:p,event:_,ticket:R}=e;return this.makeFreshState(p,this.evtRes.isResponse(_)?_:this.evtRes.instantiate(_),R)}const a=s||this.makeFreshState(null,null,null);switch(e.type){case"eventBooking:step:update":{const{change:p,step:_}=e;if(!a.steps[_])return a;const R=[...a.steps];return R[_]={...R[_],...p},{...a,steps:R}}case"eventBooking:patch":{const{value:p,useMerge:_}=e,R=_?(0,M.mergeReplaceArray)((0,y.Z)(a),p):{...a,...p};return R.event&&!this.evtRes.isResponse(R.event)&&(R.event=this.evtRes.instantiate(R.event)),R.user&&!this.uRes.isResponse(R.user)&&(R.user=this.uRes.instantiate(R.user)),R}case"eventBooking:tornDown":return{...a,tornDown:!0};case"eventBooking:complete":case"eventBooking:cancel":return{...a,endedWith:{type:e.type}};case"eventBooking:error":return{...a,endedWith:e};default:return a}}executeStep(s){const e=this.stepArray[s];return e?this.latest().pipe((0,ct.w)(a=>(0,kt.u)(e.shouldRun(a,this))),(0,g.Z)(),(0,ct.w)(a=>a?this.runStep(s):(this.setStepState(s,{skipped:!0}),(0,lt.of)(!0))),(0,ct.w)(a=>a&&this.stepArray[s+1]?this.executeStep(s+1):(0,lt.of)(void 0)),(0,Dt.H)(`[EventBookingService.shouldRun(${e.type})]`)):(0,lt.of)(void 0)}handleStart(s){return s.steps.length?(0,pt.x)(this.executeStep(0),St.z).pipe((0,O.U)(E.Z),(0,S.R)(this.actions$.pipe((0,B.l4)("eventBooking:cancel","eventBooking:error"),(0,bt.q)(1))),(0,$.d)(!0),(0,ct.w)(e=>e?Wt.E:this.latest().pipe((0,O.U)(a=>({type:"eventBooking:complete",value:a.event.booking})))),(0,D.K)(e=>e instanceof w.EarlyTerminationError?(0,lt.of)({type:"eventBooking:cancel"}):((0,Dt.Ed)(e)||console.error("[EventBookingService.handleStart]",e),(0,lt.of)({type:"eventBooking:error",value:e}))),(0,S.R)(this.onStart$)):(0,lt.of)({type:"eventBooking:error",value:new Error("No event booking steps")})}makeFreshState(s,e,a){return{endedWith:null,event:e,steps:this.stepArray.map(p=>({cancelled:!1,done:!1,errored:!1,running:!1,skipped:!1,tearingDown:!1,tornDown:!1,type:p.type})),ticket:a,time:900,tornDown:!1,user:s}}onAction([s,e]){switch(s.type){case"eventBooking:timeout":return(0,lt.of)({type:"eventBooking:cancel"});case"eventBooking:start":return this.handleStart(e);default:return Wt.E}}runAllTeardowns(){const s={type:"eventBooking:tornDown"};return this.stepArray.length?(0,ie.D)(this.stepArray.map((e,a)=>this.runTeardown(a))).pipe((0,O.U)(()=>{this.dispatch(s)})):(this.dispatch(s),(0,lt.of)(void 0))}runStep(s){const e=this.stepArray[s];return this.setStepState(s,{running:!0}),this.latest().pipe((0,st.d)(a=>(0,kt.u)(e.run(a,this))),(0,g.Z)(),(0,O.U)(()=>(this.setStepState(s,{running:!1,done:!0}),!0)),(0,D.K)(a=>{const p={done:!1,running:!1};let _;return a instanceof w.EarlyTerminationError?(p.cancelled=!0,_={type:"eventBooking:cancel"}):(p.errored=!0,_={type:"eventBooking:error",value:a},(0,Dt.Ed)(a)||console.error(`[EventBookingService.runStep(${e.type})]`,a)),this.setStepState(s,p),this.dispatch(_),(0,lt.of)(!1)}))}runTeardown(s){return this.latest().pipe((0,ct.w)(e=>{const a=e.steps[s],p=this.stepArray[s];if(!a||a.skipped||a.tornDown||!a.done&&!a.errored||!p.teardown)return(0,lt.of)(void 0);if(a.tearingDown)return this.pluck("steps").pipe((0,C.h)(Ot=>Ot[s].tornDown),(0,bt.q)(1),(0,O.U)(I.Z));let _;this.setStepState(s,{tornDown:!1,tearingDown:!0});try{_=(0,kt.u)(p.teardown(e,this))}catch(Ot){_=(0,_t._)(()=>Ot)}const R=()=>(this.setStepState(s,{tornDown:!0,tearingDown:!1}),(0,lt.of)(void 0));return _.pipe((0,g.Z)(),(0,Dt.H)(`[EventBookingService.runTeardown(${a.type})]`),(0,ct.w)(R),(0,D.K)(R))}))}setStepState(s,e){this.dispatch({change:e,step:s,type:"eventBooking:step:update"})}}Gt.\u0275fac=function(s){return new(s||Gt)(t.LFG(Ye.U),t.LFG(Me.q),t.LFG(B.eX),t.LFG(Se.yh),t.LFG(In))},Gt.\u0275prov=t.Yz7({token:Gt,factory:Gt.\u0275fac}),(0,Pt.gn)([(0,U.a)()],Gt.prototype,"onStart$",null),(0,Pt.gn)([(0,j.h)()],Gt.prototype,"onAction",null);var Be=o(20321),Pn=o(16354),We=o(5891),Un=o(85960),re=o(53249),be=o(62174),Zn=o(26477),Rn=o(56609),Qe=o(37666),Ge=o(39805);function Nn(i,s){if(1&i&&(t.TgZ(0,"span",6),t._uU(1),t.ALo(2,"tr"),t.qZA()),2&i){const e=t.oxw();
1t.xp6(1),t.hij("(",t.lcZ(2,1,"ticket_state_"+e.state),")")}}function Ln(i,s){1&i&&t._UZ(0,"i",7)}function Jn(i,s){1&i&&t._UZ(0,"i",8)}const $n=function(i){return{num:i}};function Fn(i,s){if(1&i&&(t._UZ(0,"dot-separator"),t.TgZ(1,"span"),t._uU(2),t.ALo(3,"applyTrPlaceholders"),t.ALo(4,"translateCount"),t.ALo(5,"tr"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,1,t.xi3(4,4,t.lcZ(5,7,"upToNGuests"),e.ticket.maximum_guests),t.VKq(9,$n,e.ticket.maximum_guests)))}}function Yn(i,s){if(1&i&&(t.YNc(0,Fn,6,11,"ng-template",5),t._UZ(1,"dot-separator")(2,"span",9)),2&i){const e=t.oxw();t.Q6J("ngIf",e.ticket.maximum_guests),t.xp6(2),t.Q6J("translate",e.guestText.key)("tr-placeholders",e.guestText.placeholders)}}const Wn=(0,Rn.g)("price");class pe{constructor(s){this.fmtPipe=s,this.selected$=new t.vpe}ngOnChanges(s){(s.ticket||s.isWaitlistSelection)&&(this.state=this.calcState(),this.disabled=!this.isWaitlistSelection&&void 0!==this.state),(s.ticket||s.guestTickets||s.isPublicUser)&&this.refreshGuestTicket()}ngOnDestroy(){this.selected$.complete()}onClick(){this.disabled||this.selected$.emit(this.ticket)}calcState(){switch(this.ticket.availability){case 3:return"sold-out";case 1:return"sales-ended";case 2:return"sales-not-started"}}cheapestGuestTicketReducer(s,e){const a=this.guestTickets.find(p=>p.id===e.ticket_id);return(a.remaining??0)>0&&(!this.isPublicUser||a.roles.includes("public"))&&s.push(a),s}refreshGuestTicket(){if(0===this.ticket.maximum_guests)return void(this.hasGuestTickets=!1);const s=this.ticket.guest_tickets.reduce(this.cheapestGuestTicketReducer,[]);if(!s.length)return void(this.hasGuestTickets=!1);this.hasGuestTickets=!0,s.sort(Wn);const e=s[0].price;this.guestText=e?{key:"guestTicketsFrom",placeholders:{price:this.fmtPipe.transform(e)}}:{key:"freeGuestAvailable"}}}pe.\u0275fac=function(s){return new(s||pe)(t.Y36(re.N))},pe.\u0275cmp=t.Xpm({type:pe,selectors:[["button","bookingTicketSelect","","guestTickets",""]],hostVars:3,hostBindings:function(s,e){1&s&&t.NdJ("click.passive",function(){return e.onClick()}),2&s&&(t.Ikx("disabled",e.disabled),t.ekj("disabled",e.disabled))},inputs:{guestTickets:"guestTickets",isPublicUser:"isPublicUser",isWaitlistSelection:"isWaitlistSelection",ticket:["bookingTicketSelect","ticket"]},outputs:{selected$:"selected"},features:[t.TTD],attrs:["bookingTicketSelect","","guestTickets",""],decls:12,vars:8,consts:[[1,"h4","list-group-item-heading"],["class","ml3",4,"ngIf"],["online",""],["class","fa fa-fw fa-map-marker",4,"ngIf","ngIfElse"],[1,"list-group-item-text"],[3,"ngIf"],[1,"ml3"],[1,"fa","fa-fw","fa-globe"],[1,"fa","fa-fw","fa-map-marker"],[3,"translate","tr-placeholders"]],template:function(s,e){if(1&s&&(t.TgZ(0,"div",0)(1,"span"),t._uU(2),t.qZA(),t.YNc(3,Nn,3,3,"span",1),t.YNc(4,Ln,1,0,"ng-template",null,2,t.W1O),t.YNc(6,Jn,1,0,"i",3),t.qZA(),t.TgZ(7,"div",4)(8,"span"),t._uU(9),t.ALo(10,"formatTicketPrice"),t.qZA(),t.YNc(11,Yn,3,3,"ng-template",5),t.qZA()),2&s){const a=t.MAs(5);t.xp6(2),t.Oqu(e.ticket.name),t.xp6(1),t.Q6J("ngIf",e.state),t.xp6(3),t.Q6J("ngIf",e.ticket.isInPerson())("ngIfElse",a),t.xp6(3),t.Oqu(t.lcZ(10,6,e.ticket.price)),t.xp6(2),t.Q6J("ngIf",e.hasGuestTickets)}},dependencies:[k.O5,it.G,H.P,be.j,Qe.d,Ge.v,gt.H,re.N],styles:[".disabled[_nghost-%COMP%]{pointer-events:none}.active[_nghost-%COMP%] .list-group-item-text[_ngcontent-%COMP%]{color:#fff}.ml3[_ngcontent-%COMP%]{margin-left:3px}"],changeDetection:0}),(0,Pt.gn)([(0,j.h)()],pe.prototype,"cheapestGuestTicketReducer",null);var Qn=o(55238),Gn=o(58249);let Hn=(()=>{class i{}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-ticket-availability-display"]],inputs:{date:"date",text:"text"},decls:3,vars:5,consts:[[1,"fa","fa-info-circle","text-info"],[3,"translate","tr-namespace"],[3,"date","humaniseOnNumber","humaniseOnUnit"]],template:function(e,a){1&e&&t._UZ(0,"i",0)(1,"span",1)(2,"tg-date-countdown",2),2&e&&(t.xp6(1),t.Q6J("translate",a.text)("tr-namespace","events"),t.xp6(1),t.Q6J("date",a.date)("humaniseOnNumber",1)("humaniseOnUnit","day"))},dependencies:[it.G,H.P,Gn.o],styles:["[_nghost-%COMP%]{display:block}span[_ngcontent-%COMP%]{margin-right:3px}"],changeDetection:0}),i})();function Kn(i,s){if(1&i&&t._UZ(0,"tg-ticket-availability-display",2),2&i){const e=t.oxw();t.Q6J("text",e.showTicket.text)("date",e.showTicket.date)}}function zn(i,s){if(1&i&&t._UZ(0,"tg-ticket-availability-display",2),2&i){const e=t.oxw();t.Q6J("text",e.showEvent.text)("date",e.showEvent.date)}}function jn(i,s){if(1&i&&(t.TgZ(0,"p",3)(1,"span"),t._uU(2),t.ALo(3,"tr"),t.qZA(),t._UZ(4,"tg-wysiwyg-cfg-modal",4),t.ALo(5,"tr"),t.TgZ(6,"span"),t._uU(7),t.ALo(8,"tr"),t.qZA()()),2&i){const e=t.oxw();t.Q6J("ngClass",e.cssTos),t.xp6(2),t.AsE("",t.lcZ(3,7,"bookingEventTosRequiredBefore"),""," ",""),t.xp6(2),t.Q6J("heading",t.xi3(5,9,"eventsTermsAndConditions","legal"))("templateId","eventstermsandconditions"),t.xp6(3),t.AsE(""," ","",t.lcZ(8,12,"bookingEventTosRequiredAfter"),"")}}class ge{constructor(){this._tickets$=new c.X([]),this.timedOut=this.initTimedOutOutput()}ngOnChanges(s){s.selectedTicket&&(this.showTicket=this.resolveTicketShow()),s.event&&(this.showEvent=ve(this.event.booking_cutoff_date)?{date:this.event.booking_cutoff_date,text:"ticketSalesEndIn"}:void 0),(s.event||s.selectedTicket)&&(this.cssTos=this.showTicket||this.showEvent?"mt-3":"mt-2")}ngOnDestroy(){this._tickets$.complete()}initTimedOutOutput(){function s(a,p){const{available_from:_,available_until:R}=p;return ve(_)?a.add(_.getTime()):ve(R)&&a.add(R.getTime()),a}function e(a){return(0,W.H)(a-Date.now())}return this._tickets$.pipe((0,O.U)(a=>a.length?[...a.reduce(s,new Set)]:[]),(0,Ue.p)(),(0,ct.w)(a=>a.length?(0,ae.T)(...a.map(e)):Wt.E),(0,O.U)(I.Z),(0,Qn.B)())}resolveTicketShow(){const{available_from:s,available_until:e}=this.selectedTicket;return ve(s)?{date:s,text:"tierAvailableFrom"}:ve(e)?{date:e,text:"tierAvailableUntil"}:void 0}}function ve(i){return i instanceof Date&&i.getTime()>Date.now()}ge.\u0275fac=function(s){return new(s||ge)},ge.\u0275cmp=t.Xpm({type:ge,selectors:[["tg-ticket-availability-section"]],inputs:{event:"event",selectedTicket:"selectedTicket",tickets:"tickets"},outputs:{timedOut:"timedOut"},features:[t.TTD],decls:3,vars:3,consts:[["class","mt-2",3,"text","date",4,"ngIf"],["class","text-center text-muted small",3,"ngClass",4,"ngIf"],[1,"mt-2",3,"text","date"],[1,"text-center","text-muted","small",3,"ngClass"],[3,"heading","templateId"]],template:function(s,e){1&s&&(t.YNc(0,Kn,1,2,"tg-ticket-availability-display",0),t.YNc(1,zn,1,2,"tg-ticket-availability-display",0),t.YNc(2,jn,9,14,"p",1)),2&s&&(t.Q6J("ngIf",e.showTicket),t.xp6(1),t.Q6J("ngIf",e.showEvent),t.xp6(1),t.Q6J("ngIf",e.event.termsandconditions_required))},dependencies:[k.mk,k.O5,Le.O,Hn,gt.H],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0}),(0,Pt.gn)([(0,ht.Z)("_tickets$")],ge.prototype,"tickets",void 0);var Vn=o(662),He=o(13913),Ke=o(35673),Xn=o(89763);function ze(i,{init:s,teardown:e}={}){return s||e?new we.y(a=>{s?.(a);const p=i.subscribe(a);return()=>{p.unsubscribe(),e?.(a)}}):i}var je,qn=o(54074),to=o(9099);function eo(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"button",1),t.NdJ("click.passive",function(){t.CHM(e);const p=t.oxw();return t.KtG(p.beginBooking())}),t._uU(1),t.ALo(2,"tr"),t.qZA()}if(2&i){const e=t.oxw();t.Q6J("disabled",e.disabled||e.busy)("tgLoadingBtn",e.busy),t.xp6(1),t.Oqu(t.lcZ(2,3,e.btnText))}}const le=Symbol("event");class ce{constructor(s,e,a,p,_,R,Ot,ue,qt){this.cdr=s,this.evtSvc=e,this.uSvc=a,this.evtRes=p,this.bookingSvc=_,this.actions$=R,this.alert=Ot,this.tr=ue,this.routing=qt,this.disabled=!1,this.eventChange=new t.vpe,this.requestsInFlight=0,this[je]=new c.X(null)}get busy(){return 0!==this.requestsInFlight}beginBooking(){this.disabled||this.busy||this.uSvc.resourcefulStore.pipe((0,bt.q)(1),(0,ct.w)(({user:s})=>this.bookingSvc.book(this.event,s,this.ticket)),(0,S.R)(this._destroyed$)).subscribe({error:s=>{s instanceof w.EarlyTerminationError||this.alert.alertError(this.resolveErrorString(s))},next:this.onEventUpdateReceived})}ngOnDestroy(){(0,q.completeAll)(this.eventChange,this[le])}ngOnInit(){this._destroyed$=this[le].pipe((0,g.Z)()),this.inFlightConf={init:()=>{1==++this.requestsInFlight&&this.cdr.markForCheck()},teardown:()=>{0==--this.requestsInFlight&&this.cdr.markForCheck()}},this.initBtnText(),this.initRefreshTriggers(),this.routing.params.open&&this.beginBooking()}initBtnText(){(0,Bt.a)([this[le],this.uSvc.pluck("user")]).pipe((0,ct.w)(([s,e])=>{if(s){if(s.booking?.isIncomplete)return(0,W.H)(s.booking.expiry).pipe((0,O.U)(()=>(this.event=this.event.$clone({booking:void 0}),this.eventChange.emit(this.event),s.userCanBook(e)?"bookNow":"joinWaitlist")),(0,u.O)("completeBooking"));if(s.userCanBook(e))return(0,lt.of)("bookNow")}return(0,lt.of)("joinWaitlist")}),(0,Xn.N)(this.btnText="bookNow"),(0,S.R)(this._destroyed$)).subscribe(s=>{this.btnText=s,this.cdr.markForCheck()})}initRefreshTriggers(){const s=this[le].pipe((0,Ct.v)(1),(0,ct.w)(p=>p?.booking?.status!==T.EventBookingState.RESERVATION||!p.booking.expiry||p.booking.expiry.getTime()<Date.now()?Wt.E:(0,W.H)(new Date(p.booking.expiry.getTime()+1e3)).pipe((0,S.R)(this[le].pipe((0,Ke.T)(1),(0,bt.q)(1)))))),e=this.actions$.pipe((0,B.l4)("eventBooking:refreshEvent")),a=this.actions$.pipe((0,C.h)(p=>"eventBooking:cancel"===p.type||"eventBooking:error"===p.type&&this.evtSvc.isUnexpectedBookingStateResponse(p.value)),(0,ct.w)(()=>ze(this.bookingSvc.pluck("tornDown").pipe((0,Ct.v)(1)),this.inFlightConf)));(0,ae.T)(s,e,a).pipe((0,ct.w)(()=>this.refetchEvent()),(0,S.R)(this._destroyed$),(0,Dt.H)("[EventBookBtn.initRefreshTrigger]")).subscribe((0,Vn.e)(this.onEventUpdateReceived))}onEventUpdateReceived(s){if(s.booking){const e=We.SP.extractId(s.booking.ticket);s.booking.ticket=s.tickets.find(a=>a.id===e)}this.event=s,this.eventChange.emit(s),this.cdr.markForCheck()}refetchEvent(){return ze(this.evtRes.get(this.event.id),this.inFlightConf)}resolveErrorString(s){const e=this.tr.getNamespace("events");if(s instanceof He.UA){const a=s.error;if("string"==typeof a){let p=e.get(a);if(p||(p=this.tr.getNamespace("events.errors").get(a),p))return p}if(409===s.status)return e.get("bookingError409")}return e.get("failedToBook")}}function no(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"button",5),t.NdJ("selected",function(p){t.CHM(e);const _=t.oxw(2);
1return t.KtG(_.selectTicket(p))}),t.qZA()}if(2&i){const e=s.$implicit,a=t.oxw(2);t.ekj("active",e.id===a.selectedTicketId),t.Q6J("isWaitlistSelection",a.canJoinWaitlist)("bookingTicketSelect",e)("isPublicUser",a.isPublicUser)("guestTickets",a.event.guest_tickets)}}function oo(i,s){if(1&i&&(t.TgZ(0,"div",3),t.YNc(1,no,1,6,"button",4),t.qZA()),2&i){const e=t.oxw();t.xp6(1),t.Q6J("ngForOf",e.tickets)("ngForTrackBy",e.trackById)}}function io(i,s){if(1&i&&(t.TgZ(0,"div",6),t._UZ(1,"i",7)(2,"span",8),t.qZA()),2&i){const e=s.ngIf;t.xp6(2),t.Q6J("translate",e)}}je=le,ce.\u0275fac=function(s){return new(s||ce)(t.Y36(t.sBO),t.Y36(Be.n),t.Y36(ye.KD),t.Y36(Ye.U),t.Y36(Gt),t.Y36(B.eX),t.Y36(Ce.c),t.Y36(qn.D),t.Y36(P.Z))},ce.\u0275cmp=t.Xpm({type:ce,selectors:[["tg-event-book-btn"]],inputs:{disabled:"disabled",event:"event",ticket:"ticket"},outputs:{eventChange:"eventChange"},decls:1,vars:1,consts:[["class","btn btn-lg btn-primary btn-block booking-button",3,"disabled","tgLoadingBtn","click.passive",4,"ngIf"],[1,"btn","btn-lg","btn-primary","btn-block","booking-button",3,"disabled","tgLoadingBtn","click.passive"]],template:function(s,e){1&s&&t.YNc(0,eo,3,5,"button",0),2&s&&t.Q6J("ngIf",e.ticket&&e.event)},dependencies:[k.O5,xe.h,to.n,gt.H],styles:[".booking-button[_ngcontent-%COMP%]{margin-bottom:2px;margin-top:2px;padding-bottom:7.5px;padding-top:7.5px}"],changeDetection:0}),(0,Pt.gn)([(0,ht.Z)(le)],ce.prototype,"event",void 0),(0,Pt.gn)([(0,j.h)()],ce.prototype,"onEventUpdateReceived",null);const so=function(i){return{num:i}};function Ve(i,s){if(1&i&&(t._UZ(0,"dot-separator"),t.TgZ(1,"span"),t._uU(2),t.ALo(3,"applyTrPlaceholders"),t.ALo(4,"translateCount"),t.ALo(5,"tr"),t.qZA()),2&i){const e=t.oxw(2);t.xp6(2),t.Oqu(t.xi3(3,1,t.xi3(4,4,t.lcZ(5,7,"upToNGuests"),e.selectedTicket.maximum_guests),t.VKq(9,so,e.selectedTicket.maximum_guests)))}}function ao(i,s){1&i&&(t.TgZ(0,"tg-info-bubble"),t._uU(1),t.ALo(2,"tr"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"guestsInfoBubble")))}function ro(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"button",18),t.NdJ("click.passive",function(){t.CHM(e);const p=t.oxw(2);return t.KtG(p.declineEvent())}),t._uU(1),t.ALo(2,"tr"),t.qZA()}if(2&i){const e=t.oxw(2);t.Q6J("disabled",e.busy||e.disableBookBtn),t.xp6(1),t.Oqu(t.lcZ(2,2,"decline"))}}function Xe(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"button",19),t.NdJ("click.passive",function(){t.CHM(e);const p=t.oxw(2);return t.KtG(p.cancelBooking())}),t.qZA()}if(2&i){const e=t.oxw(2);t.Q6J("translate","cancelBooking")("disabled",e.busy)}}function he(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",9)(1,"div",10)(2,"div",11),t._uU(3),t.qZA(),t.TgZ(4,"span",12)(5,"span"),t._uU(6),t.ALo(7,"formatTicketPrice"),t.qZA(),t.YNc(8,Ve,6,11,"ng-template",2),t.qZA(),t.YNc(9,ao,3,3,"tg-info-bubble",13),t.qZA(),t.TgZ(10,"div",10)(11,"tg-event-book-btn",14),t.NdJ("eventChange",function(p){t.CHM(e);const _=t.oxw();return t.KtG(_.onEventChange(p))}),t.qZA(),t.YNc(12,ro,3,4,"button",15),t.YNc(13,Xe,1,2,"button",16),t.qZA(),t.TgZ(14,"tg-ticket-availability-section",17),t.NdJ("timedOut",function(){t.CHM(e);const p=t.oxw();return t.KtG(p.onTicketAvailabilityRefresh())}),t.qZA()()}if(2&i){const e=t.oxw();
1t.xp6(1),t.ekj("col-md-6",!e.isContinuableBooking),t.xp6(2),t.Oqu(e.selectedTicket.name),t.xp6(3),t.Oqu(t.lcZ(7,16,e.selectedTicket.price)),t.xp6(2),t.Q6J("ngIf",e.showTicketGuestInfo),t.xp6(1),t.Q6J("ngIf",e.showTicketGuestInfo),t.xp6(1),t.ekj("col-md-6",!e.isContinuableBooking),t.xp6(1),t.Q6J("event",e.event)("ticket",e.selectedTicket)("disabled",e.busy||e.disableBookBtn),t.xp6(1),t.Q6J("ngIf",!e.isContinuableBooking&&e.event.decline_enabled&&!e.isPublicUser),t.xp6(1),t.Q6J("ngIf",e.isContinuableBooking),t.xp6(1),t.Q6J("event",e.event)("tickets",e.tickets)("selectedTicket",e.selectedTicket)}}class oe{constructor(s,e,a){this.cdr=s,this.evtSvc=e,this.routing=a,this.busy=!1,this.eventChange=new t.vpe,this.isContinuableBooking=!1,this.trackById=Un.trackById,this.hasTicketsAvailable=!1,this.isMembershipExpiredMode=(0,t.f3M)(f.EVENT_IS_EXPIRED_MEMBERSHIP_MODE)}declineEvent(){this.evtSvc.declineEvent(this.event).pipe((0,V.b)(s=>this.onEventChange(s)),(0,S.R)(this.eventChange.pipe((0,g.Z)(null,null)))).subscribe((0,Xt.d)(()=>{this.busy=!1,this.cdr.markForCheck()}))}cancelBooking(){this.busy||(this.busy=!0,this.evtSvc.cancelBooking(this.event.booking).pipe((0,V.b)({error:()=>{this.busy=!1,this.cdr.markForCheck()},next:s=>{this.busy=!1,this.onEventChange(s)}}),(0,S.R)(this.eventChange.pipe((0,g.Z)(null,null)))).subscribe(Rt.V))}ngOnChanges(s){s.user&&(this.isPublicUser=this.user.hasRoles("public")),(s.event||s.user)&&(this.onEventOrUserChange(),s.event&&this.refreshIsContinuable(),this.refreshWarningText())}ngOnDestroy(){this.eventChange.complete()}ngOnInit(){if(!this.event.booking){const s=this.routing.params.ticket;if(s&&this.selectTicket(this.tickets.find(e=>e.id===s),!0),!this.selectedTicket&&this.hasTicketsAvailable){const e=this.tickets.reduce((a,p)=>0===p.availability&&p.price<a.price?p:a);this.selectTicket(e)}}}onEventChange(s){this.event=s,this.onEventOrUserChange(),this.refreshIsContinuable(),this.refreshWarningText(),this.cdr.detectChanges(),this.eventChange.emit(s)}onTicketAvailabilityRefresh(){this.onEventOrUserChange(),this.refreshIsContinuable(),this.refreshWarningText(),this.tickets=this.tickets.map(e=>e.$clone());const s=this.tickets.findIndex(e=>e.id===this.selectedTicketId);this.selectTicket(this.tickets[s],!0),this.cdr.markForCheck()}selectTicket(s,e=!1){if(this.selectedTicket=this.selectedTicket!==s||e?s:void 0,this.selectedTicketId=this.selectedTicket?.id,this.selectedTicket){this.showTicketGuestInfo=Boolean(this.selectedTicket.guest_tickets.length&&this.selectedTicket.maximum_guests);const p=this.selectedTicket.availability;this.disableBookBtn=0!==p&&3!==p}const a=this.disableBookBtn?void 0:this.selectedTicketId;a!=this.routing.params.ticket&&this.routing.go(".",{ticket:a,open:!1},{location:"replace"}).catch(p=>{console.warn("Failed to update uiState",p)})}onEventOrUserChange(){const s=this.event.tickets.filter(this.ticketFilter);this.tickets=s.length===this.event.tickets.length?this.event.tickets:s;let e=this.hasTicketsAvailable=!1,a=!1;for(const p of this.tickets)switch(p.availability){case 0:this.hasTicketsAvailable=!0;break;case 3:e=!0;break;case 2:a=!0}if(this.canJoinWaitlist=this.event.waitlist_enabled&&e&&(!a&&!this.hasTicketsAvailable&&0!==this.tickets.length||this.event.isAtCapacity),this.selectedTicket&&!this.canJoinWaitlist){const p=this.tickets.find(R=>R.id===this.selectedTicket.id);(0===p?.availability?p:void 0)!==this.selectedTicket&&this.selectTicket(p,!0)}}refreshIsContinuable(){if(this.isContinuableBooking=Boolean(this.event.booking?.isIncomplete),this.isContinuableBooking){const s=We.SP.extractId(this.event.booking.ticket);this.selectedTicket?.id!==s&&this.selectTicket(this.tickets.find(e=>e.id===s),!0)}}refreshWarningText(){this.canBeBooked=this.event.canBeBooked(),this.warningText=this.canBeBooked?this.hasTicketsAvailable||this.canJoinWaitlist||this.isContinuableBooking?this.canJoinWaitlist?"capCanOnlyWaitlist":void 0:"noTicketsAvailable":"canNoLongerBook"}ticketFilter(s){return!(3===s.availability&&this.event.hide_sold_out||1===s.availability&&this.event.hide_ended)&&(this.isMembershipExpiredMode?s.rolesCanBuy(["public"]):this.event.createTicketsBu
1yableByRolesPredicate(this.user.roles)(s))}}oe.\u0275fac=function(s){return new(s||oe)(t.Y36(t.sBO),t.Y36(Be.n),t.Y36(P.Z))},oe.\u0275cmp=t.Xpm({type:oe,selectors:[["tg-booking-non-attending"]],inputs:{event:"event",user:"user"},outputs:{eventChange:"eventChange"},features:[t._Bn([{provide:Y.z,useValue:"events"},re.N]),t.TTD],decls:3,vars:3,consts:[["class","list-group",4,"ngIf"],["class","alert alert-warning text-center",4,"ngIf"],[3,"ngIf"],[1,"list-group"],["class","list-group-item",3,"active","isWaitlistSelection","bookingTicketSelect","isPublicUser","guestTickets","selected",4,"ngFor","ngForOf","ngForTrackBy"],[1,"list-group-item",3,"isWaitlistSelection","bookingTicketSelect","isPublicUser","guestTickets","selected"],[1,"alert","alert-warning","text-center"],[1,"fa","fa-exclamation-triangle"],[3,"translate"],[1,"mt1","row"],[1,"col-xs-12"],[1,"h3","mt0"],[1,"h4","mt0","text-muted"],[4,"ngIf"],[3,"event","ticket","disabled","eventChange"],["class","btn btn-lg btn-warning btn-block booking-button",3,"disabled","click.passive",4,"ngIf"],["class","btn btn-block btn-danger mt05",3,"translate","disabled","click.passive",4,"ngIf"],[1,"text-center","col-xs-12",3,"event","tickets","selectedTicket","timedOut"],[1,"btn","btn-lg","btn-warning","btn-block","booking-button",3,"disabled","click.passive"],[1,"btn","btn-block","btn-danger","mt05",3,"translate","disabled","click.passive"]],template:function(s,e){1&s&&(t.YNc(0,oo,2,2,"div",0),t.YNc(1,io,3,1,"div",1),t.YNc(2,he,15,18,"ng-template",2)),2&s&&(t.Q6J("ngIf",e.canBeBooked&&!e.isContinuableBooking),t.xp6(1),t.Q6J("ngIf",e.warningText),t.xp6(1),t.Q6J("ngIf",e.canBeBooked&&e.selectedTicket))},dependencies:[k.sg,k.O5,it.G,H.P,xe.h,Mt.a,be.j,Zn.d,pe,ge,ce,Qe.d,Ge.v,gt.H,re.N],styles:["[_nghost-%COMP%]{display:block}.mt1[_ngcontent-%COMP%]{margin-top:1em}.mt05[_ngcontent-%COMP%]{margin-top:.5em}.mt0[_ngcontent-%COMP%]{margin-top:0}@media (max-width:991px){tg-event-book-btn[_ngcontent-%COMP%]{margin-top:.5em}}",".booking-button[_ngcontent-%COMP%]{margin-bottom:2px;margin-top:2px;padding-bottom:7.5px;padding-top:7.5px}"],changeDetection:0}),(0,Pt.gn)([(0,j.h)()],oe.prototype,"ticketFilter",null);let lo=(()=>{class i{constructor(){this.disabled=!1,this.eventChange=new t.vpe,this.inj=(0,t.f3M)(t.zs3),this.alert=(0,t.f3M)(Ce.c),this.bookSvc=(0,t.f3M)(Gt),this.uSvc=(0,t.f3M)(ye.KD),this.bookRes=(0,t.f3M)(xt.L)}ngOnDestroy(){this.eventChange.complete()}openModal(){this.disabled||this.uSvc.resourcefulStore.pipe((0,bt.q)(1),(0,ct.w)(({user:e})=>e?(0,lt.of)(e):this.bookSvc.latest("user")),(0,ct.w)(e=>De.M.show(this.inj,{event:this.event,submit:a=>this.bookRes.update({id:this.event.booking.id,...a}),ticket:this.event.booking.ticket,user:e})),(0,O.U)(e=>(e.ticket=this.event.booking.ticket,this.event.$clone({booking:e}))),(0,S.R)(this.eventChange.pipe((0,g.Z)(null,null)))).subscribe({error:e=>{e instanceof w.EarlyTerminationError||(this.alert.alertError({key:"bookingUpdateFail",ns:"events"}),(0,Dt.Ed)(e)||console.error("[EventEditBookingButton.openModal]",e))},next:e=>{this.eventChange.emit(this.event=e),this.toastBookingUpdated()}})}toastBookingUpdated(){this.alert.alertSuccess({key:"bookingUpdated",ns:"events"})}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275dir=t.lG2({type:i,selectors:[["button","eventEditBooking",""]],hostVars:1,hostBindings:function(e,a){1&e&&t.NdJ("click.passive",function(){return a.openModal()}),2&e&&t.Ikx("disabled",a.disabled)},inputs:{disabled:["btnDisabled","disabled"],event:["eventEditBooking","event"]},outputs:{eventChange:"eventEditBookingChange"}}),i})();var co=o(28091);function uo(i,s){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.qZA(),t.TgZ(2,"span",3),t.ALo(3,"tr"),t.ALo(4,"date"),t._uU(5),t.ALo(6,"date"),t.qZA(),t.TgZ(7,"span"),t._uU(8,")"),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.hij(""," ","("),t.xp6(1),t.Q6J("tooltip",t.xi3(3,3,"timeInDeviceTimezone","local-time")+": "+t.Dn7(4,6,e.cutoffDate,"short",e.localTimezoneOffset)),t.xp6(3),t.Oqu(t.Dn7(6,10,e.cutoffDate,"shortTime",e.localTimezoneOffset))}}const po=function(i){return{date:i}};function go(i,s){if(1&i&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"tr"),t.ALo(3,"date"),t.qZA(),t.YNc(4,uo,9,14,"ng-template",2),t.TgZ(5,"span"),t._uU(6,"."),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Oqu(t.xi3(2,2,"canCancelBefore",t.VKq(9,po,t.Dn7(3,5,e.cutoffDate,"
1short",e.eventTimezoneOffset)))),t.xp6(3),t.Q6J("ngIf",e.localTimezoneOffset!==e.eventTimezoneOffset)}}function r(i,s){if(1&i&&t.YNc(0,go,7,11,"ng-template",2),2&i){const e=t.oxw();t.Q6J("ngIf",e.cutoffDate)}}function h(i,s){1&i&&t._UZ(0,"div",4),2&i&&t.Q6J("translate","canNoLongerCancel")}let l=(()=>{class i{constructor(e){this.tzSvc=e}ngOnChanges({timezone:e,cutoffDate:a}){!e&&!a||!this.cutoffDate||(this.localTimezoneOffset=this.tzSvc.getTimezoneOffset(this.cutoffDate),this.eventTimezoneOffset=this.tzSvc.getTimezoneOffset(this.cutoffDate,this.timezone))}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(co.B))},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-booking-cancellation-cutoff"]],inputs:{cutoffDate:"cutoffDate",isPastCancellationCutoff:"isPastCancellationCutoff",timezone:"timezone"},features:[t.TTD],decls:3,vars:2,consts:[["tplCancellableUntil",""],["class","text-center text-danger",3,"translate",4,"ngIf","ngIfElse"],[3,"ngIf"],[1,"underdot",3,"tooltip"],[1,"text-center","text-danger",3,"translate"]],template:function(e,a){if(1&e&&(t.YNc(0,r,1,1,"ng-template",null,0,t.W1O),t.YNc(2,h,1,1,"div",1)),2&e){const p=t.MAs(1);t.xp6(2),t.Q6J("ngIf",a.isPastCancellationCutoff)("ngIfElse",p)}},dependencies:[k.O5,H.P,X.K,vt.i9,k.uU,gt.H],styles:["[_nghost-%COMP%]{display:block}.underdot[_ngcontent-%COMP%]{border-bottom-style:dotted;border-bottom-width:1px}"],changeDetection:0}),i})();function d(i,s){1&i&&t._UZ(0,"span",4),2&i&&t.Q6J("translate","bookedAsGuest")}function A(i,s){1&i&&t._UZ(0,"span",4),2&i&&t.Q6J("translate","attending")}function Z(i,s){1&i&&t._UZ(0,"span",5),2&i&&t.Q6J("translate","onWaitlist")}function et(i,s){1&i&&t._UZ(0,"span",5),2&i&&t.Q6J("translate","awaitingPayment")}function rt(i,s){1&i&&t._UZ(0,"span",5),2&i&&t.Q6J("translate","declined")}function zt(i,s){if(1&i&&(t.TgZ(0,"h3",1),t.YNc(1,d,1,1,"span",2),t.YNc(2,A,1,1,"span",2),t.YNc(3,Z,1,1,"span",3),t.YNc(4,et,1,1,"span",3),t.YNc(5,rt,1,1,"span",3),t.qZA()),2&i){const e=t.oxw();t.Q6J("ngSwitch",e.status),t.xp6(1),t.Q6J("ngSwitchCase","bookedAsGuest"),t.xp6(1),t.Q6J("ngSwitchCase","attending"),t.xp6(1),t.Q6J("ngSwitchCase","waiting"),t.xp6(1),t.Q6J("ngSwitchCase","unpaid"),t.xp6(1),t.Q6J("ngSwitchCase","declined")}}let Jt=(()=>{class i{ngOnChanges(){this.status=this.resolveStatus()}resolveStatus(){return this.unpaidInvoice?"unpaid":this.isDeclined?"declined":this.isGuest?"bookedAsGuest":this.waiting?"waiting":this.attending||this.publicBooked?"attending":null}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-attending-label"]],inputs:{attending:"attending",isDeclined:"isDeclined",isGuest:"isGuest",publicBooked:"publicBooked",unpaidInvoice:"unpaidInvoice",waiting:"waiting"},features:[t._Bn([{provide:Y.z,useValue:"events"}]),t.TTD],decls:1,vars:1,consts:[[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],["class","label label-success",3,"translate",4,"ngSwitchCase"],["class","label label-warning",3,"translate",4,"ngSwitchCase"],[1,"label","label-success",3,"translate"],[1,"label","label-warning",3,"translate"]],template:function(e,a){1&e&&t.YNc(0,zt,6,6,"h3",0),2&e&&t.Q6J("ngIf",a.status)},dependencies:[k.O5,k.RF,k.n9,H.P],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{margin-bottom:0;margin-top:0}.label[_ngcontent-%COMP%]{display:block;padding:8px 12px;width:100%}"],changeDetection:0}),i})();var Ht=o(82125);let me=(()=>{class i extends Ht.f{constructor(){super(),this.templateId="bookingplaceholder"}}return i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-booking-placeholder"]],features:[t.qOj],decls:1,vars:1,consts:[[1,"alert","alert-info","mb-0","text-center",3,"innerHTML"]],template:function(e,a){1&e&&t._UZ(0,"div",0),2&e&&t.Q6J("innerHTML",a.html,t.oJD)},dependencies:[Mt.a],encapsulation:2}),i})();var Ft;function ho(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"tg-booking-non-attending",5),t.NdJ("eventChange",function(p){t.CHM(e);const _=t.oxw(3);return t.KtG(_.onEventChange(p))}),t.qZA()}if(2&i){const e=t.oxw(3);t.Q6J("event",e.event)("user",e.user)}}function qe(i,s){1&i&&t._UZ(0,"span",12),2&i&&t.Q6J("translate","aDeletedMem")}function vo(i,s){1&i&&t._UZ(0,"tg-user-name",15),2&i&&t.Q6J("user",s.ngIf)("link",!0)}function mo(i,s){if(1&i&&(t.TgZ(0,"div",11),t._UZ(1,"span",12),t.YNc(2,qe,1,1,"ng-template",null,13,t.W1O),t.YNc(4,vo,1,2,"tg-user-name",14),t._UZ(5,"span",12),t.qZA()),2&i){const e=t.MAs(3),a=t.oxw(4);t.xp6(1),t.Q6J("translate","bookedAsGuestInfo_1"),t.xp6(3),t.Q6J("ngIf",a.event.booking.user)("ngIfElse",e),t.xp6(1),t.Q6J("translate","bookedAsGuestInfo_2")}}function To(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",17),t.NdJ("eventEditBookingChange",function(p){t.CHM(e);const _=t.oxw(4);return t.KtG(_.onEventChange(p))}),t.qZA()()}if(2&i){const e=t.oxw(4);t.xp6(1),t.Q6J("eventEditBooking",e.event)("btnDisabled",e.busy)("translate","editBooking")}}function Eo(i,s){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",18),t.NdJ("click.passive",function(){t.CHM(e);const p=t.oxw(4);return t.KtG(p.cancel())}),t.qZA()()}if(2&i){const e=t.oxw(4);t.xp6(1),t.Q6J("disabled",e.busy||e.isAttending&&e.isPastCancellationCutoff)("ngClass",e.declinedBtnClass)("translate",e.cancelTranslation)}}function Co(i,s){if(1&i&&t._UZ(0,"tg-event-booking-cancellation-cutoff",19),2&i){const e=t.oxw(4);t.Q6J("cutoffDate",e.event.cancel_cutoff_date)("isPastCancellationCutoff",e.isPastCancellationCutoff)("timezone",e.event.timezone)}}function _o(i,s){if(1&i&&(t.TgZ(0,"div",6),t._UZ(1,"tg-event-attending-label",7),t.YNc(2,mo,6,4,"div",8),t.YNc(3,To,2,3,"div",9),t.YNc(4,Eo,2,3,"div",9),t.YNc(5,Co,1,3,"tg-event-booking-cancellation-cutoff",10),t.qZA()),2&i){const e=t.oxw(3);t.xp6(1),t.Q6J("unpaidInvoice",e.hasUnpaidInvoice)("isDeclined",e.isDeclined)("isGuest",e.isGuest)("attending",e.isAttending)("publicBo
1oked",e.isPublicBooked)("waiting",e.isWaiting),t.xp6(1),t.Q6J("ngIf",e.isGuest),t.xp6(1),t.Q6J("ngIf",e.showEditBookingBtn),t.xp6(1),t.Q6J("ngIf",!e.isAnonymousBooking&&!e.isGuest),t.xp6(1),t.Q6J("ngIf",e.isAttending&&e.event.cancel_cutoff_date)}}function yo(i,s){if(1&i&&(t.TgZ(0,"tg-panel-body"),t.YNc(1,ho,1,2,"ng-template",null,3,t.W1O),t.YNc(3,_o,6,10,"div",4),t.qZA()),2&i){const e=t.MAs(2),a=t.oxw(2);t.xp6(3),t.Q6J("ngIf",a.isAttending||a.hasUnpaidInvoice||a.isWaiting||a.isPublicBooked||a.isGuest||a.isDeclined)("ngIfElse",e)}}function xo(i,s){1&i&&(t.TgZ(0,"tg-panel-body"),t._UZ(1,"tg-booking-placeholder"),t.qZA())}function bo(i,s){if(1&i&&(t.TgZ(0,"tg-panel"),t.YNc(1,yo,4,2,"tg-panel-body",1),t.YNc(2,xo,2,0,"ng-template",null,2,t.W1O),t.qZA()),2&i){const e=t.MAs(3),a=t.oxw();t.xp6(1),t.Q6J("ngIf",a.isUserExpired||a.isAttending||a.canAttend||a.couldAttend||a.willBeAbleToAttend||a.isGuest||a.canJoinWaitlist)("ngIfElse",e)}}const Ae=Symbol("event");class Oe{constructor(s,e,a,p,_,R,Ot,ue,qt){this.cdr=s,this.tgModal=e,this.profileCfg=a,this.evtSvc=p,this.bookSvc=_,this.evtCfg=R,this.uRes=Ot,this.uSvc=ue,this.showSvc=qt,this.busy=!1,this.canAttend=!1,this.canJoinWaitlist=!1,this.couldAttend=!1,this.eventChange=new t.vpe,this.hasUnpaidInvoice=!1,this.isAnonymousBooking=!0,this.isAttending=!1,this.isDeclined=!1,this.isGuest=!1,this.isPast=!1,this.isPastCancellationCutoff=!1,this.isPublicBooked=!1,this.isPublicUser=!1,this.isUserExpired=!1,this.isWaiting=!1,this.showEditBookingBtn=!1,this.willBeAbleToAttend=!1,this[Ft]=new c.X(null)}cancel(){let s;this.busy=!0,s=this.isWaiting?"cancelWaitlistConfirm":this.isDeclined?"declineWithdrawConfirm":"cancelBookingConfirm",this.tgModal.confirmTranslated(s,"events").pipe((0,ct.w)(()=>this.evtSvc.cancelBooking(this.event.booking)),(0,V.b)({error:()=>{this.busy=!1,this.cdr.markForCheck()},next:e=>{this.busy=!1,this.onEventChange(e)}}),(0,S.R)(this[Ae].pipe((0,g.Z)()))).subscribe((0,Xt.d)(()=>{this.busy=!1,this.cdr.markForCheck()}))}ngOnDestroy(){(0,q.completeAll)(this.eventChange,this[Ae])}ngOnInit(){const s=this.uSvc.resourcefulStore.pipe((0,ct.w)(({user:e})=>{if(e)return(0,lt.of)(e);const a=this.uRes.instantiate({roles:["public"]});return this.bookSvc.pluck("user").pipe((0,O.U)(p=>p||a),(0,u.O)(a),(0,v.x)())}));(0,Bt.a)([s,this[Ae]]).pipe((0,V.b)(([e,a])=>{this.user=e,this.isAttending=a.isAttending(e),this.isDeclined=a.isDeclined(e),this.isGuest=a.isGuest(e),this.isPast=a.isPast(),this.hasUnpaidInvoice=a.hasUnpaidInvoice(),this.isWaiting=a.isWaiting(),this.isPastCancellationCutoff=a.isPastCancellationCutoff(),this.canAttend=a.canAttend(e),this.isPublicUser=!e.roles?.length||e.roles.includes("public"),this.isPublicBooked=this.isPublicUser&&Boolean(a.booking)&&![T.EventBookingState.RESERVATION,T.EventBookingState.CANCELLED].includes(a.booking.status),this.isAnonymousBooking=!a.booking?.id,this.isUserExpired=!this.isPublicUser&&!e.hasValidMembership,this.isUserExpired&&!a.roles.includes("public")&&a.bookable&&!a.tickets?.some(p=>p.roles.includes("public"))?this.canAttend=this.couldAttend=this.willBeAbleToAttend=this.canJoinWaitlist=!1:this.canAttend?this.couldAttend=this.willBeAbleToAttend=this.canJoinWaitlist=!1:(this.couldAttend=a.couldAttend(e),this.willBeAbleToAttend=a.willBeAbleToAttend(e),this.canJoinWaitlist=a.hasEligibleTickets(e)),this.showEditBookingBtn=this.evtCfg.enableAmendBooking&&Boolean(a.booking)&&!this.isAnonymousBooking&&!this.isDeclined&&!this.isGuest&&!this.isWaiting&&!this.isPastCancellationCutoff&&(this.showSvc.shouldShow(this.profileCfg.special_needs.field,e)||this.showSvc.shouldShow(this.profileCfg.dietary.field,e)&&a.catered||this.evtCfg.workshops&&!(0,Nt.Z)(a.workshops)),this.cancelTranslation=this.isWaiting?"cancelWaitlist":this.isDeclined?"withdrawDecline":"cancelBooking",this.declinedBtnClass=this.isDeclined?"btn-primary":"btn-danger",this.cdr.markForCheck()}),(0,Dt.H)("[EventBookingComponent.init]"),(0,S.R)(this[Ae].pipe((0,g.Z)(null,null)))).subscribe(Rt.V)}onEventChange(s){this.eventChange.emit(this.event=s),this.cdr.detectChanges()}}Ft=Ae,Oe.\u0275fac=function(s){return new(s||Oe)(t.Y36(t.sBO),t.Y36(Pe.U),t.Y36(z.Hj),t.Y36(Be.n),t.Y36(Gt),t.Y36(F.f),t.Y36(Me.q),t.Y36(ye.KD),t.Y36(ot.Z))},Oe.\u0275cmp=t.Xpm({type:Oe,selectors:[["tg-event-booking"]],inputs:{event:"event"},outputs:{eventChange:"eventChange"},features:[t._Bn([{provide:Y.z,useValue:"events"},{provide:mt.U,useValue:"eventBooking"},Gt])],decls:1,vars:1,consts:[[4,"ngIf"],[4,"ngIf","ngIfElse"],["tplBookingPlaceholder",""],["tplNotAttending",""],["class","row",4,"ngIf","ngIfElse"],[3,"event","user","eventChange"],[1,"row"],[1,"col-xs-12","col-md-8","col-md-offset-2",3,"unpaidInvoice","isDeclined","isGuest","attending","publicBo
1oked","waiting"],["class","mt5 col-xs-12 text-center",4,"ngIf"],["class","mt5 col-xs-12 col-md-8 col-md-offset-2",4,"ngIf"],["class","mt9 col-xs-12 text-center",3,"cutoffDate","isPastCancellationCutoff","timezone",4,"ngIf"],[1,"mt5","col-xs-12","text-center"],[1,"vtop",3,"translate"],["bookedByBin",""],[3,"user","link",4,"ngIf","ngIfElse"],[3,"user","link"],[1,"mt5","col-xs-12","col-md-8","col-md-offset-2"],[1,"btn","btn-primary","btn-block",3,"eventEditBooking","btnDisabled","translate","eventEditBookingChange"],[1,"btn","btn-block",3,"disabled","ngClass","translate","click.passive"],[1,"mt9","col-xs-12","text-center",3,"cutoffDate","isPastCancellationCutoff","timezone"]],template:function(s,e){1&s&&t.YNc(0,bo,4,2,"tg-panel",0),2&s&&t.Q6J("ngIf",!e.isPast&&e.event.bookable)},dependencies:[k.mk,k.O5,H.P,Q.jl,Q.Av,xe.h,Pn.j,oe,lo,l,Jt,me],styles:["[_nghost-%COMP%]{display:block}.mt5[_ngcontent-%COMP%]{margin-top:5px}.mt9[_ngcontent-%COMP%]{margin-top:9px}.vtop[_ngcontent-%COMP%]{vertical-align:top}"],changeDetection:0}),(0,Pt.gn)([(0,ht.Z)(Ae)],Oe.prototype,"event",void 0);var Ao=o(98732);function Oo(i,s){1&i&&(t.TgZ(0,"li",1),t._UZ(1,"a",2),t.qZA()),2&i&&(t.Q6J("uiSrefActive","active"),t.xp6(1),t.Q6J("uiSref",".eventapp.chat")("translate","tab_chat"))}function ko(i,s){1&i&&(t.TgZ(0,"li",1),t._UZ(1,"a",2),t.qZA()),2&i&&(t.Q6J("uiSrefActive","active"),t.xp6(1),t.Q6J("uiSref",".eventapp.moreinfo")("translate","tab_moreInfo"))}function So(i,s){1&i&&(t.TgZ(0,"li",1),t._UZ(1,"a",2),t.qZA()),2&i&&(t.Q6J("uiSrefActive","active"),t.xp6(1),t.Q6J("uiSref",".eventapp.attendees")("translate","tab_attendees"))}let Mo=(()=>{class i{constructor(e,a,p){this.routing=e,this.showSvc=a,this.evtCfg=p}ngOnChanges({event:e,user:a}){!e&&!a||(this.shouldShowAttendees=this.shouldShow("attendees"),this.shouldShowDiscussion=this.shouldShow("chat"),this.shouldShowMoreInfo=this.shouldShow("moreinfo"),e?.previousValue&&this.revalidateRoute())}revalidateRoute(){const e=this.routing.current.name.split("events.view.eventapp.")[1],a={attendees:this.shouldShowAttendees,chat:this.shouldShowDiscussion,moreinfo:this.shouldShowMoreInfo};e in a&&!a[e]&&this.routing.go("events.view.eventapp.description",this.routing.params).catch(console.error)}shouldShow(e){return this.showSvc.shouldShowTab(e,this.evtCfg.app,this.user,this.event)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(P.Z),t.Y36(Ao.S),t.Y36(F.f))},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-app"]],inputs:{event:"event",user:"user"},features:[t._Bn([{provide:Y.z,useValue:"events"}]),t.TTD],decls:9,vars:6,consts:[["role","tablist",1,"nav","nav-tabs"],[3,"uiSrefActive"],[3,"uiSref","translate"],[3,"uiSrefActive",4,"ngIf"]],template:function(e,a){1&e&&(t.TgZ(0,"ul",0)(1,"li",1),t._UZ(2,"a",2),t.qZA(),t.YNc(3,Oo,2,3,"li",3),t.YNc(4,ko,2,3,"li",3),t.YNc(5,So,2,3,"li",3),t.qZA(),t.TgZ(6,"tg-panel")(7,"tg-panel-body"),t._UZ(8,"ui-view"),t.qZA()()),2&e&&(t.xp6(1),t.Q6J("uiSrefActive","active"),t.xp6(1),t.Q6J("uiSref",".eventapp.description")("translate","tab_description"),t.xp6(1),t.Q6J("ngIf",a.shouldShowDiscussion),t.xp6(1),t.Q6J("ngIf",a.shouldShowMoreInfo),t.xp6(1),t.Q6J("ngIf",a.shouldShowAttendees))},dependencies:[k.O5,H.P,Q.jl,Q.Av,n.k,It.UISref,It.AnchorUISref,It.UIView,It.UISrefActive,It.UISrefStatus],encapsulation:2,changeDetection:0}),i})();function Bo(i,s){1&i&&t._UZ(0,"tg-evt-membership-expired",9)}function Io(i,s){if(1&i&&t._UZ(0,"tg-event-map",0),2&i){const e=t.oxw();t.Q6J("event",e.event)}}let Do=(()=>{class i{constructor(e,a,p,_){this.routing=e,this.cdr=a,this.user=_,this.isMembershipExpiredMode=(0,t.f3M)(f.EVENT_IS_EXPIRED_MEMBERSHIP_MODE),this.event$=new c.X(p)}get event(){return this.event$.value}set event(e){e!==this.event&&(this.event$.next(e),this.cdr.detectChanges())}ngOnDestroy(){this.event$.complete()}ngOnInit(){this.event$.subscribe(e=>{this.isInPerson=e.isInPerson()}),this.routing.is("events.view")&&this.routing.go(".eventapp.description",void 0,{location:"replace"}).catch(console.error)}}return i.\u0275fac=function(e){return new(e||i)(t.Y36(P.Z),t.Y36(t.sBO),t.Y36(z.wp),t.Y36(z.Ej))},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-event-view"]],decls:10,vars:6,consts:[[3,"event"],[1,"container"],["class","mb-3",4,"ngIf"],[1,"row"],[1,"col-xs-12","col-sm-7"],[3,"event","user"],[1,"col-xs-12","col-sm-5"],[3,"event","eventChange"],[3,"event",4,"ngIf"],[1,"mb-3"]],template:function(e,a){1&e&&(t._UZ(0,"tg-event-view-header",0)(1,"hr"),t.TgZ(2,"div",1),t.YNc(3,Bo,1,0,"tg-evt-membership-expired",2),t.TgZ(4,"div",3)(5,"div",4),t._UZ(6,"tg-event-app",5),t.qZA(),t.TgZ(7,"div",6)(8,"tg-event-booking",7),t.NdJ("eventChange",function(_){return a.event=_}),t.qZA(),t.YNc(9,Io,1,1,"tg-event-map",8),t.qZA()()()),2&e&&(t.Q6J("event",a.event),t.xp6(3),t.Q6J("ngIf",a.isMembershipExpiredMode),t.xp6(3),t.Q6J("event",a.event)("user",a.user),t.xp6(2),t.Q6J("event",a.event),t.xp6(1),t.Q6J("ngIf",a.isInPerson))},dependencies:[k.O5,b.M,K,te,Oe,Mo],encapsulation:2,changeDetection:0}),i})()},7808:(Ut,at,o)=>{o.d(at,{i:()=>S});var t=o(43383),c=o(64852),z=o(55324),f=o(84416);function P(){return P=Object.assign||function(g){for(var u=1;u<arguments.length;u++){var v=arguments[u];for(var T in v)Object.prototype.hasOwnProperty.call(v,T)&&(g[T]=v[T])}return g},P.apply(this,arguments)}function k(g){var u={exports:{}};return g(u,u.exports),u.exports}typeof globalThis<"u"||typeof window<"u"||typeof global<"u"&&global;var b=k(function(g,u){g.exports=function(){var v="millisecond",T="second",ot="minute",q="hour",ht="day",mt="week",j="month",kt="quarter",Ct="year",st="date",B=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,U=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}
vendor: 4,877 bytes, line 1
1|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},E=function($,D,C){var w=String($);return!w||w.length>=D?$:""+Array(D+1-w.length).join(C)+$},I={s:E,z:function($){var D=-$.utcOffset(),C=Math.abs(D),w=Math.floor(C/60),M=C%60;return(D<=0?"+":"-")+E(w,2,"0")+":"+E(M,2,"0")},m:function $(D,C){if(D.date()<C.date())return-$(C,D);var w=12*(C.year()-D.year())+(C.month()-D.month()),M=D.clone().add(w,j),W=C-M<0,J=D.clone().add(w+(W?-1:1),j);return+(-(w+(C-M)/(W?M-J:J-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:j,y:Ct,w:mt,d:ht,D:st,h:q,m:ot,s:T,ms:v,Q:kt}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return void 0===$}},pt="en",St={};St[pt]=y;var Wt=function($){return $ instanceof de},ie=function($,D,C){var w;if(!$)return pt;if("string"==typeof $)St[$]&&(w=$),D&&(St[$]=D,w=$);else{var M=$.name;St[M]=$,w=M}return!C&&w&&(pt=w),w||!C&&pt},_t=function($,D){if(Wt($))return $.clone();var C="object"==typeof D?D:{};return C.date=$,C.args=arguments,new de(C)},ut=I;ut.l=ie,ut.i=Wt,ut.w=function($,D){return _t($,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var de=function(){function $(C){this.$L=ie(C.locale,null,!0),this.parse(C)}var D=$.prototype;return D.parse=function(C){this.$d=function(w){var M=w.date,W=w.utc;if(null===M)return new Date(NaN);if(ut.u(M))return new Date;if(M instanceof Date)return new Date(M);if("string"==typeof M&&!/Z$/i.test(M)){var J=M.match(B);if(J){var dt=J[2]-1||0,Tt=(J[7]||"0").substring(0,3);return W?new Date(Date.UTC(J[1],dt,J[3]||1,J[4]||0,J[5]||0,J[6]||0,Tt)):new Date(J[1],dt,J[3]||1,J[4]||0,J[5]||0,J[6]||0,Tt)}}return new Date(M)}(C),this.$x=C.x||{},this.init()},D.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},D.$utils=function(){return ut},D.isValid=function(){return"Invalid Date"!==this.$d.toString()},D.isSame=function(C,w){var M=_t(C);return this.startOf(w)<=M&&M<=this.endOf(w)},D.isAfter=function(C,w){return _t(C)<this.startOf(w)},D.isBefore=function(C,w){return this.endOf(w)<_t(C)},D.$g=function(C,w,M){return ut.u(C)?this[w]:this.set(M,C)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(C,w){var M=this,W=!!ut.u(w)||w,J=ut.p(C),dt=function(ne,xt){var Qt=ut.w(M.$u?Date.UTC(M.$y,xt,ne):new Date(M.$y,xt,ne),M);return W?Qt:Qt.endOf(ht)},Tt=function(ne,xt){return ut.w(M.toDate()[ne].apply(M.toDate("s"),(W?[0,0,0,0]:[23,59,59,999]).slice(xt)),M)},Et=this.$W,yt=this.$M,At=this.$D,Lt="set"+(this.$u?"UTC":"");switch(J){case Ct:return W?dt(1,0):dt(31,11);case j:return W?dt(1,yt):dt(0,yt+1);case mt:var Kt=this.$locale().weekStart||0,ee=(Et<Kt?Et+7:Et)-Kt;return dt(W?At-ee:At+(6-ee),yt);case ht:case st:return Tt(Lt+"Hours",0);case q:return Tt(Lt+"Minutes",1);case ot:return Tt(Lt+"Seconds",2);case T:return Tt(Lt+"Milliseconds",3);default:return this.clone()}},D.endOf=function(C){return this.startOf(C,!1)},D.$set=function(C,w){var M,W=ut.p(C),J="set"+(this.$u?"UTC":""),dt=(M={},M[ht]=J+"Date",M[st]=J+"Date",M[j]=J+"Month",M[Ct]=J+"FullYear",M[q]=J+"Hours",M[ot]=J+"Minutes",M[T]=J+"Seconds",M[v]=J+"Milliseconds",M)[W],Tt=W===ht?this.$D+(w-this.$W):w;if(W===j||W===Ct){var Et=this.clone().set(st,1);Et.$d[dt](Tt),Et.init(),this.$d=Et.set(st,Math.min(this.$D,Et.daysInMonth())).$d}else dt&&this.$d[dt](Tt);return this.init(),this},D.set=function(C,w){return this.clone().$set(C,w)},D.get=function(C){return this[ut.p(C)]()},D.add=function(C,w){var M,W=this;C=Number(C);var J=ut.p(w),dt=function(yt){var At=_t(W);return ut.w(At.date(At.date()+Math.round(yt*C)),W)};if(J===j)return this.set(j,this.$M+C);if(J===Ct)return this.set(Ct,this.$y+C);if(J===ht)return dt(1);if(J===mt)return dt(7);var Tt=(M={},M[ot]=6e4,M[q]=36e5,M[T]=1e3,M)[J]||1,Et=this.$d.getTime()+C*Tt;return ut.w(Et,this)},D.subtract=function(C,w){return this.add(-1*C,w)},D.format=function(C){var w=this;if(!this.isValid())return"Invalid Date";var M=C||"YYYY-MM-DDTHH:mm:ssZ",W=ut.z(this),J=this.$locale(),dt=this.$H,Tt=this.$m,Et=this.$M,yt=J.weekdays,At=J.months,Lt=function(xt,Qt,fe,se){return xt&&(xt[Qt]||xt(w,M))||fe[Qt].substr(0,se)},Kt=function(xt){return ut.s(dt%12||12,xt,"0")},ee=J.meridiem||function(xt,Qt,fe){var se=xt<12?"AM":"PM";return fe?se.toLowerCase():se},ne={YY:String(this.$y).slice(-2),YYYY:this.$y,M:Et+1,MM:ut.s(Et+1,2,"0"),MMM:Lt(J.monthsShort,Et,At,3),MMMM:Lt(At,Et),D:this.$D,DD:ut.s(this.$D,2,"0"),d:String(this.$W),dd:Lt(J.weekdaysMin,this.$W,yt,2),ddd:Lt(J.weekdaysShort,this.$W,yt,3),dddd:yt[this.$W],H:String(dt),HH:ut.s(dt,2,"0"),h:Kt(1),h
1h:Kt(2),a:ee(dt,Tt,!0),A:ee(dt,Tt,!1),m:String(Tt),mm:ut.s(Tt,2,"0"),s:String(this.$s),ss:ut.s(this.$s,2,"0"),SSS:ut.s(this.$ms,3,"0"),Z:W};return M.replace(U,function(xt,Qt){return Qt||ne[xt]||W.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(C,w,M){var W,J=ut.p(w),dt=_t(C),Tt=6e4*(dt.utcOffset()-this.utcOffset()),Et=this-dt,yt=ut.m(this,dt);return yt=(W={},W[Ct]=yt/12,W[j]=yt,W[kt]=yt/3,W[mt]=(Et-Tt)/6048e5,W[ht]=(Et-Tt)/864e5,W[q]=Et/36e5,W[ot]=Et/6e4,W[T]=Et/1e3,W)[J]||Et,M?yt:ut.a(yt)},D.daysInMonth=function(){return this.endOf(j).$D},D.$locale=function(){return St[this.$L]},D.locale=function(C,w){if(!C)return this.$L;var M=this.clone(),W=ie(C,w,!0);return W&&(M.$L=W),M},D.clone=function(){return ut.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},$}(),bt=de.prototype;return _t.prototype=bt,[["$ms",v],["$s",T],["$m",ot],["$H",q],["$W",ht],["$M",j],["$y",Ct],["$D",st]].forEach(function($){bt[$[1]]=function(D){return this.$g(D,$[0],$[1])}}),_t.extend=function($,D){return $.$i||($(D,de,_t),$.$i=!0),_t},_t.locale=ie,_t.isDayjs=Wt,_t.unix=function($){return _t(1e3*$)},_t.en=St[pt],_t.Ls=St,_t.p={},_t}()}),L=k(function(g,u){g.exports=function(v,T,ot){var q=T.prototype;ot.utc=function(B){return new T({date:B,utc:!0,args:arguments})},q.utc=function(B){var U=ot(this.toDate(),{locale:this.$L,utc:!0});return B?U.add(this.utcOffset(),"minute"):U},q.local=function(){return ot(this.toDate(),{locale:this.$L,utc:!1})};var ht=q.parse;q.parse=function(B){B.utc&&(this.$u=!0),this.$utils().u(B.$offset)||(this.$offset=B.$offset),ht.call(this,B)};var mt=q.init;q.init=function(){if(this.$u){var B=this.$d;this.$y=B.getUTCFullYear(),this.$M=B.getUTCMonth(),this.$D=B.getUTCDate(),this.$W=B.getUTCDay(),this.$H=B.getUTCHours(),this.$m=B.getUTCMinutes(),this.$s=B.getUTCSeconds(),this.$ms=B.getUTCMilliseconds()}else mt.call(this)};var j=q.utcOffset;q.utcOffset=function(B,U){var y=this.$utils().u;if(y(B))return this.$u?0:y(this.$offset)?j.call(this):this.$offset;var E=Math.abs(B)<=16?60*B:B,I=this;if(U)return I.$offset=E,I.$u=0===B,I;if(0!==B){var pt=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(I=this.local().add(E+pt,"minute")).$offset=E,I.$x.$localOffset=pt}else I=this.utc();return I};var kt=q.format;q.format=function(B){return kt.call(this,B||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""))},q.valueOf=function(){var B=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*B},q.isUTC=function(){return!!this.$u},q.toISOString=function(){return this.toDate().toISOString()},q.toString=function(){return this.toDate().toUTCString()};var Ct=q.toDate;q.toDate=function(B){return"s"===B&&this.$offset?ot(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():Ct.call(this)};var st=q.diff;q.diff=function(B,U,y){if(B&&this.$u===B.$u)return st.call(this,B,U,y);var E=this.local(),I=ot(B).local();return st.call(E,I,U,y)}}});const O={dateTimeLocal:"YYYY-MM-DD[T]HH:mm:ss",dateTimeUTC:"YYYYMMDD[T]HHmmss[Z]",allDay:"YYYYMMDD"};function F(g){const u=new URLSearchParams;return Object.keys(g).sort().forEach(v=>{const T=g[v];null!=T&&u.append(v,T)}),u.toString().replace(/\+/g,"%20")}function Y({startTime:g,endTime:u},v){const T=O[v];return{start:g.format(T),end:u.format(T)}}b.extend(L);const nt=(g,u=!0)=>{const{start:v,end:T,duration:ot}=g,q=function(j,kt){if(null==j)return{};var Ct,st,B={},U=Object.keys(j);for(st=0;st<U.length;st++)kt.indexOf(Ct=U[st])>=0||(B[Ct]=j[Ct]);return B}(g,["start","end","duration"]),ht=u?b(v).utc():b(v),mt=T?u?b(T).utc():b(T):(()=>{if(g.allDay)return ht.add(1,"day");if(ot&&2==ot.length){const j=Number(ot[0]);return ht.add(j,ot[1])}return u?b().utc():b()})();return P({},q,{startTime:ht,endTime:mt})};var Mt=o(28631);const It={Google:g=>{const u=nt(g),{start:v,end:T}=Y(u,u.allDay?"allDay":"dateTimeUTC"),ot={action:"TEMPLATE",text:u.title,details:u.description,location:u.location,trp:u.busy,dates:v+"/"+T,recur:u.rRule?"RRULE:"+u.rRule:void 0};return u.guests&&u.guests.length&&(ot.add=u.guests.join()),`https://calendar.google.com/calendar/render?${F(ot)}`},Office365:g=>{const u=nt(g,!1),{start:v,end:T}=Y(u,"dateTimeLocal");return`https://outlook.office.com/calendar/0/action/compose?${F({path:"/calendar/action/compose",rru:"addevent",startdt:v,enddt:T,subject:u.title,body:u.description,location:u.location,allday:u.allDay||!1})}`},Outlook:g=>{const u=nt(g,!1),{start:v,end:T}=Y(u,"dateTimeLocal");return`https://outlook.live.com/calendar/0/action/compose?${F({path:"/calendar/action/compose",rru:"addevent",startdt:v,enddt:T,subject:u.title,body:u.description,location:u.location,allday:u.allDay||!1})}`},Yahoo:(g,u)=>(g=>{const u=nt(g),{start:v,end:T}=Y(u,u.allDay?"allDay":"dateTimeUTC");return`https://calendar.yahoo.com/?${F({v:60,title:u.title,st:v,et:T,desc:u.description,in_loc:u.location,dur:!!u.allDay&&"allday"})}`}
1)(g.description?{...g,description:u(g.description)}:g)},jt=Object.keys(It);var gt=o(97482),Zt=o(79662),N=o(14026),Vt=o(64177),te=o(10218),Yt=o(50339);const Pt=["eventCalendarLinks",""],Xt=function(g){return{service:g}};function Rt(g,u){if(1&g&&(N.TgZ(0,"li",0),N._UZ(1,"a",4),N.qZA()),2&g){const v=u.$implicit;N.xp6(1),N.Q6J("href",v.link,N.LSH)("translate","addToCalendar_service")("tr-placeholders",N.VKq(3,Xt,v.service))}}const Dt=(0,Zt.createTrackFn)("service");let Nt=(()=>{class g{constructor(){this.tracker=Dt}ngOnChanges(){this.serviceLinks=function n(g){const u=function wt(g,u){const v=function G(g,u=g.booking){const v=u?.info.attendance_type===Mt.a.ONLINE,T=v?g.online_info?.link:g.location?.formatted_address;if(T)return{isOnline:v,location:T}}(g,u),T={description:g.description,end:g.end_date,start:g.start_date,title:g.title};return function vt(g){return null!=g&&"object"==typeof g&&void 0===g.toHexString}(g.primary_contact)&&(T.organizer={email:g.primary_contact.email,name:[g.primary_contact.firstname,g.primary_contact.lastname].filter(Boolean).join(" ")}),v&&(v.isOnline?T.description+=`\n<p>Join online at: <a href="${v.location}" target="_blank" rel="noopener nofollow">${v.location}</a></p>`:T.location=v.location),T}(g.event,g.booking);return jt.map(v=>({link:It[v](u,g.stripHtml),service:v}))}({event:this.event,stripHtml:lt}),this.icsLink=`/api/v1/event/${this.event.id}/calendar.ics`,this.event.booking?.ticket&&(this.icsLink+=`?attendance_type=${this.event.booking.ticket.attendance_type}`)}}return g.\u0275fac=function(v){return new(v||g)},g.\u0275cmp=N.Xpm({type:g,selectors:[["ul","eventCalendarLinks",""]],inputs:{event:["eventCalendarLinks","event"]},standalone:!0,features:[N._Bn([],[{provide:gt.z,useValue:"events"}]),N.TTD,N.jDz],attrs:Pt,decls:4,vars:4,consts:[["role","menuitem"],["target","_blank",1,"dropdown-item",3,"href","translate"],[1,"divider","dropdown-divider"],["role","menuitem",4,"ngFor","ngForOf","ngForTrackBy"],["target","_blank","rel","noopener nofollow",1,"dropdown-item",3,"href","translate","tr-placeholders"]],template:function(v,T){1&v&&(N.TgZ(0,"li",0),N._UZ(1,"a",1),N.qZA(),N._UZ(2,"li",2),N.YNc(3,Rt,2,5,"li",3)),2&v&&(N.xp6(1),N.Q6J("href",T.icsLink,N.LSH)("translate","addToCalendar_ics"),N.xp6(2),N.Q6J("ngForOf",T.serviceLinks)("ngForTrackBy",T.tracker))},dependencies:[z.GlobalModule,Vt.sg,te.P,Yt.k],encapsulation:2,changeDetection:0}),g})();function lt(g){const u=document.createElement("div");return u.innerHTML=g,u.textContent?.trim()??""}var Bt=o(62441),ct=o(64683);function V(g,u){if(1&g&&N._UZ(0,"ul",4),2&g){const v=N.oxw();N.Q6J("eventCalendarLinks",v.event)("id",v.idDD),N.uIk("aria-labelledby",v.idBtn)}}let S=(()=>{class g{ngOnInit(){this.caretDirection="down",this.idBtn=(0,t.Z)("evt-links-btn"),this.idDD=(0,t.Z)("evt-links-dd")}setDirection(v){this.caretDirection=v}}return g.\u0275fac=function(v){return new(v||g)},g.\u0275cmp=N.Xpm({type:g,selectors:[["tg-event-calendar-links"]],inputs:{event:"event"},standalone:!0,features:[N.jDz],decls:7,vars:8,consts:[["bsDropdown","",1,"btn-group",3,"container","onShown","onHidden"],["bsDropdownToggle","",1,"btn","btn-default","btn-sm","dropdown-toggle",3,"id"],[3,"direction"],["class","dropdown-menu","role","menu",3,"eventCalendarLinks","id",4,"bsDropdownMenu"],["role","menu",1,"dropdown-menu",3,"eventCalendarLinks","id"]],template:function(v,T){1&v&&(N.TgZ(0,"div",0),N.NdJ("onShown",function(){return T.setDirection("up")})("onHidden",function(){return T.setDirection("down")}),N.TgZ(1,"button",1)(2,"span"),N._uU(3),N.ALo(4,"tr"),N.qZA(),N._UZ(5,"tg-caret",2),N.YNc(6,V,1,3,"ul",3),N.qZA()()),2&v&&(N.Q6J("container","body"),N.xp6(1),N.Q6J("id",T.idBtn),N.uIk("aria-controls",T.idDD),N.xp6(2),N.Oqu(N.xi3(4,5,"addToCalendar","events")),N.xp6(2),N.Q6J("direction",T.caretDirection))},dependencies:[z.GlobalModule,Bt.h,ct.H,c.mr,c.Hz,c.Mq,c.TO,f.K,Nt],styles:["[_nghost-%COMP%]{display:inline-block}"],changeDetection:0}),g})()},16936:(Ut,at,o)=>{o.d(at,{T:()=>x});var t=o(64762),c=o(82668),z=o(5296),f=o(14026),P=o(9803),k=o(92706),b=o(25336),L=o(3811),O=o(89969),F=o(85597),Y=o(56625),nt=o(83375),it=o(48e3),H=o(13460),Q=o(80499),m=o(45178);class x{constructor(tt,ft){this.inj=tt,this.metaRes=ft,this._key$=new P.X(void 0),this._ready$=new k.c,this.fieldsReady$=this._ready$.asObservable()}ngOnDestroy(){(0,nt.completeAll)(this._key$,this._ready$)}ngOnInit(){const tt=this.inj.get(Q._);this._key$.pipe((0,L.w)(ft=>"string"!=typeof ft?(0,b.of)(null):this.metaRes.get(ft).pipe((0,O.b)(X=>{X[0]instanceof Object?tt.items=X:tt.array=X}))),(0,z.H)("[TgMetadataSelect.init]"),(0,F.R)(this._key$.pipe((0,Y.Z)(null,null)))).subscribe(()=>{(0,c.t)(this._ready$)})}}x.\u0275fac=function(tt){return new(tt||x)(f.Y36(f.zs3),f.Y36(m.E))},x.\u0275dir=f.lG2({type:x,selectors:[["tg-dropdown-select","tgMetadataSelect",""]],inputs:{metadataKey:["tgMetadataSelect","metadataKey"]},features:[f._Bn([{provide:H.N,useExisting:(0,f.Gpc)(()=>x)}])]}),(0,t.gn)([(0,it.Z)("_key$")],x.prototype,"metadataKey",void 0)},6266:(Ut,at,o)=>{o.d(at,{_:()=>P});var t=o(14026),c=o(55324),z=o(97482),f=o(50339);let P=(()=>{class k{constructor(){this.cdr=(0,t.f3M)(t.sBO)}ngAfterViewInit(){this.cdr.detach()}}return k.\u0275fac=function(L){return new(L||k)},k.\u0275cmp=t.Xpm({type:k,selectors:[["tg-recaptcha-notice"]],hostVars:6,hostBindings:function(L,O){2&L&&t.ekj("small",!0)("text-center",!0)("text-muted",!0)},standalone:!0,features:[t._Bn([],[{provide:z.z,useValue:"recaptcha"}]),t.jDz],decls:10,vars:0,consts:[["href","https://policies.google.com/privacy","rel","noopener nofollow","target","_blank"],["href","https://policies.google.com/terms","rel","noopener nofollow","target","_blank"]],template:function(L,O){1&L&&(t.TgZ(0,"span"),t._uU(1,"This site is protected by reCAPTCHA and the Google "),t.qZA(),t.TgZ(2,"a",0),t._uU(3,"Privacy Policy"),t.qZA(),t.TgZ(4,"span"),t._uU(5," and "),t.qZA(),t.TgZ(6,"a",1),t._uU(7,"Terms of Service"),t.qZA(),t.TgZ(8,"span"),t._uU(9," apply."),t.qZA())},dependencies:[c.GlobalModule,f.k],styles:["[_nghost-%COMP%]{display:block;margin-top:1rem}"]}),k})()},58249:(Ut,at,o)=>{o.d(at,{o:()=>n});var t=o(64762),c=o(78425),z=o(82668),f=o(662),P=o(5296),k=o(87399),b=o(9803),L=o(92706),O=o(6281),F=o(25336),Y=o(15449),nt=o(3811),it=o(85597),H=o(42809),Q=o(50725),m=o(91696),x=o(50384),K=o(28171),ft=o(83375),X=o(89763),Mt=o(14026);
1class n{constructor(G){this.cdr=G,this._date=new b.X(void 0),this._format=new b.X(void 0),this._number=new b.X(0),this._unit=new b.X(void 0)}get date(){return this._date.value}set date(G){G!==this.date&&this._date.next(G)}get format(){return this._format.value}set format(G){G!==this.format&&this._format.next(G)}get humaniseOnNumber(){return this._number.value}set humaniseOnNumber(G){G!==this.humaniseOnNumber&&this._number.next(G)}get humaniseOnUnit(){return this._unit.value}set humaniseOnUnit(G){G!==this.humaniseOnUnit&&this._unit.next(G)}ngOnDestroy(){this._sub?.unsubscribe(),this._destroyed$&&(0,z.t)(this._destroyed$),(0,ft.completeAll)(this._date,this._unit,this._number,this._format)}ngOnInit(){this._destroyed$=new L.c,this._duration$=this._date.pipe((0,nt.w)(wt),(0,it.R)(this._destroyed$),(0,P.H)("[TgDateCountdown.duration$]"),(0,H.d)(1)),this._sub=this.getStringifyFn().pipe((0,nt.w)(G=>this._duration$.pipe((0,Q.U)(G))),(0,X.N)(this.text=""),(0,P.H)("[TgDateCountdown.text]")).subscribe((0,f.e)(G=>{this.text=G,this.cdr.markForCheck()}))}getStringifyFn(){const G=this._format.pipe((0,Q.U)(gt=>gt?this.stringifyOnUserFormat:jt));return(0,O.a)([this._unit,this._number]).pipe((0,nt.w)(([gt,Zt])=>gt&&Zt?this._duration$.pipe((0,nt.w)(N=>N.as(gt)>=Zt?(0,F.of)(It):G)):G),(0,m.x)(),(0,P.H)("[TgDateCountdown.stringifyFn$]"))}stringifyOnUserFormat(G){return k.utc(G.asMilliseconds()).format(this.format)}}function It(vt){return vt.humanize()}function jt(vt){if(vt.asSeconds()<=0)return"00m 00s";const G=["mm[m]","ss[s]"];vt.asHours()>=1&&G.unshift("HH[h]");const gt=k.utc(vt.asMilliseconds()).format(G.join(" "));return vt.asDays()>=1?`${Math.floor(vt.asDays())}d ${gt}`:gt}function wt(vt){if(vt){const G=k(vt);if(G.isAfter())return(0,Y.H)(0,1e3).pipe((0,Q.U)(()=>k.duration(G.diff(k()))),(0,x.o)(gt=>gt.asSeconds()>0),function tt(...vt){return G=>(0,K.z)(G,(0,F.of)(...vt))}(k.duration(0)),(0,P.H)("[TgDateCountdown.durationFor]"))}return(0,F.of)(k.duration(0))}n.\u0275fac=function(G){return new(G||n)(Mt.Y36(Mt.sBO))},n.\u0275cmp=Mt.Xpm({type:n,selectors:[["tg-date-countdown"]],inputs:{date:"date",format:"format",humaniseOnNumber:"humaniseOnNumber",humaniseOnUnit:"humaniseOnUnit"},decls:1,vars:1,template:function(G,gt){1&G&&Mt._uU(0),2&G&&Mt.Oqu(gt.text)},encapsulation:2,changeDetection:0}),(0,t.gn)([(0,c.h)()],n.prototype,"stringifyOnUserFormat",null)},9352:(Ut,at,o)=>{o.d(at,{u:()=>nt});var t=o(14026),c=o(52805),z=o(26454),f=o(69962),P=o(92362),k=o(54074),b=o(64177),L=o(61225);function O(H,Q){if(1&H){const m=t.EpF();t.TgZ(0,"input",5),t.NdJ("ngModelChange",function(K){t.CHM(m);const tt=t.oxw();return t.KtG(tt.onBaseFieldChange("text",K))})("blur.passive",function(){t.CHM(m);const K=t.oxw();return t.KtG(K.onTouch())}),t.qZA()}if(2&H){const m=t.oxw();t.Q6J("ngModel",m.value.text)("placeholder",m.placeholders.text)("ngStyle",m.customStyle)("disabled",m.disabled)("ngModelOptions",m.MODEL_OPTS)}}function F(H,Q){if(1&H&&(t.TgZ(0,"option",6),t._uU(1),t.qZA()),2&H){const m=Q.$implicit;t.Q6J("ngValue",m),t.xp6(1),t.hij("",m,"://")}}const Y=/^(https?):\/\//i;let nt=(()=>{class H extends P.k{constructor(m){super(),this.tr=m,this.asString=!1,this.protocol="https",this.protocolOptions=["https","http"],this.small=this.text=this.valueEmitted=!1,this.value={text:"",url:""}}ngOnChanges({protocol:m,small:x,text:K,textPlaceholder:tt,urlPlaceholder:ft,asString:X}){x&&this.refreshCss(),m&&!this.protocolOptions.includes(this.protocol)&&(this.protocol="http"),(tt||ft)&&this.refreshPlaceholders(),(X||K)&&this.valueEmitted&&this.onChange()}ngOnInit(){this.divClasses||this.refreshCss(),this.placeholders||this.refreshPlaceholders()}onBaseFieldChange(m,x){this.value={...this.value,[m]:x},this.onChange()}onChange(){this.valueEmitted=!0,this._onChangeFn(this.computeOutput())}onProtocolChange(m){this.protocol=m,this.onChange()}writeValue(m){const x=this.state();if(m)if("string"==typeof m)this.protocol=function it(H){if(H)return H.match(Y)?.[1]}(m)||this.protocol,this.value={text:"",url:m.replace(Y,"")};else{const K=(0,z.Z)(m,["protocol","text","url"]);K.url&&(K.url=K.url.replace(Y,"")),this.protocol=K.protocol&&this.protocolOptions.includes(K.protocol)?K.protocol:"http",this.value={text:K.text||"",url:K.url?.replace(Y,"")||""}}else this.protocol="http",this.value={text:"",url:""};(0,f.Z)(x,this.state())||this.cdr.detectChanges()}computeOutput(){const m=this.value.url;if(this.asString)return this.formatUrl(m);const x={...this.value};
1return m&&(x.url=this.formatUrl(m)),this.text||(x.text=x.url),x}formatUrl(m){if(!m)return"";const x=m.match(Y);return x&&(this.protocol=x[1]),`${this.protocol}://${m.replace(Y,"")}`}refreshCss(){let m,x;this.small?(m="col-xs-8",x="col-xs-4"):(m="col-xs-10",x="col-xs-2"),this.divClasses={input:m,protocol:x}}refreshPlaceholders(){const m="urlInput";this.placeholders={text:this.textPlaceholder||this.tr.translate("label",m),url:this.urlPlaceholder||this.tr.translate("url",m)}}state(){return[this.protocol,this.value]}}return H.\u0275fac=function(m){return new(m||H)(t.Y36(k.D))},H.\u0275cmp=t.Xpm({type:H,selectors:[["tg-url-input"]],hostVars:2,hostBindings:function(m,x){2&m&&t.ekj("tg-input-error-boundary",!0)},inputs:{asString:"asString",customStyle:"customStyle",protocol:"protocol",small:"small",text:"text",textPlaceholder:"textPlaceholder",urlPlaceholder:"urlPlaceholder"},features:[t._Bn([{multi:!0,provide:c.JU,useExisting:(0,t.Gpc)(()=>H)}]),t.qOj,t.TTD],decls:6,vars:13,consts:[["class","form-control",3,"ngModel","placeholder","ngStyle","disabled","ngModelOptions","ngModelChange","blur.passive",4,"ngIf"],[1,"p0",3,"ngClass"],[1,"form-control",3,"ngModel","disabled","ngModelOptions","ngModelChange","blur.passive"],[3,"ngValue",4,"ngFor","ngForOf"],["type","url",1,"form-control",3,"tgConsumeControlId","ngModel","ngModelOptions","placeholder","ngStyle","disabled","ngModelChange","blur.passive"],[1,"form-control",3,"ngModel","placeholder","ngStyle","disabled","ngModelOptions","ngModelChange","blur.passive"],[3,"ngValue"]],template:function(m,x){1&m&&(t.YNc(0,O,1,5,"input",0),t.TgZ(1,"div",1)(2,"select",2),t.NdJ("ngModelChange",function(tt){return x.onProtocolChange(tt)})("blur.passive",function(){return x.onTouch()}),t.YNc(3,F,2,2,"option",3),t.qZA()(),t.TgZ(4,"div",1)(5,"input",4),t.NdJ("ngModelChange",function(tt){return x.onBaseFieldChange("url",tt)})("blur.passive",function(){return x.onTouch()}),t.qZA()()),2&m&&(t.Q6J("ngIf",x.text),t.xp6(1),t.Q6J("ngClass",x.divClasses.protocol),t.xp6(1),t.Q6J("ngModel",x.protocol)("disabled",x.disabled)("ngModelOptions",x.MODEL_OPTS),t.xp6(1),t.Q6J("ngForOf",x.protocolOptions),t.xp6(1),t.Q6J("ngClass",x.divClasses.input),t.xp6(1),t.Q6J("tgConsumeControlId","id")("ngModel",x.value.url)("ngModelOptions",x.MODEL_OPTS)("placeholder",x.placeholders.url)("ngStyle",x.customStyle)("disabled",x.disabled))},dependencies:[b.mk,b.sg,b.O5,b.PC,L.c,c.YN,c.Kr,c.Fj,c.EJ,c.JJ,c.On],styles:["[_nghost-%COMP%]{display:block}.p0[_ngcontent-%COMP%]{padding:0}"],changeDetection:0}),H})()},66952:(Ut,at,o)=>{o.d(at,{c:()=>f});var t=o(14026),c=o(52805),z=o(71050);let f=(()=>{class P{constructor(){this.required=!1,this.text=!1,this._valiChange=z.Z}static createValidator(b,L){return O=>P.validate(O,b,L)}static validate(b,L,O){if(L){const F=b.value;if(!F||"string"!=typeof F&&(!F.url||!F.text&&O))return{required:!0}}return null}ngOnChanges(b){(b.required||b.text)&&this._valiChange()}registerOnValidatorChange(b){this._valiChange=b}validate(b){return P.validate(b,this.required,this.text)}}return P.\u0275fac=function(b){return new(b||P)},P.\u0275dir=t.lG2({type:P,selectors:[["tg-url-input","required","","ngModel",""]],inputs:{required:"required",text:"text"},features:[t._Bn([{multi:!0,provide:c.Cf,useExisting:(0,t.Gpc)(()=>P)}]),t.TTD]}),P})()},13026:(Ut,at,o)=>{(0,o(8592).applyGlobalStyle)("filter-grid",".tg-filter-grid{--tg-grid-spacing:var(--tg-space-3);display:flex;flex-direction:row;flex-wrap:wrap;margin:0 calc(var(--tg-grid-spacing)*-.5)}.tg-filter-grid.filter-grid-disabled>.tg-filter-cell label,.tg-filter-grid.filter-grid-disabled>.tg-filter-cell strong.filter-label{color:#777}.tg-filter-grid>.tg-filter-cell{display:flex;flex-direction:column;margin:var(--tg-grid-spacing) 0;padding:0 var(--tg-grid-spacing);width:calc(100%/var(--tg-grid-cols))}.tg-filter-grid>.tg-filter-cell tg-dropdown-select .no-value-selected{white-space:normal}.tg-filter-grid>.tg-filter-cell .clearable-content>*{width:100%}.tg-filter-grid>.tg-filter-cell strong.filter-label{user-select:none}.tg-filter-grid:after,.tg-filter-grid:before{content:normal}@media (max-width:767px){.tg-filter-grid{--tg-grid-cols:1}}@media (max-width:991px){.tg-filter-grid{--tg-grid-cols:2}.tg-filter-grid.filter-grid-narrow{--tg-grid-cols:1}}@media (min-width:992px){.tg-filter-grid{--tg-grid-cols:3}.tg-filter-grid.filter-grid-narrow{--tg-grid-cols:2}}@media (min-width:1200px){.tg-filter-grid.filter-grid-narrow{--tg-grid-cols:3}}")},69522:(Ut,at,o)=>{o.d(at,{A:()=>Bt});var t=o(64762),c=o(88990),z=o(5296),f=o(14026),P=o(52805),k=o(69962),b=o(36818),L=o(9803),O=o(25336),F=o(41958),Y=o(50725),nt=o(3811),it=o(35673),H=o(60407),Q=o(48921),m=o(85597),x=o(56625),K=o(87563),tt=o(42809),ft=o(55324),X=o(75263),Mt=o(49363),n=o(22710),It=o(97482),jt=o(76473),wt=o(58322),vt=o(85960),G=o(64177),gt=o(61225),Zt=o(38674),N=o(4678),Vt=o(62441),te=o(22009),Yt=o(64683);function Pt(V,S){if(1&V){const g=f.EpF();f.TgZ(0,"input",4),f.NdJ("typeaheadOnSelect",function(v){f.CHM(g);const T=f.oxw();return f.KtG(T.onSelect(v.item))})("blur.passive",function(){f.CHM(g);const v=f.oxw();return f.KtG(v.onTouch())}),f.ALo(1,"tr"),f.qZA()}if(2&V){const g=f.oxw();f.Q6J("tgConsumeControlId","id")("formControl",g.ctrl)("autocomplete","off")("typeahead",g.suggestions$)("typeaheadAsync",!0)("typeaheadOptionField","name")("placeholder",f.lcZ(1,9,"grpPlaceholder"))("typeaheadMinLength",0)("container",g.container)}}function Xt(V,S){if(1&V){const g=f.EpF();f.TgZ(0,"div",5),f.GkF(1,6),f.TgZ(2,"div",7)(3,"button",8),f.NdJ("click.passive",function(){f.CHM(g);const v=f.oxw();return f.KtG(v.reset())}),f.qZA()()()}if(2&V){f.oxw();const g=f.MAs(1);f.xp6(1),f.Q6J("ngTemplateOutlet",g)}}function Rt(V,S){if(1&V&&(f.TgZ(0,"div",9)(1,"span"),f._uU(2),f.ALo(3,"tr"),f.qZA(),f.TgZ(4,"strong"),f._uU(5),f.qZA()()),2&V){const g=f.oxw();f.xp6(2),f.AsE("",f.lcZ(3,3,"groupTypeAlert"),":"," ",""),f.xp6(3),f.Oqu(g.groupType)}}function Dt(V,S){if(1&V){const g=f.EpF();f.TgZ(0,"div",14),f.NdJ("click.passive",function(){f.CHM(g);const v=f.oxw().index,T=f.oxw(2);return f.KtG(T.rm(v))}),f._UZ(1,"i",15),f.ALo(2,"tr"),f.qZA()}2&V&&(f.xp6(1),f.uIk("aria-label",f.lcZ(2,1,"remove")))}function Nt(V,S){if(1&V&&(f.TgZ(0,"div",12)(1,"div")(2,"div")(3,"span"),f._uU(4),f.qZA()(),f.YNc(5,Dt,3,3,"div",13),f.qZA()()),2&V){const g=S.$implicit,u=f.oxw(2);f.xp6(4),f.Oqu(g.name),f.xp6(1),f.Q6J("ngIf",u.showRemove(g.id))}}function lt(V,S){if(1&V&&(f.TgZ(0,"tg-panel")(1,"tg-panel-body")(2,"div",10),f.YNc(3,Nt,6,2,"div",11),f.qZA()()()),2&V){const g=f.oxw();f.xp6(3),f.Q6J("ngForOf",g.tokens)("ngForTrackBy",g.TRACK_BY_ID)}}class Bt extends jt.S{constructor(){super(...arguments),this.TRACK_BY_ID=vt.trackById,this.notRemovable=[],this.showGroupType=!1,this.groupType="",this.tokens=[],this.dispatchGroupSelection$=new L.X(null),this.grRes=(0,f.f3M)(X.m)}ngOnDestroy(){this.dispatchGroupSelection$.complete(),super.ngOnDestroy()}ngOnInit(){super.ngOnInit(),this.suggestions$=new wt.Z({debounceTime:250,getParams:()=>this.ctrl.value?.trim()??"",query:S=>S?this.fetch({...this.searchCriteria,limit:20,name:S}):(0,O.of)([])}).pipe(this.clearSuggestionsOnSelection(),(0,z.H)("[SearchGroupSelectComponent.suggestions$]"))}onSelect(S){this.multi?(this.tokens=[...this.tokens,S],this.ctrl.reset(),this.dispatchGroupSelection$.next(this.tokens)):(this.dispatchGroupSelection$.next(S),this.groupType=S?.type||"")}reset(){this.dispatchGroupSelection$.next(null),this.ctrl.reset(),this.groupType=""}rm(S){const g=[...this.tokens];g.splice(S,1),this.tokens=g,this.dispatchGroupSelection$.next(this.tokens)}showRemove(S){return!this.notRemovable?.includes(S)}writeValue(S){this.multi?this.writeValueMulti(S):this.writeValueNonMulti(S),this.cdr.markForCheck()}createCtrl(){return this.fb.control(null)}valueChanges(){return this.dispatchGroupSelection$.pipe((0,Y.U)(S=>S||null))}clearSuggestionsOnSelection(){return(0,nt.w)(S=>this.dispatchGroupSelection$.pipe((0,it.T)(1),(0,H.q)(1),(0,Y.U)(()=>[]),(0,Q.O)(S)))}fetch(S){return this.grRes.query({params:S}).pipe((0,m.R)(this.dispatchGroupSelection$.pipe((0,x.Z)())),(0,K.K)(()=>(this.fetch[c.y7]?.delete(ct(S)),F.E)),(0,tt.d)(1))}writeValueMulti(S){this.tokens=S?Array.isArray(S)?S:[S]:[],this.ctrl.value&&this.ctrl.
1setValue(null),(0,k.Z)(this.tokens,this.dispatchGroupSelection$.value)||this.dispatchGroupSelection$.next(this.tokens)}writeValueNonMulti(S){(0,k.Z)(S,this.dispatchGroupSelection$.value)||this.dispatchGroupSelection$.next(S),S&&S.name!==this.ctrl.value&&this.ctrl.setValue(S.name)}}function ct(V){return JSON.stringify(V)}Bt.\u0275fac=function(){let V;return function(g){return(V||(V=f.n5z(Bt)))(g||Bt)}}(),Bt.\u0275cmp=f.Xpm({type:Bt,selectors:[["tg-group-select"]],hostVars:2,hostBindings:function(S,g){2&S&&f.ekj("tg-input-error-boundary",!0)},inputs:{clear:"clear",container:"container",multi:"multi",notRemovable:"notRemovable",searchCriteria:"searchCriteria",showGroupType:"showGroupType"},standalone:!0,features:[f._Bn([{multi:!0,provide:P.JU,useExisting:(0,f.Gpc)(()=>Bt)}],[{provide:It.z,useValue:"searchGroupSelect"}]),f.qOj,f.jDz],decls:5,vars:4,consts:[["tplInput",""],["class","input-group",4,"ngIf","ngIfElse"],["class","alert alert-info",4,"ngIf"],[4,"ngIf"],[1,"form-control",3,"tgConsumeControlId","formControl","autocomplete","typeahead","typeaheadAsync","typeaheadOptionField","placeholder","typeaheadMinLength","container","typeaheadOnSelect","blur.passive"],[1,"input-group"],[3,"ngTemplateOutlet"],[1,"input-group-btn"],[1,"btn-default",3,"tg-clear-button","click.passive"],[1,"alert","alert-info"],[1,"group-containers"],["class","group-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"group-container"],["class","text-muted small",3,"click.passive",4,"ngIf"],[1,"text-muted","small",3,"click.passive"],["aria-hidden","false","role","button",1,"fa","fa-times"]],template:function(S,g){if(1&S&&(f.YNc(0,Pt,2,11,"ng-template",null,0,f.W1O),f.YNc(2,Xt,4,1,"div",1),f.YNc(3,Rt,6,5,"div",2),f.YNc(4,lt,4,2,"tg-panel",3)),2&S){const u=f.MAs(1);f.xp6(2),f.Q6J("ngIf",g.clear&&!g.multi)("ngIfElse",u),f.xp6(1),f.Q6J("ngIf",g.showGroupType&&g.groupType),f.xp6(1),f.Q6J("ngIf",g.multi&&(null==g.tokens?null:g.tokens.length))}},dependencies:[ft.GlobalModule,G.sg,G.O5,G.tP,gt.c,Zt.r,N.jl,N.Av,Vt.h,te.a,Yt.H,P.UX,P.Fj,P.JJ,P.oH,b.H3,b.Bp,n.S,Mt.m],styles:[".group-containers[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:wrap}.input-group[_ngcontent-%COMP%]{width:100%!important}.group-container[_ngcontent-%COMP%]{border-collapse:collapse;display:inline-table;margin:2px}.group-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-row}.group-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border:1px solid #ccc;display:table-cell;padding:2px;vertical-align:middle}"],changeDetection:0}),(0,t.gn)([(0,c.qQ)(ct)],Bt.prototype,"fetch",null)},95877:(Ut,at,o)=>{o.d(at,{Q:()=>L});var t=o(52805),c=o(74831),z=o(36818),f=o(55324),P=o(62598),k=o(39444),b=o(14026);let L=(()=>{class O{}return O.\u0275fac=function(Y){return new(Y||O)},O.\u0275mod=b.oAB({type:O}),O.\u0275inj=b.cJS({imports:[f.GlobalModule,P.H,c.z8,z.H3,k.r,t.UX]}),O})()},56949:(Ut,at,o)=>{o.d(at,{O:()=>H});var t=o(14026),c=o(49037),z=o(75827),f=o(55324),P=o(82125),k=o(64177),b=o(50339),L=o(64683);function O(Q,m){if(1&Q&&(t.TgZ(0,"h4",11),t._uU(1),t.qZA()),2&Q){const x=t.oxw(2);t.xp6(1),t.Oqu(x.heading)}}function F(Q,m){if(1&Q){const x=t.EpF();t.TgZ(0,"header",4),t.YNc(1,O,2,1,"h4",5),t.TgZ(2,"button",6),t.NdJ("click.passive",function(){t.CHM(x);const tt=t.oxw();return t.KtG(tt.close())}),t.TgZ(3,"span",7),t._uU(4,"\xd7"),t.qZA()()(),t._UZ(5,"div",8),t.TgZ(6,"footer",9)(7,"button",10),t.NdJ("click.passive",function(){t.CHM(x);const tt=t.oxw();return t.KtG(tt.close())}),t._uU(8),t.ALo(9,"tr"),t.qZA()()}if(2&Q){const x=t.oxw();t.xp6(1),t.Q6J("ngIf",x.heading),t.xp6(4),t.Q6J("innerHTML",x.html,t.oJD),t.xp6(3),t.Oqu(t.xi3(9,3,"close","common"))}}function Y(Q,m){1&Q&&t.Hsn(0)}function nt(Q,m){if(1&Q&&t._uU(0),2&Q){const x=t.oxw();t.Oqu(x.heading)}}const it=["*"];let H=(()=>{class Q extends P.f{constructor(){super(...arguments),this.mirrorHeadingToLink=!0,this.bsModal=(0,t.f3M)(c.tT)}close(){if(this.ref)try{this.ref.hide()}catch{}finally{this.ref=void 0}}ngOnDestroy(){this.close()}openModal(x,K){K&&(K.preventDefault(),K.stopPropagation()),this.close(),this.ref=this.bsModal.show(x,{animated:!0,class:"modal-lg"})}}return Q.\u0275fac=function(){let m;return function(K){return(m||(m=t.n5z(Q)))(K||Q)}}(),Q.\u0275cmp=t.Xpm({type:Q,selectors:[["tg-wysiwyg-cfg-modal"]],inputs:{mirrorHeadingToLink:"mirrorHeadingToLink"},standalone:!0,features:[t.qOj,t.jDz],ngContentSelectors:it,decls:6,vars:2,consts:[["tpl",""],["tplContent",""],["href","#",3,"click"],[3,"ngIf","ngIfElse"],[1,"modal-header"],["class","modal-title pull-left",4,"ngIf"],["type","button","aria-label","Close",1,"close","pull-right",3,"click.passive"],["aria-hidden","true"],[1,"modal-body",3,"innerHTML"],[1,"modal-footer"],["type","button",1,"btn","btn-default",3,"click.passive"],[1,"modal-title","pull-left"]],template:function(x,K){if
1(1&x){const tt=t.EpF();t.F$t(),t.YNc(0,F,10,6,"ng-template",null,0,t.W1O),t.YNc(2,Y,1,0,"ng-template",null,1,t.W1O),t.TgZ(4,"a",2),t.NdJ("click",function(X){t.CHM(tt);const Mt=t.MAs(1);return t.KtG(K.openModal(Mt,X))}),t.YNc(5,nt,1,1,"ng-template",3),t.qZA()}if(2&x){const tt=t.MAs(3);t.xp6(5),t.Q6J("ngIf",K.mirrorHeadingToLink)("ngIfElse",tt)}},dependencies:[f.GlobalModule,k.O5,b.k,L.H,z.X],styles:["[_nghost-%COMP%]{display:inline}"],changeDetection:0}),Q})()},16733:(Ut,at,o)=>{o.d(at,{d:()=>z});var t=o(3811),c=o(29634);function z(f,P){return(0,c.a)(t.w,f,P)}}}]);
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.