PageSourceSearch

https://app.coachingspace.net/chunk-2yhEEcIl.js

js coachingspace.net collected 2026-10-06 15:00:57 UTC 101,947 bytes, 3 lines download raw bytes

1import {N,O as O$1}from'./chunk-IREKwGOX.js';import {C}from'./chunk-CU5uhNpr.js';import {_ as _i$1,P as Pt$1,o as oi$1,u as ut,l as li$1,p as pi,m as mi$1,a as ui$2,h as hi$1}from'./chunk-uMcrYtJ0.js';import {d}from'./chunk-Clrk4aqZ.js';import {V as V$1}from'./chunk-D8Wm9gIZ.js';import {O}from'./chunk-DfTYVpdP.js';import'./chunk-Blkt70pb.js';import {aF as h,p,aM as Xi$1,h as hr,bK as y,bw as x,ay as q,aK as Ji$1,aP as bt,a as pr,aN as h$1,D as Dn$1,P as Pe,aR as c,X as Xe,w,e as A,g as g7,f as As,aX as At,aY as R,aZ as ee,az as Tk,b5 as po$1,K,F as B7,G as c$1,bx as Qr,Z as Zc,a6 as wA,a7 as HA,U as Up,aa as pu,Q as Qo$1,a8 as fu,al as P0,J as qo$1,ab as jD,ac as $A,an as Wp,af as hD,L as Xo$1,ao as F0,V,$ as Pt,l as le,k as kn$1,S as Pm,bg as pn$1,d as b4,o as oe,M as Me$1,ck as lc,b6 as lm,be as U,ap as $0,b7 as J0,am as K0,aw as MA,ar as LA,av as Sn$1,W as Te,u as ui$1,O as M,bm as tt,a0 as Kt,a1 as Qt,a2 as Yt,j as jl,I as In$1,i as Vl,cl as fo$1,n as Hl,a5 as Po$1,q as gs,R as Ri$1,a4 as Oi$1,s as hs,r as Ne,a9 as wM,ag as CM,ad as zA,z as zl,c as cr,N as Nl,m as Pl,B as Bo$1,T as To$1,cm as us,c9 as kA,C as C$1,A as Ae$1,bH as xe,ae as PA,as as nv,at as rv,cn as BT,br as FA,au as UD,cf as Gp,bs as eb}from'./main-UZEUSS5T.js';import {u as u$1}from'./chunk-nGHsT_zQ.js';import {s,d as d$1,i}from'./chunk-D7zBD5yw.js';import'./chunk-D9U3QnlY.js';import {u}from'./chunk-DO01wp2q.js';import {k as ke,z as ze,J as Jt$1}from'./chunk-BMQb4BQZ.js';import {L}from'./chunk-Ch594fLO.js';import'./chunk-BWxqAY5T.js';import'./chunk-CsJokW5I.js';var et=class t{static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop"]],decls:1,vars:0,template:function(e,a){e&1&&fu(0,"router-outlet");},dependencies:[lm],encapsulation:2});}};var ci=()=>["fas","lock-open"];function di(t,n){t&1&&(Zc(0,"p",10),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.RELEASE_CONFIRM.ERROR")));}var ht=class t{constructor(n){this.formSubmitted=V(false);this.dialog=p(Pe);this.dialogRef=p(M);this.form=n.group({responsibility:[false,ui$1.requiredTrue],correct:[false,ui$1.requiredTrue]});}openTerms(n){n.preventDefault(),O$1(this.dialog);}confirm(){this.formSubmitted.set(true),!this.form.invalid&&this.dialogRef.close(true);}close(){this.dialogRef.close(false);}static{this.\u0275fac=function(e){return new(e||t)(q(zl))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-publish-dialog"]],decls:33,vars:28,consts:[["mat-dialog-title",""],[1,"mat-typography","sk-modal"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"publish-dialog__intro"],["name","workshop-publish-form",1,"sk-w-100",3,"formGroup"],[1,"publish-dialog__item"],["name","responsibility","formControlName","responsibility"],["name","correct","formControlName","correct"],["href","#",1,"sk-link",3,"click"],[1,"sk-text-error","sk-font-small","publish-dialog__error"],["align","center"],["mat-flat-button","",1,"sk-button-secondary",3,"click"],["mat-flat-button","",1,"sk-button-primary","publish-dialog__confirm",2,"margin-left","15px",3,"click"],[3,"icon"]],template:function(e,a){e&1&&(Zc(0,"h1",0),wA(1),HA(2,"translate"),Up(),Zc(3,"mat-dialog-content",1)(4,"div",2)(5,"div",3)(6,"p",4),wA(7),HA(8,"translate"),Up(),Zc(9,"form",5)(10,"div",6)(11,"mat-checkbox",7),wA(12),HA(13,"translate"),Up(),wM(),Up(),Zc(14,"div",6)(15,"mat-checkbox",8),wA(16),HA(17,"translate"),Zc(18,"a",9),pu("click",function(C){return a.openTerms(C)}),wA(19),HA(20,"translate"),Up(),wA(21),HA(22,"translate"),Up(),wM(),Up(),Qo$1(23,di,3,3,"p",10),Up()()()(),Zc(24,"mat-dialog-actions",11)(25,"button",12),pu("click",function(){return a.close()}),wA(26),HA(27,"translate"),Up(),Zc(28,"button",13),pu("click",function(){return a.confirm()}),fu(29,"fa-icon",14),Zc(30,"span"),wA(31),HA(32,"translate"),Up()()()),e&2&&(qo$1(),jD($A(2,11,"WORKSHOP.RELEASE_CONFIRM.TITLE")),qo$1(6),jD($A(8,13,"WORKSHOP.RELEASE_CONFIRM.INTRO")),qo$1(2),hD("formGroup",a.form),qo$1(2),CM(),qo$1(),Wp(" ",$A(13,15,"WORKSHOP.RELEASE_CONFIRM.RESPONSIBILITY")," "),qo$1(3),CM(),qo$1(),Wp(" ",$A(17,17,"WORKSHOP.RELEASE_CONFIRM.CORRECT_BEFORE_LINK")),qo$1(3),jD($A(20,19,"WORKSHOP.RELEASE_CONFIRM.CORRECT_LINK")),qo$1(2),Wp("",$A(22,21,"WORKSHOP.RELEASE_CONFIRM.CORRECT_AFTER_LINK")," "),qo$1(2),Xo$1(a.formSubmitted()&&a.form.invali
1d?23:-1),qo$1(3),Wp(" ",$A(27,23,"GLOBAL.CANCEL")," "),qo$1(3),hD("icon",LA(27,ci)),qo$1(2),jD($A(32,25,"WORKSHOP.RELEASE_CONFIRM.CONFIRM")));},dependencies:[Kt,Qt,Yt,jl,Nl,Vl,Pl,Hl,Bo$1,To$1,xe,g7,As,B7],styles:[".publish-dialog__intro[_ngcontent-%COMP%]{margin:0 0 16px;color:#979bbf;font-size:.92rem;line-height:1.5}.publish-dialog__item[_ngcontent-%COMP%]{margin:0 0 10px;font-size:.92rem;line-height:1.45;color:#140d69}.publish-dialog__item[_ngcontent-%COMP%]     .mdc-form-field{align-items:flex-start;color:inherit}.publish-dialog__item[_ngcontent-%COMP%]     .mdc-label{font:inherit;letter-spacing:normal;color:inherit;white-space:normal;padding-top:9px}.publish-dialog__error[_ngcontent-%COMP%]{margin:4px 0 0 40px}.publish-dialog__confirm[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:8px}"]});}};function it(t){return t.open(ht,{autoFocus:"dialog"}).afterClosed().pipe(U(n=>n===true))}var mi=()=>["fas","play"],_i=()=>["fas","link"],ui=()=>["fas","ellipsis-h"],fi=()=>["fas","edit"],hi=()=>["fas","clone"],Ci=()=>["fas","trash"],gi=()=>["fas","ban"],ki=t=>["fas",t],xi=()=>["fas","calendar-days"],Xt=()=>["fas","users"],bi=()=>["fas","lock-open"],vi=()=>["fas","lock"],Si=(t,n)=>n.id;function Oi(t,n){t&1&&(Zc(0,"th",10),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ENTITY.DATE_LAST_OPENED")));}function yi(t,n){t&1&&(Zc(0,"th",15),wA(1),HA(2,"translate"),Up(),Zc(3,"th",16),wA(4),HA(5,"translate"),Up()),t&2&&(qo$1(),jD($A(2,2,"WORKSHOP.START_DATE")),qo$1(3),jD($A(5,4,"WORKSHOP.PARTICIPANT.TITLE")));}function Ei(t,n){if(t&1&&(Zc(0,"td"),wA(1),HA(2,"localizedDate"),Up()),t&2){let e=K0().$implicit;qo$1(),jD($A(2,1,e.lastOpened));}}function Di(t,n){t&1&&(Zc(0,"span",18),fu(1,"fa-icon",28),wA(2),HA(3,"translate"),Up()),t&2&&(qo$1(),hD("icon",LA(4,gi)),qo$1(),Wp(" ",$A(3,2,"WORKSHOP.CANCELLED")," "));}function Pi(t,n){if(t&1&&(Zc(0,"span",33),fu(1,"fa-icon",28),wA(2),HA(3,"translate"),Up()),t&2){let e=K0().$implicit;Sn$1("workshop-state--published",e.published),qo$1(),hD("icon",PA(6,ki,e.published?"lock-open":"lock")),qo$1(),Wp(" ",$A(3,4,e.published?"WORKSHOP.RELEASED":"WORKSHOP.NOT_RELEASED")," ");}}function Ti(t,n){if(t&1&&wA(0),t&2){let e=K0(2).$implicit;Wp(" / ",e.maxNumberOfTickets);}}function Ri(t,n){if(t&1&&(Zc(0,"p",20)(1,"span",34),fu(2,"fa-icon",28),wA(3),HA(4,"localizedDate"),HA(5,"translate"),Up(),Zc(6,"span",34),fu(7,"fa-icon",28),wA(8),Qo$1(9,Ti,1,1),Up()()),t&2){let e=K0().$implicit;qo$1(2),hD("icon",LA(10,xi)),qo$1(),Wp(" ",e.startDate?zA(4,5,e.startDate,"short"):$A(5,8,"WORKSHOP.DATE_TBA")," "),qo$1(4),hD("icon",LA(11,Xt)),qo$1(),Wp(" ",e.participantCount??0),qo$1(),Xo$1(e.maxNumberOfTickets?9:-1);}}function wi(t,n){if(t&1&&(Zc(0,"span",35),wA(1),Up()),t&2){let e=K0(2).$implicit;qo$1(),Wp(" / ",e.maxNumberOfTickets);}}function Ii(t,n){if(t&1&&(Zc(0,"td"),wA(1),HA(2,"localizedDate"),HA(3,"translate"),Up(),Zc(4,"td")(5,"span",34),fu(6,"fa-icon",28),wA(7),Qo$1(8,wi,2,1,"span",35),Up()()),t&2){let e=K0().$implicit;qo$1(),jD(e.startDate?zA(2,4,e.startDate,"short"):$A(3,7,"WORKSHOP.DATE_TBA")),qo$1(5),hD("icon",LA(9,Xt)),qo$1(),Wp(" ",e.participantCount??0),qo$1(),Xo$1(e.maxNumberOfTickets?8:-1);}}function Wi(t,n){t&1&&fu(0,"fa-icon",25),t&2&&hD("icon",LA(1,bi));}function Mi(t,n){t&1&&fu(0,"fa-icon",26),t&2&&hD("icon",LA(1,vi));}function Ai(t,n){if(t&1){let e=$0();Zc(0,"tr",12),Qo$1(1,Ei,3,3,"td"),Zc(2,"td")(3,"a",17),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.openDetail(c))}),wA(4),Up(),Qo$1(5,Di,4,5,"span",18)(6,Pi,4,8,"span",19),Qo$1(7,Ri,10,12,"p",20),Up(),Qo$1(8,Ii,9,10),Zc(9,"td")(10,"div",21)(11,"div")(12,"button",22),HA(13,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.openDetail(c))}),fu(14,"fa-icon",23),Up()(),Zc(15,"div")(16,"button",24),HA(17,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.togglePublished(c))}),Qo$1(18,Wi,1,2,"fa-icon",25),Qo$1(19,Mi,1,2,"fa-icon",26),Up()(),Zc(20,"div")(21,"button",27),HA(22,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.shareTool(c))}),fu(23,"fa-icon",28),Up()(),Zc(24,"div")(25,"button",29),fu(26,"fa-icon",28),Up()(),Zc(27,"mat-menu",30,0)(29,"button",31),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.openDialogEdit(c))}),fu(30,"fa-icon",23),Zc(31,"span"),wA(32),HA(33,"translate"),Up()(),Zc(34,"button",31),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.cloneTool(c))}),fu(35,"fa-icon",26),Zc(36,"span"),wA(37),HA(38,"translate"),Up()(),Zc(39,"button",31),pu("click",function(){let c=nv(e).$implicit,C=K0();return rv(C.delete(c))}),fu(40,"fa-icon",32),Zc(41,"span"),wA(42),HA(43,"translate"),Up()()()()()();}if(t&2){let e=n.$implicit,a=J0(28),c=K0();qo$1(),Xo$1(c.showS()?1:-1),qo$1(3),jD(e.name),qo$1(),Xo$1(e.cancelledDate?5:6),qo$1(2),Xo$1(c.showM()?-1:7),qo$1(),Xo$1(c.showM()?8:-1),qo$1(4),hD("matTooltip",MA($A(13,33,"WORKSHOP.OPEN")))("matTooltipShowDelay",1e3)("matTooltipHideDelay",500),qo$1(2),hD("icon",LA(45,mi)),qo$1(2),hD("matTooltip",MA($A(17,35,e.published?"WORKSHOP.WITHDRAW_RELEASE":"WORKSHOP.RELEASE")))("matTooltipShowDelay",1e3)("matTooltipHideDelay",500),qo$1(2),Xo$1(e.published?18:-1),qo$1(),Xo$1(e.published?-1:19),qo$1(2),hD("matTooltip",MA($A(22,37,"WORKSHOP.COPY_PUBLIC_LINK")))("matTooltipShowDelay",1e3)("matTooltipHideDelay",500),qo$1(2),Sn$1("sk-text-secondary",!e.published)("sk-text-accent",e.published),hD("icon",LA(46,_i)),qo$1(2),hD("matMenuTriggerFor",a),qo$1(),hD("icon",LA(47,ui)),qo$1(4),hD("icon",LA(48,fi)),qo$1(2),jD($A(33,39,"ENTITY.EDIT")),qo$1(3),hD("icon",LA(49,hi)),qo$1(2),jD($A(38,41,"ENTITY.DUPLICATE")),qo$1(3),hD("icon",LA(50,Ci)),qo$1(2),jD($A(43,43,"GLOBAL.DELETE"));}}function Bi(t,n){t&1&&fu(0,"mat-spinner",14),t&2&&hD("diameter",30);}var nt=class t extends C{constructor(e,a,c,C,W,Oe,K,ut,pi,si){super(e,c,C,W,Oe,K,ut,pi,si,"WORKSHOP","WORKSHOP","WORKSHOP.WORKSHOPS");this.workshopService=e;this.premiumFeaturePermissionService=a;this.copyLink=p(Xi$1);this.onNewToolCreated=e=>{!e||!e.tool||(e.openTool?this.openDetail(e.tool):this.load());};this.onToolEdited=e=>{!e||!e.tool||(e.openTool?this.openDetail(e.tool):this.replaceRow(e.tool));};}openDialogEdit(e){this.dialog.open(_i$1,{data:e}).afterClosed().subscribe(this.onToolEdited);}openDialogNew(){this.dialog.open(_i$1,{data:null}).afterClosed().subscribe(this.onNewToolCreated);}hasPermissionForTool(){return this.premiumFeaturePermissionService.hasWorkshopPremiumFeatures()}shareTool(e){if(!e.published){this.snackbarService.showWarn("WORKSHOP.NO_LINK_NOT_RELEASED");return}this.copyLink.copyAndShowLink(this.workshopService.getPublicRegistrationLink(e.id));}togglePublished(e){if(e.published){this.savePublished(e,false);return}it(this.dialog).pipe(hr(this.destroyRef)).subscribe(a=>{a&&this.savePublished(e,true);});}savePublished(e,a){this.workshopService.update(y(x({},e),{published:a})).pipe(hr(this.destroyRef)).subscribe(c=>{this.replaceRow(c),this.snackbarService.showInfo(c.published?"WORKSHOP.RELEASED_SNACK":"WORKSHOP.RELEASE_WITHDRAWN_SNACK");});}replaceRow(e){this.tools.update(a=>a.map(c=>c.id===e.id?y(x(x({},c),e),{participantCount:c.participantCount}):c));}static{this.\u0275fac=function(a){return new(a||t)(q(d),q(O),q(Ji$1),q(bt),q(pr),q(h$1),q(Dn$1),q(Pe),q(Xi$1),q(c))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-overview"]],features:[Qr],decls:26,vars:13,consts:[["menu","matMenu"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"sk-card-content"],[1,"sk-overview-header"],[1,"sk-center-vertical"],[3,"searchTermChange"],["mat-flat-button","","aria-label","Neu",1,"sk-button-primary",3,"click"],["matSort","","matSortActive","lastOpened","matSortDirection","desc",1,"sk-table",3,"matSortChange","matSortDisableClear"],[1,"sk-table-header"],["mat-sort-header","lastOpened",2,"width","90px"],["mat-sort-header","name"],[1,"sk-table-row"],[1,"sk-div-content-centered"],[3,"diameter"],["mat-sort-header","startDate",2,"width","150px"],[2,"width","150px"],[1,"sk-link",3,"click"],[1,"workshop-state","workshop-state--cancelled"],[1,"workshop-state",3,"workshop-state--published"],[1,"sk-text-secondary"],[1,"sk-menu-container"],["mat-icon-button","","color","accent","aria-label","Start",1,"sk-icon-button",3,"click","matTooltip","matTooltipShowDelay","matTooltipHideDelay"],[1,"sk-text-primary",3,"icon"],["mat-icon-button","","color","primary","aria-label","Release",1,"sk-icon-button",3,"click","matTooltip","matTooltipShowDelay","matTooltipHideDelay"],[1,"sk-text-accent",3,"icon"],[1,"sk-text-secondary",3,"icon"],["mat-icon-button","","aria-label","Share",1,"sk-icon-button",3,"click","matTooltip","matTooltipShowDelay","matTooltipHideDelay"],[3,"icon"],["mat-icon-button","","color","accent","aria-label","Functions",1,"sk-icon-button",3,"matMenuTriggerFor"],["xPosition","before"],["mat-menu-item","",1,"sk-icon-text-button",3,"click"],[1,"sk-text-error",3,"icon"],[1,"workshop-state"],[1,"workshop-meta"],[1,"workshop-meta__max"]],template:function(a,c){a&1&&(Zc(0,"div",1)(1,"div",2)(2,"mat-card")(3,"mat-card-content",3)(4,"div",4)(5,"div",5)(6,"h1"),wA(7),HA(8,"translate"),Up(),Zc(9,"app-overview-search-field",6),pu("searchTermChange",function(W){return c.onSearchTermChange(W)}),Up()(),Zc(10,"div")(11,"button",7),pu("click",function(){return c.onNewButton()}),wA(12),HA(13,"translate"),Up()()(),Zc(14,"table",8),pu("matSortChange",function(W){return c.sortChange(W)}),Zc(15,"tr",9),Qo$1(16,Oi,3,3,"th",10),Zc(17,"th",11),wA(18),HA(19,"translate"),Up(),Qo$1(20,yi,6,6),fu(21,"th"),Up(),P0(22,Ai,44,51,"tr",12,Si),Up(),Zc(24,"div",13),Qo$1(25,Bi,1,1,"mat-spinner",14),Up()()()()()),a&2&&(qo$1(7),jD($A(8,7,"WORKSHOP.WORKSHOPS")),qo$1(5),Wp(" ",$A(13,9,"GLOBAL.NEW")," "),qo$1(2),hD("matSortDisableClear",true),qo$1(2),Xo$1(c.showS()?16:-1),qo$1(2),jD($A(19,11,"ENTITY.NAME")),qo$1(2),Xo$1(c.showM()?20:-1),qo$1(2),F0(c.tools()),qo$1(3),Xo$1(c.loading()?25:-1));},dependencies:[w,A,ke,g7,ze,Jt$1,As,At,R,ee,Tk,po$1,K,B7,c$1],styles:["p[_ngcontent-%COMP%]{margin:5px 0}.mat-drawer-container[_ngcontent-%COMP%], .mat-drawer[_ngcontent-%COMP%]{background-color:transparent;border:none}.sidenav-help-container[_ngcontent-%COMP%]{flex:1 0 auto}  .mat-mdc-tooltip{font-size:small;text-align:center}h1[_ngcontent-%COMP%]{float:left;margin-right:10px}",".workshop-state[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;margin-left:8px;padding:1px 8px;border-radius:999px;font-size:.72rem;font-weight:500;letter-spacing:.02em;vertical-align:middle;white-space:nowrap;background:#979bbf1f;color:#979bbf}.workshop-state--published[_ngcontent-%COMP%]{background:#f98d2b24;color:#f98d2b}.workshop-state--cancelled[_ngcontent-%COMP%]{background:#ff572224;color:#e73700}.workshop-meta[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;margin-right:14px;white-space:nowrap}.workshop-meta[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{font-size:.8rem}.workshop-meta__max[_ngcontent-%COMP%]{color:#979bbf}"]});}};var at=(a=>(a.DRAFT="DRAFT",a.PLANNED="PLANNED",a.SENT="SENT",a))(at||{}),ot=class{constructor(){this.id=null;}};var rt=class{constructor(){this.id=null;}};function Ni(t,n){t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ERRORS.INPUT.MAIL_INVALID")));}function Li(t,n){t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ERRORS.INPUT.REQUIRED")));}function Hi(t,n){t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ERRORS.INPUT.REQUIRED")));}function Fi(t,n){t&1&&(Zc(0,"p",9),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.PARTICIPANT.ADD_HINT")));}function Ki(t,n){t&1&&(Zc(0,"p",10),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.PARTICIPANT.SAVE_ERROR_HINT")));}function Vi(t,n){t&1&&(Zc(0,"span"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"GLOBAL.SAVE")));}function Ui(t,n){t&1&&fu(0,"mat-spinner",14),t&2&&hD("diameter",20);}var lt=class t{constructor(n,e,a,c,C,W){this.dialogRef=n;this.data=e;this.workshopService=a;this.formBuilder=c;this.snackbarService=C;this.cdr=W;this.isEdit=false;this.formSubmitted=false;this.isSaving=false;this.saveFailed=false;this.destroyRef=p(le);}keypress(n){n.key==="Enter"&&this.save();}ngOnInit(){let n=this.data.participant;this.isEdit=n!=null,this.form=this.formBuilder.group({email:[n?.email??"",[ui$1.required,ui$1.email]],firstName:[n?.firstName??"",ui$1.required],lastName:[n?.lastName??"",ui$1.required]});}save(){if(this.isSaving)return;if(this.formSubmitted=true,this.saveFailed=false,this.form.invali
1d){this.snackbarService.showError("GLOBAL.INPUT_ERROR");return}let n=y(x({},this.data.participant??new rt),{workshopId:this.data.workshopId,email:this.form.controls.email.value.trim(),firstName:this.form.controls.firstName.value.trim(),lastName:this.form.controls.lastName.value.trim()});this.isSaving=true,(this.isEdit?this.workshopService.updateParticipant(this.data.workshopId,n):this.workshopService.createParticipant(this.data.workshopId,n)).pipe(hr(this.destroyRef)).subscribe({next:a=>{this.snackbarService.showSuccess(this.isEdit?"WORKSHOP.PARTICIPANT.UPDATED":"WORKSHOP.PARTICIPANT.SAVED"),this.isSaving=false,this.cdr.markForCheck(),this.dialogRef.close(a);},error:()=>{this.saveFailed=true,this.isSaving=false,this.cdr.markForCheck();}});}close(){this.dialogRef.close(null);}static{this.\u0275fac=function(e){return new(e||t)(q(M),q(tt),q(d),q(zl),q(Dn$1),q(cr))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-participant-dialog"]],hostBindings:function(e,a){e&1&&pu("keydown",function(C){return a.keypress(C)},BT);},decls:34,vars:23,consts:[["mat-dialog-title",""],[1,"mat-typography","sk-modal"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"sk-w-100",3,"formGroup"],[1,"sk-w-100"],["type","email","name","email","formControlName","email","matInput","","autocomplete","off","cdkFocusInitial",""],["type","text","name","firstName","formControlName","firstName","matInput","","autocomplete","off"],["type","text","name","lastName","formControlName","lastName","matInput","","autocomplete","off"],[1,"sk-font-small","sk-text-secondary"],[1,"sk-font-small","sk-text-error"],["align","center"],["mat-flat-button","",1,"sk-button-secondary",3,"click"],["mat-flat-button","",1,"sk-button-primary",2,"margin-left","15px",3,"click"],["color","accent",1,"sk-spinner",3,"diameter"]],template:function(e,a){e&1&&(Zc(0,"h1",0),wA(1),HA(2,"translate"),Up(),Zc(3,"mat-dialog-content",1)(4,"div",2)(5,"div",3)(6,"form",4)(7,"mat-form-field",5)(8,"mat-label"),wA(9),HA(10,"translate"),Up(),fu(11,"input",6),wM(),Qo$1(12,Ni,3,3,"mat-error"),Up(),Zc(13,"mat-form-field",5)(14,"mat-label"),wA(15),HA(16,"translate"),Up(),fu(17,"input",7),wM(),Qo$1(18,Li,3,3,"mat-error"),Up(),Zc(19,"mat-form-field",5)(20,"mat-label"),wA(21),HA(22,"translate"),Up(),fu(23,"input",8),wM(),Qo$1(24,Hi,3,3,"mat-error"),Up(),Qo$1(25,Fi,3,3,"p",9),Qo$1(26,Ki,3,3,"p",10),Up()()()(),Zc(27,"mat-dialog-actions",11)(28,"button",12),pu("click",function(){return a.close()}),wA(29),HA(30,"translate"),Up(),Zc(31,"button",13),pu("click",function(){return a.save()}),Qo$1(32,Vi,3,3,"span"),Qo$1(33,Ui,1,1,"mat-spinner",14),Up()()),e&2&&(qo$1(),jD($A(2,13,a.isEdit?"WORKSHOP.PARTICIPANT.EDIT":"WORKSHOP.PARTICIPANT.ADD")),qo$1(5),hD("formGroup",a.form),qo$1(3),jD($A(10,15,"WORKSHOP.PARTICIPANT.EMAIL")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.email.errors?12:-1),qo$1(3),jD($A(16,17,"WORKSHOP.PARTICIPANT.FIRST_NAME")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.firstName.errors?18:-1),qo$1(3),jD($A(22,19,"WORKSHOP.PARTICIPANT.LAST_NAME")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.lastName.errors?24:-1),qo$1(),Xo$1(a.isEdit?-1:25),qo$1(),Xo$1(a.saveFailed?26:-1),qo$1(3),Wp(" ",$A(30,21,"GLOBAL.CLOSE")," "),qo$1(3),Xo$1(a.isSaving?-1:32),qo$1(),Xo$1(a.isSaving?33:-1));},dependencies:[Kt,Qt,jl,Nl,In$1,Vl,Pl,Hl,Bo$1,To$1,gs,Ri$1,Ne,hs,Yt,g7,K,B7],encapsulation:2});}};var Gi=t=>({maxLength:t}),Jt=t=>({date:t}),zi=()=>["fas","clock"],Zt=()=>["fas","paper-plane"],ji=(t,n)=>({count:t,date:n}),$i=t=>({count:t});function qi(t,n){t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ERRORS.INPUT.REQUIRED")));}function Yi(t,n){if(t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2){let e=K0();qo$1(),jD(zA(2,1,"ERRORS.INPUT.MAX_CHAR",PA(4,Gi,e.subjectMaxLength)));}}function Qi(t,n){t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ERRORS.INPUT.REQUIRED")));}function Xi(t,n){t&1&&(Zc(0,"p",17),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.BROADCAST.PLANNED_DATE_REQUIRED")));}function Ji(t,n){if(t&1&&(Zc(0,"p",18),wA(1),HA(2,"localizedDate"),HA(3,"translate"),Up()),t&2){let e=K0();qo$1(),Wp(" ",zA(3,4,"WORKSHOP.BROADCAST.SENT_LOCKED",PA(7,Jt,zA(2,1,e.data.broadcast?.sentDate,"short")))," ");}}function Zi(t,n){t&1&&(fu(0,"fa-icon",23),Zc(1,"span"),wA(2),HA(3,"localizedDate"),HA(4,"translate"),Up()),t&2&&(hD("icon",LA(8,zi)),qo$1(2),jD(zA(4,5,"WORKSHOP.BROADCAST.SCHEDULE_HINT_PLANNED",PA(9,Jt,zA(3,2,n,"short")))));}function en(t,n){t&1&&(Zc(0,"span"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.BROADCAST.SCHEDULE_HINT_DRAFT")));}function tn(t,n){t&1&&(Zc(0,"p",22),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.BROADCAST.
1NOT_RELEASED_HINT")));}function nn(t,n){t&1&&(Zc(0,"p",22),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.BROADCAST.NO_RECIPIENTS")));}function on(t,n){if(t&1&&(Zc(0,"p",21),Qo$1(1,Zi,5,11)(2,en,3,3,"span"),Up(),Zc(3,"p",18),wA(4),HA(5,"translate"),Up(),Qo$1(6,tn,3,3,"p",22),Qo$1(7,nn,3,3,"p",22)),t&2){let e,a=K0();Sn$1("broadcast-dialog__schedule--planned",a.plannedAt()),qo$1(),Xo$1((e=a.plannedAt())?1:2,e),qo$1(3),jD($A(5,6,"WORKSHOP.BROADCAST.HINT")),qo$1(2),Xo$1(a.data.published?-1:6),qo$1(),Xo$1(a.hasRecipients?-1:7);}}function an(t,n){if(t&1&&(Zc(0,"span"),wA(1),HA(2,"localizedDate"),HA(3,"translate"),Up()),t&2){let e=K0(2);qo$1(),jD(zA(3,4,"WORKSHOP.BROADCAST.SEND_NOW_CONFIRM_PLANNED",FA(7,ji,e.data.confirmedCount,zA(2,1,n,"short"))));}}function rn(t,n){if(t&1&&(Zc(0,"span"),wA(1),HA(2,"translate"),Up()),t&2){let e=K0(2);qo$1(),jD(zA(2,1,"WORKSHOP.BROADCAST.SEND_NOW_CONFIRM",PA(4,$i,e.data.confirmedCount)));}}function ln(t,n){t&1&&(Zc(0,"span"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.BROADCAST.SEND_NOW")));}function pn(t,n){t&1&&fu(0,"mat-spinner",28),t&2&&hD("diameter",20);}function sn(t,n){if(t&1){let e=$0();Zc(0,"div",20)(1,"p",24),fu(2,"fa-icon",23),Qo$1(3,an,4,10,"span")(4,rn,3,6,"span"),Up(),Zc(5,"div",25)(6,"button",26),pu("click",function(){nv(e);let c=K0();return rv(c.cancelSend())}),wA(7),HA(8,"translate"),Up(),Zc(9,"button",27),pu("click",function(){nv(e);let c=K0();return rv(c.sendNow())}),Qo$1(10,ln,3,3,"span")(11,pn,1,1,"mat-spinner",28),Up()()();}if(t&2){let e,a=K0();qo$1(2),hD("icon",LA(8,Zt)),qo$1(),Xo$1((e=a.plannedAt())?3:4,e),qo$1(3),hD("disabled",a.isSending),qo$1(),Wp(" ",$A(8,6,"GLOBAL.CANCEL")," "),qo$1(2),hD("disabled",a.isSending),qo$1(),Xo$1(a.isSending?11:10);}}function cn(t,n){t&1&&(Zc(0,"span"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"GLOBAL.SAVE")));}function dn(t,n){t&1&&fu(0,"mat-spinner",28),t&2&&hD("diameter",20);}function mn(t,n){if(t&1){let e=$0();Zc(0,"button",30),pu("click",function(){nv(e);let c=K0(2);return rv(c.askSend())}),fu(1,"fa-icon",23),Zc(2,"span"),wA(3),HA(4,"translate"),Up()(),Zc(5,"button",31),pu("click",function(){nv(e);let c=K0(2);return rv(c.save())}),Qo$1(6,cn,3,3,"span"),Qo$1(7,dn,1,1,"mat-spinner",28),Up();}if(t&2){let e=K0(2);hD("disabled",!e.hasRecipients||e.isSaving),qo$1(),hD("icon",LA(7,Zt)),qo$1(2),jD($A(4,5,"WORKSHOP.BROADCAST.SEND_NOW")),qo$1(3),Xo$1(e.isSaving?-1:6),qo$1(),Xo$1(e.isSaving?7:-1);}}function _n(t,n){if(t&1){let e=$0();Zc(0,"button",29),pu("click",function(){nv(e);let c=K0();return rv(c.close())}),wA(1),HA(2,"translate"),Up(),Qo$1(3,mn,8,8);}if(t&2){let e=K0();qo$1(),Wp(" ",$A(2,2,"GLOBAL.CLOSE")," "),qo$1(2),Xo$1(e.readonly_?-1:3);}}function un(t){let n=t.get("plannedDate")?.value;return t.get("plannedTime")?.value&&!n?{plannedDateRequired:true}:null}var pt=class t{constructor(n,e,a,c,C,W){this.dialogRef=n;this.data=e;this.workshopService=a;this.formBuilder=c;this.snackbarService=C;this.cdr=W;this.subjectMaxLength=255;this.timeInterval="15m";this.isEdit=false;this.readonly_=false;this.formSubmitted=false;this.isSaving=false;this.confirmSend=false;this.isSending=false;this.plannedAt=V(null);this.persisted=null;this.destroyRef=p(le);}keypress(n){n.key==="Enter"&&!this.confirmSend&&n.target?.tagName!=="TEXTAREA"&&this.save();}get hasRecipients(){return this.data.confirmedCount>0}ngOnInit(){let n=this.data.broadcast;this.persisted=n,this.isEdit=n!=null,this.readonly_=n?.status==="SENT",this.form=this.formBuilder.group({subject:[n?.subject??"",[ui$1.required,ui$1.maxLength(this.subjectMaxLength)]],body:[n?.body??"",ui$1.required],plannedDate:[d$1(n?.plannedDate)],plannedTime:[d$1(n?.plannedDate)]},{validators:un}),this.form.valueChanges.pipe(hr(this.destroyRef)).subscribe(()=>this.readPlannedAt()),this.readPlannedAt(),this.readonly_&&this.form.disable();}save(){if(this.isSaving||this.isSending||this.readonly_)return;let n=this.readForm();n&&(this.isSaving=true,this.persist(n).pipe(hr(this.destroyRef)).subscribe({next:e=>{this.snackbarService.showSuccess(this.isEdit?"WORKSHOP.BROADCAST.UPDATED":"WORKSHOP.BROADCAST.SAVED"),this.isSaving=false,this.cdr.markForCheck(),this.dialogRef.close(e);},error:()=>{this.isSaving=false,this.cdr.markForCheck();}}));}askSend(){this.isSaving||this.isSending||this.readonly_||!this.hasRecipients||!this.readForm(true)||(this.confirmSend=true);}cancelSend(){this.confirmSend=false;}sendNow(){if(this.isSending)return;let n=this.readForm(true);if(!n){this.confirmSend=false;return}this.isSending=true,this.persist(n).pipe(Me$1(e=>this.workshopService.sendBroadcast(this.data.workshopId,e.id)),hr(this.destroyRef)).subscribe({next:e=>{this.snackbarService.showSuccess("WORKSHOP.BROADCAST.SENT_NOW"),this.isSending=false,this.cdr.markForCheck(),this.dialogRef.close(e);},error:()=>{this.isSending=false,this.confirmSend=false,this.cdr.markForCheck();}});}close(){this.dialogRef.close(this.persisted!==this.data.broadcast?this.persisted:null);}readForm(n=false){if(this.formSubmitted=true,n?this.form.controls.subject.invali
1d||this.form.controls.body.invalid:this.form.invalid)return this.snackbarService.showError("GLOBAL.INPUT_ERROR"),null;let a=this.plannedAt();return y(x({},this.persisted??new ot),{workshopId:this.data.workshopId,subject:this.form.controls.subject.value.trim(),body:this.form.controls.body.value,plannedDate:a,status:a?"PLANNED":"DRAFT"})}readPlannedAt(){let{plannedDate:n,plannedTime:e}=this.form.getRawValue();this.plannedAt.set(i(n,e));}persist(n){let e=n.status;return (this.persisted?this.workshopService.updateBroadcast(this.data.workshopId,n):this.workshopService.createBroadcast(this.data.workshopId,n).pipe(Me$1(c=>c.status===e?C$1(c):this.workshopService.updateBroadcast(this.data.workshopId,y(x({},c),{status:e}))))).pipe(Ae$1(c=>this.persisted=c))}static{this.\u0275fac=function(e){return new(e||t)(q(M),q(tt),q(d),q(zl),q(Dn$1),q(cr))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-broadcast-dialog"]],hostBindings:function(e,a){e&1&&pu("keydown",function(C){return a.keypress(C)},BT);},features:[kA(hi$1)],decls:43,vars:27,consts:[["plannedDatePicker",""],["plannedTimePicker",""],["mat-dialog-title",""],[1,"mat-typography","sk-modal"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"sk-w-100",3,"formGroup"],[1,"sk-w-100"],["type","text","name","subject","formControlName","subject","matInput","","cdkFocusInitial",""],["name","body","formControlName","body","matInput","","rows","10"],[1,"broadcast-dialog__row"],[1,"broadcast-dialog__date"],["name","plannedDate","formControlName","plannedDate","matInput","",3,"click","matDatepicker"],["matIconSuffix","",3,"for"],[1,"broadcast-dialog__time"],["name","plannedTime","formControlName","plannedTime","matInput","",3,"matTimepicker"],[3,"interval"],[1,"sk-text-error","sk-font-small",2,"margin-top","0"],[1,"sk-font-small","sk-text-secondary"],["align","center",1,"broadcast-dialog__actions"],[1,"broadcast-dialog__confirm"],[1,"sk-font-small","broadcast-dialog__schedule"],[1,"sk-font-small","sk-text-warn"],[3,"icon"],[1,"broadcast-dialog__confirm-text"],[1,"broadcast-dialog__confirm-buttons"],["mat-flat-button","",1,"sk-button-secondary",3,"click","disabled"],["mat-flat-button","",1,"sk-button-primary",3,"click","disabled"],["color","accent",1,"sk-spinner",3,"diameter"],["mat-flat-button","",1,"sk-button-secondary",3,"click"],["mat-flat-button","",1,"sk-button-secondary","broadcast-dialog__send",3,"click","disabled"],["mat-flat-button","",1,"sk-button-primary",3,"click"]],template:function(e,a){if(e&1){let c=$0();Zc(0,"h1",2),wA(1),HA(2,"translate"),Up(),Zc(3,"mat-dialog-content",3)(4,"div",4)(5,"div",5)(6,"form",6)(7,"mat-form-field",7)(8,"mat-label"),wA(9),HA(10,"translate"),Up(),fu(11,"input",8),wM(),Qo$1(12,qi,3,3,"mat-error"),Qo$1(13,Yi,3,6,"mat-error"),Up(),Zc(14,"mat-form-field",7)(15,"mat-label"),wA(16),HA(17,"translate"),Up(),fu(18,"textarea",9),wM(),Qo$1(19,Qi,3,3,"mat-error"),Up(),Zc(20,"div",10)(21,"mat-form-field",11)(22,"mat-label"),wA(23),HA(24,"translate"),Up(),Zc(25,"input",12),pu("click",function(){nv(c);let W=J0(28);return rv(W.open())}),Up(),wM(),fu(26,"mat-datepicker-toggle",13)(27,"mat-datepicker",null,0),Up(),Zc(29,"mat-form-field",14)(30,"mat-label"),wA(31),HA(32,"translate"),Up(),fu(33,"input",15),wM(),fu(34,"mat-timepicker-toggle",13)(35,"mat-timepicker",16,1),Up()(),Qo$1(37,Xi,3,3,"p",17),Qo$1(38,Ji,4,9,"p",18)(39,on,8,8),Up()()()(),Zc(40,"mat-dialog-actions",19),Qo$1(41,sn,12,9,"div",20)(42,_n,4,4),Up();}if(e&2){let c=J0(28),C=J0(36);qo$1(),Wp(" ",$A(2,17,a.readonly_?"WORKSHOP.BROADCAST.VIEW":a.isEdit?"WORKSHOP.BROADCAST.EDIT":"WORKSHOP.BROADCAST.ADD"),`
2`),qo$1(5),hD("formGroup",a.form),qo$1(3),jD($A(10,19,"WORKSHOP.BROADCAST.SUBJECT")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.subject.hasError("required")?12:-1),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.subject.hasError("maxlength")?13:-1),qo$1(3),jD($A(17,21,"WORKSHOP.BROADCAST.BODY")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.body.hasError("required")?19:-1),qo$1(4),jD($A(24,23,"WORKSHOP.BROADCAST.SCHEDULE_DATE")),qo$1(2),hD("matDatepicker",c),CM(),qo$1(),hD("for",c),qo$1(5),jD($A(32,25,"WORKSHOP.BROADCAST.PLANNED_TIME")),qo$1(2),hD("matTimepicker",C),CM(),qo$1(),hD("for",C),qo$1(),hD("interval",a.timeInterval),qo$1(2),Xo$1(a.formSubmitted&&!a.confirmSend&&a.form.hasError("plannedDateRequired")?37:-1),qo$1(),Xo$1(a.readonly_?38:39),qo$1(3),Xo$1(a.confirmSend?41:42);}},dependencies:[Kt,Qt,jl,Nl,In$1,Vl,Pl,Hl,Bo$1,To$1,gs,Ri$1,Ne,hs,us,oi$1,ut,li$1,pi,mi$1,ui$2,Yt,g7,K,As,B7,c$1],styles:[".broadcast-dialog__row[_ngcontent-%COMP%]{display:flex;gap:12px}.broadcast-dialog__row[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{min-width:0}.broadcast-dialog__row[_ngcontent-%COMP%]   .broadcast-dialog__date[_ngcontent-%COMP%]{flex:2 1 0}.broadcast-dialog__row[_ngcontent-%COMP%]   .broadcast-dialog__time[_ngcontent-%COMP%]{flex:1 1 0}@media(max-width:600px){.broadcast-dialog__row[_ngcontent-%COMP%]{flex-direction:column;gap:0}}.broadcast-dialog__actions[_ngcontent-%COMP%]{gap:10px;flex-wrap:wrap}.broadcast-dialog__send[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:8px}.broadcast-dialog__send[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.broadcast-dialog__schedule[_ngcontent-%COMP%]{margin-top:0;display:flex;align-items:flex-start;gap:6px;color:#979bbf}.broadcast-dialog__schedule--planned[_ngcontent-%COMP%]{color:#140d69}.broadcast-dialog__schedule[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-top:1px;color:#f98d2b}.broadcast-dialog__confirm[_ngcontent-%COMP%]{flex:1 1 100%;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-radius:10px;background:#f98d2b1a}@media(max-width:600px){.broadcast-dialog__confirm[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}}.broadcast-dialog__confirm-text[_ngcontent-%COMP%]{margin:0;display:flex;align-items:flex-start;gap:10px;font-size:.9rem;color:#140d69}.broadcast-dialog__confirm-text[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-top:2px;color:#f98d2b}.broadcast-dialog__confirm-buttons[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;justify-content:flex-end;
2gap:8px}"]});}};var st=class{constructor(){this.id=null;this.speaker=null;this.description=null;this.startDate=null;this.endDate=null;this.accessLink=null;this.sortOrder=null;this.hasPicture=false;}};var fn=()=>["fas","upload"],ei=t=>({maxLength:t}),hn=()=>["fas","image"],Cn=()=>["fas","trash"];function gn(t,n){t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"ERRORS.INPUT.REQUIRED")));}function kn(t,n){if(t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2){let e=K0();qo$1(),jD(zA(2,1,"ERRORS.INPUT.MAX_CHAR",PA(4,ei,e.titleMaxLength)));}}function xn(t,n){if(t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2){let e=K0();qo$1(),jD(zA(2,1,"ERRORS.INPUT.MAX_CHAR",PA(4,ei,e.speakerMaxLength)));}}function bn(t,n){t&1&&(Zc(0,"p",22),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.DATE_RANGE_ERROR")));}function vn(t,n){t&1&&(Zc(0,"p",22),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.TIME_WITHOUT_DATE_ERROR")));}function Sn(t,n){if(t&1&&fu(0,"img",26),t&2){let e=K0();hD("src",n,eb)("alt",e.form.controls.title.value);}}function On(t,n){t&1&&fu(0,"fa-icon",27),t&2&&hD("icon",LA(1,hn));}function yn(t,n){t&1&&(Zc(0,"div",28),fu(1,"mat-spinner",37),Up()),t&2&&(qo$1(),hD("diameter",28));}function En(t,n){if(t&1){let e=$0();Zc(0,"button",38),HA(1,"translate"),pu("click",function(){nv(e);let c=K0();return rv(c.deletePicture())}),fu(2,"fa-icon",39),Up();}if(t&2){let e=K0();hD("disabled",e.pictureBusy())("matTooltip",$A(1,3,"WORKSHOP.PICTURE.DELETE")),qo$1(2),hD("icon",LA(5,Cn));}}function Dn(t,n){t&1&&(Zc(0,"span"),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"GLOBAL.SAVE")));}function Pn(t,n){t&1&&fu(0,"mat-spinner",36),t&2&&hD("diameter",20);}var Tn=["image/jpeg","image/png"],ct=class t{constructor(n,e,a,c,C,W){this.dialogRef=n;this.data=e;this.workshopService=a;this.formBuilder=c;this.snackbarService=C;this.cdr=W;this.titleMaxLength=255;this.speakerMaxLength=255;this.accessLinkMaxLength=1e3;this.timeInterval="15m";this.isEdit=false;this.formSubmitted=false;this.isSaving=false;this.module=V(null);this.pendingPicture=V(null);this.hasPicture=Pt(()=>!!this.module()?.hasPicture||!!this.pendingPicture());this.pictureUrl=V(null);this.pictureBusy=V(false);this.result=null;this.destroyRef=p(le);this.dialog=p(Pe);this.destroyRef.onDestroy(()=>this.revokePicture());}keypress(n){if(n.key!=="Enter"||n.target?.tagName==="TEXTAREA")return;let e=this.dialog.openDialogs;e[e.length-1]===this.dialogRef&&this.save();}ngOnInit(){let n=this.data.module;this.module.set(n),this.isEdit=n!=null,this.form=this.formBuilder.group({title:[n?.title??"",[ui$1.required,ui$1.pattern(/\S/),ui$1.maxLength(this.titleMaxLength)]],speaker:[n?.speaker??"",ui$1.maxLength(this.speakerMaxLength)],description:[n?.description??""],startDate:[d$1(n?.startDate)],startTime:[d$1(n?.startDate)],endDate:[d$1(n?.endDate)],endTime:[d$1(n?.endDate)],accessLink:[n?.accessLink??"",ui$1.maxLength(this.accessLinkMaxLength)]},{validators:Pt$1}),n?.hasPicture&&this.loadPicture();}save(){if(this.isSaving)return;if(this.formSubmitted=true,this.form.invalid){this.snackbarService.showError("GLOBAL.INPUT_ERROR");return}let n=this.form.value,e=y(x({},this.module()??new st),{workshopId:this.data.workshopId,title:n.title.trim(),speaker:n.speaker?.trim()||null,description:n.description?.trim()||null,startDate:i(n.startDate,n.startTime),endDate:i(n.endDate,n.endTime),accessLink:n.accessLink?.trim()||null});this.isSaving=true,(this.isEdit?this.workshopService.updateModule(this.data.workshopId,e):this.workshopService.createModule(this.data.workshopId,e)).pipe(hr(this.destroyRef)).subscribe({next:c=>{this.snackbarService.showSuccess(this.isEdit?"WORKSHOP.MODULE.UPDATED":"WORKSHOP.MODULE.SAVED");let C=this.pendingPicture();if(!this.isEdit&&C){this.uploadPendingPicture(c,C);return}this.isSaving=false,this.cdr.markForCheck(),this.dialogRef.close(c);},error:()=>{this.isSaving=false,this.cdr.markForCheck();}});}uploadPendingPicture(n,e){this.workshopService.uploadModulePicture(this.data.workshopId,n.id,e).pipe(pn$1(()=>{this.isSaving=false,this.cdr.markForCheck();}),hr(this.destroyRef)).subscribe({next:a=>this.dialogRef.close(a),error:()=>{this.applyPictureResult(n),this.isEdit=true,this.pendingPicture.set(null),this.revokePicture
2();}});}close(){this.dialogRef.close(this.result);}uploadPicture(){this.pickPicture().subscribe(n=>{if(!this.isEdit){this.stagePicture(n);return}this.pictureBusy.set(true),this.workshopService.uploadModulePicture(this.data.workshopId,this.module().id,n).pipe(pn$1(()=>this.pictureBusy.set(false)),hr(this.destroyRef)).subscribe(e=>{this.applyPictureResult(e),this.loadPicture(),this.snackbarService.showSuccess("WORKSHOP.PICTURE.SAVED");});});}deletePicture(){if(!this.isEdit){this.pendingPicture.set(null),this.revokePicture();return}this.dialog.open(L).afterClosed().pipe(oe(n=>!!n),Me$1(()=>this.workshopService.deleteModulePicture(this.data.workshopId,this.module().id)),hr(this.destroyRef)).subscribe(n=>{this.applyPictureResult(n),this.revokePicture(),this.snackbarService.showWarn("WORKSHOP.PICTURE.DELETED");});}applyPictureResult(n){this.module.set(n),this.result=n;}pickPicture(){return this.dialog.open(V$1).afterClosed().pipe(U(n=>n?.[0]),oe(n=>!!n&&this.isAllowedPicture(n)),hr(this.destroyRef))}isAllowedPicture(n){return Tn.includes(n.type)?n.size>b4.mediaFileMaxSize?(this.snackbarService.showError("WORKSHOP.PICTURE.TOO_LARGE"),false):true:(this.snackbarService.showError("HTTP_STATUS.WRONG_FILE_TYPE"),false)}stagePicture(n){this.revokePicture(),this.pendingPicture.set(n),this.pictureUrl.set(URL.createObjectURL(n));}loadPicture(){this.workshopService.getModulePicture(this.data.workshopId,this.module().id).pipe(hr(this.destroyRef)).subscribe(n=>{this.revokePicture(),this.pictureUrl.set(URL.createObjectURL(n));});}revokePicture(){let n=this.pictureUrl();n&&(URL.revokeObjectURL(n),this.pictureUrl.set(null));}static{this.\u0275fac=function(e){return new(e||t)(q(M),q(tt),q(d),q(zl),q(Dn$1),q(cr))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-module-dialog"]],hostBindings:function(e,a){e&1&&pu("keydown",function(C){return a.keypress(C)},BT);},features:[kA(hi$1)],decls:85,vars:63,consts:[["startDatePicker",""],["startTimePicker",""],["endDatePicker",""],["endTimePicker",""],["mat-dialog-title",""],[1,"mat-typography","sk-modal"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"sk-w-100",3,"formGroup"],[1,"sk-w-100"],["type","text","name","title","formControlName","title","matInput","","cdkFocusInitial",""],["type","text","name","speaker","formControlName","speaker","matInput","","autocomplete","off"],["name","description","formControlName","description","matInput","","rows","4"],[1,"module-dialog__row"],[1,"module-dialog__date"],["name","startDate","formControlName","startDate","matInput","",3,"click","matDatepicker"],["matIconSuffix","",3,"for"],[1,"module-dialog__time"],["name","startTime","formControlName","startTime","matInput","",3,"matTimepicker"],[3,"interval"],["name","endDate","formControlName","endDate","matInput","",3,"click","matDatepicker","min"],["name","endTime","formControlName","endTime","matInput","",3,"matTimepicker"],[1,"sk-text-error","sk-font-small","module-dialog__hint"],[1,"module-picture"],[1,"module-picture__label"],[1,"picture"],[3,"src","alt"],[3,"icon"],[1,"picture__busy"],[1,"sk-font-small","sk-text-secondary","picture__hint"],[1,"picture__actions"],["mat-flat-button","","type","button",1,"sk-button-secondary",3,"click","disabled"],["mat-icon-button","","type","button",1,"sk-icon-button",3,"disabled","matTooltip"],["align","center"],["mat-flat-button","",1,"sk-button-secondary",3,"click"],["mat-flat-button","",1,"sk-button-primary",2,"margin-left","15px",3,"click"],["color","accent",1,"sk-spinner",3,"diameter"],[3,"diameter"],["mat-icon-button","","type","button",1,"sk-icon-button",3,"click","disabled","matTooltip"],[1,"sk-text-error",3,"icon"]],template:function(e,a){if(e&1){let c=$0();Zc(0,"h1",4),wA(1),HA(2,"translate"),Up(),Zc(3,"mat-dialog-content",5)(4,"div",6)(5,"div",7)(6,"form",8)(7,"mat-form-field",9)(8,"mat-label"),wA(9),HA(10,"translate"),Up(),fu(11,"input",10),wM(),Qo$1(12,gn,3,3,"mat-error"),Qo$1(13,kn,3,6,"mat-error"),Up(),Zc(14,"mat-form-field",9)(15,"mat-label"),wA(16),HA(17,"translate"),Up(),fu(18,"input",11),wM(),Qo$1(19,xn,3,6,"mat-error"),Up(),Zc(20,"mat-form-field",9)(21,"mat-label"),wA(22),HA(23,"translate"),Up(),fu(24,"textarea",12),wM(),Up(),Zc(25,"div",13)(26,"mat-form-field",14)(27,"mat-label"),wA(28),HA(29,"translate"),Up(),Zc(30,"input",15),pu("click",function(){nv(c);let W=J0(33);return rv(W.open())}),Up(),wM(),fu(31,"mat-datepicker-toggle",16)(32,"mat-datepicker",null,0),Up(),Zc(34,"mat-form-field",17)(35,"mat-label"),wA(36),HA(37,"translate"),Up(),fu(38,"input",18),wM(),fu(39,"mat-timepicker-toggle",16)(40,"mat-timepicker",19,1),Up()(),Zc(42,"div",13)(43,"mat-form-field",14)(44,"mat-label"),wA(45),HA(46,"translate"),Up(),Zc(47,"input",20),pu("click",function(){nv(c);let W=J0(50);return rv(W.open())}),Up(),wM(),fu(48,"mat-datepicker-toggle",16)(49,"mat-datepicker",null,2),Up(),Zc(51,"mat-form-field",17)(52,"mat-label"),wA(53),HA(54,"translate"),Up(),fu(55,"input",21),wM(),fu(56,"mat-timepicker-toggle",16)(57,"mat-timepicker",19,3),Up()(),Qo$1(59,bn,3,3,"p",22),Qo$1(60,vn,3,3,"p",22),Zc(61,"div",23)(62,"p",24),wA(63),HA(64,"translate"),Up(),Zc(65,"div",25),Qo$1(66,Sn,1,2,"img",26)(67,On,1,2,"fa-icon",27),Qo$1(68,yn,2,1,"div",28),Up(),Zc(69,"p",29),wA(70),HA(71,"translate"),Up(),Zc(72,"div",30)(73,"button",31),pu("click",function(){return a.uploadPicture()}),fu(74,"fa-icon",27),wA(75),HA(76,"translate"),Up(),Qo$1(77,En,3,6,"button",32),Up()()()()()(),Zc(78,"mat-dialog-actions",33)(79,"button",34),pu("click",function(){return a.close()}),wA(80),HA(81,"translate"),Up(),Zc(82,"button",35),pu("click",function(){return a.save()}),Qo$1(83,Dn,3,3,"span"),Qo$1(84,Pn,1,1,"mat-spinner",36),Up()();}if(e&2){let c,C=J0(33),W=J0(41),Oe=J0(50),K=J0(58);qo$1(),jD($A(2,38,a.isEdit?"WORKSHOP.MODULE.EDIT":"WORKSHOP.MODULE.ADD")),qo$1(5),hD("formGroup",a.form),qo$1(3),jD($A(10,40,"WORKSHOP.MODULE.NAME")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&(a.form.controls.title.hasError("required")||a.form.controls.title.hasError("pattern"))?12:-1),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.title.hasError("maxlength")?13:-1),qo$1(3),jD($A(17,42,"WORKSHOP.MODULE.SPEAKER")),qo$1(2),CM(),qo$1(),Xo$1(a.formSubmitted&&a.form.controls.speaker.hasError("maxlength")?19:-1),qo$1(3),jD($A(23,44,"WORKSHOP.DESCRIPTION")),qo$1(2),CM(),qo$1(4),jD($A(29,46,"WORKSHOP.START_DATE")),qo$1(2),hD("matDatepicker",C),CM(),qo$1(),hD("for",C),qo$1(5),jD($A(37,48,"WORKSHOP.START_TIME")),qo$1(2),hD("matTimepicker",W),CM(),qo$1(),hD("for",W),qo$1(),hD("interval",a.timeInterval),qo$1(5),jD($A(46,50,"WORKSHOP.END_DATE")),qo$1(2),hD("matDatepicker",Oe)("min",a.form.controls.startDate.value),CM(),qo$1(),hD("for",Oe),qo$1(5),jD($A(54,52,"WORKSHOP.END_TIME")),qo$1(2),hD("matTimepicker",K),CM(),qo$1(),hD("for",K),qo$1(),hD("interval",a.timeInterval),qo$1(2),Xo$1(a.formSubmitted&&a.form.hasError("dateRange")?59:-1),qo$1(),Xo$1(a.formSubmitted&&a.form.hasError("timeWithoutDate")?60:-1),qo$1(3),jD($A(64,54,"WORKSHOP.MODULE.PICTURE")),qo$1(2),Sn$1("picture--empty",!a.pictureUrl()),qo$1(),Xo$1((c=a.pictureUrl())?66:67,c),qo$1(2),Xo$1(a.pictureBusy()?68:-1),qo$1(2),Wp(" ",$A(71,56,a.isEdit?"WORKSHOP.PICTURE.HINT":"WORKSHOP.MODULE.PICTURE_ON_SAVE")," "),qo$1(3),hD("disabled",a.pictureBusy()),qo$1(),hD("icon",LA(62,fn)),qo$1(),Wp(" ",$A(76,58,a.hasPicture()?"WORKSHOP.PICTURE.REPLACE":"WORKSHOP.PICTURE.UPLOAD")," "),qo$1(2),Xo$1(a.hasPicture()?77:-1),qo$1(3),Wp(" ",$A(81,60,"GLOBAL.CLOSE")," "),qo$1(3),Xo$1(a.isSaving?-1:83),qo$1(),Xo$1(a.isSaving?84:-1);}},dependencies:[Kt,Qt,jl,Nl,In$1,Vl,Pl,Hl,Bo$1,To$1,gs,Ri$1,Ne,hs,us,oi$1,ut,li$1,pi,mi$1,ui$2,Yt,g7,Tk,po$1,K,As,B7],styles:['@charset "UTF-8";.module-dialog__row[_ngcontent-%COMP%]{display:flex;gap:12px}.module-dialog__row[_ngcontent-%COMP%]   mat-form-field[_ngcontent-%COMP%]{min-width:0}.module-dialog__row[_ngcontent-%COMP%]   .module-dialog__date[_ngcontent-%COMP%]{flex:2 1 0}.module-dialog__row[_ngcontent-%COMP%]   .module-dialog__time[_ngcontent-%COMP%]{flex:1 1 0}@media(max-width:600px){.module-dialog__row[_ngcontent-%COMP%]{flex-direction:column;gap:0}}.module-dialog__hint[_ngcontent-%COMP%]{margin:4px 0 0}.module-picture[_ngcontent-%COMP%]{margin-top:4px}.module-picture__label[_ngcontent-%COMP%]{margin:0 0 8px;font-size:.75rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:#979bbf}.picture[_ngcontent-%COMP%]{position:relative;width:100%;max-width:360px;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#979bbf14;display:grid;place-items:center}.picture[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.picture[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{font-size:2rem;color:#979bbf73}.picture__busy[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;background:#fff9}.picture__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-top:10px}.picture__actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:6px}.picture__hint[_ngcontent-%COMP%]{margin:8px 0 0}']});}};var Rn=()=>["fas","paper-plane"],wn=()=>["fas","envelope"];function In(t,n){if(t&1&&(Zc(0,"span",5),wA(1),Up()),t&2){let e=K0();qo$1(),jD(e.senderName);}}function Wn(t,n){t&1&&fu(0,"mat-spinner",11),t&2&&hD("diameter",20);}function Mn(t,n){t&1&&(fu(0,"fa-icon",13),Zc(1,"span"),wA(2),HA(3,"translate"),Up()),t&2&&(hD("icon",LA(4,wn)),qo$1(2),jD($A(3,2,"WORKSHOP.MESSAGE.MARK_UNREAD")));}var dt=class t{constructor(n,e){this.dialogRef=n;this.data=e;this.busy=V(false);this.destroyRef=p(le);this.workshopService=p(d);this.translateService=p(Pm);let a=e.message;this.senderName=[a.firstName,a.lastName].filter(C=>!!C?.trim()).join(" ");let c=this.translateService.instant("WORKSHOP.MESSAGE.REPLY_SUBJECT",{title:e.workshopTitle});this.replyLink=`mailto:${encodeURIComponent(a.email)}?subject=${encodeURIComponent(c)}`;}markUnread(){this.busy()||(this.busy.set(true),this.workshopService.setMessageRead(this.data.workshopId,this.data.message.id,false).pipe(pn$1(()=>this.busy.set(false)),hr(this.destroyRef)).subscribe(n=>this.dialogRef.close(n)));}close(){this.dialogRef.close(null);}static{this.\u0275fac=function(e){return new(e||t)(q(M),q(tt))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-message-dialog"]],decls:34,vars:28,consts:[["mat-dialog-title",""],[1,"mat-typography","sk-modal"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"message-dialog__meta"],[1,"message-dialog__sender"],[1,"sk-link",3,"href"],[1,"message-dialog__body"],["align","center",1,"message-dialog__actions"],["mat-flat-button","",1,"sk-button-secondary",3,"click"],["mat-flat-button","",1,"sk-button-secondary",3,"click","disabled"],["color","accent",1,"sk-spinner",3,"diameter"],["mat-flat-button","",1,"sk-button-primary",3,"href"],[3,"icon"]],template:function(e,a){e&1&&(Zc(0,"h1",0),wA(1),HA(2,"translate"),Up(),Zc(3,"mat-dialog-content",1)(4,"div",2)(5,"div",3)(6,"dl",4)(7,"dt"),wA(8),HA(9,"translate"),Up(),Zc(10,"dd"),Qo$1(11,In,2,1,"span",5),Zc(12,"a",6),wA(13),Up()(),Zc(14,"dt"),wA(15),HA(16,"translate"),Up(),Zc(17,"dd"),wA(18),HA(19,"localizedDate"),Up()(),Zc(20,"p",7),wA(21),Up()()()(),Zc(22,"mat-dialog-actions",8)(23,"button",9),pu("click",function(){return a.close()}),wA(24),HA(25,"translate"),Up(),Zc(26,"button",10),pu("click",function(){return a.markUnread()}),Qo$1(27,Wn,1,1,"mat-spinner",11)(28,Mn,4,5),Up(),Zc(29,"a",12),fu(30,"fa-icon",13),Zc(31,"span"),wA(32),HA(33,"translate"),Up()()()),e&2&&(qo$1(),jD($A(2,14,"WORKSHOP.MESSAGE.VIEW")),qo$1(7),jD($A(9,16,"WORKSHOP.MESSAGE.SENDER")),qo$1(3),Xo$1(a.senderName?11:-1),qo$1(),hD("href","mailto:"+a.data.message.email,eb),qo$1(),jD(a.data.message.email),qo$1(2),jD($A(16,18,"WORKSHOP.MESSAGE.RECEIVED_AT")),qo$1(3),jD(zA(19,20,a.data.message.createdDate,"short")),qo$1(3),jD(a.data.message.body),qo$1(3),Wp(" ",$A(25,23,"GLOBAL.CLOSE")," "),qo$1(2),hD("disabled",a.busy()),qo$1(),Xo$1(a.busy()?27:28),qo$1(2),hD("href",a.replyLink,eb),qo$1(),hD("icon",LA(27,Rn)),qo$1(2),jD($A(33,25,"WORKSHOP.MESSAGE.REPLY")));},dependencies:[Kt,Qt,Yt,g7,K,As,B7,c$1],styles:[".message-dialog__meta[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:6px 18px;margin:0 0 16px;font-size:.92rem}.message-dialog__meta[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{color:#979bbf}.message-dialog__meta[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:0;min-width:0;overflow-wrap:anywhere;color:#140d69}.message-dialog__sender[_ngcontent-%COMP%]{display:block;font-weight:600}.message-dialog__body[_ngcontent-%COMP%]{margin:0;padding:14px 16px;border-radius:10px;background:#140d690a;color:#140d69;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.message-dialog__actions[_ngcontent-%COMP%]{gap:10px;flex-wrap:wrap}.message-dialog__actions[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:8px}"]});}};var An=t=>({count:t}),Bn=t=>({maxLength:t}),Nn=()=>["fas","ban"];function Ln(t,n){if(t&1&&(wA(0),HA(1,"translate")),t&2){let e=K0();Wp(" ",zA(1,1,"WORKSHOP.CANCEL_DIALOG.INTRO",PA(4,An,e.data.confirmedCount))," ");}}function Hn(t,n){t&1&&(wA(0),HA(1,"translate")),t&2&&Wp(" ",$A(1,1,"WORKSHOP.CANCEL_DIALOG.INTRO_NONE")," ");}function Fn(t,n){if(t&1&&(Zc(0,"mat-error"),wA(1),HA(2,"translate"),Up()),t&2){let e=K0();qo$1(),jD(zA(2,1,"ERRORS.INPUT.MAX_CHAR",PA(4,Bn,e.messageMaxLength)));}}function Kn(t,n){t&1&&fu(0,"mat-spinner",13),t&2&&hD("diameter",20);}function Vn(t,n){t&1&&(fu(0,"fa-icon",14),Zc(1,"span"),wA(2),HA(3,"translate"),Up()),t&2&&(hD("icon",LA(4,Nn)),qo$1(2),jD($A(3,2,"WORKSHOP.CANCEL_DIALOG.CONFIRM")));}var mt=class t{constructor(n,e){this.dialogRef=n;this.data=e;this.messageMaxLength=N;this.message=new Te("",{nonNullable:true,validators:ui$1.maxLength(N)});this.saving=V(false);this.destroyRef=p(le);this.workshopService=p(d);this.snackbarService=p(Dn$1);}
2confirm(){this.saving()||this.message.invalid||(this.saving.set(true),this.workshopService.cancel(this.data.workshopId,this.message.value.trim()||null).pipe(pn$1(()=>this.saving.set(false)),hr(this.destroyRef)).subscribe(n=>{this.snackbarService.showWarn("WORKSHOP.CANCELLED_SNACK"),this.dialogRef.close(n);}));}close(){this.dialogRef.close(null);}static{this.\u0275fac=function(e){return new(e||t)(q(M),q(tt))};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-cancel-dialog"]],decls:33,vars:25,consts:[["mat-dialog-title",""],[1,"mat-typography","sk-modal"],[1,"sk-page-wrapper"],[1,"sk-page-container"],[1,"cancel-dialog__workshop"],[1,"cancel-dialog__intro"],[1,"sk-w-100"],["matInput","","name","message","rows","5","cdkFocusInitial","",3,"formControl","maxlength"],[1,"sk-font-small","sk-text-warn","cancel-dialog__final"],[1,"sk-font-small","sk-text-secondary"],["align","center"],["mat-flat-button","",1,"sk-button-secondary",3,"click"],["mat-flat-button","",1,"sk-button-error","cancel-dialog__confirm",2,"margin-left","15px",3,"click","disabled"],["color","accent",1,"sk-spinner",3,"diameter"],[3,"icon"]],template:function(e,a){e&1&&(Zc(0,"h1",0),wA(1),HA(2,"translate"),Up(),Zc(3,"mat-dialog-content",1)(4,"div",2)(5,"div",3)(6,"p",4),wA(7),Up(),Zc(8,"p",5),Qo$1(9,Ln,2,6)(10,Hn,2,3),Up(),Zc(11,"mat-form-field",6)(12,"mat-label"),wA(13),HA(14,"translate"),Up(),fu(15,"textarea",7),wM(),Zc(16,"mat-hint"),wA(17),HA(18,"translate"),Up(),Qo$1(19,Fn,3,6,"mat-error"),Up(),Zc(20,"p",8),wA(21),HA(22,"translate"),Up(),Zc(23,"p",9),wA(24),HA(25,"translate"),Up()()()(),Zc(26,"mat-dialog-actions",10)(27,"button",11),pu("click",function(){return a.close()}),wA(28),HA(29,"translate"),Up(),Zc(30,"button",12),pu("click",function(){return a.confirm()}),Qo$1(31,Kn,1,1,"mat-spinner",13)(32,Vn,4,5),Up()()),e&2&&(qo$1(),jD($A(2,13,"WORKSHOP.CANCEL_DIALOG.TITLE")),qo$1(6),jD(a.data.workshopTitle),qo$1(2),Xo$1(a.data.confirmedCount>0?9:10),qo$1(4),jD($A(14,15,"WORKSHOP.CANCEL_DIALOG.MESSAGE")),qo$1(2),hD("formControl",a.message)("maxlength",a.messageMaxLength),CM(),qo$1(2),jD($A(18,17,"WORKSHOP.CANCEL_DIALOG.MESSAGE_HINT")),qo$1(2),Xo$1(a.message.hasError("maxlength")?19:-1),qo$1(2),jD($A(22,19,"WORKSHOP.CANCEL_DIALOG.FINAL")),qo$1(3),jD($A(25,21,"WORKSHOP.CANCEL_DIALOG.BROADCASTS")),qo$1(4),Wp(" ",$A(29,23,"GLOBAL.CLOSE")," "),qo$1(2),hD("disabled",a.saving()),qo$1(),Xo$1(a.saving()?31:32));},dependencies:[Kt,Qt,Yt,jl,In$1,Vl,fo$1,Hl,Po$1,gs,Ri$1,Oi$1,hs,Ne,g7,K,As,B7],styles:[".cancel-dialog__workshop[_ngcontent-%COMP%]{margin:0;font-weight:600;color:#140d69}.cancel-dialog__intro[_ngcontent-%COMP%]{margin:4px 0 16px;color:#979bbf;font-size:.9rem;line-height:1.45}.cancel-dialog__final[_ngcontent-%COMP%]{margin-top:16px}.cancel-dialog__confirm[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:8px}"]});}};var ii=()=>["fas","person-chalkboard"],Un=()=>["fas","calendar-days"],Me=t=>["fas",t],Gn=()=>["fas","link"],zn=()=>["fas","external-link-alt"],jn=()=>["fas","location-dot"],kt=()=>["fas","ban"],ni=t=>({date:t}),$n=()=>["fas","pen-to-square"],qn=()=>["fas","upload"],oi=()=>["fas","image"],Ae=()=>["fas","trash"],ai=()=>["fas","copy"],Yn=()=>["fas","globe"],Qn=()=>["fas","file-csv"],Xn=()=>["fas","user-plus"],ri=()=>["fas","edit"],Jn=()=>["fas","circle-check"],Zn=()=>["fas","hourglass-half"],eo=()=>["fas","plus"],li=()=>["fas","clone"],to=()=>["fas","envelopes-bulk"],io=()=>["fas","eye"],Be=(t,n)=>n.id;function no(t,n){if(t&1&&(wA(0),HA(1,"localizedDate")),t&2){let e=K0(2);Wp(" \u2013 ",zA(1,1,e.endDate,"short")," ");}}function oo(t,n){if(t&1&&(wA(0),HA(1,"localizedDate"),Qo$1(2,no,2,4)),t&2){let e=K0();Wp(" ",zA(1,2,e.startDate,"short")," "),qo$1(2),Xo$1(e.endDate?2:-1);}}function ao(t,n){t&1&&(wA(0),HA(1,"translate")),t&2&&Wp(" ",$A(1,1,"WORKSHOP.DATE_TBA")," ");}function ro(t,n){if(t&1&&(Zc(0,"span",10),fu(1,"fa-icon",5),wA(2),Up()),t&2){let e=K0();qo$1(),hD("icon",LA(2,jn)),qo$1(),Wp(" ",e.location," ");}}function lo(t,n){if(t&1&&(Zc(0,"span",11),fu(1,"fa-icon",5),wA(2),HA(3,"localizedDate"),HA(4,"translate"),Up()),t&2){let e=K0();qo$1(),hD("icon",LA(8,kt)),qo$1(),Wp(" ",zA(4,5,"WORKSHOP.CANCELLED_AT",PA(9,ni,zA(3,2,e.cancelledDate,"short")))," ");}}function po(t,n){if(t&1&&(Zc(0,"span",14),wA(1),Up()),t&2){let e=K0();qo$1(),Wp(" / ",e.maxNumberOfTickets);}}function so(t,n){if(t&1){let e=$0();Zc(0,"button",24),HA(1,"translate"),pu("click",function(){nv(e);let c=K0(2);return rv(c.cancelWorkshop())}),fu(2,"fa-icon",5),Up();}t&2&&(hD("matTooltip",$A(1,2,"WORKSHOP.CANCEL")),qo$1(2),hD("icon",LA(4,kt)));}function co(t,n){if(t&1&&(Zc(0,"span",27),wA(1),Up()),t&2){let e=K0().$implicit,a=K0(2);Sn$1("detail__nav-badge--attention",a.navBadgeAttention(e.id)),qo$1(),jD(n);}}function mo(t,n){if(t&1){let e=$0();Zc(0,"button",25),pu("click",function(){let c=nv(e).$implicit,C=K0(2);return rv(C.setPage(c.id))}),fu(1,"fa-icon",5),Zc(2,"span"),wA(3),HA(4,"translate"),Up(),Qo$1(5,co,2,3,"span",26),Up();}if(t&2){let e,a=n.$implicit,c=K0(2);Sn$1("detail__nav-item--active",c.page()===a.id),qo$1(),hD("icon",a.icon),qo$1(2),jD($A(4,5,a.labelKey)),qo$1(2),Xo$1((e=c.navBadge(a.id))?5:-1,e);}}function _o(t,n){if(t&1&&fu(0,"img",33),t&2){let e=K0(2);hD("src",n,eb)("alt",e.name);}}function uo(t,n){t&1&&fu(0,"fa-icon",5),t&2&&hD("icon",LA(1,oi));}function fo(t,n){t&1&&(Zc(0,"div",34),fu(1,"mat-spinner",44),Up()),t&2&&(qo$1(),hD("diameter",28));}function ho(t,n){if(t&1){let e=$0();Zc(0,"button",45),HA(1,"translate"),pu("click",function(){nv(e);let c=K0(3);return rv(c.deletePicture())}),fu(2,"fa-icon",46),Up();}if(t&2){let e=K0(3);hD("disabled",e.pictureBusy())("matTooltip",$A(1,3,"WORKSHOP.PICTURE.DELETE")),qo$1(2),hD("icon",LA(5,Ae));}}function Co(t,n){if(t&1&&wA(0),t&2){let e=K0(2),a=K0();UD(" ",a.availableTickets()," / ",e.maxNumberOfTickets," ");}}function go(t,n){t&1&&(wA(0),HA(1,"translate")),t&2&&Wp(" ",$A(1,1,"WORKSHOP.TICKETS_UNLIMITED")," ");}function ko(t,n){if(t&1&&(Zc(0,"a",47),wA(1),Up(),Zc(2,"p",48),wA(3),HA(4,"translate"),Up()),t&2){let e=K0(2);hD("href",e.url,eb),qo$1(),jD(e.url),qo$1(2),jD($A(4,3,"WORKSHOP.URL_HINT"));}}function xo(t,n){t&1&&wA(0," - ");}function bo(t,n){t&1&&(Zc(0,"p",51),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.REGISTRATION_CLOSED")));}function vo(t,n){if(t&1){let e=$0();Zc(0,"span",42)(1,"a",47),wA(2),Up(),Zc(3,"button",49),HA(4,"translate"),pu("click",function(){nv(e);let c=K0(3);return rv(c.copyPublicLink())}),fu(5,"fa-icon",50),Up()(),Qo$1(6,bo,3,3,"p",51);}if(t&2){let e=K0(3);qo$1(),hD("href",e.publicLink(),eb),qo$1(),jD(e.publicLink()),qo$1(),hD("matTooltip",$A(4,5,"WORKSHOP.COPY_PUBLIC_LINK")),qo$1(2),hD("icon",LA(7,ai)),qo$1(),Xo$1(e.registrationClosed()?6:-1);}}function So(t,n){t&1&&(Zc(0,"span",41),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.RELEASED_HINT")));}function Oo(t,n){if(t&1){let e=$0();Zc(0,"span",42)(1,"span",52),wA(2),Up(),Zc(3,"button",53),HA(4,"translate"),pu("click",function(){nv(e);let c=K0(3);return rv(c.showAccessCodeCopied())}),fu(5,"fa-icon",50),Up()();}if(t&2){let e=K0(2);qo$1(2),jD(e.accessCode),qo$1(),hD("cdkCopyToClipboard",e.accessCode)("matTooltip",$A(4,4,"GLOBAL.COPY_TO_CLIPBOARD")),qo$1(2),hD("icon",LA(6,ai));}}
2function yo(t,n){t&1&&(Zc(0,"span",41),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.ACCESS_CODE_NONE")));}function Eo(t,n){t&1&&fu(0,"fa-icon",5),t&2&&hD("icon",LA(1,Yn));}function Do(t,n){if(t&1){let e=$0();Zc(0,"button",37),pu("click",function(){nv(e);let c=K0(4);return rv(c.requestApproval())}),wA(1),HA(2,"translate"),Up();}if(t&2){let e=K0(4);hD("disabled",e.publicStateBusy()),qo$1(),Wp(" ",$A(2,2,"WORKSHOP.PUBLICATION_REQUEST")," ");}}function Po(t,n){if(t&1){let e=$0();Zc(0,"button",37),pu("click",function(){nv(e);let c=K0(4);return rv(c.withdrawApprovalRequest())}),wA(1),HA(2,"translate"),Up();}if(t&2){let e=K0(4);hD("disabled",e.publicStateBusy()),qo$1(),Wp(" ",$A(2,2,"WORKSHOP.PUBLICATION_WITHDRAW")," ");}}function To(t,n){if(t&1&&(Zc(0,"span",54)(1,"span",55),Qo$1(2,Eo,1,2,"fa-icon",5),wA(3),HA(4,"translate"),Up(),Qo$1(5,Do,3,4,"button",56)(6,Po,3,4,"button",56),Up(),Zc(7,"p",48),wA(8),HA(9,"translate"),Up()),t&2){let e=K0(2),a=K0();qo$1(),Sn$1("status-chip--requested",e.publicState===a.WorkshopPublicState.REQUESTED)("status-chip--approved",e.publicState===a.WorkshopPublicState.APPROVED),qo$1(),Xo$1(e.publicState===a.WorkshopPublicState.APPROVED?2:-1),qo$1(),Wp(" ",$A(4,8,a.publicStateKey(e.publicState))," "),qo$1(2),Xo$1(a.canRequestApproval()?5:a.canWithdrawApprovalRequest()?6:-1),qo$1(3),Wp(" ",$A(9,10,a.publicStateLocked()?"WORKSHOP.PUBLICATION_LOCKED_HINT":"WORKSHOP.PUBLICATION_HINT")," ");}}function Ro(t,n){t&1&&wA(0," - ");}function wo(t,n){if(t&1&&(Zc(0,"span",43),wA(1),Up()),t&2){let e=K0(2);qo$1(),jD(e.description);}}function Io(t,n){t&1&&(Zc(0,"span",41),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.DETAIL.NO_DESCRIPTION")));}function Wo(t,n){if(t&1){let e=$0();Zc(0,"section")(1,"header",28)(2,"div")(3,"h2"),wA(4),HA(5,"translate"),Up()(),Zc(6,"button",29),pu("click",function(){nv(e);let c=K0(2);return rv(c.openEditDialog())}),fu(7,"fa-icon",5),Zc(8,"span"),wA(9),HA(10,"translate"),Up()()(),Zc(11,"div",30)(12,"div",31)(13,"div",32),Qo$1(14,_o,1,2,"img",33)(15,uo,1,2,"fa-icon",5),Qo$1(16,fo,2,1,"div",34),Up(),Zc(17,"p",35),wA(18),HA(19,"translate"),Up(),Zc(20,"div",36)(21,"button",37),pu("click",function(){nv(e);let c=K0(2);return rv(c.uploadPicture())}),fu(22,"fa-icon",5),wA(23),HA(24,"translate"),Up(),Qo$1(25,ho,3,6,"button",38),Up()(),Zc(26,"div",39)(27,"dl",40)(28,"dt"),wA(29),HA(30,"translate"),Up(),Zc(31,"dd"),wA(32),HA(33,"localizedDate"),HA(34,"translate"),Up(),Zc(35,"dt"),wA(36),HA(37,"translate"),Up(),Zc(38,"dd"),wA(39),HA(40,"localizedDate"),Up(),Zc(41,"dt"),wA(42),HA(43,"translate"),Up(),Zc(44,"dd"),wA(45),Up(),Zc(46,"dt"),wA(47),HA(48,"translate"),Up(),Zc(49,"dd"),Qo$1(50,Co,1,2)(51,go,2,3),Up(),Zc(52,"dt"),wA(53),HA(54,"translate"),Up(),Zc(55,"dd"),Qo$1(56,ko,5,5)(57,xo,1,0),Up(),Zc(58,"dt"),wA(59),HA(60,"translate"),Up(),Zc(61,"dd"),Qo$1(62,vo,7,8)(63,So,3,3,"span",41),Up(),Zc(64,"dt"),wA(65),HA(66,"translate"),Up(),Zc(67,"dd"),Qo$1(68,Oo,6,7,"span",42)(69,yo,3,3,"span",41),Up(),Zc(70,"dt"),wA(71),HA(72,"translate"),Up(),Zc(73,"dd"),Qo$1(74,To,10,12)(75,Ro,1,0),Up(),Zc(76,"dt"),wA(77),HA(78,"translate"),Up(),Zc(79,"dd"),Qo$1(80,wo,2,1,"span",43)(81,Io,3,3,"span",41),Up()()()()();}if(t&2){let e,a=K0(),c=K0();qo$1(4),jD($A(5,30,"WORKSHOP.DETAIL.INFO")),qo$1(3),hD("icon",LA(64,$n)),qo$1(2),jD($A(10,32,"ENTITY.EDIT")),qo$1(4),Sn$1("picture--empty",!c.pictureUrl()),qo$1(),Xo$1((e=c.pictureUrl())?14:15,e),qo$1(2),Xo$1(c.pictureBusy()?16:-1),qo$1(2),jD($A(19,34,"WORKSHOP.PICTURE.HINT")),qo$1(3),hD("disabled",c.pictureBusy()),qo$1(),hD("icon",LA(65,qn)),qo$1(),Wp(" ",$A(24,36,a.hasPicture?"WORKSHOP.PICTURE.REPLACE":"WORKSHOP.PICTURE.UPLOAD")," "),qo$1(2),Xo$1(a.hasPicture?25:-1),qo$1(4),jD($A(30,38,"WORKSHOP.START_DATE")),qo$1(3),jD(a.startDate?zA(33,40,a.startDate,"
2short"):$A(34,43,"WORKSHOP.DATE_TBA")),qo$1(4),jD($A(37,45,"WORKSHOP.END_DATE")),qo$1(3),jD(a.endDate?zA(40,47,a.endDate,"short"):"-"),qo$1(3),jD($A(43,50,"WORKSHOP.LOCATION")),qo$1(3),jD(a.location||"-"),qo$1(2),jD($A(48,52,"WORKSHOP.TICKETS")),qo$1(3),Xo$1(c.availableTickets()!==null?50:51),qo$1(3),jD($A(54,54,"WORKSHOP.URL")),qo$1(3),Xo$1(a.url?56:57),qo$1(3),jD($A(60,56,"WORKSHOP.PUBLIC_LINK")),qo$1(3),Xo$1(a.published?62:63),qo$1(3),jD($A(66,58,"WORKSHOP.ACCESS_CODE")),qo$1(3),Xo$1(a.accessCode?68:69),qo$1(3),jD($A(72,60,"WORKSHOP.PUBLICATION")),qo$1(3),Xo$1(a.publicState?74:75),qo$1(3),jD($A(78,62,"WORKSHOP.DESCRIPTION")),qo$1(3),Xo$1(a.description?80:81);}}function Mo(t,n){if(t&1&&(wA(0),HA(1,"translate")),t&2){let e=K0(3);UD(", ",e.pendingCount()," ",$A(1,2,"WORKSHOP.DETAIL.PENDING"));}}function Ao(t,n){if(t&1&&(wA(0),HA(1,"translate")),t&2){let e=K0(3);UD(", ",e.withdrawnCount()," ",$A(1,2,"WORKSHOP.DETAIL.WITHDRAWN"));}}function Bo(t,n){t&1&&(Zc(0,"th"),wA(1),HA(2,"translate"),Up(),Zc(3,"th",65),wA(4),HA(5,"translate"),Up()),t&2&&(qo$1(),jD($A(2,2,"WORKSHOP.PARTICIPANT.EMAIL")),qo$1(3),jD($A(5,4,"WORKSHOP.PARTICIPANT.REGISTERED_AT")));}function No(t,n){if(t&1&&(Zc(0,"p",66),wA(1),Up()),t&2){let e=K0().$implicit;qo$1(),jD(e.email);}}function Lo(t,n){if(t&1&&(Zc(0,"td")(1,"a",71),wA(2),Up()(),Zc(3,"td"),wA(4),HA(5,"localizedDate"),Up()),t&2){let e=K0().$implicit;qo$1(),hD("href","mailto:"+e.email,eb),qo$1(),jD(e.email),qo$1(2),jD($A(5,3,e.createdDate));}}function Ho(t,n){if(t&1&&(fu(0,"fa-icon",67),HA(1,"localizedDate"),HA(2,"translate")),t&2){let e=K0().$implicit;hD("icon",LA(8,kt))("matTooltip",zA(2,5,"WORKSHOP.PARTICIPANT.WITHDRAWN_AT",PA(9,ni,zA(1,2,e.withdrawnDate,"short"))));}}function Fo(t,n){t&1&&(fu(0,"fa-icon",68),HA(1,"translate")),t&2&&hD("icon",LA(4,Jn))("matTooltip",$A(1,2,"WORKSHOP.PARTICIPANT.CONFIRMED"));}function Ko(t,n){t&1&&(fu(0,"fa-icon",69),HA(1,"translate")),t&2&&hD("icon",LA(4,Zn))("matTooltip",$A(1,2,"WORKSHOP.PARTICIPANT.PENDING"));}function Vo(t,n){if(t&1){let e=$0();Zc(0,"tr",64)(1,"td"),wA(2),Qo$1(3,No,2,1,"p",66),Up(),Qo$1(4,Lo,6,5),Zc(5,"td"),Qo$1(6,Ho,3,11,"fa-icon",67)(7,Fo,2,5,"fa-icon",68)(8,Ko,2,5,"fa-icon",69),Up(),Zc(9,"td")(10,"div",70)(11,"button",49),HA(12,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.editParticipant(c))}),fu(13,"fa-icon",50),Up(),Zc(14,"button",49),HA(15,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.deleteParticipant(c))}),fu(16,"fa-icon",46),Up()()()();}if(t&2){let e=n.$implicit,a=K0(4);qo$1(2),UD(" ",e.firstName," ",e.lastName," "),qo$1(),Xo$1(a.screensizeService.showM?-1:3),qo$1(),Xo$1(a.screensizeService.showM?4:-1),qo$1(2),Xo$1(e.withdrawnDate?6:e.confirmed?7:8),qo$1(5),hD("matTooltip",$A(12,9,"ENTITY.EDIT")),qo$1(2),hD("icon",LA(13,ri)),qo$1(),hD("matTooltip",$A(15,11,"GLOBAL.DELETE")),qo$1(2),hD("icon",LA(14,Ae));}}function Uo(t,n){if(t&1&&(Zc(0,"table",59)(1,"tr",62)(2,"th"),wA(3),HA(4,"translate"),Up(),Qo$1(5,Bo,6,6),Zc(6,"th",63),wA(7),HA(8,"translate"),Up(),fu(9,"th"),Up(),P0(10,Vo,17,15,"tr",64,Be),Up()),t&2){let e=K0(3);qo$1(3),jD($A(4,3,"WORKSHOP.PARTICIPANT.NAME")),qo$1(2),Xo$1(e.screensizeService.showM?5:-1),qo$1(2),jD($A(8,5,"WORKSHOP.PARTICIPANT.STATUS")),qo$1(3),F0(e.participants());}}function Go(t,n){t&1&&(Zc(0,"p",60),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.PARTICIPANT.EMPTY")));}function zo(t,n){if(t&1){let e=$0();Zc(0,"section")(1,"header",28)(2,"div")(3,"h2"),wA(4),HA(5,"translate"),Up(),Zc(6,"p"),wA(7),HA(8,"translate"),Qo$1(9,Mo,2,4),Qo$1(10,Ao,2,4),Up()(),Zc(11,"div",57)(12,"button",58),HA(13,"translate"),pu("click",function(){nv(e);let c=K0(2);return rv(c.exportParticipants())}),fu(14,"fa-icon",5),Zc(15,"span"),wA(16),HA(17,"translate"),Up()(),Zc(18,"button",29),pu("click",function(){nv(e);let c=K0(2);return rv(c.addParticipant())}),fu(19,"fa-icon",5),Zc(20,"span"),wA(21),HA(22,"translate"),Up()()()(),Qo$1(23,Uo,12,7,"table",59)(24,Go,3,3,"p",60),Zc(25,"p",61),wA(26),HA(27,"translate"),Up()();}if(t&2){let e=K0(2);qo$1(4),jD($A(5,13,"WORKSHOP.PARTICIPANT.TITLE")),qo$1(3),UD("",e.confirmedCount()," ",$A(8,15,"WORKSHOP.DETAIL.CONFIRMED")),qo$1(2),Xo$1(e.pendingCount()>0?9:-1),qo$1(),Xo$1(e.withdrawnCount()>0?10:-1),qo$1(2),hD("disabled",e.participants().length===0)("matTooltip",$A(13,17,"WORKSHOP.PARTICIPANT.EXPORT_HINT")),qo$1(2),hD("icon",LA(25,Qn)),qo$1(2),jD($A(17,19,"WORKSHOP.PARTICIPANT.EXPORT")),qo$1(3),hD("icon",LA(26,Xn)),qo$1(2),jD($A(22,21,"GLOBAL.ADD")),qo$1(2),Xo$1(e.participants().length>0?23:24),qo$1(3),jD($A(27,23,"WORKSHOP.PARTICIPANT.ADD_HINT"));}}function jo(t,n){t&1&&(Zc(0,"th",72),wA(1),HA(2,"translate"),Up(),Zc(3,"th",72),wA(4),HA(5,"translate"),Up()),t&2&&(qo$1(),jD($A(2,2,"WORKSHOP.START_DATE")),qo$1(3),jD($A(5,4,"WORKSHOP.END_DATE")));}function $o(t,n){t&1&&(fu(0,"fa-icon",74),HA(1,"translate")),t&2&&hD("icon",LA(4,oi))("matTooltip",$A(1,2,"WORKSHOP.MODULE.HAS_PICTURE"));}function qo(t,n){if(t&1&&(Zc(0,"p",75),fu(1,"fa-icon",5),wA(2),Up()),t&2){let e=K0().$implicit;qo$1(),hD("icon",LA(2,ii)),qo$1(),Wp(" ",e.speaker," ");}}function Yo(t,n){if(t&1&&(Zc(0,"p",66),wA(1),HA(2,"localizedDate"),HA(3,"translate"),Up()),t&2){let e=K0().$implicit;
2qo$1(),Wp(" ",e.startDate?zA(2,1,e.startDate,"short"):$A(3,4,"WORKSHOP.DATE_TBA")," ");}}function Qo(t,n){if(t&1&&(Zc(0,"td"),wA(1),HA(2,"localizedDate"),Up(),Zc(3,"td"),wA(4),HA(5,"localizedDate"),Up()),t&2){let e=K0().$implicit;qo$1(),jD(e.startDate?zA(2,2,e.startDate,"short"):"-"),qo$1(3),jD(e.endDate?zA(5,5,e.endDate,"short"):"-");}}function Xo(t,n){if(t&1){let e=$0();Zc(0,"tr",64)(1,"td")(2,"a",73),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.editModule(c))}),wA(3),Up(),Qo$1(4,$o,2,5,"fa-icon",74),Qo$1(5,qo,3,3,"p",75),Qo$1(6,Yo,4,6,"p",66),Up(),Qo$1(7,Qo,6,8),Zc(8,"td")(9,"div",70)(10,"button",49),HA(11,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.editModule(c))}),fu(12,"fa-icon",50),Up(),Zc(13,"button",49),HA(14,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.duplicateModule(c))}),fu(15,"fa-icon",76),Up(),Zc(16,"button",49),HA(17,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.deleteModule(c))}),fu(18,"fa-icon",46),Up()()()();}if(t&2){let e=n.$implicit,a=K0(4);qo$1(3),jD(e.title),qo$1(),Xo$1(e.hasPicture?4:-1),qo$1(),Xo$1(e.speaker?5:-1),qo$1(),Xo$1(a.screensizeService.showM?-1:6),qo$1(),Xo$1(a.screensizeService.showM?7:-1),qo$1(3),hD("matTooltip",$A(11,11,"ENTITY.EDIT")),qo$1(2),hD("icon",LA(17,ri)),qo$1(),hD("matTooltip",$A(14,13,"ENTITY.DUPLICATE")),qo$1(2),hD("icon",LA(18,li)),qo$1(),hD("matTooltip",$A(17,15,"GLOBAL.DELETE")),qo$1(2),hD("icon",LA(19,Ae));}}function Jo(t,n){if(t&1&&(Zc(0,"table",59)(1,"tr",62)(2,"th"),wA(3),HA(4,"translate"),Up(),Qo$1(5,jo,6,6),fu(6,"th"),Up(),P0(7,Xo,19,20,"tr",64,Be),Up()),t&2){let e=K0(3);qo$1(3),jD($A(4,2,"WORKSHOP.MODULE.NAME")),qo$1(2),Xo$1(e.screensizeService.showM?5:-1),qo$1(2),F0(e.modules());}}function Zo(t,n){t&1&&(Zc(0,"p",60),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.MODULE.EMPTY")));}function ea(t,n){if(t&1){let e=$0();Zc(0,"section")(1,"header",28)(2,"div")(3,"h2"),wA(4),HA(5,"translate"),Up(),Zc(6,"p"),wA(7),HA(8,"translate"),Up()(),Zc(9,"button",29),pu("click",function(){nv(e);let c=K0(2);return rv(c.addModule())}),fu(10,"fa-icon",5),Zc(11,"span"),wA(12),HA(13,"translate"),Up()()(),Qo$1(14,Jo,9,4,"table",59)(15,Zo,3,3,"p",60),Up();}if(t&2){let e=K0(2);qo$1(4),jD($A(5,5,"WORKSHOP.MODULE.TITLE")),qo$1(3),jD($A(8,7,"WORKSHOP.MODULE.HINT")),qo$1(3),hD("icon",LA(11,eo)),qo$1(2),jD($A(13,9,"GLOBAL.NEW")),qo$1(2),Xo$1(e.modules().length>0?14:15);}}function ta(t,n){t&1&&(Zc(0,"th",72),wA(1),HA(2,"translate"),Up(),Zc(3,"th",72),wA(4),HA(5,"translate"),Up()),t&2&&(qo$1(),jD($A(2,2,"WORKSHOP.BROADCAST.PLANNED_DATE")),qo$1(3),jD($A(5,4,"WORKSHOP.BROADCAST.SENT_DATE")));}function ia(t,n){if(t&1&&(Zc(0,"td"),wA(1),HA(2,"localizedDate"),Up(),Zc(3,"td"),wA(4),HA(5,"localizedDate"),Up()),t&2){let e=K0().$implicit;qo$1(),jD(e.plannedDate?zA(2,2,e.plannedDate,"short"):"-"),qo$1(3),jD(e.sentDate?zA(5,5,e.sentDate,"short"):"-");}}function na(t,n){if(t&1){let e=$0();Zc(0,"tr",64)(1,"td")(2,"a",73),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.editBroadcast(c))}),wA(3),Up()(),Zc(4,"td")(5,"span",55),wA(6),HA(7,"translate"),Up()(),Qo$1(8,ia,6,8),Zc(9,"td")(10,"div",70)(11,"button",49),HA(12,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.editBroadcast(c))}),fu(13,"fa-icon",50),Up(),Zc(14,"button",49),HA(15,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.duplicateBroadcast(c))}),fu(16,"fa-icon",76),Up(),Zc(17,"button",49),HA(18,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.deleteBroadcast(c))}),fu(19,"fa-icon",46),Up()()()();}if(t&2){let e=n.$implicit,a=K0(4);qo$1(3),jD(e.subject),qo$1(2),Sn$1("status-chip--planned",e.status===a.WorkshopBroadcastStatus.PLANNED)("status-chip--sent",e.status===a.WorkshopBroadcastStatus.SENT),qo$1(),Wp(" ",$A(7,13,a.broadcastStatusKey(e.status))," "),qo$1(2),Xo$1(a.screensizeService.showM?8:-1),qo$1(3),hD("matTooltip",$A(12,15,e.status===a.WorkshopBroadcastStatus.SENT?"WORKSHOP.BROADCAST.VIEW":"ENTITY.EDIT")),qo$1(2),hD("icon",PA(21,Me,e.status===a.WorkshopBroadcastStatus.SENT?"eye":"edit")),qo$1(),hD("matTooltip",$A(15,17,"ENTITY.DUPLICATE")),qo$1(2),hD("icon",LA(23,li)),qo$1(),hD("matTooltip",$A(18,19,"GLOBAL.DELETE")),qo$1(2),hD("icon",LA(24,Ae));}}
2function oa(t,n){if(t&1&&(Zc(0,"table",59)(1,"tr",62)(2,"th"),wA(3),HA(4,"translate"),Up(),Zc(5,"th",77),wA(6),HA(7,"translate"),Up(),Qo$1(8,ta,6,6),fu(9,"th"),Up(),P0(10,na,20,25,"tr",64,Be),Up()),t&2){let e=K0(3);qo$1(3),jD($A(4,3,"WORKSHOP.BROADCAST.SUBJECT")),qo$1(3),jD($A(7,5,"WORKSHOP.BROADCAST.STATUS")),qo$1(2),Xo$1(e.screensizeService.showM?8:-1),qo$1(2),F0(e.broadcasts());}}function aa(t,n){t&1&&(Zc(0,"p",60),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.BROADCAST.EMPTY")));}function ra(t,n){if(t&1){let e=$0();Zc(0,"section")(1,"header",28)(2,"div")(3,"h2"),wA(4),HA(5,"translate"),Up(),Zc(6,"p"),wA(7),HA(8,"translate"),Up()(),Zc(9,"button",29),pu("click",function(){nv(e);let c=K0(2);return rv(c.addBroadcast())}),fu(10,"fa-icon",5),Zc(11,"span"),wA(12),HA(13,"translate"),Up()()(),Qo$1(14,oa,12,7,"table",59)(15,aa,3,3,"p",60),Up();}if(t&2){let e=K0(2);qo$1(4),jD($A(5,5,"WORKSHOP.BROADCAST.TITLE")),qo$1(3),jD($A(8,7,"WORKSHOP.BROADCAST.HINT")),qo$1(3),hD("icon",LA(11,to)),qo$1(2),jD($A(13,9,"GLOBAL.NEW")),qo$1(2),Xo$1(e.broadcasts().length>0?14:15);}}function la(t,n){t&1&&(Zc(0,"th"),wA(1),HA(2,"translate"),Up(),Zc(3,"th",72),wA(4),HA(5,"translate"),Up()),t&2&&(qo$1(),jD($A(2,2,"WORKSHOP.MESSAGE.BODY")),qo$1(3),jD($A(5,4,"WORKSHOP.MESSAGE.RECEIVED_AT")));}function pa(t,n){if(t&1&&(Zc(0,"p",66),wA(1),Up()),t&2){let e=K0().$implicit;qo$1(),jD(e.email);}}function sa(t,n){if(t&1&&(Zc(0,"p",66),wA(1),HA(2,"localizedDate"),Up()),t&2){let e=K0().$implicit;qo$1(),jD(zA(2,1,e.createdDate,"short"));}}function ca(t,n){if(t&1&&(Zc(0,"td",84),wA(1),Up(),Zc(2,"td"),wA(3),HA(4,"localizedDate"),Up()),t&2){let e=K0().$implicit,a=K0(4);qo$1(),jD(a.excerpt(e)),qo$1(2),jD(zA(4,2,e.createdDate,"short"));}}function da(t,n){if(t&1){let e=$0();Zc(0,"tr",81)(1,"td"),fu(2,"fa-icon",82),HA(3,"translate"),Up(),Zc(4,"td")(5,"a",83),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.openMessage(c))}),wA(6),Up(),Qo$1(7,pa,2,1,"p",66),Qo$1(8,sa,3,4,"p",66),Up(),Qo$1(9,ca,5,5),Zc(10,"td")(11,"div",70)(12,"button",49),HA(13,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.openMessage(c))}),fu(14,"fa-icon",50),Up(),Zc(15,"button",49),HA(16,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.toggleMessageRead(c))}),fu(17,"fa-icon",76),Up(),Zc(18,"button",49),HA(19,"translate"),pu("click",function(){let c=nv(e).$implicit,C=K0(4);return rv(C.deleteMessage(c))}),fu(20,"fa-icon",46),Up()()()();}if(t&2){let e=n.$implicit,a=K0(4);Sn$1("message-row--unread",!e.read),qo$1(2),Gp(e.read?"sk-text-secondary":"message-row__unread-icon"),hD("icon",PA(24,Me,e.read?"envelope-open-text":"envelope"))("matTooltip",$A(3,16,e.read?"WORKSHOP.MESSAGE.READ":"WORKSHOP.MESSAGE.UNREAD")),qo$1(4),jD(a.senderName(e)||e.email),qo$1(),Xo$1(a.senderName(e)?7:-1),qo$1(),Xo$1(a.screensizeService.showM?-1:8),qo$1(),Xo$1(a.screensizeService.showM?9:-1),qo$1(3),hD("matTooltip",$A(13,18,"WORKSHOP.MESSAGE.VIEW")),qo$1(2),hD("icon",LA(26,io)),qo$1(),hD("matTooltip",$A(16,20,e.read?"WORKSHOP.MESSAGE.MARK_UNREAD":"WORKSHOP.MESSAGE.MARK_READ")),qo$1(2),hD("icon",PA(27,Me,e.read?"envelope":"envelope-open-text")),qo$1(),hD("matTooltip",$A(19,22,"GLOBAL.DELETE")),qo$1(2),hD("icon",LA(29,Ae));}}function ma(t,n){if(t&1&&(Zc(0,"table",59)(1,"tr",62),fu(2,"th",79),Zc(3,"th"),wA(4),HA(5,"translate"),Up(),Qo$1(6,la,6,6),fu(7,"th"),Up(),P0(8,da,21,30,"tr",80,Be),Up()),t&2){let e=K0(3);qo$1(4),jD($A(5,2,"WORKSHOP.MESSAGE.SENDER")),qo$1(2),Xo$1(e.screensizeService.showM?6:-1),qo$1(2),F0(e.messages());}}function _a(t,n){t&1&&(Zc(0,"p",60),wA(1),HA(2,"translate"),Up()),t&2&&(qo$1(),jD($A(2,1,"WORKSHOP.MESSAGE.EMPTY")));}function ua(t,n){if(t&1&&(Zc(0,"section")(1,"header",78)(2,"div")(3,"h2"),wA(4),HA(5,"translate"),Up(),Zc(6,"p"),wA(7),HA(8,"translate"),Up()()(),Qo$1(9,ma,10,4,"table",59)(10,_a,3,3,"p",60),Up()),t&2){let e=K0(2);qo$1(4),jD($A(5,3,"WORKSHOP.MESSAGE.TITLE")),qo$1(3),jD($A(8,5,"WORKSHOP.MESSAGE.HINT")),qo$1(2),Xo$1(e.messages().length>0?9:10);}}function fa(t,n){if(t&1){let e=$0();Zc(0,"header",3)(1,"div",4),fu(2,"fa-icon",5),Up(),Zc(3,"div",6)(4,"p",7),wA(5),HA(6,"translate"),Up(),Zc(7,"h1",8),wA(8),Up(),Zc(9,"p",9)(10,"span",10),fu(11,"fa-icon",5),Qo$1(12,oo,3,5)(13,ao,2,3),Up(),Qo$1(14,ro,3,3,"span",10),Zc(15,"span",10),fu(16,"fa-icon",5),wA(17),HA(18,"translate"),Up(),Qo$1(19,lo,5,11,"span",11),Up()(),Zc(20,"div",12),HA(21,"translate"),HA(22,"translate"),Zc(23,"span",13),wA(24),Qo$1(25,po,2,1,"span",14),Up(),Zc(26,"span",15),wA(27),HA(28,"translate"),Up()(),Zc(29,"div",16)(30,"button",17),HA(31,"translate"),pu("click",function(){let c=nv(e),C=K0();return rv(C.setPublished(!c.published))}),fu(32,"fa-icon",5),Up(),Zc(33,"button",17),HA(34,"translate"),pu("click",function(){nv(e);let c=K0();return rv(c.copyPublicLink())}),fu(35,"fa-icon",5),Up(),Zc(36,"button",17),HA(37,"translate"),pu("click",function(){nv(e);let c=K0();return rv(c.openPublicPage())}),fu(38,"fa-icon",5),Up(),Qo$1(39,so,3,5,"button",18),Up()(),Zc(40,"div",19)(41,"nav",20),P0(42,mo,6,7,"button",21,Be),Up(),Zc(44,"main",22)(45,"mat-card",23)(46,"mat-card-content"),Qo$1(47,Wo,82,66,"section"),Qo$1(48,zo,28,27,"section"),Qo$1(49,ea,16,12,"section"),Qo$1(50,ra,16,12,"section"),Qo$1(51,ua,11,7,"section"),Up()()()();}if(t&2){let e=n,a=K0();qo$1(2),hD("icon",LA(48,ii)),qo$1(3),jD($A(6,32,"WORKSHOP.DETAIL.KICKER")),qo$1(2),hD("title",e.name),qo$1(),jD(e.name),qo$1(3),hD("icon",LA(49,Un)),qo$1(),Xo$1(e.startDate?12:13),qo$1(2),Xo$1(e.location?14:-1),qo$1(2),hD("icon",PA(50,Me,e.published?"lock-open":"lock")),qo$1(),Wp(" ",$A(18,34,e.published?"WORKSHOP.RELEASED":"WORKSHOP.NOT_RELEASED")," "),qo$1(2),Xo$1(e.cancelledDate?19:-1),qo$1(),hD("matTooltip",$A(21,36,"WORKSHOP.DETAIL.CONFIRMED")+" / "+$A(22,38,"WORKSHOP.DETAIL.PENDING")),qo$1(4),Wp(" ",a.
2confirmedCount()),qo$1(),Xo$1(a.availableTickets()!==null?25:-1),qo$1(2),jD($A(28,40,"WORKSHOP.PARTICIPANT.TITLE")),qo$1(3),Sn$1("detail__action--on",e.published),hD("matTooltip",$A(31,42,e.published?"WORKSHOP.WITHDRAW_RELEASE":"WORKSHOP.RELEASE")),qo$1(2),hD("icon",PA(52,Me,e.published?"lock-open":"lock")),qo$1(),Sn$1("detail__action--disabled",!e.published),hD("matTooltip",$A(34,44,"WORKSHOP.COPY_PUBLIC_LINK")),qo$1(2),hD("icon",LA(54,Gn)),qo$1(),Sn$1("detail__action--disabled",!e.published),hD("matTooltip",$A(37,46,"WORKSHOP.OPEN_PUBLIC_PAGE")),qo$1(2),hD("icon",LA(55,zn)),qo$1(),Xo$1(e.cancelledDate?-1:39),qo$1(3),F0(a.navItems),qo$1(5),Xo$1(a.page()==="details"?47:-1),qo$1(),Xo$1(a.page()==="participants"?48:-1),qo$1(),Xo$1(a.page()==="modules"?49:-1),qo$1(),Xo$1(a.page()==="broadcasts"?50:-1),qo$1(),Xo$1(a.page()==="messages"?51:-1);}}function ha(t,n){t&1&&(Zc(0,"div",2),fu(1,"mat-spinner",44),Up()),t&2&&(qo$1(),hD("diameter",40));}var Ca=["image/jpeg","image/png"],ga=";",ti=120,_t=class t{constructor(){this.WorkshopBroadcastStatus=at;this.WorkshopPublicState=u$1;this.navItems=[{id:"details",icon:["fas","info-circle"],labelKey:"WORKSHOP.DETAIL.INFO"},{id:"modules",icon:["fas","layer-group"],labelKey:"WORKSHOP.MODULE.TITLE"},{id:"participants",icon:["fas","users"],labelKey:"WORKSHOP.PARTICIPANT.TITLE"},{id:"broadcasts",icon:["fas","envelopes-bulk"],labelKey:"WORKSHOP.BROADCAST.TITLE"},{id:"messages",icon:["fas","message"],labelKey:"WORKSHOP.MESSAGE.TITLE"}];this.page=V("details");this.workshop=V(null);this.participants=V([]);this.modules=V([]);this.broadcasts=V([]);this.messages=V([]);this.pictureUrl=V(null);this.pictureBusy=V(false);this.publicStateBusy=V(false);this.confirmedCount=Pt(()=>this.participants().filter(n=>n.confirmed).length);this.pendingCount=Pt(()=>this.participants().filter(n=>!n.confirmed&&!n.withdrawnDate).length);this.withdrawnCount=Pt(()=>this.participants().filter(n=>!!n.withdrawnDate).length);this.unreadMessageCount=Pt(()=>this.messages().filter(n=>!n.read).length);this.availableTickets=Pt(()=>{let n=this.workshop();return !n||n.maxNumberOfTickets==null?null:Math.max(0,n.maxNumberOfTickets-this.confirmedCount())});this.registrationClosed=Pt(()=>s(this.workshop()?.startDate));this.canRequestApproval=Pt(()=>this.workshop()?.publicState==="NEW");this.canWithdrawApprovalRequest=Pt(()=>this.workshop()?.publicState==="REQUESTED");this.publicStateLocked=Pt(()=>this.workshop()?.publicState==="APPROVED");this.publicLink=Pt(()=>{let n=this.workshop();return n?this.workshopService.getPublicRegistrationLink(n.id):""});this.screensizeService=p(h$1);this.destroyRef=p(le);this.activatedRoute=p(kn$1);this.dialog=p(Pe);this.workshopService=p(d);this.snackbarService=p(Dn$1);this.copyLinkService=p(Xi$1);this.translateService=p(Pm);}ngOnInit(){this.activatedRoute.paramMap.pipe(hr(this.destroyRef)).subscribe(n=>{let e=n.get("id");e&&this.load(e);});}ngOnDestroy(){this.revokePicture();}setPage(n){this.page.set(n);}navBadge(n){switch(n){case "participants":return this.participants().length;case "modules":return this.modules().length;case "broadcasts":return this.broadcasts().length;case "messages":return this.messages().length;default:return null}}navBadgeAttention(n){return n==="messages"&&this.unreadMessageCount()>0}openEditDialog(){this.dialog.open(_i$1,{data:this.workshop()}).afterClosed().pipe(hr(this.destroyRef)).subscribe(n=>{n?.tool&&this.workshop.set(n.tool);});}setPublished(n){if(!n){this.savePublished(false);return}it(this.dialog).pipe(hr(this.destroyRef)).subscribe(e=>{e&&this.savePublished(true);});}savePublished(n){let e=this.workshop();this.workshopService.update(y(x({},e),{published:n})).pipe(hr(this.destroyRef)).subscribe(a=>{this.workshop.set(a),this.snackbarService.showInfo(a.published?"WORKSHOP.RELEASED_SNACK":"WORKSHOP.RELEASE_WITHDRAWN_SNACK");});}publicStateKey(n){return "WORKSHOP.PUBLICATION_"+n}requestApproval(){this.movePublicState("REQUESTED","WORKSHOP.PUBLICATION_REQUESTED_SNACK");}withdrawApprovalRequest(){this.movePublicState("NEW","WORKSHOP.PUBLICATION_WITHDRAWN_SNACK");}movePublicState(n,e){let a=n==="REQUESTED"?this.canRequestApproval():this.canWithdrawApprovalRequest
2();this.publicStateBusy()||!a||(this.publicStateBusy.set(true),this.workshopService.updatePublicState(this.workshop(),n).pipe(pn$1(()=>this.publicStateBusy.set(false)),hr(this.destroyRef)).subscribe(c=>{this.workshop.set(c),this.snackbarService.showInfo(c.publicState===n?e:"WORKSHOP.PUBLICATION_LOCKED_HINT");}));}copyPublicLink(){if(!this.workshop()?.published){this.snackbarService.showWarn("WORKSHOP.NO_LINK_NOT_RELEASED");return}this.copyLinkService.copyAndShowLink(this.publicLink());}showAccessCodeCopied(){this.snackbarService.showSuccess("WORKSHOP.ACCESS_CODE_COPIED");}openPublicPage(){if(!this.workshop()?.published){this.snackbarService.showWarn("WORKSHOP.NO_LINK_NOT_RELEASED");return}window.open(this.publicLink(),"_blank");}cancelWorkshop(){let n=this.workshop();if(n.cancelledDate)return;let e={workshopId:n.id,workshopTitle:n.name,confirmedCount:this.confirmedCount()};this.dialog.open(mt,{data:e}).afterClosed().pipe(hr(this.destroyRef)).subscribe(a=>{a&&this.workshop.set(a);});}uploadPicture(){this.dialog.open(V$1).afterClosed().pipe(hr(this.destroyRef)).subscribe(n=>{if(!n||n.length===0)return;let e=n[0];if(!Ca.includes(e.type)){this.snackbarService.showError("HTTP_STATUS.WRONG_FILE_TYPE");return}if(e.size>b4.mediaFileMaxSize){this.snackbarService.showError("WORKSHOP.PICTURE.TOO_LARGE");return}this.pictureBusy.set(true),this.workshopService.uploadPicture(this.workshop().id,e).pipe(pn$1(()=>this.pictureBusy.set(false)),hr(this.destroyRef)).subscribe(a=>{this.workshop.set(a),this.loadPicture(a.id),this.snackbarService.showSuccess("WORKSHOP.PICTURE.SAVED");});});}deletePicture(){this.dialog.open(L).afterClosed().pipe(oe(n=>!!n),Me$1(()=>this.workshopService.deletePicture(this.workshop().id)),hr(this.destroyRef)).subscribe(n=>{this.workshop.set(n),this.revokePicture(),this.snackbarService.showWarn("WORKSHOP.PICTURE.DELETED");});}addParticipant(){this.openParticipantDialog(null).subscribe(n=>{n&&this.participants.update(e=>[...e,n]);});}editParticipant(n){this.openParticipantDialog(n).subscribe(e=>{e&&this.participants.update(a=>a.map(c=>c.id===e.id?e:c));});}exportParticipants(){let n=this.participants();if(n.length===0)return;let e=[this.translateService.instant("WORKSHOP.PARTICIPANT.FIRST_NAME"),this.translateService.instant("WORKSHOP.PARTICIPANT.LAST_NAME"),this.translateService.instant("WORKSHOP.PARTICIPANT.EMAIL"),this.translateService.instant("WORKSHOP.PARTICIPANT.STATUS"),this.translateService.instant("WORKSHOP.PARTICIPANT.REGISTERED_AT")],a=this.translateService.instant("WORKSHOP.PARTICIPANT.CONFIRMED"),c=this.translateService.instant("WORKSHOP.PARTICIPANT.PENDING"),C=this.translateService.instant("WORKSHOP.PARTICIPANT.WITHDRAWN"),W=n.map(K=>[K.firstName,K.lastName,K.email,K.withdrawnDate?C:K.confirmed?a:c,K.createdDate??""]),Oe=[e,...W].map(K=>K.map(ut=>this.toCsvCell(ut)).join(ga)).join(`\r
3`);this.downloadFile("\uFEFF"+Oe,this.buildExportFileName(),"text/csv;charset=utf-8");}deleteParticipant(n){this.dialog.open(L).afterClosed().pipe(oe(e=>!!e),Me$1(()=>this.workshopService.deleteParticipant(this.workshop().id,n.id)),hr(this.destroyRef)).subscribe(()=>{this.participants.update(e=>e.filter(a=>a.id!==n.id)),this.snackbarService.showWarn("WORKSHOP.PARTICIPANT.DELETED");});}addModule(){this.openModuleDialog(null).subscribe(n=>{n&&this.modules.update(e=>[...e,n]);});}editModule(n){this.openModuleDialog(n).subscribe(e=>{e&&this.modules.update(a=>a.map(c=>c.id===e.id?e:c));});}duplicateModule(n){this.workshopService.duplicateModule(this.workshop().id,n.id).pipe(hr(this.destroyRef)).subscribe(e=>{this.modules.update(a=>[...a,e]),this.snackbarService.showSuccess("WORKSHOP.MODULE.DUPLICATED");});}deleteModule(n){this.dialog.open(L).afterClosed().pipe(oe(e=>!!e),Me$1(()=>this.workshopService.deleteModule(this.workshop().id,n.id)),hr(this.destroyRef)).subscribe(()=>{this.modules.update(e=>e.filter(a=>a.id!==n.id)),this.snackbarService.showWarn("WORKSHOP.MODULE.DELETED");});}addBroadcast(){this.openBroadcastDialog(null).subscribe(n=>{n&&this.broadcasts.update(e=>[...e,n]);});}editBroadcast(n){this.openBroadcastDialog(n).subscribe(e=>{e&&this.broadcasts.update(a=>a.map(c=>c.id===e.id?e:c));});}duplicateBroadcast(n){this.workshopService.duplicateBroadcast(this.workshop().id,n.id).pipe(hr(this.destroyRef)).subscribe(e=>{this.broadcasts.update(a=>[...a,e]),this.snackbarService.showSuccess("WORKSHOP.BROADCAST.DUPLICATED");});}deleteBroadcast(n){this.dialog.open(L).afterClosed().pipe(oe(e=>!!e),Me$1(()=>this.workshopService.deleteBroadcast(this.workshop().id,n.id)),hr(this.destroyRef)).subscribe(()=>{this.broadcasts.update(e=>e.filter(a=>
3a.id!==n.id)),this.snackbarService.showWarn("WORKSHOP.BROADCAST.DELETED");});}broadcastStatusKey(n){return "WORKSHOP.BROADCAST.STATUS_"+n}openMessage(n){n.read||this.setMessageRead(n,true);let e={workshopId:this.workshop().id,workshopTitle:this.workshop().name,message:n};this.dialog.open(dt,{data:e}).afterClosed().pipe(hr(this.destroyRef)).subscribe(a=>{a&&this.replaceMessage(a);});}toggleMessageRead(n){this.setMessageRead(n,!n.read);}deleteMessage(n){this.dialog.open(L).afterClosed().pipe(oe(e=>!!e),Me$1(()=>this.workshopService.deleteMessage(this.workshop().id,n.id)),hr(this.destroyRef)).subscribe(()=>{this.messages.update(e=>e.filter(a=>a.id!==n.id)),this.snackbarService.showWarn("WORKSHOP.MESSAGE.DELETED");});}senderName(n){return [n.firstName,n.lastName].filter(e=>!!e?.trim()).join(" ")}excerpt(n){let e=n.body.replace(/\s+/g," ").trim();return e.length>ti?e.slice(0,ti).trimEnd()+"\u2026":e}setMessageRead(n,e){this.workshopService.setMessageRead(this.workshop().id,n.id,e).pipe(hr(this.destroyRef)).subscribe(a=>this.replaceMessage(a));}replaceMessage(n){this.messages.update(e=>e.map(a=>a.id===n.id?n:a));}load(n){this.workshopService.getById(n).pipe(hr(this.destroyRef)).subscribe(e=>{this.workshop.set(e),e.hasPicture?this.loadPicture(e.id):this.revokePicture();}),this.workshopService.getParticipants(n).pipe(hr(this.destroyRef)).subscribe(e=>this.participants.set(e)),this.workshopService.getModules(n).pipe(hr(this.destroyRef)).subscribe(e=>this.modules.set(e)),this.workshopService.getBroadcasts(n).pipe(hr(this.destroyRef)).subscribe(e=>this.broadcasts.set(e)),this.workshopService.getMessages(n).pipe(hr(this.destroyRef)).subscribe(e=>this.messages.set(e));}loadPicture(n){this.workshopService.getPicture(n).pipe(hr(this.destroyRef)).subscribe(e=>{this.revokePicture(),this.pictureUrl.set(URL.createObjectURL(e));});}revokePicture(){let n=this.pictureUrl();n&&(URL.revokeObjectURL(n),this.pictureUrl.set(null));}toCsvCell(n){let e=n??"";return '"'+(/^[=+\-@\t\r]/.test(e)?"'"+e:e).replace(/"/g,'""')+'"'}buildExportFileName(){let n=(this.workshop()?.name??"workshop").normalize("NFKD").replace(/[^a-zA-Z0-9]+/g,"-").replace(/^-+|-+$/g,"").toLowerCase()||"workshop",e=new Date().toISOString().slice(0,10);return `${n}-${e}.csv`}downloadFile(n,e,a){let c=URL.createObjectURL(new Blob([n],{type:a})),C=document.createElement("a");C.href=c,C.download=e,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(c);}openParticipantDialog(n){let e={workshopId:this.workshop().id,participant:n};return this.dialog.open(lt,{data:e}).afterClosed().pipe(hr(this.destroyRef))}openModuleDialog(n){let e={workshopId:this.workshop().id,module:n};return this.dialog.open(ct,{data:e}).afterClosed().pipe(hr(this.destroyRef))}openBroadcastDialog(n){let e={workshopId:this.workshop().id,broadcast:n,confirmedCount:this.confirmedCount(),published:this.workshop().published};return this.dialog.open(pt,{data:e}).afterClosed().pipe(hr(this.destroyRef))}static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=Xe({type:t,selectors:[["app-workshop-detail"]],decls:4,vars:1,consts:[[1,"sk-page-wrapper"],[1,"sk-page-container","detail"],[1,"detail__page-loading"],[1,"detail__header"],[1,"detail__icon"],[3,"icon"],[1,"detail__identity"],[1,"detail__kicker"],[3,"title"],[1,"detail__facts"],[1,"detail__fact"],[1,"detail__fact","detail__fact--cancelled"],[1,"detail__stat",3,"matTooltip"],[1,"detail__stat-count"],[1,"detail__stat-max"],[1,"detail__stat-label"],[1,"detail__actions"],["mat-icon-button","",1,"detail__action",3,"click","matTooltip"],["mat-icon-button","",1,"detail__action","detail__action--danger",3,"matTooltip"],[1,"detail__body"],[1,"detail__nav","mat-elevation-z1"],["type","button",1,"detail__nav-item",3,"detail__nav-item--active"],[1,"detail__c
3ontent"],[1,"detail__pane","mat-elevation-z1"],["mat-icon-button","",1,"detail__action","detail__action--danger",3,"click","matTooltip"],["type","button",1,"detail__nav-item",3,"click"],[1,"detail__nav-badge",3,"detail__nav-badge--attention"],[1,"detail__nav-badge"],[1,"pane-header","pane-header--with-action"],["mat-flat-button","",1,"sk-button-primary",3,"click"],[1,"details"],[1,"details__media"],[1,"picture"],[3,"src","alt"],[1,"picture__busy"],[1,"sk-font-small","sk-text-secondary","picture__hint"],[1,"picture__actions"],["mat-flat-button","",1,"sk-button-secondary",3,"click","disabled"],["mat-icon-button","",1,"sk-icon-button",3,"disabled","matTooltip"],[1,"details__facts"],[1,"facts"],[1,"sk-text-secondary"],[1,"facts__link"],[1,"facts__description"],[3,"diameter"],["mat-icon-button","",1,"sk-icon-button",3,"click","disabled","matTooltip"],[1,"sk-text-error",3,"icon"],["target","_blank","rel","noopener",1,"sk-link",3,"href"],[1,"sk-font-small","sk-text-secondary","facts__note"],["mat-icon-button","",1,"sk-icon-button",3,"click","matTooltip"],[1,"sk-text-primary",3,"icon"],[1,"sk-font-small","sk-text-warn","facts__note"],[1,"facts__code"],["mat-icon-button","",1,"sk-icon-button",3,"click","cdkCopyToClipboard","matTooltip"],[1,"facts__state"],[1,"status-chip"],["mat-flat-button","",1,"sk-button-secondary",3,"disabled"],[1,"pane-header__actions"],["mat-flat-button","",1,"sk-button-secondary",3,"click","disabled","matTooltip"],[1,"sk-table"],[1,"sk-text-secondary","empty"],[1,"sk-font-small","sk-text-secondary"],[1,"sk-table-header"],[2,"width","40px"],[1,"sk-table-row"],[2,"width","110px"],[1,"sk-text-secondary","sk-font-small"],[1,"sk-text-secondary",3,"icon","matTooltip"],[1,"sk-text-success",3,"icon","matTooltip"],[1,"sk-text-warn",3,"icon","matTooltip"],[1,"row-actions"],[1,"sk-link",3,"href"],[2,"width","140px"],[1,"sk-link",3,"click"],[1,"sk-text-secondary","module-picture-flag",3,"icon","matTooltip"],[1,"sk-text-secondary","sk-font-small","module-speaker"],[1,"sk-text-secondary",3,"icon"],[2,"width","100px"],[1,"pane-header"],[2,"width","32px"],[1,"sk-table-row","message-row",3,"message-row--unread"],[1,"sk-table-row","message-row"],[3,"icon","matTooltip"],[1,"sk-link","message-sender",3,"click"],[1,"message-excerpt"]],template:function(e,a){if(e&1&&(Zc(0,"div",0)(1,"div",1),Qo$1(2,fa,52,56)(3,ha,2,1,"div",2),Up()()),e&2){let c;qo$1(2),Xo$1((c=a.workshop())?2:3,c);}},dependencies:[w,A,g7,Tk,po$1,K,lc,As,B7,c$1],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.detail[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:24px;padding-bottom:48px;container-type:inline-size;container-name:workshop-detail}.detail__page-loading[_ngcontent-%COMP%]{display:grid;place-items:center;min-height:320px}.detail__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:20px;padding:24px 28px;background:linear-gradient(135deg,#140d69,#120b5c);color:#fff;border-radius:16px;box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}@container workshop-detail (max-width: 560px){.detail__header[_ngcontent-%COMP%]{flex-wrap:wrap;padding:18px 20px;gap:14px}}.detail__icon[_ngcontent-%COMP%]{flex:0 0 auto;width:64px;height:64px;border-radius:50%;background:#ffffff29;display:grid;place-items:center;font-size:1.6rem;color:#fff}@container workshop-detail (max-width: 560px){.detail__icon[_ngcontent-%COMP%]{width:52px;height:52px;font-size:1.3rem}}.detail__identity[_ngcontent-%COMP%]{flex:1 1 240px;min-width:0}.detail__identity[_ngcontent-%COMP%]   h1[_ngcontent-%COMP%]{margin:0;padding-bottom:3px;font-size:clamp(1.3rem,1.6vw + .8rem,1.75rem);line-height:1.15;color:#fff;font-weight:600;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden}.detail__kicker[_ngcontent-%COMP%]{margin:0 0 4px;font-size:.8rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;color:#ffffffb8}.detail__facts[_ngcontent-%COMP%]{margin:8px 0 0;display:flex;flex-wrap:wrap;gap:6px 18px;font-size:.9rem;color:#ffffffd9}.detail__fact[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:7px;color:inherit}.detail__fact[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{font-size:.85rem;opacity:.8}.detail__stat[_ngcontent-%COMP%]{flex:0 0 auto;height:40px;
3display:inline-flex;align-items:center;gap:8px;padding:0 14px;border-radius:10px;background:#ffffff24;color:#fff}@container workshop-detail (max-width: 850px){.detail__stat[_ngcontent-%COMP%]{display:none}}.detail__stat-count[_ngcontent-%COMP%]{font-size:1rem;font-weight:600;font-variant-numeric:tabular-nums;line-height:1;color:#fff}.detail__stat-max[_ngcontent-%COMP%]{font-weight:400;color:#ffffffbf}.detail__stat-label[_ngcontent-%COMP%]{font-size:.85rem;font-weight:500;color:#ffffffd9;line-height:1}.detail__actions[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;gap:4px}@container workshop-detail (max-width: 560px){.detail__actions[_ngcontent-%COMP%]{margin-left:auto}}.detail__action[_ngcontent-%COMP%]{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:10px;color:#fff!important;background:#ffffff1a;border:none;cursor:pointer;transition:background .15s ease,opacity .15s ease}.detail__action[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{font-size:1rem;color:#fff}.detail__action[_ngcontent-%COMP%]     svg{color:#fff!important;fill:currentColor}.detail__action[_ngcontent-%COMP%]:hover{background:#ffffff38}.detail__action--disabled[_ngcontent-%COMP%]{opacity:.45}.detail__action--on[_ngcontent-%COMP%]{background:#f98d2be6}.detail__action--on[_ngcontent-%COMP%]:hover{background:#f98d2b}.detail__body[_ngcontent-%COMP%]{display:grid;grid-template-columns:260px 1fr;gap:24px}@container workshop-detail (max-width: 850px){.detail__body[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:16px}}.detail__nav[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;padding:12px;background:#fff;border-radius:14px;height:fit-content;position:sticky;top:16px}@container workshop-detail (max-width: 850px){.detail__nav[_ngcontent-%COMP%]{position:static;flex-direction:row;flex-wrap:wrap}}.detail__nav-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:10px 14px;border:none;border-radius:10px;background:transparent;color:#140d69;font:inherit;font-size:.95rem;text-align:left;cursor:pointer;transition:background .15s ease,color .15s ease}.detail__nav-item[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{flex:0 0 20px;font-size:1rem;color:#979bbf;transition:color .15s ease}.detail__nav-item[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]:not(.detail__nav-badge){flex:1}.detail__nav-item[_ngcontent-%COMP%]:hover{background:#140d690f}.detail__nav-item--active[_ngcontent-%COMP%]{background:#f98d2b1f;color:#140d69;font-weight:600}.detail__nav-item--active[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{color:#f98d2b}.detail__nav-badge[_ngcontent-%COMP%]{flex:0 0 auto;min-width:22px;padding:1px 7px;border-radius:999px;background:#140d6914;color:#979bbf;font-size:.75rem;font-weight:600;text-align:center;font-variant-numeric:tabular-nums}.detail__content[_ngcontent-%COMP%]{min-width:0;container-type:inline-size;container-name:detail-pane}.detail__pane[_ngcontent-%COMP%]{border-radius:14px!important}.detail__pane[_ngcontent-%COMP%]     .mat-mdc-card-content{padding:28px!important}@container detail-pane (max-width: 620px){.detail__pane[_ngcontent-%COMP%]     .mat-mdc-card-content{padding:20px!important}}.pane-header[_ngcontent-%COMP%]{margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid rgba(20,13,105,.08)}.pane-header[_ngcontent-%COMP%]   h2[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;color:#140d69;display:inline-flex;align-items:center;gap:10px}.pane-header[_ngcontent-%COMP%]   p[_ngcontent-%COMP%]{margin:6px 0 0;color:#979bbf;font-size:.9rem}.pane-header--with-action[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.pane-header--with-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{flex:0 0 auto}.pane-header--with-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:8px}.pane-header__actions[_ngcontent-%COMP%]{flex:0 0 auto;display:flex;align-items:center;gap:8px}@container detail-pane (max-width: 520px){.pane-header__actions[_ngcontent-%COMP%]{flex-wrap:wrap;justify-content:flex-end}}.details[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(220px,340px) minmax(0,1fr);gap:28px;align-items:start}@container detail-pane (max-width: 620px){.details[_ngcontent-%COMP%]{grid-template-columns:minmax(0,1fr);gap:20px}}.details__facts[_ngcontent-%COMP%]{min-width:0}.picture[_ngcontent-%COMP%]{position:relative;width:100%;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#979bbf14;display:grid;place-items:center}.picture[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:cover;display:block}.picture[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{font-size:2rem;color:#979bbf73}.picture__busy[_ngcontent-%COMP%]{position:absolute;inset:0;display:grid;place-items:center;background:#fff9}.picture__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-top:10px}.picture__actions[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{margin-right:6px}.picture__hint[_ngcontent-%COMP%]{margin:8px 0 0}.facts[_ngcontent-%COMP%]{margin:0}.facts[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:.75rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;color:#979bbf;margin-top:12px}.facts[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]:first-child{margin-top:0}.facts[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{margin:2px 0 0;color:#140d69;word-break:break-word}.facts__description[_ngcontent-%COMP%]{display:block;white-space:pre-wrap}.facts__link[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;min-width:0}.facts__link[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem}.facts__note[_ngcontent-%COMP%]{margin:4px 0 0}.facts__code[_ngcontent-%COMP%]{font-family:Courier New,monospace;font-weight:600;letter-spacing:.06em;overflow-wrap:anywhere}.module-picture-flag[_ngcontent-%COMP%]{margin-left:8px;font-size:.85rem}.module-speaker[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:2px 0 0}.module-speaker[_ngcontent-%COMP%]   fa-icon[_ngcontent-%COMP%]{font-size:.8rem}.row-actions[_ngcontent-%COMP%]{display:inline-flex;float:right}.empty[_ngcontent-%COMP%]{margin:12px 0}.status-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:1px 8px;border-radius:999px;font-size:.72rem;font-weight:500;white-space:nowrap;background:#979bbf1f;color:#979bbf}.status-chip--planned[_ngcontent-%COMP%]{background:#c2c8d82e;color:#140d69}
3.status-chip--sent[_ngcontent-%COMP%]{background:#4caf5029;color:#39833c}.status-chip--requested[_ngcontent-%COMP%]{background:#c2c8d82e;color:#140d69}.status-chip--approved[_ngcontent-%COMP%]{background:#4caf5029;color:#39833c}.facts__state[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.detail__nav-badge--attention[_ngcontent-%COMP%]{background:#f98d2b2e;color:#d56806}.message-row--unread[_ngcontent-%COMP%]   .message-sender[_ngcontent-%COMP%]{font-weight:600}.message-row__unread-icon[_ngcontent-%COMP%]{color:#f98d2b}.message-excerpt[_ngcontent-%COMP%]{color:#979bbf}.detail__fact--cancelled[_ngcontent-%COMP%]{padding:1px 9px;border-radius:999px;background:#ff57228c;font-weight:600}.detail__action--danger[_ngcontent-%COMP%]:hover{background:#ff5722b3}']});}};var bs=[{path:"",component:et,canActivate:[h,u],data:{breadcrumb:"Workshop",pageTitle:"WORKSHOP.WORKSHOP",permission:"WORKSHOP"},children:[{path:"",component:nt},{path:":id",component:_t,data:{breadcrumb:""}}]}];export{bs as workshopRoutes};

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.