diff --git a/public/apps/webapp-schulverwaltung/chunk-X2BR3YJG.js b/public/apps/webapp-schulverwaltung/chunk-24AFRN2G.js similarity index 90% rename from public/apps/webapp-schulverwaltung/chunk-X2BR3YJG.js rename to public/apps/webapp-schulverwaltung/chunk-24AFRN2G.js index d73784a3..27f0425c 100644 --- a/public/apps/webapp-schulverwaltung/chunk-X2BR3YJG.js +++ b/public/apps/webapp-schulverwaltung/chunk-24AFRN2G.js @@ -1 +1 @@ -import{c as H}from"./chunk-LO5XSJLW.js";import{b as F}from"./chunk-RWNJF4OZ.js";import{b as j}from"./chunk-33NXTXD7.js";import{Ac as r,Bc as s,Cc as E,Dd as D,Ed as f,Gc as o,Hc as R,Jc as $,Nc as i,O as m,Pc as a,Sc as c,Uc as S,W as A,Wc as x,Z as I,a as b,ac as L,ca as T,ec as C,m as y,va as v}from"./chunk-T7QWSMKM.js";var z=(()=>{let n=class n{constructor(t){this.i18n=t}transform(t,e){switch(this.i18n.detectLanguage()){case"fr-CH":return Array.from(e).map(d=>t=t.replace(d," ".concat(d))),t;default:return t}}};n.\u0275fac=function(e){return new(e||n)(v(F,16))},n.\u0275pipe=T({name:"addSpace",type:n,pure:!0,standalone:!0});let g=n;return g})();var k=o({Id:s,JobTrainer:i(s),ApprenticeshipManagerId:s,ContractDateFrom:i(c),ContractDateTo:i(c)});var N=o({Id:s,RepresentativeId:s,RepresentativeAfterMajority:E});var V=o({Id:s}),B=R({HRef:i(r)}),G=R({From:c,To:c,EventNumber:r,EventDesignation:r,Designation:i(r)}),J=$([V,B,G]),U=o({Id:r,LessonRef:J,StudentRef:a,TypeRef:a,Type:i(r),ConfirmationState:i(r),ConfirmationStateId:s,Comment:i(r),StudentFullName:r,RegistrationId:s,HRef:r});var w=o({Id:r,LessonRef:a,StudentRef:a,TypeRef:a,Type:i(r),Comment:i(r),StudentFullName:r,HRef:r});var M=o({LessonRef:a,StudentRef:a,TypeRef:a,Comment:i(r),StudentFullName:r,Type:i(r),RegistrationId:s,HRef:r});var O=o({Id:s,From:c,To:c,EventId:s,EventNumber:r,EventDesignation:r,EventLocation:i(r),EventManagerInformation:i(r)});var u=class extends j{constructor(n,p,t,e,h,d="Id"){super(n,p,t,e),this.labelAttr=h,this.keyAttr=d,this.typeaheadCodec=o(S(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(n,p){let t={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${n}*`}};return this.http.get(`${this.baseUrl}/`,p?this.mergeHttpParams(t,p):t).pipe(m(f(this.typeaheadCodec)),y(e=>e.map(h=>({Key:h[this.keyAttr],Value:h[this.labelAttr]}))))}getTypeaheadItemByKey(n){return this.http.get(`${this.baseUrl}/${n}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(m(D(this.typeaheadCodec)),y(p=>({Key:p[this.keyAttr],Value:p[this.labelAttr]})))}mergeHttpParams(n,p){let t={params:b(b({},n.params),p.params)};return p.params.fields&&(t.params.fields=n.params.fields.concat(",",p.params.fields)),t}};var vt=(()=>{let n=class n extends u{constructor(t,e){super(t,e,H,"Students","FullName")}getLegalRepresentatives(t,e){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:e}).pipe(m(f(N)))}getCurrentApprenticeshipContracts(t,e){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,e).pipe(m(f(k)))}getLessonAbsences(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:e}).pipe(m(f(U)))}getLessonIncidents(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:e}).pipe(m(f(M)))}getLessonDispensations(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:e}).pipe(m(f(w)))}getTimetableEntries(t,e={}){return e instanceof L||(e=new L({fromObject:e})),e=e.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation,EventManagerInformation"),this.http.get(`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:e}).pipe(m(f(O)))}};n.\u0275fac=function(e){return new(e||n)(I(C),I(x))},n.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"});let g=n;return g})();export{U as a,u as b,vt as c,z as d}; +import{c as H}from"./chunk-RFO4NYUO.js";import{b as F}from"./chunk-DB66EACG.js";import{b as j}from"./chunk-SOHFFTKU.js";import{$b as L,Ac as s,Bc as E,Cd as D,Dd as f,Fc as o,Gc as R,Ic as $,Mc as i,O as m,Oc as a,Rc as c,Tc as S,Vc as x,W as A,Z as I,a as b,ca as T,dc as C,m as y,va as v,zc as r}from"./chunk-XTHSYQMN.js";var z=(()=>{let n=class n{constructor(t){this.i18n=t}transform(t,e){switch(this.i18n.detectLanguage()){case"fr-CH":return Array.from(e).map(d=>t=t.replace(d," ".concat(d))),t;default:return t}}};n.\u0275fac=function(e){return new(e||n)(v(F,16))},n.\u0275pipe=T({name:"addSpace",type:n,pure:!0,standalone:!0});let g=n;return g})();var k=o({Id:s,JobTrainer:i(s),ApprenticeshipManagerId:s,ContractDateFrom:i(c),ContractDateTo:i(c)});var N=o({Id:s,RepresentativeId:s,RepresentativeAfterMajority:E});var V=o({Id:s}),B=R({HRef:i(r)}),G=R({From:c,To:c,EventNumber:r,EventDesignation:r,Designation:i(r)}),J=$([V,B,G]),U=o({Id:r,LessonRef:J,StudentRef:a,TypeRef:a,Type:i(r),ConfirmationState:i(r),ConfirmationStateId:s,Comment:i(r),StudentFullName:r,RegistrationId:s,HRef:r});var w=o({Id:r,LessonRef:a,StudentRef:a,TypeRef:a,Type:i(r),Comment:i(r),StudentFullName:r,HRef:r});var M=o({LessonRef:a,StudentRef:a,TypeRef:a,Comment:i(r),StudentFullName:r,Type:i(r),RegistrationId:s,HRef:r});var O=o({Id:s,From:c,To:c,EventId:s,EventNumber:r,EventDesignation:r,EventLocation:i(r),EventManagerInformation:i(r)});var u=class extends j{constructor(n,p,t,e,h,d="Id"){super(n,p,t,e),this.labelAttr=h,this.keyAttr=d,this.typeaheadCodec=o(S(this.codec.props,[this.keyAttr,this.labelAttr]))}getTypeaheadItems(n,p){let t={params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${n}*`}};return this.http.get(`${this.baseUrl}/`,p?this.mergeHttpParams(t,p):t).pipe(m(f(this.typeaheadCodec)),y(e=>e.map(h=>({Key:h[this.keyAttr],Value:h[this.labelAttr]}))))}getTypeaheadItemByKey(n){return this.http.get(`${this.baseUrl}/${n}`,{params:{fields:[this.keyAttr,this.labelAttr].join(",")}}).pipe(m(D(this.typeaheadCodec)),y(p=>({Key:p[this.keyAttr],Value:p[this.labelAttr]})))}mergeHttpParams(n,p){let t={params:b(b({},n.params),p.params)};return p.params.fields&&(t.params.fields=n.params.fields.concat(",",p.params.fields)),t}};var vt=(()=>{let n=class n extends u{constructor(t,e){super(t,e,H,"Students","FullName")}getLegalRepresentatives(t,e){return this.http.get(`${this.baseUrl}/${t}/LegalRepresentatives`,{params:e}).pipe(m(f(N)))}getCurrentApprenticeshipContracts(t,e){return this.http.get(`${this.baseUrl}/${t}/ApprenticeshipContracts/Current`,e).pipe(m(f(k)))}getLessonAbsences(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonAbsences`,{params:e}).pipe(m(f(U)))}getLessonIncidents(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonIncidents`,{params:e}).pipe(m(f(M)))}getLessonDispensations(t,e){return this.http.get(`${this.baseUrl}/${t}/LessonDispensations`,{params:e}).pipe(m(f(w)))}getTimetableEntries(t,e={}){return e instanceof L||(e=new L({fromObject:e})),e=e.set("fields","Id,From,To,EventId,EventNumber,EventDesignation,EventLocation,EventManagerInformation"),this.http.get(`${this.baseUrl}/${t}/TimetableEntries/CurrentSemester`,{params:e}).pipe(m(f(O)))}};n.\u0275fac=function(e){return new(e||n)(I(C),I(x))},n.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"});let g=n;return g})();export{U as a,u as b,vt as c,z as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-DMYOU5OM.js b/public/apps/webapp-schulverwaltung/chunk-5RDJZAUT.js similarity index 84% rename from public/apps/webapp-schulverwaltung/chunk-DMYOU5OM.js rename to public/apps/webapp-schulverwaltung/chunk-5RDJZAUT.js index 5270b8f5..18715c36 100644 --- a/public/apps/webapp-schulverwaltung/chunk-DMYOU5OM.js +++ b/public/apps/webapp-schulverwaltung/chunk-5RDJZAUT.js @@ -1 +1 @@ -import{a as s,b as o,kc as u,lc as l}from"./chunk-T7QWSMKM.js";function a(e){return String(e||"").split("&").reduce((n,r)=>{let[t,i]=r.split("=");return o(s({},n),{[t]:i})},{})}function p(e){return Object.keys(e).reduce((n,r)=>{let t=e[r];return[...n,t==null?r:`${r}=${t}`]},[]).join("&")}function g(e){let i=new l().parse(e)?.root.children[u]?.segments;return i?i[0].path:null}export{a,p as b,g as c}; +import{a as s,b as o,jc as u,kc as l}from"./chunk-XTHSYQMN.js";function a(e){return String(e||"").split("&").reduce((n,r)=>{let[t,i]=r.split("=");return o(s({},n),{[t]:i})},{})}function p(e){return Object.keys(e).reduce((n,r)=>{let t=e[r];return[...n,t==null?r:`${r}=${t}`]},[]).join("&")}function g(e){let i=new l().parse(e)?.root.children[u]?.segments;return i?i[0].path:null}export{a,p as b,g as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-JX2LWS6H.js b/public/apps/webapp-schulverwaltung/chunk-673RVEOB.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-JX2LWS6H.js rename to public/apps/webapp-schulverwaltung/chunk-673RVEOB.js index 1d8b7640..5e859281 100644 --- a/public/apps/webapp-schulverwaltung/chunk-JX2LWS6H.js +++ b/public/apps/webapp-schulverwaltung/chunk-673RVEOB.js @@ -1 +1 @@ -import{c as f}from"./chunk-2FIH3FGB.js";import{D as r,G as m}from"./chunk-GI4AZI25.js";import{d as o}from"./chunk-Q5U6YZUT.js";function d(t,e){let s=o(t),n=o(e);return+s<+n}function p(t,e){let s=+o(t),[n,i]=[+o(e.start),+o(e.end)].sort((a,l)=>a-l);return s>=n&&s<=i}function T(t,e){return t===null&&e===null||t!==null&&e!==null&&t.TeacherInformation===e.TeacherInformation&&t.LessonDateTimeFrom.getTime()===e.LessonDateTimeFrom.getTime()&&t.LessonDateTimeTo.getTime()===e.LessonDateTimeTo.getTime()}function h(t){let e=new u(t.TeacherInformation,t.LessonDateTimeFrom,t.LessonDateTimeTo);return e.addLesson(t),e}var u=class{constructor(e,s,n){this.TeacherInformation=e,this.LessonDateTimeFrom=s,this.LessonDateTimeTo=n,this.lessons=[]}addLesson(e){this.lessons.some(s=>r(s,e))||(this.lessons.push(e),this.updateId(),this.updateStudyClassNumbers(),this.updateEventDesignations())}getIds(){return[...new Set(this.lessons.map(e=>e.LessonRef.Id))]}getEventIds(){return[...new Set(this.lessons.map(e=>e.EventRef.Id))]}updateId(){this.id=[...new Set(this.lessons.map(e=>e.LessonRef.Id).sort())].join("-")}updateStudyClassNumbers(){this.studyClassNumbers=[...new Set(this.lessons.map(e=>e.StudyClassNumber).sort((e,s)=>e.localeCompare(s)))].join(", ")}updateEventDesignations(){this.eventDesignations=[...new Set(this.lessons.map(e=>e.EventDesignation).sort())].join(", ")}};function C(t){return c(t).reduce((e,s)=>{let n=e.find(a=>T(a,s));if(n)return n.addLesson(s),e;let i=h(s);return[...e,i]},[]).sort(m)}function F(t){if(t.length===0)return null;let e=new Date;if(t=[...t].sort(m),f(e,t[0].LessonDateTimeFrom)){for(let s of t)if(d(e,s.LessonDateTimeFrom)||p(e,{start:s.LessonDateTimeFrom,end:s.LessonDateTimeTo}))return s;return t[t.length-1]}return t[0]}function c(t){return t.reduce((e,s)=>e.some(n=>r(n,s))?e:[...e,s],[])}export{C as a,F as b,c}; +import{c as f}from"./chunk-C7XT5XXE.js";import{D as r,G as m}from"./chunk-ZK2MNT7Z.js";import{d as o}from"./chunk-AW7CSGKI.js";function d(t,e){let s=o(t),n=o(e);return+s<+n}function p(t,e){let s=+o(t),[n,i]=[+o(e.start),+o(e.end)].sort((a,l)=>a-l);return s>=n&&s<=i}function T(t,e){return t===null&&e===null||t!==null&&e!==null&&t.TeacherInformation===e.TeacherInformation&&t.LessonDateTimeFrom.getTime()===e.LessonDateTimeFrom.getTime()&&t.LessonDateTimeTo.getTime()===e.LessonDateTimeTo.getTime()}function h(t){let e=new u(t.TeacherInformation,t.LessonDateTimeFrom,t.LessonDateTimeTo);return e.addLesson(t),e}var u=class{constructor(e,s,n){this.TeacherInformation=e,this.LessonDateTimeFrom=s,this.LessonDateTimeTo=n,this.lessons=[]}addLesson(e){this.lessons.some(s=>r(s,e))||(this.lessons.push(e),this.updateId(),this.updateStudyClassNumbers(),this.updateEventDesignations())}getIds(){return[...new Set(this.lessons.map(e=>e.LessonRef.Id))]}getEventIds(){return[...new Set(this.lessons.map(e=>e.EventRef.Id))]}updateId(){this.id=[...new Set(this.lessons.map(e=>e.LessonRef.Id).sort())].join("-")}updateStudyClassNumbers(){this.studyClassNumbers=[...new Set(this.lessons.map(e=>e.StudyClassNumber).sort((e,s)=>e.localeCompare(s)))].join(", ")}updateEventDesignations(){this.eventDesignations=[...new Set(this.lessons.map(e=>e.EventDesignation).sort())].join(", ")}};function C(t){return c(t).reduce((e,s)=>{let n=e.find(a=>T(a,s));if(n)return n.addLesson(s),e;let i=h(s);return[...e,i]},[]).sort(m)}function F(t){if(t.length===0)return null;let e=new Date;if(t=[...t].sort(m),f(e,t[0].LessonDateTimeFrom)){for(let s of t)if(d(e,s.LessonDateTimeFrom)||p(e,{start:s.LessonDateTimeFrom,end:s.LessonDateTimeTo}))return s;return t[t.length-1]}return t[0]}function c(t){return t.reduce((e,s)=>e.some(n=>r(n,s))?e:[...e,s],[])}export{C as a,F as b,c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-7LCBKZQT.js b/public/apps/webapp-schulverwaltung/chunk-7LCBKZQT.js new file mode 100644 index 00000000..2e8ddcb6 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-7LCBKZQT.js @@ -0,0 +1,2 @@ +import{a as Te}from"./chunk-Y4QYVF5K.js";import{a as ye}from"./chunk-HII3S2DL.js";import{b as _e,c as Ge,d as we}from"./chunk-RFO4NYUO.js";import{b as Ee}from"./chunk-FTDG26ID.js";import{a as Tt,b as dt}from"./chunk-SOHFFTKU.js";import{A as yt,a as he,b as Ie,c as be,d as Se,e as ve,p as xe,q as Ce,u as Ct}from"./chunk-C56YGDXA.js";import{$,$a as v,$c as St,Ab as g,Ac as a,Bb as b,Bc as R,C as $t,Cb as K,Cd as ot,Db as Zt,Dd as z,Eb as nt,Ec as E,Fc as C,Fd as xt,G as Xt,Ga as T,Gb as te,Gc as bt,Gd as k,Hd as j,Ia as m,Ic as Ot,J as Jt,Ja as Rt,L as Dt,Mc as o,O as G,Ob as ee,Q as Mt,Rb as rt,Rc as at,Sa as p,Sb as F,Ta as l,Tc as re,Ua as et,Va as ft,Vb as H,Vc as q,W as O,Wa as ht,Wb as ie,Xb as ne,Ya as it,Yc as se,Z as y,_a as A,_c as Ft,a as L,b as U,c as Wt,ca as Y,cb as It,cd as ae,dc as st,dd as oe,e as mt,f as N,fd as de,g as pt,ga as W,ha as Z,hd as le,ia as tt,ib as V,jb as u,k as Pt,kb as w,kd as pe,l as Kt,lb as x,ld as ce,m as I,md as ue,n as ct,nd as me,od as ge,r as gt,ra as Qt,rd as vt,sd as fe,tb as M,ua as d,v as qt,va as D,vb as Yt,w as zt,zc as c}from"./chunk-XTHSYQMN.js";function si(i,e){if(i&1&&(p(0,"option",3),u(1),g(2,"translate"),l()),i&2){let r=v();m("ngValue",null),d(),x(" ",b(2,2,r.emptyLabel)," ")}}function ai(i,e){if(i&1&&(p(0,"option",3),u(1),l()),i&2){let r=e.$implicit;m("ngValue",r),d(),x(" ",r.Value," ")}}var Pe=(()=>{let e=class e{constructor(){this.options=[],this.allowEmpty=!0,this.emptyLabel="",this.value=null,this.disabled=!1,this.tabindex=0,this.valueChange=new Qt,this.options$=new N([]),this.rawValue$=new N(null),this.value$=ct([this.rawValue$,this.options$]).pipe(I(([t,n])=>n&&n.find(s=>s.Key===t)||null))}ngOnChanges(t){t.value&&this.rawValue$.next(t.value.currentValue),t.options&&this.options$.next(t.options.currentValue)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=$({type:e,selectors:[["bkd-select"]],inputs:{options:"options",allowEmpty:"allowEmpty",emptyLabel:"emptyLabel",value:"value",disabled:"disabled",tabindex:"tabindex"},outputs:{valueChange:"valueChange"},standalone:!0,features:[W,M],decls:5,vars:7,consts:[[1,"form-select",3,"ngModelChange","tabindex","disabled","ngModel"],[3,"ngValue",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"]],template:function(n,s){n&1&&(p(0,"select",0),g(1,"async"),A("ngModelChange",function(_){return s.valueChange.emit(_&&_.Key)}),T(2,si,3,4,"option",1)(3,ai,2,2,"option",2),u(4,` > +`),l()),n&2&&(It("tabindex",s.tabindex),m("disabled",s.disabled)("ngModel",b(1,5,s.value$)),d(2),m("ngIf",s.allowEmpty),d(),m("ngForOf",s.options))},dependencies:[vt,ce,ue,pe,St,oe,F,rt,H,j,k],changeDetection:0});let i=e;return i})();var $e=C({Id:a,Designation:c,StudentCount:a,Number:c});var kt=C({Id:c,TestId:a,CourseRegistrationId:a,GradeId:o(a),GradeValue:o(a),GradeDesignation:o(c),Points:o(a),StudentId:a});var De=C({Id:a,CourseId:a,Date:at,Designation:c,Weight:a,WeightPercent:a,IsPointGrading:R,MaxPoints:o(a),MaxPointsAdjusted:o(a),IsPublished:R,IsOwner:R,Owner:o(c),GradingScaleId:o(a),Results:o(E(kt))});var Me=C({Id:a}),Re=bt({HRef:o(c)}),oi=bt({HasEvaluationStarted:R,EvaluationUntil:o(at),HasReviewOfEvaluationStarted:R,HasTestGrading:R,Id:a}),di=Ot([Me,Re,oi]),li=bt({Id:a,StudentCount:a}),pi=Ot([Me,Re,li]),ci=C({Grade:c,AverageTestResult:a,Id:a,StudentId:a}),jt=C({AverageTestResult:a,CanGrade:R,EventId:a,GradeId:o(a),GradeValue:o(a),Id:a,StudentId:a}),lt=C({HRef:c,Id:a,Number:c,Designation:c,DateFrom:o(at),DateTo:o(at),StatusId:a,GradingScaleId:o(a),FinalGrades:o(E(ci)),Gradings:o(E(jt)),Tests:o(E(De)),EvaluationStatusRef:di,AttendanceRef:pi,ParticipatingStudents:o(E(Ge)),Classes:o(E($e))}),Oe=C({TestResults:E(kt),Gradings:E(jt)}),Fe=C({Gradings:E(jt)});var _t=(()=>{let e=class e extends dt{constructor(t,n){super(t,n,lt,"Courses"),this.statusCodec=C(re(this.codec.props,["Id","StatusId","EvaluationStatusRef"]))}getNumberOfCoursesForRating(){return this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef&fields=Id,StatusId,EvaluationStatusRef&filter.StatusId=;10300;10240`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(G(z(this.statusCodec)),I(t=>t.filter(n=>n.EvaluationStatusRef.HasEvaluationStarted===!0)),I(t=>t.length))}getExpandedCourses(t){return Te(t,"TeacherRole")?this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef,AttendanceRef,Classes,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(G(z(lt))):Pt([])}getExpandedCourse(t){return this.http.get(`${this.baseUrl}/${t}?expand=ParticipatingStudents,EvaluationStatusRef,Tests,Gradings,FinalGrades,Classes`).pipe(G(ot(lt)))}getExpandedCoursesForDossier(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades,EvaluationStatusRef,ParticipatingStudents,Classes&filter.StatusId=;${this.settings.eventlist.statusfilter}`).pipe(G(z(lt)))}getExpandedCoursesForStudent(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"StudentRole"}}).pipe(G(z(lt)))}add(t,n,s,f,_,B,h){let S={Tests:[{Date:n,Designation:s,Weight:f,IsPointGrading:_,MaxPoints:B,MaxPointsAdjusted:h}]};return this.http.put(`${this.baseUrl}/${t}/Tests/New`,S).pipe(I(()=>{}))}update(t,n,s,f,_,B,h,S){let Q={Tests:[{Id:n,Designation:s,Date:f,Weight:_,IsPointGrading:B,MaxPoints:h,MaxPointsAdjusted:S}]};return this.http.put(`${this.baseUrl}/${t}/Tests/Update`,Q).pipe(I(()=>{}))}delete(t,n){let s={TestIds:[n]};return this.http.put(`${this.baseUrl}/${t}/Tests/Delete`,s).pipe(I(()=>n))}updateTestResult(t,n){let S=n,{studentId:s,testId:f}=S,_=Wt(S,["studentId","testId"]),B={StudentIds:[s],TestId:f},h="gradeId"in _?U(L({},B),{GradeId:_.gradeId}):U(L({},B),{Points:_.points});return this.http.put(`${this.baseUrl}/${t}/SetTestResult`,h).pipe(G(ot(Oe)),G(({TestResults:Q,Gradings:Ut})=>Q.length<=1&&Ut.length===1?Pt({courseId:t,testResult:Q[0]??null,grading:Ut[0]}):Kt(()=>new Error("`TestResults` or `Gradings` does not contain a single value"))))}setAverageAsFinalGrade(t){return this.http.put(`${this.baseUrl}/SetAverageTestResult`,t).pipe(G(ot(Fe)))}publishTest(t){let n={TestIds:[t]};return this.http.put(`${this.baseUrl}/PublishTest`,n).pipe(I(()=>t))}unpublishTest(t){let n={TestIds:[t]};return this.http.put(`${this.baseUrl}/UnpublishTest`,n).pipe(I(()=>t))}};e.\u0275fac=function(n){return new(n||e)(y(st),y(q))},e.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function Be(i){return i.length===0?0:Bt(i.map(({value:e,weight:r})=>e*r))/Bt(i.map(({weight:e})=>e))}function Nt(i){return i.length===0?0:Number(Bt(i)/i.length)}function Bt(i){return i.reduce(ui,0)}function ui(i,e){return i+e}function Sn(i,e,r){return i?i.Tests?.reduce((t,n)=>t||n.Id===e&&n.Results?.find(s=>s.TestId===e&&s.StudentId===r)||null,null)??null:null}function vn(i,e,r){return e.map(t=>t.Id===i.TestId?Vt(i,t,r):t)}function xn(i,e,r){return r.map(t=>t.Id===i?mi(e,t):t)}function Cn(i,e){return e.map(r=>r.Id===i?U(L({},r),{IsPublished:!r.IsPublished}):r)}function yn(i){let e=fi(i);if(e.length===0)throw new Error("unable to calculate averages without results");return Nt(e)}function At(i){return i.MaxPointsAdjusted||i.MaxPoints}function Tn(i){let e=gi(i);if(e.length===0)throw new Error("unable to calculate averages without results");return Nt(e)}function J(i,e){return e.Results?.find(r=>r.StudentId===i)}function _n(i,e){return e===null?null:e.filter(r=>r.Id!==i)}function Vt(i,e,r){let t=r&&e.Results?.find(s=>s.TestId===i.TestId&&s.StudentId===i.StudentId),n=e.Results?.filter(s=>!(s.TestId===i.TestId&&s.StudentId===i.StudentId))||[];return t&&r==="grade"?i.GradeId=t.GradeId:t&&r==="points"&&(i.Points=t.Points),U(L({},e),{Results:[...n,i]})}function Ae(i){return i.slice().sort((e,r)=>r.Date.getTime()-e.Date.getTime())}function Gt(i,e){return e?.find(r=>r.Id===i.GradingScaleId)||null}function mi(i,e){return U(L({},e),{Results:e.Results?.filter(r=>r.StudentId!==i)||[]})}function gi(i){return i.Results?.filter(e=>e.GradeDesignation!==null).map(e=>Number(e.GradeDesignation)).filter(e=>!isNaN(e))||[]}function fi(i){return i.Results?.map(e=>e.Points!==null?e.Points:Ne).filter(e=>e>Ne)||[]}var Ne=-1;var Ht=C({Id:c,SubscriptionId:a,VssId:a,EventId:a,DropdownItems:o(E(ye)),IdPerson:a,ShowAsRadioButtons:R,Value:o(c)}),Ve=C({Id:a,CurrentWorkProgressId:o(c||o(a)),EventId:o(a),PersonId:o(a),Status:c,StatusId:o(a),IsOkay:o(R),IsQueued:o(R),EventDesignation:o(c),EventInformation:o(c||a),EventNotes:o(c||a),CheckPersonalInformation:o(R),CorrespondencePersonId:o(a),CorrespondenceAddressTypeId:o(c||a),Billing1PersonId:o(a),Billing1AddressTypeId:o(c||a),Billing2PersonId:o(c||a),Billing2AddressTypeId:o(c||a),KindOfPaymentId1:o(c||a),KindOfPaymentEmail1:o(c||a),KindOfPaymentId2:o(c||a),KindOfPaymentEmail2:o(c||a),IdObject:o(a),IdSubscription:o(a),IdStatus:o(a),AnsweredQuestions:o(c||a),Messages:o(c||a),SubscriptionDetails:o(E(Ht)),HRef:o(c)});var He=(()=>{let e=class e extends dt{constructor(t,n){super(t,n,Ht,"Subscriptions")}getIdSubscriptionsByStudentAndCourse(t,n){return this.http.get(`${this.settings.apiUrl}/Subscriptions/?filter.PersonId==${t}&filter.EventId=;${n}`).pipe(G(z(Ve)))}};e.\u0275fac=function(n){return new(n||e)(y(st),y(q))},e.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Ii=C({Id:a,Designation:c}),Lt=C({Id:a,Grades:E(Ii)});var Le=(()=>{let e=class e extends dt{constructor(t,n){super(t,n,Lt,"GradingScales")}getGradingScale(t){return this.http.get(`${this.baseUrl}/${t}`).pipe(G(ot(Lt)))}getGradingScales(t){return gt(t.map(this.getGradingScale.bind(this)))}};e.\u0275fac=function(n){return new(n||e)(y(st),y(q))},e.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Et=(()=>{let e=class e{constructor(t,n,s,f,_,B){this.coursesRestService=t,this.subscriptionRestService=n,this.reportsService=s,this.loadingService=f,this.gradingScalesRestService=_,this.settings=B,this.studentId$=new pt(1),this.initialStudentCourses$=this.studentId$.pipe(Xt(),G(this.loadCourses.bind(this)),I(h=>h.sort((S,Q)=>S.Designation.localeCompare(Q.Designation))),Dt(1)),this.action$=new pt(1),this.studentCourses$=qt(this.action$,this.initialStudentCourses$.pipe(I(h=>({type:"initializeCourses",payload:h})))).pipe(Jt(this.coursesReducer.bind(this),[]),Dt(1)),this.loading$=this.loadingService.loading$,this.studentCourseIds$=this.studentCourses$.pipe(I(h=>h.flatMap(S=>S.Id))),this.idSubscriptions$=ct([this.studentId$,this.studentCourseIds$]).pipe(G(([h,S])=>this.subscriptionRestService.getIdSubscriptionsByStudentAndCourse(h,S))),this.ids$=this.idSubscriptions$.pipe(I(h=>h.map(S=>S.Id))),this.testReports$=this.ids$.pipe(I(h=>this.reportsService.getTeacherSubscriptionReports(h))),this.tests$=this.studentCourses$.pipe(I(h=>h.flatMap(S=>S.Tests).filter(Ct))),this.gradingScaleIdsFromTests$=this.tests$.pipe(I(h=>[...h.map(S=>S.GradingScaleId)].filter(Ct).filter(yt))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(I(h=>h.flatMap(S=>S.GradingScaleId).filter(Ct).filter(yt))),this.gradingScaleIds$=ct([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(I(([h,S])=>h.concat(S).filter(yt))),this.gradingScales$=this.gradingScaleIds$.pipe(G(h=>gt(h.map(S=>this.gradingScalesRestService.getGradingScale(S)))))}setStudentId(t){this.studentId$.next(t)}getFinalGradeForStudent(t,n){return t?.FinalGrades?.find(s=>s.StudentId===n)}getGradingForStudent(t,n){return t?.Gradings?.find(s=>s.StudentId===n)}getGradingScaleOfCourse(t,n){return n?.find(s=>s.Id===t.GradingScaleId)}getGradesForStudent(t,n,s){return t.Tests?.flatMap(f=>({value:Number(Gt(f,s)?.Grades.find(B=>B.Id===J(n,f)?.GradeId)?.Designation),weight:f.Weight})).filter(({value:f})=>!!f)||[]}updateStudentCourses(t){this.action$.next({type:"updateCourses",payload:t})}loadCourses(t){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForDossier().pipe(I(n=>n.filter(s=>s.ParticipatingStudents?.find(f=>f.Id===t)))))}coursesReducer(t,n){switch(n.type){case"initializeCourses":return n.payload;case"updateCourses":return this.updateCourses([...t],n.payload);default:return t}}updateCourses(t,n){return t.map(s=>U(L({},s),{Tests:s.Tests!==null?s.Tests.map(f=>f.Id===n.Id?n:f):null}))}};e.\u0275fac=function(n){return new(n||e)(y(_t),y(He),y(we),y(Ee),y(Le),y(q))},e.\u0275prov=O({token:e,factory:e.\u0275fac});let i=e;return i})();var We=(()=>{let e=class e{constructor(){}get inIframe(){return window.parent!==window}get window(){return this.inIframe?window.parent:null}get document(){return this.window?.document.documentElement??null}querySelector(t){return this.window?.document?.querySelector("bkd-portal")?.shadowRoot?.querySelector(t)??null}getIframeElement(){return this.querySelector("bkd-content")?.shadowRoot?.querySelector("iframe")??null}getIframeTop(){return this.getIframeElement()?.offsetTop??0}getIFrameBottom(){let t=this.getIframeElement();return t?t.offsetTop+t.offsetHeight:0}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Ke=(()=>{let e=class e{constructor(t,n){this.modal=t,this.portal=n}open(...t){let n=this.modal.open(...t);return this.applyPortalOffsetAndMaxHeight(n),this.disablePortalScrolling(n),n}get activeInstances(){return this.modal.activeInstances}dismissAll(...t){return this.modal.dismissAll(...t)}hasOpenModals(...t){return this.modal.hasOpenModals(...t)}applyPortalOffsetAndMaxHeight(t){let n=this.getModalWindowElement(t);if(!n){console.warn("Trying to apply portal offset to , but element is not present!");return}this.portal.window&&(n.style.top=`${this.getModalIframeOffset()}px`,n.style.maxHeight=`${this.getModalHeight()}px`)}disablePortalScrolling(t){if(this.portal.window&&this.portal.document){let n=this.portal.window.innerWidth-this.portal.document.clientWidth;this.portal.document.style.paddingRight=`${n}px`,this.portal.document.style.overflow="hidden"}t.hidden.subscribe(()=>{this.portal.document&&(this.portal.document.style.paddingRight="0px",this.portal.document.style.overflow="auto")})}getModalWindowElement(t){return t._windowCmptRef?.instance?._elRef?.nativeElement??null}getModalIframeOffset(){return Math.max(this.getViewportTop()-this.portal.getIframeTop(),0)}getModalTop(){return Math.max(this.getViewportTop(),this.portal.getIframeTop())}getModalBottom(){return Math.min(this.getViewportBottom(),this.portal.getIFrameBottom())}getModalHeight(){return this.getModalBottom()-this.getModalTop()}getViewportTop(){return this.portal.window?.scrollY??0}getViewportBottom(){return this.getViewportTop()+this.getViewportHeight()}getViewportHeight(){return this.portal.window?.innerHeight??0}};e.\u0275fac=function(n){return new(n||e)(y(Ce),y(We))},e.\u0275prov=O({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function wt(i,e,r){return e?e.Grade:Ci(i,r)||i?.GradeValue}function Ci(i,e){return e?.Grades.find(r=>r.Id===i?.GradeId)?.Designation}var yi="1-3",ze="\u2013",Xe=(()=>{let e=class e{constructor(t){this.locale=t}transform(t,n,s){let f=Number(t??null);return isNaN(f)?ze:Ti(Number(t??null),s??this.locale,n)}};e.\u0275fac=function(n){return new(n||e)(D(te,16))},e.\u0275pipe=Y({name:"decimalOrDash",type:e,pure:!0,standalone:!0});let i=e;return i})();function Ti(i,e,r){return i===0?ze:ee(i,e,`1.${_i(r)}`)}function _i(i){return i?String(i).includes("-")?String(i):`${i}-${i}`:yi}var Je=(()=>{let e=class e{constructor(){}getGradeForStudent(){return wt(this.grading,this.finalGrade,this.gradingScale)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=$({type:e,selectors:[["bkd-dossier-grades-final-grade"]],inputs:{finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},standalone:!0,features:[M],decls:14,vars:11,consts:[[1,"final-entry"],["data-testid","final-grade"],["data-testid","average-test-results"]],template:function(n,s){n&1&&(p(0,"div",0)(1,"div"),u(2),g(3,"translate"),l(),p(4,"div",1)(5,"span"),u(6),l()(),p(7,"div"),u(8),g(9,"translate"),l(),p(10,"div",2)(11,"span"),u(12),g(13,"decimalOrDash"),l()()()),n&2&&(d(2),w(b(3,4,"dossier.grade")),d(4),w(s.getGradeForStudent()||"\u2013"),d(2),w(b(9,6,"dossier.average")),d(4),w(K(13,8,s.average,"1-3")))},dependencies:[j,k,Xe],styles:[".final-entry[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:repeat(2,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}"]});let i=e;return i})();var Qe=(()=>{let e=class e{constructor(t){this.translate=t}transform(t,n,s,f="tests.points"){return t.IsPointGrading&&(t.IsPublished||s)?`${J(n,t)?.Points||"\u2013"} / ${t.MaxPointsAdjusted||t.MaxPoints} ${this.translate.instant(f)}`:""}};e.\u0275fac=function(n){return new(n||e)(D(xt,16))},e.\u0275pipe=Y({name:"bkdTestPoints",type:e,pure:!0,standalone:!0});let i=e;return i})();var Ye=(()=>{let e=class e{constructor(t){this.translate=t}transform(t){return`${this.translate.instant("tests.factor")} ${t.Weight} (${t.WeightPercent}%)`}};e.\u0275fac=function(n){return new(n||e)(D(xt,16))},e.\u0275pipe=Y({name:"bkdTestWeight",type:e,pure:!0,standalone:!0});let i=e;return i})();var Gi=i=>({maxPoints:i});function Ei(i,e){if(i&1&&(p(0,"div",15),u(1),g(2,"translate"),l()),i&2){let r=v(2);d(),x(" ",K(2,1,"global.validation-errors.invalidPoints",Yt(4,Gi,r.maxPoints))," ")}}function wi(i,e){if(i&1){let r=it();p(0,"div",11)(1,"label",12),u(2),g(3,"translate"),l(),p(4,"div",6)(5,"input",13,0),A("input",function(){Z(r);let n=V(6),s=v();return tt(s.onPointsChange(n.value))}),l()(),T(7,Ei,3,6,"div",14),l()}if(i&2){let r=v();d(2),w(b(3,8,"dossier.dialog.points")),d(2),Rt("is-invalid",r.pointsInput.errors),d(),Rt("is-invalid",r.pointsInput.errors),It("max",r.maxPoints),m("formControl",r.pointsInput),d(2),m("ngIf",r.pointsInput.errors)}}var Ze=500,ti=(()=>{let e=class e{constructor(t,n){this.activeModal=t,this.courseService=n,this.maxPoints=0,this.gradeSubject$=new mt,this.pointsSubject$=new mt,this.closeButtonDisabled$=new N(!1),this.gradingScaleDisabled$=new N(!0),this.grade$=this.gradeSubject$.pipe($t(Ze)),this.points$=this.pointsSubject$.pipe($t(Ze),zt(this.isValid.bind(this)),I(Number)),this.destroy$=new mt}ngOnInit(){this.maxPoints=At(this.test),this.pointsInput=new ae({value:this.points,disabled:!1},[Ft.min(0),Ft.pattern("[0-9]+([\\.][0-9]+)?"),this.maxPointValidator()]),this.gradingScaleDisabled$.next(this.test.IsPointGrading&&this.points>0),this.points$.pipe(Mt(this.destroy$)).subscribe(t=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,points:t})),this.grade$.pipe(Mt(this.destroy$)).subscribe(t=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,gradeId:t}))}onGradeChange(t){this.gradeSubject$.next(t)}onPointsChange(t){this.pointsSubject$.next(t),this.gradingScaleDisabled$.next(t.length>0)}updateTestResult(t){this.closeButtonDisabled$.next(!0),this.courseService.updateTestResult(this.test.CourseId,t).subscribe(({testResult:n})=>{this.gradeId=n?.GradeId??null,this.updatedTestResult=n,this.closeButtonDisabled$.next(!1)})}isValid(t){return t===""||isNaN(Number(t))?!1:!(Number(t)<0||Number(t)>this.maxPoints)}maxPointValidator(){return t=>Number(t.value)>At(this.test)?{customMax:!0}:null}};e.\u0275fac=function(n){return new(n||e)(D(xe),D(_t))},e.\u0275cmp=$({type:e,selectors:[["bkd-dossier-grades-edit"]],inputs:{test:"test",gradeId:"gradeId",gradeOptions:"gradeOptions",points:"points",studentId:"studentId"},standalone:!0,features:[M],decls:19,vars:20,consts:[["pointInput",""],[1,"modal-body"],[1,"mb-4"],["class","form-group row",4,"ngIf"],[1,"form-group","row","mt-2"],["for","grade",1,"col-6","col-form-label"],[1,"col-6"],["id","grade",3,"valueChange","options","value","allowEmpty","disabled"],[1,"text-muted","mt-4"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"form-group","row"],["for","points",1,"col-6","col-form-label"],["id","points","type","number","step","0.01","min","0",1,"form-control",3,"input","max","formControl"],["class","invalid-feedback col-6 offset-6","data-testid","validation-error-message",4,"ngIf"],["data-testid","validation-error-message",1,"invalid-feedback","col-6","offset-6"]],template:function(n,s){n&1&&(p(0,"div",1)(1,"p",2),u(2),l(),T(3,wi,8,10,"div",3),p(4,"div",4)(5,"label",5),u(6),g(7,"translate"),l(),p(8,"div",6)(9,"bkd-select",7),g(10,"async"),A("valueChange",function(_){return _&&s.onGradeChange(_)}),l()()(),p(11,"p",8),u(12),g(13,"translate"),l()(),p(14,"div",9)(15,"button",10),g(16,"async"),A("click",function(){return s.activeModal.close(s.updatedTestResult)}),u(17),g(18,"translate"),l()()),n&2&&(d(2),w(s.test.Designation),d(),m("ngIf",s.test.IsPointGrading),d(3),w(b(7,10,"dossier.dialog.grade")),d(3),m("options",s.gradeOptions)("value",s.gradeId)("allowEmpty",!1)("disabled",b(10,12,s.gradingScaleDisabled$)),d(3),x(" ",b(13,14,s.test.IsPointGrading?"dossier.dialog.hint.points":"dossier.dialog.hint.grade")," "),d(3),m("disabled",b(16,16,s.closeButtonDisabled$)),d(2),x(" ",b(18,18,"dossier.dialog.close")," "))},dependencies:[F,vt,se,de,St,ge,me,fe,le,Pe,H,j,k]});let i=e;return i})();function Pi(i,e){if(i&1){let r=it();p(0,"a",11),A("click",function(){Z(r);let n=v().bkdLet,s=v();return tt(s.editGrading(n))}),p(1,"i",12),u(2,"edit"),l(),p(3,"span",13),u(4),g(5,"async"),l()()}if(i&2){let r=v(2);d(4),w(b(5,1,r.grading$))}}function $i(i,e){if(i&1&&(p(0,"span",13),u(1),g(2,"async"),l()),i&2){let r=v(2);d(),w(b(2,1,r.grading$))}}function Di(i,e){if(i&1&&(p(0,"div",14),u(1),g(2,"translate"),l()),i&2){let r=v().bkdLet;d(),x(" ",b(2,1,r.IsPublished?"tests.published":"tests.not-published")," ")}}function Mi(i,e){if(i&1&&(p(0,"div",2)(1,"div",3),u(2),l(),p(3,"div",4),u(4),g(5,"date"),l(),p(6,"div",5),T(7,Pi,6,3,"a",6)(8,$i,3,3,"ng-template",null,0,nt),l(),p(10,"div",7),u(11),g(12,"bkdTestWeight"),l(),p(13,"div",8)(14,"span"),u(15),g(16,"bkdTestPoints"),l()(),p(17,"div",9),u(18),l(),T(19,Di,3,3,"div",10),l()),i&2){let r=e.bkdLet,t=V(9),n=v();d(2),x(" ",r.Designation," "),d(2),x(" ",K(5,8,r.Date,"dd.MM.yyyy")," "),d(3),m("ngIf",n.isEditable&&r.IsOwner)("ngIfElse",t),d(4),x(" ",b(12,11,r)," "),d(4),w(Zt(16,13,r,n.studentId,n.isEditable,"dossier.points")),d(3),x(" ",r.Owner," "),d(),m("ngIf",n.isEditable)}}var ei=(()=>{let e=class e{constructor(t,n){this.gradeService=t,this.modalService=n,this.test$=new pt(1),this.grading$=this.test$.pipe(I(this.getGrading.bind(this)))}ngOnChanges(t){t.test&&this.test$.next(this.test)}editGrading(t){let n=this.modalService.open(ti,{backdrop:"static"});n.componentInstance.test=t,n.componentInstance.gradeId=this.getGradeId(t),n.componentInstance.gradeOptions=e.mapToOptions(this.gradingScale),n.componentInstance.studentId=this.studentId,n.componentInstance.points=this.getPoints(t),n.result.then(s=>{s&&this.updateStudentGrade(s,t)},()=>{})}updateStudentGrade(t,n){let s=Vt(t,n);this.gradeService.updateStudentCourses(s)}getGrading(t){return this.gradingScale?.Grades.find(n=>n.Id===this.getGradeId(t))?.Designation||"\u2013"}getGradeId(t){return J(this.studentId,t)?.GradeId||null}getPoints(t){return J(this.studentId,t)?.Points||null}static mapToOptions(t){return t?.Grades.map(n=>({Key:n.Id,Value:n.Designation}))||null}};e.\u0275fac=function(n){return new(n||e)(D(Et),D(Ke))},e.\u0275cmp=$({type:e,selectors:[["bkd-dossier-single-test"]],inputs:{test:"test",studentId:"studentId",gradingScale:"gradingScale",isEditable:"isEditable"},standalone:!0,features:[W,M],decls:2,vars:3,consts:[["notEditable",""],["class","test-entry",4,"bkdLet"],[1,"test-entry"],["data-testid","test-designation",1,"designation"],["data-testid","test-date",1,"date"],[1,"grade"],["class","btn btn-link","aria-label","edit grade",3,"click",4,"ngIf","ngIfElse"],["data-testid","test-factor",1,"factor"],["data-testid","test-points",1,"points"],["data-testid","test-teacher",1,"teacher"],["class","state","data-testid","test-status",4,"ngIf"],["aria-label","edit grade",1,"btn","btn-link",3,"click"],["data-testid","test-grade-edit-icon",1,"material-icons"],["data-testid","test-grade"],["data-testid","test-status",1,"state"]],template:function(n,s){n&1&&(T(0,Mi,20,18,"div",1),g(1,"async")),n&2&&m("bkdLet",b(1,1,s.test$))},dependencies:[Tt,F,H,ie,j,k,Qe,Ye],styles:['.test-entry[_ngcontent-%COMP%]{border-top:1px solid #dee2e6;padding:1rem;display:grid;grid-template-areas:"designation designation grade factor" "date date points ." "teacher teacher . ." "state state . .";grid-template-columns:repeat(4,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}.designation[_ngcontent-%COMP%]{grid-area:designation}.date[_ngcontent-%COMP%]{grid-area:date}.grade[_ngcontent-%COMP%]{grid-area:grade}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;color:#000;padding:0;text-decoration:none}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.grade[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:-1em;color:#00000080}.points[_ngcontent-%COMP%]{grid-area:points;color:#00000080}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.state[_ngcontent-%COMP%]{grid-area:state}@media (max-width: 575.98px){.test-entry[_ngcontent-%COMP%]{grid-template-areas:"designation designation" "date grade" "factor points" "teacher teacher" "state state";grid-template-columns:repeat(2,1fr)}}']});let i=e;return i})();function Ri(i,e){if(i&1&&et(0,"bkd-dossier-single-test",5),i&2){let r=e.$implicit,t=v(3);m("test",r)("studentId",t.studentId)("gradingScale",t.getGradingScaleOfTest(r))("isEditable",t.isEditable)}}function Oi(i,e){if(i&1&&(p(0,"div"),et(1,"bkd-dossier-grades-final-grade",3),T(2,Ri,1,4,"bkd-dossier-single-test",4),l()),i&2){let r=v().bkdLet,t=v();d(),m("finalGrade",t.decoratedCourse.finalGrade)("grading",t.decoratedCourse.grading)("gradingScale",t.decoratedCourse.gradingScale)("average",t.decoratedCourse.average),d(),m("ngForOf",r)}}function Fi(i,e){i&1&&(p(0,"p",6),u(1),g(2,"translate"),l()),i&2&&(d(),x(" ",b(2,1,"dossier.no-tests")," "))}function ki(i,e){if(i&1&&(ft(0),T(1,Oi,3,5,"div",2)(2,Fi,3,3,"ng-template",null,0,nt),ht()),i&2){let r=e.bkdLet,t=V(3);d(),m("ngIf",r.length>0)("ngIfElse",t)}}var ii=(()=>{let e=class e{ngOnChanges(t){t.decoratedCourse&&this.sortedTests$.next(this.sortedTests())}constructor(){this.sortedTests$=new N([])}sortedTests(){return this.decoratedCourse.course.Tests?Ae(this.decoratedCourse.course.Tests):[]}getGradingScaleOfTest(t){return Gt(t,this.gradingScales)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=$({type:e,selectors:[["bkd-dossier-course-tests"]],inputs:{studentId:"studentId",decoratedCourse:"decoratedCourse",gradingScales:"gradingScales",isEditable:"isEditable"},standalone:!0,features:[W,M],decls:2,vars:3,consts:[["noTests",""],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[3,"finalGrade","grading","gradingScale","average"],[3,"test","studentId","gradingScale","isEditable",4,"ngFor","ngForOf"],[3,"test","studentId","gradingScale","isEditable"],["data-testid","message-no-tests",1,"p-3"]],template:function(n,s){n&1&&(T(0,ki,4,2,"ng-container",1),g(1,"async")),n&2&&m("bkdLet",b(1,1,s.sortedTests$))},dependencies:[Tt,F,Je,rt,ei,H,j,k]});let i=e;return i})();function ji(i,e){if(i&1&&(p(0,"span",2),u(1),l()),i&2){let r=v();d(),x(" (",r.grade,")")}}function Bi(i,e){if(i&1&&(p(0,"span",3),u(1),g(2,"number"),l()),i&2){let r=v();d(),x(" (",K(2,1,r.average,"1.1-3"),")")}}var ni=(()=>{let e=class e{constructor(){}get grade(){return this.getGradeForStudent()}getGradeForStudent(){return wt(this.grading,this.finalGrade,this.gradingScale)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=$({type:e,selectors:[["bkd-dossier-grades-course-header"]],inputs:{designation:"designation",finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},standalone:!0,features:[M],decls:3,vars:3,consts:[["class","grade","data-testId","grade",4,"ngIf"],["class","average","data-testId","average",4,"ngIf"],["data-testId","grade",1,"grade"],["data-testId","average",1,"average"]],template:function(n,s){n&1&&(u(0),T(1,ji,2,1,"span",0)(2,Bi,3,4,"span",1)),n&2&&(w(s.designation),d(),m("ngIf",s.grade),d(),m("ngIf",!s.grade&&s.average))},dependencies:[F,ne],styles:[".average[_ngcontent-%COMP%]{color:#00000080}"]});let i=e;return i})();function Ni(i,e){if(i&1&&et(0,"bkd-dossier-course-tests",11),i&2){let r=v().$implicit,t=v(2);m("decoratedCourse",r)("studentId",t.studentId)("gradingScales",t.gradingScales)("isEditable",t.isEditable)}}function Ai(i,e){if(i&1){let r=it();p(0,"div")(1,"div",4)(2,"div",5,1)(4,"div",6)(5,"bkd-student-dossier-entry-header",7),A("click",function(){Z(r);let n=V(3);return tt(n.toggle())}),et(6,"bkd-dossier-grades-course-header",8),l()(),p(7,"div",9)(8,"div",10),T(9,Ni,1,4,"ng-template"),l()()()()()}if(i&2){let r=e.$implicit,t=V(3);d(5),m("opened",!t.collapsed),d(),m("designation",r.course.Designation)("finalGrade",r.finalGrade)("grading",r.grading)("gradingScale",r.gradingScale)("average",r.average)}}function Vi(i,e){if(i&1&&(ft(0),T(1,Ai,10,6,"div",3),g(2,"async"),ht()),i&2){let r=v();d(),m("ngForOf",b(2,2,r.decoratedCoursesSubject$))("ngForTrackBy",r.trackByCourseId)}}function Hi(i,e){i&1&&(p(0,"p",12),u(1),g(2,"translate"),l()),i&2&&(d(),x(" ",b(2,1,"dossier.no-courses")," "))}var Hr=(()=>{let e=class e{constructor(t){this.dossierGradeService=t,this.isEditable=!0,this.decoratedCoursesSubject$=new N([])}ngOnChanges(){this.decoratedCoursesSubject$.next(this.decorateCourses())}trackByCourseId(t,n){return n.course.Id}decorateCourses(){return this.courses?.map(t=>{let n=this.dossierGradeService.getFinalGradeForStudent(t,this.studentId),s=this.dossierGradeService.getGradesForStudent(t,this.studentId,this.gradingScales);return{course:t,finalGrade:n,grading:this.dossierGradeService.getGradingForStudent(t,this.studentId),gradingScale:this.dossierGradeService.getGradingScaleOfCourse(t,this.gradingScales),average:n?.AverageTestResult||Be(s)}})}};e.\u0275fac=function(n){return new(n||e)(D(Et))},e.\u0275cmp=$({type:e,selectors:[["bkd-dossier-grades-view"]],inputs:{courses:"courses",studentId:"studentId",gradingScales:"gradingScales",isEditable:"isEditable"},standalone:!0,features:[W,M],decls:3,vars:2,consts:[["noCourses",""],["courses","ngbAccordionItem"],[4,"ngIf","ngIfElse"],[4,"ngFor","ngForOf","ngForTrackBy"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[3,"designation","finalGrade","grading","gradingScale","average"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"decoratedCourse","studentId","gradingScales","isEditable"],["data-testid","message-no-courses",1,"py-3"]],template:function(n,s){if(n&1&&T(0,Vi,3,4,"ng-container",2)(1,Hi,3,3,"ng-template",null,0,nt),n&2){let f,_=V(2);m("ngIf",((f=s.courses==null?null:s.courses.length)!==null&&f!==void 0?f:0)>0)("ngIfElse",_)}},dependencies:[F,rt,ve,Se,be,_e,ni,Ie,he,ii,H,j,k]});let i=e;return i})();export{Nt as a,Sn as b,vn as c,xn as d,Cn as e,yn as f,Tn as g,_n as h,Ae as i,ze as j,Xe as k,Ti as l,Pe as m,$e as n,jt as o,_t as p,Ht as q,He as r,Le as s,Et as t,We as u,Ke as v,Hr as w}; diff --git a/public/apps/webapp-schulverwaltung/chunk-AJF2ECIH.js b/public/apps/webapp-schulverwaltung/chunk-7T3G7FUV.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-AJF2ECIH.js rename to public/apps/webapp-schulverwaltung/chunk-7T3G7FUV.js index 136cdcae..c40a5086 100644 --- a/public/apps/webapp-schulverwaltung/chunk-AJF2ECIH.js +++ b/public/apps/webapp-schulverwaltung/chunk-7T3G7FUV.js @@ -1 +1 @@ -import{a as Le,b as Ne,c as Ve,d as Oe,e as je}from"./chunk-KLXFX6SJ.js";import"./chunk-HHGALFFJ.js";import{b as De}from"./chunk-MVTCHCDH.js";import"./chunk-WN7VWSJW.js";import"./chunk-X2BR3YJG.js";import{b as Fe,d as Re}from"./chunk-LO5XSJLW.js";import"./chunk-RWNJF4OZ.js";import{a as Y}from"./chunk-Q5U6YZUT.js";import{a as $e}from"./chunk-N6FFLIGM.js";import{a as z,c as Ae}from"./chunk-33NXTXD7.js";import{a as Ie,b as ke,c as Pe,d as Me,e as we,u as Be}from"./chunk-FTRAQKUW.js";import{a as Ee}from"./chunk-3AROKYRB.js";import{$ as h,$a as f,$c as ue,A as Q,Bb as d,Cb as c,Db as P,E as W,Fb as G,Ga as m,Gd as Te,Ha as re,Hd as $,I as X,Ia as l,Id as A,Ja as oe,L as O,N as ee,O as w,Sa as p,Sb as H,Ta as a,Tb as T,Ua as _,Va as R,W as te,Wa as j,Wb as B,Xb as U,Ya as k,Z as ie,Zc as _e,_a as I,ad as ve,bd as ye,cb as E,f as N,fd as ge,g as q,ga as ne,ha as S,ia as C,ib as g,jb as s,jd as he,k as V,kb as y,kd as be,l as J,lb as u,m as M,mb as ae,nb as pe,qc as ce,rc as me,rd as xe,sb as le,sc as fe,sd as Se,tb as b,td as Ce,ua as n,va as x,vb as de,w as K,wb as se}from"./chunk-T7QWSMKM.js";var Z="no_access",D=(()=>{let t=class t{constructor(r){this.profileService=r,this.reset$=new N(void 0),this.rawProfile$=this.reset$.pipe(w(()=>this.loadProfile()),O(1)),this.profile$=this.rawProfile$.pipe(M(o=>o===Z?null:o)),this.noAccess$=this.rawProfile$.pipe(M(o=>o===Z)),this.loading$=this.profileService.loading$}reset(){this.reset$.next()}loadProfile(){return this.profileService.getMyProfile().pipe(Q(r=>r.status===403?V(Z):J(()=>r)))}};t.\u0275fac=function(o){return new(o||t)(ie(Le))},t.\u0275prov=te({token:t,factory:t.\u0275fac});let e=t;return e})();var Xe=(e,t)=>({formGroup:e,student:t});function et(e,t){if(e&1&&(p(0,"div"),s(1),a()),e&2){let i=f(2).bkdLet;n(),u(" ",i.student.AddressLine2," ")}}function tt(e,t){if(e&1&&(p(0,"div",21),s(1),d(2,"translate"),a()),e&2){let i=t.$implicit;n(),u(" ",P(2,1,"global.validation-errors."+i.error,i.params)," ")}}function it(e,t){if(e&1&&(p(0,"div",22),s(1),d(2,"translate"),a()),e&2){let i=t.$implicit;n(),u(" ",P(2,1,"global.validation-errors."+i.error,i.params)," ")}}function nt(e,t){e&1&&(p(0,"div",23)(1,"span",24),s(2,"Loading..."),a()())}function rt(e,t){if(e&1){let i=k();p(0,"form",3),I("ngSubmit",function(){S(i);let o=f(2);return C(o.onSubmit())}),p(1,"div",4)(2,"p"),s(3),d(4,"translate"),a(),p(5,"address",5)(6,"div"),s(7),a(),m(8,et,2,1,"div",6),p(9,"div"),s(10),a()()(),m(11,tt,3,4,"div",7),d(12,"async"),p(13,"div",4)(14,"label",8),s(15),d(16,"translate"),a(),_(17,"input",9),a(),p(18,"div",4)(19,"label",10),s(20),d(21,"translate"),a(),_(22,"input",11),p(23,"small",12),s(24),d(25,"translate"),a()(),p(26,"div",4)(27,"label",13),s(28),d(29,"translate"),a(),_(30,"input",14),d(31,"async"),m(32,it,3,4,"div",15),d(33,"async"),p(34,"small",16),s(35),d(36,"translate"),a()(),p(37,"div",17)(38,"button",18),d(39,"async"),I("click",function(){S(i);let o=f(2);return C(o.cancel())}),s(40),d(41,"translate"),a(),p(42,"button",19),d(43,"async"),s(44),d(45,"translate"),m(46,nt,3,0,"div",20),d(47,"async"),a()()()}if(e&2){let i,r=f().bkdLet,o=f();l("formGroup",r.formGroup),n(3),y(c(4,20,"my-profile.edit.address-changes-remark")),n(4),y(r.student.AddressLine1),n(),l("ngIf",r.student.AddressLine2),n(2),ae("",r.student.Zip||""," ",r.student.Location,""),n(),l("ngForOf",c(12,22,o.formErrors$)),n(4),u(" ",c(16,24,"my-profile.edit.fields.phone-private")," "),n(5),u(" ",c(21,26,"my-profile.edit.fields.phone-mobile")," "),n(4),y(c(25,28,"my-profile.edit.fields.phone-mobile-hint")),n(4),u(" ",c(29,30,"my-profile.edit.fields.email2")," "),n(2),oe("is-invalid",((i=(i=c(31,32,o.email2Errors$))==null?null:i.length)!==null&&i!==void 0?i:0)>0),n(2),l("ngForOf",c(33,34,o.email2Errors$)),n(3),y(c(36,36,"my-profile.edit.fields.email2-hint")),n(3),l("disabled",c(39,38,o.saving$)),n(2),u(" ",c(41,40,"my-profile.edit.cancel")," "),n(2),l("disabled",c(43,42,o.saving$)),n(2),u(" ",c(45,44,"my-profile.edit.save")," "),n(2),l("ngIf",c(47,46,o.saving$))}}function ot(e,t){if(e&1&&(p(0,"div",1)(1,"h1"),s(2),d(3,"translate"),a(),m(4,rt,48,48,"form",2),a()),e&2){let i=t.bkdLet;n(2),y(c(3,2,"my-profile.edit.title")),n(2),l("ngIf",i.formGroup)}}var Ue=(()=>{let t=class t{constructor(r,o,v,L,Je,Ke){this.fb=r,this.router=o,this.toastService=v,this.translate=L,this.profileService=Je,this.personsService=Ke,this.student$=this.profileService.profile$.pipe(K(Be),M(({student:Qe})=>Qe)),this.formGroup$=this.student$.pipe(M(this.createFormGroup.bind(this)),O(1)),this.saving$=new N(!1),this.submitted$=new N(!1),this.formErrors$=Y(this.formGroup$,this.submitted$),this.email2Errors$=Y(this.formGroup$,this.submitted$,"email2")}cancel(){this.navigateBack()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(W(1)).subscribe(r=>{if(r.valid){let{phonePrivate:o,phoneMobile:v,email2:L}=r.value;this.save(o?.trim()||null,v?.trim()||null,L||null)}})}createFormGroup(r){return this.fb.group({phonePrivate:[r.PhonePrivate],phoneMobile:[r.PhoneMobile],email2:[r.Email2,ue.email]})}save(r,o,v){this.saving$.next(!0),this.student$.pipe(W(1),w(L=>this.personsService.update(L.Id,r,o,v)),X(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.profileService.reset(),this.toastService.success(this.translate.instant("my-profile.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(["/my-profile"])}};t.\u0275fac=function(o){return new(o||t)(x(xe),x(me),x(Ee),x(Te),x(D),x(De))},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-edit"]],standalone:!0,features:[b],decls:3,vars:8,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"mb-3"],[1,"text-muted"],[4,"ngIf"],["class","alert alert-danger",4,"ngFor","ngForOf"],["id","my-profile-phone-private",1,"form-label"],["id","my-profile-phone-private","formControlName","phonePrivate","type","tel",1,"form-control"],["id","my-profile-phone-mobile",1,"form-label"],["id","my-profile-phone-mobile","formControlName","phoneMobile","type","tel","aria-describedby","my-profile-phone-mobile-hint",1,"form-control"],["id","my-profile-phone-mobile-hint",1,"form-text"],["for","my-profile-email2",1,"form-label"],["id","my-profile-email2","formControlName","email2","type","email","aria-describedby","my-profile-email2-hint",1,"form-control"],["class","invalid-feedback",4,"ngFor","ngForOf"],["id","my-profile-email2-hint",1,"form-text"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"alert","alert-danger"],[1,"invalid-feedback"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(o,v){o&1&&(m(0,ot,5,4,"div",0),d(1,"async"),d(2,"async")),o&2&&l("bkdLet",se(5,Xe,c(1,1,v.formGroup$),c(2,3,v.student$)))},dependencies:[z,T,Se,ge,_e,ve,ye,Ce,he,be,H,B,A,$],changeDetection:0});let e=t;return e})();var ze=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-address"]],inputs:{address:"address"},standalone:!0,features:[b],decls:2,vars:1,template:function(o,v){o&1&&(p(0,"address"),s(1),a()),o&2&&(n(),y(v.address))},styles:["[_nghost-%COMP%]{padding:1rem}address[_ngcontent-%COMP%]{white-space:pre-wrap}"],changeDetection:0});let e=t;return e})();var We=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-entry"]],inputs:{label:"label",value:"value"},standalone:!0,features:[b],decls:6,vars:4,consts:[[1,"row"],[1,"col-md-6"]],template:function(o,v){o&1&&(p(0,"dl",0)(1,"dt",1),s(2),d(3,"translate"),a(),p(4,"dd",1),s(5),a()()),o&2&&(n(2),y(c(3,2,v.label)),n(3),y(v.value))},dependencies:[A,$],styles:["dl[_ngcontent-%COMP%]{padding:0 1rem}dt[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0});let e=t;return e})();function at(e,t){if(e&1&&(p(0,"span"),s(1),a()),e&2){let i=f(2);n(),u("(",i.student.Gender,")")}}function pt(e,t){if(e&1&&(p(0,"div",2)(1,"div",3),_(2,"bkd-avatar",4),p(3,"div",5),s(4),m(5,at,2,1,"span",6),p(6,"div",7),s(7),d(8,"date"),a()()(),_(9,"bkd-reports-link",8),d(10,"async"),a()),e&2){let i=f();n(2),l("studentId",i.student.Id),n(2),pe(" ",i.student.LastName," ",i.student.FirstName," ",i.student.MiddleName," "),n(),l("ngIf",i.student.Gender),n(2),y(P(8,7,i.student.Birthdate,"dd.MM.yyyy")),n(2),l("reports",c(10,10,i.reports$))}}function lt(e,t){if(e&1&&(p(0,"div",9),s(1),a()),e&2){let i=f();n(),y(i.student.Email)}}var Ye=(()=>{let t=class t{constructor(r){this.reportsService=r,this.studentId$=new q(1),this.reports$=this.studentId$.pipe(w(o=>o?this.reportsService.getPersonMasterDataReports(o):V([])),ee([]))}ngOnChanges(r){r.student&&this.studentId$.next(r.student.currentValue?.Id||null)}};t.\u0275fac=function(o){return new(o||t)(x(Re))},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-header"]],inputs:{student:"student"},standalone:!0,features:[ne,b],decls:2,vars:2,consts:[["class","avatar-person",4,"ngIf"],["class","email",4,"ngIf"],[1,"avatar-person"],[1,"d-flex"],[1,"me-3","avatar","large",3,"studentId"],[1,"person"],[4,"ngIf"],[1,"birthdate"],[3,"reports"],[1,"email"]],template:function(o,v){o&1&&m(0,pt,11,12,"div",0)(1,lt,2,1,"div",1),o&2&&(l("ngIf",v.student),n(),l("ngIf",v.student))},dependencies:[T,je,$e,B,U],styles:[".avatar-person[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-left:1rem 1rem 1rem 0}.person[_ngcontent-%COMP%]{align-self:center}.email[_ngcontent-%COMP%]{padding:1rem 1rem 0 0}.report[_ngcontent-%COMP%]{align-self:flex-start;line-height:1}"],changeDetection:0});let e=t;return e})();var dt=e=>({profile:e});function st(e,t){if(e&1&&_(0,"bkd-my-profile-entry",27),e&2){let i=f(3).bkdLet;E("value",i.profile.student.SocialSecurityNumber)}}function ct(e,t){if(e&1&&_(0,"bkd-my-profile-entry",28),e&2){let i=f(3).bkdLet;E("value",i.profile.student.HomeTown||i.profile.student.Nationality)}}function mt(e,t){if(e&1&&_(0,"bkd-my-profile-entry",29),e&2){let i=f(3).bkdLet;E("value",i.profile.student.NativeLanguage)}}function ft(e,t){if(e&1&&_(0,"bkd-my-profile-entry",30),e&2){let i=f(3).bkdLet;E("value",i.profile.stayPermitValue)}}function _t(e,t){if(e&1&&(_(0,"bkd-my-profile-entry",31),d(1,"date")),e&2){let i=f(3).bkdLet;E("value",P(1,1,i.profile.student.StayPermitExpiry,"mediumDate"))}}function ut(e,t){if(e&1&&(p(0,"div",32)(1,"a",33),d(2,"translate"),p(3,"i",34),s(4,"edit"),a()(),_(5,"bkd-student-dossier-address",35),a()),e&2){let i=f(3).bkdLet;n(),re("aria-label",c(2,2,"my-profile.edit.title")),n(4),l("student",i.profile.student)}}function vt(e,t){if(e&1&&_(0,"bkd-my-profile-address",36),e&2){let i=f(4).bkdLet;l("address",i.profile.student.CorrespondenceAddress)}}function yt(e,t){if(e&1){let i=k();p(0,"div",20,3)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),a()(),p(6,"div",23)(7,"div",24),m(8,vt,1,1,"ng-template"),a()()()}if(e&2){let i=g(1);n(3),l("opened",!i.collapsed),n(),u(" ",c(5,2,"shared.profile.correspondence-address")," ")}}function gt(e,t){if(e&1&&_(0,"bkd-my-profile-address",36),e&2){let i=f(4).bkdLet;l("address",i.profile.student.BillingAddress)}}function ht(e,t){if(e&1){let i=k();p(0,"div",20,4)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),a()(),p(6,"div",23)(7,"div",24),m(8,gt,1,1,"ng-template"),a()()()}if(e&2){let i=g(1);n(3),l("opened",!i.collapsed),n(),u(" ",c(5,2,"shared.profile.billing-address")," ")}}function bt(e,t){if(e&1&&_(0,"bkd-student-dossier-legal-representative",38),e&2){let i=t.$implicit;l("person",i)}}function xt(e,t){if(e&1&&m(0,bt,1,1,"bkd-student-dossier-legal-representative",37),e&2){let i=f(4).bkdLet;l("ngForOf",i.profile.legalRepresentativePersons)}}function St(e,t){if(e&1){let i=k();p(0,"div",20,5)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),a()(),p(6,"div",23)(7,"div",24),m(8,xt,1,1,"ng-template"),a()()()}if(e&2){let i=g(1);n(3),l("opened",!i.collapsed),n(),u(" ",c(5,2,"shared.profile.legal-representation")," ")}}function Ct(e,t){if(e&1&&(R(0),s(1),j()),e&2){let i=f().index;n(),y(i+1)}}function It(e,t){if(e&1&&_(0,"bkd-student-dossier-apprenticeship-company",41),e&2){let i=f().$implicit;l("company",i)}}function kt(e,t){if(e&1){let i=k();p(0,"div",39,6)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),m(6,Ct,2,1,"ng-container",40),a()(),p(7,"div",23)(8,"div",24),m(9,It,1,1,"ng-template"),a()()()}if(e&2){let i=g(1),r=f(3).bkdLet;n(3),l("opened",!i.collapsed),n(),u(" ",c(5,3,"shared.profile.apprenticeship-company")," "),n(2),l("ngIf",r.profile.apprenticeshipCompanies.length>1)}}function Pt(e,t){e&1&&(p(0,"p",42),s(1),d(2,"translate"),a()),e&2&&(n(),u(" ",c(2,1,"shared.profile.no-profile")," "))}function Mt(e,t){if(e&1){let i=k();R(0),_(1,"bkd-my-profile-header",11),p(2,"div",12)(3,"div",13),m(4,st,1,1,"bkd-my-profile-entry",14)(5,ct,1,1,"bkd-my-profile-entry",15)(6,mt,1,1,"bkd-my-profile-entry",16)(7,ft,1,1,"bkd-my-profile-entry",17)(8,_t,2,4,"bkd-my-profile-entry",18),a(),p(9,"div",19)(10,"div",20,2)(12,"div",21)(13,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(11);return C(o.toggle())}),s(14),d(15,"translate"),a()(),p(16,"div",23)(17,"div",24),m(18,ut,6,4,"ng-template"),a()()(),m(19,yt,9,4,"div",25)(20,ht,9,4,"div",25)(21,St,9,4,"div",25)(22,kt,10,5,"div",26),a()(),m(23,Pt,3,3,"ng-template",null,1,G),j()}if(e&2){let i=g(11),r=f(2).bkdLet;n(),l("student",r.profile.student),n(3),l("ngIf",r.profile.student.SocialSecurityNumber),n(),l("ngIf",r.profile.student.HomeTown||r.profile.student.Nationality),n(),l("ngIf",r.profile.student.NativeLanguage),n(),l("ngIf",r.profile.stayPermitValue),n(),l("ngIf",r.profile.student.StayPermitExpiry),n(5),l("opened",!i.collapsed),n(),u(" ",c(15,12,"shared.profile.student-address")," "),n(5),l("ngIf",r.profile.student.CorrespondenceAddress),n(),l("ngIf",r.profile.student.BillingAddress),n(),l("ngIf",r.profile.legalRepresentativePersons.length>0),n(),l("ngForOf",r.profile.apprenticeshipCompanies)}}function wt(e,t){e&1&&(p(0,"p",45),s(1),d(2,"translate"),a()),e&2&&(n(),u(" ",c(2,1,"shared.profile.substitution-profile")," "))}function Et(e,t){e&1&&(p(0,"p",42),s(1),d(2,"translate"),a()),e&2&&(n(),u(" ",c(2,1,"shared.profile.no-profile")," "))}function Tt(e,t){if(e&1&&(m(0,wt,3,3,"p",43),d(1,"async"),m(2,Et,3,3,"p",44),d(3,"async")),e&2){let i=f(3);l("ngIf",c(1,2,i.profileService.noAccess$)===!0),n(2),l("ngIf",c(3,4,i.profileService.noAccess$)===!1)}}function Bt(e,t){if(e&1&&(R(0),m(1,Mt,25,14,"ng-container",10)(2,Tt,4,6,"ng-template",null,1,G),j()),e&2){let i=g(3),r=f().bkdLet;n(),l("ngIf",r.profile)("ngIfElse",i)}}function $t(e,t){e&1&&_(0,"bkd-spinner")}function At(e,t){if(e&1&&(p(0,"div",8)(1,"h1",9),s(2),d(3,"translate"),a(),m(4,Bt,4,2,"ng-container",10),d(5,"async"),m(6,$t,1,0,"ng-template",null,0,G),a()),e&2){let i=g(7),r=f();n(2),y(c(3,3,"my-profile.title")),n(2),l("ngIf",c(5,5,r.profileService.loading$)===!1)("ngIfElse",i)}}var Ze=(()=>{let t=class t{constructor(r){this.profileService=r}};t.\u0275fac=function(o){return new(o||t)(x(D))},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-show"]],standalone:!0,features:[b],decls:2,vars:5,consts:[["loading",""],["noProfile",""],["studentAddress","ngbAccordionItem"],["correspondenceAddress","ngbAccordionItem"],["billingAddress","ngbAccordionItem"],["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],["data-testid","profile-title"],[4,"ngIf","ngIfElse"],[3,"student"],["data-testid","profile-content",1,"profile-content"],[1,"profile-entries","pt-3"],["label","my-profile.show.social-security-number",3,"value",4,"ngIf"],["label","my-profile.show.hometown-nationality",3,"value",4,"ngIf"],["label","my-profile.show.native-language",3,"value",4,"ngIf"],["label","my-profile.show.stay-permit",3,"value",4,"ngIf"],["label","my-profile.show.stay-permit-expiry",3,"value",4,"ngIf"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","",4,"ngIf"],[3,"ngbAccordionItem",4,"ngFor","ngForOf"],["label","my-profile.show.social-security-number",3,"value"],["label","my-profile.show.hometown-nationality",3,"value"],["label","my-profile.show.native-language",3,"value"],["label","my-profile.show.stay-permit",3,"value"],["label","my-profile.show.stay-permit-expiry",3,"value"],[1,"clearfix"],["routerLink","edit",1,"btn","btn-primary","btn-icon","float-end","me-2"],[1,"material-icons"],["emailProperty","Email2",1,"profile-entry",3,"student"],[1,"profile-entry",3,"address"],["class","profile-entry",3,"person",4,"ngFor","ngForOf"],[1,"profile-entry",3,"person"],[3,"ngbAccordionItem"],[4,"ngIf"],[1,"profile-entry",3,"company"],["data-testid","profile-none"],["data-testid","profile-substitution",4,"ngIf"],["data-testid","profile-none",4,"ngIf"],["data-testid","profile-substitution"]],template:function(o,v){o&1&&(m(0,At,8,7,"div",7),d(1,"async")),o&2&&l("bkdLet",de(3,dt,c(1,1,v.profileService.profile$)))},dependencies:[z,T,Ye,We,we,Me,Pe,Fe,ke,Ie,fe,Ne,ze,H,Oe,Ve,Ae,B,U,A,$],styles:[".profile-content[_ngcontent-%COMP%]{padding-top:1rem}.profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}.profile-entries[_ngcontent-%COMP%]:not(:empty){border-top:1px solid rgb(222,222,222)}"],changeDetection:0});let e=t;return e})();var qe=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile"]],standalone:!0,features:[le([D]),b],decls:1,vars:0,template:function(o,v){o&1&&_(0,"router-outlet")},dependencies:[ce],changeDetection:0});let e=t;return e})();var Pi=[{path:"",component:qe,children:[{path:"",component:Ze},{path:"edit",component:Ue}]}];export{Pi as MY_PROFILE_ROUTES}; +import{a as Le,b as Ne,c as Ve,d as Oe,e as je}from"./chunk-U4HODSW3.js";import"./chunk-PSXDSPKS.js";import{b as De}from"./chunk-YMJC6QZX.js";import"./chunk-HII3S2DL.js";import"./chunk-24AFRN2G.js";import{b as Fe,d as Re}from"./chunk-RFO4NYUO.js";import"./chunk-DB66EACG.js";import{a as Y}from"./chunk-AW7CSGKI.js";import{a as $e}from"./chunk-FTDG26ID.js";import{a as z,c as Ae}from"./chunk-SOHFFTKU.js";import{a as Ie,b as ke,c as Pe,d as Me,e as we,u as Be}from"./chunk-C56YGDXA.js";import{a as Ee}from"./chunk-UX5TA32W.js";import{$ as h,$a as f,$c as ve,A as Q,Ab as d,Bb as c,Cb as P,E as W,Eb as G,Fd as Te,Ga as m,Gd as $,Ha as re,Hd as A,I as X,Ia as l,Ja as oe,L as O,N as ee,O as w,Rb as H,Sa as p,Sb as T,Ta as a,Ua as _,Va as R,Vb as B,W as te,Wa as j,Wb as U,Ya as k,Yc as _e,Z as ie,_a as I,_c as ue,ad as ye,cb as E,ed as ge,f as N,g as q,ga as ne,ha as S,ia as C,ib as g,id as he,jb as s,jd as be,k as V,kb as y,l as J,lb as u,m as M,mb as ae,nb as pe,pc as ce,qc as me,qd as xe,rc as fe,rd as Se,sb as le,sd as Ce,tb as b,ua as n,va as x,vb as de,w as K,wb as se}from"./chunk-XTHSYQMN.js";var Z="no_access",D=(()=>{let t=class t{constructor(r){this.profileService=r,this.reset$=new N(void 0),this.rawProfile$=this.reset$.pipe(w(()=>this.loadProfile()),O(1)),this.profile$=this.rawProfile$.pipe(M(o=>o===Z?null:o)),this.noAccess$=this.rawProfile$.pipe(M(o=>o===Z)),this.loading$=this.profileService.loading$}reset(){this.reset$.next()}loadProfile(){return this.profileService.getMyProfile().pipe(Q(r=>r.status===403?V(Z):J(()=>r)))}};t.\u0275fac=function(o){return new(o||t)(ie(Le))},t.\u0275prov=te({token:t,factory:t.\u0275fac});let e=t;return e})();var Xe=(e,t)=>({formGroup:e,student:t});function et(e,t){if(e&1&&(p(0,"div"),s(1),a()),e&2){let i=f(2).bkdLet;n(),u(" ",i.student.AddressLine2," ")}}function tt(e,t){if(e&1&&(p(0,"div",21),s(1),d(2,"translate"),a()),e&2){let i=t.$implicit;n(),u(" ",P(2,1,"global.validation-errors."+i.error,i.params)," ")}}function it(e,t){if(e&1&&(p(0,"div",22),s(1),d(2,"translate"),a()),e&2){let i=t.$implicit;n(),u(" ",P(2,1,"global.validation-errors."+i.error,i.params)," ")}}function nt(e,t){e&1&&(p(0,"div",23)(1,"span",24),s(2,"Loading..."),a()())}function rt(e,t){if(e&1){let i=k();p(0,"form",3),I("ngSubmit",function(){S(i);let o=f(2);return C(o.onSubmit())}),p(1,"div",4)(2,"p"),s(3),d(4,"translate"),a(),p(5,"address",5)(6,"div"),s(7),a(),m(8,et,2,1,"div",6),p(9,"div"),s(10),a()()(),m(11,tt,3,4,"div",7),d(12,"async"),p(13,"div",4)(14,"label",8),s(15),d(16,"translate"),a(),_(17,"input",9),a(),p(18,"div",4)(19,"label",10),s(20),d(21,"translate"),a(),_(22,"input",11),p(23,"small",12),s(24),d(25,"translate"),a()(),p(26,"div",4)(27,"label",13),s(28),d(29,"translate"),a(),_(30,"input",14),d(31,"async"),m(32,it,3,4,"div",15),d(33,"async"),p(34,"small",16),s(35),d(36,"translate"),a()(),p(37,"div",17)(38,"button",18),d(39,"async"),I("click",function(){S(i);let o=f(2);return C(o.cancel())}),s(40),d(41,"translate"),a(),p(42,"button",19),d(43,"async"),s(44),d(45,"translate"),m(46,nt,3,0,"div",20),d(47,"async"),a()()()}if(e&2){let i,r=f().bkdLet,o=f();l("formGroup",r.formGroup),n(3),y(c(4,20,"my-profile.edit.address-changes-remark")),n(4),y(r.student.AddressLine1),n(),l("ngIf",r.student.AddressLine2),n(2),ae("",r.student.Zip||""," ",r.student.Location,""),n(),l("ngForOf",c(12,22,o.formErrors$)),n(4),u(" ",c(16,24,"my-profile.edit.fields.phone-private")," "),n(5),u(" ",c(21,26,"my-profile.edit.fields.phone-mobile")," "),n(4),y(c(25,28,"my-profile.edit.fields.phone-mobile-hint")),n(4),u(" ",c(29,30,"my-profile.edit.fields.email2")," "),n(2),oe("is-invalid",((i=(i=c(31,32,o.email2Errors$))==null?null:i.length)!==null&&i!==void 0?i:0)>0),n(2),l("ngForOf",c(33,34,o.email2Errors$)),n(3),y(c(36,36,"my-profile.edit.fields.email2-hint")),n(3),l("disabled",c(39,38,o.saving$)),n(2),u(" ",c(41,40,"my-profile.edit.cancel")," "),n(2),l("disabled",c(43,42,o.saving$)),n(2),u(" ",c(45,44,"my-profile.edit.save")," "),n(2),l("ngIf",c(47,46,o.saving$))}}function ot(e,t){if(e&1&&(p(0,"div",1)(1,"h1"),s(2),d(3,"translate"),a(),m(4,rt,48,48,"form",2),a()),e&2){let i=t.bkdLet;n(2),y(c(3,2,"my-profile.edit.title")),n(2),l("ngIf",i.formGroup)}}var Ue=(()=>{let t=class t{constructor(r,o,v,L,Je,Ke){this.fb=r,this.router=o,this.toastService=v,this.translate=L,this.profileService=Je,this.personsService=Ke,this.student$=this.profileService.profile$.pipe(K(Be),M(({student:Qe})=>Qe)),this.formGroup$=this.student$.pipe(M(this.createFormGroup.bind(this)),O(1)),this.saving$=new N(!1),this.submitted$=new N(!1),this.formErrors$=Y(this.formGroup$,this.submitted$),this.email2Errors$=Y(this.formGroup$,this.submitted$,"email2")}cancel(){this.navigateBack()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(W(1)).subscribe(r=>{if(r.valid){let{phonePrivate:o,phoneMobile:v,email2:L}=r.value;this.save(o?.trim()||null,v?.trim()||null,L||null)}})}createFormGroup(r){return this.fb.group({phonePrivate:[r.PhonePrivate],phoneMobile:[r.PhoneMobile],email2:[r.Email2,ue.email]})}save(r,o,v){this.saving$.next(!0),this.student$.pipe(W(1),w(L=>this.personsService.update(L.Id,r,o,v)),X(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.profileService.reset(),this.toastService.success(this.translate.instant("my-profile.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(["/my-profile"])}};t.\u0275fac=function(o){return new(o||t)(x(xe),x(me),x(Ee),x(Te),x(D),x(De))},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-edit"]],standalone:!0,features:[b],decls:3,vars:8,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"mb-3"],[1,"text-muted"],[4,"ngIf"],["class","alert alert-danger",4,"ngFor","ngForOf"],["id","my-profile-phone-private",1,"form-label"],["id","my-profile-phone-private","formControlName","phonePrivate","type","tel",1,"form-control"],["id","my-profile-phone-mobile",1,"form-label"],["id","my-profile-phone-mobile","formControlName","phoneMobile","type","tel","aria-describedby","my-profile-phone-mobile-hint",1,"form-control"],["id","my-profile-phone-mobile-hint",1,"form-text"],["for","my-profile-email2",1,"form-label"],["id","my-profile-email2","formControlName","email2","type","email","aria-describedby","my-profile-email2-hint",1,"form-control"],["class","invalid-feedback",4,"ngFor","ngForOf"],["id","my-profile-email2-hint",1,"form-text"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"alert","alert-danger"],[1,"invalid-feedback"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(o,v){o&1&&(m(0,ot,5,4,"div",0),d(1,"async"),d(2,"async")),o&2&&l("bkdLet",se(5,Xe,c(1,1,v.formGroup$),c(2,3,v.student$)))},dependencies:[z,T,Se,ge,_e,ve,ye,Ce,he,be,H,B,A,$],changeDetection:0});let e=t;return e})();var ze=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-address"]],inputs:{address:"address"},standalone:!0,features:[b],decls:2,vars:1,template:function(o,v){o&1&&(p(0,"address"),s(1),a()),o&2&&(n(),y(v.address))},styles:["[_nghost-%COMP%]{padding:1rem}address[_ngcontent-%COMP%]{white-space:pre-wrap}"],changeDetection:0});let e=t;return e})();var We=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-entry"]],inputs:{label:"label",value:"value"},standalone:!0,features:[b],decls:6,vars:4,consts:[[1,"row"],[1,"col-md-6"]],template:function(o,v){o&1&&(p(0,"dl",0)(1,"dt",1),s(2),d(3,"translate"),a(),p(4,"dd",1),s(5),a()()),o&2&&(n(2),y(c(3,2,v.label)),n(3),y(v.value))},dependencies:[A,$],styles:["dl[_ngcontent-%COMP%]{padding:0 1rem}dt[_ngcontent-%COMP%]{font-weight:400;color:#00000080}"],changeDetection:0});let e=t;return e})();function at(e,t){if(e&1&&(p(0,"span"),s(1),a()),e&2){let i=f(2);n(),u("(",i.student.Gender,")")}}function pt(e,t){if(e&1&&(p(0,"div",2)(1,"div",3),_(2,"bkd-avatar",4),p(3,"div",5),s(4),m(5,at,2,1,"span",6),p(6,"div",7),s(7),d(8,"date"),a()()(),_(9,"bkd-reports-link",8),d(10,"async"),a()),e&2){let i=f();n(2),l("studentId",i.student.Id),n(2),pe(" ",i.student.LastName," ",i.student.FirstName," ",i.student.MiddleName," "),n(),l("ngIf",i.student.Gender),n(2),y(P(8,7,i.student.Birthdate,"dd.MM.yyyy")),n(2),l("reports",c(10,10,i.reports$))}}function lt(e,t){if(e&1&&(p(0,"div",9),s(1),a()),e&2){let i=f();n(),y(i.student.Email)}}var Ye=(()=>{let t=class t{constructor(r){this.reportsService=r,this.studentId$=new q(1),this.reports$=this.studentId$.pipe(w(o=>o?this.reportsService.getPersonMasterDataReports(o):V([])),ee([]))}ngOnChanges(r){r.student&&this.studentId$.next(r.student.currentValue?.Id||null)}};t.\u0275fac=function(o){return new(o||t)(x(Re))},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-header"]],inputs:{student:"student"},standalone:!0,features:[ne,b],decls:2,vars:2,consts:[["class","avatar-person",4,"ngIf"],["class","email",4,"ngIf"],[1,"avatar-person"],[1,"d-flex"],[1,"me-3","avatar","large",3,"studentId"],[1,"person"],[4,"ngIf"],[1,"birthdate"],[3,"reports"],[1,"email"]],template:function(o,v){o&1&&m(0,pt,11,12,"div",0)(1,lt,2,1,"div",1),o&2&&(l("ngIf",v.student),n(),l("ngIf",v.student))},dependencies:[T,je,$e,B,U],styles:[".avatar-person[_ngcontent-%COMP%]{display:flex;justify-content:space-between;padding-left:1rem 1rem 1rem 0}.person[_ngcontent-%COMP%]{align-self:center}.email[_ngcontent-%COMP%]{padding:1rem 1rem 0 0}.report[_ngcontent-%COMP%]{align-self:flex-start;line-height:1}"],changeDetection:0});let e=t;return e})();var dt=e=>({profile:e});function st(e,t){if(e&1&&_(0,"bkd-my-profile-entry",27),e&2){let i=f(3).bkdLet;E("value",i.profile.student.SocialSecurityNumber)}}function ct(e,t){if(e&1&&_(0,"bkd-my-profile-entry",28),e&2){let i=f(3).bkdLet;E("value",i.profile.student.HomeTown||i.profile.student.Nationality)}}function mt(e,t){if(e&1&&_(0,"bkd-my-profile-entry",29),e&2){let i=f(3).bkdLet;E("value",i.profile.student.NativeLanguage)}}function ft(e,t){if(e&1&&_(0,"bkd-my-profile-entry",30),e&2){let i=f(3).bkdLet;E("value",i.profile.stayPermitValue)}}function _t(e,t){if(e&1&&(_(0,"bkd-my-profile-entry",31),d(1,"date")),e&2){let i=f(3).bkdLet;E("value",P(1,1,i.profile.student.StayPermitExpiry,"mediumDate"))}}function ut(e,t){if(e&1&&(p(0,"div",32)(1,"a",33),d(2,"translate"),p(3,"i",34),s(4,"edit"),a()(),_(5,"bkd-student-dossier-address",35),a()),e&2){let i=f(3).bkdLet;n(),re("aria-label",c(2,2,"my-profile.edit.title")),n(4),l("student",i.profile.student)}}function vt(e,t){if(e&1&&_(0,"bkd-my-profile-address",36),e&2){let i=f(4).bkdLet;l("address",i.profile.student.CorrespondenceAddress)}}function yt(e,t){if(e&1){let i=k();p(0,"div",20,3)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),a()(),p(6,"div",23)(7,"div",24),m(8,vt,1,1,"ng-template"),a()()()}if(e&2){let i=g(1);n(3),l("opened",!i.collapsed),n(),u(" ",c(5,2,"shared.profile.correspondence-address")," ")}}function gt(e,t){if(e&1&&_(0,"bkd-my-profile-address",36),e&2){let i=f(4).bkdLet;l("address",i.profile.student.BillingAddress)}}function ht(e,t){if(e&1){let i=k();p(0,"div",20,4)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),a()(),p(6,"div",23)(7,"div",24),m(8,gt,1,1,"ng-template"),a()()()}if(e&2){let i=g(1);n(3),l("opened",!i.collapsed),n(),u(" ",c(5,2,"shared.profile.billing-address")," ")}}function bt(e,t){if(e&1&&_(0,"bkd-student-dossier-legal-representative",38),e&2){let i=t.$implicit;l("person",i)}}function xt(e,t){if(e&1&&m(0,bt,1,1,"bkd-student-dossier-legal-representative",37),e&2){let i=f(4).bkdLet;l("ngForOf",i.profile.legalRepresentativePersons)}}function St(e,t){if(e&1){let i=k();p(0,"div",20,5)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),a()(),p(6,"div",23)(7,"div",24),m(8,xt,1,1,"ng-template"),a()()()}if(e&2){let i=g(1);n(3),l("opened",!i.collapsed),n(),u(" ",c(5,2,"shared.profile.legal-representation")," ")}}function Ct(e,t){if(e&1&&(R(0),s(1),j()),e&2){let i=f().index;n(),y(i+1)}}function It(e,t){if(e&1&&_(0,"bkd-student-dossier-apprenticeship-company",41),e&2){let i=f().$implicit;l("company",i)}}function kt(e,t){if(e&1){let i=k();p(0,"div",39,6)(2,"div",21)(3,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(1);return C(o.toggle())}),s(4),d(5,"translate"),m(6,Ct,2,1,"ng-container",40),a()(),p(7,"div",23)(8,"div",24),m(9,It,1,1,"ng-template"),a()()()}if(e&2){let i=g(1),r=f(3).bkdLet;n(3),l("opened",!i.collapsed),n(),u(" ",c(5,3,"shared.profile.apprenticeship-company")," "),n(2),l("ngIf",r.profile.apprenticeshipCompanies.length>1)}}function Pt(e,t){e&1&&(p(0,"p",42),s(1),d(2,"translate"),a()),e&2&&(n(),u(" ",c(2,1,"shared.profile.no-profile")," "))}function Mt(e,t){if(e&1){let i=k();R(0),_(1,"bkd-my-profile-header",11),p(2,"div",12)(3,"div",13),m(4,st,1,1,"bkd-my-profile-entry",14)(5,ct,1,1,"bkd-my-profile-entry",15)(6,mt,1,1,"bkd-my-profile-entry",16)(7,ft,1,1,"bkd-my-profile-entry",17)(8,_t,2,4,"bkd-my-profile-entry",18),a(),p(9,"div",19)(10,"div",20,2)(12,"div",21)(13,"bkd-student-dossier-entry-header",22),I("click",function(){S(i);let o=g(11);return C(o.toggle())}),s(14),d(15,"translate"),a()(),p(16,"div",23)(17,"div",24),m(18,ut,6,4,"ng-template"),a()()(),m(19,yt,9,4,"div",25)(20,ht,9,4,"div",25)(21,St,9,4,"div",25)(22,kt,10,5,"div",26),a()(),m(23,Pt,3,3,"ng-template",null,1,G),j()}if(e&2){let i=g(11),r=f(2).bkdLet;n(),l("student",r.profile.student),n(3),l("ngIf",r.profile.student.SocialSecurityNumber),n(),l("ngIf",r.profile.student.HomeTown||r.profile.student.Nationality),n(),l("ngIf",r.profile.student.NativeLanguage),n(),l("ngIf",r.profile.stayPermitValue),n(),l("ngIf",r.profile.student.StayPermitExpiry),n(5),l("opened",!i.collapsed),n(),u(" ",c(15,12,"shared.profile.student-address")," "),n(5),l("ngIf",r.profile.student.CorrespondenceAddress),n(),l("ngIf",r.profile.student.BillingAddress),n(),l("ngIf",r.profile.legalRepresentativePersons.length>0),n(),l("ngForOf",r.profile.apprenticeshipCompanies)}}function wt(e,t){e&1&&(p(0,"p",45),s(1),d(2,"translate"),a()),e&2&&(n(),u(" ",c(2,1,"shared.profile.substitution-profile")," "))}function Et(e,t){e&1&&(p(0,"p",42),s(1),d(2,"translate"),a()),e&2&&(n(),u(" ",c(2,1,"shared.profile.no-profile")," "))}function Tt(e,t){if(e&1&&(m(0,wt,3,3,"p",43),d(1,"async"),m(2,Et,3,3,"p",44),d(3,"async")),e&2){let i=f(3);l("ngIf",c(1,2,i.profileService.noAccess$)===!0),n(2),l("ngIf",c(3,4,i.profileService.noAccess$)===!1)}}function Bt(e,t){if(e&1&&(R(0),m(1,Mt,25,14,"ng-container",10)(2,Tt,4,6,"ng-template",null,1,G),j()),e&2){let i=g(3),r=f().bkdLet;n(),l("ngIf",r.profile)("ngIfElse",i)}}function $t(e,t){e&1&&_(0,"bkd-spinner")}function At(e,t){if(e&1&&(p(0,"div",8)(1,"h1",9),s(2),d(3,"translate"),a(),m(4,Bt,4,2,"ng-container",10),d(5,"async"),m(6,$t,1,0,"ng-template",null,0,G),a()),e&2){let i=g(7),r=f();n(2),y(c(3,3,"my-profile.title")),n(2),l("ngIf",c(5,5,r.profileService.loading$)===!1)("ngIfElse",i)}}var Ze=(()=>{let t=class t{constructor(r){this.profileService=r}};t.\u0275fac=function(o){return new(o||t)(x(D))},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile-show"]],standalone:!0,features:[b],decls:2,vars:5,consts:[["loading",""],["noProfile",""],["studentAddress","ngbAccordionItem"],["correspondenceAddress","ngbAccordionItem"],["billingAddress","ngbAccordionItem"],["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],["data-testid","profile-title"],[4,"ngIf","ngIfElse"],[3,"student"],["data-testid","profile-content",1,"profile-content"],[1,"profile-entries","pt-3"],["label","my-profile.show.social-security-number",3,"value",4,"ngIf"],["label","my-profile.show.hometown-nationality",3,"value",4,"ngIf"],["label","my-profile.show.native-language",3,"value",4,"ngIf"],["label","my-profile.show.stay-permit",3,"value",4,"ngIf"],["label","my-profile.show.stay-permit-expiry",3,"value",4,"ngIf"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","",4,"ngIf"],[3,"ngbAccordionItem",4,"ngFor","ngForOf"],["label","my-profile.show.social-security-number",3,"value"],["label","my-profile.show.hometown-nationality",3,"value"],["label","my-profile.show.native-language",3,"value"],["label","my-profile.show.stay-permit",3,"value"],["label","my-profile.show.stay-permit-expiry",3,"value"],[1,"clearfix"],["routerLink","edit",1,"btn","btn-primary","btn-icon","float-end","me-2"],[1,"material-icons"],["emailProperty","Email2",1,"profile-entry",3,"student"],[1,"profile-entry",3,"address"],["class","profile-entry",3,"person",4,"ngFor","ngForOf"],[1,"profile-entry",3,"person"],[3,"ngbAccordionItem"],[4,"ngIf"],[1,"profile-entry",3,"company"],["data-testid","profile-none"],["data-testid","profile-substitution",4,"ngIf"],["data-testid","profile-none",4,"ngIf"],["data-testid","profile-substitution"]],template:function(o,v){o&1&&(m(0,At,8,7,"div",7),d(1,"async")),o&2&&l("bkdLet",de(3,dt,c(1,1,v.profileService.profile$)))},dependencies:[z,T,Ye,We,we,Me,Pe,Fe,ke,Ie,fe,Ne,ze,H,Oe,Ve,Ae,B,U,A,$],styles:[".profile-content[_ngcontent-%COMP%]{padding-top:1rem}.profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}.profile-entries[_ngcontent-%COMP%]:not(:empty){border-top:1px solid rgb(222,222,222)}"],changeDetection:0});let e=t;return e})();var qe=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(o){return new(o||t)},t.\u0275cmp=h({type:t,selectors:[["bkd-my-profile"]],standalone:!0,features:[le([D]),b],decls:1,vars:0,template:function(o,v){o&1&&_(0,"router-outlet")},dependencies:[ce],changeDetection:0});let e=t;return e})();var Pi=[{path:"",component:qe,children:[{path:"",component:Ze},{path:"edit",component:Ue}]}];export{Pi as MY_PROFILE_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-Q5U6YZUT.js b/public/apps/webapp-schulverwaltung/chunk-AW7CSGKI.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-Q5U6YZUT.js rename to public/apps/webapp-schulverwaltung/chunk-AW7CSGKI.js index 1bc59148..341747e7 100644 --- a/public/apps/webapp-schulverwaltung/chunk-Q5U6YZUT.js +++ b/public/apps/webapp-schulverwaltung/chunk-AW7CSGKI.js @@ -1 +1 @@ -import{L as b,N as s,O as a,j as u,k as c,m as i,n as f,w as l}from"./chunk-T7QWSMKM.js";function C(t,r,e){return f([t,r]).pipe(l(([o,p])=>p),a(([o,p])=>{let n=e?o?.get(e)||null:o;return n?n.statusChanges.pipe(s(n.status),i(()=>y(n))):c([])}),s([]),b(1))}function j(t,r){return t.pipe(i(e=>e.get(r)||null))}function D(t,r){return j(t,r).pipe(a(e=>e?e.valueChanges:u))}function y(t){return t?Object.keys(t.errors||{}).map(r=>({error:r,params:t.errors&&t.errors[r]instanceof Object?t.errors[r]:null})):[]}function g(t){return r=>t(...r)}function E(t){let r=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&r==="[object Date]"?new t.constructor(+t):typeof t=="number"||r==="[object Number]"||typeof t=="string"||r==="[object String]"?new Date(t):new Date(NaN)}export{C as a,j as b,D as c,E as d,g as e}; +import{L as b,N as s,O as a,j as u,k as c,m as i,n as f,w as l}from"./chunk-XTHSYQMN.js";function C(t,r,e){return f([t,r]).pipe(l(([o,p])=>p),a(([o,p])=>{let n=e?o?.get(e)||null:o;return n?n.statusChanges.pipe(s(n.status),i(()=>y(n))):c([])}),s([]),b(1))}function j(t,r){return t.pipe(i(e=>e.get(r)||null))}function D(t,r){return j(t,r).pipe(a(e=>e?e.valueChanges:u))}function y(t){return t?Object.keys(t.errors||{}).map(r=>({error:r,params:t.errors&&t.errors[r]instanceof Object?t.errors[r]:null})):[]}function g(t){return r=>t(...r)}function E(t){let r=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&r==="[object Date]"?new t.constructor(+t):typeof t=="number"||r==="[object Number]"||typeof t=="string"||r==="[object String]"?new Date(t):new Date(NaN)}export{C as a,j as b,D as c,E as d,g as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-FTRAQKUW.js b/public/apps/webapp-schulverwaltung/chunk-C56YGDXA.js similarity index 99% rename from public/apps/webapp-schulverwaltung/chunk-FTRAQKUW.js rename to public/apps/webapp-schulverwaltung/chunk-C56YGDXA.js index bd172f53..f413d23d 100644 --- a/public/apps/webapp-schulverwaltung/chunk-FTRAQKUW.js +++ b/public/apps/webapp-schulverwaltung/chunk-C56YGDXA.js @@ -1,4 +1,4 @@ -import{$ as ae,$a as T,Ba as le,Ca as zt,Da as Dn,E as ge,Ea as Tn,F as gn,Fb as Rt,Ga as x,Gb as Mi,H as vn,Ha as Re,Hb as Rn,Ia as I,Ib as We,Ja as G,Ka as Ye,Lb as Yt,Mb as ve,Na as ie,O as Oi,Oa as Kt,Ob as Mn,Pa as Ze,Q as W,Qa as Se,R as St,Ra as Oe,Sa as O,T as jt,Ta as R,Ua as Me,V as ht,Va as En,Vb as Mt,W as C,Wa as Sn,Xc as Zt,Y as yn,Ya as Xe,Za as Ne,_ as d,_a as Z,_c as Nn,a as ut,ab as Qt,b as Ei,ba as U,bb as Jt,d as Vt,e as ee,ea as Ci,eb as Pe,f as hn,fa as bn,fb as ft,ga as Le,gb as ne,ha as Te,hb as oe,ia as Ee,ib as qt,j as pn,jb as ce,k as Et,kb as Ce,la as He,lb as Ri,m as Je,ma as wn,na as qe,o as fn,pa as Ot,qa as Y,ra as S,s as z,sb as Ct,t as _n,tb as de,ua as b,v as mn,vb as On,w as De,x as Si,xa as pt,xb as Cn,y as $t}from"./chunk-T7QWSMKM.js";function et(n){n||(bn(et),n=d(Ot));let t=new Vt(s=>n.onDestroy(s.next.bind(s)));return s=>s.pipe(W(t))}var k="top",K="bottom",V="right",F="left",Xt="auto",Ue=[k,K,V,F],Ae="start",tt="end",Pn="clippingParents",ei="viewport",_t="popper",An="reference",Ni=Ue.reduce(function(n,t){return n.concat([t+"-"+Ae,t+"-"+tt])},[]),ti=[].concat(Ue,[Xt]).reduce(function(n,t){return n.concat([t,t+"-"+Ae,t+"-"+tt])},[]),go="beforeRead",vo="read",yo="afterRead",bo="beforeMain",wo="main",Do="afterMain",To="beforeWrite",Eo="write",So="afterWrite",xn=[go,vo,yo,bo,wo,Do,To,Eo,So];function $(n){return n?(n.nodeName||"").toLowerCase():null}function A(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function ue(n){var t=A(n).Element;return n instanceof t||n instanceof Element}function L(n){var t=A(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function mt(n){if(typeof ShadowRoot>"u")return!1;var t=A(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function Oo(n){var t=n.state;Object.keys(t.elements).forEach(function(s){var e=t.styles[s]||{},i=t.attributes[s]||{},o=t.elements[s];!L(o)||!$(o)||(Object.assign(o.style,e),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Co(n){var t=n.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],o=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:s[e]),a=r.reduce(function(l,u){return l[u]="",l},{});!L(i)||!$(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var kn={name:"applyStyles",enabled:!0,phase:"write",fn:Oo,effect:Co,requires:["computeStyles"]};function j(n){return n.split("-")[0]}var ye=Math.max,it=Math.min,xe=Math.round;function gt(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nt(){return!/^((?!chrome|android).)*safari/i.test(gt())}function he(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!1);var e=n.getBoundingClientRect(),i=1,o=1;t&&L(n)&&(i=n.offsetWidth>0&&xe(e.width)/n.offsetWidth||1,o=n.offsetHeight>0&&xe(e.height)/n.offsetHeight||1);var r=ue(n)?A(n):window,a=r.visualViewport,l=!Nt()&&s,u=(e.left+(l&&a?a.offsetLeft:0))/i,c=(e.top+(l&&a?a.offsetTop:0))/o,f=e.width/i,p=e.height/o;return{width:f,height:p,top:c,right:u+f,bottom:c+p,left:u,x:u,y:c}}function nt(n){var t=he(n),s=n.offsetWidth,e=n.offsetHeight;return Math.abs(t.width-s)<=1&&(s=t.width),Math.abs(t.height-e)<=1&&(e=t.height),{x:n.offsetLeft,y:n.offsetTop,width:s,height:e}}function Pt(n,t){var s=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(s&&mt(s)){var e=t;do{if(e&&n.isSameNode(e))return!0;e=e.parentNode||e.host}while(e)}return!1}function te(n){return A(n).getComputedStyle(n)}function Pi(n){return["table","td","th"].indexOf($(n))>=0}function Q(n){return((ue(n)?n.ownerDocument:n.document)||window.document).documentElement}function ke(n){return $(n)==="html"?n:n.assignedSlot||n.parentNode||(mt(n)?n.host:null)||Q(n)}function Bn(n){return!L(n)||te(n).position==="fixed"?null:n.offsetParent}function Ro(n){var t=/firefox/i.test(gt()),s=/Trident/i.test(gt());if(s&&L(n)){var e=te(n);if(e.position==="fixed")return null}var i=ke(n);for(mt(i)&&(i=i.host);L(i)&&["html","body"].indexOf($(i))<0;){var o=te(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function be(n){for(var t=A(n),s=Bn(n);s&&Pi(s)&&te(s).position==="static";)s=Bn(s);return s&&($(s)==="html"||$(s)==="body"&&te(s).position==="static")?t:s||Ro(n)||t}function ot(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function st(n,t,s){return ye(n,it(t,s))}function In(n,t,s){var e=st(n,t,s);return e>s?s:e}function At(){return{top:0,right:0,bottom:0,left:0}}function xt(n){return Object.assign({},At(),n)}function kt(n,t){return t.reduce(function(s,e){return s[e]=n,s},{})}var Mo=function(t,s){return t=typeof t=="function"?t(Object.assign({},s.rects,{placement:s.placement})):t,xt(typeof t!="number"?t:kt(t,Ue))};function No(n){var t,s=n.state,e=n.name,i=n.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=j(s.placement),l=ot(a),u=[F,V].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var f=Mo(i.padding,s),p=nt(o),h=l==="y"?k:F,_=l==="y"?K:V,v=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=be(o),y=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,N=v/2-m/2,g=f[h],D=y-p[c]-f[_],E=y/2-p[c]/2+N,P=st(g,E,D),M=l;s.modifiersData[e]=(t={},t[M]=P,t.centerOffset=P-E,t)}}function Po(n){var t=n.state,s=n.options,e=s.element,i=e===void 0?"[data-popper-arrow]":e;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Pt(t.elements.popper,i)&&(t.elements.arrow=i))}var Ai={name:"arrow",enabled:!0,phase:"main",fn:No,effect:Po,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pe(n){return n.split("-")[1]}var Ao={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xo(n,t){var s=n.x,e=n.y,i=t.devicePixelRatio||1;return{x:xe(s*i)/i||0,y:xe(e*i)/i||0}}function Fn(n){var t,s=n.popper,e=n.popperRect,i=n.placement,o=n.variation,r=n.offsets,a=n.position,l=n.gpuAcceleration,u=n.adaptive,c=n.roundOffsets,f=n.isFixed,p=r.x,h=p===void 0?0:p,_=r.y,v=_===void 0?0:_,m=typeof c=="function"?c({x:h,y:v}):{x:h,y:v};h=m.x,v=m.y;var w=r.hasOwnProperty("x"),y=r.hasOwnProperty("y"),N=F,g=k,D=window;if(u){var E=be(s),P="clientHeight",M="clientWidth";if(E===A(s)&&(E=Q(s),te(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,i===k||(i===F||i===V)&&o===tt){g=K;var H=f&&E===D&&D.visualViewport?D.visualViewport.height:E[P];v-=H-e.height,v*=l?1:-1}if(i===F||(i===k||i===K)&&o===tt){N=V;var B=f&&E===D&&D.visualViewport?D.visualViewport.width:E[M];h-=B-e.width,h*=l?1:-1}}var q=Object.assign({position:a},u&&Ao),_e=c===!0?xo({x:h,y:v},A(s)):{x:h,y:v};if(h=_e.x,v=_e.y,l){var X;return Object.assign({},q,(X={},X[g]=y?"0":"",X[N]=w?"0":"",X.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",X))}return Object.assign({},q,(t={},t[g]=y?v+"px":"",t[N]=w?h+"px":"",t.transform="",t))}function ko(n){var t=n.state,s=n.options,e=s.gpuAcceleration,i=e===void 0?!0:e,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:j(t.placement),variation:pe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Fn(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Fn(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ln={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ko,data:{}};var ii={passive:!0};function Bo(n){var t=n.state,s=n.instance,e=n.options,i=e.scroll,o=i===void 0?!0:i,r=e.resize,a=r===void 0?!0:r,l=A(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,ii)}),a&&l.addEventListener("resize",s.update,ii),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,ii)}),a&&l.removeEventListener("resize",s.update,ii)}}var Hn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bo,data:{}};var Io={left:"right",right:"left",bottom:"top",top:"bottom"};function vt(n){return n.replace(/left|right|bottom|top/g,function(t){return Io[t]})}var Fo={start:"end",end:"start"};function ni(n){return n.replace(/start|end/g,function(t){return Fo[t]})}function rt(n){var t=A(n),s=t.pageXOffset,e=t.pageYOffset;return{scrollLeft:s,scrollTop:e}}function at(n){return he(Q(n)).left+rt(n).scrollLeft}function xi(n,t){var s=A(n),e=Q(n),i=s.visualViewport,o=e.clientWidth,r=e.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;var u=Nt();(u||!u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a+at(n),y:l}}function ki(n){var t,s=Q(n),e=rt(n),i=(t=n.ownerDocument)==null?void 0:t.body,o=ye(s.scrollWidth,s.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=ye(s.scrollHeight,s.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-e.scrollLeft+at(n),l=-e.scrollTop;return te(i||s).direction==="rtl"&&(a+=ye(s.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function lt(n){var t=te(n),s=t.overflow,e=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(s+i+e)}function oi(n){return["html","body","#document"].indexOf($(n))>=0?n.ownerDocument.body:L(n)&<(n)?n:oi(ke(n))}function Ge(n,t){var s;t===void 0&&(t=[]);var e=oi(n),i=e===((s=n.ownerDocument)==null?void 0:s.body),o=A(e),r=i?[o].concat(o.visualViewport||[],lt(e)?e:[]):e,a=t.concat(r);return i?a:a.concat(Ge(ke(r)))}function yt(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Lo(n,t){var s=he(n,!1,t==="fixed");return s.top=s.top+n.clientTop,s.left=s.left+n.clientLeft,s.bottom=s.top+n.clientHeight,s.right=s.left+n.clientWidth,s.width=n.clientWidth,s.height=n.clientHeight,s.x=s.left,s.y=s.top,s}function Wn(n,t,s){return t===ei?yt(xi(n,s)):ue(t)?Lo(t,s):yt(ki(Q(n)))}function Ho(n){var t=Ge(ke(n)),s=["absolute","fixed"].indexOf(te(n).position)>=0,e=s&&L(n)?be(n):n;return ue(e)?t.filter(function(i){return ue(i)&&Pt(i,e)&&$(i)!=="body"}):[]}function Bi(n,t,s,e){var i=t==="clippingParents"?Ho(n):[].concat(t),o=[].concat(i,[s]),r=o[0],a=o.reduce(function(l,u){var c=Wn(n,u,e);return l.top=ye(c.top,l.top),l.right=it(c.right,l.right),l.bottom=it(c.bottom,l.bottom),l.left=ye(c.left,l.left),l},Wn(n,r,e));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Bt(n){var t=n.reference,s=n.element,e=n.placement,i=e?j(e):null,o=e?pe(e):null,r=t.x+t.width/2-s.width/2,a=t.y+t.height/2-s.height/2,l;switch(i){case k:l={x:r,y:t.y-s.height};break;case K:l={x:r,y:t.y+t.height};break;case V:l={x:t.x+t.width,y:a};break;case F:l={x:t.x-s.width,y:a};break;default:l={x:t.x,y:t.y}}var u=i?ot(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Ae:l[u]=l[u]-(t[c]/2-s[c]/2);break;case tt:l[u]=l[u]+(t[c]/2-s[c]/2);break;default:}}return l}function Ve(n,t){t===void 0&&(t={});var s=t,e=s.placement,i=e===void 0?n.placement:e,o=s.strategy,r=o===void 0?n.strategy:o,a=s.boundary,l=a===void 0?Pn:a,u=s.rootBoundary,c=u===void 0?ei:u,f=s.elementContext,p=f===void 0?_t:f,h=s.altBoundary,_=h===void 0?!1:h,v=s.padding,m=v===void 0?0:v,w=xt(typeof m!="number"?m:kt(m,Ue)),y=p===_t?An:_t,N=n.rects.popper,g=n.elements[_?y:p],D=Bi(ue(g)?g:g.contextElement||Q(n.elements.popper),l,c,r),E=he(n.elements.reference),P=Bt({reference:E,element:N,strategy:"absolute",placement:i}),M=yt(Object.assign({},N,P)),H=p===_t?M:E,B={top:D.top-H.top+w.top,bottom:H.bottom-D.bottom+w.bottom,left:D.left-H.left+w.left,right:H.right-D.right+w.right},q=n.modifiersData.offset;if(p===_t&&q){var _e=q[i];Object.keys(B).forEach(function(X){var $e=[V,K].indexOf(X)>=0?1:-1,je=[k,K].indexOf(X)>=0?"y":"x";B[X]+=_e[je]*$e})}return B}function Ii(n,t){t===void 0&&(t={});var s=t,e=s.placement,i=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?ti:l,c=pe(e),f=c?a?Ni:Ni.filter(function(_){return pe(_)===c}):Ue,p=f.filter(function(_){return u.indexOf(_)>=0});p.length===0&&(p=f);var h=p.reduce(function(_,v){return _[v]=Ve(n,{placement:v,boundary:i,rootBoundary:o,padding:r})[j(v)],_},{});return Object.keys(h).sort(function(_,v){return h[_]-h[v]})}function Wo(n){if(j(n)===Xt)return[];var t=vt(n);return[ni(n),t,ni(t)]}function Uo(n){var t=n.state,s=n.options,e=n.name;if(!t.modifiersData[e]._skip){for(var i=s.mainAxis,o=i===void 0?!0:i,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,f=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,_=h===void 0?!0:h,v=s.allowedAutoPlacements,m=t.options.placement,w=j(m),y=w===m,N=l||(y||!_?[vt(m)]:Wo(m)),g=[m].concat(N).reduce(function(dt,Fe){return dt.concat(j(Fe)===Xt?Ii(t,{placement:Fe,boundary:c,rootBoundary:f,padding:u,flipVariations:_,allowedAutoPlacements:v}):Fe)},[]),D=t.rects.reference,E=t.rects.popper,P=new Map,M=!0,H=g[0],B=0;B=0,je=$e?"width":"height",re=Ve(t,{placement:q,boundary:c,rootBoundary:f,altBoundary:p,padding:u}),me=$e?X?V:F:X?K:k;D[je]>E[je]&&(me=vt(me));var Lt=vt(me),ze=[];if(o&&ze.push(re[_e]<=0),a&&ze.push(re[me]<=0,re[Lt]<=0),ze.every(function(dt){return dt})){H=q,M=!1;break}P.set(q,ze)}if(M)for(var Ht=_?3:1,bi=function(Fe){var Tt=g.find(function(Ut){var Ke=P.get(Ut);if(Ke)return Ke.slice(0,Fe).every(function(wi){return wi})});if(Tt)return H=Tt,"break"},Dt=Ht;Dt>0;Dt--){var Wt=bi(Dt);if(Wt==="break")break}t.placement!==H&&(t.modifiersData[e]._skip=!0,t.placement=H,t.reset=!0)}}var Fi={name:"flip",enabled:!0,phase:"main",fn:Uo,requiresIfExists:["offset"],data:{_skip:!1}};function Go(n,t,s){var e=j(n),i=[F,k].indexOf(e)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},t,{placement:n})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*i,[F,V].indexOf(e)>=0?{x:a,y:r}:{x:r,y:a}}function Vo(n){var t=n.state,s=n.options,e=n.name,i=s.offset,o=i===void 0?[0,0]:i,r=ti.reduce(function(c,f){return c[f]=Go(f,t.rects,o),c},{}),a=r[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[e]=r}var Li={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vo};function $o(n){var t=n.state,s=n.name;t.modifiersData[s]=Bt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Un={name:"popperOffsets",enabled:!0,phase:"read",fn:$o,data:{}};function Hi(n){return n==="x"?"y":"x"}function jo(n){var t=n.state,s=n.options,e=n.name,i=s.mainAxis,o=i===void 0?!0:i,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,f=s.padding,p=s.tether,h=p===void 0?!0:p,_=s.tetherOffset,v=_===void 0?0:_,m=Ve(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),w=j(t.placement),y=pe(t.placement),N=!y,g=ot(w),D=Hi(g),E=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,H=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,B=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_e={x:0,y:0};if(E){if(o){var X,$e=g==="y"?k:F,je=g==="y"?K:V,re=g==="y"?"height":"width",me=E[g],Lt=me+m[$e],ze=me-m[je],Ht=h?-M[re]/2:0,bi=y===Ae?P[re]:M[re],Dt=y===Ae?-M[re]:-P[re],Wt=t.elements.arrow,dt=h&&Wt?nt(Wt):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:At(),Tt=Fe[$e],Ut=Fe[je],Ke=st(0,P[re],dt[re]),wi=N?P[re]/2-Ht-Ke-Tt-B.mainAxis:bi-Ke-Tt-B.mainAxis,uo=N?-P[re]/2+Ht+Ke+Ut+B.mainAxis:Dt+Ke+Ut+B.mainAxis,Di=t.elements.arrow&&be(t.elements.arrow),ho=Di?g==="y"?Di.clientTop||0:Di.clientLeft||0:0,nn=(X=q?.[g])!=null?X:0,po=me+wi-nn-ho,fo=me+uo-nn,on=st(h?it(Lt,po):Lt,me,h?ye(ze,fo):ze);E[g]=on,_e[g]=on-me}if(a){var sn,_o=g==="x"?k:F,mo=g==="x"?K:V,Qe=E[D],Gt=D==="y"?"height":"width",rn=Qe+m[_o],an=Qe-m[mo],Ti=[k,F].indexOf(w)!==-1,ln=(sn=q?.[D])!=null?sn:0,cn=Ti?rn:Qe-P[Gt]-M[Gt]-ln+B.altAxis,dn=Ti?Qe+P[Gt]+M[Gt]-ln-B.altAxis:an,un=h&&Ti?In(cn,Qe,dn):st(h?cn:rn,Qe,h?dn:an);E[D]=un,_e[D]=un-Qe}t.modifiersData[e]=_e}}var Wi={name:"preventOverflow",enabled:!0,phase:"main",fn:jo,requiresIfExists:["offset"]};function Ui(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Gi(n){return n===A(n)||!L(n)?rt(n):Ui(n)}function zo(n){var t=n.getBoundingClientRect(),s=xe(t.width)/n.offsetWidth||1,e=xe(t.height)/n.offsetHeight||1;return s!==1||e!==1}function Vi(n,t,s){s===void 0&&(s=!1);var e=L(t),i=L(t)&&zo(t),o=Q(t),r=he(n,i,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(e||!e&&!s)&&(($(t)!=="body"||lt(o))&&(a=Gi(t)),L(t)?(l=he(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=at(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Ko(n){var t=new Map,s=new Set,e=[];n.forEach(function(o){t.set(o.name,o)});function i(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=t.get(a);l&&i(l)}}),e.push(o)}return n.forEach(function(o){s.has(o.name)||i(o)}),e}function $i(n){var t=Ko(n);return xn.reduce(function(s,e){return s.concat(t.filter(function(i){return i.phase===e}))},[])}function ji(n){var t;return function(){return t||(t=new Promise(function(s){Promise.resolve().then(function(){t=void 0,s(n())})})),t}}function zi(n){var t=n.reduce(function(s,e){var i=s[e.name];return s[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,s},{});return Object.keys(t).map(function(s){return t[s]})}var Gn={placement:"bottom",modifiers:[],strategy:"absolute"};function Vn(){for(var n=arguments.length,t=new Array(n),s=0;s0?0:-1),b(2),Ri(" ",i.i18n.getMonthLabel(s.firstDate)," "),b(),ie(e!==i.months.length-1?3:-1)}}function os(n,t){if(n&1&&Se(0,ns,4,3,null,null,Ze),n&2){let s=T();Oe(s.months)}}function ss(n,t){if(n&1&&(O(0,"div",1),ce(1),R()),n&2){let s=T(2);b(),Ce(s.i18n.getWeekLabel())}}function rs(n,t){if(n&1&&(O(0,"div",2),ce(1),R()),n&2){let s=t.$implicit;b(),Ce(s)}}function as(n,t){if(n&1&&(O(0,"div",0),x(1,ss,2,1,"div",1),Se(2,rs,2,1,"div",2,Kt),R()),n&2){let s=T();b(),ie(s.datepicker.showWeekNumbers?1:-1),b(),Oe(s.viewModel.weekdays)}}function ls(n,t){if(n&1&&(O(0,"div",4),ce(1),R()),n&2){let s=T(2).$implicit,e=T();b(),Ce(e.i18n.getWeekNumerals(s.number))}}function cs(n,t){}function ds(n,t){if(n&1&&x(0,cs,0,0,"ng-template",7),n&2){let s=T().$implicit,e=T(3);I("ngTemplateOutlet",e.datepicker.dayTemplate)("ngTemplateOutletContext",s.context)}}function us(n,t){if(n&1){let s=Xe();O(0,"div",6),Z("click",function(i){let o=Te(s).$implicit;return T(3).doSelect(o),Ee(i.preventDefault())}),x(1,ds,1,2,null,7),R()}if(n&2){let s=t.$implicit;G("disabled",s.context.disabled)("hidden",s.hidden)("ngb-dp-today",s.context.today),I("tabindex",s.tabindex),Re("aria-label",s.ariaLabel),b(),ie(s.hidden?-1:1)}}function hs(n,t){if(n&1&&(O(0,"div",3),x(1,ls,2,1,"div",4),Se(2,us,2,9,"div",5,Ze),R()),n&2){let s=T().$implicit,e=T();b(),ie(e.datepicker.showWeekNumbers?1:-1),b(),Oe(s.days)}}function ps(n,t){if(n&1&&x(0,hs,4,1,"div",3),n&2){let s=t.$implicit;ie(s.collapsed?-1:0)}}var fs=["defaultDayTemplate"],_s=["content"],ms=n=>({$implicit:n});function gs(n,t){if(n&1&&Me(0,"div",8),n&2){let s=t.date,e=t.currentMonth,i=t.selected,o=t.disabled,r=t.focused;I("date",s)("currentMonth",e)("selected",i)("disabled",o)("focused",r)}}function vs(n,t){if(n&1&&(O(0,"div",10),ce(1),R()),n&2){let s=T().$implicit,e=T(2);b(),Ri(" ",e.i18n.getMonthLabel(s.firstDate)," ")}}function ys(n,t){if(n&1&&(O(0,"div",9),x(1,vs,2,1,"div",10),Me(2,"ngb-datepicker-month",11),R()),n&2){let s=t.$implicit,e=T(2);b(),ie(e.navigation==="none"||e.displayMonths>1&&e.navigation==="select"?1:-1),b(),I("month",s.firstDate)}}function bs(n,t){if(n&1&&Se(0,ys,3,2,"div",9,Ze),n&2){let s=T();Oe(s.model.months)}}function ws(n,t){if(n&1){let s=Xe();O(0,"ngb-datepicker-navigation",12),Z("navigate",function(i){Te(s);let o=T();return Ee(o.onNavigateEvent(i))})("select",function(i){Te(s);let o=T();return Ee(o.onNavigateDateSelect(i))}),R()}if(n&2){let s=T();I("date",s.model.firstDate)("months",s.model.months)("disabled",s.model.disabled)("showSelect",s.model.navigation==="select")("prevDisabled",s.model.prevDisabled)("nextDisabled",s.model.nextDisabled)("selectBoxes",s.model.selectBoxes)}}function Ds(n,t){}function Ts(n,t){}var Es=["dialog"];function Ss(n,t){if(n&1&&(O(0,"strong",3),ce(1),R()),n&2){let s=T();b(),Ce(s.header)}}function Os(n,t){}function Cs(n,t){if(n&1){let s=Xe();O(0,"div",1),x(1,Os,0,0,"ng-template",4),O(2,"button",5),Z("click",function(){Te(s);let i=T();return Ee(i.hide())}),R()()}if(n&2){let s=T(),e=qt(1);b(),I("ngTemplateOutlet",s.contentHeaderTpl||e)}}function Rs(n,t){if(n&1&&(O(0,"span"),ce(1),R()),n&2){let s=T().$implicit,e=T();Ye(e.highlightClass),b(),Ce(s)}}function Ms(n,t){if(n&1&&(En(0),ce(1),Sn()),n&2){let s=T().$implicit;b(),Ce(s)}}function Ns(n,t){if(n&1&&x(0,Rs,2,4,"span",0)(1,Ms,2,1,"ng-container"),n&2){let s=t.$index;ie(s%2!==0?0:1)}}var Ps=(n,t,s)=>({result:n,term:t,formatter:s});function As(n,t){if(n&1&&Me(0,"ngb-highlight",2),n&2){let s=t.result,e=t.term,i=t.formatter;I("result",i(s))("term",e)}}function xs(n,t){}function ks(n,t){if(n&1){let s=Xe();O(0,"button",3),Z("mouseenter",function(){let i=Te(s).$index,o=T();return Ee(o.markActive(i))})("click",function(){let i=Te(s).$implicit,o=T();return Ee(o.select(i))}),x(1,xs,0,0,"ng-template",4),R()}if(n&2){let s=t.$implicit,e=t.$index,i=T(),o=qt(1);G("active",e===i.activeIdx),I("id",i.id+"-"+e),b(),I("ngTemplateOutlet",i.resultTemplate||o)("ngTemplateOutletContext",Cn(5,Ps,s,i.term,i.formatter))}}var eo={animation:!0,transitionTimerDelayMs:5},Ft=(()=>{let t=class t{constructor(){this.animation=eo.animation}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Bs=(()=>{let t=class t{constructor(){this._ngbConfig=d(Ft),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function Is(n){let{transitionDelay:t,transitionDuration:s}=window.getComputedStyle(n),e=parseFloat(t),i=parseFloat(s);return(e+i)*1e3}function we(n){return parseInt(`${n}`,10)}function It(n){return n!=null?`${n}`:""}function wt(n){return typeof n=="string"}function Be(n){return!isNaN(we(n))}function J(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n}function ci(n){return n!=null}function Fs(n){return n&&n.then}function jn(n){return Be(n)?`0${n}`.slice(-2):""}function Ls(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Hs(n,t){return!t||typeof n.closest>"u"?null:n.closest(t)}function pi(n){return(n||document.body).getBoundingClientRect()}function Ws(n){return t=>new Vt(s=>{let e=r=>n.run(()=>s.next(r)),i=r=>n.run(()=>s.error(r)),o=()=>n.run(()=>s.complete());return t.subscribe({next:e,error:i,complete:o})})}function zn(n){return n.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function to(n=document){let t=n?.activeElement;return t?t.shadowRoot?to(t.shadowRoot):t:null}var Us=()=>{},{transitionTimerDelayMs:Gs}=eo,si=new Map,fe=(n,t,s,e)=>{let i=e.context||{},o=si.get(t);if(o)switch(e.runningTransition){case"continue":return pn;case"stop":n.run(()=>o.transition$.complete()),i=Object.assign(o.context,i),si.delete(t)}let r=s(t,e.animation,i)||Us;if(!e.animation||window.getComputedStyle(t).transitionProperty==="none")return n.run(()=>r()),Et(void 0).pipe(Ws(n));let a=new ee,l=new ee,u=a.pipe(vn(!0));si.set(t,{transition$:a,complete:()=>{l.next(),l.complete()},context:i});let c=Is(t);return n.runOutsideAngular(()=>{let f=z(t,"transitionend").pipe(W(u),De(({target:h})=>h===t)),p=_n(c+Gs).pipe(W(u));Si(p,f,l).pipe(W(u)).subscribe(()=>{si.delete(t),n.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function Vs(n,t){if(typeof navigator>"u")return"0px";let{classList:s}=n,e=s.contains("show");e||s.add("show"),n.style[t]="";let i=n.getBoundingClientRect()[t]+"px";return e||s.remove("show"),i}var $s=(n,t,s)=>{let{direction:e,maxSize:i,dimension:o}=s,{classList:r}=n;function a(){r.add("collapse"),e==="show"?r.add("show"):r.remove("show")}if(!t){a();return}return i||(i=Vs(n,o),s.maxSize=i,n.style[o]=e!=="show"?i:"0px",r.remove("collapse","collapsing","show"),pi(n),r.add("collapsing")),n.style[o]=e==="show"?i:"0px",()=>{a(),r.remove("collapsing"),n.style[o]=""}},js=(()=>{let t=class t{constructor(){this._ngbConfig=d(Ft),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Kn=(()=>{let t=class t{constructor(){this._config=d(js),this._element=d(Y),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new S,this.horizontal=this._config.horizontal,this.shown=new S,this.hidden=new S}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return fe(this._zone,this._element.nativeElement,$s,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,o){i&2&&G("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0});let n=t;return n})(),zs=0,$u=(()=>{let t=class t{constructor(){this._vcr=d(zt),this._element=d(Y).nativeElement,this._item=d(fi),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges();for(let e of this._viewRef.rootNodes)this._element.appendChild(e)}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,o,r){if(i&1&&Pe(r,pt,7),i&2){let a;ne(a=oe())&&(o._bodyTpl=a.first)}},hostAttrs:[1,"accordion-body"],standalone:!0});let n=t;return n})(),Ks=(()=>{let t=class t{constructor(){this.item=d(fi),this.ngbCollapse=d(Kn)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,o){i&2&&(Ne("id",o.item.collapseId),Re("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[Tn([Kn])]});let n=t;return n})();var ju=(()=>{let t=class t{constructor(){this.item=d(fi)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,o){i&2&&G("collapsed",o.item.collapsed)},standalone:!0});let n=t;return n})(),fi=(()=>{let t=class t{constructor(){this._accordion=d(Qs),this._cd=d(We),this._destroyRef=d(Ot),this._collapsed=!0,this._id=`ngb-accordion-item-${zs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}set id(e){wt(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(et(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),e.shown.pipe(et(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,o,r){if(i&1&&Pe(r,Ks,7),i&2){let a;ne(a=oe())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,o){i&2&&Ne("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"],standalone:!0});let n=t;return n})(),Qs=(()=>{let t=class t{constructor(){this._config=d(Bs),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let i=this._getItem(e);return i?!i.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&e!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(i=>i.id===e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordion",""]],contentQueries:function(i,o,r){if(i&1&&Pe(r,fi,4),i&2){let a;ne(a=oe())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0});let n=t;return n})();var se=class n{static from(t){return t instanceof n?t:t?new n(t.year,t.month,t.day):null}constructor(t,s,e){this.year=J(t)?t:null,this.month=J(s)?s:null,this.day=J(e)?e:null}equals(t){return t!=null&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return t?this.year===t.year?this.month===t.month?this.day===t.day?!1:this.dayt.day:this.month>t.month:this.year>t.year:!1}};function Qn(n){return new se(n.getFullYear(),n.getMonth()+1,n.getDate())}function ri(n){let t=new Date(n.year,n.month-1,n.day,12);return isNaN(t.getTime())||t.setFullYear(n.year),t}function Js(){return new qs}var _i=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:()=>Js(),providedIn:"root"});let n=t;return n})(),qs=(()=>{let t=class t extends _i{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",o=1){let r=ri(e),a=!0,l=r.getMonth();switch(i){case"y":r.setFullYear(r.getFullYear()+o);break;case"m":l+=o,r.setMonth(l),l=l%12,l<0&&(l=l+12);break;case"d":r.setDate(r.getDate()+o),a=!1;break;default:return e}return a&&r.getMonth()!==l&&r.setDate(0),Qn(r)}getPrev(e,i="d",o=1){return this.getNext(e,i,-o)}getWeekday(e){let o=ri(e).getDay();return o===0?7:o}getWeekNumber(e,i){i===7&&(i=0);let o=(11-i)%7,r=e[o],a=ri(r);a.setDate(a.getDate()+4-(a.getDay()||7));let l=a.getTime();return a.setMonth(0),a.setDate(1),Math.floor(Math.round((l-a.getTime())/864e5)/7)+1}getToday(){return Qn(new Date)}isValid(e){if(!e||!J(e.year)||!J(e.month)||!J(e.day)||e.year===0)return!1;let i=ri(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=He(t)))(o||t)}})(),t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})();function bt(n,t){return!Ys(n,t)}function io(n,t){return!n&&!t?!1:!n||!t?!0:n.year!==t.year||n.month!==t.month}function Ys(n,t){return!n&&!t||!!n&&!!t&&n.equals(t)}function Zs(n,t){if(t&&n&&t.before(n))throw new Error(`'maxDate' ${t} should be greater than 'minDate' ${n}`)}function ai(n,t,s){return n&&t&&n.before(t)?t:n&&s&&n.after(s)?s:n||null}function Qi(n,t){let{minDate:s,maxDate:e,disabled:i,markDisabled:o}=t;return!(n==null||i||o&&o(n,{year:n.year,month:n.month})||s&&n.before(s)||e&&n.after(e))}function Xs(n,t,s,e){if(!t)return[];let i=n.getMonths(t.year);if(s&&t.year===s.year){let o=i.findIndex(r=>r===s.month);i=i.slice(o)}if(e&&t.year===e.year){let o=i.findIndex(r=>r===e.month);i=i.slice(0,o+1)}return i}function er(n,t,s){if(!n)return[];let e=t?Math.max(t.year,n.year-500):n.year-10,o=(s?Math.min(s.year,n.year+500):n.year+10)-e+1,r=Array(o);for(let a=0;a{let f=Object.assign(n.getNext(t,"m",c),{day:1});if(r[c]=null,!i){let p=a.findIndex(h=>h.firstDate.equals(f));p!==-1&&(r[c]=a.splice(p,1)[0])}return f}).forEach((u,c)=>{r[c]===null&&(r[c]=or(n,u,s,e,a.shift()||{}))}),r}function or(n,t,s,e,i={}){let{dayTemplateData:o,minDate:r,maxDate:a,firstDayOfWeek:l,markDisabled:u,outsideDays:c,weekdayWidth:f,weekdaysVisible:p}=s,h=n.getToday();i.firstDate=null,i.lastDate=null,i.number=t.month,i.year=t.year,i.weeks=i.weeks||[],i.weekdays=i.weekdays||[],t=sr(n,t,l),p||(i.weekdays.length=0);for(let _=0;_w.date),l),v.collapsed=c==="collapsed"&&m[0].date.month!==i.number&&m[m.length-1].date.month!==i.number}return i}function sr(n,t,s){let e=n.getDaysPerWeek(),i=new se(t.year,t.month,1),o=n.getWeekday(i)%e;return n.getPrev(i,"d",(e+o-s)%e)}var ct=(()=>{let t=class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:()=>new rr,providedIn:"root"});let n=t;return n})(),rr=(()=>{let t=class t extends ct{constructor(){super(...arguments),this._locale=d(Rn),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short"}).format(new Date(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long"}).format(new Date(2e3,e)))}getWeekdayLabel(e,i="narrow"){let o=[...Array(7).keys()].map(a=>Intl.DateTimeFormat(this._locale,{weekday:i}).format(new Date(Date.UTC(2021,5,a-1))));return o.map((a,l)=>o[(l+1)%7])[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){let i=new Date(e.year,e.month-1,e.day);return Mn(i,"fullDate",this._locale)}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=He(t)))(o||t)}})(),t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})(),Ji=(()=>{let t=class t{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=we(e),J(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=we(e),J(e)&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{let i=this.toValidDate(e,null);if(bt(this._state.maxDate,i))return{maxDate:i}},minDate:e=>{let i=this.toValidDate(e,null);if(bt(this._state.minDate,i))return{minDate:i}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}},weekdays:e=>{let i=e===!0||e===!1?"narrow":e,o=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==i||this._state.weekdaysVisible!==o)return{weekdayWidth:i,weekdaysVisible:o}}},this._calendar=d(_i),this._i18n=d(ct),this._model$=new ee,this._dateSelect$=new ee,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:"narrow",weekdaysVisible:!0}}get model$(){return this._model$.pipe(De(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(De(e=>e!==null))}set(e){let i=Object.keys(e).map(o=>this._VALIDATORS[o](e[o])).reduce((o,r)=>ut(ut({},o),r),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&bt(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){Qi(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){let i=this.toValidDate(e,this._calendar.getToday());i!=null&&!this._state.disabled&&(!this._state.firstDate||io(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){let o=this.toValidDate(e,null);o!=null&&!this._state.disabled&&(bt(this._state.selectedDate,o)&&this._nextState({selectedDate:o}),i.emitEvent&&Qi(o,this._state)&&this._dateSelect$.next(o))}toValidDate(e,i){let o=se.from(e);return i===void 0&&(i=this._calendar.getToday()),this._calendar.isValid(o)?o:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){let i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){let{months:i,displayMonths:o,selectedDate:r,focusDate:a,focusVisible:l,disabled:u,outsideDays:c}=e;e.months.forEach(f=>{f.weeks.forEach(p=>{p.days.forEach(h=>{a&&(h.context.focused=a.equals(h.date)&&l),h.tabindex=!u&&a&&h.date.equals(a)&&a.month===f.number?0:-1,u===!0&&(h.context.disabled=!0),r!==void 0&&(h.context.selected=r!==null&&r.equals(h.date)),f.number!==h.date.month&&(h.hidden=c==="hidden"||c==="collapsed"||o>1&&h.date.after(i[0].firstDate)&&h.date.before(i[o-1].lastDate))})})})}_updateState(e){let i=Object.assign({},this._state,e),o=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(Zs(i.minDate,i.maxDate),i.focusDate=ai(i.focusDate,i.minDate,i.maxDate),i.firstDate=ai(i.firstDate,i.minDate,i.maxDate),o=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(o=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=ai(i.focusDate,i.minDate,i.maxDate),o=i.focusDate,i.months.length!==0&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=ai(i.firstDate,i.minDate,i.maxDate),o=i.firstDate),o){let r="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,a=nr(this._calendar,o,i,this._i18n,r);i.months=a,i.firstDate=a[0].firstDate,i.lastDate=a[a.length-1].lastDate,"selectedDate"in e&&!Qi(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=o);let l=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,u=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;i.navigation==="select"?(("minDate"in e||"maxDate"in e||i.selectBoxes.years.length===0||l)&&(i.selectBoxes.years=er(i.firstDate,i.minDate,i.maxDate)),("minDate"in e||"maxDate"in e||i.selectBoxes.months.length===0||l)&&(i.selectBoxes.months=Xs(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},(i.navigation==="arrows"||i.navigation==="select")&&(u||l||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||ir(this._calendar,i.firstDate,i.minDate),i.nextDisabled=i.disabled||tr(this._calendar,i.lastDate,i.maxDate))}return i}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})(),di=function(n){return n[n.PREV=0]="PREV",n[n.NEXT=1]="NEXT",n}(di||{}),en=(()=>{let t=class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function ar(){return new lr}var mi=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:()=>ar(),providedIn:"root"});let n=t;return n})(),lr=(()=>{let t=class t extends mi{fromModel(e){return e&&J(e.year)&&J(e.month)&&J(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&J(e.year)&&J(e.month)&&J(e.day)?{year:e.year,month:e.month,day:e.day}:null}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=He(t)))(o||t)}})(),t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})(),cr=(()=>{let t=class t{processKey(e,i){let{state:o,calendar:r}=i;switch(e.key){case"PageUp":i.focusDate(r.getPrev(o.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":i.focusDate(r.getNext(o.focusedDate,e.shiftKey?"y":"m",1));break;case"End":i.focusDate(e.shiftKey?o.maxDate:o.lastDate);break;case"Home":i.focusDate(e.shiftKey?o.minDate:o.firstDate);break;case"ArrowLeft":i.focusDate(r.getPrev(o.focusedDate,"d",1));break;case"ArrowUp":i.focusDate(r.getPrev(o.focusedDate,"d",r.getDaysPerWeek()));break;case"ArrowRight":i.focusDate(r.getNext(o.focusedDate,"d",1));break;case"ArrowDown":i.focusDate(r.getNext(o.focusedDate,"d",r.getDaysPerWeek()));break;case"Enter":case" ":i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),dr=(()=>{let t=class t{constructor(){this.i18n=d(ct)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=ae({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(i,o){i&2&&G("bg-primary",o.selected)("text-white",o.selected)("text-muted",o.isMuted())("outside",o.isMuted())("active",o.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},standalone:!0,features:[de],attrs:Jo,decls:1,vars:1,template:function(i,o){i&1&&ce(0),i&2&&Ce(o.i18n.getDayNumerals(o.date))},styles:[`[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-tertiary-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5} +import{$ as ae,$a as T,Ba as le,Ca as zt,Da as Dn,E as ge,Ea as Tn,Eb as Rt,F as gn,Fb as Mi,Ga as x,Gb as Rn,H as vn,Ha as Re,Hb as We,Ia as I,Ja as G,Ka as Ye,Kb as Yt,Lb as ve,Na as ie,Nb as Mn,O as Oi,Oa as Kt,Pa as Ze,Q as W,Qa as Se,R as St,Ra as Oe,Sa as O,T as jt,Ta as R,Ua as Me,Ub as Mt,V as ht,Va as En,W as C,Wa as Sn,Wc as Zt,Y as yn,Ya as Xe,Za as Ne,Zc as Nn,_ as d,_a as Z,a as ut,ab as Qt,b as Ei,ba as U,bb as Jt,d as Vt,e as ee,ea as Ci,eb as Pe,f as hn,fa as bn,fb as ft,ga as Le,gb as ne,ha as Te,hb as oe,ia as Ee,ib as qt,j as pn,jb as ce,k as Et,kb as Ce,la as He,lb as Ri,m as Je,ma as wn,na as qe,o as fn,pa as Ot,qa as Y,ra as S,s as z,sb as Ct,t as _n,tb as de,ua as b,v as mn,vb as On,w as De,x as Si,xa as pt,xb as Cn,y as $t}from"./chunk-XTHSYQMN.js";function et(n){n||(bn(et),n=d(Ot));let t=new Vt(s=>n.onDestroy(s.next.bind(s)));return s=>s.pipe(W(t))}var k="top",K="bottom",V="right",F="left",Xt="auto",Ue=[k,K,V,F],Ae="start",tt="end",Pn="clippingParents",ei="viewport",_t="popper",An="reference",Ni=Ue.reduce(function(n,t){return n.concat([t+"-"+Ae,t+"-"+tt])},[]),ti=[].concat(Ue,[Xt]).reduce(function(n,t){return n.concat([t,t+"-"+Ae,t+"-"+tt])},[]),go="beforeRead",vo="read",yo="afterRead",bo="beforeMain",wo="main",Do="afterMain",To="beforeWrite",Eo="write",So="afterWrite",xn=[go,vo,yo,bo,wo,Do,To,Eo,So];function $(n){return n?(n.nodeName||"").toLowerCase():null}function A(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var t=n.ownerDocument;return t&&t.defaultView||window}return n}function ue(n){var t=A(n).Element;return n instanceof t||n instanceof Element}function L(n){var t=A(n).HTMLElement;return n instanceof t||n instanceof HTMLElement}function mt(n){if(typeof ShadowRoot>"u")return!1;var t=A(n).ShadowRoot;return n instanceof t||n instanceof ShadowRoot}function Oo(n){var t=n.state;Object.keys(t.elements).forEach(function(s){var e=t.styles[s]||{},i=t.attributes[s]||{},o=t.elements[s];!L(o)||!$(o)||(Object.assign(o.style,e),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function Co(n){var t=n.state,s={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,s.popper),t.styles=s,t.elements.arrow&&Object.assign(t.elements.arrow.style,s.arrow),function(){Object.keys(t.elements).forEach(function(e){var i=t.elements[e],o=t.attributes[e]||{},r=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:s[e]),a=r.reduce(function(l,u){return l[u]="",l},{});!L(i)||!$(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var kn={name:"applyStyles",enabled:!0,phase:"write",fn:Oo,effect:Co,requires:["computeStyles"]};function j(n){return n.split("-")[0]}var ye=Math.max,it=Math.min,xe=Math.round;function gt(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nt(){return!/^((?!chrome|android).)*safari/i.test(gt())}function he(n,t,s){t===void 0&&(t=!1),s===void 0&&(s=!1);var e=n.getBoundingClientRect(),i=1,o=1;t&&L(n)&&(i=n.offsetWidth>0&&xe(e.width)/n.offsetWidth||1,o=n.offsetHeight>0&&xe(e.height)/n.offsetHeight||1);var r=ue(n)?A(n):window,a=r.visualViewport,l=!Nt()&&s,u=(e.left+(l&&a?a.offsetLeft:0))/i,c=(e.top+(l&&a?a.offsetTop:0))/o,f=e.width/i,p=e.height/o;return{width:f,height:p,top:c,right:u+f,bottom:c+p,left:u,x:u,y:c}}function nt(n){var t=he(n),s=n.offsetWidth,e=n.offsetHeight;return Math.abs(t.width-s)<=1&&(s=t.width),Math.abs(t.height-e)<=1&&(e=t.height),{x:n.offsetLeft,y:n.offsetTop,width:s,height:e}}function Pt(n,t){var s=t.getRootNode&&t.getRootNode();if(n.contains(t))return!0;if(s&&mt(s)){var e=t;do{if(e&&n.isSameNode(e))return!0;e=e.parentNode||e.host}while(e)}return!1}function te(n){return A(n).getComputedStyle(n)}function Pi(n){return["table","td","th"].indexOf($(n))>=0}function Q(n){return((ue(n)?n.ownerDocument:n.document)||window.document).documentElement}function ke(n){return $(n)==="html"?n:n.assignedSlot||n.parentNode||(mt(n)?n.host:null)||Q(n)}function Bn(n){return!L(n)||te(n).position==="fixed"?null:n.offsetParent}function Ro(n){var t=/firefox/i.test(gt()),s=/Trident/i.test(gt());if(s&&L(n)){var e=te(n);if(e.position==="fixed")return null}var i=ke(n);for(mt(i)&&(i=i.host);L(i)&&["html","body"].indexOf($(i))<0;){var o=te(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function be(n){for(var t=A(n),s=Bn(n);s&&Pi(s)&&te(s).position==="static";)s=Bn(s);return s&&($(s)==="html"||$(s)==="body"&&te(s).position==="static")?t:s||Ro(n)||t}function ot(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function st(n,t,s){return ye(n,it(t,s))}function In(n,t,s){var e=st(n,t,s);return e>s?s:e}function At(){return{top:0,right:0,bottom:0,left:0}}function xt(n){return Object.assign({},At(),n)}function kt(n,t){return t.reduce(function(s,e){return s[e]=n,s},{})}var Mo=function(t,s){return t=typeof t=="function"?t(Object.assign({},s.rects,{placement:s.placement})):t,xt(typeof t!="number"?t:kt(t,Ue))};function No(n){var t,s=n.state,e=n.name,i=n.options,o=s.elements.arrow,r=s.modifiersData.popperOffsets,a=j(s.placement),l=ot(a),u=[F,V].indexOf(a)>=0,c=u?"height":"width";if(!(!o||!r)){var f=Mo(i.padding,s),p=nt(o),h=l==="y"?k:F,_=l==="y"?K:V,v=s.rects.reference[c]+s.rects.reference[l]-r[l]-s.rects.popper[c],m=r[l]-s.rects.reference[l],w=be(o),y=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,N=v/2-m/2,g=f[h],D=y-p[c]-f[_],E=y/2-p[c]/2+N,P=st(g,E,D),M=l;s.modifiersData[e]=(t={},t[M]=P,t.centerOffset=P-E,t)}}function Po(n){var t=n.state,s=n.options,e=s.element,i=e===void 0?"[data-popper-arrow]":e;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||Pt(t.elements.popper,i)&&(t.elements.arrow=i))}var Ai={name:"arrow",enabled:!0,phase:"main",fn:No,effect:Po,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function pe(n){return n.split("-")[1]}var Ao={top:"auto",right:"auto",bottom:"auto",left:"auto"};function xo(n,t){var s=n.x,e=n.y,i=t.devicePixelRatio||1;return{x:xe(s*i)/i||0,y:xe(e*i)/i||0}}function Fn(n){var t,s=n.popper,e=n.popperRect,i=n.placement,o=n.variation,r=n.offsets,a=n.position,l=n.gpuAcceleration,u=n.adaptive,c=n.roundOffsets,f=n.isFixed,p=r.x,h=p===void 0?0:p,_=r.y,v=_===void 0?0:_,m=typeof c=="function"?c({x:h,y:v}):{x:h,y:v};h=m.x,v=m.y;var w=r.hasOwnProperty("x"),y=r.hasOwnProperty("y"),N=F,g=k,D=window;if(u){var E=be(s),P="clientHeight",M="clientWidth";if(E===A(s)&&(E=Q(s),te(E).position!=="static"&&a==="absolute"&&(P="scrollHeight",M="scrollWidth")),E=E,i===k||(i===F||i===V)&&o===tt){g=K;var H=f&&E===D&&D.visualViewport?D.visualViewport.height:E[P];v-=H-e.height,v*=l?1:-1}if(i===F||(i===k||i===K)&&o===tt){N=V;var B=f&&E===D&&D.visualViewport?D.visualViewport.width:E[M];h-=B-e.width,h*=l?1:-1}}var q=Object.assign({position:a},u&&Ao),_e=c===!0?xo({x:h,y:v},A(s)):{x:h,y:v};if(h=_e.x,v=_e.y,l){var X;return Object.assign({},q,(X={},X[g]=y?"0":"",X[N]=w?"0":"",X.transform=(D.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",X))}return Object.assign({},q,(t={},t[g]=y?v+"px":"",t[N]=w?h+"px":"",t.transform="",t))}function ko(n){var t=n.state,s=n.options,e=s.gpuAcceleration,i=e===void 0?!0:e,o=s.adaptive,r=o===void 0?!0:o,a=s.roundOffsets,l=a===void 0?!0:a,u={placement:j(t.placement),variation:pe(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Fn(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Fn(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Ln={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ko,data:{}};var ii={passive:!0};function Bo(n){var t=n.state,s=n.instance,e=n.options,i=e.scroll,o=i===void 0?!0:i,r=e.resize,a=r===void 0?!0:r,l=A(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",s.update,ii)}),a&&l.addEventListener("resize",s.update,ii),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",s.update,ii)}),a&&l.removeEventListener("resize",s.update,ii)}}var Hn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Bo,data:{}};var Io={left:"right",right:"left",bottom:"top",top:"bottom"};function vt(n){return n.replace(/left|right|bottom|top/g,function(t){return Io[t]})}var Fo={start:"end",end:"start"};function ni(n){return n.replace(/start|end/g,function(t){return Fo[t]})}function rt(n){var t=A(n),s=t.pageXOffset,e=t.pageYOffset;return{scrollLeft:s,scrollTop:e}}function at(n){return he(Q(n)).left+rt(n).scrollLeft}function xi(n,t){var s=A(n),e=Q(n),i=s.visualViewport,o=e.clientWidth,r=e.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;var u=Nt();(u||!u&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a+at(n),y:l}}function ki(n){var t,s=Q(n),e=rt(n),i=(t=n.ownerDocument)==null?void 0:t.body,o=ye(s.scrollWidth,s.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=ye(s.scrollHeight,s.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-e.scrollLeft+at(n),l=-e.scrollTop;return te(i||s).direction==="rtl"&&(a+=ye(s.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function lt(n){var t=te(n),s=t.overflow,e=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(s+i+e)}function oi(n){return["html","body","#document"].indexOf($(n))>=0?n.ownerDocument.body:L(n)&<(n)?n:oi(ke(n))}function Ge(n,t){var s;t===void 0&&(t=[]);var e=oi(n),i=e===((s=n.ownerDocument)==null?void 0:s.body),o=A(e),r=i?[o].concat(o.visualViewport||[],lt(e)?e:[]):e,a=t.concat(r);return i?a:a.concat(Ge(ke(r)))}function yt(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Lo(n,t){var s=he(n,!1,t==="fixed");return s.top=s.top+n.clientTop,s.left=s.left+n.clientLeft,s.bottom=s.top+n.clientHeight,s.right=s.left+n.clientWidth,s.width=n.clientWidth,s.height=n.clientHeight,s.x=s.left,s.y=s.top,s}function Wn(n,t,s){return t===ei?yt(xi(n,s)):ue(t)?Lo(t,s):yt(ki(Q(n)))}function Ho(n){var t=Ge(ke(n)),s=["absolute","fixed"].indexOf(te(n).position)>=0,e=s&&L(n)?be(n):n;return ue(e)?t.filter(function(i){return ue(i)&&Pt(i,e)&&$(i)!=="body"}):[]}function Bi(n,t,s,e){var i=t==="clippingParents"?Ho(n):[].concat(t),o=[].concat(i,[s]),r=o[0],a=o.reduce(function(l,u){var c=Wn(n,u,e);return l.top=ye(c.top,l.top),l.right=it(c.right,l.right),l.bottom=it(c.bottom,l.bottom),l.left=ye(c.left,l.left),l},Wn(n,r,e));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Bt(n){var t=n.reference,s=n.element,e=n.placement,i=e?j(e):null,o=e?pe(e):null,r=t.x+t.width/2-s.width/2,a=t.y+t.height/2-s.height/2,l;switch(i){case k:l={x:r,y:t.y-s.height};break;case K:l={x:r,y:t.y+t.height};break;case V:l={x:t.x+t.width,y:a};break;case F:l={x:t.x-s.width,y:a};break;default:l={x:t.x,y:t.y}}var u=i?ot(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Ae:l[u]=l[u]-(t[c]/2-s[c]/2);break;case tt:l[u]=l[u]+(t[c]/2-s[c]/2);break;default:}}return l}function Ve(n,t){t===void 0&&(t={});var s=t,e=s.placement,i=e===void 0?n.placement:e,o=s.strategy,r=o===void 0?n.strategy:o,a=s.boundary,l=a===void 0?Pn:a,u=s.rootBoundary,c=u===void 0?ei:u,f=s.elementContext,p=f===void 0?_t:f,h=s.altBoundary,_=h===void 0?!1:h,v=s.padding,m=v===void 0?0:v,w=xt(typeof m!="number"?m:kt(m,Ue)),y=p===_t?An:_t,N=n.rects.popper,g=n.elements[_?y:p],D=Bi(ue(g)?g:g.contextElement||Q(n.elements.popper),l,c,r),E=he(n.elements.reference),P=Bt({reference:E,element:N,strategy:"absolute",placement:i}),M=yt(Object.assign({},N,P)),H=p===_t?M:E,B={top:D.top-H.top+w.top,bottom:H.bottom-D.bottom+w.bottom,left:D.left-H.left+w.left,right:H.right-D.right+w.right},q=n.modifiersData.offset;if(p===_t&&q){var _e=q[i];Object.keys(B).forEach(function(X){var $e=[V,K].indexOf(X)>=0?1:-1,je=[k,K].indexOf(X)>=0?"y":"x";B[X]+=_e[je]*$e})}return B}function Ii(n,t){t===void 0&&(t={});var s=t,e=s.placement,i=s.boundary,o=s.rootBoundary,r=s.padding,a=s.flipVariations,l=s.allowedAutoPlacements,u=l===void 0?ti:l,c=pe(e),f=c?a?Ni:Ni.filter(function(_){return pe(_)===c}):Ue,p=f.filter(function(_){return u.indexOf(_)>=0});p.length===0&&(p=f);var h=p.reduce(function(_,v){return _[v]=Ve(n,{placement:v,boundary:i,rootBoundary:o,padding:r})[j(v)],_},{});return Object.keys(h).sort(function(_,v){return h[_]-h[v]})}function Wo(n){if(j(n)===Xt)return[];var t=vt(n);return[ni(n),t,ni(t)]}function Uo(n){var t=n.state,s=n.options,e=n.name;if(!t.modifiersData[e]._skip){for(var i=s.mainAxis,o=i===void 0?!0:i,r=s.altAxis,a=r===void 0?!0:r,l=s.fallbackPlacements,u=s.padding,c=s.boundary,f=s.rootBoundary,p=s.altBoundary,h=s.flipVariations,_=h===void 0?!0:h,v=s.allowedAutoPlacements,m=t.options.placement,w=j(m),y=w===m,N=l||(y||!_?[vt(m)]:Wo(m)),g=[m].concat(N).reduce(function(dt,Fe){return dt.concat(j(Fe)===Xt?Ii(t,{placement:Fe,boundary:c,rootBoundary:f,padding:u,flipVariations:_,allowedAutoPlacements:v}):Fe)},[]),D=t.rects.reference,E=t.rects.popper,P=new Map,M=!0,H=g[0],B=0;B=0,je=$e?"width":"height",re=Ve(t,{placement:q,boundary:c,rootBoundary:f,altBoundary:p,padding:u}),me=$e?X?V:F:X?K:k;D[je]>E[je]&&(me=vt(me));var Lt=vt(me),ze=[];if(o&&ze.push(re[_e]<=0),a&&ze.push(re[me]<=0,re[Lt]<=0),ze.every(function(dt){return dt})){H=q,M=!1;break}P.set(q,ze)}if(M)for(var Ht=_?3:1,bi=function(Fe){var Tt=g.find(function(Ut){var Ke=P.get(Ut);if(Ke)return Ke.slice(0,Fe).every(function(wi){return wi})});if(Tt)return H=Tt,"break"},Dt=Ht;Dt>0;Dt--){var Wt=bi(Dt);if(Wt==="break")break}t.placement!==H&&(t.modifiersData[e]._skip=!0,t.placement=H,t.reset=!0)}}var Fi={name:"flip",enabled:!0,phase:"main",fn:Uo,requiresIfExists:["offset"],data:{_skip:!1}};function Go(n,t,s){var e=j(n),i=[F,k].indexOf(e)>=0?-1:1,o=typeof s=="function"?s(Object.assign({},t,{placement:n})):s,r=o[0],a=o[1];return r=r||0,a=(a||0)*i,[F,V].indexOf(e)>=0?{x:a,y:r}:{x:r,y:a}}function Vo(n){var t=n.state,s=n.options,e=n.name,i=s.offset,o=i===void 0?[0,0]:i,r=ti.reduce(function(c,f){return c[f]=Go(f,t.rects,o),c},{}),a=r[t.placement],l=a.x,u=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[e]=r}var Li={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vo};function $o(n){var t=n.state,s=n.name;t.modifiersData[s]=Bt({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var Un={name:"popperOffsets",enabled:!0,phase:"read",fn:$o,data:{}};function Hi(n){return n==="x"?"y":"x"}function jo(n){var t=n.state,s=n.options,e=n.name,i=s.mainAxis,o=i===void 0?!0:i,r=s.altAxis,a=r===void 0?!1:r,l=s.boundary,u=s.rootBoundary,c=s.altBoundary,f=s.padding,p=s.tether,h=p===void 0?!0:p,_=s.tetherOffset,v=_===void 0?0:_,m=Ve(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),w=j(t.placement),y=pe(t.placement),N=!y,g=ot(w),D=Hi(g),E=t.modifiersData.popperOffsets,P=t.rects.reference,M=t.rects.popper,H=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,B=typeof H=="number"?{mainAxis:H,altAxis:H}:Object.assign({mainAxis:0,altAxis:0},H),q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,_e={x:0,y:0};if(E){if(o){var X,$e=g==="y"?k:F,je=g==="y"?K:V,re=g==="y"?"height":"width",me=E[g],Lt=me+m[$e],ze=me-m[je],Ht=h?-M[re]/2:0,bi=y===Ae?P[re]:M[re],Dt=y===Ae?-M[re]:-P[re],Wt=t.elements.arrow,dt=h&&Wt?nt(Wt):{width:0,height:0},Fe=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:At(),Tt=Fe[$e],Ut=Fe[je],Ke=st(0,P[re],dt[re]),wi=N?P[re]/2-Ht-Ke-Tt-B.mainAxis:bi-Ke-Tt-B.mainAxis,uo=N?-P[re]/2+Ht+Ke+Ut+B.mainAxis:Dt+Ke+Ut+B.mainAxis,Di=t.elements.arrow&&be(t.elements.arrow),ho=Di?g==="y"?Di.clientTop||0:Di.clientLeft||0:0,nn=(X=q?.[g])!=null?X:0,po=me+wi-nn-ho,fo=me+uo-nn,on=st(h?it(Lt,po):Lt,me,h?ye(ze,fo):ze);E[g]=on,_e[g]=on-me}if(a){var sn,_o=g==="x"?k:F,mo=g==="x"?K:V,Qe=E[D],Gt=D==="y"?"height":"width",rn=Qe+m[_o],an=Qe-m[mo],Ti=[k,F].indexOf(w)!==-1,ln=(sn=q?.[D])!=null?sn:0,cn=Ti?rn:Qe-P[Gt]-M[Gt]-ln+B.altAxis,dn=Ti?Qe+P[Gt]+M[Gt]-ln-B.altAxis:an,un=h&&Ti?In(cn,Qe,dn):st(h?cn:rn,Qe,h?dn:an);E[D]=un,_e[D]=un-Qe}t.modifiersData[e]=_e}}var Wi={name:"preventOverflow",enabled:!0,phase:"main",fn:jo,requiresIfExists:["offset"]};function Ui(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Gi(n){return n===A(n)||!L(n)?rt(n):Ui(n)}function zo(n){var t=n.getBoundingClientRect(),s=xe(t.width)/n.offsetWidth||1,e=xe(t.height)/n.offsetHeight||1;return s!==1||e!==1}function Vi(n,t,s){s===void 0&&(s=!1);var e=L(t),i=L(t)&&zo(t),o=Q(t),r=he(n,i,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(e||!e&&!s)&&(($(t)!=="body"||lt(o))&&(a=Gi(t)),L(t)?(l=he(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=at(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Ko(n){var t=new Map,s=new Set,e=[];n.forEach(function(o){t.set(o.name,o)});function i(o){s.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!s.has(a)){var l=t.get(a);l&&i(l)}}),e.push(o)}return n.forEach(function(o){s.has(o.name)||i(o)}),e}function $i(n){var t=Ko(n);return xn.reduce(function(s,e){return s.concat(t.filter(function(i){return i.phase===e}))},[])}function ji(n){var t;return function(){return t||(t=new Promise(function(s){Promise.resolve().then(function(){t=void 0,s(n())})})),t}}function zi(n){var t=n.reduce(function(s,e){var i=s[e.name];return s[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,s},{});return Object.keys(t).map(function(s){return t[s]})}var Gn={placement:"bottom",modifiers:[],strategy:"absolute"};function Vn(){for(var n=arguments.length,t=new Array(n),s=0;s0?0:-1),b(2),Ri(" ",i.i18n.getMonthLabel(s.firstDate)," "),b(),ie(e!==i.months.length-1?3:-1)}}function os(n,t){if(n&1&&Se(0,ns,4,3,null,null,Ze),n&2){let s=T();Oe(s.months)}}function ss(n,t){if(n&1&&(O(0,"div",1),ce(1),R()),n&2){let s=T(2);b(),Ce(s.i18n.getWeekLabel())}}function rs(n,t){if(n&1&&(O(0,"div",2),ce(1),R()),n&2){let s=t.$implicit;b(),Ce(s)}}function as(n,t){if(n&1&&(O(0,"div",0),x(1,ss,2,1,"div",1),Se(2,rs,2,1,"div",2,Kt),R()),n&2){let s=T();b(),ie(s.datepicker.showWeekNumbers?1:-1),b(),Oe(s.viewModel.weekdays)}}function ls(n,t){if(n&1&&(O(0,"div",4),ce(1),R()),n&2){let s=T(2).$implicit,e=T();b(),Ce(e.i18n.getWeekNumerals(s.number))}}function cs(n,t){}function ds(n,t){if(n&1&&x(0,cs,0,0,"ng-template",7),n&2){let s=T().$implicit,e=T(3);I("ngTemplateOutlet",e.datepicker.dayTemplate)("ngTemplateOutletContext",s.context)}}function us(n,t){if(n&1){let s=Xe();O(0,"div",6),Z("click",function(i){let o=Te(s).$implicit;return T(3).doSelect(o),Ee(i.preventDefault())}),x(1,ds,1,2,null,7),R()}if(n&2){let s=t.$implicit;G("disabled",s.context.disabled)("hidden",s.hidden)("ngb-dp-today",s.context.today),I("tabindex",s.tabindex),Re("aria-label",s.ariaLabel),b(),ie(s.hidden?-1:1)}}function hs(n,t){if(n&1&&(O(0,"div",3),x(1,ls,2,1,"div",4),Se(2,us,2,9,"div",5,Ze),R()),n&2){let s=T().$implicit,e=T();b(),ie(e.datepicker.showWeekNumbers?1:-1),b(),Oe(s.days)}}function ps(n,t){if(n&1&&x(0,hs,4,1,"div",3),n&2){let s=t.$implicit;ie(s.collapsed?-1:0)}}var fs=["defaultDayTemplate"],_s=["content"],ms=n=>({$implicit:n});function gs(n,t){if(n&1&&Me(0,"div",8),n&2){let s=t.date,e=t.currentMonth,i=t.selected,o=t.disabled,r=t.focused;I("date",s)("currentMonth",e)("selected",i)("disabled",o)("focused",r)}}function vs(n,t){if(n&1&&(O(0,"div",10),ce(1),R()),n&2){let s=T().$implicit,e=T(2);b(),Ri(" ",e.i18n.getMonthLabel(s.firstDate)," ")}}function ys(n,t){if(n&1&&(O(0,"div",9),x(1,vs,2,1,"div",10),Me(2,"ngb-datepicker-month",11),R()),n&2){let s=t.$implicit,e=T(2);b(),ie(e.navigation==="none"||e.displayMonths>1&&e.navigation==="select"?1:-1),b(),I("month",s.firstDate)}}function bs(n,t){if(n&1&&Se(0,ys,3,2,"div",9,Ze),n&2){let s=T();Oe(s.model.months)}}function ws(n,t){if(n&1){let s=Xe();O(0,"ngb-datepicker-navigation",12),Z("navigate",function(i){Te(s);let o=T();return Ee(o.onNavigateEvent(i))})("select",function(i){Te(s);let o=T();return Ee(o.onNavigateDateSelect(i))}),R()}if(n&2){let s=T();I("date",s.model.firstDate)("months",s.model.months)("disabled",s.model.disabled)("showSelect",s.model.navigation==="select")("prevDisabled",s.model.prevDisabled)("nextDisabled",s.model.nextDisabled)("selectBoxes",s.model.selectBoxes)}}function Ds(n,t){}function Ts(n,t){}var Es=["dialog"];function Ss(n,t){if(n&1&&(O(0,"strong",3),ce(1),R()),n&2){let s=T();b(),Ce(s.header)}}function Os(n,t){}function Cs(n,t){if(n&1){let s=Xe();O(0,"div",1),x(1,Os,0,0,"ng-template",4),O(2,"button",5),Z("click",function(){Te(s);let i=T();return Ee(i.hide())}),R()()}if(n&2){let s=T(),e=qt(1);b(),I("ngTemplateOutlet",s.contentHeaderTpl||e)}}function Rs(n,t){if(n&1&&(O(0,"span"),ce(1),R()),n&2){let s=T().$implicit,e=T();Ye(e.highlightClass),b(),Ce(s)}}function Ms(n,t){if(n&1&&(En(0),ce(1),Sn()),n&2){let s=T().$implicit;b(),Ce(s)}}function Ns(n,t){if(n&1&&x(0,Rs,2,4,"span",0)(1,Ms,2,1,"ng-container"),n&2){let s=t.$index;ie(s%2!==0?0:1)}}var Ps=(n,t,s)=>({result:n,term:t,formatter:s});function As(n,t){if(n&1&&Me(0,"ngb-highlight",2),n&2){let s=t.result,e=t.term,i=t.formatter;I("result",i(s))("term",e)}}function xs(n,t){}function ks(n,t){if(n&1){let s=Xe();O(0,"button",3),Z("mouseenter",function(){let i=Te(s).$index,o=T();return Ee(o.markActive(i))})("click",function(){let i=Te(s).$implicit,o=T();return Ee(o.select(i))}),x(1,xs,0,0,"ng-template",4),R()}if(n&2){let s=t.$implicit,e=t.$index,i=T(),o=qt(1);G("active",e===i.activeIdx),I("id",i.id+"-"+e),b(),I("ngTemplateOutlet",i.resultTemplate||o)("ngTemplateOutletContext",Cn(5,Ps,s,i.term,i.formatter))}}var eo={animation:!0,transitionTimerDelayMs:5},Ft=(()=>{let t=class t{constructor(){this.animation=eo.animation}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Bs=(()=>{let t=class t{constructor(){this._ngbConfig=d(Ft),this.closeOthers=!1,this.destroyOnHide=!0}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function Is(n){let{transitionDelay:t,transitionDuration:s}=window.getComputedStyle(n),e=parseFloat(t),i=parseFloat(s);return(e+i)*1e3}function we(n){return parseInt(`${n}`,10)}function It(n){return n!=null?`${n}`:""}function wt(n){return typeof n=="string"}function Be(n){return!isNaN(we(n))}function J(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n}function ci(n){return n!=null}function Fs(n){return n&&n.then}function jn(n){return Be(n)?`0${n}`.slice(-2):""}function Ls(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function Hs(n,t){return!t||typeof n.closest>"u"?null:n.closest(t)}function pi(n){return(n||document.body).getBoundingClientRect()}function Ws(n){return t=>new Vt(s=>{let e=r=>n.run(()=>s.next(r)),i=r=>n.run(()=>s.error(r)),o=()=>n.run(()=>s.complete());return t.subscribe({next:e,error:i,complete:o})})}function zn(n){return n.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function to(n=document){let t=n?.activeElement;return t?t.shadowRoot?to(t.shadowRoot):t:null}var Us=()=>{},{transitionTimerDelayMs:Gs}=eo,si=new Map,fe=(n,t,s,e)=>{let i=e.context||{},o=si.get(t);if(o)switch(e.runningTransition){case"continue":return pn;case"stop":n.run(()=>o.transition$.complete()),i=Object.assign(o.context,i),si.delete(t)}let r=s(t,e.animation,i)||Us;if(!e.animation||window.getComputedStyle(t).transitionProperty==="none")return n.run(()=>r()),Et(void 0).pipe(Ws(n));let a=new ee,l=new ee,u=a.pipe(vn(!0));si.set(t,{transition$:a,complete:()=>{l.next(),l.complete()},context:i});let c=Is(t);return n.runOutsideAngular(()=>{let f=z(t,"transitionend").pipe(W(u),De(({target:h})=>h===t)),p=_n(c+Gs).pipe(W(u));Si(p,f,l).pipe(W(u)).subscribe(()=>{si.delete(t),n.run(()=>{r(),a.next(),a.complete()})})}),a.asObservable()};function Vs(n,t){if(typeof navigator>"u")return"0px";let{classList:s}=n,e=s.contains("show");e||s.add("show"),n.style[t]="";let i=n.getBoundingClientRect()[t]+"px";return e||s.remove("show"),i}var $s=(n,t,s)=>{let{direction:e,maxSize:i,dimension:o}=s,{classList:r}=n;function a(){r.add("collapse"),e==="show"?r.add("show"):r.remove("show")}if(!t){a();return}return i||(i=Vs(n,o),s.maxSize=i,n.style[o]=e!=="show"?i:"0px",r.remove("collapse","collapsing","show"),pi(n),r.add("collapsing")),n.style[o]=e==="show"?i:"0px",()=>{a(),r.remove("collapsing"),n.style[o]=""}},js=(()=>{let t=class t{constructor(){this._ngbConfig=d(Ft),this.horizontal=!1}get animation(){return this._animation??this._ngbConfig.animation}set animation(e){this._animation=e}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Kn=(()=>{let t=class t{constructor(){this._config=d(js),this._element=d(Y),this._zone=d(le),this.animation=this._config.animation,this._afterInit=!1,this._isCollapsed=!1,this.ngbCollapseChange=new S,this.horizontal=this._config.horizontal,this.shown=new S,this.hidden=new S}set collapsed(e){this._isCollapsed!==e&&(this._isCollapsed=e,this._afterInit&&this._runTransitionWithEvents(e,this.animation))}ngOnInit(){this._runTransition(this._isCollapsed,!1),this._afterInit=!0}toggle(e=this._isCollapsed){this.collapsed=!e,this.ngbCollapseChange.next(this._isCollapsed)}_runTransition(e,i){return fe(this._zone,this._element.nativeElement,$s,{animation:i,runningTransition:"stop",context:{direction:e?"hide":"show",dimension:this.horizontal?"width":"height"}})}_runTransitionWithEvents(e,i){this._runTransition(e,i).subscribe(()=>{e?this.hidden.emit():this.shown.emit()})}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbCollapse",""]],hostVars:2,hostBindings:function(i,o){i&2&&G("collapse-horizontal",o.horizontal)},inputs:{animation:"animation",collapsed:[0,"ngbCollapse","collapsed"],horizontal:"horizontal"},outputs:{ngbCollapseChange:"ngbCollapseChange",shown:"shown",hidden:"hidden"},exportAs:["ngbCollapse"],standalone:!0});let n=t;return n})(),zs=0,$u=(()=>{let t=class t{constructor(){this._vcr=d(zt),this._element=d(Y).nativeElement,this._item=d(fi),this._viewRef=null}ngAfterContentChecked(){this._bodyTpl&&(this._item._shouldBeInDOM?this._createViewIfNotExists():this._destroyViewIfExists())}ngOnDestroy(){this._destroyViewIfExists()}_destroyViewIfExists(){this._viewRef?.destroy(),this._viewRef=null}_createViewIfNotExists(){if(!this._viewRef){this._viewRef=this._vcr.createEmbeddedView(this._bodyTpl),this._viewRef.detectChanges();for(let e of this._viewRef.rootNodes)this._element.appendChild(e)}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionBody",""]],contentQueries:function(i,o,r){if(i&1&&Pe(r,pt,7),i&2){let a;ne(a=oe())&&(o._bodyTpl=a.first)}},hostAttrs:[1,"accordion-body"],standalone:!0});let n=t;return n})(),Ks=(()=>{let t=class t{constructor(){this.item=d(fi),this.ngbCollapse=d(Kn)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionCollapse",""]],hostAttrs:["role","region",1,"accordion-collapse"],hostVars:2,hostBindings:function(i,o){i&2&&(Ne("id",o.item.collapseId),Re("aria-labelledby",o.item.toggleId))},exportAs:["ngbAccordionCollapse"],standalone:!0,features:[Tn([Kn])]});let n=t;return n})();var ju=(()=>{let t=class t{constructor(){this.item=d(fi)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionHeader",""]],hostAttrs:["role","heading",1,"accordion-header"],hostVars:2,hostBindings:function(i,o){i&2&&G("collapsed",o.item.collapsed)},standalone:!0});let n=t;return n})(),fi=(()=>{let t=class t{constructor(){this._accordion=d(Qs),this._cd=d(We),this._destroyRef=d(Ot),this._collapsed=!0,this._id=`ngb-accordion-item-${zs++}`,this._collapseAnimationRunning=!1,this.disabled=!1,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}set id(e){wt(e)&&e!==""&&(this._id=e)}set destroyOnHide(e){this._destroyOnHide=e}get destroyOnHide(){return this._destroyOnHide===void 0?this._accordion.destroyOnHide:this._destroyOnHide}set collapsed(e){e?this.collapse():this.expand()}get collapsed(){return this._collapsed}get id(){return`${this._id}`}get toggleId(){return`${this.id}-toggle`}get collapseId(){return`${this.id}-collapse`}get _shouldBeInDOM(){return!this.collapsed||this._collapseAnimationRunning||!this.destroyOnHide}ngAfterContentInit(){let{ngbCollapse:e}=this._collapse;e.animation=!1,e.collapsed=this.collapsed,e.animation=this._accordion.animation,e.hidden.pipe(et(this._destroyRef)).subscribe(()=>{this._collapseAnimationRunning=!1,this.hidden.emit(),this._accordion.hidden.emit(this.id)}),e.shown.pipe(et(this._destroyRef)).subscribe(()=>{this.shown.emit(),this._accordion.shown.emit(this.id)})}toggle(){this.collapsed=!this.collapsed}expand(){if(this.collapsed){if(!this._accordion._ensureCanExpand(this))return;this._collapsed=!1,this._cd.markForCheck(),this._cd.detectChanges(),this.show.emit(),this._accordion.show.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!1}}collapse(){this.collapsed||(this._collapsed=!0,this._collapseAnimationRunning=!0,this._cd.markForCheck(),this.hide.emit(),this._accordion.hide.emit(this.id),this._collapse.ngbCollapse.animation=this._accordion.animation,this._collapse.ngbCollapse.collapsed=!0)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordionItem",""]],contentQueries:function(i,o,r){if(i&1&&Pe(r,Ks,7),i&2){let a;ne(a=oe())&&(o._collapse=a.first)}},hostAttrs:[1,"accordion-item"],hostVars:1,hostBindings:function(i,o){i&2&&Ne("id",o.id)},inputs:{id:[0,"ngbAccordionItem","id"],destroyOnHide:"destroyOnHide",disabled:"disabled",collapsed:"collapsed"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordionItem"],standalone:!0});let n=t;return n})(),Qs=(()=>{let t=class t{constructor(){this._config=d(Bs),this._anItemWasAlreadyExpandedDuringInitialisation=!1,this.animation=this._config.animation,this.closeOthers=this._config.closeOthers,this.destroyOnHide=this._config.destroyOnHide,this.show=new S,this.shown=new S,this.hide=new S,this.hidden=new S}toggle(e){this._getItem(e)?.toggle()}expand(e){this._getItem(e)?.expand()}expandAll(){this._items&&(this.closeOthers?this._items.find(e=>!e.collapsed)||this._items.first.expand():this._items.forEach(e=>e.expand()))}collapse(e){this._getItem(e)?.collapse()}collapseAll(){this._items?.forEach(e=>e.collapse())}isExpanded(e){let i=this._getItem(e);return i?!i.collapsed:!1}_ensureCanExpand(e){return this.closeOthers?this._items?(this._items.find(i=>!i.collapsed&&e!==i)?.collapse(),!0):this._anItemWasAlreadyExpandedDuringInitialisation?!1:(this._anItemWasAlreadyExpandedDuringInitialisation=!0,!0):!0}_getItem(e){return this._items?.find(i=>i.id===e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["","ngbAccordion",""]],contentQueries:function(i,o,r){if(i&1&&Pe(r,fi,4),i&2){let a;ne(a=oe())&&(o._items=a)}},hostAttrs:[1,"accordion"],inputs:{animation:"animation",closeOthers:"closeOthers",destroyOnHide:"destroyOnHide"},outputs:{show:"show",shown:"shown",hide:"hide",hidden:"hidden"},exportAs:["ngbAccordion"],standalone:!0});let n=t;return n})();var se=class n{static from(t){return t instanceof n?t:t?new n(t.year,t.month,t.day):null}constructor(t,s,e){this.year=J(t)?t:null,this.month=J(s)?s:null,this.day=J(e)?e:null}equals(t){return t!=null&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return t?this.year===t.year?this.month===t.month?this.day===t.day?!1:this.dayt.day:this.month>t.month:this.year>t.year:!1}};function Qn(n){return new se(n.getFullYear(),n.getMonth()+1,n.getDate())}function ri(n){let t=new Date(n.year,n.month-1,n.day,12);return isNaN(t.getTime())||t.setFullYear(n.year),t}function Js(){return new qs}var _i=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:()=>Js(),providedIn:"root"});let n=t;return n})(),qs=(()=>{let t=class t extends _i{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,i="d",o=1){let r=ri(e),a=!0,l=r.getMonth();switch(i){case"y":r.setFullYear(r.getFullYear()+o);break;case"m":l+=o,r.setMonth(l),l=l%12,l<0&&(l=l+12);break;case"d":r.setDate(r.getDate()+o),a=!1;break;default:return e}return a&&r.getMonth()!==l&&r.setDate(0),Qn(r)}getPrev(e,i="d",o=1){return this.getNext(e,i,-o)}getWeekday(e){let o=ri(e).getDay();return o===0?7:o}getWeekNumber(e,i){i===7&&(i=0);let o=(11-i)%7,r=e[o],a=ri(r);a.setDate(a.getDate()+4-(a.getDay()||7));let l=a.getTime();return a.setMonth(0),a.setDate(1),Math.floor(Math.round((l-a.getTime())/864e5)/7)+1}getToday(){return Qn(new Date)}isValid(e){if(!e||!J(e.year)||!J(e.month)||!J(e.day)||e.year===0)return!1;let i=ri(e);return!isNaN(i.getTime())&&i.getFullYear()===e.year&&i.getMonth()+1===e.month&&i.getDate()===e.day}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=He(t)))(o||t)}})(),t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})();function bt(n,t){return!Ys(n,t)}function io(n,t){return!n&&!t?!1:!n||!t?!0:n.year!==t.year||n.month!==t.month}function Ys(n,t){return!n&&!t||!!n&&!!t&&n.equals(t)}function Zs(n,t){if(t&&n&&t.before(n))throw new Error(`'maxDate' ${t} should be greater than 'minDate' ${n}`)}function ai(n,t,s){return n&&t&&n.before(t)?t:n&&s&&n.after(s)?s:n||null}function Qi(n,t){let{minDate:s,maxDate:e,disabled:i,markDisabled:o}=t;return!(n==null||i||o&&o(n,{year:n.year,month:n.month})||s&&n.before(s)||e&&n.after(e))}function Xs(n,t,s,e){if(!t)return[];let i=n.getMonths(t.year);if(s&&t.year===s.year){let o=i.findIndex(r=>r===s.month);i=i.slice(o)}if(e&&t.year===e.year){let o=i.findIndex(r=>r===e.month);i=i.slice(0,o+1)}return i}function er(n,t,s){if(!n)return[];let e=t?Math.max(t.year,n.year-500):n.year-10,o=(s?Math.min(s.year,n.year+500):n.year+10)-e+1,r=Array(o);for(let a=0;a{let f=Object.assign(n.getNext(t,"m",c),{day:1});if(r[c]=null,!i){let p=a.findIndex(h=>h.firstDate.equals(f));p!==-1&&(r[c]=a.splice(p,1)[0])}return f}).forEach((u,c)=>{r[c]===null&&(r[c]=or(n,u,s,e,a.shift()||{}))}),r}function or(n,t,s,e,i={}){let{dayTemplateData:o,minDate:r,maxDate:a,firstDayOfWeek:l,markDisabled:u,outsideDays:c,weekdayWidth:f,weekdaysVisible:p}=s,h=n.getToday();i.firstDate=null,i.lastDate=null,i.number=t.month,i.year=t.year,i.weeks=i.weeks||[],i.weekdays=i.weekdays||[],t=sr(n,t,l),p||(i.weekdays.length=0);for(let _=0;_w.date),l),v.collapsed=c==="collapsed"&&m[0].date.month!==i.number&&m[m.length-1].date.month!==i.number}return i}function sr(n,t,s){let e=n.getDaysPerWeek(),i=new se(t.year,t.month,1),o=n.getWeekday(i)%e;return n.getPrev(i,"d",(e+o-s)%e)}var ct=(()=>{let t=class t{getMonthLabel(e){return`${this.getMonthFullName(e.month,e.year)} ${this.getYearNumerals(e.year)}`}getDayNumerals(e){return`${e.day}`}getWeekNumerals(e){return`${e}`}getYearNumerals(e){return`${e}`}getWeekLabel(){return""}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:()=>new rr,providedIn:"root"});let n=t;return n})(),rr=(()=>{let t=class t extends ct{constructor(){super(...arguments),this._locale=d(Rn),this._monthsShort=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"short"}).format(new Date(2e3,e))),this._monthsFull=[...Array(12).keys()].map(e=>Intl.DateTimeFormat(this._locale,{month:"long"}).format(new Date(2e3,e)))}getWeekdayLabel(e,i="narrow"){let o=[...Array(7).keys()].map(a=>Intl.DateTimeFormat(this._locale,{weekday:i}).format(new Date(Date.UTC(2021,5,a-1))));return o.map((a,l)=>o[(l+1)%7])[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){let i=new Date(e.year,e.month-1,e.day);return Mn(i,"fullDate",this._locale)}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=He(t)))(o||t)}})(),t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})(),Ji=(()=>{let t=class t{constructor(){this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(e=we(e),J(e)&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(e=we(e),J(e)&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{let i=this.toValidDate(e,null);if(bt(this._state.maxDate,i))return{maxDate:i}},minDate:e=>{let i=this.toValidDate(e,null);if(bt(this._state.minDate,i))return{minDate:i}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}},weekdays:e=>{let i=e===!0||e===!1?"narrow":e,o=e===!0||e===!1?e:!0;if(this._state.weekdayWidth!==i||this._state.weekdaysVisible!==o)return{weekdayWidth:i,weekdaysVisible:o}}},this._calendar=d(_i),this._i18n=d(ct),this._model$=new ee,this._dateSelect$=new ee,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]},weekdayWidth:"narrow",weekdaysVisible:!0}}get model$(){return this._model$.pipe(De(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(De(e=>e!==null))}set(e){let i=Object.keys(e).map(o=>this._VALIDATORS[o](e[o])).reduce((o,r)=>ut(ut({},o),r),{});Object.keys(i).length>0&&this._nextState(i)}focus(e){let i=this.toValidDate(e,null);i!=null&&!this._state.disabled&&bt(this._state.focusDate,i)&&this._nextState({focusDate:e})}focusSelect(){Qi(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){let i=this.toValidDate(e,this._calendar.getToday());i!=null&&!this._state.disabled&&(!this._state.firstDate||io(this._state.firstDate,i))&&this._nextState({firstDate:i})}select(e,i={}){let o=this.toValidDate(e,null);o!=null&&!this._state.disabled&&(bt(this._state.selectedDate,o)&&this._nextState({selectedDate:o}),i.emitEvent&&Qi(o,this._state)&&this._dateSelect$.next(o))}toValidDate(e,i){let o=se.from(e);return i===void 0&&(i=this._calendar.getToday()),this._calendar.isValid(o)?o:i}getMonth(e){for(let i of this._state.months)if(e.month===i.number&&e.year===i.year)return i;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){let i=this._updateState(e);this._patchContexts(i),this._state=i,this._model$.next(this._state)}_patchContexts(e){let{months:i,displayMonths:o,selectedDate:r,focusDate:a,focusVisible:l,disabled:u,outsideDays:c}=e;e.months.forEach(f=>{f.weeks.forEach(p=>{p.days.forEach(h=>{a&&(h.context.focused=a.equals(h.date)&&l),h.tabindex=!u&&a&&h.date.equals(a)&&a.month===f.number?0:-1,u===!0&&(h.context.disabled=!0),r!==void 0&&(h.context.selected=r!==null&&r.equals(h.date)),f.number!==h.date.month&&(h.hidden=c==="hidden"||c==="collapsed"||o>1&&h.date.after(i[0].firstDate)&&h.date.before(i[o-1].lastDate))})})})}_updateState(e){let i=Object.assign({},this._state,e),o=i.firstDate;if(("minDate"in e||"maxDate"in e)&&(Zs(i.minDate,i.maxDate),i.focusDate=ai(i.focusDate,i.minDate,i.maxDate),i.firstDate=ai(i.firstDate,i.minDate,i.maxDate),o=i.focusDate),"disabled"in e&&(i.focusVisible=!1),"selectedDate"in e&&this._state.months.length===0&&(o=i.selectedDate),"focusVisible"in e||"focusDate"in e&&(i.focusDate=ai(i.focusDate,i.minDate,i.maxDate),o=i.focusDate,i.months.length!==0&&i.focusDate&&!i.focusDate.before(i.firstDate)&&!i.focusDate.after(i.lastDate)))return i;if("firstDate"in e&&(i.firstDate=ai(i.firstDate,i.minDate,i.maxDate),o=i.firstDate),o){let r="dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e||"weekdaysVisible"in e,a=nr(this._calendar,o,i,this._i18n,r);i.months=a,i.firstDate=a[0].firstDate,i.lastDate=a[a.length-1].lastDate,"selectedDate"in e&&!Qi(i.selectedDate,i)&&(i.selectedDate=null),"firstDate"in e&&(!i.focusDate||i.focusDate.before(i.firstDate)||i.focusDate.after(i.lastDate))&&(i.focusDate=o);let l=!this._state.firstDate||this._state.firstDate.year!==i.firstDate.year,u=!this._state.firstDate||this._state.firstDate.month!==i.firstDate.month;i.navigation==="select"?(("minDate"in e||"maxDate"in e||i.selectBoxes.years.length===0||l)&&(i.selectBoxes.years=er(i.firstDate,i.minDate,i.maxDate)),("minDate"in e||"maxDate"in e||i.selectBoxes.months.length===0||l)&&(i.selectBoxes.months=Xs(this._calendar,i.firstDate,i.minDate,i.maxDate))):i.selectBoxes={years:[],months:[]},(i.navigation==="arrows"||i.navigation==="select")&&(u||l||"minDate"in e||"maxDate"in e||"disabled"in e)&&(i.prevDisabled=i.disabled||ir(this._calendar,i.firstDate,i.minDate),i.nextDisabled=i.disabled||tr(this._calendar,i.lastDate,i.maxDate))}return i}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})(),di=function(n){return n[n.PREV=0]="PREV",n[n.NEXT=1]="NEXT",n}(di||{}),en=(()=>{let t=class t{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekNumbers=!1,this.weekdays="narrow"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})();function ar(){return new lr}var mi=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:()=>ar(),providedIn:"root"});let n=t;return n})(),lr=(()=>{let t=class t extends mi{fromModel(e){return e&&J(e.year)&&J(e.month)&&J(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&J(e.year)&&J(e.month)&&J(e.day)?{year:e.year,month:e.month,day:e.day}:null}};t.\u0275fac=(()=>{let e;return function(o){return(e||(e=He(t)))(o||t)}})(),t.\u0275prov=C({token:t,factory:t.\u0275fac});let n=t;return n})(),cr=(()=>{let t=class t{processKey(e,i){let{state:o,calendar:r}=i;switch(e.key){case"PageUp":i.focusDate(r.getPrev(o.focusedDate,e.shiftKey?"y":"m",1));break;case"PageDown":i.focusDate(r.getNext(o.focusedDate,e.shiftKey?"y":"m",1));break;case"End":i.focusDate(e.shiftKey?o.maxDate:o.lastDate);break;case"Home":i.focusDate(e.shiftKey?o.minDate:o.firstDate);break;case"ArrowLeft":i.focusDate(r.getPrev(o.focusedDate,"d",1));break;case"ArrowUp":i.focusDate(r.getPrev(o.focusedDate,"d",r.getDaysPerWeek()));break;case"ArrowRight":i.focusDate(r.getNext(o.focusedDate,"d",1));break;case"ArrowDown":i.focusDate(r.getNext(o.focusedDate,"d",r.getDaysPerWeek()));break;case"Enter":case" ":i.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=C({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),dr=(()=>{let t=class t{constructor(){this.i18n=d(ct)}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=ae({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(i,o){i&2&&G("bg-primary",o.selected)("text-white",o.selected)("text-muted",o.isMuted())("outside",o.isMuted())("active",o.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},standalone:!0,features:[de],attrs:Jo,decls:1,vars:1,template:function(i,o){i&1&&ce(0),i&2&&Ce(o.i18n.getDayNumerals(o.date))},styles:[`[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:transparent}[ngbDatepickerDayView]:hover:not(.bg-primary),[ngbDatepickerDayView].active:not(.bg-primary){background-color:var(--bs-tertiary-bg);outline:1px solid var(--bs-border-color)}[ngbDatepickerDayView].outside{opacity:.5} `],encapsulation:2,changeDetection:0});let n=t;return n})(),ur=(()=>{let t=class t{constructor(){this._month=-1,this._year=-1,this.i18n=d(ct),this.select=new S}changeMonth(e){this.select.emit(new se(this.date.year,we(e),1))}changeYear(e){this.select.emit(new se(we(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this.monthSelect.nativeElement.value=`${this._month}`),this.date.year!==this._year&&(this._year=this.date.year,this.yearSelect.nativeElement.value=`${this._year}`))}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=ae({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(i,o){if(i&1&&(ft(qo,7,Y),ft(Yo,7,Y)),i&2){let r;ne(r=oe())&&(o.monthSelect=r.first),ne(r=oe())&&(o.yearSelect=r.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},standalone:!0,features:[de],decls:8,vars:2,consts:()=>{let e;e=$localize`:@@ngb.datepicker.select-month:Select month`;let i;i=$localize`:@@ngb.datepicker.select-month:Select month`;let o;o=$localize`:@@ngb.datepicker.select-year:Select year`;let r;return r=$localize`:@@ngb.datepicker.select-year:Select year`,[["month",""],["year",""],["aria-label",e,"title",i,1,"form-select",3,"change","disabled"],[3,"value"],["aria-label",o,"title",r,1,"form-select",3,"change","disabled"]]},template:function(i,o){if(i&1){let r=Xe();O(0,"select",2,0),Z("change",function(l){return Te(r),Ee(o.changeMonth(l.target.value))}),Se(2,Zo,2,3,"option",3,Ze),R(),O(4,"select",4,1),Z("change",function(l){return Te(r),Ee(o.changeYear(l.target.value))}),Se(6,Xo,2,2,"option",3,Ze),R()}i&2&&(I("disabled",o.disabled),b(2),Oe(o.months),b(2),I("disabled",o.disabled),b(2),Oe(o.years))},styles:[`ngb-datepicker-navigation-select>.form-select{flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.form-select:focus{z-index:1}ngb-datepicker-navigation-select>.form-select::-ms-value{background-color:transparent!important} `],encapsulation:2,changeDetection:0});let n=t;return n})(),hr=(()=>{let t=class t{constructor(){this.navigation=di,this.i18n=d(ct),this.months=[],this.navigate=new S,this.select=new S}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=ae({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{date:"date",disabled:"disabled",months:"months",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},standalone:!0,features:[de],decls:8,vars:4,consts:()=>{let e;e=$localize`:@@ngb.datepicker.previous-month:Previous month`;let i;i=$localize`:@@ngb.datepicker.previous-month:Previous month`;let o;o=$localize`:@@ngb.datepicker.next-month:Next month`;let r;return r=$localize`:@@ngb.datepicker.next-month:Next month`,[[1,"ngb-dp-arrow","ngb-dp-arrow-prev"],["type","button","aria-label",e,"title",i,1,"btn","btn-link","ngb-dp-arrow-btn",3,"click","disabled"],[1,"ngb-dp-navigation-chevron"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years"],[1,"ngb-dp-arrow","ngb-dp-arrow-next"],["type","button","aria-label",o,"title",r,1,"btn","btn-link","ngb-dp-arrow-btn",3,"click","disabled"],[1,"ngb-dp-navigation-select",3,"select","date","disabled","months","years"],[1,"ngb-dp-arrow"],[1,"ngb-dp-month-name"]]},template:function(i,o){i&1&&(O(0,"div",0)(1,"button",1),Z("click",function(a){return o.onClickPrev(a)}),Me(2,"span",2),R()(),x(3,es,1,4,"ngb-datepicker-navigation-select",3)(4,os,2,0),O(5,"div",4)(6,"button",5),Z("click",function(a){return o.onClickNext(a)}),Me(7,"span",2),R()()),i&2&&(b(),I("disabled",o.prevDisabled),b(2),ie(o.showSelect?3:-1),b(),ie(o.showSelect?-1:4),b(2),I("disabled",o.nextDisabled))},dependencies:[ur],styles:[`ngb-datepicker-navigation{display:flex;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;transform:rotate(-135deg)}.ngb-dp-arrow{display:flex;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow-next{justify-content:flex-end}.ngb-dp-arrow-next .ngb-dp-navigation-chevron{transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:flex;flex:1 1 9rem} `],encapsulation:2,changeDetection:0});let n=t;return n})(),pr=(()=>{let t=class t{constructor(){this.templateRef=d(pt)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275dir=U({type:t,selectors:[["ng-template","ngbDatepickerContent",""]],standalone:!0});let n=t;return n})(),fr=(()=>{let t=class t{constructor(){this._keyboardService=d(cr),this._service=d(Ji),this.i18n=d(ct),this.datepicker=d(no)}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){!e.context.disabled&&!e.hidden&&this.datepicker.onDateSelect(e.date)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=ae({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(i,o){i&1&&Z("keydown",function(a){return o.onKeyDown(a)})},inputs:{month:"month"},standalone:!0,features:[de],decls:3,vars:1,consts:[["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],[1,"ngb-dp-weekday","ngb-dp-showweek","small"],["role","columnheader",1,"ngb-dp-weekday","small"],["role","row",1,"ngb-dp-week"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"disabled","tabindex","hidden","ngb-dp-today"],["role","gridcell",1,"ngb-dp-day",3,"click","tabindex"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(i,o){i&1&&(x(0,as,4,1,"div",0),Se(1,ps,1,1,null,null,Ze)),i&2&&(ie(o.viewModel.weekdays.length>0?0:-1),b(),Oe(o.viewModel.weeks))},dependencies:[Mt],styles:[`ngb-datepicker-month{display:block}.ngb-dp-weekday,.ngb-dp-week-number{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:var(--bs-info)}.ngb-dp-week{border-radius:.25rem;display:flex}.ngb-dp-weekdays{border-bottom:1px solid var(--bs-border-color);border-radius:0;background-color:var(--bs-tertiary-bg)}.ngb-dp-day,.ngb-dp-weekday,.ngb-dp-week-number{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1} diff --git a/public/apps/webapp-schulverwaltung/chunk-2FIH3FGB.js b/public/apps/webapp-schulverwaltung/chunk-C7XT5XXE.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-2FIH3FGB.js rename to public/apps/webapp-schulverwaltung/chunk-C7XT5XXE.js index b4012be1..a2c60063 100644 --- a/public/apps/webapp-schulverwaltung/chunk-2FIH3FGB.js +++ b/public/apps/webapp-schulverwaltung/chunk-C7XT5XXE.js @@ -1 +1 @@ -import{a as it}from"./chunk-MVTCHCDH.js";import{a as M}from"./chunk-Y4QYVF5K.js";import{K as et,P as tt,T as rt,U as st,c as Ye,j as ne,t as D,u as Ze}from"./chunk-GI4AZI25.js";import{a as ie,b as P,c as Je,e as ot}from"./chunk-Q5U6YZUT.js";import{a as Qe,b as nt}from"./chunk-33NXTXD7.js";import{u as E}from"./chunk-FTRAQKUW.js";import{a as He}from"./chunk-3AROKYRB.js";import{$ as be,$a as T,$b as $e,$c as je,Ac as f,Bb as c,Bc as v,Cb as d,Cc as De,Db as V,E as x,Ed as C,Ga as S,Gc as _,Gd as Ke,Hd as qe,I as fe,Ia as p,Id as We,Ja as ye,Jd as ze,L as z,Nc as L,O as y,Pc as R,Q as w,Qc as G,Sa as m,Sb as Ce,Sc as k,Ta as l,Tb as Ie,Tc as Pe,Ua as N,Uc as te,Va as Y,W as ue,Wa as Z,Wb as xe,Wc as U,Y as he,Ya as ge,Z as O,Zc as Be,_a as ee,a as B,ac as $,ad as we,b as j,bd as Oe,e as me,ec as Le,f as q,fd as Ne,ha as J,hd as Ve,ia as Q,jb as u,jd as Ge,k as W,kb as ve,kd as Ue,lb as g,m as b,n as A,pc as Ee,r as le,rc as Ae,rd as Me,sc as ke,sd as Fe,tb as Se,td as Xe,ua as a,ub as Te,va as h,vb as _e,w as I,xb as Re}from"./chunk-T7QWSMKM.js";function re(i,r){return i.pipe(b(n=>n.find(e=>e.Key===r)||null))}function Et(i){return i.slice().sort((r,n)=>r.Value.localeCompare(n.Value))}var at=new he("Confirm Absences Service");function ct(i,r){let n=ne(i),e=ne(r);return+n==+e}var ht=(i,r,n)=>({formGroup:i,unexcusedState:r,excusedState:n}),bt=i=>({count:i}),yt=()=>["/edit-absences"];function gt(i,r){if(i&1&&(m(0,"div",4),u(1),c(2,"translate"),l()),i&2){let n=r.bkdLet;a(),g(" ",V(2,1,n===1?"open-absences.edit.lesson-selected":"open-absences.edit.lessons-selected",_e(4,bt,n))," ")}}function vt(i,r){if(i&1&&(m(0,"div",19),u(1),c(2,"translate"),l()),i&2){let n=r.$implicit;a(),g(" ",V(2,1,"global.validation-errors."+n.error,n.params)," ")}}function St(i,r){if(i&1&&(m(0,"div",27),u(1),c(2,"translate"),l()),i&2){let n=r.$implicit;a(),g(" ",V(2,1,"global.validation-errors."+n.error,n.params)," ")}}function Tt(i,r){if(i&1&&(Y(0),S(1,St,3,4,"div",26),c(2,"async"),Z()),i&2){let n=T(5);a(),p("ngForOf",d(2,1,n.absenceTypeIdErrors$))}}function _t(i,r){if(i&1&&(m(0,"div",23),N(1,"input",24),c(2,"async"),m(3,"label",25),u(4),l(),S(5,Tt,3,3,"ng-container",11),c(6,"async"),l()),i&2){let n,e,t=r.$implicit,o=r.index,s=T(4);a(),ye("is-invalid",((n=(n=d(2,7,s.absenceTypeIdErrors$))==null?null:n.length)!==null&&n!==void 0?n:0)>0),p("id","absence-type-"+o)("value",t.Id),a(2),p("for","absence-type-"+o),a(),g(" ",t.Designation," "),a(),p("ngIf",((e=(e=d(6,9,s.absenceTypes$))==null?null:e.length)!==null&&e!==void 0?e:0)-1===o)}}function Rt(i,r){if(i&1&&(Y(0),S(1,_t,7,11,"div",20),c(2,"async"),m(3,"div",21),u(4),c(5,"translate"),m(6,"a",22),u(7),c(8,"translate"),l()(),Z()),i&2){let n=T(3);a(),p("ngForOf",d(2,4,n.absenceTypes$)),a(3),g(" ",d(5,6,"open-absences.edit.remark")," "),a(2),p("routerLink",Te(10,yt)),a(),g(" ",d(8,8,"edit-absences.title")," ")}}function Ct(i,r){i&1&&(m(0,"div",28)(1,"span",29),u(2,"Loading..."),l()())}function It(i,r){if(i&1){let n=ge();m(0,"form",5),ee("ngSubmit",function(){J(n);let t=T(2);return Q(t.onSubmit())}),S(1,vt,3,4,"div",6),c(2,"async"),m(3,"div",7)(4,"div",8),N(5,"input",9),m(6,"label",10),u(7),l(),S(8,Rt,9,11,"ng-container",11),l(),m(9,"div",12),N(10,"input",13),m(11,"label",14),u(12),l()()(),m(13,"div",15)(14,"button",16),c(15,"async"),ee("click",function(){J(n);let t=T(2);return Q(t.cancel())}),u(16),c(17,"translate"),l(),m(18,"button",17),c(19,"async"),u(20),c(21,"translate"),S(22,Ct,3,0,"div",18),c(23,"async"),l()()()}if(i&2){let n=T().bkdLet,e=T();p("formGroup",n.formGroup),a(),p("ngForOf",d(2,12,e.formErrors$)),a(4),p("value",n.excusedState.Key),a(2),g(" ",n.excusedState.Value," "),a(),p("ngIf",n.formGroup.get("absenceTypeId")),a(2),p("value",n.unexcusedState.Key),a(2),g(" ",n.unexcusedState.Value," "),a(2),p("disabled",d(15,14,e.saving$)),a(2),g(" ",d(17,16,"open-absences.edit.cancel")," "),a(2),p("disabled",d(19,18,e.saving$)),a(2),g(" ",d(21,20,"open-absences.edit.save")," "),a(2),p("ngIf",d(23,22,e.saving$))}}function xt(i,r){if(i&1&&(m(0,"div",1)(1,"h1"),u(2),c(3,"translate"),l(),S(4,gt,3,6,"div",2),c(5,"async"),S(6,It,24,24,"form",3),l()),i&2){let n=r.bkdLet,e=T();a(2),ve(d(3,3,"open-absences.edit.title")),a(2),p("bkdLet",d(5,5,e.getSelectedCount())),a(2),p("ngIf",n.formGroup&&n.unexcusedState&&n.excusedState)}}var ti=(()=>{let r=class r{constructor(e,t,o,s,X,H,K,dt,mt,lt,ft){this.fb=e,this.router=t,this.activatedRoute=o,this.toastService=s,this.translate=X,this.selectionService=H,this.dropDownItemsService=K,this.presenceTypesService=dt,this.updateService=mt,this.settings=lt,this.openAbsencesEditService=ft,this.formGroup$=this.selectionService.selectedWithoutPresenceType$.pipe(b(this.createFormGroup.bind(this)),z(1)),this.saving$=new q(!1),this.submitted$=new q(!1),this.formErrors$=ie(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=ie(this.formGroup$,this.submitted$,"absenceTypeId"),this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(z(1)),this.excusedState$=re(this.confirmationStates$,this.settings.excusedAbsenceStateId),this.unexcusedState$=re(this.confirmationStates$,this.settings.unexcusedAbsenceStateId),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.destroy$=new me}ngOnInit(){this.selectionService.selectedIds$.pipe(x(1)).subscribe(e=>{e.length===0&&this.navigateBack()}),Je(this.formGroup$,"confirmationValue").pipe(w(this.destroy$)).subscribe(e=>{typeof e=="number"&&this.updateAbsenceTypeIdDisabled(e)}),A([P(this.formGroup$,"confirmationValue").pipe(I(E)),P(this.formGroup$,"absenceTypeId").pipe(I(E)),this.saving$]).pipe(w(this.destroy$)).subscribe(([e,t,o])=>{o?(e.disable(),t.disable()):(e.enable(),this.updateAbsenceTypeIdDisabled(e.value))}),A([P(this.formGroup$,"confirmationValue").pipe(I(E)),this.excusedState$.pipe(x(1),I(E))]).pipe(w(this.destroy$)).subscribe(([e,t])=>e.setValue(t.Key))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(x(1)).subscribe(e=>{if(e.valid){let{confirmationValue:t,absenceTypeId:o}=e.value;this.save(t,o)}})}cancel(){this.navigateBack()}getSelectedCount(){return this.selectionService.selectedLessons$.pipe(b(e=>e.length))}createFormGroup(e){return e.length>0?this.fb.group({confirmationValue:[null],absenceTypeId:[null,je.required]}):this.fb.group({confirmationValue:[null]})}updateAbsenceTypeIdDisabled(e){A([P(this.formGroup$,"absenceTypeId").pipe(x(1),I(E)),this.excusedState$.pipe(x(1),I(E))]).subscribe(([t,o])=>{e===o.Key?t.enable():t.disable()})}save(e,t){this.saving$.next(!0),A([this.selectionService.selectedIds$.pipe(x(1)),this.unexcusedState$.pipe(x(1),I(E))]).pipe(y(([o,s])=>A(o.map(({lessonIds:X,personId:H,presenceTypeId:K})=>this.updateService.confirmLessonPresences(X,[H],this.getNewAbsenceTypeId(K,e,Number(s.Key),t),e)))),fe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}getNewAbsenceTypeId(e,t,o,s){if(!e)throw new Error("absence type id cannot be null");return t===o?this.settings.absencePresenceTypeId:e===this.settings.absencePresenceTypeId?s:e}onSaveSuccess(){this.openAbsencesEditService?.updateAfterConfirm&&this.openAbsencesEditService.updateAfterConfirm(),this.toastService.success(this.translate.instant("open-absences.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(this.openAbsencesEditService?.confirmBackLink||[".."],{relativeTo:this.activatedRoute,queryParams:this.openAbsencesEditService?.confirmBackLinkParams})}};r.\u0275fac=function(t){return new(t||r)(h(Me),h(Ae),h(Ee),h(He),h(Ke),h(tt),h(it),h(rt),h(st),h(U),h(at,8))},r.\u0275cmp=be({type:r,selectors:[["bkd-confirm-absences"]],standalone:!0,features:[Se],decls:4,vars:11,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],["class","mb-3 pb-3 border-bottom",4,"bkdLet"],[3,"formGroup","ngSubmit",4,"ngIf"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],["class","alert alert-danger",4,"ngFor","ngForOf"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3","pb-3","border-bottom"],["type","radio","id","excused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","excused",1,"form-check-label"],[4,"ngIf"],[1,"form-check","mt-3","mb-3","pb-3","border-bottom"],["type","radio","id","unexcused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","unexcused",1,"form-check-label"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"alert","alert-danger"],["class","form-check my-3",4,"ngFor","ngForOf"],[1,"remark"],[3,"routerLink"],[1,"form-check","my-3"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],["class","invalid-feedback",4,"ngFor","ngForOf"],[1,"invalid-feedback"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(t,o){t&1&&(S(0,xt,7,7,"div",0),c(1,"async"),c(2,"async"),c(3,"async")),t&2&&p("bkdLet",Re(7,ht,d(1,1,o.formGroup$),d(2,3,o.unexcusedState$),d(3,5,o.excusedState$)))},dependencies:[Qe,Ie,Fe,Ne,Be,Ve,we,Oe,Xe,Ge,Ue,Ce,ke,xe,We,qe],changeDetection:0});let i=r;return i})();var pt=_({StudentRef:R,StudentFullName:f,TotalAbsences:v,TotalAbsencesUnconfirmed:v,TotalAbsencesValidExcuse:v,TotalAbsencesWithoutExcuse:v,TotalAbsencesUnchecked:v,TotalDispensations:v,TotalHalfDays:v,TotalIncidents:v});var oe=_({Id:f,LessonRef:R,StudentRef:R,EventRef:R,TypeRef:G,RegistrationRef:G,StudyClassRef:G,ConfirmationStateId:L(v),EventDesignation:f,HasStudyCourseConfirmationCode:De,LessonDateTimeFrom:k,LessonDateTimeTo:k,Comment:L(f),Date:L(Pe),Type:L(f),StudentFullName:f,StudyClassNumber:f,TeacherInformation:L(f)});var ae=_({LessonRef:R,EventRef:R,EventDesignation:f,StudyClassNumber:f,TeacherInformation:L(f),LessonDateTimeFrom:k,LessonDateTimeTo:k});function ce(i){return r=>r.pipe(y(n=>{let e=Number(n.headers.get("X-Pagination-Offset")),t=Number(n.headers.get("X-Pagination-Total"));return C(i)(n.body).pipe(b(o=>({offset:e,total:t,entries:o})))}))}function F(i,r,n=new $){return n.set("offset",String(i)).set("limit",String(r))}function pe(i=new $e){return i.set("X-Pagination-Total","on")}var Ai=(()=>{let r=class r extends nt{constructor(e,t,o){super(e,t,oe,"LessonPresences"),this.storage=o,this.lessonPresenceRefCodec=_(te(this.codec.props,["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"])),this.lessonPresenceIdCodec=_(te(this.codec.props,["Id"]))}getLessonsByDate(e){let t={fields:Object.keys(ae.props).join(","),"filter.LessonDateTimeFrom":`=${D(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},o={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:o}).pipe(y(C(ae)))}getListByLessons(e){if(e.length===0)return W([]);let o={"filter.LessonRef":`;${e.map(s=>s.LessonRef.Id).join(";")}`};return this.getList({params:o,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListByDateStudentClass(e,t,o){let s={"filter.LessonDateTimeFrom":`=${D(e,"yyyy-MM-dd")}`,"filter.StudentRef":`=${t}`};return o!=null&&(s["filter.StudyClassRef"]=`=${o}`),this.getList({params:s,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListForToday(){return this.http.get(`${this.baseUrl}/Today`,{headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(y(C(this.codec)))}getListOfUnconfirmed(e){return M(this.storage.getPayload()?.roles,"ClassTeacherRole")?le([this.getListOfUnconfirmedClassTeacher(e),this.getListOfUnconfirmedLessonTeacher(e)]).pipe(b(ot(et))):M(this.storage.getPayload()?.roles,"LessonTeacherRole")?this.getListOfUnconfirmedLessonTeacher(e):M(this.storage.getPayload()?.roles,"AbsenceAdministratorRole")?this.getListOfUnconfirmedAbsenceAdministrator(e):W([])}getStatistics(e,t,o){let s=de([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return s=$t(t,s),s=F(o,this.settings.paginationLimit,s),this.http.get(`${this.baseUrl}/Statistics`,{params:s,headers:pe(),observe:"response"}).pipe(ce(pt))}getLessonRefs(e){let t=de([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return t=t.set("filter.TypeRef",">0"),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),t=t.set("limit","1500"),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(y(C(this.lessonPresenceRefCodec)))}getRegistrationRefsByEventIds(e){let t=new $;return t.set("filter.EventRef",`;${e.join(";")}`),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(y(C(this.lessonPresenceRefCodec)))}getFilteredList(e,t,o){let s=de([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]],new $({fromObject:o}));return e.teacher&&(s=s.set("filter.TeacherInformation",`~*${e.teacher}*`)),e.dateFrom&&e.dateTo&&ct(e.dateFrom,e.dateTo)?s=s.set("filter.LessonDateTimeFrom",`=${D(e.dateFrom,"yyyy-MM-dd")}`):(e.dateFrom&&(s=s.set("filter.LessonDateTimeFrom",`>${D(Ze(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(s=s.set("filter.LessonDateTimeTo",`<${D(Ye(e.dateTo,1),"yyyy-MM-dd")}`))),e.confirmationStates&&(s=s.set("filter.ConfirmationStateId",`;${e.confirmationStates.join(";")}`)),e.incidentTypes&&(s=s.set("filter.TypeRef",`;${e.incidentTypes.join(";")}`)),e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")}`)),e.incidentTypes&&e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")};${e.incidentTypes.join(";")}`)),this.http.get(`${this.baseUrl}/`,{params:F(t,this.settings.paginationLimit,s),headers:pe(),observe:"response"}).pipe(ce(oe))}hasLessonsLessonTeacher(){let e=new $().set("fields","Id");return this.http.get(`${this.baseUrl}/`,{params:F(0,1,e),headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(y(C(this.lessonPresenceIdCodec)),b(t=>t.length>0))}checkableAbsencesCount(){return this.http.get(`${this.baseUrl}/`,{headers:{"X-Role-Restriction":"LessonTeacherRole"},params:{"filter.ConfirmationStateId":`;${this.settings.checkableAbsenceStateId}`,fields:"Id,ConfirmationStateId"}}).pipe(y(C(this.lessonPresenceIdCodec)),b(e=>e.length))}getListOfUnconfirmedLessonTeacher(e){return this.getList({headers:{"X-Role-Restriction":"LessonTeacherRole"},params:j(B({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=false"})})}getListOfUnconfirmedClassTeacher(e){return this.getList({headers:{"X-Role-Restriction":"ClassTeacherRole"},params:j(B({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=true"})})}getListOfUnconfirmedAbsenceAdministrator(e){return this.getList({headers:{"X-Role-Restriction":"AbsenceAdministratorRole"},params:j(B({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`})})}};r.\u0275fac=function(t){return new(t||r)(O(Le),O(U),O(ze))},r.\u0275prov=ue({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();function de(i,r=new $){return i.reduce((n,[e,t])=>e&&t?n.set(`filter.${t}`,`=${e}`):n,r)}function $t(i,r=new $){return i?r.set("sort",`${i.key}.${i.ascending?"asc":"desc"}`):r}export{Et as a,at as b,ct as c,ti as d,Ai as e}; +import{a as it}from"./chunk-YMJC6QZX.js";import{a as M}from"./chunk-Y4QYVF5K.js";import{K as et,P as tt,T as rt,U as st,c as Ye,j as ne,t as D,u as Ze}from"./chunk-ZK2MNT7Z.js";import{a as ie,b as P,c as Je,e as ot}from"./chunk-AW7CSGKI.js";import{a as Qe,b as nt}from"./chunk-SOHFFTKU.js";import{u as E}from"./chunk-C56YGDXA.js";import{a as He}from"./chunk-UX5TA32W.js";import{$ as be,$a as T,$b as $,$c as we,Ab as c,Ac as v,Bb as d,Bc as De,Cb as V,Dd as C,E as x,Fc as _,Fd as Ke,Ga as S,Gd as qe,Hd as We,I as fe,Ia as p,Id as ze,Ja as ye,L as z,Mc as L,O as y,Oc as R,Pc as G,Q as w,Rb as Ce,Rc as k,Sa as m,Sb as Ie,Sc as Pe,Ta as l,Tc as te,Ua as N,Va as Y,Vb as xe,Vc as U,W as ue,Wa as Z,Y as he,Ya as ge,Yc as Be,Z as O,_a as ee,_b as $e,_c as je,a as B,ad as Oe,b as j,dc as Le,e as me,ed as Ne,f as q,gd as Ve,ha as J,ia as Q,id as Ge,jb as u,jd as Ue,k as W,kb as ve,lb as g,m as b,n as A,oc as Ee,qc as Ae,qd as Me,r as le,rc as ke,rd as Fe,sd as Xe,tb as Se,ua as a,ub as Te,va as h,vb as _e,w as I,xb as Re,zc as f}from"./chunk-XTHSYQMN.js";function re(i,r){return i.pipe(b(n=>n.find(e=>e.Key===r)||null))}function Et(i){return i.slice().sort((r,n)=>r.Value.localeCompare(n.Value))}var at=new he("Confirm Absences Service");function ct(i,r){let n=ne(i),e=ne(r);return+n==+e}var ht=(i,r,n)=>({formGroup:i,unexcusedState:r,excusedState:n}),bt=i=>({count:i}),yt=()=>["/edit-absences"];function gt(i,r){if(i&1&&(m(0,"div",4),u(1),c(2,"translate"),l()),i&2){let n=r.bkdLet;a(),g(" ",V(2,1,n===1?"open-absences.edit.lesson-selected":"open-absences.edit.lessons-selected",_e(4,bt,n))," ")}}function vt(i,r){if(i&1&&(m(0,"div",19),u(1),c(2,"translate"),l()),i&2){let n=r.$implicit;a(),g(" ",V(2,1,"global.validation-errors."+n.error,n.params)," ")}}function St(i,r){if(i&1&&(m(0,"div",27),u(1),c(2,"translate"),l()),i&2){let n=r.$implicit;a(),g(" ",V(2,1,"global.validation-errors."+n.error,n.params)," ")}}function Tt(i,r){if(i&1&&(Y(0),S(1,St,3,4,"div",26),c(2,"async"),Z()),i&2){let n=T(5);a(),p("ngForOf",d(2,1,n.absenceTypeIdErrors$))}}function _t(i,r){if(i&1&&(m(0,"div",23),N(1,"input",24),c(2,"async"),m(3,"label",25),u(4),l(),S(5,Tt,3,3,"ng-container",11),c(6,"async"),l()),i&2){let n,e,t=r.$implicit,o=r.index,s=T(4);a(),ye("is-invalid",((n=(n=d(2,7,s.absenceTypeIdErrors$))==null?null:n.length)!==null&&n!==void 0?n:0)>0),p("id","absence-type-"+o)("value",t.Id),a(2),p("for","absence-type-"+o),a(),g(" ",t.Designation," "),a(),p("ngIf",((e=(e=d(6,9,s.absenceTypes$))==null?null:e.length)!==null&&e!==void 0?e:0)-1===o)}}function Rt(i,r){if(i&1&&(Y(0),S(1,_t,7,11,"div",20),c(2,"async"),m(3,"div",21),u(4),c(5,"translate"),m(6,"a",22),u(7),c(8,"translate"),l()(),Z()),i&2){let n=T(3);a(),p("ngForOf",d(2,4,n.absenceTypes$)),a(3),g(" ",d(5,6,"open-absences.edit.remark")," "),a(2),p("routerLink",Te(10,yt)),a(),g(" ",d(8,8,"edit-absences.title")," ")}}function Ct(i,r){i&1&&(m(0,"div",28)(1,"span",29),u(2,"Loading..."),l()())}function It(i,r){if(i&1){let n=ge();m(0,"form",5),ee("ngSubmit",function(){J(n);let t=T(2);return Q(t.onSubmit())}),S(1,vt,3,4,"div",6),c(2,"async"),m(3,"div",7)(4,"div",8),N(5,"input",9),m(6,"label",10),u(7),l(),S(8,Rt,9,11,"ng-container",11),l(),m(9,"div",12),N(10,"input",13),m(11,"label",14),u(12),l()()(),m(13,"div",15)(14,"button",16),c(15,"async"),ee("click",function(){J(n);let t=T(2);return Q(t.cancel())}),u(16),c(17,"translate"),l(),m(18,"button",17),c(19,"async"),u(20),c(21,"translate"),S(22,Ct,3,0,"div",18),c(23,"async"),l()()()}if(i&2){let n=T().bkdLet,e=T();p("formGroup",n.formGroup),a(),p("ngForOf",d(2,12,e.formErrors$)),a(4),p("value",n.excusedState.Key),a(2),g(" ",n.excusedState.Value," "),a(),p("ngIf",n.formGroup.get("absenceTypeId")),a(2),p("value",n.unexcusedState.Key),a(2),g(" ",n.unexcusedState.Value," "),a(2),p("disabled",d(15,14,e.saving$)),a(2),g(" ",d(17,16,"open-absences.edit.cancel")," "),a(2),p("disabled",d(19,18,e.saving$)),a(2),g(" ",d(21,20,"open-absences.edit.save")," "),a(2),p("ngIf",d(23,22,e.saving$))}}function xt(i,r){if(i&1&&(m(0,"div",1)(1,"h1"),u(2),c(3,"translate"),l(),S(4,gt,3,6,"div",2),c(5,"async"),S(6,It,24,24,"form",3),l()),i&2){let n=r.bkdLet,e=T();a(2),ve(d(3,3,"open-absences.edit.title")),a(2),p("bkdLet",d(5,5,e.getSelectedCount())),a(2),p("ngIf",n.formGroup&&n.unexcusedState&&n.excusedState)}}var ti=(()=>{let r=class r{constructor(e,t,o,s,X,H,K,dt,mt,lt,ft){this.fb=e,this.router=t,this.activatedRoute=o,this.toastService=s,this.translate=X,this.selectionService=H,this.dropDownItemsService=K,this.presenceTypesService=dt,this.updateService=mt,this.settings=lt,this.openAbsencesEditService=ft,this.formGroup$=this.selectionService.selectedWithoutPresenceType$.pipe(b(this.createFormGroup.bind(this)),z(1)),this.saving$=new q(!1),this.submitted$=new q(!1),this.formErrors$=ie(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=ie(this.formGroup$,this.submitted$,"absenceTypeId"),this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(z(1)),this.excusedState$=re(this.confirmationStates$,this.settings.excusedAbsenceStateId),this.unexcusedState$=re(this.confirmationStates$,this.settings.unexcusedAbsenceStateId),this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.destroy$=new me}ngOnInit(){this.selectionService.selectedIds$.pipe(x(1)).subscribe(e=>{e.length===0&&this.navigateBack()}),Je(this.formGroup$,"confirmationValue").pipe(w(this.destroy$)).subscribe(e=>{typeof e=="number"&&this.updateAbsenceTypeIdDisabled(e)}),A([P(this.formGroup$,"confirmationValue").pipe(I(E)),P(this.formGroup$,"absenceTypeId").pipe(I(E)),this.saving$]).pipe(w(this.destroy$)).subscribe(([e,t,o])=>{o?(e.disable(),t.disable()):(e.enable(),this.updateAbsenceTypeIdDisabled(e.value))}),A([P(this.formGroup$,"confirmationValue").pipe(I(E)),this.excusedState$.pipe(x(1),I(E))]).pipe(w(this.destroy$)).subscribe(([e,t])=>e.setValue(t.Key))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(x(1)).subscribe(e=>{if(e.valid){let{confirmationValue:t,absenceTypeId:o}=e.value;this.save(t,o)}})}cancel(){this.navigateBack()}getSelectedCount(){return this.selectionService.selectedLessons$.pipe(b(e=>e.length))}createFormGroup(e){return e.length>0?this.fb.group({confirmationValue:[null],absenceTypeId:[null,je.required]}):this.fb.group({confirmationValue:[null]})}updateAbsenceTypeIdDisabled(e){A([P(this.formGroup$,"absenceTypeId").pipe(x(1),I(E)),this.excusedState$.pipe(x(1),I(E))]).subscribe(([t,o])=>{e===o.Key?t.enable():t.disable()})}save(e,t){this.saving$.next(!0),A([this.selectionService.selectedIds$.pipe(x(1)),this.unexcusedState$.pipe(x(1),I(E))]).pipe(y(([o,s])=>A(o.map(({lessonIds:X,personId:H,presenceTypeId:K})=>this.updateService.confirmLessonPresences(X,[H],this.getNewAbsenceTypeId(K,e,Number(s.Key),t),e)))),fe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}getNewAbsenceTypeId(e,t,o,s){if(!e)throw new Error("absence type id cannot be null");return t===o?this.settings.absencePresenceTypeId:e===this.settings.absencePresenceTypeId?s:e}onSaveSuccess(){this.openAbsencesEditService?.updateAfterConfirm&&this.openAbsencesEditService.updateAfterConfirm(),this.toastService.success(this.translate.instant("open-absences.edit.save-success")),this.navigateBack()}navigateBack(){this.router.navigate(this.openAbsencesEditService?.confirmBackLink||[".."],{relativeTo:this.activatedRoute,queryParams:this.openAbsencesEditService?.confirmBackLinkParams})}};r.\u0275fac=function(t){return new(t||r)(h(Me),h(Ae),h(Ee),h(He),h(Ke),h(tt),h(it),h(rt),h(st),h(U),h(at,8))},r.\u0275cmp=be({type:r,selectors:[["bkd-confirm-absences"]],standalone:!0,features:[Se],decls:4,vars:11,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],["class","mb-3 pb-3 border-bottom",4,"bkdLet"],[3,"formGroup","ngSubmit",4,"ngIf"],[1,"mb-3","pb-3","border-bottom"],[3,"ngSubmit","formGroup"],["class","alert alert-danger",4,"ngFor","ngForOf"],[1,"form-group","pb-4"],[1,"form-check","mt-2","mb-3","pb-3","border-bottom"],["type","radio","id","excused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","excused",1,"form-check-label"],[4,"ngIf"],[1,"form-check","mt-3","mb-3","pb-3","border-bottom"],["type","radio","id","unexcused","formControlName","confirmationValue",1,"form-check-input",3,"value"],["for","unexcused",1,"form-check-label"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"alert","alert-danger"],["class","form-check my-3",4,"ngFor","ngForOf"],[1,"remark"],[3,"routerLink"],[1,"form-check","my-3"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],["class","invalid-feedback",4,"ngFor","ngForOf"],[1,"invalid-feedback"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(t,o){t&1&&(S(0,xt,7,7,"div",0),c(1,"async"),c(2,"async"),c(3,"async")),t&2&&p("bkdLet",Re(7,ht,d(1,1,o.formGroup$),d(2,3,o.unexcusedState$),d(3,5,o.excusedState$)))},dependencies:[Qe,Ie,Fe,Ne,Be,Ve,we,Oe,Xe,Ge,Ue,Ce,ke,xe,We,qe],changeDetection:0});let i=r;return i})();var pt=_({StudentRef:R,StudentFullName:f,TotalAbsences:v,TotalAbsencesUnconfirmed:v,TotalAbsencesValidExcuse:v,TotalAbsencesWithoutExcuse:v,TotalAbsencesUnchecked:v,TotalDispensations:v,TotalHalfDays:v,TotalIncidents:v});var oe=_({Id:f,LessonRef:R,StudentRef:R,EventRef:R,TypeRef:G,RegistrationRef:G,StudyClassRef:G,ConfirmationStateId:L(v),EventDesignation:f,HasStudyCourseConfirmationCode:De,LessonDateTimeFrom:k,LessonDateTimeTo:k,Comment:L(f),Date:L(Pe),Type:L(f),StudentFullName:f,StudyClassNumber:f,TeacherInformation:L(f)});var ae=_({LessonRef:R,EventRef:R,EventDesignation:f,StudyClassNumber:f,TeacherInformation:L(f),LessonDateTimeFrom:k,LessonDateTimeTo:k});function ce(i){return r=>r.pipe(y(n=>{let e=Number(n.headers.get("X-Pagination-Offset")),t=Number(n.headers.get("X-Pagination-Total"));return C(i)(n.body).pipe(b(o=>({offset:e,total:t,entries:o})))}))}function F(i,r,n=new $){return n.set("offset",String(i)).set("limit",String(r))}function pe(i=new $e){return i.set("X-Pagination-Total","on")}var Ai=(()=>{let r=class r extends nt{constructor(e,t,o){super(e,t,oe,"LessonPresences"),this.storage=o,this.lessonPresenceRefCodec=_(te(this.codec.props,["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"])),this.lessonPresenceIdCodec=_(te(this.codec.props,["Id"]))}getLessonsByDate(e){let t={fields:Object.keys(ae.props).join(","),"filter.LessonDateTimeFrom":`=${D(e,"yyyy-MM-dd")}`,sort:"LessonDateTimeFrom"},o={"X-Role-Restriction":"LessonTeacherRole"};return this.http.get(`${this.baseUrl}/`,{params:t,headers:o}).pipe(y(C(ae)))}getListByLessons(e){if(e.length===0)return W([]);let o={"filter.LessonRef":`;${e.map(s=>s.LessonRef.Id).join(";")}`};return this.getList({params:o,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListByDateStudentClass(e,t,o){let s={"filter.LessonDateTimeFrom":`=${D(e,"yyyy-MM-dd")}`,"filter.StudentRef":`=${t}`};return o!=null&&(s["filter.StudyClassRef"]=`=${o}`),this.getList({params:s,headers:{"X-Role-Restriction":"LessonTeacherRole"}})}getListForToday(){return this.http.get(`${this.baseUrl}/Today`,{headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(y(C(this.codec)))}getListOfUnconfirmed(e){return M(this.storage.getPayload()?.roles,"ClassTeacherRole")?le([this.getListOfUnconfirmedClassTeacher(e),this.getListOfUnconfirmedLessonTeacher(e)]).pipe(b(ot(et))):M(this.storage.getPayload()?.roles,"LessonTeacherRole")?this.getListOfUnconfirmedLessonTeacher(e):M(this.storage.getPayload()?.roles,"AbsenceAdministratorRole")?this.getListOfUnconfirmedAbsenceAdministrator(e):W([])}getStatistics(e,t,o){let s=de([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return s=$t(t,s),s=F(o,this.settings.paginationLimit,s),this.http.get(`${this.baseUrl}/Statistics`,{params:s,headers:pe(),observe:"response"}).pipe(ce(pt))}getLessonRefs(e){let t=de([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]]);return t=t.set("filter.TypeRef",">0"),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),t=t.set("limit","1500"),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(y(C(this.lessonPresenceRefCodec)))}getRegistrationRefsByEventIds(e){let t=new $;return t.set("filter.EventRef",`;${e.join(";")}`),t=t.set("fields",["LessonRef","RegistrationRef","StudentRef","EventRef","StudyClassRef","TypeRef"].join(",")),this.http.get(`${this.baseUrl}/`,{params:t}).pipe(y(C(this.lessonPresenceRefCodec)))}getFilteredList(e,t,o){let s=de([[e.student,"StudentRef"],[e.educationalEvent,"EventRef"],[e.studyClass,"StudyClassRef"]],new $({fromObject:o}));return e.teacher&&(s=s.set("filter.TeacherInformation",`~*${e.teacher}*`)),e.dateFrom&&e.dateTo&&ct(e.dateFrom,e.dateTo)?s=s.set("filter.LessonDateTimeFrom",`=${D(e.dateFrom,"yyyy-MM-dd")}`):(e.dateFrom&&(s=s.set("filter.LessonDateTimeFrom",`>${D(Ze(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(s=s.set("filter.LessonDateTimeTo",`<${D(Ye(e.dateTo,1),"yyyy-MM-dd")}`))),e.confirmationStates&&(s=s.set("filter.ConfirmationStateId",`;${e.confirmationStates.join(";")}`)),e.incidentTypes&&(s=s.set("filter.TypeRef",`;${e.incidentTypes.join(";")}`)),e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")}`)),e.incidentTypes&&e.presenceTypes&&(s=s.set("filter.TypeRef",`;${e.presenceTypes.join(";")};${e.incidentTypes.join(";")}`)),this.http.get(`${this.baseUrl}/`,{params:F(t,this.settings.paginationLimit,s),headers:pe(),observe:"response"}).pipe(ce(oe))}hasLessonsLessonTeacher(){let e=new $().set("fields","Id");return this.http.get(`${this.baseUrl}/`,{params:F(0,1,e),headers:{"X-Role-Restriction":"LessonTeacherRole"}}).pipe(y(C(this.lessonPresenceIdCodec)),b(t=>t.length>0))}checkableAbsencesCount(){return this.http.get(`${this.baseUrl}/`,{headers:{"X-Role-Restriction":"LessonTeacherRole"},params:{"filter.ConfirmationStateId":`;${this.settings.checkableAbsenceStateId}`,fields:"Id,ConfirmationStateId"}}).pipe(y(C(this.lessonPresenceIdCodec)),b(e=>e.length))}getListOfUnconfirmedLessonTeacher(e){return this.getList({headers:{"X-Role-Restriction":"LessonTeacherRole"},params:j(B({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=false"})})}getListOfUnconfirmedClassTeacher(e){return this.getList({headers:{"X-Role-Restriction":"ClassTeacherRole"},params:j(B({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`,"filter.HasStudyCourseConfirmationCode":"=true"})})}getListOfUnconfirmedAbsenceAdministrator(e){return this.getList({headers:{"X-Role-Restriction":"AbsenceAdministratorRole"},params:j(B({},e),{"filter.ConfirmationStateId":`=${this.settings.unconfirmedAbsenceStateId}`})})}};r.\u0275fac=function(t){return new(t||r)(O(Le),O(U),O(ze))},r.\u0275prov=ue({token:r,factory:r.\u0275fac,providedIn:"root"});let i=r;return i})();function de(i,r=new $){return i.reduce((n,[e,t])=>e&&t?n.set(`filter.${t}`,`=${e}`):n,r)}function $t(i,r=new $){return i?r.set("sort",`${i.key}.${i.ascending?"asc":"desc"}`):r}export{Et as a,at as b,ct as c,ti as d,Ai as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-RWNJF4OZ.js b/public/apps/webapp-schulverwaltung/chunk-DB66EACG.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-RWNJF4OZ.js rename to public/apps/webapp-schulverwaltung/chunk-DB66EACG.js index fefe1619..47602a2d 100644 --- a/public/apps/webapp-schulverwaltung/chunk-RWNJF4OZ.js +++ b/public/apps/webapp-schulverwaltung/chunk-DB66EACG.js @@ -1 +1 @@ -import{Gd as u,Hb as g,Jd as c,W as s,Z as n}from"./chunk-T7QWSMKM.js";var o=["de-CH","fr-CH"],i=o[0];function p(){return[{provide:g,useFactory:r=>r.detectLanguage(),deps:[L]}]}var L=(()=>{let t=class t{constructor(e,a){this.translate=e,this.storage=a}initialize(){this.translate.setDefaultLang(i),this.translate.use(this.detectLanguage())}detectLanguage(){return this.detectedLanguage||(this.detectedLanguage=this.getDocumentLanguage()||this.getStoredLanguage()||this.getBrowserLanguage()||i),this.detectedLanguage}getLocalizedLanguage(e){return e=o.find(a=>a===`${(e||"").toLowerCase()}-CH`),e||i}getDocumentLanguage(){let e=document.querySelector("[lang]");return this.normalizeLanguage(e&&e.lang)}getStoredLanguage(){return this.normalizeLanguage(this.storage.getLanguage())}getBrowserLanguage(){return this.normalizeLanguage(this.translate.getBrowserLang())}normalizeLanguage(e){return e=(e||"").split("-")[0],e&&o.find(a=>e===a.split("-")[0])||null}};t.\u0275fac=function(a){return new(a||t)(n(u),n(c))},t.\u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{p as a,L as b}; +import{Fd as u,Gb as g,Id as c,W as s,Z as n}from"./chunk-XTHSYQMN.js";var o=["de-CH","fr-CH"],i=o[0];function p(){return[{provide:g,useFactory:r=>r.detectLanguage(),deps:[L]}]}var L=(()=>{let t=class t{constructor(e,a){this.translate=e,this.storage=a}initialize(){this.translate.setDefaultLang(i),this.translate.use(this.detectLanguage())}detectLanguage(){return this.detectedLanguage||(this.detectedLanguage=this.getDocumentLanguage()||this.getStoredLanguage()||this.getBrowserLanguage()||i),this.detectedLanguage}getLocalizedLanguage(e){return e=o.find(a=>a===`${(e||"").toLowerCase()}-CH`),e||i}getDocumentLanguage(){let e=document.querySelector("[lang]");return this.normalizeLanguage(e&&e.lang)}getStoredLanguage(){return this.normalizeLanguage(this.storage.getLanguage())}getBrowserLanguage(){return this.normalizeLanguage(this.translate.getBrowserLang())}normalizeLanguage(e){return e=(e||"").split("-")[0],e&&o.find(a=>e===a.split("-")[0])||null}};t.\u0275fac=function(a){return new(a||t)(n(u),n(c))},t.\u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{p as a,L as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QR6JUXUH.js b/public/apps/webapp-schulverwaltung/chunk-DDSXVC6O.js similarity index 82% rename from public/apps/webapp-schulverwaltung/chunk-QR6JUXUH.js rename to public/apps/webapp-schulverwaltung/chunk-DDSXVC6O.js index 408016eb..b1c3b4db 100644 --- a/public/apps/webapp-schulverwaltung/chunk-QR6JUXUH.js +++ b/public/apps/webapp-schulverwaltung/chunk-DDSXVC6O.js @@ -1 +1 @@ -import{i as I}from"./chunk-FTRAQKUW.js";import{$ as g,Bb as u,Cb as c,Cd as S,Ha as h,Hd as V,Ia as p,Id as T,Sa as d,Ta as s,Ya as v,Zc as b,_a as D,ad as k,ed as y,ha as r,ia as o,ib as C,jb as _,ra as f,sd as w,tb as M,ua as l}from"./chunk-T7QWSMKM.js";var K=(()=>{let t=class t{constructor(){this.value=null,this.placeholder="shared.date-select.default-placeholder",this.minDate=null,this.valueChange=new f,this.componentId=S("bkd-date-select-")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=g({type:t,selectors:[["bkd-date-select"]],inputs:{value:"value",placeholder:"placeholder",minDate:"minDate"},outputs:{valueChange:"valueChange"},standalone:!0,features:[M],decls:8,vars:10,consts:[["dp","ngbDatepicker"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text","ngbDatepicker","",1,"form-control",3,"click","ngModelChange","minDate","ngModel"]],template:function(i,e){if(i&1){let m=v();d(0,"div",1)(1,"span",2)(2,"i",3),_(3,"calendar_today"),s()(),d(4,"input",4,0),u(6,"translate"),u(7,"translate"),D("click",function(){r(m);let a=C(5);return o(a.toggle())})("ngModelChange",function(a){return r(m),o(e.valueChange.emit(a))}),s()()}i&2&&(l(),p("id",e.componentId),l(3),p("minDate",e.minDate)("ngModel",e.value),h("placeholder",c(6,6,e.placeholder))("aria-label",c(7,8,e.placeholder))("aria-describedby",e.componentId))},dependencies:[I,w,b,k,y,T,V]});let n=t;return n})();export{K as a}; +import{i as I}from"./chunk-C56YGDXA.js";import{$ as g,$c as k,Ab as u,Bb as c,Bd as S,Gd as V,Ha as h,Hd as T,Ia as p,Sa as d,Ta as s,Ya as v,Yc as b,_a as D,dd as y,ha as r,ia as o,ib as C,jb as _,ra as f,rd as w,tb as M,ua as l}from"./chunk-XTHSYQMN.js";var K=(()=>{let t=class t{constructor(){this.value=null,this.placeholder="shared.date-select.default-placeholder",this.minDate=null,this.valueChange=new f,this.componentId=S("bkd-date-select-")}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=g({type:t,selectors:[["bkd-date-select"]],inputs:{value:"value",placeholder:"placeholder",minDate:"minDate"},outputs:{valueChange:"valueChange"},standalone:!0,features:[M],decls:8,vars:10,consts:[["dp","ngbDatepicker"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text","ngbDatepicker","",1,"form-control",3,"click","ngModelChange","minDate","ngModel"]],template:function(i,e){if(i&1){let m=v();d(0,"div",1)(1,"span",2)(2,"i",3),_(3,"calendar_today"),s()(),d(4,"input",4,0),u(6,"translate"),u(7,"translate"),D("click",function(){r(m);let a=C(5);return o(a.toggle())})("ngModelChange",function(a){return r(m),o(e.valueChange.emit(a))}),s()()}i&2&&(l(),p("id",e.componentId),l(3),p("minDate",e.minDate)("ngModel",e.value),h("placeholder",c(6,6,e.placeholder))("aria-label",c(7,8,e.placeholder))("aria-describedby",e.componentId))},dependencies:[I,w,b,k,y,T,V]});let n=t;return n})();export{K as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-TK3HGFHH.js b/public/apps/webapp-schulverwaltung/chunk-DZZC2YX2.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-TK3HGFHH.js rename to public/apps/webapp-schulverwaltung/chunk-DZZC2YX2.js index 8449c797..1ff6a8f9 100644 --- a/public/apps/webapp-schulverwaltung/chunk-TK3HGFHH.js +++ b/public/apps/webapp-schulverwaltung/chunk-DZZC2YX2.js @@ -1 +1 @@ -import{E as n,L as f,O as d,P as g,Q as a,W as S,Z as c,_b as v,e as l,k as u,m as h,mc as m,nc as P,o as p,oc as $,rc as R,w as s}from"./chunk-T7QWSMKM.js";var N=(()=>{let e=class e{constructor(t,i){this.router=t,this.viewportScroller=i,this.scrollPositions={},this.previousRoute=null,this.currentRoute=this.getInitialActivatedRouteSnapshot(),this.currentScrollPosition=[0,0],this.destroy$=new l,this.activationEnd$=this.router.events.pipe(s(y)),this.navigationEnd$=this.router.events.pipe(s(F)),this.navigationStart$=this.router.events.pipe(s(C)),this.scrollPosition$=this.navigationStart$.pipe(h(this.getScrollPosition.bind(this))),this.route$=this.activationEnd$.pipe(n(1)).pipe(p(r=>[u(r),this.navigationEnd$.pipe(d(()=>this.activationEnd$.pipe(n(1))))]),g(),h(r=>r.snapshot),f(1)),this.scrollPosition$.pipe(a(this.destroy$)).subscribe(r=>this.currentScrollPosition=r),this.route$.pipe(a(this.destroy$)).subscribe(r=>{this.previousRoute=this.currentRoute,this.currentRoute=r})}ngOnDestroy(){this.destroy$.next()}restore(){if(!this.currentRoute||!this.requiresStoring(this.currentRoute))return;if(this.previousRoute&&this.shouldStoreFor(this.currentRoute,this.previousRoute)){let i=this.getPath(this.currentRoute);this.scrollToPosition(this.scrollPositions[i]||[0,0])}let t=this.currentRoute;this.route$.pipe(n(1),a(this.destroy$),s(i=>this.shouldStoreFor(t,i))).subscribe(()=>{let i=this.getPath(t);this.scrollPositions[i]=this.currentScrollPosition})}getScrollPosition(){return this.viewportScroller.getScrollPosition()}scrollToPosition(t){this.viewportScroller.scrollToPosition(t)}getPath(t){return t?"/"+t.pathFromRoot.map(i=>i.routeConfig&&i.routeConfig.path).filter(i=>i).join("/"):"/"}requiresStoring(t){return!!(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)&&t.routeConfig.data.restoreScrollPositionFrom.length>0)}shouldStoreFor(t,i){return(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)?t.routeConfig.data.restoreScrollPositionFrom:[]).includes(this.getPath(i))}getInitialActivatedRouteSnapshot(){let t=this.router.routerState.snapshot.root;for(;t.firstChild;)t=t.firstChild;return t}};e.\u0275fac=function(i){return new(i||e)(c(R),c(v))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();function y(o){return o instanceof $}function C(o){return o instanceof m}function F(o){return o instanceof P}export{N as a}; +import{E as n,L as f,O as d,P as g,Q as a,W as S,Z as c,Zb as v,e as l,k as u,lc as m,m as h,mc as P,nc as $,o as p,qc as R,w as s}from"./chunk-XTHSYQMN.js";var N=(()=>{let e=class e{constructor(t,i){this.router=t,this.viewportScroller=i,this.scrollPositions={},this.previousRoute=null,this.currentRoute=this.getInitialActivatedRouteSnapshot(),this.currentScrollPosition=[0,0],this.destroy$=new l,this.activationEnd$=this.router.events.pipe(s(y)),this.navigationEnd$=this.router.events.pipe(s(F)),this.navigationStart$=this.router.events.pipe(s(C)),this.scrollPosition$=this.navigationStart$.pipe(h(this.getScrollPosition.bind(this))),this.route$=this.activationEnd$.pipe(n(1)).pipe(p(r=>[u(r),this.navigationEnd$.pipe(d(()=>this.activationEnd$.pipe(n(1))))]),g(),h(r=>r.snapshot),f(1)),this.scrollPosition$.pipe(a(this.destroy$)).subscribe(r=>this.currentScrollPosition=r),this.route$.pipe(a(this.destroy$)).subscribe(r=>{this.previousRoute=this.currentRoute,this.currentRoute=r})}ngOnDestroy(){this.destroy$.next()}restore(){if(!this.currentRoute||!this.requiresStoring(this.currentRoute))return;if(this.previousRoute&&this.shouldStoreFor(this.currentRoute,this.previousRoute)){let i=this.getPath(this.currentRoute);this.scrollToPosition(this.scrollPositions[i]||[0,0])}let t=this.currentRoute;this.route$.pipe(n(1),a(this.destroy$),s(i=>this.shouldStoreFor(t,i))).subscribe(()=>{let i=this.getPath(t);this.scrollPositions[i]=this.currentScrollPosition})}getScrollPosition(){return this.viewportScroller.getScrollPosition()}scrollToPosition(t){this.viewportScroller.scrollToPosition(t)}getPath(t){return t?"/"+t.pathFromRoot.map(i=>i.routeConfig&&i.routeConfig.path).filter(i=>i).join("/"):"/"}requiresStoring(t){return!!(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)&&t.routeConfig.data.restoreScrollPositionFrom.length>0)}shouldStoreFor(t,i){return(t&&t.routeConfig&&t.routeConfig.data&&Array.isArray(t.routeConfig.data.restoreScrollPositionFrom)?t.routeConfig.data.restoreScrollPositionFrom:[]).includes(this.getPath(i))}getInitialActivatedRouteSnapshot(){let t=this.router.routerState.snapshot.root;for(;t.firstChild;)t=t.firstChild;return t}};e.\u0275fac=function(i){return new(i||e)(c(R),c(v))},e.\u0275prov=S({token:e,factory:e.\u0275fac,providedIn:"root"});let o=e;return o})();function y(o){return o instanceof $}function C(o){return o instanceof m}function F(o){return o instanceof P}export{N as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-UMTH7ATO.js b/public/apps/webapp-schulverwaltung/chunk-EO6OESLF.js similarity index 86% rename from public/apps/webapp-schulverwaltung/chunk-UMTH7ATO.js rename to public/apps/webapp-schulverwaltung/chunk-EO6OESLF.js index ab1144b5..b910c5f7 100644 --- a/public/apps/webapp-schulverwaltung/chunk-UMTH7ATO.js +++ b/public/apps/webapp-schulverwaltung/chunk-EO6OESLF.js @@ -1 +1 @@ -import{p as X,r as Z,s as te,t as ie,v as re}from"./chunk-QHPTZGVN.js";import"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{d as ee}from"./chunk-LO5XSJLW.js";import{a as K,b as W}from"./chunk-N6FFLIGM.js";import{a as z,c as Q}from"./chunk-33NXTXD7.js";import{A as w,u as _}from"./chunk-FTRAQKUW.js";import{$ as g,$a as O,Bb as d,Cb as p,Ga as j,Hd as k,Ia as f,Id as R,Jd as Y,L as B,O as T,Sa as C,Ta as S,Tb as J,Ua as l,Va as A,W as L,Wa as N,Wb as M,Wc as V,Z as m,g as E,jb as b,kb as $,m as a,n as F,qc as U,r as P,sb as G,tb as h,ua as u,ub as q,va as I,yb as H}from"./chunk-T7QWSMKM.js";var v=(()=>{let e=class e{constructor(n,r,o,y,de,pe,ce){this.storageService=n,this.loadingService=r,this.coursesRestService=o,this.subscriptionRestService=y,this.reportsService=de,this.gradingScalesRestService=pe,this.settings=ce,this.studentId$=new E(1),this.loading$=this.loadingService.loading$,this.studentCourses$=this.loadCourses().pipe(B(1)),this.studentCoursesSorted$=this.studentCourses$.pipe(a(i=>i.slice().sort((s,me)=>s.Designation.localeCompare(me.Designation)))),this.studentCourseIds$=this.studentCourses$.pipe(a(i=>i.flatMap(s=>s.Id))),this.idSubscriptions$=F([this.studentId$,this.studentCourseIds$]).pipe(T(([i,s])=>this.subscriptionRestService.getIdSubscriptionsByStudentAndCourse(i,s))),this.ids$=this.idSubscriptions$.pipe(a(i=>i.map(s=>s.Id))),this.testReports$=this.ids$.pipe(a(i=>this.reportsService.getStudentSubscriptionReports(i))),this.tests$=this.studentCourses$.pipe(a(i=>i.flatMap(s=>s.Tests).filter(_))),this.gradingScaleIdsFromTests$=this.tests$.pipe(a(i=>[...i.map(s=>s.GradingScaleId)].filter(_).filter(w))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(a(i=>i.flatMap(s=>s.GradingScaleId).filter(_).filter(w))),this.gradingScaleIds$=F([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(a(([i,s])=>i.concat(s).filter(w))),this.gradingScales$=this.gradingScaleIds$.pipe(T(i=>P(i.map(s=>this.gradingScalesRestService.getGradingScale(s)))));let D=this.storageService.getPayload()?.id_person;D&&this.studentId$.next(Number(D))}loadCourses(){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForStudent())}};e.\u0275fac=function(r){return new(r||e)(m(Y),m(W),m(X),m(Z),m(ee),m(te),m(V))},e.\u0275prov=L({token:e,factory:e.\u0275fac});let t=e;return t})();var ue=()=>[],ne=(()=>{let e=class e{constructor(n){this.myGradesService=n}};e.\u0275fac=function(r){return new(r||e)(I(v))},e.\u0275cmp=g({type:e,selectors:[["bkd-my-grades-header"]],standalone:!0,features:[h],decls:7,vars:7,consts:[[1,"d-flex","justify-content-between","header"],[3,"reports"]],template:function(r,o){if(r&1&&(C(0,"div",0)(1,"div"),b(2),d(3,"translate"),S(),C(4,"div"),l(5,"bkd-reports-link",1),d(6,"async"),S()()),r&2){let y;u(2),$(p(3,2,"my-grades.header")),u(3),f("reports",(y=p(6,4,o.myGradesService.testReports$))!==null&&y!==void 0?y:q(6,ue))}},dependencies:[K,M,R,k],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}.report[_ngcontent-%COMP%]{margin-left:1rem}"]});let t=e;return t})();var fe=(t,e,c,n)=>({loading:t,studentId:e,courses:c,gradingScales:n});function ge(t,e){if(t&1&&l(0,"bkd-dossier-grades-view",4),t&2){let c=O().bkdLet;f("courses",c.courses)("studentId",c.studentId)("gradingScales",c.gradingScales)("isEditable",!1)}}function Se(t,e){t&1&&(A(0),l(1,"bkd-spinner"),N())}function he(t,e){if(t&1&&(C(0,"div",1)(1,"h1"),b(2),d(3,"translate"),S(),l(4,"bkd-my-grades-header"),j(5,ge,1,4,"bkd-dossier-grades-view",2)(6,Se,2,0,"ng-container",3),S()),t&2){let c=e.bkdLet;u(2),$(p(3,3,"my-grades.title")),u(3),f("ngIf",!c.loading),u(),f("ngIf",c.loading)}}var oe=(()=>{let e=class e{constructor(n){this.myGradesService=n}};e.\u0275fac=function(r){return new(r||e)(I(v))},e.\u0275cmp=g({type:e,selectors:[["bkd-my-grades-show"]],standalone:!0,features:[G([ie]),h],decls:5,vars:14,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"courses","studentId","gradingScales","isEditable",4,"ngIf"],[4,"ngIf"],[3,"courses","studentId","gradingScales","isEditable"]],template:function(r,o){r&1&&(j(0,he,7,5,"div",0),d(1,"async"),d(2,"async"),d(3,"async"),d(4,"async")),r&2&&f("bkdLet",H(9,fe,p(1,1,o.myGradesService.loading$),p(2,3,o.myGradesService.studentId$),p(3,5,o.myGradesService.studentCoursesSorted$),p(4,7,o.myGradesService.gradingScales$)))},dependencies:[z,ne,J,re,Q,M,R,k]});let t=e;return t})();var ae=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=g({type:e,selectors:[["bkd-my-grades"]],standalone:!0,features:[G([v]),h],decls:1,vars:0,template:function(r,o){r&1&&l(0,"router-outlet")},dependencies:[U]});let t=e;return t})();var Je=[{path:"",component:ae,children:[{path:"",component:oe}]}];export{Je as MY_GRADES_ROUTES}; +import{p as X,r as Z,s as te,t as ie,w as re}from"./chunk-7LCBKZQT.js";import"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{d as ee}from"./chunk-RFO4NYUO.js";import{a as K,b as W}from"./chunk-FTDG26ID.js";import{a as z,c as Q}from"./chunk-SOHFFTKU.js";import{A as w,u as _}from"./chunk-C56YGDXA.js";import{$ as g,$a as O,Ab as d,Bb as p,Ga as j,Gd as k,Hd as R,Ia as f,Id as Y,L as B,O as T,Sa as C,Sb as J,Ta as S,Ua as l,Va as A,Vb as M,Vc as V,W as L,Wa as N,Z as m,g as E,jb as b,kb as $,m as a,n as F,pc as U,r as P,sb as G,tb as h,ua as u,ub as q,va as I,yb as H}from"./chunk-XTHSYQMN.js";var v=(()=>{let e=class e{constructor(n,r,o,y,de,pe,ce){this.storageService=n,this.loadingService=r,this.coursesRestService=o,this.subscriptionRestService=y,this.reportsService=de,this.gradingScalesRestService=pe,this.settings=ce,this.studentId$=new E(1),this.loading$=this.loadingService.loading$,this.studentCourses$=this.loadCourses().pipe(B(1)),this.studentCoursesSorted$=this.studentCourses$.pipe(a(i=>i.slice().sort((s,me)=>s.Designation.localeCompare(me.Designation)))),this.studentCourseIds$=this.studentCourses$.pipe(a(i=>i.flatMap(s=>s.Id))),this.idSubscriptions$=F([this.studentId$,this.studentCourseIds$]).pipe(T(([i,s])=>this.subscriptionRestService.getIdSubscriptionsByStudentAndCourse(i,s))),this.ids$=this.idSubscriptions$.pipe(a(i=>i.map(s=>s.Id))),this.testReports$=this.ids$.pipe(a(i=>this.reportsService.getStudentSubscriptionReports(i))),this.tests$=this.studentCourses$.pipe(a(i=>i.flatMap(s=>s.Tests).filter(_))),this.gradingScaleIdsFromTests$=this.tests$.pipe(a(i=>[...i.map(s=>s.GradingScaleId)].filter(_).filter(w))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(a(i=>i.flatMap(s=>s.GradingScaleId).filter(_).filter(w))),this.gradingScaleIds$=F([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(a(([i,s])=>i.concat(s).filter(w))),this.gradingScales$=this.gradingScaleIds$.pipe(T(i=>P(i.map(s=>this.gradingScalesRestService.getGradingScale(s)))));let D=this.storageService.getPayload()?.id_person;D&&this.studentId$.next(Number(D))}loadCourses(){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForStudent())}};e.\u0275fac=function(r){return new(r||e)(m(Y),m(W),m(X),m(Z),m(ee),m(te),m(V))},e.\u0275prov=L({token:e,factory:e.\u0275fac});let t=e;return t})();var ue=()=>[],ne=(()=>{let e=class e{constructor(n){this.myGradesService=n}};e.\u0275fac=function(r){return new(r||e)(I(v))},e.\u0275cmp=g({type:e,selectors:[["bkd-my-grades-header"]],standalone:!0,features:[h],decls:7,vars:7,consts:[[1,"d-flex","justify-content-between","header"],[3,"reports"]],template:function(r,o){if(r&1&&(C(0,"div",0)(1,"div"),b(2),d(3,"translate"),S(),C(4,"div"),l(5,"bkd-reports-link",1),d(6,"async"),S()()),r&2){let y;u(2),$(p(3,2,"my-grades.header")),u(3),f("reports",(y=p(6,4,o.myGradesService.testReports$))!==null&&y!==void 0?y:q(6,ue))}},dependencies:[K,M,R,k],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}.report[_ngcontent-%COMP%]{margin-left:1rem}"]});let t=e;return t})();var fe=(t,e,c,n)=>({loading:t,studentId:e,courses:c,gradingScales:n});function ge(t,e){if(t&1&&l(0,"bkd-dossier-grades-view",4),t&2){let c=O().bkdLet;f("courses",c.courses)("studentId",c.studentId)("gradingScales",c.gradingScales)("isEditable",!1)}}function Se(t,e){t&1&&(A(0),l(1,"bkd-spinner"),N())}function he(t,e){if(t&1&&(C(0,"div",1)(1,"h1"),b(2),d(3,"translate"),S(),l(4,"bkd-my-grades-header"),j(5,ge,1,4,"bkd-dossier-grades-view",2)(6,Se,2,0,"ng-container",3),S()),t&2){let c=e.bkdLet;u(2),$(p(3,3,"my-grades.title")),u(3),f("ngIf",!c.loading),u(),f("ngIf",c.loading)}}var oe=(()=>{let e=class e{constructor(n){this.myGradesService=n}};e.\u0275fac=function(r){return new(r||e)(I(v))},e.\u0275cmp=g({type:e,selectors:[["bkd-my-grades-show"]],standalone:!0,features:[G([ie]),h],decls:5,vars:14,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"courses","studentId","gradingScales","isEditable",4,"ngIf"],[4,"ngIf"],[3,"courses","studentId","gradingScales","isEditable"]],template:function(r,o){r&1&&(j(0,he,7,5,"div",0),d(1,"async"),d(2,"async"),d(3,"async"),d(4,"async")),r&2&&f("bkdLet",H(9,fe,p(1,1,o.myGradesService.loading$),p(2,3,o.myGradesService.studentId$),p(3,5,o.myGradesService.studentCoursesSorted$),p(4,7,o.myGradesService.gradingScales$)))},dependencies:[z,ne,J,re,Q,M,R,k]});let t=e;return t})();var ae=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=g({type:e,selectors:[["bkd-my-grades"]],standalone:!0,features:[G([v]),h],decls:1,vars:0,template:function(r,o){r&1&&l(0,"router-outlet")},dependencies:[U]});let t=e;return t})();var Je=[{path:"",component:ae,children:[{path:"",component:oe}]}];export{Je as MY_GRADES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-N6FFLIGM.js b/public/apps/webapp-schulverwaltung/chunk-FTDG26ID.js similarity index 90% rename from public/apps/webapp-schulverwaltung/chunk-N6FFLIGM.js rename to public/apps/webapp-schulverwaltung/chunk-FTDG26ID.js index d3c0abb7..2efe015d 100644 --- a/public/apps/webapp-schulverwaltung/chunk-N6FFLIGM.js +++ b/public/apps/webapp-schulverwaltung/chunk-FTDG26ID.js @@ -1 +1 @@ -import{e as B}from"./chunk-33NXTXD7.js";import{k as V,l as j,m as z,n as P,o as q}from"./chunk-FTRAQKUW.js";import{$ as D,$a as c,Cd as A,G as I,Ga as f,Ha as L,I as C,Ia as l,J as v,Ja as N,N as y,R as x,Sa as s,Sb as E,Ta as p,Tb as M,W as k,Ya as O,_a as S,e as h,g as w,ha as F,ia as T,jb as d,lb as U,m,q as _,ta as $,tb as R,ua as a}from"./chunk-T7QWSMKM.js";function G(e,n){if(e&1&&(s(0,"a",2)(1,"i",3),d(2,"description"),p()()),e&2){let r=c();N("disabled",r.disableIfUnavailable&&r.reports.length===0),l("href",r.reports.length>0&&r.reports[0].url,$)}}function H(e,n){if(e&1){let r=O();s(0,"button",8),S("click",function(){let i=F(r).$implicit,o=c(2);return T(o.openReport(i))}),d(1),p()}if(e&2){let r=n.$implicit;a(),U(" ",r.title," ")}}function J(e,n){if(e&1&&(s(0,"div",4)(1,"a",5)(2,"i",3),d(3,"description"),p()(),s(4,"div",6),f(5,H,2,1,"button",7),p()()),e&2){let r=c();a(),l("id",r.dropdownId),a(3),L("aria-labelledby",r.dropdownId),a(),l("ngForOf",r.reports)}}var et=(()=>{let n=class n{constructor(){this.reports=[],this.disableIfUnavailable=!1,this.dropdownId=A("reports-link-dropdown")}openReport(t){window.open(t.url,"_blank")}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=D({type:n,selectors:[["bkd-reports-link"]],inputs:{reports:"reports",disableIfUnavailable:"disableIfUnavailable"},standalone:!0,features:[R],decls:2,vars:2,consts:[["class","btn btn-primary btn-icon","target","_blank",3,"href","disabled",4,"ngIf"],["ngbDropdown","","class","d-inline-block",4,"ngIf"],["target","_blank",1,"btn","btn-primary","btn-icon",3,"href"],[1,"material-icons"],["ngbDropdown","",1,"d-inline-block"],["ngbDropdownToggle","",1,"btn","btn-primary","btn-icon","d-flex","align-items-center",3,"id"],["ngbDropdownMenu",""],["ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["ngbDropdownItem","",3,"click"]],template:function(i,o){i&1&&f(0,G,3,3,"a",0)(1,J,6,3,"div",1),i&2&&(l("ngIf",o.reports.length===1||o.reports.length===0&&o.disableIfUnavailable),a(),l("ngIf",o.reports.length>1))},dependencies:[M,q,P,z,E,j,V],styles:["a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}"]});let e=n;return e})();var u="default",at=(()=>{let n=class n{constructor(){this.action$=new h,this.loadingCounts$=_(this.action$.pipe(v((t,{action:i,context:o})=>{switch(i){case"increment":return t[o]=(t[o]||0)+1,t;case"decrement":return t[o]=Math.max(0,(t[o]||0)-1),t;default:return t}},{}),y({})),{connector:()=>new w(1)}),this.loading$=this.loading(),this.loadingCountsSub=this.loadingCounts$.connect()}ngOnDestroy(){this.loadingCountsSub.unsubscribe()}loading(t=u){return this.loadingCounts$.pipe(m(i=>i[t]),m(K),I())}load(t,i=u){let o=typeof i=="string"?i:i.context||u,W=typeof i=="object"&&i.stopOnFirstValue||!1,b=this.decrementLoadingCount(o),g=!0;function X(){g&&(b(),g=!1)}return t.pipe(B(this.incrementLoadingCount(o)),W?x(X):C(b))}incrementLoadingCount(t){return()=>this.action$.next({action:"increment",context:t})}decrementLoadingCount(t){return()=>this.action$.next({action:"decrement",context:t})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function K(e){return(e||0)!==0}export{et as a,at as b}; +import{e as B}from"./chunk-SOHFFTKU.js";import{k as V,l as j,m as z,n as P,o as q}from"./chunk-C56YGDXA.js";import{$ as D,$a as c,Bd as A,G as I,Ga as f,Ha as L,I as C,Ia as l,J as v,Ja as N,N as y,R as x,Rb as E,Sa as s,Sb as M,Ta as p,W as k,Ya as O,_a as S,e as h,g as w,ha as F,ia as T,jb as d,lb as U,m,q as _,ta as $,tb as R,ua as a}from"./chunk-XTHSYQMN.js";function G(e,n){if(e&1&&(s(0,"a",2)(1,"i",3),d(2,"description"),p()()),e&2){let r=c();N("disabled",r.disableIfUnavailable&&r.reports.length===0),l("href",r.reports.length>0&&r.reports[0].url,$)}}function H(e,n){if(e&1){let r=O();s(0,"button",8),S("click",function(){let i=F(r).$implicit,o=c(2);return T(o.openReport(i))}),d(1),p()}if(e&2){let r=n.$implicit;a(),U(" ",r.title," ")}}function J(e,n){if(e&1&&(s(0,"div",4)(1,"a",5)(2,"i",3),d(3,"description"),p()(),s(4,"div",6),f(5,H,2,1,"button",7),p()()),e&2){let r=c();a(),l("id",r.dropdownId),a(3),L("aria-labelledby",r.dropdownId),a(),l("ngForOf",r.reports)}}var et=(()=>{let n=class n{constructor(){this.reports=[],this.disableIfUnavailable=!1,this.dropdownId=A("reports-link-dropdown")}openReport(t){window.open(t.url,"_blank")}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=D({type:n,selectors:[["bkd-reports-link"]],inputs:{reports:"reports",disableIfUnavailable:"disableIfUnavailable"},standalone:!0,features:[R],decls:2,vars:2,consts:[["class","btn btn-primary btn-icon","target","_blank",3,"href","disabled",4,"ngIf"],["ngbDropdown","","class","d-inline-block",4,"ngIf"],["target","_blank",1,"btn","btn-primary","btn-icon",3,"href"],[1,"material-icons"],["ngbDropdown","",1,"d-inline-block"],["ngbDropdownToggle","",1,"btn","btn-primary","btn-icon","d-flex","align-items-center",3,"id"],["ngbDropdownMenu",""],["ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["ngbDropdownItem","",3,"click"]],template:function(i,o){i&1&&f(0,G,3,3,"a",0)(1,J,6,3,"div",1),i&2&&(l("ngIf",o.reports.length===1||o.reports.length===0&&o.disableIfUnavailable),a(),l("ngIf",o.reports.length>1))},dependencies:[M,q,P,z,E,j,V],styles:["a[_ngcontent-%COMP%]{text-decoration:none;color:#fff}"]});let e=n;return e})();var u="default",at=(()=>{let n=class n{constructor(){this.action$=new h,this.loadingCounts$=_(this.action$.pipe(v((t,{action:i,context:o})=>{switch(i){case"increment":return t[o]=(t[o]||0)+1,t;case"decrement":return t[o]=Math.max(0,(t[o]||0)-1),t;default:return t}},{}),y({})),{connector:()=>new w(1)}),this.loading$=this.loading(),this.loadingCountsSub=this.loadingCounts$.connect()}ngOnDestroy(){this.loadingCountsSub.unsubscribe()}loading(t=u){return this.loadingCounts$.pipe(m(i=>i[t]),m(K),I())}load(t,i=u){let o=typeof i=="string"?i:i.context||u,W=typeof i=="object"&&i.stopOnFirstValue||!1,b=this.decrementLoadingCount(o),g=!0;function X(){g&&(b(),g=!1)}return t.pipe(B(this.incrementLoadingCount(o)),W?x(X):C(b))}incrementLoadingCount(t){return()=>this.action$.next({action:"increment",context:t})}decrementLoadingCount(t){return()=>this.action$.next({action:"decrement",context:t})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275prov=k({token:n,factory:n.\u0275fac,providedIn:"root"});let e=n;return e})();function K(e){return(e||0)!==0}export{et as a,at as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-VFMGCCGG.js b/public/apps/webapp-schulverwaltung/chunk-GD4YO4IV.js similarity index 73% rename from public/apps/webapp-schulverwaltung/chunk-VFMGCCGG.js rename to public/apps/webapp-schulverwaltung/chunk-GD4YO4IV.js index 2293c252..9189c41f 100644 --- a/public/apps/webapp-schulverwaltung/chunk-VFMGCCGG.js +++ b/public/apps/webapp-schulverwaltung/chunk-GD4YO4IV.js @@ -1 +1 @@ -import{n as e}from"./chunk-QHPTZGVN.js";import{b as l}from"./chunk-X2BR3YJG.js";import{Ed as a,O as s,W as n,Wc as p,Z as o,ec as m}from"./chunk-T7QWSMKM.js";var R=(()=>{let t=class t extends l{constructor(c,i){super(c,i,e,"StudyClasses","Number")}getActive(){return this.http.get(`${this.baseUrl}/?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(s(a(e)))}getActiveFormativeAssessments(){return this.http.get(`${this.baseUrl}/FormativeAssessments?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(s(a(e)))}};t.\u0275fac=function(i){return new(i||t)(o(m),o(p))},t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{R as a}; +import{n as e}from"./chunk-7LCBKZQT.js";import{b as l}from"./chunk-24AFRN2G.js";import{Dd as a,O as s,Vc as p,W as n,Z as o,dc as m}from"./chunk-XTHSYQMN.js";var R=(()=>{let t=class t extends l{constructor(c,i){super(c,i,e,"StudyClasses","Number")}getActive(){return this.http.get(`${this.baseUrl}/?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(s(a(e)))}getActiveFormativeAssessments(){return this.http.get(`${this.baseUrl}/FormativeAssessments?filter.IsActive==true`,{headers:{"X-Role-Restriction":"ClassTeacherRole"}}).pipe(s(a(e)))}};t.\u0275fac=function(i){return new(i||t)(o(m),o(p))},t.\u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"});let r=t;return r})();export{R as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-RC3HL7KB.js b/public/apps/webapp-schulverwaltung/chunk-GXZYLK4L.js similarity index 94% rename from public/apps/webapp-schulverwaltung/chunk-RC3HL7KB.js rename to public/apps/webapp-schulverwaltung/chunk-GXZYLK4L.js index 49fc945d..2e604015 100644 --- a/public/apps/webapp-schulverwaltung/chunk-RC3HL7KB.js +++ b/public/apps/webapp-schulverwaltung/chunk-GXZYLK4L.js @@ -1 +1 @@ -import{a as je,b as Ne,c as Me,d as Ve,e as Oe}from"./chunk-KLXFX6SJ.js";import{t as V,v as Re}from"./chunk-QHPTZGVN.js";import{d as Ee,e as Le}from"./chunk-2FIH3FGB.js";import{b as te}from"./chunk-LO5XSJLW.js";import{a as Fe}from"./chunk-DMYOU5OM.js";import{P as Pe,T as Z,X as Be,Y as Ge}from"./chunk-GI4AZI25.js";import{a as we}from"./chunk-N6FFLIGM.js";import{a as E,c as ee}from"./chunk-33NXTXD7.js";import{a as Y,b as z,c as J,d as K,e as X}from"./chunk-FTRAQKUW.js";import{a as $e}from"./chunk-3AROKYRB.js";import{$ as x,$a as l,Bb as m,Cb as _,Db as xe,Fb as ce,Ga as c,Gd as Te,Hd as N,Ia as o,Id as M,Ja as ge,K as ue,L as fe,N as oe,O as L,Q as H,Sa as d,Sb as W,Ta as p,Tb as I,Ua as b,Va as v,W as U,Wa as h,Wb as P,Wc as De,Xb as Ce,Ya as j,Z as T,_a as k,a as B,ab as be,b as F,bb as ve,e as q,f as pe,g as re,ha as C,ia as S,ib as f,j as le,jb as u,k as me,kb as G,lb as g,m as $,n as _e,pc as Se,qc as ke,sb as Q,sc as Ae,tb as A,tc as Ie,ua as r,ub as ae,va as y,vb as w,xb as he,yb as ye}from"./chunk-T7QWSMKM.js";var ne=(()=>{let t=class t{constructor(i,s,a,O,se){this.settings=i,this.lessonPresencesService=s,this.presenceTypesService=a,this.toastService=O,this.translate=se,this.studentId$=new re(1),this.checkableAbsences$=this.getAbsences(this.loadCheckableAbsences.bind(this)),this.openAbsences$=this.getAbsences(this.loadOpenAbsences.bind(this)),this.excusedAbsences$=this.getAbsences(this.loadExcusedAbsences.bind(this)),this.unexcusedAbsences$=this.getAbsences(this.loadUnexcusedAbsences.bind(this)),this.incidents$=this.getAbsences(this.loadIncidents.bind(this)),this.halfDays$=this.getAbsences(this.loadHalfDays.bind(this)),this.counts$=this.getCounts()}setStudentId(i){this.studentId$.next(i)}getAbsences(i){return this.studentId$.pipe(L(i),oe(null),ue({connector:()=>new re(1)}))}getCounts(){return this.studentId$.pipe(L(i=>_e([this.loadStatistics(i).pipe(oe(null)),this.openAbsences$.pipe($(s=>s?.length??null)),this.checkableAbsences$.pipe($(s=>s?.length??null))])),$(([i,s,a])=>({openAbsences:s,checkableAbsences:a,excusedAbsences:i?.TotalAbsencesValidExcuse??null,unexcusedAbsences:i?.TotalAbsencesWithoutExcuse??null,incidents:i?.TotalIncidents??null,halfDays:i?.TotalHalfDays??null})))}loadStatistics(i){return this.lessonPresencesService.getStatistics({student:i,educationalEvent:null,studyClass:null},null,0).pipe(L(({entries:s})=>s.length>0?me(s[0]):(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),le)))}loadOpenAbsences(i){return this.lessonPresencesService.getListOfUnconfirmed(this.getBaseParams(i))}loadCheckableAbsences(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.ConfirmationStateId":`=${this.settings.checkableAbsenceStateId}`})})}loadExcusedAbsences(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.ConfirmationStateId":`=${this.settings.excusedAbsenceStateId}`})})}loadUnexcusedAbsences(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.ConfirmationStateId":`=${this.settings.unexcusedAbsenceStateId}`})})}loadIncidents(i){return this.presenceTypesService.incidentTypes$.pipe($(s=>F(B({},this.getBaseParams(i)),{"filter.TypeRef":`;${s.map(a=>a.Id).join(";")}`})),L(s=>this.lessonPresencesService.getList({params:s})))}loadHalfDays(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.TypeRef":`=${this.settings.halfDayPresenceTypeId}`})})}getBaseParams(i){return{sort:"LessonDateTimeFrom.asc","filter.StudentRef":`=${i}`}}};t.\u0275fac=function(s){return new(s||t)(T(De),T(Le),T(Z),T($e),T(Te))},t.\u0275prov=U({token:t,factory:t.\u0275fac});let e=t;return e})();var D=(()=>{let t=class t{constructor(i,s){this.profileService=i,this.route=s,this.currentDossier$=new pe("addresses"),this.studentId$=this.route.paramMap.pipe($(a=>Number(a.get("id")))),this.profile$=this.studentId$.pipe(L(a=>this.profileService.getProfile(a)),fe(1)),this.returnParams$=this.route.queryParams.pipe($(({returnparams:a})=>a)),this.backlinkQueryParams$=this.returnParams$.pipe($(Fe)),this.loading$=this.profileService.loading$}};t.\u0275fac=function(s){return new(s||t)(T(je),T(Se))},t.\u0275prov=U({token:t,factory:t.\u0275fac});let e=t;return e})();var Ke=e=>({absenceCounts:e});function Xe(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.checkableAbsences,") ")}}function Ze(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let n=l(2);o("absences$",n.absencesService.checkableAbsences$)}}function et(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.openAbsences,") ")}}function tt(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",16),e&2){let n=l(2);o("absences$",n.absencesService.openAbsences$)("selectionService",n.absencesSelectionService)}}function nt(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.excusedAbsences,") ")}}function it(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let n=l(2);o("absences$",n.absencesService.excusedAbsences$)}}function st(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.unexcusedAbsences,") ")}}function rt(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",17),e&2){let n=l(2);o("absences$",n.absencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function ot(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.incidents,") ")}}function at(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let n=l(2);o("absences$",n.absencesService.incidents$)}}function ct(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l(2).bkdLet;r(),g("(",n.absenceCounts.halfDays,") ")}}function dt(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",17),e&2){let n=l(3);o("absences$",n.absencesService.halfDays$)("displayPresenceType",!1)}}function pt(e,t){if(e&1){let n=j();d(0,"div",18,5)(2,"div",9)(3,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(1);return S(s.toggle())}),u(4),m(5,"translate"),c(6,ct,2,1,"ng-container",11),p()(),d(7,"div",12)(8,"div",13),c(9,dt,1,2,"ng-template"),p()()()}if(e&2){let n=f(1),i=l().bkdLet;r(3),o("opened",!n.collapsed),r(),g(" ",_(5,3,"shared.profile.half-days")," "),r(2),o("ngIf",i.absenceCounts.halfDays!==null)}}function lt(e,t){if(e&1){let n=j();v(0),d(1,"div",7)(2,"div",8,0)(4,"div",9)(5,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(3);return S(s.toggle())}),u(6),m(7,"translate"),c(8,Xe,2,1,"ng-container",11),p()(),d(9,"div",12)(10,"div",13),c(11,Ze,1,1,"ng-template"),p()()(),d(12,"div",8,1)(14,"div",9)(15,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(13);return S(s.toggle())}),u(16),m(17,"translate"),c(18,et,2,1,"ng-container",11),p()(),d(19,"div",12)(20,"div",13),c(21,tt,1,2,"ng-template"),p()()(),d(22,"div",8,2)(24,"div",9)(25,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(23);return S(s.toggle())}),u(26),m(27,"translate"),c(28,nt,2,1,"ng-container",11),p()(),d(29,"div",12)(30,"div",13),c(31,it,1,1,"ng-template"),p()()(),d(32,"div",8,3)(34,"div",9)(35,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(33);return S(s.toggle())}),u(36),m(37,"translate"),c(38,st,2,1,"ng-container",11),p()(),d(39,"div",12)(40,"div",13),c(41,rt,1,2,"ng-template"),p()()(),d(42,"div",8,4)(44,"div",9)(45,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(43);return S(s.toggle())}),u(46),m(47,"translate"),c(48,ot,2,1,"ng-container",11),p()(),d(49,"div",12)(50,"div",13),c(51,at,1,1,"ng-template"),p()()(),c(52,pt,10,5,"div",14),m(53,"async"),p(),h()}if(e&2){let n=t.bkdLet,i=f(3),s=f(13),a=f(23),O=f(33),se=f(43),Ye=l();r(5),o("opened",!i.collapsed),r(),g(" ",_(7,16,"shared.profile.checkable-absences")," "),r(2),o("ngIf",n.absenceCounts.checkableAbsences!==null),r(7),o("opened",!s.collapsed),r(),g(" ",_(17,18,"shared.profile.open-absences")," "),r(2),o("ngIf",n.absenceCounts.openAbsences!==null),r(7),o("opened",!a.collapsed),r(),g(" ",_(27,20,"shared.profile.excused-absences")," "),r(2),o("ngIf",n.absenceCounts.excusedAbsences!==null),r(7),o("opened",!O.collapsed),r(),g(" ",_(37,22,"shared.profile.unexcused-absences")," "),r(2),o("ngIf",n.absenceCounts.unexcusedAbsences!==null),r(7),o("opened",!se.collapsed),r(),g(" ",_(47,24,"shared.profile.incidents")," "),r(2),o("ngIf",n.absenceCounts.incidents!==null),r(4),o("ngIf",_(53,26,Ye.halfDayActive$))}}var qe=(()=>{let t=class t{constructor(i,s,a,O){this.state=i,this.presenceTypesService=s,this.absencesService=a,this.absencesSelectionService=O,this.halfDayActive$=this.presenceTypesService.halfDayActive$,this.destroy$=new q,this.state.currentDossier$.next("absences")}ngOnInit(){this.state.studentId$.pipe(H(this.destroy$)).subscribe(i=>this.absencesService.setStudentId(i))}ngOnDestroy(){this.destroy$.next()}};t.\u0275fac=function(s){return new(s||t)(y(D),y(Z),y(ne),y(Pe))},t.\u0275cmp=x({type:t,selectors:[["bkd-dossier-absences"]],standalone:!0,features:[Q([ne]),A],decls:2,vars:5,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["halfDays","ngbAccordionItem"],[4,"bkdLet"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[4,"ngIf"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","","id","half-days",4,"ngIf"],[3,"absences$"],[3,"absences$","selectionService"],[3,"absences$","displayPresenceType"],["ngbAccordionItem","","id","half-days"]],template:function(s,a){s&1&&(c(0,lt,54,28,"ng-container",6),m(1,"async")),s&2&&o("bkdLet",w(3,Ke,_(1,1,a.absencesService.counts$)))},dependencies:[E,X,K,J,te,I,z,Y,Be,P,M,N],changeDetection:0});let e=t;return e})();var mt=e=>({profile:e});function _t(e,t){if(e&1&&b(0,"bkd-student-dossier-legal-representative",13),e&2){let n=t.$implicit;o("person",n)}}function ut(e,t){if(e&1&&c(0,_t,1,1,"bkd-student-dossier-legal-representative",12),e&2){let n=l(2).bkdLet;o("ngForOf",n.profile.legalRepresentativePersons)}}function ft(e,t){if(e&1){let n=j();d(0,"div",7,0)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),k("click",function(){C(n);let s=f(1);return S(s.toggle())}),u(4),m(5,"translate"),p()(),d(6,"div",10)(7,"div",11),c(8,ut,1,1,"ng-template"),p()()()}if(e&2){let n=f(1);r(3),o("opened",!n.collapsed),r(),g(" ",_(5,2,"shared.profile.legal-representation")," ")}}function gt(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().index;r(),g("",n+1," ")}}function bt(e,t){if(e&1&&b(0,"bkd-student-dossier-apprenticeship-company",15),e&2){let n=l().$implicit;o("company",n)}}function vt(e,t){if(e&1){let n=j();d(0,"div",7,1)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),k("click",function(){C(n);let s=f(1);return S(s.toggle())}),u(4),m(5,"translate"),c(6,gt,2,1,"ng-container",14),p()(),d(7,"div",10)(8,"div",11),c(9,bt,1,1,"ng-template"),p()()()}if(e&2){let n=f(1),i=l().bkdLet;r(3),o("opened",!n.collapsed),r(),g(" ",_(5,3,"shared.profile.apprenticeship-company")," "),r(2),o("ngIf",i.profile.apprenticeshipCompanies.length>1)}}function ht(e,t){if(e&1&&(v(0),b(1,"bkd-student-dossier-address",3),d(2,"div",4),c(3,ft,9,4,"div",5)(4,vt,10,5,"div",6),p(),h()),e&2){let n=t.bkdLet;r(),o("student",n.profile.student),r(2),o("ngIf",n.profile.legalRepresentativePersons.length>0),r(),o("ngForOf",n.profile.apprenticeshipCompanies)}}var He=(()=>{let t=class t{constructor(i){this.state=i,this.state.currentDossier$.next("addresses")}};t.\u0275fac=function(s){return new(s||t)(y(D))},t.\u0275cmp=x({type:t,selectors:[["bkd-dossier-addresses"]],standalone:!0,features:[A],decls:2,vars:5,consts:[["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[4,"bkdLet"],[1,"profile-entry",3,"student"],["ngbAccordion",""],["ngbAccordionItem","",4,"ngIf"],["ngbAccordionItem","",4,"ngFor","ngForOf"],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["class","profile-entry",3,"person",4,"ngFor","ngForOf"],[1,"profile-entry",3,"person"],[4,"ngIf"],[1,"profile-entry",3,"company"]],template:function(s,a){s&1&&(c(0,ht,5,3,"ng-container",2),m(1,"async")),s&2&&o("bkdLet",w(3,mt,_(1,1,a.state.profile$)))},dependencies:[E,Ne,X,I,K,J,te,z,Y,W,Ve,Me,P,M,N],styles:[".profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}"],changeDetection:0});let e=t;return e})();var xt=(e,t,n,i)=>({studentId:e,loading:t,courses:n,gradingScales:i});function Ct(e,t){if(e&1&&b(0,"bkd-dossier-grades-view",3),e&2){let n=l().bkdLet;o("courses",n.courses)("studentId",n.studentId)("gradingScales",n.gradingScales)}}function St(e,t){e&1&&(v(0),b(1,"bkd-spinner"),h())}function kt(e,t){if(e&1&&(v(0),c(1,Ct,1,3,"bkd-dossier-grades-view",1)(2,St,2,0,"ng-container",2),h()),e&2){let n=t.bkdLet;r(),o("ngIf",!n.loading),r(),o("ngIf",n.loading)}}var Ue=(()=>{let t=class t{constructor(i,s){this.state=i,this.dossierGradesService=s,this.destroy$=new q}ngOnInit(){this.state.currentDossier$.next("grades"),this.state.studentId$.pipe(H(this.destroy$)).subscribe(i=>this.dossierGradesService.setStudentId(i))}ngOnDestroy(){this.destroy$.next()}};t.\u0275fac=function(s){return new(s||t)(y(D),y(V))},t.\u0275cmp=x({type:t,selectors:[["bkd-dossier-grades"]],standalone:!0,features:[A],decls:5,vars:14,consts:[[4,"bkdLet"],[3,"courses","studentId","gradingScales",4,"ngIf"],[4,"ngIf"],[3,"courses","studentId","gradingScales"]],template:function(s,a){s&1&&(c(0,kt,3,2,"ng-container",0),m(1,"async"),m(2,"async"),m(3,"async"),m(4,"async")),s&2&&o("bkdLet",ye(9,xt,_(1,1,a.state.studentId$),_(2,3,a.dossierGradesService.loading$),_(3,5,a.dossierGradesService.studentCourses$),_(4,7,a.dossierGradesService.gradingScales$)))},dependencies:[E,I,Re,ee,P]});let e=t;return e})();var At=["*"];function It(e,t){if(e&1&&(d(0,"div",6)(1,"span",7),u(2),m(3,"date"),p(),d(4,"span",8),u(5),p()()),e&2){let n=l();r(2),G(xe(3,2,n.student.Birthdate,"dd.MM.yyyy")),r(3),g("(",n.student.Gender,")")}}var Qe=(()=>{let t=class t{constructor(){this.link="/"}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=x({type:t,selectors:[["bkd-student-backlink"]],inputs:{link:"link",queryParams:"queryParams",studentId:"studentId",studentName:"studentName",student:"student"},standalone:!0,features:[A],ngContentSelectors:At,decls:9,vars:5,consts:[[1,"d-flex","flex-column","w-100"],[3,"link","params"],[1,"d-flex","flex-row","align-items-start"],[1,"me-3","medium",3,"studentId"],[1,"d-flex","flex-column"],["class","additional-info",4,"ngIf"],[1,"additional-info"],[1,"birthday"],[1,"gender"]],template:function(s,a){s&1&&(be(),d(0,"div",0)(1,"bkd-backlink",1),ve(2),p(),d(3,"div",2),b(4,"bkd-avatar",3),d(5,"div",4)(6,"h1"),u(7),p(),c(8,It,6,5,"div",5),p()()()),s&2&&(r(),o("link",a.link)("params",a.queryParams),r(3),o("studentId",a.studentId),r(3),G(a.student?a.student.FullName:a.studentName),r(),o("ngIf",a.student))},dependencies:[Ge,Oe,I,Ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;width:100%}h1[_ngcontent-%COMP%]{margin:-3px 0 0;display:flex;align-items:baseline;line-height:1}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}.gender[_ngcontent-%COMP%]{margin-left:.8ch}"],changeDetection:0});let e=t;return e})();var Dt=(e,t,n)=>({profile:e,currentDossierSection:t,reports:n}),$t=()=>["addresses","absences","grades"],Tt=()=>[],Pt=e=>({returnparams:e}),Et=e=>[e];function Lt(e,t){if(e&1&&b(0,"bkd-reports-link",10),e&2){let n,i=l(2).bkdLet;o("reports",(n=i.reports)!==null&&n!==void 0?n:ae(1,Tt))}}function wt(e,t){if(e&1&&(d(0,"a",11),m(1,"async"),d(2,"button",12,2),u(4),m(5,"translate"),p()()),e&2){let n=t.$implicit,i=f(3),s=l(3);o("queryParams",w(9,Pt,_(1,5,s.state.returnParams$)))("routerLink",w(11,Et,n)),r(2),ge("btn-outline-secondary",!i.isActive),r(2),g(" ",_(5,7,"dossier."+n)," ")}}function Bt(e,t){e&1&&(d(0,"div"),b(1,"router-outlet"),p())}function Ft(e,t){e&1&&(d(0,"p"),u(1),m(2,"translate"),p()),e&2&&(r(),G(_(2,1,"shared.profile.no-profile")))}function jt(e,t){if(e&1&&(v(0),d(1,"bkd-student-backlink",6),m(2,"async"),m(3,"async"),c(4,Lt,1,2,"bkd-reports-link",7),p(),d(5,"div",8),c(6,wt,6,13,"a",9),p(),c(7,Bt,2,0,"div",5)(8,Ft,3,3,"ng-template",null,1,ce),h()),e&2){let n=f(9),i=l().bkdLet,s=l();r(),o("link","../..")("queryParams",_(2,8,s.state.backlinkQueryParams$))("studentId",_(3,10,s.state.studentId$))("student",i.profile&&i.profile.student),r(3),o("ngIf",i.currentDossierSection==="grades"),r(2),o("ngForOf",ae(12,$t)),r(),o("ngIf",i.profile)("ngIfElse",n)}}function Nt(e,t){e&1&&b(0,"bkd-spinner")}function Mt(e,t){if(e&1&&(v(0),c(1,jt,10,13,"ng-container",5),m(2,"async"),c(3,Nt,1,0,"ng-template",null,0,ce),h()),e&2){let n=f(4),i=l();r(),o("ngIf",_(2,2,i.state.loading$)===!1)("ngIfElse",n)}}var We=(()=>{let t=class t{constructor(i,s){this.state=i,this.dossierGradesService=s,this.state.currentDossier$.next("addresses")}};t.\u0275fac=function(s){return new(s||t)(y(D),y(V))},t.\u0275cmp=x({type:t,selectors:[["bkd-student-dossier"]],standalone:!0,features:[Q([D,V]),A],decls:5,vars:11,consts:[["loading",""],["noProfile",""],["rla","routerLinkActive"],[1,"bkd-container","bkd-container-limited"],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[1,"mb-2",3,"link","queryParams","studentId","student"],["class","ms-2",3,"reports",4,"ngIf"],[1,"d-flex","flex-row","py-3","flex-wrap"],["class","me-1 mt-1 me-sm-2",3,"queryParams","routerLink",4,"ngFor","ngForOf"],[1,"ms-2",3,"reports"],[1,"me-1","mt-1","me-sm-2",3,"queryParams","routerLink"],["data-test-id","dossier-section-button","type","button","routerLinkActive","btn-primary",1,"btn","btn-outline-secondary"]],template:function(s,a){s&1&&(d(0,"div",3),c(1,Mt,5,4,"ng-container",4),m(2,"async"),m(3,"async"),m(4,"async"),p()),s&2&&(r(),o("bkdLet",he(7,Dt,_(2,1,a.state.profile$),_(3,3,a.state.currentDossier$),_(4,5,a.dossierGradesService.testReports$))))},dependencies:[E,I,Qe,we,W,Ae,Ie,ke,ee,P,M,N],changeDetection:0});let e=t;return e})();var Gn={path:"student/:id",children:[{path:"",component:We,children:[{path:"addresses",component:He},{path:"absences",component:qe},{path:"grades",component:Ue}]},{path:"absences/confirm",component:Ee}]};export{Gn as a}; +import{a as je,b as Ne,c as Me,d as Ve,e as Oe}from"./chunk-U4HODSW3.js";import{t as V,w as Re}from"./chunk-7LCBKZQT.js";import{d as Ee,e as Le}from"./chunk-C7XT5XXE.js";import{b as te}from"./chunk-RFO4NYUO.js";import{a as Fe}from"./chunk-5RDJZAUT.js";import{P as Pe,T as Z,X as Be,Y as Ge}from"./chunk-ZK2MNT7Z.js";import{a as we}from"./chunk-FTDG26ID.js";import{a as E,c as ee}from"./chunk-SOHFFTKU.js";import{a as Y,b as z,c as J,d as K,e as X}from"./chunk-C56YGDXA.js";import{a as $e}from"./chunk-UX5TA32W.js";import{$ as x,$a as l,Ab as m,Bb as _,Cb as xe,Eb as ce,Fd as Te,Ga as c,Gd as N,Hd as M,Ia as o,Ja as ge,K as ue,L as fe,N as oe,O as L,Q as H,Rb as W,Sa as d,Sb as I,Ta as p,Ua as b,Va as v,Vb as P,Vc as De,W as U,Wa as h,Wb as Ce,Ya as j,Z as T,_a as k,a as B,ab as be,b as F,bb as ve,e as q,f as pe,g as re,ha as C,ia as S,ib as f,j as le,jb as u,k as me,kb as G,lb as g,m as $,n as _e,oc as Se,pc as ke,rc as Ae,sb as Q,sc as Ie,tb as A,ua as r,ub as ae,va as y,vb as w,xb as he,yb as ye}from"./chunk-XTHSYQMN.js";var ne=(()=>{let t=class t{constructor(i,s,a,O,se){this.settings=i,this.lessonPresencesService=s,this.presenceTypesService=a,this.toastService=O,this.translate=se,this.studentId$=new re(1),this.checkableAbsences$=this.getAbsences(this.loadCheckableAbsences.bind(this)),this.openAbsences$=this.getAbsences(this.loadOpenAbsences.bind(this)),this.excusedAbsences$=this.getAbsences(this.loadExcusedAbsences.bind(this)),this.unexcusedAbsences$=this.getAbsences(this.loadUnexcusedAbsences.bind(this)),this.incidents$=this.getAbsences(this.loadIncidents.bind(this)),this.halfDays$=this.getAbsences(this.loadHalfDays.bind(this)),this.counts$=this.getCounts()}setStudentId(i){this.studentId$.next(i)}getAbsences(i){return this.studentId$.pipe(L(i),oe(null),ue({connector:()=>new re(1)}))}getCounts(){return this.studentId$.pipe(L(i=>_e([this.loadStatistics(i).pipe(oe(null)),this.openAbsences$.pipe($(s=>s?.length??null)),this.checkableAbsences$.pipe($(s=>s?.length??null))])),$(([i,s,a])=>({openAbsences:s,checkableAbsences:a,excusedAbsences:i?.TotalAbsencesValidExcuse??null,unexcusedAbsences:i?.TotalAbsencesWithoutExcuse??null,incidents:i?.TotalIncidents??null,halfDays:i?.TotalHalfDays??null})))}loadStatistics(i){return this.lessonPresencesService.getStatistics({student:i,educationalEvent:null,studyClass:null},null,0).pipe(L(({entries:s})=>s.length>0?me(s[0]):(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),le)))}loadOpenAbsences(i){return this.lessonPresencesService.getListOfUnconfirmed(this.getBaseParams(i))}loadCheckableAbsences(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.ConfirmationStateId":`=${this.settings.checkableAbsenceStateId}`})})}loadExcusedAbsences(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.ConfirmationStateId":`=${this.settings.excusedAbsenceStateId}`})})}loadUnexcusedAbsences(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.ConfirmationStateId":`=${this.settings.unexcusedAbsenceStateId}`})})}loadIncidents(i){return this.presenceTypesService.incidentTypes$.pipe($(s=>F(B({},this.getBaseParams(i)),{"filter.TypeRef":`;${s.map(a=>a.Id).join(";")}`})),L(s=>this.lessonPresencesService.getList({params:s})))}loadHalfDays(i){return this.lessonPresencesService.getList({params:F(B({},this.getBaseParams(i)),{"filter.TypeRef":`=${this.settings.halfDayPresenceTypeId}`})})}getBaseParams(i){return{sort:"LessonDateTimeFrom.asc","filter.StudentRef":`=${i}`}}};t.\u0275fac=function(s){return new(s||t)(T(De),T(Le),T(Z),T($e),T(Te))},t.\u0275prov=U({token:t,factory:t.\u0275fac});let e=t;return e})();var D=(()=>{let t=class t{constructor(i,s){this.profileService=i,this.route=s,this.currentDossier$=new pe("addresses"),this.studentId$=this.route.paramMap.pipe($(a=>Number(a.get("id")))),this.profile$=this.studentId$.pipe(L(a=>this.profileService.getProfile(a)),fe(1)),this.returnParams$=this.route.queryParams.pipe($(({returnparams:a})=>a)),this.backlinkQueryParams$=this.returnParams$.pipe($(Fe)),this.loading$=this.profileService.loading$}};t.\u0275fac=function(s){return new(s||t)(T(je),T(Se))},t.\u0275prov=U({token:t,factory:t.\u0275fac});let e=t;return e})();var Ke=e=>({absenceCounts:e});function Xe(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.checkableAbsences,") ")}}function Ze(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let n=l(2);o("absences$",n.absencesService.checkableAbsences$)}}function et(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.openAbsences,") ")}}function tt(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",16),e&2){let n=l(2);o("absences$",n.absencesService.openAbsences$)("selectionService",n.absencesSelectionService)}}function nt(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.excusedAbsences,") ")}}function it(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let n=l(2);o("absences$",n.absencesService.excusedAbsences$)}}function st(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.unexcusedAbsences,") ")}}function rt(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",17),e&2){let n=l(2);o("absences$",n.absencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function ot(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().bkdLet;r(),g("(",n.absenceCounts.incidents,") ")}}function at(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",15),e&2){let n=l(2);o("absences$",n.absencesService.incidents$)}}function ct(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l(2).bkdLet;r(),g("(",n.absenceCounts.halfDays,") ")}}function dt(e,t){if(e&1&&b(0,"bkd-student-dossier-absences",17),e&2){let n=l(3);o("absences$",n.absencesService.halfDays$)("displayPresenceType",!1)}}function pt(e,t){if(e&1){let n=j();d(0,"div",18,5)(2,"div",9)(3,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(1);return S(s.toggle())}),u(4),m(5,"translate"),c(6,ct,2,1,"ng-container",11),p()(),d(7,"div",12)(8,"div",13),c(9,dt,1,2,"ng-template"),p()()()}if(e&2){let n=f(1),i=l().bkdLet;r(3),o("opened",!n.collapsed),r(),g(" ",_(5,3,"shared.profile.half-days")," "),r(2),o("ngIf",i.absenceCounts.halfDays!==null)}}function lt(e,t){if(e&1){let n=j();v(0),d(1,"div",7)(2,"div",8,0)(4,"div",9)(5,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(3);return S(s.toggle())}),u(6),m(7,"translate"),c(8,Xe,2,1,"ng-container",11),p()(),d(9,"div",12)(10,"div",13),c(11,Ze,1,1,"ng-template"),p()()(),d(12,"div",8,1)(14,"div",9)(15,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(13);return S(s.toggle())}),u(16),m(17,"translate"),c(18,et,2,1,"ng-container",11),p()(),d(19,"div",12)(20,"div",13),c(21,tt,1,2,"ng-template"),p()()(),d(22,"div",8,2)(24,"div",9)(25,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(23);return S(s.toggle())}),u(26),m(27,"translate"),c(28,nt,2,1,"ng-container",11),p()(),d(29,"div",12)(30,"div",13),c(31,it,1,1,"ng-template"),p()()(),d(32,"div",8,3)(34,"div",9)(35,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(33);return S(s.toggle())}),u(36),m(37,"translate"),c(38,st,2,1,"ng-container",11),p()(),d(39,"div",12)(40,"div",13),c(41,rt,1,2,"ng-template"),p()()(),d(42,"div",8,4)(44,"div",9)(45,"bkd-student-dossier-entry-header",10),k("click",function(){C(n);let s=f(43);return S(s.toggle())}),u(46),m(47,"translate"),c(48,ot,2,1,"ng-container",11),p()(),d(49,"div",12)(50,"div",13),c(51,at,1,1,"ng-template"),p()()(),c(52,pt,10,5,"div",14),m(53,"async"),p(),h()}if(e&2){let n=t.bkdLet,i=f(3),s=f(13),a=f(23),O=f(33),se=f(43),Ye=l();r(5),o("opened",!i.collapsed),r(),g(" ",_(7,16,"shared.profile.checkable-absences")," "),r(2),o("ngIf",n.absenceCounts.checkableAbsences!==null),r(7),o("opened",!s.collapsed),r(),g(" ",_(17,18,"shared.profile.open-absences")," "),r(2),o("ngIf",n.absenceCounts.openAbsences!==null),r(7),o("opened",!a.collapsed),r(),g(" ",_(27,20,"shared.profile.excused-absences")," "),r(2),o("ngIf",n.absenceCounts.excusedAbsences!==null),r(7),o("opened",!O.collapsed),r(),g(" ",_(37,22,"shared.profile.unexcused-absences")," "),r(2),o("ngIf",n.absenceCounts.unexcusedAbsences!==null),r(7),o("opened",!se.collapsed),r(),g(" ",_(47,24,"shared.profile.incidents")," "),r(2),o("ngIf",n.absenceCounts.incidents!==null),r(4),o("ngIf",_(53,26,Ye.halfDayActive$))}}var qe=(()=>{let t=class t{constructor(i,s,a,O){this.state=i,this.presenceTypesService=s,this.absencesService=a,this.absencesSelectionService=O,this.halfDayActive$=this.presenceTypesService.halfDayActive$,this.destroy$=new q,this.state.currentDossier$.next("absences")}ngOnInit(){this.state.studentId$.pipe(H(this.destroy$)).subscribe(i=>this.absencesService.setStudentId(i))}ngOnDestroy(){this.destroy$.next()}};t.\u0275fac=function(s){return new(s||t)(y(D),y(Z),y(ne),y(Pe))},t.\u0275cmp=x({type:t,selectors:[["bkd-dossier-absences"]],standalone:!0,features:[Q([ne]),A],decls:2,vars:5,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["halfDays","ngbAccordionItem"],[4,"bkdLet"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[4,"ngIf"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["ngbAccordionItem","","id","half-days",4,"ngIf"],[3,"absences$"],[3,"absences$","selectionService"],[3,"absences$","displayPresenceType"],["ngbAccordionItem","","id","half-days"]],template:function(s,a){s&1&&(c(0,lt,54,28,"ng-container",6),m(1,"async")),s&2&&o("bkdLet",w(3,Ke,_(1,1,a.absencesService.counts$)))},dependencies:[E,X,K,J,te,I,z,Y,Be,P,M,N],changeDetection:0});let e=t;return e})();var mt=e=>({profile:e});function _t(e,t){if(e&1&&b(0,"bkd-student-dossier-legal-representative",13),e&2){let n=t.$implicit;o("person",n)}}function ut(e,t){if(e&1&&c(0,_t,1,1,"bkd-student-dossier-legal-representative",12),e&2){let n=l(2).bkdLet;o("ngForOf",n.profile.legalRepresentativePersons)}}function ft(e,t){if(e&1){let n=j();d(0,"div",7,0)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),k("click",function(){C(n);let s=f(1);return S(s.toggle())}),u(4),m(5,"translate"),p()(),d(6,"div",10)(7,"div",11),c(8,ut,1,1,"ng-template"),p()()()}if(e&2){let n=f(1);r(3),o("opened",!n.collapsed),r(),g(" ",_(5,2,"shared.profile.legal-representation")," ")}}function gt(e,t){if(e&1&&(v(0),u(1),h()),e&2){let n=l().index;r(),g("",n+1," ")}}function bt(e,t){if(e&1&&b(0,"bkd-student-dossier-apprenticeship-company",15),e&2){let n=l().$implicit;o("company",n)}}function vt(e,t){if(e&1){let n=j();d(0,"div",7,1)(2,"div",8)(3,"bkd-student-dossier-entry-header",9),k("click",function(){C(n);let s=f(1);return S(s.toggle())}),u(4),m(5,"translate"),c(6,gt,2,1,"ng-container",14),p()(),d(7,"div",10)(8,"div",11),c(9,bt,1,1,"ng-template"),p()()()}if(e&2){let n=f(1),i=l().bkdLet;r(3),o("opened",!n.collapsed),r(),g(" ",_(5,3,"shared.profile.apprenticeship-company")," "),r(2),o("ngIf",i.profile.apprenticeshipCompanies.length>1)}}function ht(e,t){if(e&1&&(v(0),b(1,"bkd-student-dossier-address",3),d(2,"div",4),c(3,ft,9,4,"div",5)(4,vt,10,5,"div",6),p(),h()),e&2){let n=t.bkdLet;r(),o("student",n.profile.student),r(2),o("ngIf",n.profile.legalRepresentativePersons.length>0),r(),o("ngForOf",n.profile.apprenticeshipCompanies)}}var He=(()=>{let t=class t{constructor(i){this.state=i,this.state.currentDossier$.next("addresses")}};t.\u0275fac=function(s){return new(s||t)(y(D))},t.\u0275cmp=x({type:t,selectors:[["bkd-dossier-addresses"]],standalone:!0,features:[A],decls:2,vars:5,consts:[["legalRepresentatives","ngbAccordionItem"],["apprenticeshipCompanies","ngbAccordionItem"],[4,"bkdLet"],[1,"profile-entry",3,"student"],["ngbAccordion",""],["ngbAccordionItem","",4,"ngIf"],["ngbAccordionItem","",4,"ngFor","ngForOf"],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],["class","profile-entry",3,"person",4,"ngFor","ngForOf"],[1,"profile-entry",3,"person"],[4,"ngIf"],[1,"profile-entry",3,"company"]],template:function(s,a){s&1&&(c(0,ht,5,3,"ng-container",2),m(1,"async")),s&2&&o("bkdLet",w(3,mt,_(1,1,a.state.profile$)))},dependencies:[E,Ne,X,I,K,J,te,z,Y,W,Ve,Me,P,M,N],styles:[".profile-entry[_ngcontent-%COMP%]{display:block;padding:0 1rem}"],changeDetection:0});let e=t;return e})();var xt=(e,t,n,i)=>({studentId:e,loading:t,courses:n,gradingScales:i});function Ct(e,t){if(e&1&&b(0,"bkd-dossier-grades-view",3),e&2){let n=l().bkdLet;o("courses",n.courses)("studentId",n.studentId)("gradingScales",n.gradingScales)}}function St(e,t){e&1&&(v(0),b(1,"bkd-spinner"),h())}function kt(e,t){if(e&1&&(v(0),c(1,Ct,1,3,"bkd-dossier-grades-view",1)(2,St,2,0,"ng-container",2),h()),e&2){let n=t.bkdLet;r(),o("ngIf",!n.loading),r(),o("ngIf",n.loading)}}var Ue=(()=>{let t=class t{constructor(i,s){this.state=i,this.dossierGradesService=s,this.destroy$=new q}ngOnInit(){this.state.currentDossier$.next("grades"),this.state.studentId$.pipe(H(this.destroy$)).subscribe(i=>this.dossierGradesService.setStudentId(i))}ngOnDestroy(){this.destroy$.next()}};t.\u0275fac=function(s){return new(s||t)(y(D),y(V))},t.\u0275cmp=x({type:t,selectors:[["bkd-dossier-grades"]],standalone:!0,features:[A],decls:5,vars:14,consts:[[4,"bkdLet"],[3,"courses","studentId","gradingScales",4,"ngIf"],[4,"ngIf"],[3,"courses","studentId","gradingScales"]],template:function(s,a){s&1&&(c(0,kt,3,2,"ng-container",0),m(1,"async"),m(2,"async"),m(3,"async"),m(4,"async")),s&2&&o("bkdLet",ye(9,xt,_(1,1,a.state.studentId$),_(2,3,a.dossierGradesService.loading$),_(3,5,a.dossierGradesService.studentCourses$),_(4,7,a.dossierGradesService.gradingScales$)))},dependencies:[E,I,Re,ee,P]});let e=t;return e})();var At=["*"];function It(e,t){if(e&1&&(d(0,"div",6)(1,"span",7),u(2),m(3,"date"),p(),d(4,"span",8),u(5),p()()),e&2){let n=l();r(2),G(xe(3,2,n.student.Birthdate,"dd.MM.yyyy")),r(3),g("(",n.student.Gender,")")}}var Qe=(()=>{let t=class t{constructor(){this.link="/"}};t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=x({type:t,selectors:[["bkd-student-backlink"]],inputs:{link:"link",queryParams:"queryParams",studentId:"studentId",studentName:"studentName",student:"student"},standalone:!0,features:[A],ngContentSelectors:At,decls:9,vars:5,consts:[[1,"d-flex","flex-column","w-100"],[3,"link","params"],[1,"d-flex","flex-row","align-items-start"],[1,"me-3","medium",3,"studentId"],[1,"d-flex","flex-column"],["class","additional-info",4,"ngIf"],[1,"additional-info"],[1,"birthday"],[1,"gender"]],template:function(s,a){s&1&&(be(),d(0,"div",0)(1,"bkd-backlink",1),ve(2),p(),d(3,"div",2),b(4,"bkd-avatar",3),d(5,"div",4)(6,"h1"),u(7),p(),c(8,It,6,5,"div",5),p()()()),s&2&&(r(),o("link",a.link)("params",a.queryParams),r(3),o("studentId",a.studentId),r(3),G(a.student?a.student.FullName:a.studentName),r(),o("ngIf",a.student))},dependencies:[Ge,Oe,I,Ce],styles:["[_nghost-%COMP%]{display:flex;align-items:center;width:100%}h1[_ngcontent-%COMP%]{margin:-3px 0 0;display:flex;align-items:baseline;line-height:1}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}.gender[_ngcontent-%COMP%]{margin-left:.8ch}"],changeDetection:0});let e=t;return e})();var Dt=(e,t,n)=>({profile:e,currentDossierSection:t,reports:n}),$t=()=>["addresses","absences","grades"],Tt=()=>[],Pt=e=>({returnparams:e}),Et=e=>[e];function Lt(e,t){if(e&1&&b(0,"bkd-reports-link",10),e&2){let n,i=l(2).bkdLet;o("reports",(n=i.reports)!==null&&n!==void 0?n:ae(1,Tt))}}function wt(e,t){if(e&1&&(d(0,"a",11),m(1,"async"),d(2,"button",12,2),u(4),m(5,"translate"),p()()),e&2){let n=t.$implicit,i=f(3),s=l(3);o("queryParams",w(9,Pt,_(1,5,s.state.returnParams$)))("routerLink",w(11,Et,n)),r(2),ge("btn-outline-secondary",!i.isActive),r(2),g(" ",_(5,7,"dossier."+n)," ")}}function Bt(e,t){e&1&&(d(0,"div"),b(1,"router-outlet"),p())}function Ft(e,t){e&1&&(d(0,"p"),u(1),m(2,"translate"),p()),e&2&&(r(),G(_(2,1,"shared.profile.no-profile")))}function jt(e,t){if(e&1&&(v(0),d(1,"bkd-student-backlink",6),m(2,"async"),m(3,"async"),c(4,Lt,1,2,"bkd-reports-link",7),p(),d(5,"div",8),c(6,wt,6,13,"a",9),p(),c(7,Bt,2,0,"div",5)(8,Ft,3,3,"ng-template",null,1,ce),h()),e&2){let n=f(9),i=l().bkdLet,s=l();r(),o("link","../..")("queryParams",_(2,8,s.state.backlinkQueryParams$))("studentId",_(3,10,s.state.studentId$))("student",i.profile&&i.profile.student),r(3),o("ngIf",i.currentDossierSection==="grades"),r(2),o("ngForOf",ae(12,$t)),r(),o("ngIf",i.profile)("ngIfElse",n)}}function Nt(e,t){e&1&&b(0,"bkd-spinner")}function Mt(e,t){if(e&1&&(v(0),c(1,jt,10,13,"ng-container",5),m(2,"async"),c(3,Nt,1,0,"ng-template",null,0,ce),h()),e&2){let n=f(4),i=l();r(),o("ngIf",_(2,2,i.state.loading$)===!1)("ngIfElse",n)}}var We=(()=>{let t=class t{constructor(i,s){this.state=i,this.dossierGradesService=s,this.state.currentDossier$.next("addresses")}};t.\u0275fac=function(s){return new(s||t)(y(D),y(V))},t.\u0275cmp=x({type:t,selectors:[["bkd-student-dossier"]],standalone:!0,features:[Q([D,V]),A],decls:5,vars:11,consts:[["loading",""],["noProfile",""],["rla","routerLinkActive"],[1,"bkd-container","bkd-container-limited"],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[1,"mb-2",3,"link","queryParams","studentId","student"],["class","ms-2",3,"reports",4,"ngIf"],[1,"d-flex","flex-row","py-3","flex-wrap"],["class","me-1 mt-1 me-sm-2",3,"queryParams","routerLink",4,"ngFor","ngForOf"],[1,"ms-2",3,"reports"],[1,"me-1","mt-1","me-sm-2",3,"queryParams","routerLink"],["data-test-id","dossier-section-button","type","button","routerLinkActive","btn-primary",1,"btn","btn-outline-secondary"]],template:function(s,a){s&1&&(d(0,"div",3),c(1,Mt,5,4,"ng-container",4),m(2,"async"),m(3,"async"),m(4,"async"),p()),s&2&&(r(),o("bkdLet",he(7,Dt,_(2,1,a.state.profile$),_(3,3,a.state.currentDossier$),_(4,5,a.dossierGradesService.testReports$))))},dependencies:[E,I,Qe,we,W,Ae,Ie,ke,ee,P,M,N],changeDetection:0});let e=t;return e})();var Gn={path:"student/:id",children:[{path:"",component:We,children:[{path:"addresses",component:He},{path:"absences",component:qe},{path:"grades",component:Ue}]},{path:"absences/confirm",component:Ee}]};export{Gn as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HII3S2DL.js b/public/apps/webapp-schulverwaltung/chunk-HII3S2DL.js new file mode 100644 index 00000000..c6aa9b70 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-HII3S2DL.js @@ -0,0 +1 @@ +import{Ac as n,Fc as o,Hc as r,zc as t}from"./chunk-XTHSYQMN.js";var i=o({Key:r([n,t]),Value:t});export{i as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-TNMAZX5O.js b/public/apps/webapp-schulverwaltung/chunk-K3EEKOGY.js similarity index 99% rename from public/apps/webapp-schulverwaltung/chunk-TNMAZX5O.js rename to public/apps/webapp-schulverwaltung/chunk-K3EEKOGY.js index a4a20394..fc23ac0f 100644 --- a/public/apps/webapp-schulverwaltung/chunk-TNMAZX5O.js +++ b/public/apps/webapp-schulverwaltung/chunk-K3EEKOGY.js @@ -1 +1 @@ -import{b as l,c as _,d as Mr,e as _r,f as Or,g as O,h as M,i as Y,k as I,l as Yr,m as Ir,n as Er,o as Hr,p as hr,q as qr,r as Lr,s as yr,t as Qr}from"./chunk-GI4AZI25.js";import{d as w}from"./chunk-Q5U6YZUT.js";import{g as Nr}from"./chunk-FTRAQKUW.js";import{W as Tr,la as kr}from"./chunk-T7QWSMKM.js";function vr(){return Object.assign({},O())}function Rr(o){let t=w(o).getDay();return t===0&&(t=7),t}function Fr(o,r){let t=r instanceof Date?l(r,0):new r(0);return t.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),t.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),t}var Ar=10,E=class{subPriority=0;validate(r,t){return!0}},H=class extends E{constructor(r,t,e,s,i){super(),this.value=r,this.validateValue=t,this.setValue=e,this.priority=s,i&&(this.subPriority=i)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,e){return this.setValue(r,t,this.value,e)}},q=class extends E{priority=Ar;subPriority=-1;set(r,t){return t.timestampIsSet?r:l(r,Fr(r,Date))}};var n=class{run(r,t,e,s){let i=this.parse(r,t,e,s);return i?{setter:new H(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(r,t,e){return!0}};var L=class extends n{priority=140;parse(r,t,e){switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})||e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"})}}set(r,t,e){return t.era=e,r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["R","u","t","T"]};var c={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},x={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(o,r){return o&&{value:r(o.value),rest:o.rest}}function u(o,r){let t=r.match(o);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function h(o,r){let t=r.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};let e=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,d=t[5]?parseInt(t[5],10):0;return{value:e*(s*_r+i*Mr+d*Or),rest:r.slice(t[0].length)}}function Q(o){return u(c.anyDigitsSigned,o)}function a(o,r){switch(o){case 1:return u(c.singleDigit,r);case 2:return u(c.twoDigits,r);case 3:return u(c.threeDigits,r);case 4:return u(c.fourDigits,r);default:return u(new RegExp("^\\d{1,"+o+"}"),r)}}function P(o,r){switch(o){case 1:return u(c.singleDigitSigned,r);case 2:return u(c.twoDigitsSigned,r);case 3:return u(c.threeDigitsSigned,r);case 4:return u(c.fourDigitsSigned,r);default:return u(new RegExp("^-?\\d{1,"+o+"}"),r)}}function T(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function v(o,r){let t=r>0,e=t?r:1-r,s;if(e<=50)s=o||100;else{let i=e+50,d=Math.trunc(i/100)*100,y=o>=i%100;s=o+d-(y?100:0)}return t?s:1-s}function R(o){return o%400===0||o%4===0&&o%100!==0}var F=class extends n{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return p(a(4,r),s);case"yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e){let s=r.getFullYear();if(e.isTwoDigitYear){let d=v(e.year,s);return r.setFullYear(d,0,1),r.setHours(0,0,0,0),r}let i=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}};var W=class extends n{priority=130;parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return p(a(4,r),s);case"Yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e,s){let i=Er(r,s);if(e.isTwoDigitYear){let y=v(e.year,i);return r.setFullYear(y,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}let d=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(d,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var C=class extends n{priority=130;parse(r,t){return t==="R"?P(4,r):P(t.length,r)}set(r,t,e){let s=l(r,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),Y(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var B=class extends n{priority=130;parse(r,t){return t==="u"?P(4,r):P(t.length,r)}set(r,t,e){return r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var G=class extends n{priority=120;parse(r,t,e){switch(t){case"Q":case"QQ":return a(t.length,r);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})||e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var X=class extends n{priority=120;parse(r,t,e){switch(t){case"q":case"qq":return a(t.length,r);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})||e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var z=class extends n{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"M":return p(u(c.month,r),s);case"MM":return p(a(2,r),s);case"Mo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})||e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}};var A=class extends n{priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"L":return p(u(c.month,r),s);case"LL":return p(a(2,r),s);case"Lo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})||e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function Wr(o,r,t){let e=w(o),s=Hr(e,t)-r;return e.setDate(e.getDate()-s*7),e}var V=class extends n{priority=100;parse(r,t,e){switch(t){case"w":return u(c.week,r);case"wo":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e,s){return M(Wr(r,e,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function Cr(o,r){let t=w(o),e=Ir(t)-r;return t.setDate(t.getDate()-e*7),t}var Z=class extends n{priority=100;parse(r,t,e){switch(t){case"I":return u(c.week,r);case"Io":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e){return Y(Cr(r,e))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var Vr=[31,28,31,30,31,30,31,31,30,31,30,31],Zr=[31,29,31,30,31,30,31,31,30,31,30,31],K=class extends n{priority=90;subPriority=1;parse(r,t,e){switch(t){case"d":return u(c.date,r);case"do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear(),s=R(e),i=r.getMonth();return s?t>=1&&t<=Zr[i]:t>=1&&t<=Vr[i]}set(r,t,e){return r.setDate(e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var $=class extends n{priority=90;subpriority=1;parse(r,t,e){switch(t){case"D":case"DD":return u(c.dayOfYear,r);case"Do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear();return R(e)?t>=1&&t<=366:t>=1&&t<=365}set(r,t,e){return r.setMonth(0,e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function k(o,r,t){let e=O(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,i=w(o),d=i.getDay(),N=(r%7+7)%7,g=7-s,dr=r<0||r>6?r-(d+g)%7:(N+g)%7-(d+g)%7;return _(i,dr)}var j=class extends n{priority=90;parse(r,t,e){switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["D","i","e","c","t","T"]};var U=class extends n{priority=90;parse(r,t,e,s){let i=d=>{let y=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+y};switch(t){case"e":case"ee":return p(a(t.length,r),i);case"eo":return p(e.ordinalNumber(r,{unit:"day"}),i);case"eee":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var J=class extends n{priority=90;parse(r,t,e,s){let i=d=>{let y=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+y};switch(t){case"c":case"cc":return p(a(t.length,r),i);case"co":return p(e.ordinalNumber(r,{unit:"day"}),i);case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})||e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function Br(o,r){let t=w(o),e=Rr(t),s=r-e;return _(t,s)}var S=class extends n{priority=90;parse(r,t,e){let s=i=>i===0?7:i;switch(t){case"i":case"ii":return a(t.length,r);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return p(e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return p(e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return p(e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return p(e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s)}}validate(r,t){return t>=1&&t<=7}set(r,t,e){return r=Br(r,e),r.setHours(0,0,0,0),r}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var rr=class extends n{priority=80;parse(r,t,e){switch(t){case"a":case"aa":case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["b","B","H","k","t","T"]};var er=class extends n{priority=80;parse(r,t,e){switch(t){case"b":case"bb":case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","B","H","k","t","T"]};var tr=class extends n{priority=80;parse(r,t,e){switch(t){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","b","t","T"]};var or=class extends n{priority=70;parse(r,t,e){switch(t){case"h":return u(c.hour12h,r);case"ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=12}set(r,t,e){let s=r.getHours()>=12;return s&&e<12?r.setHours(e+12,0,0,0):!s&&e===12?r.setHours(0,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["H","K","k","t","T"]};var sr=class extends n{priority=70;parse(r,t,e){switch(t){case"H":return u(c.hour23h,r);case"Ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=23}set(r,t,e){return r.setHours(e,0,0,0),r}incompatibleTokens=["a","b","h","K","k","t","T"]};var nr=class extends n{priority=70;parse(r,t,e){switch(t){case"K":return u(c.hour11h,r);case"Ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.getHours()>=12&&e<12?r.setHours(e+12,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["h","H","k","t","T"]};var ir=class extends n{priority=70;parse(r,t,e){switch(t){case"k":return u(c.hour24h,r);case"ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=24}set(r,t,e){let s=e<=24?e%24:e;return r.setHours(s,0,0,0),r}incompatibleTokens=["a","b","h","H","K","t","T"]};var ar=class extends n{priority=60;parse(r,t,e){switch(t){case"m":return u(c.minute,r);case"mo":return e.ordinalNumber(r,{unit:"minute"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setMinutes(e,0,0),r}incompatibleTokens=["t","T"]};var ur=class extends n{priority=50;parse(r,t,e){switch(t){case"s":return u(c.second,r);case"so":return e.ordinalNumber(r,{unit:"second"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setSeconds(e,0),r}incompatibleTokens=["t","T"]};var cr=class extends n{priority=30;parse(r,t){let e=s=>Math.trunc(s*Math.pow(10,-t.length+3));return p(a(t.length,r),e)}set(r,t,e){return r.setMilliseconds(e),r}incompatibleTokens=["t","T"]};var mr=class extends n{priority=10;parse(r,t){switch(t){case"X":return h(x.basicOptionalMinutes,r);case"XX":return h(x.basic,r);case"XXXX":return h(x.basicOptionalSeconds,r);case"XXXXX":return h(x.extendedOptionalSeconds,r);case"XXX":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:l(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","x"]};var pr=class extends n{priority=10;parse(r,t){switch(t){case"x":return h(x.basicOptionalMinutes,r);case"xx":return h(x.basic,r);case"xxxx":return h(x.basicOptionalSeconds,r);case"xxxxx":return h(x.extendedOptionalSeconds,r);case"xxx":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:l(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","X"]};var fr=class extends n{priority=40;parse(r){return Q(r)}set(r,t,e){return[l(r,e*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var lr=class extends n{priority=20;parse(r){return Q(r)}set(r,t,e){return[l(r,e),{timestampIsSet:!0}]}incompatibleTokens="*"};var Gr={G:new L,y:new F,Y:new W,R:new C,u:new B,Q:new G,q:new X,M:new z,L:new A,w:new V,I:new Z,d:new K,D:new $,E:new j,e:new U,c:new J,i:new S,a:new rr,b:new er,B:new tr,h:new or,H:new sr,K:new nr,k:new ir,m:new ar,s:new ur,S:new cr,X:new mr,x:new pr,t:new fr,T:new lr};var Kr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$r=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jr=/^'([^]*?)'?$/,Ur=/''/g,Jr=/\S/,Sr=/[a-zA-Z]/;function Xr(o,r,t,e){let s=vr(),i=e?.locale??s.locale??Yr,d=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,y=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(r==="")return o===""?w(t):l(t,NaN);let N={firstWeekContainsDate:d,weekStartsOn:y,locale:i},g=[new q],dr=r.match($r).map(m=>{let f=m[0];if(f in hr){let b=hr[f];return b(m,i.formatLong)}return m}).join("").match(Kr),wr=[];for(let m of dr){!e?.useAdditionalWeekYearTokens&&Lr(m)&&yr(m,r,o),!e?.useAdditionalDayOfYearTokens&&qr(m)&&yr(m,r,o);let f=m[0],b=Gr[f];if(b){let{incompatibleTokens:gr}=b;if(Array.isArray(gr)){let Dr=wr.find(Pr=>gr.includes(Pr.token)||Pr.token===f);if(Dr)throw new RangeError(`The format string mustn't contain \`${Dr.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&wr.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);wr.push({token:f,fullToken:m});let xr=b.run(o,m,i.match,N);if(!xr)return l(t,NaN);g.push(xr.setter),o=xr.rest}else{if(f.match(Sr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(m==="''"?m="'":f==="'"&&(m=re(m)),o.indexOf(m)===0)o=o.slice(m.length);else return l(t,NaN)}}if(o.length>0&&Jr.test(o))return l(t,NaN);let zr=g.map(m=>m.priority).sort((m,f)=>f-m).filter((m,f,b)=>b.indexOf(m)===f).map(m=>g.filter(f=>f.priority===m).sort((f,b)=>b.subPriority-f.subPriority)).map(m=>m[0]),D=w(t);if(isNaN(D.getTime()))return l(t,NaN);let br={};for(let m of zr){if(!m.validate(D,N))return l(t,NaN);let f=m.set(D,br,N);Array.isArray(f)?(D=f[0],Object.assign(br,f[1])):D=f}return l(t,D)}function re(o){return o.match(jr)[1].replace(Ur,"'")}var vs=(()=>{let r=class r extends Nr{parse(e){let s=e?Xr(e,"dd.MM.yyyy",new Date):null;return s?{year:s.getFullYear(),month:s.getMonth(),day:s.getDay()}:null}format(e){return e?Qr(new Date(e.year,e.month-1,e.day),"dd.MM.yyyy"):""}};r.\u0275fac=(()=>{let e;return function(i){return(e||(e=kr(r)))(i||r)}})(),r.\u0275prov=Tr({token:r,factory:r.\u0275fac});let o=r;return o})();export{vs as a}; +import{b as l,c as _,d as Mr,e as _r,f as Or,g as O,h as M,i as Y,k as I,l as Yr,m as Ir,n as Er,o as Hr,p as hr,q as qr,r as Lr,s as yr,t as Qr}from"./chunk-ZK2MNT7Z.js";import{d as w}from"./chunk-AW7CSGKI.js";import{g as Nr}from"./chunk-C56YGDXA.js";import{W as Tr,la as kr}from"./chunk-XTHSYQMN.js";function vr(){return Object.assign({},O())}function Rr(o){let t=w(o).getDay();return t===0&&(t=7),t}function Fr(o,r){let t=r instanceof Date?l(r,0):new r(0);return t.setFullYear(o.getFullYear(),o.getMonth(),o.getDate()),t.setHours(o.getHours(),o.getMinutes(),o.getSeconds(),o.getMilliseconds()),t}var Ar=10,E=class{subPriority=0;validate(r,t){return!0}},H=class extends E{constructor(r,t,e,s,i){super(),this.value=r,this.validateValue=t,this.setValue=e,this.priority=s,i&&(this.subPriority=i)}validate(r,t){return this.validateValue(r,this.value,t)}set(r,t,e){return this.setValue(r,t,this.value,e)}},q=class extends E{priority=Ar;subPriority=-1;set(r,t){return t.timestampIsSet?r:l(r,Fr(r,Date))}};var n=class{run(r,t,e,s){let i=this.parse(r,t,e,s);return i?{setter:new H(i.value,this.validate,this.set,this.priority,this.subPriority),rest:i.rest}:null}validate(r,t,e){return!0}};var L=class extends n{priority=140;parse(r,t,e){switch(t){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})||e.era(r,{width:"abbreviated"})||e.era(r,{width:"narrow"})}}set(r,t,e){return t.era=e,r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["R","u","t","T"]};var c={month:/^(1[0-2]|0?\d)/,date:/^(3[0-1]|[0-2]?\d)/,dayOfYear:/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,week:/^(5[0-3]|[0-4]?\d)/,hour23h:/^(2[0-3]|[0-1]?\d)/,hour24h:/^(2[0-4]|[0-1]?\d)/,hour11h:/^(1[0-1]|0?\d)/,hour12h:/^(1[0-2]|0?\d)/,minute:/^[0-5]?\d/,second:/^[0-5]?\d/,singleDigit:/^\d/,twoDigits:/^\d{1,2}/,threeDigits:/^\d{1,3}/,fourDigits:/^\d{1,4}/,anyDigitsSigned:/^-?\d+/,singleDigitSigned:/^-?\d/,twoDigitsSigned:/^-?\d{1,2}/,threeDigitsSigned:/^-?\d{1,3}/,fourDigitsSigned:/^-?\d{1,4}/},x={basicOptionalMinutes:/^([+-])(\d{2})(\d{2})?|Z/,basic:/^([+-])(\d{2})(\d{2})|Z/,basicOptionalSeconds:/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,extended:/^([+-])(\d{2}):(\d{2})|Z/,extendedOptionalSeconds:/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/};function p(o,r){return o&&{value:r(o.value),rest:o.rest}}function u(o,r){let t=r.match(o);return t?{value:parseInt(t[0],10),rest:r.slice(t[0].length)}:null}function h(o,r){let t=r.match(o);if(!t)return null;if(t[0]==="Z")return{value:0,rest:r.slice(1)};let e=t[1]==="+"?1:-1,s=t[2]?parseInt(t[2],10):0,i=t[3]?parseInt(t[3],10):0,d=t[5]?parseInt(t[5],10):0;return{value:e*(s*_r+i*Mr+d*Or),rest:r.slice(t[0].length)}}function Q(o){return u(c.anyDigitsSigned,o)}function a(o,r){switch(o){case 1:return u(c.singleDigit,r);case 2:return u(c.twoDigits,r);case 3:return u(c.threeDigits,r);case 4:return u(c.fourDigits,r);default:return u(new RegExp("^\\d{1,"+o+"}"),r)}}function P(o,r){switch(o){case 1:return u(c.singleDigitSigned,r);case 2:return u(c.twoDigitsSigned,r);case 3:return u(c.threeDigitsSigned,r);case 4:return u(c.fourDigitsSigned,r);default:return u(new RegExp("^-?\\d{1,"+o+"}"),r)}}function T(o){switch(o){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function v(o,r){let t=r>0,e=t?r:1-r,s;if(e<=50)s=o||100;else{let i=e+50,d=Math.trunc(i/100)*100,y=o>=i%100;s=o+d-(y?100:0)}return t?s:1-s}function R(o){return o%400===0||o%4===0&&o%100!==0}var F=class extends n{priority=130;incompatibleTokens=["Y","R","u","w","I","i","e","c","t","T"];parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="yy"});switch(t){case"y":return p(a(4,r),s);case"yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e){let s=r.getFullYear();if(e.isTwoDigitYear){let d=v(e.year,s);return r.setFullYear(d,0,1),r.setHours(0,0,0,0),r}let i=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(i,0,1),r.setHours(0,0,0,0),r}};var W=class extends n{priority=130;parse(r,t,e){let s=i=>({year:i,isTwoDigitYear:t==="YY"});switch(t){case"Y":return p(a(4,r),s);case"Yo":return p(e.ordinalNumber(r,{unit:"year"}),s);default:return p(a(t.length,r),s)}}validate(r,t){return t.isTwoDigitYear||t.year>0}set(r,t,e,s){let i=Er(r,s);if(e.isTwoDigitYear){let y=v(e.year,i);return r.setFullYear(y,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}let d=!("era"in t)||t.era===1?e.year:1-e.year;return r.setFullYear(d,0,s.firstWeekContainsDate),r.setHours(0,0,0,0),M(r,s)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]};var C=class extends n{priority=130;parse(r,t){return t==="R"?P(4,r):P(t.length,r)}set(r,t,e){let s=l(r,0);return s.setFullYear(e,0,4),s.setHours(0,0,0,0),Y(s)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]};var B=class extends n{priority=130;parse(r,t){return t==="u"?P(4,r):P(t.length,r)}set(r,t,e){return r.setFullYear(e,0,1),r.setHours(0,0,0,0),r}incompatibleTokens=["G","y","Y","R","w","I","i","e","c","t","T"]};var G=class extends n{priority=120;parse(r,t,e){switch(t){case"Q":case"QQ":return a(t.length,r);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})||e.quarter(r,{width:"abbreviated",context:"formatting"})||e.quarter(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]};var X=class extends n{priority=120;parse(r,t,e){switch(t){case"q":case"qq":return a(t.length,r);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})||e.quarter(r,{width:"abbreviated",context:"standalone"})||e.quarter(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=1&&t<=4}set(r,t,e){return r.setMonth((e-1)*3,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]};var z=class extends n{incompatibleTokens=["Y","R","q","Q","L","w","I","D","i","e","c","t","T"];priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"M":return p(u(c.month,r),s);case"MM":return p(a(2,r),s);case"Mo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})||e.month(r,{width:"abbreviated",context:"formatting"})||e.month(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}};var A=class extends n{priority=110;parse(r,t,e){let s=i=>i-1;switch(t){case"L":return p(u(c.month,r),s);case"LL":return p(a(2,r),s);case"Lo":return p(e.ordinalNumber(r,{unit:"month"}),s);case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})||e.month(r,{width:"abbreviated",context:"standalone"})||e.month(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.setMonth(e,1),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]};function Wr(o,r,t){let e=w(o),s=Hr(e,t)-r;return e.setDate(e.getDate()-s*7),e}var V=class extends n{priority=100;parse(r,t,e){switch(t){case"w":return u(c.week,r);case"wo":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e,s){return M(Wr(r,e,s),s)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]};function Cr(o,r){let t=w(o),e=Ir(t)-r;return t.setDate(t.getDate()-e*7),t}var Z=class extends n{priority=100;parse(r,t,e){switch(t){case"I":return u(c.week,r);case"Io":return e.ordinalNumber(r,{unit:"week"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=53}set(r,t,e){return Y(Cr(r,e))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]};var Vr=[31,28,31,30,31,30,31,31,30,31,30,31],Zr=[31,29,31,30,31,30,31,31,30,31,30,31],K=class extends n{priority=90;subPriority=1;parse(r,t,e){switch(t){case"d":return u(c.date,r);case"do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear(),s=R(e),i=r.getMonth();return s?t>=1&&t<=Zr[i]:t>=1&&t<=Vr[i]}set(r,t,e){return r.setDate(e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","w","I","D","i","e","c","t","T"]};var $=class extends n{priority=90;subpriority=1;parse(r,t,e){switch(t){case"D":case"DD":return u(c.dayOfYear,r);case"Do":return e.ordinalNumber(r,{unit:"date"});default:return a(t.length,r)}}validate(r,t){let e=r.getFullYear();return R(e)?t>=1&&t<=366:t>=1&&t<=365}set(r,t,e){return r.setMonth(0,e),r.setHours(0,0,0,0),r}incompatibleTokens=["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]};function k(o,r,t){let e=O(),s=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??e.weekStartsOn??e.locale?.options?.weekStartsOn??0,i=w(o),d=i.getDay(),N=(r%7+7)%7,g=7-s,dr=r<0||r>6?r-(d+g)%7:(N+g)%7-(d+g)%7;return _(i,dr)}var j=class extends n{priority=90;parse(r,t,e){switch(t){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["D","i","e","c","t","T"]};var U=class extends n{priority=90;parse(r,t,e,s){let i=d=>{let y=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+y};switch(t){case"e":case"ee":return p(a(t.length,r),i);case"eo":return p(e.ordinalNumber(r,{unit:"day"}),i);case"eee":return e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeeee":return e.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"});case"eeee":default:return e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]};var J=class extends n{priority=90;parse(r,t,e,s){let i=d=>{let y=Math.floor((d-1)/7)*7;return(d+s.weekStartsOn+6)%7+y};switch(t){case"c":case"cc":return p(a(t.length,r),i);case"co":return p(e.ordinalNumber(r,{unit:"day"}),i);case"ccc":return e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"ccccc":return e.day(r,{width:"narrow",context:"standalone"});case"cccccc":return e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"});case"cccc":default:return e.day(r,{width:"wide",context:"standalone"})||e.day(r,{width:"abbreviated",context:"standalone"})||e.day(r,{width:"short",context:"standalone"})||e.day(r,{width:"narrow",context:"standalone"})}}validate(r,t){return t>=0&&t<=6}set(r,t,e,s){return r=k(r,e,s),r.setHours(0,0,0,0),r}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]};function Br(o,r){let t=w(o),e=Rr(t),s=r-e;return _(t,s)}var S=class extends n{priority=90;parse(r,t,e){let s=i=>i===0?7:i;switch(t){case"i":case"ii":return a(t.length,r);case"io":return e.ordinalNumber(r,{unit:"day"});case"iii":return p(e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiii":return p(e.day(r,{width:"narrow",context:"formatting"}),s);case"iiiiii":return p(e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s);case"iiii":default:return p(e.day(r,{width:"wide",context:"formatting"})||e.day(r,{width:"abbreviated",context:"formatting"})||e.day(r,{width:"short",context:"formatting"})||e.day(r,{width:"narrow",context:"formatting"}),s)}}validate(r,t){return t>=1&&t<=7}set(r,t,e){return r=Br(r,e),r.setHours(0,0,0,0),r}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]};var rr=class extends n{priority=80;parse(r,t,e){switch(t){case"a":case"aa":case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["b","B","H","k","t","T"]};var er=class extends n{priority=80;parse(r,t,e){switch(t){case"b":case"bb":case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","B","H","k","t","T"]};var tr=class extends n{priority=80;parse(r,t,e){switch(t){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})||e.dayPeriod(r,{width:"abbreviated",context:"formatting"})||e.dayPeriod(r,{width:"narrow",context:"formatting"})}}set(r,t,e){return r.setHours(T(e),0,0,0),r}incompatibleTokens=["a","b","t","T"]};var or=class extends n{priority=70;parse(r,t,e){switch(t){case"h":return u(c.hour12h,r);case"ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=12}set(r,t,e){let s=r.getHours()>=12;return s&&e<12?r.setHours(e+12,0,0,0):!s&&e===12?r.setHours(0,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["H","K","k","t","T"]};var sr=class extends n{priority=70;parse(r,t,e){switch(t){case"H":return u(c.hour23h,r);case"Ho":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=23}set(r,t,e){return r.setHours(e,0,0,0),r}incompatibleTokens=["a","b","h","K","k","t","T"]};var nr=class extends n{priority=70;parse(r,t,e){switch(t){case"K":return u(c.hour11h,r);case"Ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=11}set(r,t,e){return r.getHours()>=12&&e<12?r.setHours(e+12,0,0,0):r.setHours(e,0,0,0),r}incompatibleTokens=["h","H","k","t","T"]};var ir=class extends n{priority=70;parse(r,t,e){switch(t){case"k":return u(c.hour24h,r);case"ko":return e.ordinalNumber(r,{unit:"hour"});default:return a(t.length,r)}}validate(r,t){return t>=1&&t<=24}set(r,t,e){let s=e<=24?e%24:e;return r.setHours(s,0,0,0),r}incompatibleTokens=["a","b","h","H","K","t","T"]};var ar=class extends n{priority=60;parse(r,t,e){switch(t){case"m":return u(c.minute,r);case"mo":return e.ordinalNumber(r,{unit:"minute"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setMinutes(e,0,0),r}incompatibleTokens=["t","T"]};var ur=class extends n{priority=50;parse(r,t,e){switch(t){case"s":return u(c.second,r);case"so":return e.ordinalNumber(r,{unit:"second"});default:return a(t.length,r)}}validate(r,t){return t>=0&&t<=59}set(r,t,e){return r.setSeconds(e,0),r}incompatibleTokens=["t","T"]};var cr=class extends n{priority=30;parse(r,t){let e=s=>Math.trunc(s*Math.pow(10,-t.length+3));return p(a(t.length,r),e)}set(r,t,e){return r.setMilliseconds(e),r}incompatibleTokens=["t","T"]};var mr=class extends n{priority=10;parse(r,t){switch(t){case"X":return h(x.basicOptionalMinutes,r);case"XX":return h(x.basic,r);case"XXXX":return h(x.basicOptionalSeconds,r);case"XXXXX":return h(x.extendedOptionalSeconds,r);case"XXX":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:l(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","x"]};var pr=class extends n{priority=10;parse(r,t){switch(t){case"x":return h(x.basicOptionalMinutes,r);case"xx":return h(x.basic,r);case"xxxx":return h(x.basicOptionalSeconds,r);case"xxxxx":return h(x.extendedOptionalSeconds,r);case"xxx":default:return h(x.extended,r)}}set(r,t,e){return t.timestampIsSet?r:l(r,r.getTime()-I(r)-e)}incompatibleTokens=["t","T","X"]};var fr=class extends n{priority=40;parse(r){return Q(r)}set(r,t,e){return[l(r,e*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"};var lr=class extends n{priority=20;parse(r){return Q(r)}set(r,t,e){return[l(r,e),{timestampIsSet:!0}]}incompatibleTokens="*"};var Gr={G:new L,y:new F,Y:new W,R:new C,u:new B,Q:new G,q:new X,M:new z,L:new A,w:new V,I:new Z,d:new K,D:new $,E:new j,e:new U,c:new J,i:new S,a:new rr,b:new er,B:new tr,h:new or,H:new sr,K:new nr,k:new ir,m:new ar,s:new ur,S:new cr,X:new mr,x:new pr,t:new fr,T:new lr};var Kr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$r=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jr=/^'([^]*?)'?$/,Ur=/''/g,Jr=/\S/,Sr=/[a-zA-Z]/;function Xr(o,r,t,e){let s=vr(),i=e?.locale??s.locale??Yr,d=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??s.firstWeekContainsDate??s.locale?.options?.firstWeekContainsDate??1,y=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??s.weekStartsOn??s.locale?.options?.weekStartsOn??0;if(r==="")return o===""?w(t):l(t,NaN);let N={firstWeekContainsDate:d,weekStartsOn:y,locale:i},g=[new q],dr=r.match($r).map(m=>{let f=m[0];if(f in hr){let b=hr[f];return b(m,i.formatLong)}return m}).join("").match(Kr),wr=[];for(let m of dr){!e?.useAdditionalWeekYearTokens&&Lr(m)&&yr(m,r,o),!e?.useAdditionalDayOfYearTokens&&qr(m)&&yr(m,r,o);let f=m[0],b=Gr[f];if(b){let{incompatibleTokens:gr}=b;if(Array.isArray(gr)){let Dr=wr.find(Pr=>gr.includes(Pr.token)||Pr.token===f);if(Dr)throw new RangeError(`The format string mustn't contain \`${Dr.fullToken}\` and \`${m}\` at the same time`)}else if(b.incompatibleTokens==="*"&&wr.length>0)throw new RangeError(`The format string mustn't contain \`${m}\` and any other token at the same time`);wr.push({token:f,fullToken:m});let xr=b.run(o,m,i.match,N);if(!xr)return l(t,NaN);g.push(xr.setter),o=xr.rest}else{if(f.match(Sr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");if(m==="''"?m="'":f==="'"&&(m=re(m)),o.indexOf(m)===0)o=o.slice(m.length);else return l(t,NaN)}}if(o.length>0&&Jr.test(o))return l(t,NaN);let zr=g.map(m=>m.priority).sort((m,f)=>f-m).filter((m,f,b)=>b.indexOf(m)===f).map(m=>g.filter(f=>f.priority===m).sort((f,b)=>b.subPriority-f.subPriority)).map(m=>m[0]),D=w(t);if(isNaN(D.getTime()))return l(t,NaN);let br={};for(let m of zr){if(!m.validate(D,N))return l(t,NaN);let f=m.set(D,br,N);Array.isArray(f)?(D=f[0],Object.assign(br,f[1])):D=f}return l(t,D)}function re(o){return o.match(jr)[1].replace(Ur,"'")}var vs=(()=>{let r=class r extends Nr{parse(e){let s=e?Xr(e,"dd.MM.yyyy",new Date):null;return s?{year:s.getFullYear(),month:s.getMonth(),day:s.getDay()}:null}format(e){return e?Qr(new Date(e.year,e.month-1,e.day),"dd.MM.yyyy"):""}};r.\u0275fac=(()=>{let e;return function(i){return(e||(e=kr(r)))(i||r)}})(),r.\u0275prov=Tr({token:r,factory:r.\u0275fac});let o=r;return o})();export{vs as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-67IXHFR4.js b/public/apps/webapp-schulverwaltung/chunk-KDAC4GJ5.js similarity index 90% rename from public/apps/webapp-schulverwaltung/chunk-67IXHFR4.js rename to public/apps/webapp-schulverwaltung/chunk-KDAC4GJ5.js index 8fec49aa..5b523d7f 100644 --- a/public/apps/webapp-schulverwaltung/chunk-67IXHFR4.js +++ b/public/apps/webapp-schulverwaltung/chunk-KDAC4GJ5.js @@ -1 +1 @@ -import{a as G}from"./chunk-WN7VWSJW.js";import{b as M,f as u}from"./chunk-33NXTXD7.js";import{Ac as p,Bc as A,C as V,Cc as h,Dd as s,Ec as U,Fc as l,Gc as o,Kc as S,L as I,Lc as $,N as C,Nc as v,O as n,R as O,Rc as d,W as g,Wc as F,Z as f,e as T,ec as j,m as a,wc as P,xc as R,yc as m,zc as x}from"./chunk-T7QWSMKM.js";function K(e){var i=Object.create(Object.getPrototypeOf(e));return Object.assign(i,e),i}function _(e,i,c){c===void 0&&(c=e.name);var t=K(e);return t.validate=i,t.decode=function(r){return i(r,$(t))},t.name=c,t}function y(e,i,c){return c===void 0&&(c="withFallback("+e.name+")"),_(e,function(t,r){return P(function(){return m(i)})(e.validate(t,r))},c)}var z=o({Key:p,Value:p}),D=o({Id:p,Settings:S(l(z))}),b=d.pipe(o({mail:y(h,!1),gui:y(h,!1),phoneMobile:y(h,!1)})),E=new x("NotificationTypesInactive",e=>Array.isArray(e)&&e.every(i=>typeof i=="string"),(e,i)=>typeof e=="string"?m(e.split(";").filter(Boolean)):R(e,i),e=>e.join(";")),Q=function(e){return e.Grid="grid",e.List="list",e}(Q||{}),w=d.pipe(o({presenceControl:U({grid:null,list:null})})),X=o({eventId:v(A),group:v(G.props.Key)}),N=d.pipe(S(l(X))),Y=o({AccessInfo:o({Roles:l(p),Permissions:l(p)})});var L=(()=>{let i=class i extends M{constructor(t,r){super(t,r,D,"UserSettings")}getUserSettingsCst(t){return this.http.get(`${this.baseUrl}/Cst`,{params:t}).pipe(n(s(this.codec)))}updateUserSettingsCst(t){return this.http.patch(`${this.baseUrl}/Cst`,t)}getAccessInfo(){return this.http.get(`${this.baseUrl}/?expand=AccessInfo`).pipe(n(s(Y)),a(({AccessInfo:t})=>t))}};i.\u0275fac=function(r){return new(r||i)(f(j),f(F))},i.\u0275prov=g({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();var et=100,H="presenceControlViewMode",W="presenceControlGroupView",B="notification",J="notificationTypesInactive",bt=(()=>{let i=class i{constructor(t){this.settingsRestService=t,this.refetch$=new T,this.settings$=this.refetch$.pipe(C(null),V(et),n(()=>this.settingsRestService.getUserSettingsCst()),a(r=>r.Settings),I(1)),this.accessInfo$=this.settingsRestService.getAccessInfo().pipe(I(1))}refetch(){this.refetch$.next()}getSetting(t){return this.settings$.pipe(a(r=>r.find(q=>q.Key===t)?.Value??null))}saveSetting(t,r){return this.settingsRestService.updateUserSettingsCst(this.buildSettings(t,r)).pipe(O(()=>this.refetch$.next()))}getPresenceControlViewMode(){return this.getSetting(H).pipe(u('{"presenceControl":"grid"}'),n(s(w)),a(({presenceControl:t})=>t))}savePresenceControlViewMode(t){return this.saveSetting(H,w.encode({presenceControl:t}))}getPresenceControlGroupView(){return this.getSetting(W).pipe(u("[]"),n(s(N)))}savePresenceControlGroupView(t){return this.saveSetting(W,N.encode(t))}getNotificationChannels(){return this.getSetting(B).pipe(u("{}"),n(s(b)))}saveNotificationChannels(t){return this.saveSetting(B,b.encode(t))}getNotificationTypesInactive(){return this.getSetting(J).pipe(u(""),n(s(E)))}saveNotificationTypesInactive(t){return this.saveSetting(J,E.encode(t))}getRolesAndPermissions(){return this.accessInfo$.pipe(a(({Roles:t,Permissions:r})=>[...t,...r]),C(null))}buildSettings(t,r){return{Id:"Cst",Settings:[{Key:t,Value:r}]}}};i.\u0275fac=function(r){return new(r||i)(f(L))},i.\u0275prov=g({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();export{Q as a,bt as b}; +import{a as G}from"./chunk-HII3S2DL.js";import{b as M,f as u}from"./chunk-SOHFFTKU.js";import{Ac as A,Bc as h,C as V,Cd as s,Dc as U,Ec as l,Fc as o,Jc as S,Kc as $,L as I,Mc as v,N as C,O as n,Qc as d,R as O,Vc as F,W as g,Z as f,dc as j,e as T,m as a,vc as P,wc as R,xc as m,yc as x,zc as p}from"./chunk-XTHSYQMN.js";function K(e){var i=Object.create(Object.getPrototypeOf(e));return Object.assign(i,e),i}function _(e,i,c){c===void 0&&(c=e.name);var t=K(e);return t.validate=i,t.decode=function(r){return i(r,$(t))},t.name=c,t}function y(e,i,c){return c===void 0&&(c="withFallback("+e.name+")"),_(e,function(t,r){return P(function(){return m(i)})(e.validate(t,r))},c)}var z=o({Key:p,Value:p}),D=o({Id:p,Settings:S(l(z))}),b=d.pipe(o({mail:y(h,!1),gui:y(h,!1),phoneMobile:y(h,!1)})),E=new x("NotificationTypesInactive",e=>Array.isArray(e)&&e.every(i=>typeof i=="string"),(e,i)=>typeof e=="string"?m(e.split(";").filter(Boolean)):R(e,i),e=>e.join(";")),Q=function(e){return e.Grid="grid",e.List="list",e}(Q||{}),w=d.pipe(o({presenceControl:U({grid:null,list:null})})),X=o({eventId:v(A),group:v(G.props.Key)}),N=d.pipe(S(l(X))),Y=o({AccessInfo:o({Roles:l(p),Permissions:l(p)})});var L=(()=>{let i=class i extends M{constructor(t,r){super(t,r,D,"UserSettings")}getUserSettingsCst(t){return this.http.get(`${this.baseUrl}/Cst`,{params:t}).pipe(n(s(this.codec)))}updateUserSettingsCst(t){return this.http.patch(`${this.baseUrl}/Cst`,t)}getAccessInfo(){return this.http.get(`${this.baseUrl}/?expand=AccessInfo`).pipe(n(s(Y)),a(({AccessInfo:t})=>t))}};i.\u0275fac=function(r){return new(r||i)(f(j),f(F))},i.\u0275prov=g({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();var et=100,H="presenceControlViewMode",W="presenceControlGroupView",B="notification",J="notificationTypesInactive",bt=(()=>{let i=class i{constructor(t){this.settingsRestService=t,this.refetch$=new T,this.settings$=this.refetch$.pipe(C(null),V(et),n(()=>this.settingsRestService.getUserSettingsCst()),a(r=>r.Settings),I(1)),this.accessInfo$=this.settingsRestService.getAccessInfo().pipe(I(1))}refetch(){this.refetch$.next()}getSetting(t){return this.settings$.pipe(a(r=>r.find(q=>q.Key===t)?.Value??null))}saveSetting(t,r){return this.settingsRestService.updateUserSettingsCst(this.buildSettings(t,r)).pipe(O(()=>this.refetch$.next()))}getPresenceControlViewMode(){return this.getSetting(H).pipe(u('{"presenceControl":"grid"}'),n(s(w)),a(({presenceControl:t})=>t))}savePresenceControlViewMode(t){return this.saveSetting(H,w.encode({presenceControl:t}))}getPresenceControlGroupView(){return this.getSetting(W).pipe(u("[]"),n(s(N)))}savePresenceControlGroupView(t){return this.saveSetting(W,N.encode(t))}getNotificationChannels(){return this.getSetting(B).pipe(u("{}"),n(s(b)))}saveNotificationChannels(t){return this.saveSetting(B,b.encode(t))}getNotificationTypesInactive(){return this.getSetting(J).pipe(u(""),n(s(E)))}saveNotificationTypesInactive(t){return this.saveSetting(J,E.encode(t))}getRolesAndPermissions(){return this.accessInfo$.pipe(a(({Roles:t,Permissions:r})=>[...t,...r]),C(null))}buildSettings(t,r){return{Id:"Cst",Settings:[{Key:t,Value:r}]}}};i.\u0275fac=function(r){return new(r||i)(f(L))},i.\u0275prov=g({token:i,factory:i.\u0275fac,providedIn:"root"});let e=i;return e})();export{Q as a,bt as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-TIZKDD7Y.js b/public/apps/webapp-schulverwaltung/chunk-KNS2BM7M.js similarity index 96% rename from public/apps/webapp-schulverwaltung/chunk-TIZKDD7Y.js rename to public/apps/webapp-schulverwaltung/chunk-KNS2BM7M.js index 9d006317..1b28522b 100644 --- a/public/apps/webapp-schulverwaltung/chunk-TIZKDD7Y.js +++ b/public/apps/webapp-schulverwaltung/chunk-KNS2BM7M.js @@ -1,2 +1,2 @@ -import{a as Kt}from"./chunk-QR6JUXUH.js";import{a as qt,b as Ut}from"./chunk-DXYHDL5D.js";import{a as Gt}from"./chunk-TK3HGFHH.js";import{a as Vt}from"./chunk-TNMAZX5O.js";import{a as Wt}from"./chunk-2IXEFCAH.js";import{c as je,d as Oe}from"./chunk-X2BR3YJG.js";import{b as jt,d as Nt}from"./chunk-LO5XSJLW.js";import"./chunk-DMYOU5OM.js";import"./chunk-RWNJF4OZ.js";import{A as Ce,B as Qe,L as Rt,M as $t,N as Ft,P as fe,T as Y,U as ue,V as Et,W as Pt,X as Bt,Y as Ht,c as Tt,j as Mt,t as Se,u as Lt,x as Be}from"./chunk-GI4AZI25.js";import{a as kt,e as _e}from"./chunk-Q5U6YZUT.js";import{a as Dt,b as Ot}from"./chunk-N6FFLIGM.js";import{a as z,c as wt}from"./chunk-33NXTXD7.js";import{a as gt,b as yt,c as vt,d as ht,e as St,f as Ct,g as It,j as xt,u as te,w as At}from"./chunk-FTRAQKUW.js";import{a as le}from"./chunk-3AROKYRB.js";import{$ as x,$a as y,$c as bt,Ad as de,Bb as a,Cb as m,Da as xe,Db as F,E as B,Fb as he,Ga as b,Gd as me,Hd as D,I as Xe,Ia as l,Id as w,Ja as re,Jd as V,K as Je,L as j,La as it,Mc as Ke,N as Ze,Nb as lt,O as R,Q as et,Rb as Ae,Sa as c,Sb as ae,Ta as d,Tb as K,Ua as S,Va as k,Vc as _t,W as se,Wa as T,Wb as Q,Wc as H,Xb as mt,Ya as X,Z as O,Zc as Me,_a as h,a as qe,ac as ft,ad as Le,bd as Re,e as Ie,f as Ue,fb as st,fd as $e,g as We,gb as rt,ha as E,hb as ot,hd as Fe,ia as P,ib as A,jb as f,jd as Ee,k as q,kb as $,kd as Pe,la as tt,lb as g,m as v,mb as J,n as C,pb as at,pc as ut,qb as ct,qc as ke,ra as nt,rb as pt,rc as ce,rd as pe,sb as oe,sc as Te,sd as De,tb as M,td as we,ua as o,ub as Z,ud as ee,va as _,vb as W,w as U,xb as dt}from"./chunk-T7QWSMKM.js";var He=(()=>{let i=class i{constructor(e,n,s,p,u,L,I,G){this.fb=e,this.router=n,this.toastService=s,this.translate=p,this.presenceTypesService=u,this.updateService=L,this.storageService=I,this.settings=G,this.formGroup=this.createFormGroup(),this.saving$=new Ue(!1),this.submitted$=new Ue(!1),this.absenceTypes$=C([this.getConfirmationTypes(),this.getHalfDayType()]).pipe(v(([ne,ie])=>ie?[...ne,ie]:ne)),this.absenceTypeIdErrors$=kt(q(this.formGroup),this.submitted$,"absenceTypeId"),this.destroy$=new Ie}ngOnInit(){this.selectedLessonIds$.pipe(B(1),U(Pt)).subscribe(()=>this.navigateBack())}ngOnDestroy(){this.destroy$.next()}onSubmit(){if(this.submitted$.next(!0),this.formGroup.valid){let{absenceTypeId:e}=this.formGroup.value;this.save(e)}}cancel(){this.navigateBack()}getSelectedCount(){return this.selectedLessonIds$.pipe(v(e=>e.length))}getConfirmationTypes(){return this.presenceTypesService.confirmationTypes$.pipe(v(e=>e.filter(n=>n.IsAbsence&&n.Id!==this.settings.halfDayPresenceTypeId)))}getHalfDayType(){return q(null)}createFormGroup(){return this.fb.group({absenceTypeId:[null,bt.required]})}save(e){this.saving$.next(!0),this.selectedLessonIds$.pipe(B(1),R(n=>this.updateService.editLessonPresences(n,[Number(this.storageService.getPayload()?.id_person)],e)),Xe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-absences.confirm.save-success")),this.navigateBack()}};i.\u0275fac=function(n){return new(n||i)(_(pe),_(ce),_(le),_(me),_(Y),_(ue),_(V),_(_t))},i.\u0275cmp=x({type:i,selectors:[["ng-component"]],decls:0,vars:0,template:function(n,s){},encapsulation:2});let t=i;return t})();var ge=(()=>{let i=class i{constructor(e,n,s){this.settings=e,this.storageService=n,this.studentsService=s,this.studentId$=new We(1),this.lessonAbsences$=this.studentId$.pipe(R(this.loadLessonAbsences.bind(this)),j(1)),this.lessonIncidents$=this.studentId$.pipe(R(this.loadLessonIncidents.bind(this)),j(1)),this.lessonPresences$=this.getLessonPresences(),this.checkableAbsences$=this.getAbsences(this.settings.checkableAbsenceStateId),this.openAbsences$=this.getAbsences(this.settings.unconfirmedAbsenceStateId),this.excusedAbsences$=this.getAbsences(this.settings.excusedAbsenceStateId),this.unexcusedAbsences$=this.getAbsences(this.settings.unexcusedAbsenceStateId),this.incidents$=this.getAbsences(null),this.openLessonAbsences$=C([this.openAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.checkableLessonAbsences$=C([this.checkableAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.excusedLessonAbsences$=C([this.excusedAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.unexcusedLessonAbsences$=C([this.unexcusedAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.incidentsLessonAbsences$=C([this.incidents$.pipe(U(te)),this.lessonIncidents$]).pipe(v(_e(this.getLessonIncidents.bind(this))),j(1)),this.counts$=this.getCounts();let p=this.storageService.getPayload()?.id_person;p&&this.studentId$.next(Number(p))}reset(){this.studentId$.pipe(B(1)).subscribe(e=>this.studentId$.next(e))}getLessonPresences(){return this.getCached(C([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(R(([e,n,s])=>this.loadTimetableEntries(e,n,s).pipe(v(p=>this.buildLessonPresences(n,s,p)))),v(Ft)))}getAbsences(e){return this.getCached(this.lessonPresences$.pipe(v(n=>n?.filter(s=>s.ConfirmationStateId===e)||null)))}getLessonAbsences(e,n){let s=e.map(p=>p.LessonRef.Id);return n.filter(p=>s.includes(p.LessonRef.Id))}getLessonIncidents(e,n){let s=e.map(p=>p.LessonRef.Id);return n.filter(p=>s.includes(p.LessonRef.Id))}getCounts(){return C([this.getCount(this.checkableAbsences$),this.getCount(this.openAbsences$),this.getCount(this.excusedAbsences$),this.getCount(this.unexcusedAbsences$),this.getCount(this.incidents$)]).pipe(v(([e,n,s,p,u])=>({checkableAbsences:e,openAbsences:n,excusedAbsences:s,unexcusedAbsences:p,incidents:u,halfDays:null})))}getCached(e){return e.pipe(Ze(null),Je({connector:()=>new We(1)}))}getCount(e){return e.pipe(v(n=>n?.length??null))}loadLessonAbsences(e){return this.studentsService.getLessonAbsences(e)}loadLessonIncidents(e){return this.studentsService.getLessonIncidents(e)}loadTimetableEntries(e,n,s){return this.studentsService.getTimetableEntries(e,{"filter.Id":`;${[...n,...s].map(p=>p.LessonRef.Id).join(";")}`})}buildLessonPresences(e,n,s){return[...e,...n].map(p=>this.buildLessonPresence(p,s)).filter(te)}buildLessonPresence(e,n){let s=n.find(p=>p.Id===e.LessonRef.Id);return s?{Id:"",LessonRef:{Id:e.LessonRef.Id,HRef:e.LessonRef.HRef?e.LessonRef.HRef:null},StudentRef:e.StudentRef,EventRef:{Id:0,HRef:null},TypeRef:e.TypeRef,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:"ConfirmationStateId"in e?e.ConfirmationStateId:null,EventDesignation:s.EventDesignation,HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:s.From,LessonDateTimeTo:s.To,Comment:null,Date:s.From,Type:e.Type,StudentFullName:e.StudentFullName,StudyClassNumber:"",TeacherInformation:s.EventManagerInformation}:null}};i.\u0275fac=function(n){return new(n||i)(O(H),O(V),O(je))},i.\u0275prov=se({token:i,factory:i.\u0275fac});let t=i;return t})();var fn=t=>({count:t}),un=t=>({"border-top pt-3":t});function _n(t,i){if(t&1&&(c(0,"div",11),f(1),a(2,"translate"),d()),t&2){let r=i.bkdLet;o(),g(" ",F(2,1,r===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",W(4,fn,r))," ")}}function bn(t,i){if(t&1&&(c(0,"div",17),f(1),a(2,"translate"),d()),t&2){let r=i.$implicit;o(),g(" ",F(2,1,"global.validation-errors."+r.error,r.params)," ")}}function gn(t,i){if(t&1&&(k(0),b(1,bn,3,4,"div",16),a(2,"async"),T()),t&2){let r=y(2);o(),l("ngForOf",m(2,1,r.absenceTypeIdErrors$))}}function yn(t,i){if(t&1&&(c(0,"div",12),S(1,"input",13),a(2,"async"),c(3,"label",14),f(4),d(),b(5,gn,3,3,"ng-container",15),a(6,"async"),d()),t&2){let r,e,n=i.$implicit,s=i.index,p=y();l("ngClass",W(12,un,n.IsHalfDay)),o(),re("is-invalid",((r=(r=m(2,8,p.absenceTypeIdErrors$))==null?null:r.length)!==null&&r!==void 0?r:0)>0),l("id","absence-type-"+s)("value",n.Id),o(2),l("for","absence-type-"+s),o(),g(" ",n.Designation," "),o(),l("ngIf",((e=(e=m(6,10,p.absenceTypes$))==null?null:e.length)!==null&&e!==void 0?e:0)-1===s)}}function vn(t,i){t&1&&(c(0,"div",18)(1,"span",19),f(2,"Loading..."),d()())}var Jt=(()=>{let i=class i extends He{constructor(e,n,s,p,u,L,I,G,ne,ie){super(e,n,s,p,u,L,I,G),this.myAbsencesService=ne,this.selectionService=ie,this.titleKey="my-absences.confirm.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(v(Ve=>de(ee(Ve.map(Ge=>Ge.lessonIds))))),this.confirmationStateId=this.settings.unconfirmedAbsencesRefreshTime}onSaveSuccess(){this.selectionService.clear(),this.myAbsencesService.reset(),super.onSaveSuccess()}navigateBack(){this.router.navigate(["/my-absences"])}};i.\u0275fac=function(n){return new(n||i)(_(pe),_(ce),_(le),_(me),_(Y),_(ue),_(V),_(H),_(ge),_(fe))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-confirm"]],standalone:!0,features:[xe,M],decls:28,vars:35,consts:[[1,"bkd-container","bkd-container-limited"],["class","mb-3 pb-3 border-bottom",4,"bkdLet"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],["class","form-check my-3",3,"ngClass",4,"ngFor","ngForOf"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"mb-3","pb-3","border-bottom"],[1,"form-check","my-3",3,"ngClass"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[4,"ngIf"],["class","invalid-feedback mt-4",4,"ngFor","ngForOf"],[1,"invalid-feedback","mt-4"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h1"),f(2),a(3,"translate"),d(),b(4,_n,3,6,"div",1),a(5,"async"),c(6,"form",2),h("ngSubmit",function(){return s.onSubmit()}),c(7,"div",3)(8,"label",4),f(9),a(10,"translate"),a(11,"addSpace"),d(),b(12,yn,7,14,"div",5),a(13,"async"),d(),c(14,"div",6),f(15),a(16,"translate"),d(),c(17,"div",7)(18,"button",8),a(19,"async"),h("click",function(){return s.cancel()}),f(20),a(21,"translate"),d(),c(22,"button",9),a(23,"async"),f(24),a(25,"translate"),b(26,vn,3,0,"div",10),a(27,"async"),d()()()()),n&2&&(o(2),$(m(3,12,s.titleKey)),o(2),l("bkdLet",m(5,14,s.getSelectedCount())),o(2),l("formGroup",s.formGroup),o(3),J("",m(10,16,"my-absences.confirm.choose-presence-type"),"",F(11,18,":",":"),""),o(3),l("ngForOf",m(13,21,s.absenceTypes$)),o(3),g(" ",m(16,23,"my-absences.confirm.remark")," "),o(3),l("disabled",m(19,25,s.saving$)),o(2),g(" ",m(21,27,"my-absences.confirm.cancel")," "),o(2),l("disabled",m(23,29,s.saving$)),o(2),g(" ",m(25,31,"my-absences.confirm.save")," "),o(2),l("ngIf",m(27,33,s.saving$)))},dependencies:[z,De,$e,Me,Fe,Le,Re,we,Ee,Pe,ae,Ae,K,Q,w,D,Oe],changeDetection:0});let t=i;return t})();var ye=(()=>{let i=class i extends Ut{get preventAbsencesAfterStart(){if(this._preventAbsencesAfterStart==null){let e=this.storageService.getPayload()?.instance_id,n=this.settings.preventStudentAbsenceAfterLessonStart;this._preventAbsencesAfterStart=e?n.includes(e):!1}return this._preventAbsencesAfterStart}constructor(e,n,s,p,u,L){super(e,n,L,s,"/my-absences/report"),this.studentsService=p,this.storageService=u}getInitialFilter(){return{dateFrom:null,dateTo:null}}isValidFilter(e){return!!(e.dateFrom||e.dateTo)}loadEntries(e,n,s){let p=this.buildRequestParamsFromFilter(e).set("sort","From.asc");return this.loadingService.load(this.loadTimetableEntries(p).pipe(v(u=>this.filterAbsencesAfterLessonStart(u)),R(u=>C([q(u),this.loadLessonAbsences(u),this.loadLessonDispensations(u)])),v(([u,L,I])=>this.buildLessonPresences(u,L,I)),v(u=>({offset:0,total:u.length,entries:u}))),qt)}filterAbsencesAfterLessonStart(e){return this.preventAbsencesAfterStart?e.filter(n=>n.From.getTime()>=new Date().getTime()):e}buildParamsFromFilter(e){let{dateFrom:n,dateTo:s}=e,p={};return n&&(p.dateFrom=Se(n,"yyyy-MM-dd")),s&&(p.dateTo=Se(s,"yyyy-MM-dd")),p}buildRequestParamsFromFilter(e){let n=new ft;return e.dateFrom&&(n=n.set("filter.From",`>${Se(Lt(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(n=n.set("filter.To",`<${Se(Tt(e.dateTo,1),"yyyy-MM-dd")}`)),n}get studentId(){let e=this.storageService.getPayload()?.id_person;if(e==null)throw new Error("No student id available");return Number(e)}loadTimetableEntries(e){return this.studentsService.getTimetableEntries(this.studentId,e)}loadLessonAbsences(e){return e.length>0?this.studentsService.getLessonAbsences(this.studentId,{"filter.Id":`;${e.map(n=>n.Id).join(";")}`}):q([])}loadLessonDispensations(e){return e.length>0?this.studentsService.getLessonDispensations(this.studentId,{"filter.Id":`;${e.map(n=>n.Id).join(";")}`}):q([])}buildLessonPresences(e,n,s){return e.map(p=>this.buildLessonPresence(p,n,s))}buildLessonPresence(e,n,s){let p=n.find(I=>I.LessonRef.Id===e.Id),u=s.find(I=>I.LessonRef.Id===e.Id),L=this.buildLessonPresenceTypeRef(p,u);return{Id:"",LessonRef:{Id:e.Id,HRef:null},StudentRef:(p||u)?.StudentRef||{Id:this.studentId,HRef:null},EventRef:{Id:0,HRef:null},TypeRef:L,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:p?.ConfirmationStateId||u&&this.settings.excusedAbsenceStateId||null,EventDesignation:e.EventDesignation||"",HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:e.From||new Date,LessonDateTimeTo:e.To||new Date,Comment:null,Date:e.From||new Date,Type:(p||u)?.Type||null,StudentFullName:(p||u)?.StudentFullName||"",StudyClassNumber:"",TeacherInformation:e.EventManagerInformation}}buildLessonPresenceTypeRef(e,n){return e?qe({},e.TypeRef):n?qe({},n.TypeRef):{Id:null,HRef:null}}};i.\u0275fac=function(n){return new(n||i)(O(lt),O(Ot),O(H),O(je),O(V),O(Wt))},i.\u0275prov=se({token:i,factory:i.\u0275fac});let t=i;return t})();var ve=(()=>{let i=class i extends Rt{constructor(){super(...arguments),this.selectedIds$=this.selection$.pipe(v($t))}};i.\u0275fac=(()=>{let e;return function(s){return(e||(e=tt(i)))(s||i)}})(),i.\u0275prov=se({token:i,factory:i.\u0275fac});let t=i;return t})();var hn=t=>({count:t}),Sn=t=>({"border-top pt-3":t});function Cn(t,i){if(t&1&&(c(0,"div",11),f(1),a(2,"translate"),d()),t&2){let r=i.bkdLet;o(),g(" ",F(2,1,r===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",W(4,hn,r))," ")}}function In(t,i){if(t&1&&(c(0,"div",17),f(1),a(2,"translate"),d()),t&2){let r=i.$implicit;o(),g(" ",F(2,1,"global.validation-errors."+r.error,r.params)," ")}}function xn(t,i){if(t&1&&(k(0),b(1,In,3,4,"div",16),a(2,"async"),T()),t&2){let r=y(2);o(),l("ngForOf",m(2,1,r.absenceTypeIdErrors$))}}function An(t,i){if(t&1&&(c(0,"div",12),S(1,"input",13),a(2,"async"),c(3,"label",14),f(4),d(),b(5,xn,3,3,"ng-container",15),a(6,"async"),d()),t&2){let r,e,n=i.$implicit,s=i.index,p=y();l("ngClass",W(12,Sn,n.IsHalfDay)),o(),re("is-invalid",((r=(r=m(2,8,p.absenceTypeIdErrors$))==null?null:r.length)!==null&&r!==void 0?r:0)>0),l("id","absence-type-"+s)("value",n.Id),o(2),l("for","absence-type-"+s),o(),g(" ",n.Designation," "),o(),l("ngIf",((e=(e=m(6,10,p.absenceTypes$))==null?null:e.length)!==null&&e!==void 0?e:0)-1===s)}}function kn(t,i){t&1&&(c(0,"div",18)(1,"span",19),f(2,"Loading..."),d()())}var tn=(()=>{let i=class i extends He{constructor(e,n,s,p,u,L,I,G,ne,ie){super(e,n,s,p,u,L,I,G),this.state=ne,this.selectionService=ie,this.titleKey="my-absences.report.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(v(Ve=>de(ee(Ve.map(Ge=>Ge.lessonIds))))),this.confirmationStateId=this.settings.checkableAbsenceStateId}getHalfDayType(){return this.presenceTypesService.getPresenceType(this.settings.halfDayPresenceTypeId).pipe(v(e=>e.Active?e:null))}onSaveSuccess(){this.selectionService.clear(),this.state.resetEntries(),super.onSaveSuccess()}navigateBack(){this.state.queryParams$.pipe(B(1)).subscribe(e=>{this.router.navigate(["/my-absences/report"],{queryParams:e})})}};i.\u0275fac=function(n){return new(n||i)(_(pe),_(ce),_(le),_(me),_(Y),_(ue),_(V),_(H),_(ye),_(ve))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-confirm"]],standalone:!0,features:[xe,M],decls:28,vars:35,consts:[[1,"bkd-container","bkd-container-limited"],["class","mb-3 pb-3 border-bottom",4,"bkdLet"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],["class","form-check my-3",3,"ngClass",4,"ngFor","ngForOf"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"mb-3","pb-3","border-bottom"],[1,"form-check","my-3",3,"ngClass"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[4,"ngIf"],["class","invalid-feedback mt-4",4,"ngFor","ngForOf"],[1,"invalid-feedback","mt-4"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h1"),f(2),a(3,"translate"),d(),b(4,Cn,3,6,"div",1),a(5,"async"),c(6,"form",2),h("ngSubmit",function(){return s.onSubmit()}),c(7,"div",3)(8,"label",4),f(9),a(10,"translate"),a(11,"addSpace"),d(),b(12,An,7,14,"div",5),a(13,"async"),d(),c(14,"div",6),f(15),a(16,"translate"),d(),c(17,"div",7)(18,"button",8),a(19,"async"),h("click",function(){return s.cancel()}),f(20),a(21,"translate"),d(),c(22,"button",9),a(23,"async"),f(24),a(25,"translate"),b(26,kn,3,0,"div",10),a(27,"async"),d()()()()),n&2&&(o(2),$(m(3,12,s.titleKey)),o(2),l("bkdLet",m(5,14,s.getSelectedCount())),o(2),l("formGroup",s.formGroup),o(3),J("",m(10,16,"my-absences.confirm.choose-presence-type"),"",F(11,18,":",":"),""),o(3),l("ngForOf",m(13,21,s.absenceTypes$)),o(3),g(" ",m(16,23,"my-absences.confirm.remark")," "),o(3),l("disabled",m(19,25,s.saving$)),o(2),g(" ",m(21,27,"my-absences.confirm.cancel")," "),o(2),l("disabled",m(23,29,s.saving$)),o(2),g(" ",m(25,31,"my-absences.confirm.save")," "),o(2),l("ngIf",m(27,33,s.saving$)))},dependencies:[z,De,$e,Me,Fe,Le,Re,we,Ee,Pe,ae,Ae,K,Q,w,D,Oe],changeDetection:0});let t=i;return t})();var Tn=()=>["/my-absences"],sn=(()=>{let i=class i{constructor(){this.filter={dateFrom:null,dateTo:null},this.filterChange=new nt,this.minDate={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate()}}updateDateFrom(e){this.filter.dateFrom=e,e&&(this.filter.dateTo=e)}show(){this.filterChange.emit({dateFrom:nn(this.filter.dateFrom),dateTo:nn(this.filter.dateTo)})}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[oe([{provide:Ct,useClass:xt},{provide:It,useClass:Vt}]),M],decls:19,vars:18,consts:[[3,"link"],[1,"filters"],[1,"form-group"],[1,"form-label"],[3,"valueChange","minDate","value"],[1,"buttons"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(n,s){n&1&&(S(0,"bkd-backlink",0),c(1,"h1"),f(2),a(3,"translate"),d(),c(4,"div",1)(5,"div",2)(6,"label",3),f(7),a(8,"translate"),d(),c(9,"bkd-date-select",4),h("valueChange",function(u){return s.updateDateFrom(u)}),d()(),c(10,"div",2)(11,"label",3),f(12),a(13,"translate"),d(),c(14,"bkd-date-select",4),pt("valueChange",function(u){return ct(s.filter.dateTo,u)||(s.filter.dateTo=u),u}),d()(),c(15,"div",5)(16,"button",6),h("click",function(){return s.show()}),f(17),a(18,"translate"),d()()()),n&2&&(l("link",Z(17,Tn)),o(2),$(m(3,9,"my-absences.report.title")),o(5),$(m(8,11,"my-absences.report.header.date-from")),o(2),l("minDate",s.minDate)("value",s.filter.dateFrom),o(3),$(m(13,13,"my-absences.report.header.date-to")),o(2),l("minDate",s.minDate),at("value",s.filter.dateTo),o(3),g(" ",m(18,15,"my-absences.report.header.show")," "))},dependencies:[Ht,Kt,w,D],styles:["[_nghost-%COMP%]{display:block;padding-bottom:1rem;border-bottom:1px solid #dee2e6}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.form-group[_ngcontent-%COMP%]{flex:1;min-width:20rem;max-width:40rem;margin-right:1rem;margin-bottom:.5rem}.buttons[_ngcontent-%COMP%]{flex:none;margin-top:1.625rem;margin-right:0}@media (max-width: 575.98px){[_nghost-%COMP%]{padding-bottom:0}.buttons[_ngcontent-%COMP%]{width:100%;margin-top:1rem;margin-bottom:1rem}}"],changeDetection:0});let t=i;return t})();function nn(t){return t?Mt(t):null}var Mn=(t,i,r)=>({selection:t,entries:i,loadingPage:r});function Ln(t,i){if(t&1){let r=X();c(0,"div",15)(1,"input",16,6),a(3,"async"),h("change",function(){E(r);let n=y(2).$implicit,s=y(6);return P(s.selectionService.toggle(n))}),d()()}if(t&2){let r=y(2).$implicit,e=y(6);o(),l("checked",m(3,1,e.selectionService.isSelected$(r)))}}function Rn(t,i){if(t&1&&(c(0,"div")(1,"i",20),f(2),d()()),t&2){let r=y().bkdLet;it("checkbox presence-category ",r.category,""),o(2),$(r.icon)}}function $n(t,i){if(t&1&&(k(0),b(1,Ln,4,3,"div",29)(2,Rn,3,4,"ng-template",null,5,he),T()),t&2){let r=i.bkdLet,e=A(3);o(),l("ngIf",!r)("ngIfElse",e)}}function Fn(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().$implicit;o(),g(", ",r.StudyClassNumber,"")}}function En(t,i){if(t&1&&(c(0,"div",31),f(1),d()),t&2){let r=y().bkdLet;o(),g(" ",r," ")}}function Pn(t,i){if(t&1&&(k(0),b(1,En,2,1,"div",30),T()),t&2){let r=i.bkdLet;o(),l("ngIf",r)}}function Dn(t,i){if(t&1){let r=X();c(0,"div",22,4),h("click",function(n){E(r);let s=A(1),p=y(6);return P(p.onRowClick(n,s))}),b(2,$n,4,2,"ng-container",7),a(3,"async"),c(4,"div",23),f(5),b(6,Fn,2,1,"ng-container",12),d(),c(7,"div",24),f(8),a(9,"date"),a(10,"date"),d(),c(11,"div",25),f(12),d(),b(13,Pn,2,1,"ng-container",7),a(14,"async"),c(15,"div",26),f(16),a(17,"date"),d(),c(18,"div",27),f(19),a(20,"bkdDaysDifference"),d(),c(21,"div",28),f(22),a(23,"date"),a(24,"bkdDaysDifference"),d()()}if(t&2){let r=i.$implicit,e=y(6);o(2),l("bkdLet",m(3,11,e.getPresenceCategory(r))),o(3),g(" ",r.EventDesignation,""),o(),l("ngIf",r.StudyClassNumber),o(2),J(" ",F(9,13,r.LessonDateTimeFrom,"HH:mm"),"\u2013",F(10,16,r.LessonDateTimeTo,"HH:mm")," "),o(4),g(" ",r.TeacherInformation," "),o(),l("bkdLet",m(14,19,e.getPresenceTypeDesignation(r))),o(3),g(" ",F(17,21,r.LessonDateTimeFrom,"dd.MM.yyyy")," "),o(3),g(" ",m(20,24,r.LessonDateTimeFrom)," "),o(3),J(" ",F(23,26,r.LessonDateTimeFrom,"dd.MM.yyyy"),", ",m(24,29,r.LessonDateTimeFrom)," ")}}function wn(t,i){if(t&1){let r=X();c(0,"div")(1,"div",14,3),h("click",function(n){E(r);let s=A(2),p=y(5);return P(p.onRowClick(n,s))}),c(3,"div",15)(4,"input",16),a(5,"async"),h("change",function(n){E(r);let s=y(5);return P(s.toggleAll(n.target==null?null:n.target.checked))}),d()(),c(6,"div",17),f(7),a(8,"translate"),d(),c(9,"div",18)(10,"a",19),a(11,"async"),c(12,"i",20),f(13,"edit"),d()()()(),b(14,Dn,25,31,"div",21),d()}if(t&2){let r,e=y(4).bkdLet,n=y();o(4),l("checked",m(5,5,n.allSelected$)),o(3),g(" ",m(8,7,"my-absences.report.list.all")," "),o(3),re("disabled",((r=m(11,9,n.selectionService.selection$))==null?null:r.length)===0),o(4),l("ngForOf",e.entries)}}function Bn(t,i){t&1&&S(0,"bkd-spinner",32)}function jn(t,i){if(t&1&&(c(0,"div",11),b(1,wn,15,11,"div",12)(2,Bn,1,0,"bkd-spinner",13),d()),t&2){let r=y(3).bkdLet;o(),l("ngIf",r.entries&&r.entries.length>0),o(),l("ngIf",r.loadingPage)}}function On(t,i){t&1&&(c(0,"p",33),f(1),a(2,"translate"),d()),t&2&&(o(),g(" ",m(2,1,"my-absences.report.no-entries")," "))}function Nn(t,i){if(t&1&&(k(0),b(1,jn,3,2,"div",10)(2,On,3,3,"ng-template",null,2,he),T()),t&2){let r=A(3),e=y(2).bkdLet;o(),l("ngIf",e.entries&&e.entries.length>0||e.loadingPage)("ngIfElse",r)}}function Hn(t,i){t&1&&S(0,"bkd-spinner")}function Vn(t,i){if(t&1&&(k(0),b(1,Nn,4,2,"ng-container",9),a(2,"async"),b(3,Hn,1,0,"ng-template",null,1,he),T()),t&2){let r=A(4),e=y(2);o(),l("ngIf",m(2,2,e.state.loading$)===!1)("ngIfElse",r)}}function Gn(t,i){t&1&&(c(0,"p",33),f(1),a(2,"translate"),d()),t&2&&(o(),$(m(2,1,"my-absences.report.no-filter")))}function qn(t,i){if(t&1){let r=X();k(0),c(1,"bkd-my-absences-report-header",8),a(2,"async"),h("filterChange",function(n){E(r);let s=y();return P(s.state.setFilter(n))}),d(),b(3,Vn,5,4,"ng-container",9),a(4,"async"),b(5,Gn,3,3,"ng-template",null,0,he),T()}if(t&2){let r=A(6),e=y();o(),l("filter",m(2,3,e.filterFromParams$)),o(2),l("ngIf",m(4,5,e.state.isFilterValid$))("ngIfElse",r)}}var rn=(()=>{let i=class i{constructor(e,n,s,p,u,L){this.state=e,this.selectionService=n,this.route=s,this.scrollPosition=p,this.presenceTypesService=u,this.settings=L,this.filterFromParams$=this.route.queryParams.pipe(v(Un)),this.allSelected$=C([this.selectionService.selection$,this.state.entries$.pipe(R(I=>C(I.map(G=>this.getPresenceType(G)))))]).pipe(v(([I,G])=>I.length>0&&I.length===G.filter(At(Be)).length)),this.destroy$=new Ie}ngOnInit(){this.filterFromParams$.pipe(B(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(et(this.destroy$)).subscribe(()=>this.selectionService.clear())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}getPresenceCategory(e){return this.getPresenceType(e).pipe(v(n=>Be(n)?e.ConfirmationStateId===this.settings.checkableAbsenceStateId?{category:Ce.Unapproved,icon:Qe(Ce.Unapproved)}:{category:Ce.Absent,icon:Qe(Ce.Absent)}:null))}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(v(n=>e.TypeRef.Id&&n.find(s=>s.Id===e.TypeRef.Id)?.Designation||null))}toggleAll(e){C([this.state.entries$.pipe(B(1)),this.presenceTypesService.presenceTypes$.pipe(B(1))]).subscribe(([n,s])=>{let p=s.filter(u=>Be(u)).map(u=>u.Id);this.selectionService.clear(e?n.filter(u=>u.TypeRef.Id==null||!p.includes(u.TypeRef.Id)):null)})}onRowClick(e,n){let s=n.querySelector('input[type="checkbox"]');s&&e.target!==s&&!e.target.closest(".buttons")&&s.click()}getPresenceType(e){return this.presenceTypesService.presenceTypes$.pipe(v(n=>e.TypeRef.Id&&n.find(s=>s.Id===e.TypeRef.Id)||null))}};i.\u0275fac=function(n){return new(n||i)(_(ye),_(ve),_(ut),_(Gt),_(Y),_(H))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report-list"]],standalone:!0,features:[M],decls:4,vars:11,consts:[["noFilter",""],["loading",""],["noEntries",""],["all",""],["row",""],["categoryIcon",""],["checkbox",""],[4,"bkdLet"],[3,"filterChange","filter"],[4,"ngIf","ngIfElse"],["class","py-3",4,"ngIf","ngIfElse"],[1,"py-3"],[4,"ngIf"],["class","inline",4,"ngIf"],[1,"entries-all",3,"click"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"all"],[1,"buttons"],["routerLink","confirm",1,"edit","btn","btn-primary","btn-icon","me-2"],[1,"material-icons"],["class","entry",3,"click",4,"ngFor","ngForOf"],[1,"entry",3,"click"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"],["class","checkbox",4,"ngIf","ngIfElse"],["class","presence-type",4,"ngIf"],[1,"presence-type"],[1,"inline"],[1,"mt-3"]],template:function(n,s){n&1&&(b(0,qn,7,7,"ng-container",7),a(1,"async"),a(2,"async"),a(3,"async")),n&2&&l("bkdLet",dt(7,Mn,m(1,1,s.selectionService.selection$),m(2,3,s.state.entries$),m(3,5,s.state.loadingPage$)))},dependencies:[z,sn,K,Te,ae,wt,Q,mt,w,D,Et],styles:['.entries-all[_ngcontent-%COMP%]{padding:0 0 .5rem 1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox all buttons";grid-template-columns:min-content 1fr min-content}.entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.entry[_ngcontent-%COMP%]:first-child{padding-top:0}.entries-all[_ngcontent-%COMP%] + .entry[_ngcontent-%COMP%]{padding-top:1rem}.presence-category.absent[_ngcontent-%COMP%]{color:#ea161f}.presence-category.unapproved[_ngcontent-%COMP%]{color:#ffa814}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.presence-category[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{display:block;font-size:16px}.entries-all[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{padding-top:.2rem}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0});let t=i;return t})();function Un(t){return{dateFrom:t.dateFrom?Ke(t.dateFrom):null,dateTo:t.dateTo?Ke(t.dateTo):null}}var on=(()=>{let i=class i{constructor(){}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report"]],standalone:!0,features:[oe([ye,ve]),M],decls:1,vars:0,template:function(n,s){n&1&&S(0,"router-outlet")},dependencies:[ke],changeDetection:0});let t=i;return t})();var Wn=["link"],Kn=()=>["/my-absences/report"],an=(()=>{let i=class i{onClick(){this.link.nativeElement.click()}constructor(){}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report-link"]],viewQuery:function(n,s){if(n&1&&st(Wn,5),n&2){let p;rt(p=ot())&&(s.link=p.first)}},hostBindings:function(n,s){n&1&&h("click",function(u){return s.onClick(u)})},standalone:!0,features:[M],decls:8,vars:5,consts:[["link",""],[1,"m-0"],[1,"btn","btn-link","p-0",3,"routerLink"],[1,"d-flex","align-items-center"],[1,"material-icons"]],template:function(n,s){n&1&&(c(0,"h5",1),f(1),a(2,"translate"),d(),c(3,"a",2,0)(5,"div",3)(6,"i",4),f(7,"keyboard_arrow_right"),d()()()),n&2&&(o(),g(" ",m(2,2,"my-absences.report.title"),` +import{a as Kt}from"./chunk-DDSXVC6O.js";import{a as qt,b as Ut}from"./chunk-UP3NEN2H.js";import{a as Gt}from"./chunk-DZZC2YX2.js";import{a as Vt}from"./chunk-K3EEKOGY.js";import{a as Wt}from"./chunk-XLPJMZ3E.js";import{c as je,d as Oe}from"./chunk-24AFRN2G.js";import{b as jt,d as Nt}from"./chunk-RFO4NYUO.js";import"./chunk-5RDJZAUT.js";import"./chunk-DB66EACG.js";import{A as Ce,B as Qe,L as Rt,M as $t,N as Ft,P as fe,T as Y,U as ue,V as Et,W as Pt,X as Bt,Y as Ht,c as Tt,j as Mt,t as Se,u as Lt,x as Be}from"./chunk-ZK2MNT7Z.js";import{a as kt,e as _e}from"./chunk-AW7CSGKI.js";import{a as Dt,b as Ot}from"./chunk-FTDG26ID.js";import{a as z,c as wt}from"./chunk-SOHFFTKU.js";import{a as gt,b as yt,c as vt,d as ht,e as St,f as Ct,g as It,j as xt,u as te,w as At}from"./chunk-C56YGDXA.js";import{a as le}from"./chunk-UX5TA32W.js";import{$ as x,$a as y,$b as ft,$c as Le,Ab as a,Bb as m,Cb as F,Da as xe,E as B,Eb as he,Fd as me,Ga as b,Gd as D,Hd as w,I as Xe,Ia as l,Id as V,Ja as re,K as Je,L as j,La as it,Lc as Ke,Mb as lt,N as Ze,O as R,Q as et,Qb as Ae,Rb as ae,Sa as c,Sb as K,Ta as d,Ua as S,Uc as _t,Va as k,Vb as Q,Vc as H,W as se,Wa as T,Wb as mt,Ya as X,Yc as Me,Z as O,_a as h,_c as bt,a as qe,ad as Re,e as Ie,ed as $e,f as Ue,fb as st,g as We,gb as rt,gd as Fe,ha as E,hb as ot,ia as P,ib as A,id as Ee,jb as f,jd as Pe,k as q,kb as $,la as tt,lb as g,m as v,mb as J,n as C,oc as ut,pb as at,pc as ke,qb as ct,qc as ce,qd as pe,ra as nt,rb as pt,rc as Te,rd as De,sb as oe,sd as we,tb as M,td as ee,ua as o,ub as Z,va as _,vb as W,w as U,xb as dt,zd as de}from"./chunk-XTHSYQMN.js";var He=(()=>{let i=class i{constructor(e,n,s,p,u,L,I,G){this.fb=e,this.router=n,this.toastService=s,this.translate=p,this.presenceTypesService=u,this.updateService=L,this.storageService=I,this.settings=G,this.formGroup=this.createFormGroup(),this.saving$=new Ue(!1),this.submitted$=new Ue(!1),this.absenceTypes$=C([this.getConfirmationTypes(),this.getHalfDayType()]).pipe(v(([ne,ie])=>ie?[...ne,ie]:ne)),this.absenceTypeIdErrors$=kt(q(this.formGroup),this.submitted$,"absenceTypeId"),this.destroy$=new Ie}ngOnInit(){this.selectedLessonIds$.pipe(B(1),U(Pt)).subscribe(()=>this.navigateBack())}ngOnDestroy(){this.destroy$.next()}onSubmit(){if(this.submitted$.next(!0),this.formGroup.valid){let{absenceTypeId:e}=this.formGroup.value;this.save(e)}}cancel(){this.navigateBack()}getSelectedCount(){return this.selectedLessonIds$.pipe(v(e=>e.length))}getConfirmationTypes(){return this.presenceTypesService.confirmationTypes$.pipe(v(e=>e.filter(n=>n.IsAbsence&&n.Id!==this.settings.halfDayPresenceTypeId)))}getHalfDayType(){return q(null)}createFormGroup(){return this.fb.group({absenceTypeId:[null,bt.required]})}save(e){this.saving$.next(!0),this.selectedLessonIds$.pipe(B(1),R(n=>this.updateService.editLessonPresences(n,[Number(this.storageService.getPayload()?.id_person)],e)),Xe(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-absences.confirm.save-success")),this.navigateBack()}};i.\u0275fac=function(n){return new(n||i)(_(pe),_(ce),_(le),_(me),_(Y),_(ue),_(V),_(_t))},i.\u0275cmp=x({type:i,selectors:[["ng-component"]],decls:0,vars:0,template:function(n,s){},encapsulation:2});let t=i;return t})();var ge=(()=>{let i=class i{constructor(e,n,s){this.settings=e,this.storageService=n,this.studentsService=s,this.studentId$=new We(1),this.lessonAbsences$=this.studentId$.pipe(R(this.loadLessonAbsences.bind(this)),j(1)),this.lessonIncidents$=this.studentId$.pipe(R(this.loadLessonIncidents.bind(this)),j(1)),this.lessonPresences$=this.getLessonPresences(),this.checkableAbsences$=this.getAbsences(this.settings.checkableAbsenceStateId),this.openAbsences$=this.getAbsences(this.settings.unconfirmedAbsenceStateId),this.excusedAbsences$=this.getAbsences(this.settings.excusedAbsenceStateId),this.unexcusedAbsences$=this.getAbsences(this.settings.unexcusedAbsenceStateId),this.incidents$=this.getAbsences(null),this.openLessonAbsences$=C([this.openAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.checkableLessonAbsences$=C([this.checkableAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.excusedLessonAbsences$=C([this.excusedAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.unexcusedLessonAbsences$=C([this.unexcusedAbsences$.pipe(U(te)),this.lessonAbsences$]).pipe(v(_e(this.getLessonAbsences.bind(this))),j(1)),this.incidentsLessonAbsences$=C([this.incidents$.pipe(U(te)),this.lessonIncidents$]).pipe(v(_e(this.getLessonIncidents.bind(this))),j(1)),this.counts$=this.getCounts();let p=this.storageService.getPayload()?.id_person;p&&this.studentId$.next(Number(p))}reset(){this.studentId$.pipe(B(1)).subscribe(e=>this.studentId$.next(e))}getLessonPresences(){return this.getCached(C([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(R(([e,n,s])=>this.loadTimetableEntries(e,n,s).pipe(v(p=>this.buildLessonPresences(n,s,p)))),v(Ft)))}getAbsences(e){return this.getCached(this.lessonPresences$.pipe(v(n=>n?.filter(s=>s.ConfirmationStateId===e)||null)))}getLessonAbsences(e,n){let s=e.map(p=>p.LessonRef.Id);return n.filter(p=>s.includes(p.LessonRef.Id))}getLessonIncidents(e,n){let s=e.map(p=>p.LessonRef.Id);return n.filter(p=>s.includes(p.LessonRef.Id))}getCounts(){return C([this.getCount(this.checkableAbsences$),this.getCount(this.openAbsences$),this.getCount(this.excusedAbsences$),this.getCount(this.unexcusedAbsences$),this.getCount(this.incidents$)]).pipe(v(([e,n,s,p,u])=>({checkableAbsences:e,openAbsences:n,excusedAbsences:s,unexcusedAbsences:p,incidents:u,halfDays:null})))}getCached(e){return e.pipe(Ze(null),Je({connector:()=>new We(1)}))}getCount(e){return e.pipe(v(n=>n?.length??null))}loadLessonAbsences(e){return this.studentsService.getLessonAbsences(e)}loadLessonIncidents(e){return this.studentsService.getLessonIncidents(e)}loadTimetableEntries(e,n,s){return this.studentsService.getTimetableEntries(e,{"filter.Id":`;${[...n,...s].map(p=>p.LessonRef.Id).join(";")}`})}buildLessonPresences(e,n,s){return[...e,...n].map(p=>this.buildLessonPresence(p,s)).filter(te)}buildLessonPresence(e,n){let s=n.find(p=>p.Id===e.LessonRef.Id);return s?{Id:"",LessonRef:{Id:e.LessonRef.Id,HRef:e.LessonRef.HRef?e.LessonRef.HRef:null},StudentRef:e.StudentRef,EventRef:{Id:0,HRef:null},TypeRef:e.TypeRef,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:"ConfirmationStateId"in e?e.ConfirmationStateId:null,EventDesignation:s.EventDesignation,HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:s.From,LessonDateTimeTo:s.To,Comment:null,Date:s.From,Type:e.Type,StudentFullName:e.StudentFullName,StudyClassNumber:"",TeacherInformation:s.EventManagerInformation}:null}};i.\u0275fac=function(n){return new(n||i)(O(H),O(V),O(je))},i.\u0275prov=se({token:i,factory:i.\u0275fac});let t=i;return t})();var fn=t=>({count:t}),un=t=>({"border-top pt-3":t});function _n(t,i){if(t&1&&(c(0,"div",11),f(1),a(2,"translate"),d()),t&2){let r=i.bkdLet;o(),g(" ",F(2,1,r===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",W(4,fn,r))," ")}}function bn(t,i){if(t&1&&(c(0,"div",17),f(1),a(2,"translate"),d()),t&2){let r=i.$implicit;o(),g(" ",F(2,1,"global.validation-errors."+r.error,r.params)," ")}}function gn(t,i){if(t&1&&(k(0),b(1,bn,3,4,"div",16),a(2,"async"),T()),t&2){let r=y(2);o(),l("ngForOf",m(2,1,r.absenceTypeIdErrors$))}}function yn(t,i){if(t&1&&(c(0,"div",12),S(1,"input",13),a(2,"async"),c(3,"label",14),f(4),d(),b(5,gn,3,3,"ng-container",15),a(6,"async"),d()),t&2){let r,e,n=i.$implicit,s=i.index,p=y();l("ngClass",W(12,un,n.IsHalfDay)),o(),re("is-invalid",((r=(r=m(2,8,p.absenceTypeIdErrors$))==null?null:r.length)!==null&&r!==void 0?r:0)>0),l("id","absence-type-"+s)("value",n.Id),o(2),l("for","absence-type-"+s),o(),g(" ",n.Designation," "),o(),l("ngIf",((e=(e=m(6,10,p.absenceTypes$))==null?null:e.length)!==null&&e!==void 0?e:0)-1===s)}}function vn(t,i){t&1&&(c(0,"div",18)(1,"span",19),f(2,"Loading..."),d()())}var Jt=(()=>{let i=class i extends He{constructor(e,n,s,p,u,L,I,G,ne,ie){super(e,n,s,p,u,L,I,G),this.myAbsencesService=ne,this.selectionService=ie,this.titleKey="my-absences.confirm.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(v(Ve=>de(ee(Ve.map(Ge=>Ge.lessonIds))))),this.confirmationStateId=this.settings.unconfirmedAbsencesRefreshTime}onSaveSuccess(){this.selectionService.clear(),this.myAbsencesService.reset(),super.onSaveSuccess()}navigateBack(){this.router.navigate(["/my-absences"])}};i.\u0275fac=function(n){return new(n||i)(_(pe),_(ce),_(le),_(me),_(Y),_(ue),_(V),_(H),_(ge),_(fe))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-confirm"]],standalone:!0,features:[xe,M],decls:28,vars:35,consts:[[1,"bkd-container","bkd-container-limited"],["class","mb-3 pb-3 border-bottom",4,"bkdLet"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],["class","form-check my-3",3,"ngClass",4,"ngFor","ngForOf"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"mb-3","pb-3","border-bottom"],[1,"form-check","my-3",3,"ngClass"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[4,"ngIf"],["class","invalid-feedback mt-4",4,"ngFor","ngForOf"],[1,"invalid-feedback","mt-4"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h1"),f(2),a(3,"translate"),d(),b(4,_n,3,6,"div",1),a(5,"async"),c(6,"form",2),h("ngSubmit",function(){return s.onSubmit()}),c(7,"div",3)(8,"label",4),f(9),a(10,"translate"),a(11,"addSpace"),d(),b(12,yn,7,14,"div",5),a(13,"async"),d(),c(14,"div",6),f(15),a(16,"translate"),d(),c(17,"div",7)(18,"button",8),a(19,"async"),h("click",function(){return s.cancel()}),f(20),a(21,"translate"),d(),c(22,"button",9),a(23,"async"),f(24),a(25,"translate"),b(26,vn,3,0,"div",10),a(27,"async"),d()()()()),n&2&&(o(2),$(m(3,12,s.titleKey)),o(2),l("bkdLet",m(5,14,s.getSelectedCount())),o(2),l("formGroup",s.formGroup),o(3),J("",m(10,16,"my-absences.confirm.choose-presence-type"),"",F(11,18,":",":"),""),o(3),l("ngForOf",m(13,21,s.absenceTypes$)),o(3),g(" ",m(16,23,"my-absences.confirm.remark")," "),o(3),l("disabled",m(19,25,s.saving$)),o(2),g(" ",m(21,27,"my-absences.confirm.cancel")," "),o(2),l("disabled",m(23,29,s.saving$)),o(2),g(" ",m(25,31,"my-absences.confirm.save")," "),o(2),l("ngIf",m(27,33,s.saving$)))},dependencies:[z,De,$e,Me,Fe,Le,Re,we,Ee,Pe,ae,Ae,K,Q,w,D,Oe],changeDetection:0});let t=i;return t})();var ye=(()=>{let i=class i extends Ut{get preventAbsencesAfterStart(){if(this._preventAbsencesAfterStart==null){let e=this.storageService.getPayload()?.instance_id,n=this.settings.preventStudentAbsenceAfterLessonStart;this._preventAbsencesAfterStart=e?n.includes(e):!1}return this._preventAbsencesAfterStart}constructor(e,n,s,p,u,L){super(e,n,L,s,"/my-absences/report"),this.studentsService=p,this.storageService=u}getInitialFilter(){return{dateFrom:null,dateTo:null}}isValidFilter(e){return!!(e.dateFrom||e.dateTo)}loadEntries(e,n,s){let p=this.buildRequestParamsFromFilter(e).set("sort","From.asc");return this.loadingService.load(this.loadTimetableEntries(p).pipe(v(u=>this.filterAbsencesAfterLessonStart(u)),R(u=>C([q(u),this.loadLessonAbsences(u),this.loadLessonDispensations(u)])),v(([u,L,I])=>this.buildLessonPresences(u,L,I)),v(u=>({offset:0,total:u.length,entries:u}))),qt)}filterAbsencesAfterLessonStart(e){return this.preventAbsencesAfterStart?e.filter(n=>n.From.getTime()>=new Date().getTime()):e}buildParamsFromFilter(e){let{dateFrom:n,dateTo:s}=e,p={};return n&&(p.dateFrom=Se(n,"yyyy-MM-dd")),s&&(p.dateTo=Se(s,"yyyy-MM-dd")),p}buildRequestParamsFromFilter(e){let n=new ft;return e.dateFrom&&(n=n.set("filter.From",`>${Se(Lt(e.dateFrom,1),"yyyy-MM-dd")}`)),e.dateTo&&(n=n.set("filter.To",`<${Se(Tt(e.dateTo,1),"yyyy-MM-dd")}`)),n}get studentId(){let e=this.storageService.getPayload()?.id_person;if(e==null)throw new Error("No student id available");return Number(e)}loadTimetableEntries(e){return this.studentsService.getTimetableEntries(this.studentId,e)}loadLessonAbsences(e){return e.length>0?this.studentsService.getLessonAbsences(this.studentId,{"filter.Id":`;${e.map(n=>n.Id).join(";")}`}):q([])}loadLessonDispensations(e){return e.length>0?this.studentsService.getLessonDispensations(this.studentId,{"filter.Id":`;${e.map(n=>n.Id).join(";")}`}):q([])}buildLessonPresences(e,n,s){return e.map(p=>this.buildLessonPresence(p,n,s))}buildLessonPresence(e,n,s){let p=n.find(I=>I.LessonRef.Id===e.Id),u=s.find(I=>I.LessonRef.Id===e.Id),L=this.buildLessonPresenceTypeRef(p,u);return{Id:"",LessonRef:{Id:e.Id,HRef:null},StudentRef:(p||u)?.StudentRef||{Id:this.studentId,HRef:null},EventRef:{Id:0,HRef:null},TypeRef:L,RegistrationRef:{Id:0,HRef:null},StudyClassRef:{Id:0,HRef:null},ConfirmationStateId:p?.ConfirmationStateId||u&&this.settings.excusedAbsenceStateId||null,EventDesignation:e.EventDesignation||"",HasStudyCourseConfirmationCode:!1,LessonDateTimeFrom:e.From||new Date,LessonDateTimeTo:e.To||new Date,Comment:null,Date:e.From||new Date,Type:(p||u)?.Type||null,StudentFullName:(p||u)?.StudentFullName||"",StudyClassNumber:"",TeacherInformation:e.EventManagerInformation}}buildLessonPresenceTypeRef(e,n){return e?qe({},e.TypeRef):n?qe({},n.TypeRef):{Id:null,HRef:null}}};i.\u0275fac=function(n){return new(n||i)(O(lt),O(Ot),O(H),O(je),O(V),O(Wt))},i.\u0275prov=se({token:i,factory:i.\u0275fac});let t=i;return t})();var ve=(()=>{let i=class i extends Rt{constructor(){super(...arguments),this.selectedIds$=this.selection$.pipe(v($t))}};i.\u0275fac=(()=>{let e;return function(s){return(e||(e=tt(i)))(s||i)}})(),i.\u0275prov=se({token:i,factory:i.\u0275fac});let t=i;return t})();var hn=t=>({count:t}),Sn=t=>({"border-top pt-3":t});function Cn(t,i){if(t&1&&(c(0,"div",11),f(1),a(2,"translate"),d()),t&2){let r=i.bkdLet;o(),g(" ",F(2,1,r===1?"my-absences.confirm.lesson-selected":"my-absences.confirm.lessons-selected",W(4,hn,r))," ")}}function In(t,i){if(t&1&&(c(0,"div",17),f(1),a(2,"translate"),d()),t&2){let r=i.$implicit;o(),g(" ",F(2,1,"global.validation-errors."+r.error,r.params)," ")}}function xn(t,i){if(t&1&&(k(0),b(1,In,3,4,"div",16),a(2,"async"),T()),t&2){let r=y(2);o(),l("ngForOf",m(2,1,r.absenceTypeIdErrors$))}}function An(t,i){if(t&1&&(c(0,"div",12),S(1,"input",13),a(2,"async"),c(3,"label",14),f(4),d(),b(5,xn,3,3,"ng-container",15),a(6,"async"),d()),t&2){let r,e,n=i.$implicit,s=i.index,p=y();l("ngClass",W(12,Sn,n.IsHalfDay)),o(),re("is-invalid",((r=(r=m(2,8,p.absenceTypeIdErrors$))==null?null:r.length)!==null&&r!==void 0?r:0)>0),l("id","absence-type-"+s)("value",n.Id),o(2),l("for","absence-type-"+s),o(),g(" ",n.Designation," "),o(),l("ngIf",((e=(e=m(6,10,p.absenceTypes$))==null?null:e.length)!==null&&e!==void 0?e:0)-1===s)}}function kn(t,i){t&1&&(c(0,"div",18)(1,"span",19),f(2,"Loading..."),d()())}var tn=(()=>{let i=class i extends He{constructor(e,n,s,p,u,L,I,G,ne,ie){super(e,n,s,p,u,L,I,G),this.state=ne,this.selectionService=ie,this.titleKey="my-absences.report.title",this.selectedLessonIds$=this.selectionService.selectedIds$.pipe(v(Ve=>de(ee(Ve.map(Ge=>Ge.lessonIds))))),this.confirmationStateId=this.settings.checkableAbsenceStateId}getHalfDayType(){return this.presenceTypesService.getPresenceType(this.settings.halfDayPresenceTypeId).pipe(v(e=>e.Active?e:null))}onSaveSuccess(){this.selectionService.clear(),this.state.resetEntries(),super.onSaveSuccess()}navigateBack(){this.state.queryParams$.pipe(B(1)).subscribe(e=>{this.router.navigate(["/my-absences/report"],{queryParams:e})})}};i.\u0275fac=function(n){return new(n||i)(_(pe),_(ce),_(le),_(me),_(Y),_(ue),_(V),_(H),_(ye),_(ve))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-confirm"]],standalone:!0,features:[xe,M],decls:28,vars:35,consts:[[1,"bkd-container","bkd-container-limited"],["class","mb-3 pb-3 border-bottom",4,"bkdLet"],[3,"ngSubmit","formGroup"],[1,"form-group","mb-3","border-bottom"],[1,"form-label"],["class","form-check my-3",3,"ngClass",4,"ngFor","ngForOf"],[1,"remark"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"mb-3","pb-3","border-bottom"],[1,"form-check","my-3",3,"ngClass"],["type","radio","formControlName","absenceTypeId",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],[4,"ngIf"],["class","invalid-feedback mt-4",4,"ngFor","ngForOf"],[1,"invalid-feedback","mt-4"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,s){n&1&&(c(0,"div",0)(1,"h1"),f(2),a(3,"translate"),d(),b(4,Cn,3,6,"div",1),a(5,"async"),c(6,"form",2),h("ngSubmit",function(){return s.onSubmit()}),c(7,"div",3)(8,"label",4),f(9),a(10,"translate"),a(11,"addSpace"),d(),b(12,An,7,14,"div",5),a(13,"async"),d(),c(14,"div",6),f(15),a(16,"translate"),d(),c(17,"div",7)(18,"button",8),a(19,"async"),h("click",function(){return s.cancel()}),f(20),a(21,"translate"),d(),c(22,"button",9),a(23,"async"),f(24),a(25,"translate"),b(26,kn,3,0,"div",10),a(27,"async"),d()()()()),n&2&&(o(2),$(m(3,12,s.titleKey)),o(2),l("bkdLet",m(5,14,s.getSelectedCount())),o(2),l("formGroup",s.formGroup),o(3),J("",m(10,16,"my-absences.confirm.choose-presence-type"),"",F(11,18,":",":"),""),o(3),l("ngForOf",m(13,21,s.absenceTypes$)),o(3),g(" ",m(16,23,"my-absences.confirm.remark")," "),o(3),l("disabled",m(19,25,s.saving$)),o(2),g(" ",m(21,27,"my-absences.confirm.cancel")," "),o(2),l("disabled",m(23,29,s.saving$)),o(2),g(" ",m(25,31,"my-absences.confirm.save")," "),o(2),l("ngIf",m(27,33,s.saving$)))},dependencies:[z,De,$e,Me,Fe,Le,Re,we,Ee,Pe,ae,Ae,K,Q,w,D,Oe],changeDetection:0});let t=i;return t})();var Tn=()=>["/my-absences"],sn=(()=>{let i=class i{constructor(){this.filter={dateFrom:null,dateTo:null},this.filterChange=new nt,this.minDate={year:new Date().getFullYear(),month:new Date().getMonth()+1,day:new Date().getDate()}}updateDateFrom(e){this.filter.dateFrom=e,e&&(this.filter.dateTo=e)}show(){this.filterChange.emit({dateFrom:nn(this.filter.dateFrom),dateTo:nn(this.filter.dateTo)})}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[oe([{provide:Ct,useClass:xt},{provide:It,useClass:Vt}]),M],decls:19,vars:18,consts:[[3,"link"],[1,"filters"],[1,"form-group"],[1,"form-label"],[3,"valueChange","minDate","value"],[1,"buttons"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(n,s){n&1&&(S(0,"bkd-backlink",0),c(1,"h1"),f(2),a(3,"translate"),d(),c(4,"div",1)(5,"div",2)(6,"label",3),f(7),a(8,"translate"),d(),c(9,"bkd-date-select",4),h("valueChange",function(u){return s.updateDateFrom(u)}),d()(),c(10,"div",2)(11,"label",3),f(12),a(13,"translate"),d(),c(14,"bkd-date-select",4),pt("valueChange",function(u){return ct(s.filter.dateTo,u)||(s.filter.dateTo=u),u}),d()(),c(15,"div",5)(16,"button",6),h("click",function(){return s.show()}),f(17),a(18,"translate"),d()()()),n&2&&(l("link",Z(17,Tn)),o(2),$(m(3,9,"my-absences.report.title")),o(5),$(m(8,11,"my-absences.report.header.date-from")),o(2),l("minDate",s.minDate)("value",s.filter.dateFrom),o(3),$(m(13,13,"my-absences.report.header.date-to")),o(2),l("minDate",s.minDate),at("value",s.filter.dateTo),o(3),g(" ",m(18,15,"my-absences.report.header.show")," "))},dependencies:[Ht,Kt,w,D],styles:["[_nghost-%COMP%]{display:block;padding-bottom:1rem;border-bottom:1px solid #dee2e6}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.form-group[_ngcontent-%COMP%]{flex:1;min-width:20rem;max-width:40rem;margin-right:1rem;margin-bottom:.5rem}.buttons[_ngcontent-%COMP%]{flex:none;margin-top:1.625rem;margin-right:0}@media (max-width: 575.98px){[_nghost-%COMP%]{padding-bottom:0}.buttons[_ngcontent-%COMP%]{width:100%;margin-top:1rem;margin-bottom:1rem}}"],changeDetection:0});let t=i;return t})();function nn(t){return t?Mt(t):null}var Mn=(t,i,r)=>({selection:t,entries:i,loadingPage:r});function Ln(t,i){if(t&1){let r=X();c(0,"div",15)(1,"input",16,6),a(3,"async"),h("change",function(){E(r);let n=y(2).$implicit,s=y(6);return P(s.selectionService.toggle(n))}),d()()}if(t&2){let r=y(2).$implicit,e=y(6);o(),l("checked",m(3,1,e.selectionService.isSelected$(r)))}}function Rn(t,i){if(t&1&&(c(0,"div")(1,"i",20),f(2),d()()),t&2){let r=y().bkdLet;it("checkbox presence-category ",r.category,""),o(2),$(r.icon)}}function $n(t,i){if(t&1&&(k(0),b(1,Ln,4,3,"div",29)(2,Rn,3,4,"ng-template",null,5,he),T()),t&2){let r=i.bkdLet,e=A(3);o(),l("ngIf",!r)("ngIfElse",e)}}function Fn(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().$implicit;o(),g(", ",r.StudyClassNumber,"")}}function En(t,i){if(t&1&&(c(0,"div",31),f(1),d()),t&2){let r=y().bkdLet;o(),g(" ",r," ")}}function Pn(t,i){if(t&1&&(k(0),b(1,En,2,1,"div",30),T()),t&2){let r=i.bkdLet;o(),l("ngIf",r)}}function Dn(t,i){if(t&1){let r=X();c(0,"div",22,4),h("click",function(n){E(r);let s=A(1),p=y(6);return P(p.onRowClick(n,s))}),b(2,$n,4,2,"ng-container",7),a(3,"async"),c(4,"div",23),f(5),b(6,Fn,2,1,"ng-container",12),d(),c(7,"div",24),f(8),a(9,"date"),a(10,"date"),d(),c(11,"div",25),f(12),d(),b(13,Pn,2,1,"ng-container",7),a(14,"async"),c(15,"div",26),f(16),a(17,"date"),d(),c(18,"div",27),f(19),a(20,"bkdDaysDifference"),d(),c(21,"div",28),f(22),a(23,"date"),a(24,"bkdDaysDifference"),d()()}if(t&2){let r=i.$implicit,e=y(6);o(2),l("bkdLet",m(3,11,e.getPresenceCategory(r))),o(3),g(" ",r.EventDesignation,""),o(),l("ngIf",r.StudyClassNumber),o(2),J(" ",F(9,13,r.LessonDateTimeFrom,"HH:mm"),"\u2013",F(10,16,r.LessonDateTimeTo,"HH:mm")," "),o(4),g(" ",r.TeacherInformation," "),o(),l("bkdLet",m(14,19,e.getPresenceTypeDesignation(r))),o(3),g(" ",F(17,21,r.LessonDateTimeFrom,"dd.MM.yyyy")," "),o(3),g(" ",m(20,24,r.LessonDateTimeFrom)," "),o(3),J(" ",F(23,26,r.LessonDateTimeFrom,"dd.MM.yyyy"),", ",m(24,29,r.LessonDateTimeFrom)," ")}}function wn(t,i){if(t&1){let r=X();c(0,"div")(1,"div",14,3),h("click",function(n){E(r);let s=A(2),p=y(5);return P(p.onRowClick(n,s))}),c(3,"div",15)(4,"input",16),a(5,"async"),h("change",function(n){E(r);let s=y(5);return P(s.toggleAll(n.target==null?null:n.target.checked))}),d()(),c(6,"div",17),f(7),a(8,"translate"),d(),c(9,"div",18)(10,"a",19),a(11,"async"),c(12,"i",20),f(13,"edit"),d()()()(),b(14,Dn,25,31,"div",21),d()}if(t&2){let r,e=y(4).bkdLet,n=y();o(4),l("checked",m(5,5,n.allSelected$)),o(3),g(" ",m(8,7,"my-absences.report.list.all")," "),o(3),re("disabled",((r=m(11,9,n.selectionService.selection$))==null?null:r.length)===0),o(4),l("ngForOf",e.entries)}}function Bn(t,i){t&1&&S(0,"bkd-spinner",32)}function jn(t,i){if(t&1&&(c(0,"div",11),b(1,wn,15,11,"div",12)(2,Bn,1,0,"bkd-spinner",13),d()),t&2){let r=y(3).bkdLet;o(),l("ngIf",r.entries&&r.entries.length>0),o(),l("ngIf",r.loadingPage)}}function On(t,i){t&1&&(c(0,"p",33),f(1),a(2,"translate"),d()),t&2&&(o(),g(" ",m(2,1,"my-absences.report.no-entries")," "))}function Nn(t,i){if(t&1&&(k(0),b(1,jn,3,2,"div",10)(2,On,3,3,"ng-template",null,2,he),T()),t&2){let r=A(3),e=y(2).bkdLet;o(),l("ngIf",e.entries&&e.entries.length>0||e.loadingPage)("ngIfElse",r)}}function Hn(t,i){t&1&&S(0,"bkd-spinner")}function Vn(t,i){if(t&1&&(k(0),b(1,Nn,4,2,"ng-container",9),a(2,"async"),b(3,Hn,1,0,"ng-template",null,1,he),T()),t&2){let r=A(4),e=y(2);o(),l("ngIf",m(2,2,e.state.loading$)===!1)("ngIfElse",r)}}function Gn(t,i){t&1&&(c(0,"p",33),f(1),a(2,"translate"),d()),t&2&&(o(),$(m(2,1,"my-absences.report.no-filter")))}function qn(t,i){if(t&1){let r=X();k(0),c(1,"bkd-my-absences-report-header",8),a(2,"async"),h("filterChange",function(n){E(r);let s=y();return P(s.state.setFilter(n))}),d(),b(3,Vn,5,4,"ng-container",9),a(4,"async"),b(5,Gn,3,3,"ng-template",null,0,he),T()}if(t&2){let r=A(6),e=y();o(),l("filter",m(2,3,e.filterFromParams$)),o(2),l("ngIf",m(4,5,e.state.isFilterValid$))("ngIfElse",r)}}var rn=(()=>{let i=class i{constructor(e,n,s,p,u,L){this.state=e,this.selectionService=n,this.route=s,this.scrollPosition=p,this.presenceTypesService=u,this.settings=L,this.filterFromParams$=this.route.queryParams.pipe(v(Un)),this.allSelected$=C([this.selectionService.selection$,this.state.entries$.pipe(R(I=>C(I.map(G=>this.getPresenceType(G)))))]).pipe(v(([I,G])=>I.length>0&&I.length===G.filter(At(Be)).length)),this.destroy$=new Ie}ngOnInit(){this.filterFromParams$.pipe(B(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(et(this.destroy$)).subscribe(()=>this.selectionService.clear())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}getPresenceCategory(e){return this.getPresenceType(e).pipe(v(n=>Be(n)?e.ConfirmationStateId===this.settings.checkableAbsenceStateId?{category:Ce.Unapproved,icon:Qe(Ce.Unapproved)}:{category:Ce.Absent,icon:Qe(Ce.Absent)}:null))}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(v(n=>e.TypeRef.Id&&n.find(s=>s.Id===e.TypeRef.Id)?.Designation||null))}toggleAll(e){C([this.state.entries$.pipe(B(1)),this.presenceTypesService.presenceTypes$.pipe(B(1))]).subscribe(([n,s])=>{let p=s.filter(u=>Be(u)).map(u=>u.Id);this.selectionService.clear(e?n.filter(u=>u.TypeRef.Id==null||!p.includes(u.TypeRef.Id)):null)})}onRowClick(e,n){let s=n.querySelector('input[type="checkbox"]');s&&e.target!==s&&!e.target.closest(".buttons")&&s.click()}getPresenceType(e){return this.presenceTypesService.presenceTypes$.pipe(v(n=>e.TypeRef.Id&&n.find(s=>s.Id===e.TypeRef.Id)||null))}};i.\u0275fac=function(n){return new(n||i)(_(ye),_(ve),_(ut),_(Gt),_(Y),_(H))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report-list"]],standalone:!0,features:[M],decls:4,vars:11,consts:[["noFilter",""],["loading",""],["noEntries",""],["all",""],["row",""],["categoryIcon",""],["checkbox",""],[4,"bkdLet"],[3,"filterChange","filter"],[4,"ngIf","ngIfElse"],["class","py-3",4,"ngIf","ngIfElse"],[1,"py-3"],[4,"ngIf"],["class","inline",4,"ngIf"],[1,"entries-all",3,"click"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"all"],[1,"buttons"],["routerLink","confirm",1,"edit","btn","btn-primary","btn-icon","me-2"],[1,"material-icons"],["class","entry",3,"click",4,"ngFor","ngForOf"],[1,"entry",3,"click"],[1,"lesson-class"],[1,"time","pe-2"],[1,"teacher"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"],["class","checkbox",4,"ngIf","ngIfElse"],["class","presence-type",4,"ngIf"],[1,"presence-type"],[1,"inline"],[1,"mt-3"]],template:function(n,s){n&1&&(b(0,qn,7,7,"ng-container",7),a(1,"async"),a(2,"async"),a(3,"async")),n&2&&l("bkdLet",dt(7,Mn,m(1,1,s.selectionService.selection$),m(2,3,s.state.entries$),m(3,5,s.state.loadingPage$)))},dependencies:[z,sn,K,Te,ae,wt,Q,mt,w,D,Et],styles:['.entries-all[_ngcontent-%COMP%]{padding:0 0 .5rem 1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox all buttons";grid-template-columns:min-content 1fr min-content}.entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.entry[_ngcontent-%COMP%]:first-child{padding-top:0}.entries-all[_ngcontent-%COMP%] + .entry[_ngcontent-%COMP%]{padding-top:1rem}.presence-category.absent[_ngcontent-%COMP%]{color:#ea161f}.presence-category.unapproved[_ngcontent-%COMP%]{color:#ffa814}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.presence-category[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{display:block;font-size:16px}.entries-all[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{padding-top:.2rem}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0});let t=i;return t})();function Un(t){return{dateFrom:t.dateFrom?Ke(t.dateFrom):null,dateTo:t.dateTo?Ke(t.dateTo):null}}var on=(()=>{let i=class i{constructor(){}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report"]],standalone:!0,features:[oe([ye,ve]),M],decls:1,vars:0,template:function(n,s){n&1&&S(0,"router-outlet")},dependencies:[ke],changeDetection:0});let t=i;return t})();var Wn=["link"],Kn=()=>["/my-absences/report"],an=(()=>{let i=class i{onClick(){this.link.nativeElement.click()}constructor(){}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-report-link"]],viewQuery:function(n,s){if(n&1&&st(Wn,5),n&2){let p;rt(p=ot())&&(s.link=p.first)}},hostBindings:function(n,s){n&1&&h("click",function(u){return s.onClick(u)})},standalone:!0,features:[M],decls:8,vars:5,consts:[["link",""],[1,"m-0"],[1,"btn","btn-link","p-0",3,"routerLink"],[1,"d-flex","align-items-center"],[1,"material-icons"]],template:function(n,s){n&1&&(c(0,"h5",1),f(1),a(2,"translate"),d(),c(3,"a",2,0)(5,"div",3)(6,"i",4),f(7,"keyboard_arrow_right"),d()()()),n&2&&(o(),g(" ",m(2,2,"my-absences.report.title"),` `),o(2),l("routerLink",Z(4,Kn)))},dependencies:[Te,w,D],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;cursor:pointer}.btn[_ngcontent-%COMP%]{color:#000;text-decoration:none}"],changeDetection:0});let t=i;return t})();var Qn=t=>({absenceCounts:t}),cn=()=>[];function zn(t,i){}function Yn(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().bkdLet;o(),g("(",r.absenceCounts.checkableAbsences,") ")}}function Xn(t,i){if(t&1&&S(0,"bkd-student-dossier-absences",17),t&2){let r=y(2);l("absences$",r.myAbsencesService.checkableAbsences$)}}function Jn(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().bkdLet;o(),g("(",r.absenceCounts.openAbsences,") ")}}function Zn(t,i){if(t&1&&(S(0,"bkd-student-dossier-absences",18),a(1,"translate"),a(2,"async")),t&2){let r,e=y(2);l("absences$",e.myAbsencesService.openAbsences$)("selectionService",e.absencesSelectionService)("defaultAbsenceSelectionMessage",m(1,4,"my-absences.show.default-absence-selection-message"))("reports",(r=m(2,6,e.openAbsencesReports$))!==null&&r!==void 0?r:Z(8,cn))}}function ei(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().bkdLet;o(),g("(",r.absenceCounts.excusedAbsences,") ")}}function ti(t,i){if(t&1&&S(0,"bkd-student-dossier-absences",17),t&2){let r=y(2);l("absences$",r.myAbsencesService.excusedAbsences$)}}function ni(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().bkdLet;o(),g("(",r.absenceCounts.unexcusedAbsences,") ")}}function ii(t,i){if(t&1&&S(0,"bkd-student-dossier-absences",19),t&2){let r=y(2);l("absences$",r.myAbsencesService.unexcusedAbsences$)("displayPresenceType",!1)}}function si(t,i){if(t&1&&(k(0),f(1),T()),t&2){let r=y().bkdLet;o(),g("(",r.absenceCounts.incidents,") ")}}function ri(t,i){if(t&1&&S(0,"bkd-student-dossier-absences",17),t&2){let r=y(2);l("absences$",r.myAbsencesService.incidents$)}}function oi(t,i){if(t&1){let r=X();c(0,"div",6)(1,"h1"),f(2),a(3,"translate"),d(),c(4,"div",7)(5,"div"),f(6),a(7,"translate"),d(),c(8,"div",8),S(9,"bkd-reports-link",9),a(10,"async"),d()(),c(11,"div",10)(12,"div",11)(13,"div",12),S(14,"bkd-my-absences-report-link"),d(),c(15,"div",13)(16,"div",14),b(17,zn,0,0,"ng-template"),d()()(),c(18,"div",11,0)(20,"div",12)(21,"bkd-student-dossier-entry-header",15),h("click",function(){E(r);let n=A(19);return P(n.toggle())}),f(22),a(23,"translate"),b(24,Yn,2,1,"ng-container",16),d()(),c(25,"div",13)(26,"div",14),b(27,Xn,1,1,"ng-template"),d()()(),c(28,"div",11,1)(30,"div",12)(31,"bkd-student-dossier-entry-header",15),h("click",function(){E(r);let n=A(29);return P(n.toggle())}),f(32),a(33,"translate"),b(34,Jn,2,1,"ng-container",16),d()(),c(35,"div",13)(36,"div",14),b(37,Zn,3,9,"ng-template"),d()()(),c(38,"div",11,2)(40,"div",12)(41,"bkd-student-dossier-entry-header",15),h("click",function(){E(r);let n=A(39);return P(n.toggle())}),f(42),a(43,"translate"),b(44,ei,2,1,"ng-container",16),d()(),c(45,"div",13)(46,"div",14),b(47,ti,1,1,"ng-template"),d()()(),c(48,"div",11,3)(50,"div",12)(51,"bkd-student-dossier-entry-header",15),h("click",function(){E(r);let n=A(49);return P(n.toggle())}),f(52),a(53,"translate"),b(54,ni,2,1,"ng-container",16),d()(),c(55,"div",13)(56,"div",14),b(57,ii,1,2,"ng-template"),d()()(),c(58,"div",11,4)(60,"div",12)(61,"bkd-student-dossier-entry-header",15),h("click",function(){E(r);let n=A(59);return P(n.toggle())}),f(62),a(63,"translate"),b(64,si,2,1,"ng-container",16),d()(),c(65,"div",13)(66,"div",14),b(67,ri,1,1,"ng-template"),d()()()()()}if(t&2){let r,e=i.bkdLet,n=A(19),s=A(29),p=A(39),u=A(49),L=A(59),I=y();o(2),$(m(3,18,"my-absences.title")),o(4),$(m(7,20,"my-absences.description")),o(3),l("reports",(r=m(10,22,I.allAbsencesReports$))!==null&&r!==void 0?r:Z(34,cn)),o(12),l("opened",!n.collapsed),o(),g(" ",m(23,24,"shared.profile.checkable-absences")," "),o(2),l("ngIf",e.absenceCounts.checkableAbsences!==null),o(7),l("opened",!s.collapsed),o(),g(" ",m(33,26,"shared.profile.open-absences")," "),o(2),l("ngIf",e.absenceCounts.openAbsences!==null),o(7),l("opened",!p.collapsed),o(),g(" ",m(43,28,"shared.profile.excused-absences")," "),o(2),l("ngIf",e.absenceCounts.excusedAbsences!==null),o(7),l("opened",!u.collapsed),o(),g(" ",m(53,30,"shared.profile.unexcused-absences")," "),o(2),l("ngIf",e.absenceCounts.unexcusedAbsences!==null),o(7),l("opened",!L.collapsed),o(),g(" ",m(63,32,"shared.profile.incidents")," "),o(2),l("ngIf",e.absenceCounts.incidents!==null)}}var pn=(()=>{let i=class i{constructor(e,n,s){this.reportsService=e,this.myAbsencesService=n,this.absencesSelectionService=s,this.openAbsencesReports$=this.loadOpenAbsencesReports(),this.allAbsencesReports$=this.loadAllAbsencesReports()}loadOpenAbsencesReports(){return C([this.absencesSelectionService.selectedWithoutPresenceType$,this.absencesSelectionService.selectedIds$]).pipe(R(([e,n])=>e.length===0&&n.length>0?this.getOpenAbsencesRecordIds(de(ee(n.map(s=>s.lessonIds)))):q([])),R(e=>this.reportsService.getStudentConfirmationReports(e)),j(1))}loadAllAbsencesReports(){return C([this.myAbsencesService.openLessonAbsences$,this.myAbsencesService.checkableLessonAbsences$,this.myAbsencesService.excusedLessonAbsences$,this.myAbsencesService.unexcusedLessonAbsences$,this.myAbsencesService.incidentsLessonAbsences$]).pipe(v(e=>this.getAllAbsencesRecordIds(ee(e))),R(e=>this.reportsService.getMyAbsencesReports(e)),j(1))}getAllAbsencesRecordIds(e){return e.map(n=>`${n.LessonRef.Id}_${n.RegistrationId}`)}getOpenAbsencesRecordIds(e){return this.myAbsencesService.openLessonAbsences$.pipe(v(n=>n.filter(s=>e.includes(s.LessonRef.Id)).map(s=>`${s.LessonRef.Id}_${s.RegistrationId}`)))}};i.\u0275fac=function(n){return new(n||i)(_(Nt),_(ge),_(fe))},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences-show"]],standalone:!0,features:[M],decls:2,vars:5,consts:[["checkableAbsences","ngbAccordionItem"],["openAbsences","ngbAccordionItem"],["excusedAbsences","ngbAccordionItem"],["unexcusedAbsences","ngbAccordionItem"],["incidents","ngbAccordionItem"],["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[1,"d-flex","justify-content-between","border-bottom","header"],[1,"ps-3"],[3,"reports"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"click","opened"],[4,"ngIf"],[3,"absences$"],[3,"absences$","selectionService","defaultAbsenceSelectionMessage","reports"],[3,"absences$","displayPresenceType"]],template:function(n,s){n&1&&(b(0,oi,68,35,"div",5),a(1,"async")),n&2&&l("bkdLet",W(3,Qn,m(1,1,s.myAbsencesService.counts$)))},dependencies:[z,Dt,St,ht,vt,an,yt,gt,jt,K,Bt,Q,w,D],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0});let t=i;return t})();var dn=(()=>{let i=class i{constructor(){}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=x({type:i,selectors:[["bkd-my-absences"]],standalone:!0,features:[oe([ge,fe]),M],decls:1,vars:0,template:function(n,s){n&1&&S(0,"router-outlet")},dependencies:[ke],changeDetection:0});let t=i;return t})();var sr=[{path:"",component:dn,children:[{path:"",component:pn},{path:"confirm",component:Jt},{path:"report",component:on,children:[{path:"",component:rn,data:{restoreScrollPositionFrom:["/my-absences/report/confirm"]}},{path:"confirm",component:tn}]}]}];export{sr as MY_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-62KHQOYN.js b/public/apps/webapp-schulverwaltung/chunk-LLDSAKSP.js similarity index 93% rename from public/apps/webapp-schulverwaltung/chunk-62KHQOYN.js rename to public/apps/webapp-schulverwaltung/chunk-LLDSAKSP.js index f7b18663..3e6689a7 100644 --- a/public/apps/webapp-schulverwaltung/chunk-62KHQOYN.js +++ b/public/apps/webapp-schulverwaltung/chunk-LLDSAKSP.js @@ -1 +1 @@ -import{a as je,b as Be}from"./chunk-ZK2M6PDV.js";import{b as xe,d as Me,e as Ee}from"./chunk-2FIH3FGB.js";import{b as De}from"./chunk-MVTCHCDH.js";import"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{a as K}from"./chunk-TK3HGFHH.js";import{H as ke,I as Ae,J as Oe,O as $e,P as C,T as Pe,V as Ie,X as we,Y as Le,a as fe}from"./chunk-GI4AZI25.js";import{e as U}from"./chunk-Q5U6YZUT.js";import{b as Fe}from"./chunk-N6FFLIGM.js";import{a as Se,c as Te}from"./chunk-33NXTXD7.js";import{x as ye,y as Ce}from"./chunk-FTRAQKUW.js";import"./chunk-3AROKYRB.js";import{$ as P,$a as u,Bb as p,Cb as l,Db as F,E as _,Fb as J,Ga as v,Gd as he,Hd as _e,Ia as g,Id as ve,Ja as ie,L,O as j,Q as Y,Sa as c,Sb as pe,Ta as a,Tb as le,Ua as x,Va as G,W as ne,Wa as H,Wb as V,Xb as de,Ya as B,Z as D,_a as I,e as $,f as W,ha as M,ia as E,ib as N,j as Z,jb as d,kb as y,lb as T,m,mb as se,n as S,pc as me,qc as ge,rc as ue,sb as re,sc as be,tb as w,ua as o,ub as oe,v as ee,va as h,vb as R,w as te,wb as ce,xb as ae}from"./chunk-T7QWSMKM.js";var k=(()=>{let i=class i{constructor(e,t,r,b){this.lessonPresencesService=e,this.selectionService=t,this.loadingService=r,this.translate=b,this.loading$=this.loadingService.loading$,this.search$=new W(""),this.updateUnconfirmedAbsences$=new $,this.unconfirmedAbsences$=ee(this.loadUnconfirmedAbsences(),this.updateUnconfirmedAbsences$).pipe(L(1)),this.entries$=this.unconfirmedAbsences$.pipe(m(ke),L(1)),this.sortCriteriaSubject$=new W({primarySortKey:"date",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=S([this.entries$,this.sortCriteria$]).pipe(m(U(Ae))),this.filteredEntries$=S([this.sortedEntries$,this.search$]).pipe(m(U(je)),L(1)),this.currentDetail=null}getUnconfirmedAbsences(e,t){return this.entries$.pipe(m(r=>{let b=r.find(A=>A.dateString===e&&A.studentId===t);return b?b.absences:[]}))}getAllUnconfirmedAbsencesForStudent(e){return this.entries$.pipe(m(t=>t.filter(r=>r.studentId===e).reduce((r,b)=>r.concat(b.absences),[])))}toggleSort(e){this.sortCriteriaSubject$.pipe(_(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}get confirmBackLink(){return this.currentDetail?["/open-absences/detail",this.currentDetail.personId,this.currentDetail.date]:["/open-absences"]}updateAfterConfirm(){S([this.unconfirmedAbsences$.pipe(_(1)),this.selectionService.selectedIds$.pipe(_(1))]).pipe(m(U(Oe))).subscribe(e=>{this.selectionService.clear(),this.updateUnconfirmedAbsences$.next(e)})}buildMailToString(e,t){let r=e.Email,b=this.translate.instant("open-absences.detail.mail.subject"),A=t.map(q=>$e(q)).join("%0D%0A"),O=`${this.translate.instant("open-absences.detail.mail.body")}%0D%0A${A}`;return O.length>=1600&&(O=`${O.substring(0,1500)}%0D%0A${this.translate.instant("open-absences.detail.mail.bodyToLargeForEmailTo")}`),`${r}?subject=${b}&body=${O}`}loadUnconfirmedAbsences(){return this.loadingService.load(this.lessonPresencesService.getListOfUnconfirmed())}};i.\u0275fac=function(t){return new(t||i)(D(Ee),D(C),D(Fe),D(he))},i.\u0275prov=ne({token:i,factory:i.\u0275fac});let n=i;return n})();var We=()=>["/open-absences"],Ve=(()=>{let i=class i{constructor(e,t,r,b,A,O,q){this.router=e,this.route=t,this.openAbsencesService=r,this.presenceTypesService=b,this.personService=A,this.selectionService=O,this.scrollPosition=q,this.absences$=this.route.paramMap.pipe(j(this.getAbsencesForParams.bind(this))),this.hasAbsences$=this.absences$.pipe(m(ye(1))),this.studentFullName$=this.absences$.pipe(m(f=>f[0]&&f[0].StudentFullName||null)),this.allSelected$=S([this.absences$,this.selectionService.selection$]).pipe(m(([f,z])=>f.length===z.length)),this.studentEmail$=this.absences$.pipe(m(f=>f[0]&&f[0].StudentRef.Id||null),j(f=>f?this.personService.getByIdWithEmailInfos(f):Z)),this.allUnconfirmedAbsencesForStudent$=this.route.paramMap.pipe(j(this.getAbsencesForStudentParam.bind(this))),this.mailTo$=S([this.studentEmail$,this.allUnconfirmedAbsencesForStudent$]).pipe(m(([f,z])=>this.openAbsencesService.buildMailToString(f,z))),this.destroy$=new $}ngOnInit(){this.selectionService.clearNonLessonPresences(),this.route.paramMap.pipe(Y(this.destroy$)).subscribe(e=>this.openAbsencesService.currentDetail={date:String(e.get("date")),personId:Number(e.get("personId"))}),this.hasAbsences$.pipe(Y(this.destroy$),te(fe(Ce))).subscribe(()=>this.router.navigate(["/open-absences"]))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){e?this.absences$.pipe(_(1)).subscribe(t=>this.selectionService.clear(t)):this.selectionService.clear()}onRowClick(e,t){e.target!==t&&t.click()}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(m(t=>e.TypeRef.Id&&t.find(r=>r.Id===e.TypeRef.Id)?.Designation||null))}getAbsencesForParams(e){return this.openAbsencesService.getUnconfirmedAbsences(String(e.get("date")),Number(e.get("personId")))}getAbsencesForStudentParam(e){return this.openAbsencesService.getAllUnconfirmedAbsencesForStudent(Number(e.get("personId")))}};i.\u0275fac=function(t){return new(t||i)(h(ue),h(me),h(k),h(Pe),h(De),h(C),h(K))},i.\u0275cmp=P({type:i,selectors:[["bkd-open-absences-detail"]],standalone:!0,features:[w],decls:6,vars:10,consts:[[3,"link"],[3,"absences$","selectionService","confirmLink","displayEmail","mailTo$"]],template:function(t,r){t&1&&(c(0,"div"),x(1,"bkd-backlink",0),c(2,"h1"),d(3),p(4,"async"),a()(),x(5,"bkd-student-dossier-absences",1)),t&2&&(o(),g("link",oe(9,We)),o(2),y(l(4,7,r.studentFullName$)),o(2),g("absences$",r.absences$)("selectionService",r.selectionService)("confirmLink","/open-absences/confirm")("displayEmail",!0)("mailTo$",r.mailTo$))},dependencies:[Le,we,V],styles:['.content[_ngcontent-%COMP%]{padding-left:1rem;padding-right:1rem}.back[_ngcontent-%COMP%]{color:#000;text-decoration:none}.back[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .back[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%]{text-decoration:underline}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.6rem .5rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0});let n=i;return n})();var Ye=(n,i,s)=>({selection:n,entries:i,sortCriteria:s}),X=n=>({count:n}),Ge=(n,i)=>["detail",n,i];function He(n,i){if(n&1){let s=B();c(0,"div",16),I("click",function(){let t=M(s).$implicit,r=u(4);return E(r.openAbsencesService.toggleSort(t))}),d(1),p(2,"translate"),c(3,"span",17),d(4),a()()}if(n&2){let s=i.$implicit,e=u(3).bkdLet,t=u();g("className",s),o(),T(" ",l(2,3,"open-absences.list.header."+s)," "),o(3),y(t.getSortDirectionCharacter(e.sortCriteria,s))}}function Je(n,i){if(n&1){let s=B();c(0,"div")(1,"div",18)(2,"div",19),I("click",function(t){M(s);let r=N(4),b=u(4);return E(b.onCheckboxCellClick(t,r))}),c(3,"input",13,2),p(5,"async"),I("change",function(){let t=M(s).$implicit,r=u(4);return E(r.selectionService.toggle(t))}),a()(),c(6,"div",20)(7,"a",21),d(8),a()(),c(9,"div",22),d(10),a(),c(11,"div",23),d(12),p(13,"translate"),a(),c(14,"div",24),d(15),p(16,"translate"),a(),c(17,"div",25),d(18),p(19,"bkdDaysDifference"),a(),c(20,"div",26),d(21),p(22,"date"),a()()()}if(n&2){let s=i.$implicit,e=u(4);o(3),g("checked",l(5,9,e.selectionService.isSelected$(s))),o(4),g("routerLink",ce(22,Ge,s.studentId,s.dateString)),o(),y(s.studentFullName),o(2),T(" ",s.studyClassNumber," "),o(2),T(" ",F(13,11,e.getLessonsCountKey(s),R(25,X,s.lessonsCount))," "),o(3),se(" ",s.studyClassNumber,", ",F(16,14,e.getLessonsCountKey(s),R(27,X,s.lessonsCount))," "),o(3),T(" ",l(19,17,s.date)," "),o(3),y(F(22,19,s.date,"dd.MM.yyyy"))}}function Qe(n,i){if(n&1){let s=B();G(0),c(1,"div")(2,"bkd-resettable-input",5),p(3,"async"),p(4,"translate"),p(5,"translate"),I("valueChange",function(t){M(s);let r=u(3);return E(r.openAbsencesService.search$.next(t))}),a(),c(6,"div",6)(7,"div",7),d(8),p(9,"translate"),a(),c(10,"a",8)(11,"i",9),d(12,"edit"),a()()()(),c(13,"div",10)(14,"div",11)(15,"div",12)(16,"input",13),I("change",function(t){M(s);let r=u(3);return E(r.onToggleAll(t.currentTarget==null?null:t.currentTarget.checked))}),a()(),v(17,He,5,5,"div",14),a(),v(18,Je,23,29,"div",15),a(),H()}if(n&2){let s=u(2).bkdLet,e=u();o(2),g("value",l(3,9,e.openAbsencesService.search$))("placeholder",l(4,11,"open-absences.search-by-name-or-class"))("label",l(5,13,"open-absences.search")),o(6),T(" ",F(9,15,"open-absences.selected",R(18,X,s.selection.length))," "),o(2),ie("disabled",s.selection.length===0),o(6),g("checked",s.selection.length===s.entries.length),o(),g("ngForOf",e.primarySortKeys),o(),g("ngForOf",s.entries)}}function Xe(n,i){n&1&&(c(0,"p",27),d(1),p(2,"translate"),a()),n&2&&(o(),y(l(2,1,"open-absences.noEntries")))}function Ze(n,i){if(n&1&&(G(0),v(1,Qe,19,20,"ng-container",4),p(2,"async"),v(3,Xe,3,3,"ng-template",null,1,J),H()),n&2){let s,e=N(4),t=u().bkdLet,r=u();o(),g("ngIf",((s=(s=l(2,2,r.openAbsencesService.sortedEntries$))==null?null:s.length)!==null&&s!==void 0?s:0)>0||(t.entries==null?null:t.entries.length)>0)("ngIfElse",e)}}function et(n,i){n&1&&x(0,"bkd-spinner")}function tt(n,i){if(n&1&&(c(0,"div"),v(1,Ze,5,4,"ng-container",4),p(2,"async"),v(3,et,1,0,"ng-template",null,0,J),a()),n&2){let s=N(4),e=u();o(),g("ngIf",l(2,2,e.openAbsencesService.loading$)===!1)("ngIfElse",s)}}var Ue=(()=>{let i=class i{constructor(e,t,r){this.openAbsencesService=e,this.selectionService=t,this.scrollPosition=r,this.primarySortKeys=["name","date"],this.destroy$=new $}ngOnInit(){this.openAbsencesService.currentDetail=null,this.selectionService.clearNonOpenAbsencesEntries()}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}onToggleAll(e){this.openAbsencesService.filteredEntries$.pipe(_(1)).subscribe(t=>{this.selectionService.clear(e?t:null)})}onCheckboxCellClick(e,t){e.target!==t&&t.click()}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}getLessonsCountKey(e){return`open-absences.list.content.lessonsCount.${e.lessonsCount===1?"singular":"plural"}`}};i.\u0275fac=function(t){return new(t||i)(h(k),h(C),h(K))},i.\u0275cmp=P({type:i,selectors:[["bkd-open-absences-list"]],standalone:!0,features:[w],decls:7,vars:14,consts:[["loading",""],["noEntries",""],["checkbox",""],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[1,"d-flex","header-search",3,"valueChange","value","placeholder","label"],[1,"d-flex","align-items-center","justify-content-between","mt-1"],[1,"selection-count","ps-1"],["routerLink","/open-absences/confirm",1,"edit","btn","btn-primary","btn-edit","mt-1","mb-2"],[1,"material-icons"],[1,"content"],[1,"absence-header"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[3,"className","click",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[3,"click","className"],[1,"sort-direction"],[1,"absence-entry"],[1,"checkbox",3,"click"],[1,"name","pe-2"],[3,"routerLink"],[1,"study-class"],[1,"lessons-count"],[1,"study-class-lessons-count"],[1,"days-ago"],[1,"date"],[1,"mt-3"]],template:function(t,r){t&1&&(c(0,"h1"),d(1),p(2,"translate"),a(),v(3,tt,5,4,"div",3),p(4,"async"),p(5,"async"),p(6,"async")),t&2&&(o(),y(l(2,2,"open-absences.title")),o(2),g("bkdLet",ae(10,Ye,l(4,4,r.selectionService.selection$),l(5,6,r.openAbsencesService.filteredEntries$),l(6,8,r.openAbsencesService.sortCriteria$))))},dependencies:[Se,le,Be,be,pe,Te,V,de,ve,_e,Ie],styles:['.header-search[_ngcontent-%COMP%]{max-width:500px}.absence-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"checkbox name date";grid-template-columns:min-content 5fr 1fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;align-items:center}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name study-class lessons-count days-ago date";grid-template-columns:min-content 2fr 1fr 1fr 1fr 1fr;align-items:center}.checkbox[_ngcontent-%COMP%]{align-self:start;grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lessons-count[_ngcontent-%COMP%]{grid-area:lessons-count}.study-class[_ngcontent-%COMP%]{grid-area:study-class}.study-class-lessons-count[_ngcontent-%COMP%]{grid-area:study-class-lessons-count;display:none}.days-ago[_ngcontent-%COMP%]{color:#6c757d;grid-area:days-ago}.date[_ngcontent-%COMP%]{grid-area:date}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-header[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date";grid-template-columns:min-content 3fr 2fr}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date" "checkbox study-class-lessons-count days-ago";grid-template-columns:min-content 3fr 2fr}.study-class-lessons-count[_ngcontent-%COMP%]{display:block}.study-class[_ngcontent-%COMP%], .lessons-count[_ngcontent-%COMP%]{display:none}.days-ago[_ngcontent-%COMP%], .study-class-lessons-count[_ngcontent-%COMP%]{font-size:.875rem;color:#adb5bd}}'],changeDetection:0});let n=i;return n})();var Ke=(()=>{let i=class i{constructor(){}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=P({type:i,selectors:[["bkd-open-absences"]],standalone:!0,features:[re([k,C,{provide:xe,useExisting:k}]),w],decls:1,vars:0,template:function(t,r){t&1&&x(0,"router-outlet")},dependencies:[ge],changeDetection:0});let n=i;return n})();var Rt=[{path:"",component:Ke,children:[{path:"",component:Ue,data:{restoreScrollPositionFrom:["/open-absences/detail/:personId/:date","/open-absences/confirm"]}},{path:"detail/:personId/:date",component:Ve,data:{restoreScrollPositionFrom:["/open-absences/confirm"]}},{path:"confirm",component:Me}]}];export{Rt as OPEN_ABSENCES_ROUTES}; +import{a as je,b as Be}from"./chunk-Y673JQTS.js";import{b as xe,d as Me,e as Ee}from"./chunk-C7XT5XXE.js";import{b as De}from"./chunk-YMJC6QZX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{a as K}from"./chunk-DZZC2YX2.js";import{H as ke,I as Ae,J as Oe,O as $e,P as C,T as Pe,V as Ie,X as we,Y as Le,a as fe}from"./chunk-ZK2MNT7Z.js";import{e as U}from"./chunk-AW7CSGKI.js";import{b as Fe}from"./chunk-FTDG26ID.js";import{a as Se,c as Te}from"./chunk-SOHFFTKU.js";import{x as ye,y as Ce}from"./chunk-C56YGDXA.js";import"./chunk-UX5TA32W.js";import{$ as P,$a as u,Ab as p,Bb as l,Cb as F,E as _,Eb as J,Fd as he,Ga as v,Gd as _e,Hd as ve,Ia as g,Ja as ie,L,O as j,Q as Y,Rb as pe,Sa as c,Sb as le,Ta as a,Ua as x,Va as G,Vb as V,W as ne,Wa as H,Wb as de,Ya as B,Z as D,_a as I,e as $,f as W,ha as M,ia as E,ib as N,j as Z,jb as d,kb as y,lb as T,m,mb as se,n as S,oc as me,pc as ge,qc as ue,rc as be,sb as re,tb as w,ua as o,ub as oe,v as ee,va as h,vb as R,w as te,wb as ce,xb as ae}from"./chunk-XTHSYQMN.js";var k=(()=>{let i=class i{constructor(e,t,r,b){this.lessonPresencesService=e,this.selectionService=t,this.loadingService=r,this.translate=b,this.loading$=this.loadingService.loading$,this.search$=new W(""),this.updateUnconfirmedAbsences$=new $,this.unconfirmedAbsences$=ee(this.loadUnconfirmedAbsences(),this.updateUnconfirmedAbsences$).pipe(L(1)),this.entries$=this.unconfirmedAbsences$.pipe(m(ke),L(1)),this.sortCriteriaSubject$=new W({primarySortKey:"date",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=S([this.entries$,this.sortCriteria$]).pipe(m(U(Ae))),this.filteredEntries$=S([this.sortedEntries$,this.search$]).pipe(m(U(je)),L(1)),this.currentDetail=null}getUnconfirmedAbsences(e,t){return this.entries$.pipe(m(r=>{let b=r.find(A=>A.dateString===e&&A.studentId===t);return b?b.absences:[]}))}getAllUnconfirmedAbsencesForStudent(e){return this.entries$.pipe(m(t=>t.filter(r=>r.studentId===e).reduce((r,b)=>r.concat(b.absences),[])))}toggleSort(e){this.sortCriteriaSubject$.pipe(_(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}get confirmBackLink(){return this.currentDetail?["/open-absences/detail",this.currentDetail.personId,this.currentDetail.date]:["/open-absences"]}updateAfterConfirm(){S([this.unconfirmedAbsences$.pipe(_(1)),this.selectionService.selectedIds$.pipe(_(1))]).pipe(m(U(Oe))).subscribe(e=>{this.selectionService.clear(),this.updateUnconfirmedAbsences$.next(e)})}buildMailToString(e,t){let r=e.Email,b=this.translate.instant("open-absences.detail.mail.subject"),A=t.map(q=>$e(q)).join("%0D%0A"),O=`${this.translate.instant("open-absences.detail.mail.body")}%0D%0A${A}`;return O.length>=1600&&(O=`${O.substring(0,1500)}%0D%0A${this.translate.instant("open-absences.detail.mail.bodyToLargeForEmailTo")}`),`${r}?subject=${b}&body=${O}`}loadUnconfirmedAbsences(){return this.loadingService.load(this.lessonPresencesService.getListOfUnconfirmed())}};i.\u0275fac=function(t){return new(t||i)(D(Ee),D(C),D(Fe),D(he))},i.\u0275prov=ne({token:i,factory:i.\u0275fac});let n=i;return n})();var We=()=>["/open-absences"],Ve=(()=>{let i=class i{constructor(e,t,r,b,A,O,q){this.router=e,this.route=t,this.openAbsencesService=r,this.presenceTypesService=b,this.personService=A,this.selectionService=O,this.scrollPosition=q,this.absences$=this.route.paramMap.pipe(j(this.getAbsencesForParams.bind(this))),this.hasAbsences$=this.absences$.pipe(m(ye(1))),this.studentFullName$=this.absences$.pipe(m(f=>f[0]&&f[0].StudentFullName||null)),this.allSelected$=S([this.absences$,this.selectionService.selection$]).pipe(m(([f,z])=>f.length===z.length)),this.studentEmail$=this.absences$.pipe(m(f=>f[0]&&f[0].StudentRef.Id||null),j(f=>f?this.personService.getByIdWithEmailInfos(f):Z)),this.allUnconfirmedAbsencesForStudent$=this.route.paramMap.pipe(j(this.getAbsencesForStudentParam.bind(this))),this.mailTo$=S([this.studentEmail$,this.allUnconfirmedAbsencesForStudent$]).pipe(m(([f,z])=>this.openAbsencesService.buildMailToString(f,z))),this.destroy$=new $}ngOnInit(){this.selectionService.clearNonLessonPresences(),this.route.paramMap.pipe(Y(this.destroy$)).subscribe(e=>this.openAbsencesService.currentDetail={date:String(e.get("date")),personId:Number(e.get("personId"))}),this.hasAbsences$.pipe(Y(this.destroy$),te(fe(Ce))).subscribe(()=>this.router.navigate(["/open-absences"]))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){e?this.absences$.pipe(_(1)).subscribe(t=>this.selectionService.clear(t)):this.selectionService.clear()}onRowClick(e,t){e.target!==t&&t.click()}getPresenceTypeDesignation(e){return this.presenceTypesService.displayedTypes$.pipe(m(t=>e.TypeRef.Id&&t.find(r=>r.Id===e.TypeRef.Id)?.Designation||null))}getAbsencesForParams(e){return this.openAbsencesService.getUnconfirmedAbsences(String(e.get("date")),Number(e.get("personId")))}getAbsencesForStudentParam(e){return this.openAbsencesService.getAllUnconfirmedAbsencesForStudent(Number(e.get("personId")))}};i.\u0275fac=function(t){return new(t||i)(h(ue),h(me),h(k),h(Pe),h(De),h(C),h(K))},i.\u0275cmp=P({type:i,selectors:[["bkd-open-absences-detail"]],standalone:!0,features:[w],decls:6,vars:10,consts:[[3,"link"],[3,"absences$","selectionService","confirmLink","displayEmail","mailTo$"]],template:function(t,r){t&1&&(c(0,"div"),x(1,"bkd-backlink",0),c(2,"h1"),d(3),p(4,"async"),a()(),x(5,"bkd-student-dossier-absences",1)),t&2&&(o(),g("link",oe(9,We)),o(2),y(l(4,7,r.studentFullName$)),o(2),g("absences$",r.absences$)("selectionService",r.selectionService)("confirmLink","/open-absences/confirm")("displayEmail",!0)("mailTo$",r.mailTo$))},dependencies:[Le,we,V],styles:['.content[_ngcontent-%COMP%]{padding-left:1rem;padding-right:1rem}.back[_ngcontent-%COMP%]{color:#000;text-decoration:none}.back[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%], .back[_ngcontent-%COMP%]:active span[_ngcontent-%COMP%]{text-decoration:underline}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.6rem .5rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0});let n=i;return n})();var Ye=(n,i,s)=>({selection:n,entries:i,sortCriteria:s}),X=n=>({count:n}),Ge=(n,i)=>["detail",n,i];function He(n,i){if(n&1){let s=B();c(0,"div",16),I("click",function(){let t=M(s).$implicit,r=u(4);return E(r.openAbsencesService.toggleSort(t))}),d(1),p(2,"translate"),c(3,"span",17),d(4),a()()}if(n&2){let s=i.$implicit,e=u(3).bkdLet,t=u();g("className",s),o(),T(" ",l(2,3,"open-absences.list.header."+s)," "),o(3),y(t.getSortDirectionCharacter(e.sortCriteria,s))}}function Je(n,i){if(n&1){let s=B();c(0,"div")(1,"div",18)(2,"div",19),I("click",function(t){M(s);let r=N(4),b=u(4);return E(b.onCheckboxCellClick(t,r))}),c(3,"input",13,2),p(5,"async"),I("change",function(){let t=M(s).$implicit,r=u(4);return E(r.selectionService.toggle(t))}),a()(),c(6,"div",20)(7,"a",21),d(8),a()(),c(9,"div",22),d(10),a(),c(11,"div",23),d(12),p(13,"translate"),a(),c(14,"div",24),d(15),p(16,"translate"),a(),c(17,"div",25),d(18),p(19,"bkdDaysDifference"),a(),c(20,"div",26),d(21),p(22,"date"),a()()()}if(n&2){let s=i.$implicit,e=u(4);o(3),g("checked",l(5,9,e.selectionService.isSelected$(s))),o(4),g("routerLink",ce(22,Ge,s.studentId,s.dateString)),o(),y(s.studentFullName),o(2),T(" ",s.studyClassNumber," "),o(2),T(" ",F(13,11,e.getLessonsCountKey(s),R(25,X,s.lessonsCount))," "),o(3),se(" ",s.studyClassNumber,", ",F(16,14,e.getLessonsCountKey(s),R(27,X,s.lessonsCount))," "),o(3),T(" ",l(19,17,s.date)," "),o(3),y(F(22,19,s.date,"dd.MM.yyyy"))}}function Qe(n,i){if(n&1){let s=B();G(0),c(1,"div")(2,"bkd-resettable-input",5),p(3,"async"),p(4,"translate"),p(5,"translate"),I("valueChange",function(t){M(s);let r=u(3);return E(r.openAbsencesService.search$.next(t))}),a(),c(6,"div",6)(7,"div",7),d(8),p(9,"translate"),a(),c(10,"a",8)(11,"i",9),d(12,"edit"),a()()()(),c(13,"div",10)(14,"div",11)(15,"div",12)(16,"input",13),I("change",function(t){M(s);let r=u(3);return E(r.onToggleAll(t.currentTarget==null?null:t.currentTarget.checked))}),a()(),v(17,He,5,5,"div",14),a(),v(18,Je,23,29,"div",15),a(),H()}if(n&2){let s=u(2).bkdLet,e=u();o(2),g("value",l(3,9,e.openAbsencesService.search$))("placeholder",l(4,11,"open-absences.search-by-name-or-class"))("label",l(5,13,"open-absences.search")),o(6),T(" ",F(9,15,"open-absences.selected",R(18,X,s.selection.length))," "),o(2),ie("disabled",s.selection.length===0),o(6),g("checked",s.selection.length===s.entries.length),o(),g("ngForOf",e.primarySortKeys),o(),g("ngForOf",s.entries)}}function Xe(n,i){n&1&&(c(0,"p",27),d(1),p(2,"translate"),a()),n&2&&(o(),y(l(2,1,"open-absences.noEntries")))}function Ze(n,i){if(n&1&&(G(0),v(1,Qe,19,20,"ng-container",4),p(2,"async"),v(3,Xe,3,3,"ng-template",null,1,J),H()),n&2){let s,e=N(4),t=u().bkdLet,r=u();o(),g("ngIf",((s=(s=l(2,2,r.openAbsencesService.sortedEntries$))==null?null:s.length)!==null&&s!==void 0?s:0)>0||(t.entries==null?null:t.entries.length)>0)("ngIfElse",e)}}function et(n,i){n&1&&x(0,"bkd-spinner")}function tt(n,i){if(n&1&&(c(0,"div"),v(1,Ze,5,4,"ng-container",4),p(2,"async"),v(3,et,1,0,"ng-template",null,0,J),a()),n&2){let s=N(4),e=u();o(),g("ngIf",l(2,2,e.openAbsencesService.loading$)===!1)("ngIfElse",s)}}var Ue=(()=>{let i=class i{constructor(e,t,r){this.openAbsencesService=e,this.selectionService=t,this.scrollPosition=r,this.primarySortKeys=["name","date"],this.destroy$=new $}ngOnInit(){this.openAbsencesService.currentDetail=null,this.selectionService.clearNonOpenAbsencesEntries()}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}onToggleAll(e){this.openAbsencesService.filteredEntries$.pipe(_(1)).subscribe(t=>{this.selectionService.clear(e?t:null)})}onCheckboxCellClick(e,t){e.target!==t&&t.click()}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}getLessonsCountKey(e){return`open-absences.list.content.lessonsCount.${e.lessonsCount===1?"singular":"plural"}`}};i.\u0275fac=function(t){return new(t||i)(h(k),h(C),h(K))},i.\u0275cmp=P({type:i,selectors:[["bkd-open-absences-list"]],standalone:!0,features:[w],decls:7,vars:14,consts:[["loading",""],["noEntries",""],["checkbox",""],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[1,"d-flex","header-search",3,"valueChange","value","placeholder","label"],[1,"d-flex","align-items-center","justify-content-between","mt-1"],[1,"selection-count","ps-1"],["routerLink","/open-absences/confirm",1,"edit","btn","btn-primary","btn-edit","mt-1","mb-2"],[1,"material-icons"],[1,"content"],[1,"absence-header"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[3,"className","click",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[3,"click","className"],[1,"sort-direction"],[1,"absence-entry"],[1,"checkbox",3,"click"],[1,"name","pe-2"],[3,"routerLink"],[1,"study-class"],[1,"lessons-count"],[1,"study-class-lessons-count"],[1,"days-ago"],[1,"date"],[1,"mt-3"]],template:function(t,r){t&1&&(c(0,"h1"),d(1),p(2,"translate"),a(),v(3,tt,5,4,"div",3),p(4,"async"),p(5,"async"),p(6,"async")),t&2&&(o(),y(l(2,2,"open-absences.title")),o(2),g("bkdLet",ae(10,Ye,l(4,4,r.selectionService.selection$),l(5,6,r.openAbsencesService.filteredEntries$),l(6,8,r.openAbsencesService.sortCriteria$))))},dependencies:[Se,le,Be,be,pe,Te,V,de,ve,_e,Ie],styles:['.header-search[_ngcontent-%COMP%]{max-width:500px}.absence-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"checkbox name date";grid-template-columns:min-content 5fr 1fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6;align-items:center}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name study-class lessons-count days-ago date";grid-template-columns:min-content 2fr 1fr 1fr 1fr 1fr;align-items:center}.checkbox[_ngcontent-%COMP%]{align-self:start;grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lessons-count[_ngcontent-%COMP%]{grid-area:lessons-count}.study-class[_ngcontent-%COMP%]{grid-area:study-class}.study-class-lessons-count[_ngcontent-%COMP%]{grid-area:study-class-lessons-count;display:none}.days-ago[_ngcontent-%COMP%]{color:#6c757d;grid-area:days-ago}.date[_ngcontent-%COMP%]{grid-area:date}@media (max-width: 750px){.content[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.absence-header[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date";grid-template-columns:min-content 3fr 2fr}.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox name date" "checkbox study-class-lessons-count days-ago";grid-template-columns:min-content 3fr 2fr}.study-class-lessons-count[_ngcontent-%COMP%]{display:block}.study-class[_ngcontent-%COMP%], .lessons-count[_ngcontent-%COMP%]{display:none}.days-ago[_ngcontent-%COMP%], .study-class-lessons-count[_ngcontent-%COMP%]{font-size:.875rem;color:#adb5bd}}'],changeDetection:0});let n=i;return n})();var Ke=(()=>{let i=class i{constructor(){}};i.\u0275fac=function(t){return new(t||i)},i.\u0275cmp=P({type:i,selectors:[["bkd-open-absences"]],standalone:!0,features:[re([k,C,{provide:xe,useExisting:k}]),w],decls:1,vars:0,template:function(t,r){t&1&&x(0,"router-outlet")},dependencies:[ge],changeDetection:0});let n=i;return n})();var Rt=[{path:"",component:Ke,children:[{path:"",component:Ue,data:{restoreScrollPositionFrom:["/open-absences/detail/:personId/:date","/open-absences/confirm"]}},{path:"detail/:personId/:date",component:Ve,data:{restoreScrollPositionFrom:["/open-absences/confirm"]}},{path:"confirm",component:Me}]}];export{Rt as OPEN_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-MI65GEUZ.js b/public/apps/webapp-schulverwaltung/chunk-MI65GEUZ.js new file mode 100644 index 00000000..df547fb8 --- /dev/null +++ b/public/apps/webapp-schulverwaltung/chunk-MI65GEUZ.js @@ -0,0 +1 @@ +import{a as oi}from"./chunk-XYF73IOS.js";import{a as di,b as pi}from"./chunk-Y673JQTS.js";import{a as mi}from"./chunk-GD4YO4IV.js";import{a as ai}from"./chunk-GXZYLK4L.js";import"./chunk-U4HODSW3.js";import{a as tt,b as qt,c as zt,d as Yt,e as Kt,f as We,g as qe,h as Jt,i as Qt,j as Xt,k as Zt,l as ei,m as Ie,o as ti,p as me,s as ni,u as ri,v as ze}from"./chunk-7LCBKZQT.js";import"./chunk-PSXDSPKS.js";import"./chunk-C7XT5XXE.js";import"./chunk-YMJC6QZX.js";import{a as Ht}from"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{a as li}from"./chunk-K3EEKOGY.js";import{a as ci}from"./chunk-XLPJMZ3E.js";import"./chunk-24AFRN2G.js";import{a as Wt,d as ii}from"./chunk-RFO4NYUO.js";import"./chunk-5RDJZAUT.js";import"./chunk-DB66EACG.js";import{P as At,Y as si,t as Vt}from"./chunk-ZK2MNT7Z.js";import{a as Ce,c as jt,e as ye}from"./chunk-AW7CSGKI.js";import{a as Ut,b as Ue}from"./chunk-FTDG26ID.js";import{a as Q,b as Nt,c as Se}from"./chunk-SOHFFTKU.js";import{f as Ot,g as Gt,i as $t,j as Ft,p as Ae,u as He}from"./chunk-C56YGDXA.js";import{a as Ne}from"./chunk-UX5TA32W.js";import{$ as C,$a as u,$c as De,A as ot,Ab as l,B as dt,Bb as c,Bd as Dt,C as lt,Cb as G,E as ne,Eb as se,Fd as ie,G as K,Ga as f,Gb as xt,Gd as w,Hd as P,I as Ge,Ia as p,Id as Lt,J as pt,Ja as re,L as J,N as ct,O as D,Q as de,Qb as ae,Rb as ce,Sa as o,Sb as F,Ta as d,Ua as E,Va as W,Vb as j,Vc as ve,W as ge,Wa as q,Wb as $e,Ya as M,Yc as Re,Z as U,_a as v,_c as be,a as R,ab as ht,ad as yt,b as A,ba as mt,bb as _t,ca as ut,cb as le,dc as Ct,dd as St,e as ee,ed as It,f as N,fd as Le,g as Ze,ga as fe,gd as Tt,ha as S,ia as I,ib as L,id as kt,jb as m,jd as Et,k as Y,ka as gt,kb as b,l as at,lb as h,m as x,mb as et,n as te,nd as je,oc as _e,od as Ve,pc as Fe,pd as wt,qa as ft,qc as Be,qd as Pt,ra as X,rc as oe,rd as xe,sb as pe,sd as Mt,ta as we,tb as y,ua as a,ub as vt,v as Oe,va as _,vb as O,w as Ee,wb as Pe,xb as he,yd as Bt,zb as bt,zd as Rt}from"./chunk-XTHSYQMN.js";var Ki=i=>[i,"tests"];function Ji(i,n){if(i&1&&(o(0,"span"),m(1),l(2,"date"),E(3,"wbr"),m(4),l(5,"date"),d()),i&2){let s=u();a(),h("",G(2,2,s.event.dateFrom,"dd.MM.yyyy"),"\u2013"),a(3),b(G(5,5,s.event.dateTo,"dd.MM.yyyy"))}}function Qi(i,n){if(i&1&&(o(0,"a",10)(1,"i",11),m(2,"arrow_right_alt"),d(),o(3,"span",12),m(4),d()()),i&2){let s=u(2);p("routerLink",O(2,Ki,s.event.id)),a(4),b(s.event.evaluationText)}}function Xi(i,n){if(i&1&&(o(0,"a",13)(1,"i",11),m(2,"arrow_right_alt"),d(),o(3,"span",12),m(4),d()()),i&2){let s=u(2);p("href",s.event.evaluationLink,we),a(4),h("",s.event.evaluationText," ")}}function Zi(i,n){if(i&1&&(o(0,"div",7),f(1,Qi,5,4,"a",8)(2,Xi,5,2,"a",9),d()),i&2){let s=u();a(),p("ngIf",!s.event.evaluationLink),a(),p("ngIf",s.event.evaluationLink)}}var ui=(()=>{let n=class n{constructor(){this.withRatings=!0}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events-list-entry"]],inputs:{event:"event",withRatings:"withRatings"},standalone:!0,features:[y],decls:11,vars:8,consts:[[1,"designation"],[3,"href"],[1,"date"],[4,"ngIf"],[1,"registrations"],[1,"registrations-label"],["class","rating",4,"ngIf"],[1,"rating"],["class","d-flex",3,"routerLink",4,"ngIf"],["class","d-flex",3,"href",4,"ngIf"],[1,"d-flex",3,"routerLink"],[1,"material-icons"],[1,"ps-1"],[1,"d-flex",3,"href"]],template:function(t,r){t&1&&(o(0,"div",0)(1,"a",1),m(2),d()(),o(3,"div",2),f(4,Ji,6,8,"span",3),d(),o(5,"div",4),m(6),o(7,"span",5),m(8),l(9,"translate"),d()(),f(10,Zi,3,2,"div",6)),t&2&&(a(),p("href",r.event.detailLink,we),a(),b(r.event.designation),a(2),p("ngIf",r.event.dateFrom&&r.event.dateTo),a(2),h(" ",r.event.studentCount," "),a(2),b(c(9,6,r.event.studentCount===1?"events.registration":"events.registrations")),a(2),p("ngIf",r.withRatings&&r.event.evaluationText))},dependencies:[F,oe,$e,P,w],styles:['[_nghost-%COMP%]{display:grid;padding:1rem;border-bottom:1px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}.designation[_ngcontent-%COMP%]{grid-area:designation;padding-right:1rem}.date[_ngcontent-%COMP%]{grid-area:date;padding-right:1rem}.registrations[_ngcontent-%COMP%]{grid-area:registrations;padding-right:1rem}.rating[_ngcontent-%COMP%]{grid-area:rating}.rating[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.registrations-label[_ngcontent-%COMP%]{display:none}@media (max-width: 575.98px){.registrations-label[_ngcontent-%COMP%]{display:inline}.designation[_ngcontent-%COMP%], .date[_ngcontent-%COMP%], .registrations[_ngcontent-%COMP%]{padding-right:0}[_nghost-%COMP%]{grid-template-areas:"designation" "date" "registrations" "rating";grid-template-columns:1fr}}']});let i=n;return i})();var en=10300,tn=10260,nn=10250,rn=14030,sn=10350;function Ye(i){let{HasEvaluationStarted:n,EvaluationUntil:s,HasTestGrading:e}=i.EvaluationStatusRef;if(n===!0&&(i.StatusId===rn||i.StatusId===sn))return{value:Z.Rating};if(n===!0&&e===!1){if(s)return{value:Z.RatingUntil};if(i.StatusId===en)return{value:Z.IntermediateRating}}return n===!1&&e===!0&&i.StatusId!==tn&&i.StatusId!==nn?{value:Z.Tests}:n===!0&&e===!0?s?{value:Z.Tests,label:Z.RatingUntil}:{value:Z.Tests,label:Z.IntermediateRating}:null}function gi(i){return i.EvaluationStatusRef.HasEvaluationStarted===!0}function fi(i){return i.EvaluationStatusRef.HasReviewOfEvaluationStarted===!0&&!!i.FinalGrades?.length}function Ke(i){let n=i.Classes?i.Classes.map(s=>s.Number).join(", "):null;return n?i.Designation+", "+n:i.Designation}var Z=function(i){return i.Rating="rating",i.RatingUntil="rating-until",i.IntermediateRating="intermediate-rating",i.Tests="add-tests",i}(Z||{}),Te=(()=>{let n=class n{constructor(e,t,r,g,k,T){this.coursesRestService=e,this.eventsRestService=t,this.studyClassRestService=r,this.loadingService=g,this.translate=k,this.settings=T,this.loading$=this.loadingService.loading$,this.searchSubject$=new N(""),this.search$=this.searchSubject$.asObservable(),this.roles$=new N(null),this.isClassTeacher$=this.roles$.pipe(x(B=>Ht(B,"ClassTeacherRole")),J(1)),this.withStudyCourses$=new N(!1),this.unratedCourses$=this.roles$.pipe(D(this.loadUnratedCourses.bind(this)),J(1)),this.studyCourses$=this.withStudyCourses$.pipe(D(this.loadStudyCourses.bind(this)),J(1)),this.formativeAssessments$=this.isClassTeacher$.pipe(D(this.loadFormativeAssessments.bind(this)),J(1)),this.studyClasses$=this.isClassTeacher$.pipe(D(this.loadStudyClasses.bind(this)),J(1)),this.events$=this.getEvents().pipe(J(1)),this.filteredEvents$=te([this.events$,this.search$]).pipe(x(ye(di)))}setSearch(e){this.searchSubject$.next(e)}setRoles(e){this.roles$.next(e)}setWithStudyCourses(e){this.withStudyCourses$.next(e)}getEntries(e=!1){return this.filteredEvents$.pipe(x(t=>e?t.filter(r=>r.evaluationText):t))}getEvents(){return this.loadingService.load(te([this.unratedCourses$,this.studyCourses$,this.formativeAssessments$,this.studyClasses$]),{stopOnFirstValue:!0}).pipe(x(ye(this.createAndSortEvents.bind(this))))}loadUnratedCourses(e){return this.coursesRestService.getExpandedCourses(e).pipe(x(t=>t.filter(r=>!fi(r))))}loadStudyCourses(e){return e?this.eventsRestService.getStudyCourseEvents():Y([])}loadFormativeAssessments(e){return e?this.studyClassRestService.getActiveFormativeAssessments():Y([])}loadStudyClasses(e){return e?this.studyClassRestService.getActive():Y([])}createAndSortEvents(e,t,r,g){let k=g.filter(T=>!r.map(B=>B.Id).includes(T.Id));return[...this.createFromCourses(e),...this.createFromStudyCourses(t),...this.createFromAssessments(r),...this.createFromStudyClasses(k)].sort((T,B)=>T.designation.localeCompare(B.designation))}createFromCourses(e){return e.map(t=>{let r=Ye(t);return{id:t.Id,designation:Ke(t),detailLink:this.buildLink(t.Id,"eventdetail"),studentCount:t.AttendanceRef.StudentCount||0,dateFrom:t.DateFrom,dateTo:t.DateTo,state:r?.value||null,evaluationText:this.getEvaluationText(r,t.EvaluationStatusRef.EvaluationUntil),evaluationLink:this.getEvaluationLink(r?.value,t)}})}createFromStudyCourses(e){return e.map(t=>({id:t.Id,designation:t.Designation,detailLink:this.buildLink(t.Id,"eventdetail"),studentCount:t.StudentCount,state:null}))}createFromAssessments(e){return this.createFromStudyClasses(e).map(r=>A(R({},r),{state:Z.Rating,evaluationText:this.translate.instant("events.state.rating"),evaluationLink:this.buildLink(r.id,"evaluation")}))}createFromStudyClasses(e){return e.map(t=>({id:t.Id,designation:t.Number,detailLink:this.buildLink(t.Id,"eventdetail"),studentCount:t.StudentCount,state:null}))}getEvaluationText(e,t){let r=e?.label||e?.value;return r?this.translate.instant(`events.state.${r}`)+(r===Z.RatingUntil?` ${t?Vt(t,"dd.MM.yyyy"):""}`:""):""}getEvaluationLink(e,t){return e&&e!==Z.Tests?this.buildLink(t.Id,"evaluation"):null}buildLink(e,t){return(this.settings.eventlist[t]??"").replace(":id",String(e))}};n.\u0275fac=function(t){return new(t||n)(U(me),U(oi),U(mi),U(Ue),U(ie),U(ve))},n.\u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var dn=i=>({events:i});function ln(i,n){i&1&&(o(0,"div",12),m(1),l(2,"translate"),d()),i&2&&(a(),h(" ",c(2,1,"events.rating")," "))}function pn(i,n){if(i&1&&E(0,"bkd-events-list-entry",13),i&2){let s=n.$implicit,e=u(4);p("event",s)("withRatings",e.withRatings)}}function cn(i,n){if(i&1&&(W(0),o(1,"div",6)(2,"div",7),m(3),l(4,"translate"),d(),o(5,"div",8),m(6),l(7,"translate"),d(),o(8,"div",9),m(9),l(10,"translate"),d(),f(11,ln,3,3,"div",10),d(),f(12,pn,1,2,"bkd-events-list-entry",11),q()),i&2){let s=u(2).bkdLet,e=u();a(3),b(c(4,5,"events.designation")),a(3),b(c(7,7,"events.date")),a(3),h(" ",c(10,9,"events.registrations")," "),a(2),p("ngIf",e.withRatings),a(),p("ngForOf",s.events)}}function mn(i,n){i&1&&(o(0,"p",14),m(1),l(2,"translate"),d()),i&2&&(a(),b(c(2,1,"events.no-events")))}function un(i,n){if(i&1&&(W(0),f(1,cn,13,11,"ng-container",5)(2,mn,3,3,"ng-template",null,1,se),q()),i&2){let s=L(3),e=u().bkdLet;a(),p("ngIf",(e.events==null?null:e.events.length)>0)("ngIfElse",s)}}function gn(i,n){i&1&&E(0,"bkd-spinner")}function fn(i,n){if(i&1){let s=M();o(0,"div",3)(1,"bkd-resettable-input",4),l(2,"async"),l(3,"translate"),l(4,"translate"),v("valueChange",function(t){S(s);let r=u();return I(r.state.setSearch(t))}),d(),f(5,un,4,2,"ng-container",5),l(6,"async"),f(7,gn,1,0,"ng-template",null,0,se),d()}if(i&2){let s=n.bkdLet,e=L(8),t=u();a(),p("value",c(2,6,t.state.search$))("placeholder",c(3,8,"events.search-by"))("label",c(4,10,"events.search"))("disabled",!s.events),a(4),p("ngIf",c(6,12,t.state.loading$)===!1)("ngIfElse",e)}}var Je=(()=>{let n=class n{constructor(e,t){this.state=e,this.storage=t,this.withStudyCourses=!1,this.withRatings=!0,this.state.setRoles(this.storage.getPayload()?.roles??null)}ngOnChanges(e){e.withStudyCourses&&this.state.setWithStudyCourses(e.withStudyCourses.currentValue)}};n.\u0275fac=function(t){return new(t||n)(_(Te),_(Lt))},n.\u0275cmp=C({type:n,selectors:[["bkd-events-list"]],inputs:{withStudyCourses:"withStudyCourses",withRatings:"withRatings"},standalone:!0,features:[fe,y],decls:2,vars:5,consts:[["loading",""],["noEvents",""],["class","bkd-container",4,"bkdLet"],[1,"bkd-container"],[1,"d-flex","search",3,"valueChange","value","placeholder","label","disabled"],[4,"ngIf","ngIfElse"],[1,"event-header"],[1,"designation"],[1,"date"],[1,"registrations"],["class","rating",4,"ngIf"],[3,"event","withRatings",4,"ngFor","ngForOf"],[1,"rating"],[3,"event","withRatings"],[1,"mt-3"]],template:function(t,r){t&1&&(f(0,fn,9,14,"div",2),l(1,"async")),t&2&&p("bkdLet",O(3,dn,c(1,1,r.state.getEntries(r.withRatings))))},dependencies:[Q,pi,F,ce,Se,j,P,w,ui],styles:['.search[_ngcontent-%COMP%]{max-width:500px}.event-header[_ngcontent-%COMP%]{display:grid;padding:1rem;border-bottom:2px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}@media (max-width: 575.98px){.event-header[_ngcontent-%COMP%]{display:none}}']});let i=n;return i})();var hi=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events-current"]],standalone:!0,features:[y],decls:4,vars:5,consts:[[3,"withStudyCourses","withRatings"]],template:function(t,r){t&1&&(o(0,"h1"),m(1),l(2,"translate"),d(),E(3,"bkd-events-list",0)),t&2&&(a(),b(c(2,3,"events.current.title")),a(2),p("withStudyCourses",!0)("withRatings",!1))},dependencies:[Je,P,w]});let i=n;return i})();var _i=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events-tests"]],standalone:!0,features:[y],decls:4,vars:4,consts:[[3,"withRatings"]],template:function(t,r){t&1&&(o(0,"h1"),m(1),l(2,"translate"),d(),E(3,"bkd-events-list",0)),t&2&&(a(),b(c(2,2,"events.title")),a(2),p("withRatings",!0))},dependencies:[Je,P,w]});let i=n;return i})();var vi=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events"]],standalone:!0,features:[pe([Te,At]),y],decls:1,vars:0,template:function(t,r){t&1&&E(0,"router-outlet")},dependencies:[Fe]});let i=n;return i})();function bi(i){return n=>{let s=Number(n.value);return s<=i?{greaterThan:{value:s,greaterThanValue:i}}:null}}function nt(i){return i.map(({finalGrade:n})=>n).filter(hn)}function hn(i){return i!==null}function yi(i,n,s,e){return i?.map(t=>({student:t,finalGrade:vn(t,s,e),grades:_n(t,n)}))}function _n(i,n){return n.map(s=>{if(s.Results===void 0||s.Results?.length===0)return{kind:"no-result",test:s};let e=s.Results?.find(t=>t.StudentId===i.Id);return e!==void 0?{kind:"grade",result:e,test:s}:{kind:"no-result",test:s}})}function vn(i,n,s){let e=n.find(r=>r.StudentId===i.Id),t=s.find(r=>r.StudentId===i.Id);return e?{id:e.Id,average:bn(e),finalGradeId:e.GradeId,freeHandGrade:t?Number(t.Grade):null,canGrade:e.CanGrade}:null}function bn(i){return i.AverageTestResult===0?null:i.AverageTestResult}var Si=({key:i,ascending:n})=>(s,e)=>{let t=n?1:-1;switch(i){case"FullName":return t*s.student.FullName.localeCompare(e.student.FullName);case"FinalGrade":return!s.finalGrade?.finalGradeId||!e.finalGrade?.finalGradeId?t*-1:t*xi(s.finalGrade.finalGradeId,e.finalGrade.finalGradeId);case"TestsMean":return!s.finalGrade?.average||!e.finalGrade?.average?t*-1:t*xi(s.finalGrade.average,e.finalGrade.average)}return t*xn(i,s,e)},xn=(i,n,s)=>{let e=n.grades.filter(Ci).find(r=>r.test.Id===i.Id),t=s.grades.filter(Ci).find(r=>r.test.Id===i.Id);return i.IsPointGrading&&e?.result.GradeId===t?.result.GradeId?(e?.result.Points??0)-(t?.result.Points??0):((e?.result.GradeId??Number.POSITIVE_INFINITY)-(t?.result.GradeId??Number.POSITIVE_INFINITY))*-1};function xi(i,n){return i===n?0:is.average).filter(s=>s!=null&&s!==0).map(Number);return tt(n)}function ki(i,n){let s=i.map(t=>t.freeHandGrade).filter(t=>!!t),e=i.map(t=>t.finalGradeId).filter(t=>t!==null).map(t=>n.find(r=>r.Key===t)).filter(t=>t!==void 0).map(t=>t?.Value).filter(t=>t!==void 0).map(Number).filter(t=>!isNaN(t));return tt([...e,...s])}function rt(i,n){return[...n.filter(s=>s.Id!==i?.Id),i].filter(s=>s!=null)}function Ei({id:i,selectedGradeId:n},s){return s.map(e=>e.Id!==i?e:A(R({},e),{GradeId:n}))}function wi(i,n){switch(n.type){case"reset":return n.payload;case"updateResult":return i?A(R({},i),{Tests:zt(n.payload.testResult,i.Tests||[],n.payload.ignore),Gradings:n.payload.grading?rt(n.payload.grading,i.Gradings||[]):i.Gradings}):null;case"deleteResult":return i?A(R({},i),{Tests:Yt(n.payload.testId,n.payload.studentId,i.Tests||[]),Gradings:n.payload.grading?rt(n.payload.grading,i.Gradings||[]):i.Gradings||[]}):null;case"toggle-test-state":return i?A(R({},i),{Tests:Kt(n.payload,i.Tests||[])}):null;case"final-grade-overwritten":return i?A(R({},i),{Gradings:Ei({id:n.payload.id,selectedGradeId:n.payload.selectedGradeId},i.Gradings||[])}):null;case"replace-grades":return i?A(R({},i),{Gradings:n.payload}):null;case"delete-test":return i?A(R({},i),{Tests:Jt(n.payload,i.Tests||[])}):null;default:return i}}var Pi=(()=>{let n=class n extends Nt{constructor(e,t){super(e,t,ti,"Gradings")}updateGrade(e,t){return this.http.put(`${this.baseUrl}/${e}`,{GradeId:t}).pipe(x(()=>e))}};n.\u0275fac=function(t){return new(t||n)(U(Ct),U(ve))},n.\u0275prov=ge({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var st={onlyMine:!1,hidePublished:!1},V=(()=>{let n=class n{constructor(e,t,r,g,k){this.coursesRestService=e,this.gradingScalesRestService=t,this.gradingsRestService=r,this.loadingService=g,this.sortService=k,this.action$=new Ze(1),this.loading$=this.loadingService.loading$,this._courseId$=new Ze(1),this.courseId$=this._courseId$.asObservable(),this.fetchedCourse$=this._courseId$.pipe(D(T=>this.loadingService.load(this.coursesRestService.getExpandedCourse(T))),J(1)),this.course$=Oe(this.action$,this.fetchedCourse$.pipe(Ee(He),x(T=>({type:"reset",payload:T})))).pipe(pt(wi,null),Ee(He),J(1)),this.tests$=this.course$.pipe(x(T=>T.Tests||[]),x(Qt)),this.hasTests$=this.tests$.pipe(x(T=>T.length>0)),this.filterSubject$=new N(st),this.filter$=this.filterSubject$.asObservable(),this.expandedHeaderSubject$=new N(!1),this.expandedHeader$=this.expandedHeaderSubject$.asObservable(),this.filteredTests$=te([this.tests$,this.filter$]).pipe(x(([T,B])=>T.filter(z=>(!B.onlyMine||z.IsOwner)&&(!B.hidePublished||!z.IsPublished)))),this.sorting$=this.sortService.sorting$,this.studentGrades$=te([this.course$,this.filteredTests$,this.sorting$]).pipe(x(ye(this.toStudentGrades.bind(this)))),this.canSetFinalGrade$=this.course$.pipe(x(gi)),this.gradingScaleIds$=this.course$.pipe(x(T=>Rt([...(T.Tests??[]).map(B=>B.GradingScaleId),T.GradingScaleId]).filter(He)),K(Bt),J(1)),this.gradingScales$=this.gradingScaleIds$.pipe(D(T=>this.gradingScalesRestService.getGradingScales(T)),J(1)),this.UNDEFINED_GRADINGSCALE_ID=-1,this.gradingScalesOptions$=this.gradingScales$.pipe(x(T=>T.map(B=>{let z=B?.Id||this.UNDEFINED_GRADINGSCALE_ID,ke=B?.Grades.map(Me=>({Key:Me.Id,Value:Me.Designation}))||[];return{id:z,options:ke}}).reduce((B,z)=>A(R({},B),{[z.id]:z.options}),{})),J(1)),this.meanOfStudentGradesForCourse$=this.studentGrades$.pipe(x(T=>Ti(nt(T)))),this.meanOfFinalGradesForCourse$=te([this.gradingScalesOptions$,this.studentGrades$]).pipe(D(ye(this.meanOfOverwrittenGradesForCourse.bind(this))))}setCourseId(e){this._courseId$.next(e)}setFilter(e){this.filterSubject$.next(e)}gradingOptionsForTest$(e){return this.gradingOptions$(e.GradingScaleId)}gradingOptionsForCourse$(){return this.course$.pipe(D(e=>this.gradingOptions$(e.GradingScaleId)))}toStudentGrades(e,t=[],r){return yi(e.ParticipatingStudents??[],t,e.Gradings??[],e.FinalGrades??[]).sort(Si(r))}setSorting(e){this.sortService.setSorting(e)}getSortingChar$(e){return this.sortService.getSortingChar$(e)}sortBy(e){this.sortService.toggleSorting(e)}toggleHeader(e){this.expandedHeaderSubject$.next(e)}optimisticallyUpdateGrade(e){return this.course$.pipe(ne(1),x(t=>{let{originalResult:r,updatedResult:g}=this.buildOptimisticResultUpdate(t,e);return this.updateTestResult(g,null),r}))}saveGrade(e,t){this.course$.pipe(ne(1),D(r=>this.coursesRestService.updateTestResult(r.Id,e).pipe(ot(g=>(t&&this.updateTestResult(R({},t),null),at(()=>g)))))).subscribe(({testResult:r,grading:g})=>this.updateOrDeleteTestResult(e.testId,e.studentId,r,g,"gradeId"in e?"grade":"points"))}publish(e){this.coursesRestService.publishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}unpublish(e){this.coursesRestService.unpublishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}deleteTest(e){this.action$.next({type:"delete-test",payload:e})}overwriteFinalGrade({id:e,selectedGradeId:t}){this.gradingsRestService.updateGrade(e,t).subscribe(()=>{this.action$.next({type:"final-grade-overwritten",payload:{id:e,selectedGradeId:t}})})}setAveragesAsFinalGrades(e){this.coursesRestService.setAverageAsFinalGrade(e).subscribe(t=>this.action$.next({type:"replace-grades",payload:t.Gradings}))}buildOptimisticResultUpdate(e,t){let r=qt(e,t.testId,t.studentId),g=r?R({},r):{Id:"",TestId:t.testId,StudentId:t.studentId,CourseRegistrationId:0,GradeId:null,GradeValue:null,GradeDesignation:null,Points:null};return g.GradeId="gradeId"in t?t.gradeId:r?.GradeId??null,g.Points="points"in t?t.points:r?.Points??null,{originalResult:r,updatedResult:g}}updateOrDeleteTestResult(e,t,r,g,k){r?this.updateTestResult(r,g,k):this.deleteTestResult(e,t,g)}updateTestResult(e,t,r){this.action$.next({type:"updateResult",payload:{testResult:e,grading:t??null,ignore:r}})}deleteTestResult(e,t,r){this.action$.next({type:"deleteResult",payload:{testId:e,studentId:t,grading:r}})}toggleTestPublishedState(e){this.action$.next({type:"toggle-test-state",payload:e})}gradingOptions$(e){return e===null?Y(null):this.gradingScalesOptions$.pipe(x(t=>t[e]),J(1))}meanOfOverwrittenGradesForCourse(e,t){return this.course$.pipe(x(r=>{if(r.GradingScaleId===null||e[r.GradingScaleId]===void 0)return null;let g=e[r.GradingScaleId];return ki(nt(t),g)}))}};n.\u0275fac=function(t){return new(t||n)(U(me),U(ni),U(Pi),U(Ue),U(ci))},n.\u0275prov=ge({token:n,factory:n.\u0275fac});let i=n;return i})();var Sn=i=>({formGroup:i}),In=i=>["/events",i,"tests"];function Tn(i,n){if(i&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),i&2){let s=n.$implicit;a(),h(" ",G(2,1,"global.validation-errors."+s.error,s.params)," ")}}function kn(i,n){if(i&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),i&2){let s=n.$implicit;a(),h(" ",G(2,1,"global.validation-errors."+s.error,s.params)," ")}}function En(i,n){if(i&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),i&2){let s=n.$implicit;a(),h(" ",G(2,1,"global.validation-errors."+s.error,s.params)," ")}}function wn(i,n){if(i&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),i&2){let s=n.$implicit;a(),h(" ",G(2,1,"global.validation-errors."+s.error,s.params)," ")}}function Pn(i,n){if(i&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),i&2){let s=n.$implicit;a(),h(" ",G(2,1,"global.validation-errors."+s.error,s.params)," ")}}function Mn(i,n){if(i&1&&(W(0),o(1,"div",32)(2,"div",33)(3,"div",17)(4,"label",34),m(5),l(6,"translate"),d(),o(7,"div",35),E(8,"input",36),l(9,"async"),f(10,wn,3,4,"div",8),l(11,"async"),d()()(),o(12,"div",33)(13,"div",17)(14,"label",37),m(15),l(16,"translate"),d(),o(17,"div",35),E(18,"input",38),l(19,"async"),f(20,Pn,3,4,"div",8),l(21,"async"),d()()()(),o(22,"div",39),gt(),o(23,"math")(24,"mi"),m(25),l(26,"translate"),d(),o(27,"mo"),m(28,"="),d(),o(29,"mfrac")(30,"mrow")(31,"mi"),m(32),l(33,"translate"),d(),o(34,"mo"),m(35,"\xD7"),d(),o(36,"mn"),m(37,"5"),d()(),o(38,"mi"),m(39),l(40,"translate"),d()(),o(41,"mo"),m(42,"+"),d(),o(43,"mn"),m(44,"1"),d()()(),q()),i&2){let s,e,t=u(3);a(5),b(c(6,11,"tests.form.max-points")),a(3),re("is-invalid",((s=c(9,13,t.maxPointsErrors$))==null?null:s.length)||!1),a(2),p("ngForOf",c(11,15,t.maxPointsErrors$)),a(5),b(c(16,17,"tests.form.max-points-adjusted")),a(3),re("is-invalid",((e=c(19,19,t.maxPointsAdjustedErrors$))==null?null:e.length)||!1),a(2),p("ngForOf",c(21,21,t.maxPointsAdjustedErrors$)),a(5),h(" ",c(26,23,"tests.form.math.grade")," "),a(7),h(" ",c(33,25,"tests.form.math.points")," "),a(7),b(c(40,27,"tests.form.math.max-points"))}}function On(i,n){i&1&&(o(0,"div",40)(1,"span",41),m(2,"Loading..."),d()())}function Gn(i,n){if(i&1){let s=M();o(0,"form",3),v("ngSubmit",function(){S(s);let t=u(2);return I(t.onSubmit())}),o(1,"div",4)(2,"div",5)(3,"label",6),m(4),l(5,"translate"),d(),E(6,"input",7),l(7,"async"),l(8,"translate"),f(9,Tn,3,4,"div",8),l(10,"async"),d(),o(11,"div",9)(12,"label",10),m(13),l(14,"translate"),d(),o(15,"div",11)(16,"span",12)(17,"i",13),m(18,"calendar_today"),d()(),o(19,"input",14,0),l(21,"async"),l(22,"translate"),v("click",function(){S(s);let t=L(20);return I(t.toggle())}),d(),f(23,kn,3,4,"div",8),l(24,"async"),d()()(),o(25,"div",15)(26,"label",16),m(27),l(28,"translate"),d(),o(29,"div",5)(30,"div",17)(31,"label",18),m(32),l(33,"translate"),d(),o(34,"div",19),E(35,"input",20),l(36,"async"),f(37,En,3,4,"div",8),l(38,"async"),d()()()(),o(39,"div")(40,"label",16),m(41),l(42,"translate"),d(),o(43,"div",21),E(44,"input",22),o(45,"label",23),m(46),l(47,"translate"),d()(),o(48,"div",21),E(49,"input",24),o(50,"label",25),m(51),l(52,"translate"),d()(),f(53,Mn,45,29,"ng-container",26),d(),o(54,"div",27)(55,"button",28),l(56,"async"),m(57),l(58,"translate"),d(),o(59,"button",29),m(60),l(61,"translate"),f(62,On,3,0,"div",30),d()()()}if(i&2){let s,e,t,r=u().bkdLet,g=u();p("formGroup",r.formGroup),a(4),b(c(5,29,"tests.form.designation")),a(2),re("is-invalid",((s=c(7,31,g.designationErrors$))==null?null:s.length)||!1),p("placeholder",c(8,33,"tests.form.designation-placeholder")),a(3),p("ngForOf",c(10,35,g.designationErrors$)),a(4),b(c(14,37,"tests.form.date")),a(3),p("id",g.componentId),a(3),re("is-invalid",((e=c(21,39,g.dateErrors$))==null?null:e.length)||!1),p("placeholder",c(22,41,"shared.date-select.default-placeholder")),a(4),p("ngForOf",c(24,43,g.dateErrors$)),a(4),b(c(28,45,"tests.form.weight")),a(5),b(c(33,47,"tests.form.factor")),a(3),re("is-invalid",((t=c(36,49,g.weightErrors$))==null?null:t.length)||!1),a(2),p("ngForOf",c(38,51,g.weightErrors$)),a(4),b(c(42,53,"tests.form.grading-type")),a(3),p("value",!1),a(2),b(c(47,55,"tests.form.grades")),a(3),p("value",!0),a(2),b(c(52,57,"tests.form.points")),a(2),p("ngIf",r.formGroup.get("isPointGrading").value),a(2),p("disabled",g.saving)("routerLink",O(65,In,c(56,59,g.courseId$))),a(2),h(" ",c(58,61,"tests.form.cancel")," "),a(2),p("disabled",g.saving),a(),h(" ",c(61,63,"tests.form.save")," "),a(2),p("ngIf",g.saving)}}function $n(i,n){if(i&1&&(W(0),f(1,Gn,63,67,"form",2),q()),i&2){let s=n.bkdLet;a(),p("ngIf",s.formGroup)}}var Qe=(()=>{let n=class n{constructor(e,t,r){this.fb=e,this.translate=t,this.testStateService=r,this.test=null,this.saving=!1,this.save=new X,this.componentId=Dt("bkd-tests-edit-form"),this.formGroup=this.createFormGroup(),this.submitted$=new N(!1),this.destroy$=new ee,this.designationErrors$=Ce(Y(this.formGroup),this.submitted$,"designation"),this.dateErrors$=Ce(Y(this.formGroup),this.submitted$,"date"),this.maxPointsErrors$=Ce(Y(this.formGroup),this.submitted$,"maxPoints"),this.maxPointsAdjustedErrors$=Ce(Y(this.formGroup),this.submitted$,"maxPointsAdjusted"),this.weightErrors$=Ce(Y(this.formGroup),this.submitted$,"weight"),this.courseId$=this.testStateService.courseId$}ngOnInit(){this.test&&this.setInitialValues(this.test),jt(Y(this.formGroup),"isPointGrading").pipe(de(this.destroy$)).subscribe(this.togglePointFieldsDisability.bind(this))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup.valid&&this.save.emit(this.formGroup.value)}createFormGroup(){return this.fb.group({designation:["",be.required],date:[null,be.required],weight:[1,be.compose([be.required,bi(0)])],isPointGrading:[!1],maxPoints:[{value:null,disabled:!0},be.required],maxPointsAdjusted:[{value:null,disabled:!0},null]})}setInitialValues(e){this.formGroup.patchValue({designation:e.Designation,date:e.Date,weight:e.Weight,isPointGrading:e.IsPointGrading,maxPoints:e.MaxPoints,maxPointsAdjusted:e.MaxPointsAdjusted}),e.Results&&e.Results.length>0&&(this.formGroup.get("isPointGrading")?.disable(),this.formGroup.get("maxPoints")?.disable(),this.formGroup.get("maxPointsAdjusted")?.disable()),this.togglePointFieldsDisability()}togglePointFieldsDisability(){let e=this.formGroup.get("maxPoints"),t=this.formGroup.get("maxPointsAdjusted");this.formGroup.get("isPointGrading")?.value?(e?.enable(),t?.enable()):(e?.reset({value:this.test?.MaxPoints,disabled:!0}),t?.reset({value:this.test?.MaxPointsAdjusted,disabled:!0}))}};n.\u0275fac=function(t){return new(t||n)(_(Pt),_(ie),_(V))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-edit-form"]],inputs:{test:"test",saving:"saving"},outputs:{save:"save"},standalone:!0,features:[pe([{provide:Ot,useClass:Ft},{provide:Gt,useClass:li}]),y],decls:1,vars:3,consts:[["dp","ngbDatepicker"],[4,"bkdLet"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"row","g-3","mb-3"],[1,"col-md-6"],["for","designation",1,"form-label"],["id","designation","name","designation","type","text","formControlName","designation","required","",1,"form-control",3,"placeholder"],["class","invalid-feedback",4,"ngFor","ngForOf"],[1,"col-md-6","mb-3"],["for","date",1,"form-label"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["id","date","name","date","type","text","ngbDatepicker","","formControlName","date","required","",1,"form-control",3,"click","placeholder"],[1,"row","mb-3"],[1,"form-label"],[1,"row"],["for","factor",1,"form-label","col-3","col-sm-2"],[1,"col-9","col-sm-10"],["id","factor","name","factor","type","number","formControlName","weight","step","0.05","min","0","required","",1,"form-control"],[1,"form-check"],["type","radio","formControlName","isPointGrading","id","type-grades",1,"form-check-input",3,"value"],["for","type-grades",1,"form-check-label"],["type","radio","formControlName","isPointGrading","id","type-points",1,"form-check-input",3,"value"],["for","type-points",1,"form-check-label"],[4,"ngIf"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","routerLink"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"invalid-feedback"],[1,"row","ms-4","mb-3","g-3"],[1,"col-sm-6","col-md-4"],["for","max-points",1,"ms-2","col-4","col-form-label"],[1,"col-6"],["type","number","name","maxPoints","id","max-points","formControlName","maxPoints","step","0.01","min","0","max","999","required","",1,"form-control"],["for","max-points-adjusted",1,"ms-2","col-4","col-form-label"],["type","number","name","maxPointsAdjusted","id","max-points-adjusted","formControlName","maxPointsAdjusted","step","0.01","min","0","max","999",1,"form-control"],[1,"ms-4","ps-3","py-3"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(t,r){t&1&&f(0,$n,2,1,"ng-container",1),t&2&&p("bkdLet",O(1,Sn,r.formGroup))},dependencies:[Q,F,xe,It,Re,Le,Tt,De,yt,wt,Ve,je,Mt,kt,Et,ce,$t,oe,j,P,w],styles:["#factor[_ngcontent-%COMP%], #max-points[_ngcontent-%COMP%], #max-points-adjusted[_ngcontent-%COMP%]{width:5em}"]});let i=n;return i})();var Bn=(i,n)=>({courseId:i,saving:n});function Rn(i,n){if(i&1){let s=M();o(0,"div",1)(1,"bkd-tests-edit-form",2),v("save",function(t){S(s);let r=u();return I(r.save(t))}),d()()}if(i&2){let s=n.bkdLet;a(),p("saving",s.saving)}}var Oi=(()=>{let n=class n{constructor(e,t,r,g,k){this.route=e,this.courseService=t,this.toastService=r,this.translate=g,this.router=k,this.saving$=new N(!1),this.courseId$=this.route.paramMap.pipe(x(T=>Number(T.get("id"))),K())}save(e){this.saving$.next(!0);let{designation:t,date:r,weight:g,isPointGrading:k,maxPoints:T,maxPointsAdjusted:B}=e;this.courseId$.pipe(D(z=>this.courseService.add(z,r,t,g,k,T,B)),Ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}navigateBack(){this.courseId$.subscribe(e=>this.router.navigate(["events",e,"tests"]))}};n.\u0275fac=function(t){return new(t||n)(_(_e),_(me),_(Ne),_(ie),_(Be))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-add"]],standalone:!0,features:[y],decls:6,vars:11,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"save","saving"]],template:function(t,r){t&1&&(o(0,"h1"),m(1),l(2,"translate"),d(),f(3,Rn,2,1,"div",0),l(4,"async"),l(5,"async")),t&2&&(a(),b(c(2,2,"tests.add-title")),a(2),p("bkdLet",Pe(8,Bn,c(4,4,r.courseId$),c(5,6,r.saving$))))},dependencies:[Q,Qe,j,P,w]});let i=n;return i})();var Gi=(()=>{let n=class n{constructor(e){this.activeModal=e}get canDeleteTest(){return(this.test?.Results?.filter(t=>t.GradeId!==null||t.GradeValue!==null||t.Points!==null)||[]).length===0}};n.\u0275fac=function(t){return new(t||n)(_(Ae))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-delete"]],inputs:{test:"test"},standalone:!0,features:[y],decls:13,vars:10,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click","hidden"],[1,"px-2"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"],[1,"px-3"]],template:function(t,r){t&1&&(o(0,"div",0)(1,"p",1),m(2),l(3,"translate"),d()(),o(4,"div",2)(5,"button",3),v("click",function(){return r.activeModal.dismiss()}),o(6,"span",4),m(7),l(8,"translate"),d()(),o(9,"button",5),v("click",function(){return r.activeModal.close(r.canDeleteTest?r.test:null)}),o(10,"span",6),m(11),l(12,"translate"),d()()()),t&2&&(a(2),h(" ",c(3,4,r.canDeleteTest?"tests.form.confirm":"tests.form.delete-not-allowed")," "),a(3),p("hidden",!r.canDeleteTest),a(2),h(" ",c(8,6,"tests.dialog.no")," "),a(4),h(" ",c(12,8,r.canDeleteTest?"tests.dialog.yes":"tests.dialog.ok")," "))},dependencies:[P,w]});let i=n;return i})();var jn=(i,n,s)=>({courseId:i,test:n,saving:s}),Vn=i=>({test:i});function An(i,n){if(i&1){let s=M();W(0),o(1,"div",4)(2,"h1"),m(3),l(4,"translate"),d(),o(5,"button",5),v("click",function(){S(s);let t=u().bkdLet,r=u();return I(r.openDeleteModal(t.test))}),o(6,"i",6),m(7,"delete"),d()()(),o(8,"bkd-tests-edit-form",7),v("save",function(t){S(s);let r=u(2);return I(r.save(t))}),d(),q()}if(i&2){let s=u().bkdLet;a(3),h(" ",G(4,3,"tests.edit-title",O(6,Vn,s.test.Designation))," "),a(5),p("test",s.test)("saving",s.saving)}}function Nn(i,n){i&1&&E(0,"bkd-spinner")}function Hn(i,n){if(i&1&&(o(0,"div",2),f(1,An,9,8,"ng-container",3),l(2,"async"),f(3,Nn,1,0,"ng-template",null,0,se),d()),i&2){let s=L(4),e=u();a(),p("ngIf",c(2,2,e.state.loading$)===!1)("ngIfElse",s)}}var $i=(()=>{let n=class n{constructor(e,t,r,g,k,T,B){this.state=e,this.courseService=t,this.route=r,this.toastService=g,this.translate=k,this.router=T,this.modalService=B,this.saving$=new N(!1),this.testId$=this.route.paramMap.pipe(x(z=>Number(z.get("testId"))),K()),this.test$=te([this.state.tests$,this.testId$]).pipe(x(([z,ke])=>z.find(Me=>Me.Id===ke)))}openDeleteModal(e){let t=this.modalService.open(Gi);t.componentInstance.test=e,t.result.then(r=>{r&&this.courseService.delete(e.CourseId,e.Id).subscribe(this.onDeleteSuccess.bind(this))},()=>{})}save(e){this.saving$.next(!0);let{designation:t,date:r,weight:g,isPointGrading:k,maxPoints:T,maxPointsAdjusted:B}=e;te([this.state.courseId$,this.testId$]).pipe(ne(1),D(([z,ke])=>this.courseService.update(z,ke,t,r,g,k,T,B)),Ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}onDeleteSuccess(e){this.toastService.success(this.translate.instant("tests.form.delete-success")),this.state.deleteTest(e),this.navigateBack()}navigateBack(){this.state.courseId$.pipe(ne(1)).subscribe(e=>this.router.navigate(["events",e,"tests"]))}};n.\u0275fac=function(t){return new(t||n)(_(V),_(me),_(_e),_(Ne),_(ie),_(Be),_(ze))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-edit"]],standalone:!0,features:[y],decls:4,vars:11,consts:[["loading",""],["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-primary","btn-icon",3,"click"],[1,"material-icons"],[3,"save","test","saving"]],template:function(t,r){t&1&&(f(0,Hn,5,4,"div",1),l(1,"async"),l(2,"async"),l(3,"async")),t&2&&p("bkdLet",he(7,jn,c(1,1,r.state.courseId$),c(2,3,r.test$),c(3,5,r.saving$)))},dependencies:[Q,F,Qe,Se,j,P,w]});let i=n;return i})();var Un=i=>({designation:i}),Fi=(()=>{let n=class n{constructor(e){this.activeModal=e}};n.\u0275fac=function(t){return new(t||n)(_(Ae))},n.\u0275cmp=C({type:n,selectors:[["bkd-publish-test"]],inputs:{test:"test"},standalone:!0,features:[y],decls:11,vars:12,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"]],template:function(t,r){t&1&&(o(0,"div",0)(1,"p",1),m(2),l(3,"translate"),d()(),o(4,"div",2)(5,"button",3),v("click",function(){return r.activeModal.dismiss()}),m(6),l(7,"translate"),d(),o(8,"button",4),v("click",function(){return r.activeModal.close(!0)}),m(9),l(10,"translate"),d()()),t&2&&(a(2),h(" ",G(3,3,r.test.IsPublished?"tests.publishing.unpublish":"tests.publishing.publish",O(10,Un,r.test.Designation))," "),a(4),h(" ",c(7,6,"tests.publishing.cancel")," "),a(3),h(" ",c(10,8,"tests.publishing.confirm")," "))},dependencies:[P,w],encapsulation:2});let i=n;return i})();var Wn=i=>({maxPoints:i});function qn(i,n){if(i&1&&(o(0,"div",8),m(1),l(2,"translate"),d()),i&2){let s=u(2);a(),h(" ",G(2,1,"global.validation-errors.invalidPoints",O(4,Wn,s.maxPoints))," ")}}function zn(i,n){if(i&1){let s=M();o(0,"div",5)(1,"input",6,0),v("ngModelChange",function(){S(s);let t=L(2),r=u();return I(r.onPointsChange(t.value))}),d(),f(3,qn,3,6,"div",7),d()}if(i&2){let s=L(2),e=u();a(),re("is-invalid",s.errors),le("max",e.maxPoints),le("tabindex",e.tabIndex),p("disabled",e.grade.test.IsPublished)("ngModel",e.grade.kind==="grade"?e.grade.result.Points:null),a(2),p("ngIf",s.errors)}}var Yn=1250,Bi=(()=>{let n=class n{constructor(e){this.state=e,this.maxPoints=0,this.pointsSubject$=new ee,this.gradeSubject$=new ee,this.gradingScaleDisabledSubject$=new N(!0),this.gradingScaleDisabled$=this.gradingScaleDisabledSubject$.asObservable(),this.destroy$=new ee}ngOnInit(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale()),this.maxPoints=Ii(this.grade),this.initSave(this.pointsSubject$.pipe(Ee(this.isValid.bind(this)),x(e=>({studentId:this.student.Id,testId:this.grade.test.Id,points:e?Number(e):null})))),this.initSave(this.gradeSubject$.pipe(x(e=>({studentId:this.student.Id,testId:this.grade.test.Id,gradeId:e}))))}ngOnChanges(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale())}ngOnDestroy(){this.destroy$.next()}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabledSubject$.next(!(e===null||e===""))}onGradeChange(e){this.gradeSubject$.next(e)}isValid(e){return e===""||e===null?!0:isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}initSave(e){e.pipe(dt(t=>this.state.optimisticallyUpdateGrade(t).pipe(x(r=>({params:t,originalResult:r})))),lt(Yn),de(this.destroy$)).subscribe(({params:t,originalResult:r})=>this.state.saveGrade(t,r))}disableGradingScale(){return this.grade.test.IsPublished?!0:this.grade.kind==="no-result"?!1:this.grade.result.Points!=null&&this.grade.test.IsPointGrading}};n.\u0275fac=function(t){return new(t||n)(_(V))},n.\u0275cmp=C({type:n,selectors:[["bkd-grade"]],inputs:{grade:"grade",student:"student",tabIndex:"tabIndex",gradeOptions:"gradeOptions"},standalone:!0,features:[fe,y],decls:5,vars:8,consts:[["points","ngModel"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],["class","point-input-container me-2 me-md-3",4,"ngIf"],["data-testid","grade-select",1,"grade-select",3,"valueChange","options","allowEmpty","value","disabled","tabindex"],[1,"point-input-container","me-2","me-md-3"],["type","number","step","0.01","min","0","data-testid","point-input",1,"form-control",3,"ngModelChange","max","disabled","tabindex","ngModel"],["class","invalid-feedback","data-testid","validation-error-message",4,"ngIf"],["data-testid","validation-error-message",1,"invalid-feedback"]],template:function(t,r){t&1&&(o(0,"div",1)(1,"div",2),f(2,zn,4,7,"div",3),o(3,"bkd-select",4),l(4,"async"),v("valueChange",function(k){return r.onGradeChange(k)}),d()()()),t&2&&(a(2),p("ngIf",r.grade.test.IsPointGrading),a(),p("options",r.gradeOptions)("allowEmpty",!0)("value",r.grade.kind==="grade"?r.grade.result.GradeId:null)("disabled",c(4,6,r.gradingScaleDisabled$))("tabindex",r.tabIndex))},dependencies:[F,xe,Re,Le,De,Ve,je,St,Ie,j,P,w],styles:[".point-input-container[_ngcontent-%COMP%]{width:4em}[_nghost-%COMP%] select{min-width:13ch}@media (min-width: 576px){.point-input-container[_ngcontent-%COMP%]{width:5em}}"]});let i=n;return i})();function Kn(i,n){if(i&1&&(o(0,"span",3),m(1),d()),i&2){let s=u();a(),b(s.calculatePointsAverage(s.test))}}var Ri=(()=>{let n=class n{constructor(e){this.locale=e}calculatePointsAverage(e){return this.safeAverage(e,2,We)}calculateGradeAverage(e){return this.safeAverage(e,3,qe)}safeAverage(e,t,r){try{return ei(r(e),this.locale,t)}catch{return Xt}}};n.\u0275fac=function(t){return new(t||n)(_(xt))},n.\u0275cmp=C({type:n,selectors:[["bkd-average-grades"]],inputs:{test:"test"},standalone:!0,features:[y],decls:4,vars:2,consts:[[1,"d-flex","flex-row","w-100"],["class","mr-2 mr-md-3 average-points","data-testid","average-points",4,"ngIf"],["data-testid","average-grade"],["data-testid","average-points",1,"mr-2","mr-md-3","average-points"]],template:function(t,r){t&1&&(o(0,"div",0),f(1,Kn,2,1,"span",1),o(2,"span",2),m(3),d()()),t&2&&(a(),p("ngIf",r.test.IsPointGrading),a(2),b(r.calculateGradeAverage(r.test)))},dependencies:[F],styles:[".average-points[_ngcontent-%COMP%]{min-width:4.5em}@media (min-width: 576px){.average-points[_ngcontent-%COMP%]{min-width:6em}}"]});let i=n;return i})();var Di=(()=>{let n=class n{constructor(){this.disabled=!1,this.gradeIdSelected=new X}onGradeChange(e){this.gradeId?.valueOf()!==void 0&&this.gradeIdSelected.emit({id:this.gradeId?.valueOf(),selectedGradeId:e})}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-grade-select"]],inputs:{options:"options",valueId:"valueId",gradeId:"gradeId",disabled:"disabled"},outputs:{gradeIdSelected:"gradeIdSelected"},standalone:!0,features:[y],decls:1,vars:4,consts:[["data-testid","grade-select",3,"valueChange","options","allowEmpty","value","disabled"]],template:function(t,r){t&1&&(o(0,"bkd-select",0),v("valueChange",function(k){return r.onGradeChange(k)}),d()),t&2&&p("options",r.options)("allowEmpty",!0)("value",r.valueId)("disabled",r.disabled)},dependencies:[Ie],styles:["[_nghost-%COMP%] select{min-width:13ch}"]});let i=n;return i})();var Jn=576,Li=(()=>{let n=class n{constructor(e,t){this.portal=e,this.state=t,this.destroy$=new ee,this.handleWindowScroll=()=>{this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleWindowResize=()=>{this.updateStickyWidth(),this.updateStickyVisibility(),this.updateStickyTopOffset()},this.handleTableScroll=()=>{this.updateStickyLeftOffset()}}ngOnInit(){te([this.state.filteredTests$,this.state.expandedHeader$]).pipe(de(this.destroy$)).subscribe(()=>setTimeout(()=>this.updateStickyWidth()))}ngAfterViewInit(){this.handleWindowScroll(),this.handleTableScroll(),this.handleWindowResize(),this.window.addEventListener("scroll",this.handleWindowScroll),this.getTableScrollContainer()?.addEventListener("scroll",this.handleTableScroll),this.window.addEventListener("resize",this.handleWindowResize)}ngOnDestroy(){this.window.removeEventListener("scroll",this.handleWindowScroll),this.getTableScrollContainer()?.removeEventListener("scroll",this.handleTableScroll),this.window.removeEventListener("resize",this.handleWindowResize)}get window(){return this.portal.window??window}getTableScrollContainer(){return document.querySelector(".table-responsive-wrapper")??null}updateStickyVisibility(){if(this.isSmallBreakpointDown())return;let e=this.inlineHeader.getTop()+this.getIframeScrollY();this.stickyHeader.shown=this.getScrollTop()>e}updateStickyTopOffset(){this.isSmallBreakpointDown()||this.stickyHeader.setTopOffset(this.portal.inIframe?this.getScrollTop():0)}updateStickyLeftOffset(){this.isSmallBreakpointDown()||this.stickyHeader.setLeftOffset(this.inlineHeader.getLeft())}updateStickyWidth(){this.isSmallBreakpointDown()||(this.stickyHeader.setWidth(this.inlineHeader.getWidth()),this.stickyHeader.setColumnWidths(this.inlineHeader.getColumnWidths()),this.stickyHeader.setStickyColumnHeights(this.inlineHeader.getStickyColumnsHeights()))}getScrollTop(){return this.window.scrollY-this.portal.getIframeTop()}getIframeScrollY(){return window.scrollY}isSmallBreakpointDown(){return window.innerWidth({"btn-primary":i,"btn-outline-secondary":n}),Vi=(()=>{let n=class n{constructor(){this.filter=st,this.filterChange=new X}showOnlyMine(){this.filterChange.next(A(R({},this.filter),{onlyMine:!0}))}showAll(){this.filterChange.next(A(R({},this.filter),{onlyMine:!1}))}onHidePublishedChange(e){let t=(e.target&&e.target instanceof HTMLInputElement&&e.target?.checked)??!1;this.filterChange.next(A(R({},this.filter),{hidePublished:t}))}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-test-table-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[y],decls:13,vars:18,consts:[[1,"only-mine-buttons"],["type","button",1,"btn","desktop",3,"click","ngClass"],["type","button",1,"btn","ms-2","desktop",3,"click","ngClass"],[1,"hide-published"],[1,"form-check"],["id","hide-published","type","checkbox",1,"form-check-input",3,"change","checked"],["for","hide-published",1,"form-check-label"]],template:function(t,r){t&1&&(o(0,"div",0)(1,"button",1),v("click",function(){return r.showAll()}),m(2),l(3,"translate"),d(),o(4,"button",2),v("click",function(){return r.showOnlyMine()}),m(5),l(6,"translate"),d()(),o(7,"div",3)(8,"div",4)(9,"input",5),v("change",function(k){return r.onHidePublishedChange(k)}),d(),o(10,"label",6),m(11),l(12,"translate"),d()()()),t&2&&(a(),p("ngClass",Pe(12,ji,!r.filter.onlyMine,r.filter.onlyMine)),a(),h(" ",c(3,6,"tests.all-tests")," "),a(2),p("ngClass",Pe(15,ji,r.filter.onlyMine,!r.filter.onlyMine)),a(),h(" ",c(6,8,"tests.owned-tests")," "),a(4),p("checked",r.filter.hidePublished),a(2),h(" ",c(12,10,"tests.hide-published")," "))},dependencies:[ae,xe,P,w],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.only-mine-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;height:3.625rem}.hide-published[_ngcontent-%COMP%]{display:flex;align-items:center;height:2.375rem;margin-bottom:1rem}.hide-published[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:300}.hide-published[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:0}"]});let i=n;return i})();var Qn=["*"],Ai=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-preserve-line-height"]],standalone:!0,features:[y],ngContentSelectors:Qn,decls:3,vars:0,template:function(t,r){t&1&&(ht(),o(0,"div"),_t(1),m(2,"\xA0"),d())},encapsulation:2});let i=n;return i})();var Ni=(()=>{let n=class n{constructor(e){this.translate=e}transform(e){return`${e.Weight} (${e.WeightPercent}%)${this.getPoints(e)}`}getPoints(e){return e.IsPointGrading?`, ${e.MaxPointsAdjusted??e.MaxPoints} ${this.translate.instant("tests.summary.points")}`:""}};n.\u0275fac=function(t){return new(t||n)(_(ie,16))},n.\u0275pipe=ut({name:"testSummaryShort",type:n,pure:!0,standalone:!0});let i=n;return i})();var Xn=i=>[i,"edit"];function Zn(i,n){i&1&&(o(0,"i",12),m(1,"edit"),d())}function er(i,n){if(i&1&&(o(0,"div",8)(1,"div",9)(2,"bkd-preserve-line-height"),m(3),l(4,"date"),d(),o(5,"a",10),f(6,Zn,2,0,"i",11),d()(),o(7,"bkd-preserve-line-height"),m(8),l(9,"testSummaryShort"),d(),o(10,"bkd-preserve-line-height"),m(11),d()()),i&2){let s=u();a(3),b(G(4,5,s.test.Date,"dd.MM.yyyy")),a(2),p("routerLink",O(10,Xn,s.test.Id)),a(),p("ngIf",s.test.IsOwner&&s.test.IsPublished===!1),a(2),h(" ",c(9,8,s.test)," "),a(3),b(s.test.Owner)}}function tr(i,n){if(i&1){let s=M();o(0,"div",13)(1,"a",14),l(2,"translate"),v("click",function(){S(s);let t=u();return I(t.unpublishTest())}),o(3,"i",15),m(4,"lock"),d(),o(5,"span"),m(6),l(7,"translate"),d()(),o(8,"bkd-caret",16),v("click",function(){S(s);let t=u();return I(t.toggleHeader())}),d()()}if(i&2){let s=u();a(),le("title",c(2,3,"tests.edit")),a(5),b(c(7,5,"tests.published")),a(2),p("expanded",s.expanded)}}function ir(i,n){if(i&1){let s=M();o(0,"div",13)(1,"a",17),l(2,"translate"),v("click",function(){S(s);let t=u();return I(t.publishTest())}),o(3,"i",15),m(4,"lock_open"),d(),o(5,"span"),m(6),l(7,"translate"),d()(),o(8,"bkd-caret",16),v("click",function(){S(s);let t=u();return I(t.toggleHeader())}),d()()}if(i&2){let s=u();a(),le("title",c(2,3,"tests.publish")),a(5),b(c(7,5,"tests.not-published")),a(2),p("expanded",s.expanded)}}var Hi=(()=>{let n=class n{constructor(){this.toggle=new X,this.publish=new X,this.unpublish=new X}toggleHeader(){this.toggle.emit(!this.expanded)}publishTest(){this.publish.emit(this.test)}unpublishTest(){this.unpublish.emit(this.test)}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-test-table-header"]],inputs:{test:"test",expanded:"expanded"},outputs:{toggle:"toggle",publish:"publish",unpublish:"unpublish"},standalone:!0,features:[y],decls:10,vars:6,consts:[["notPublished",""],[1,"d-flex","flex-column","h-100","justify-content-between"],["role","button",1,"test-designation","d-flex","flex-row","my-3","align-items-end","justify-content-between",3,"click"],[3,"ngClass"],[1,"align-self-start",3,"expanded"],[1,"d-flex","flex-column"],["class","d-flex flex-column mb-3",4,"ngIf"],["class","d-flex align-items-center justify-content-between test-status",4,"ngIf","ngIfElse"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-link","p-0","edit",3,"routerLink"],["class","material-icons",4,"ngIf"],[1,"material-icons"],[1,"d-flex","align-items-center","justify-content-between","test-status"],[1,"d-flex","btn","btn-link","ps-0","edit",3,"click","title"],[1,"material-icons","me-1"],[1,"expand-mobile",3,"click","expanded"],[1,"d-flex","btn","btn-link","ps-0",3,"click","title"]],template:function(t,r){if(t&1){let g=M();o(0,"div",1)(1,"div",2),v("click",function(){return S(g),I(r.toggleHeader())}),o(2,"div",3),m(3),d(),E(4,"bkd-caret",4),d(),o(5,"div",5),f(6,er,12,12,"div",6)(7,tr,9,7,"div",7)(8,ir,9,7,"ng-template",null,0,se),d()()}if(t&2){let g=L(9);a(2),p("ngClass",r.expanded?"expanded":"collapsed"),a(),h(" ",r.test.Designation," "),a(),p("expanded",r.expanded),a(2),p("ngIf",r.expanded),a(),p("ngIf",r.test.IsPublished)("ngIfElse",g)}},dependencies:[ae,Wt,F,Ai,oe,$e,P,w,Ni],styles:["[_nghost-%COMP%]{font-weight:300}.collapsed[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.test-designation[_ngcontent-%COMP%]{display:none!important}.test-status[_ngcontent-%COMP%]{order:-1;padding-bottom:1rem}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#000}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.edit[_ngcontent-%COMP%]{color:#00000080;text-decoration:none}@media (min-width: 750px){.test-designation[_ngcontent-%COMP%]{display:inherit!important}.test-status[_ngcontent-%COMP%]{order:initial}.expand-mobile[_ngcontent-%COMP%]{display:none!important}}"]});let i=n;return i})();var nr=["bkdTestEditGradesHeader",""],rr=(i,n,s)=>({tests:i,filter:n,expanded:s}),sr=i=>({selected:i});function ar(i,n){if(i&1){let s=M();o(0,"th",13)(1,"bkd-test-table-header",14),v("toggle",function(t){S(s);let r=u(2);return I(r.state.toggleHeader(t))})("publish",function(t){S(s);let r=u(2);return I(r.publish.emit(t))})("unpublish",function(t){S(s);let r=u(2);return I(r.unpublish.emit(t))}),d()()}if(i&2){let s=n.$implicit,e=u().bkdLet,t=u();p("ngClass",s.Id===(t.selectedTest==null?null:t.selectedTest.Id)?"selected":""),a(),p("test",s)("expanded",e.expanded)}}function or(i,n){if(i&1){let s=M();o(0,"th",15)(1,"bkd-test-table-header",14),v("toggle",function(t){S(s);let r=u(2);return I(r.state.toggleHeader(t))})("publish",function(t){S(s);let r=u(2);return I(r.publish.emit(t))})("unpublish",function(t){S(s);let r=u(2);return I(r.unpublish.emit(t))}),d()()}if(i&2){let s=n.$implicit,e=u().bkdLet,t=u();p("ngClass",s.Id===(t.selectedTest==null?null:t.selectedTest.Id)?"selected":""),a(),p("test",s)("expanded",e.expanded)}}function dr(i,n){if(i&1){let s=M();o(0,"div",19)(1,"span",18),v("click",function(){S(s);let t=u().$implicit,r=u(2);return I(r.state.sortBy(t))}),m(2),l(3,"translate"),d()()}i&2&&(a(2),h("",c(3,1,"tests.points")," "))}function lr(i,n){if(i&1){let s=M();o(0,"th",16)(1,"div",7),f(2,dr,4,3,"div",17),o(3,"div",8)(4,"span",18),v("click",function(){let t=S(s).$implicit,r=u(2);return I(r.state.sortBy(t))}),m(5),l(6,"translate"),d()(),o(7,"div",9),m(8),l(9,"async"),d()()()}if(i&2){let s=n.$implicit,e=u(2);p("ngClass",s.Id===(e.selectedTest==null?null:e.selectedTest.Id)?"selected":""),a(2),p("ngIf",s.IsPointGrading),a(3),b(c(6,4,"tests.grade")),a(3),h(" ",c(9,6,e.state.getSortingChar$(s))," ")}}function pr(i,n){if(i&1){let s=M();W(0),o(1,"tr",1)(2,"th",2)(3,"bkd-test-table-filter",3),v("filterChange",function(t){S(s);let r=u();return I(r.state.setFilter(t))}),d()(),f(4,ar,2,3,"th",4)(5,or,2,3,"th",5),d(),o(6,"tr")(7,"th",6),v("click",function(){S(s);let t=u();return I(t.state.sortBy("FullName"))}),o(8,"div",7)(9,"div",8),m(10),l(11,"translate"),d(),o(12,"div",9),m(13),l(14,"async"),d()()(),o(15,"th",10),v("click",function(){S(s);let t=u();return I(t.state.sortBy("FinalGrade"))}),o(16,"div",7)(17,"div",8),m(18),l(19,"translate"),d(),o(20,"div",9),m(21),l(22,"async"),d()()(),o(23,"th",11),v("click",function(){S(s);let t=u();return I(t.state.sortBy("TestsMean"))}),o(24,"div",7)(25,"div",8),m(26),l(27,"translate"),d(),o(28,"div",9),m(29),l(30,"async"),d()()(),f(31,lr,10,8,"th",12),d(),q()}if(i&2){let s=n.bkdLet,e=u();a(3),p("filter",s.filter),a(),p("ngForOf",s.tests),a(),p("ngForOf",s.tests),a(5),h(" ",c(11,11,"tests.student.name")," "),a(3),h(" ",c(14,13,e.state.getSortingChar$("FullName"))," "),a(2),p("ngClass",O(23,sr,e.selectedTest===void 0)),a(3),h(" ",c(19,15,"tests.grade")," "),a(3),h(" ",c(22,17,e.state.getSortingChar$("FinalGrade"))," "),a(5),h(" ",c(27,19,"tests.mean")," "),a(3),h(" ",c(30,21,e.state.getSortingChar$("TestsMean"))," "),a(2),p("ngForOf",s.tests)}}var Ui=(()=>{let n=class n{set shown(e){let t=this.element.nativeElement.classList;e?t.add("shown"):t.remove("shown")}constructor(e,t){this.state=e,this.element=t,this.sticky=!1,this.publish=new X,this.unpublish=new X}getTop(){return this.element.nativeElement.getBoundingClientRect().top}getLeft(){return this.element.nativeElement.getBoundingClientRect().left}setTopOffset(e){this.element.nativeElement.style.top=`${e}px`}setLeftOffset(e){this.element.nativeElement.style.left=`${e}px`}getWidth(){return this.element.nativeElement.getBoundingClientRect().width}setWidth(e){this.element.nativeElement.style.width=`${e}px`}getColumnWidths(){return this.getColumns().map(e=>e.map(t=>t.getBoundingClientRect().width))}setColumnWidths(e){let t=this.getColumns();if(t.length!==e.length||!t.every((r,g)=>r.length===e[g].length))throw new Error("Given column widths do not match number of header rows/columns");t.forEach((r,g)=>r.forEach((k,T)=>{k.style.width=`${e[g][T]}px`,k.style.minWidth=`${e[g][T]}px`}))}getStickyColumnsHeights(){return this.getColumns(".sticky").map(e=>e.map(t=>t.getBoundingClientRect().height))}setStickyColumnHeights(e){let t=this.getColumns(".sticky");if(t.length!==e.length||!t.every((r,g)=>r.length===e[g].length))throw new Error("Given column heights do not match number of sticky header columns");t.forEach((r,g)=>r.forEach((k,T)=>{k.style.height=`${e[g][T]}px`}))}getColumns(e){return this.getRows().map(t=>Array.from(t.querySelectorAll(`th:not(.header-mobile)${e??""}`)))}getRows(){return Array.from(this.element.nativeElement.querySelectorAll("tr"))}};n.\u0275fac=function(t){return new(t||n)(_(V),_(ft))},n.\u0275cmp=C({type:n,selectors:[["thead","bkdTestEditGradesHeader",""]],hostVars:2,hostBindings:function(t,r){t&2&&re("sticky",r.sticky)},inputs:{selectedTest:"selectedTest",sticky:"sticky",shown:"shown"},outputs:{publish:"publish",unpublish:"unpublish"},standalone:!0,features:[y],attrs:nr,decls:4,vars:11,consts:[[4,"bkdLet"],[1,"header-collapsible"],["colspan","3",1,"desktop","sticky"],[3,"filterChange","filter"],["container","body","class","grade h-100 test-info-desktop",3,"ngClass",4,"ngFor","ngForOf"],["container","body","class","grade h-100 header-mobile test-info-mobile","colspan","3",3,"ngClass",4,"ngFor","ngForOf"],[1,"primary-column-width","sticky",3,"click"],[1,"d-flex"],[1,"column-title"],[1,"sort-direction","ms-1"],[1,"secondary-column-width","sticky","sticky-col-2","desktop",3,"click","ngClass"],[1,"secondary-column-width","border-end","sticky","sticky-col-3","desktop",3,"click"],["container","body","class","grade h-100",3,"ngClass",4,"ngFor","ngForOf"],["container","body",1,"grade","h-100","test-info-desktop",3,"ngClass"],[3,"toggle","publish","unpublish","test","expanded"],["container","body","colspan","3",1,"grade","h-100","header-mobile","test-info-mobile",3,"ngClass"],["container","body",1,"grade","h-100",3,"ngClass"],["class","column-title me-3 point-input-container",4,"ngIf"],[3,"click"],[1,"column-title","me-3","point-input-container"]],template:function(t,r){t&1&&(f(0,pr,32,25,"ng-container",0),l(1,"async"),l(2,"async"),l(3,"async")),t&2&&p("bkdLet",he(7,rr,c(1,1,r.state.filteredTests$),c(2,3,r.state.filter$),c(3,5,r.state.expandedHeader$)))},dependencies:[Q,j,ae,ce,F,P,w,Vi,Hi],styles:["th.grade.selected[_ngcontent-%COMP%], td.grade.selected[_ngcontent-%COMP%]{display:table-cell!important}th.grade[_ngcontent-%COMP%], td.grade[_ngcontent-%COMP%], .desktop[_ngcontent-%COMP%]{display:none!important}.desktop.selected[_ngcontent-%COMP%]{display:table-cell!important}.mobile[_ngcontent-%COMP%]{display:block!important}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}@media (min-width: 576px){th.grade[_ngcontent-%COMP%], td.grade[_ngcontent-%COMP%], .desktop[_ngcontent-%COMP%]{display:table-cell!important}.mobile[_ngcontent-%COMP%]{display:none!important}.primary-column-width[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:300px;max-width:300px}.secondary-column-width[_ngcontent-%COMP%]{min-width:100px;max-width:100px}}.sticky[_nghost-%COMP%]{position:fixed;top:0;left:0;z-index:1000;display:none}@media (min-width: 576px){.sticky.shown[_nghost-%COMP%]{display:table-header-group}}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;vertical-align:top}.header-collapsible[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;padding:0 1rem}tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:none!important}.point-input-container[_ngcontent-%COMP%]{width:5em}@media (min-width: 576px){tr[_ngcontent-%COMP%] th.test-info-mobile[_ngcontent-%COMP%]{display:none!important}tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:table-cell!important}tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;padding-top:.25rem;padding-bottom:.25rem;border-top:initial;min-width:100px;max-width:100px}tr[_ngcontent-%COMP%] th.grade[_ngcontent-%COMP%]{min-width:300px;max-width:300px}th.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}th.sticky.sticky-col-2[_ngcontent-%COMP%]{left:300px}th.sticky.sticky-col-3[_ngcontent-%COMP%]{left:447px}.sticky[_nghost-%COMP%]{margin-left:547px}.sticky[_nghost-%COMP%] th.sticky[_ngcontent-%COMP%]{position:fixed}}"],changeDetection:0});let i=n;return i})();var cr=(i,n,s)=>({tests:i,hasTests:n,studentGrades:s}),Wi=i=>({selected:i}),mr=i=>["student",i,"grades"],ur=i=>({"visible-on-mobile":i});function gr(i,n){if(i&1){let s=M();o(0,"bkd-grade-select",23),l(1,"async"),l(2,"async"),v("gradeIdSelected",function(t){S(s);let r=u(3);return I(r.state.overwriteFinalGrade(t))}),d()}if(i&2){let s=u().$implicit,e=u(2);p("options",c(1,4,e.state.gradingOptionsForCourse$()))("valueId",s.finalGrade.finalGradeId)("gradeId",s.finalGrade.id)("disabled",c(2,6,e.isEditFinalGradesAllowed(s))===!1)}}function fr(i,n){if(i&1&&(o(0,"div"),m(1),d()),i&2){let s=u().$implicit;a(),h(" ",s.finalGrade.freeHandGrade," ")}}function hr(i,n){if(i&1&&(o(0,"td",24),E(1,"bkd-grade",25),l(2,"async"),d()),i&2){let s=n.$implicit,e=n.index,t=u(),r=t.$implicit,g=t.index,k=u(2);p("ngClass",k.selectedTest!==void 0&&s.test.Id===k.selectedTest.Id?"selected":""),a(),p("grade",s)("gradeOptions",c(2,5,k.state.gradingOptionsForTest$(s.test)))("student",r.student)("tabIndex",(1+e)*1e3+g)}}function _r(i,n){if(i&1&&(o(0,"tr")(1,"td",16)(2,"a",17)(3,"span"),m(4),d(),o(5,"span",10),m(6),l(7,"translate"),l(8,"decimalOrDash"),d()()(),o(9,"td",18),f(10,gr,3,8,"bkd-grade-select",19)(11,fr,2,1,"div",20),d(),o(12,"td",21),m(13),l(14,"decimalOrDash"),d(),f(15,hr,3,7,"td",22),d()),i&2){let s=n.$implicit,e=u(2);a(2),p("routerLink",O(18,mr,s.student.Id)),a(2),b(s.student.FullName),a(2),et(" ",c(7,10,"tests.mean"),": ",G(8,12,s.finalGrade==null?null:s.finalGrade.average,"1-3")," "),a(3),p("ngClass",O(20,Wi,e.selectedTest===void 0)),a(),p("ngIf",s.finalGrade&&!s.finalGrade.freeHandGrade),a(),p("ngIf",s.finalGrade&&s.finalGrade.freeHandGrade),a(2),h(" ",G(14,15,s.finalGrade==null?null:s.finalGrade.average,"1-3")," "),a(2),p("ngForOf",s.grades)("ngForTrackBy",e.trackGradeOf(s.student))}}function vr(i,n){if(i&1&&(o(0,"td",24),E(1,"bkd-average-grades",26),d()),i&2){let s=n.$implicit,e=u(2);p("ngClass",s.Id===(e.selectedTest==null?null:e.selectedTest.Id)||s.Id===(e.selectedTest==null?null:e.selectedTest.Id)?"selected":""),a(),p("test",s)}}function br(i,n){if(i&1){let s=M();o(0,"button",27),v("click",function(){S(s);let t=u(2);return I(t.setAverageAsFinalGrade())}),m(1),l(2,"translate"),d()}if(i&2){let s=u().bkdLet,e=u();p("ngClass",O(4,ur,!s.hasTests||!e.selectedTest)),a(),h(" ",c(2,2,"tests.set-final-grade")," ")}}function xr(i,n){if(i&1){let s=M();W(0),o(1,"div",3)(2,"table",4)(3,"thead",5,0),v("publish",function(t){S(s);let r=u();return I(r.publish(t))})("unpublish",function(t){S(s);let r=u();return I(r.unpublish(t))}),d(),o(5,"thead",6,1),v("publish",function(t){S(s);let r=u();return I(r.publish(t))})("unpublish",function(t){S(s);let r=u();return I(r.unpublish(t))}),d(),o(7,"tbody"),f(8,_r,16,22,"tr",7),o(9,"tr")(10,"td",8)(11,"div",9)(12,"div"),m(13),l(14,"translate"),d(),o(15,"div",10),m(16),l(17,"translate"),l(18,"async"),l(19,"decimalOrDash"),d()()(),o(20,"td",11),m(21),l(22,"async"),l(23,"decimalOrDash"),d(),o(24,"td",12),m(25),l(26,"async"),l(27,"decimalOrDash"),d(),f(28,vr,2,2,"td",13),d()()(),o(29,"div",14),f(30,br,3,6,"button",15),l(31,"async"),d()(),q()}if(i&2){let s=n.bkdLet,e=L(4),t=L(6),r=u();a(2),p("inlineHeader",e)("stickyHeader",t),a(),p("selectedTest",r.selectedTest),a(2),p("sticky",!0)("selectedTest",r.selectedTest),a(3),p("ngForOf",s.studentGrades)("ngForTrackBy",r.trackStudentGrade),a(5),b(c(14,15,"tests.average")),a(3),et(" ",c(17,17,"tests.mean"),": ",G(19,21,c(18,19,r.state.meanOfStudentGradesForCourse$),"1-3")," "),a(4),p("ngClass",O(36,Wi,r.selectedTest===void 0)),a(),h(" ",G(23,26,c(22,24,r.state.meanOfFinalGradesForCourse$),"1-3")," "),a(4),h(" ",G(27,31,c(26,29,r.state.meanOfStudentGradesForCourse$),"1-3")," "),a(3),p("ngForOf",s.tests),a(2),p("ngIf",c(31,34,r.state.canSetFinalGrade$))}}var qi=(()=>{let n=class n{constructor(e,t){this.state=e,this.modalService=t}ngOnInit(){this.state.setSorting({key:"FullName",ascending:!0})}setAverageAsFinalGrade(){this.state.course$.pipe(ne(1)).subscribe(e=>this.state.setAveragesAsFinalGrades({CourseIds:[e.Id]}))}isEditFinalGradesAllowed(e){return this.state.course$.pipe(x(t=>!!(Ye(t)?.value&&e.finalGrade?.canGrade)))}publish(e){let t=this.openModal(e);this.onCloseModal(t,()=>this.state.publish(e))}unpublish(e){let t=this.openModal(e);this.onCloseModal(t,()=>this.state.unpublish(e))}trackStudentGrade(e){return e}trackGradeOf(e){return function(t,r){return`${e.Id}_${r.test.Id}`}}calculatePointsAverage(e){return this.safeAverage(e,We)}calculateGradeAverage(e){return this.safeAverage(e,qe)}safeAverage(e,t){try{return t(e).toString()}catch{return"\u2013"}}openModal(e){let t=this.modalService.open(Fi);return t.componentInstance.test=e,t}onCloseModal(e,t){e.result.then(r=>{r&&t()},()=>{})}};n.\u0275fac=function(t){return new(t||n)(_(V),_(ze))},n.\u0275cmp=C({type:n,selectors:[["bkd-test-edit-grades"]],inputs:{selectedTest:"selectedTest"},standalone:!0,features:[pe([Te]),y],decls:4,vars:11,consts:[["inlineHeader",""],["stickyHeader",""],[4,"bkdLet"],[1,"table-responsive-wrapper"],["bkdTestEditGradesHeaderSticky","",1,"table","table-hover","h-100",3,"inlineHeader","stickyHeader"],["bkdTestEditGradesHeader","",3,"publish","unpublish","selectedTest"],["bkdTestEditGradesHeader","",3,"publish","unpublish","sticky","selectedTest"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"sticky"],[1,"d-flex","flex-column"],[1,"mobile","mean"],[1,"desktop","sticky","sticky-col-2",3,"ngClass"],[1,"desktop","border-end","sticky","sticky-col-3"],["class","grade",3,"ngClass",4,"ngFor","ngForOf"],[1,"action-buttons"],["data-testId","apply-average-button","class","apply-average-button btn btn-primary m-3","type","button",3,"ngClass","click",4,"ngIf"],[1,"primary-column-width","sticky","name"],[3,"routerLink"],[1,"grade","sticky","sticky-col-2",3,"ngClass"],[3,"options","valueId","gradeId","disabled","gradeIdSelected",4,"ngIf"],[4,"ngIf"],[1,"grade","border-end","sticky","sticky-col-3"],["class","grade",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[3,"gradeIdSelected","options","valueId","gradeId","disabled"],[1,"grade",3,"ngClass"],[3,"grade","gradeOptions","student","tabIndex"],[3,"test"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"click","ngClass"]],template:function(t,r){t&1&&(f(0,xr,32,38,"ng-container",2),l(1,"async"),l(2,"async"),l(3,"async")),t&2&&p("bkdLet",he(7,cr,c(1,1,r.state.filteredTests$),c(2,3,r.state.hasTests$),c(3,5,r.state.studentGrades$)))},dependencies:[Q,ae,ce,F,oe,Di,Bi,Ri,j,P,w,Zt,Li,Ui],styles:["th.grade.selected[_ngcontent-%COMP%], td.grade.selected[_ngcontent-%COMP%]{display:table-cell!important}th.grade[_ngcontent-%COMP%], td.grade[_ngcontent-%COMP%], .desktop[_ngcontent-%COMP%]{display:none!important}.desktop.selected[_ngcontent-%COMP%]{display:table-cell!important}.mobile[_ngcontent-%COMP%]{display:block!important}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:1rem}@media (min-width: 576px){th.grade[_ngcontent-%COMP%], td.grade[_ngcontent-%COMP%], .desktop[_ngcontent-%COMP%]{display:table-cell!important}.mobile[_ngcontent-%COMP%]{display:none!important}.primary-column-width[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:300px;max-width:300px}.secondary-column-width[_ngcontent-%COMP%]{min-width:100px;max-width:100px}}.mean[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem;line-height:1}td.name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}td.name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{text-decoration:underline}td.name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}tbody[_ngcontent-%COMP%] td.name[_ngcontent-%COMP%], tbody[_ngcontent-%COMP%] td.average[_ngcontent-%COMP%]{max-width:18ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:0}@media (min-width: 576px){.table-responsive-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0}tbody[_ngcontent-%COMP%] td.name[_ngcontent-%COMP%]{max-width:auto;overflow:visible}tbody[_ngcontent-%COMP%] td.sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}tbody[_ngcontent-%COMP%] td.sticky.sticky-col-2[_ngcontent-%COMP%]{left:300px}tbody[_ngcontent-%COMP%] td.sticky.sticky-col-3[_ngcontent-%COMP%]{left:447px}.action-buttons[_ngcontent-%COMP%]{position:sticky;left:0}}@media (max-width: 575.98px){.apply-average-button[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]});let i=n;return i})();var Cr=()=>["/events"],yr=i=>({count:i});function Sr(i,n){if(i&1&&(o(0,"div",8),m(1),l(2,"translate"),d()),i&2){let s=u();a(),h(" ",G(2,1,s.course.ParticipatingStudents.length===1?"courses.registration":"courses.registrations",O(4,yr,s.course.ParticipatingStudents.length))," ")}}var zi=(()=>{let n=class n{constructor(e){this.reportsService=e,this.course$=new N(null),this.reports$=this.course$.pipe(x(t=>t?.Id),K(),D(t=>t?this.reportsService.getCourseReports(t):Y([])),ct([]))}ngOnChanges(e){e.course&&this.course$.next(e.course.currentValue)}getDesignation(){return Ke(this.course)}};n.\u0275fac=function(t){return new(t||n)(_(ii))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-header"]],inputs:{course:"course"},standalone:!0,features:[fe,y],decls:12,vars:7,consts:[[3,"link"],[1,"d-flex"],["routerLink","add",1,"edit","btn","btn-primary","btn-icon","ms-2"],[1,"material-icons"],[1,"ms-2",3,"reports"],["id","excel-import"],[1,"d-flex","flex-column","header"],["class","additional-info",4,"ngIf"],[1,"additional-info"]],template:function(t,r){t&1&&(o(0,"bkd-backlink",0)(1,"div",1)(2,"a",2)(3,"i",3),m(4,"add"),d()(),E(5,"bkd-reports-link",4),l(6,"async"),E(7,"div",5),d()(),o(8,"div",6)(9,"h1"),m(10),d(),f(11,Sr,3,6,"div",7),d()),t&2&&(p("link",vt(6,Cr)),a(5),p("reports",c(6,4,r.reports$)),a(5),b(r.getDesignation()),a(),p("ngIf",r.course.ParticipatingStudents))},dependencies:[si,oe,Ut,F,j,P,w],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem;border-bottom:1px solid #dee2e6}h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"]});let i=n;return i})();var Ir=(i,n,s,e,t,r)=>({course:i,tests:n,hasTests:s,testOptions:e,selectedTestId:t,selectedTest:r}),Tr=i=>({"visible-on-mobile":i});function kr(i,n){if(i&1){let s=M();W(0),o(1,"bkd-select",7),v("valueChange",function(t){S(s);let r=u(3);return I(t&&r.testSelected(t))}),d(),E(2,"bkd-test-edit-grades",8),q()}if(i&2){let s=u(2).bkdLet;a(),p("options",s.testOptions)("value",s.selectedTestId)("allowEmpty",!1),a(),p("selectedTest",s.selectedTest)}}function Er(i,n){if(i&1&&(o(0,"a",9),l(1,"async"),o(2,"i",10),m(3,"arrow_right_alt"),d(),o(4,"span",11),m(5),l(6,"translate"),d()()),i&2){let s=u(2).bkdLet,e=u();le("href",c(1,3,e.buildLinkToRatingOverview()),we),p("ngClass",O(7,Tr,!s.hasTests||!s.selectedTest)),a(5),b(c(6,5,"tests.link-to-rating-overview"))}}function wr(i,n){if(i&1&&(W(0),E(1,"bkd-tests-header",5),f(2,kr,3,4,"ng-container",4)(3,Er,7,9,"a",6),l(4,"async"),q()),i&2){let s=u().bkdLet,e=u(),t=L(9);a(),p("course",s.course),a(),p("ngIf",s.tests.length>0)("ngIfElse",t),a(),p("ngIf",c(4,4,e.state.canSetFinalGrade$))}}function Pr(i,n){if(i&1&&(W(0),f(1,wr,5,6,"ng-container",4),l(2,"async"),q()),i&2){let s=u(),e=L(11);a(),p("ngIf",c(2,2,s.state.loading$)===!1)("ngIfElse",e)}}function Mr(i,n){i&1&&(o(0,"p",12),m(1),l(2,"translate"),d()),i&2&&(a(),b(c(2,1,"tests.no-tests")))}function Or(i,n){i&1&&E(0,"bkd-spinner")}var Yi=(()=>{let n=class n{constructor(e,t,r){this.settings=e,this.state=t,this.translate=r,this.selectTest$=new ee,this.testOptions$=this.state.tests$.pipe(x(g=>[{Key:-1,Value:this.translate.instant("tests.grade")},...g.map(k=>({Key:k.Id,Value:k.Designation}))]),K()),this.selectedTestId$=Oe(this.selectTest$,this.state.tests$.pipe(ne(1),x(g=>g[0]?.Id))).pipe(K()),this.selectedTest$=this.selectedTestId$.pipe(D(g=>this.state.tests$.pipe(x(k=>k.find(T=>T.Id===g)))),K())}testSelected(e){this.selectTest$.next(e)}buildLinkToRatingOverview(){return this.state.course$.pipe(ne(1),x(e=>this.settings.eventlist.evaluation.replace(":id",String(e.Id))))}};n.\u0275fac=function(t){return new(t||n)(_(ve),_(V),_(ie))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-list"]],standalone:!0,features:[y],decls:12,vars:20,consts:[["noTests",""],["loading",""],[1,"bkd-container"],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[3,"course"],["class","rating-overview d-flex justify-content-end pe-3 border-top pt-3",3,"ngClass","href",4,"ngIf"],[1,"tests-dropdown",3,"valueChange","options","value","allowEmpty"],[3,"selectedTest"],[1,"rating-overview","d-flex","justify-content-end","pe-3","border-top","pt-3",3,"ngClass","href"],[1,"material-icons","fw-bold"],[1,"ps-1"],[1,"mt-3","px-3"]],template:function(t,r){t&1&&(o(0,"div",2),f(1,Pr,3,4,"ng-container",3),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),f(8,Mr,3,3,"ng-template",null,0,se)(10,Or,1,0,"ng-template",null,1,se),d()),t&2&&(a(),p("bkdLet",bt(13,Ir,c(2,1,r.state.course$),c(3,3,r.state.tests$),c(4,5,r.state.hasTests$),c(5,7,r.testOptions$),c(6,9,r.selectedTestId$),c(7,11,r.selectedTest$))))},dependencies:[Q,F,zi,Ie,qi,ae,Se,j,P,w],styles:[".tests-dropdown[_ngcontent-%COMP%]{display:block;padding:1rem 0}@media (min-width: 576px){.tests-dropdown[_ngcontent-%COMP%]{display:none}}a.rating-overview[_ngcontent-%COMP%]{text-decoration:none}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}@media (max-width: 575.98px){a.rating-overview[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]});let i=n;return i})();var Xe=(()=>{let n=class n{constructor(e,t){this.state=e,this.route=t,this.courseId$=this.route.paramMap.pipe(x(r=>Number(r.get("id"))),K()),this.destroy$=new ee}ngOnInit(){this.courseId$.pipe(de(this.destroy$)).subscribe(e=>this.state.setCourseId(e))}ngOnDestroy(){this.destroy$.next()}};n.\u0275fac=function(t){return new(t||n)(_(V),_(_e))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests"]],standalone:!0,features:[pe([V]),y],decls:1,vars:0,template:function(t,r){t&1&&E(0,"router-outlet")},dependencies:[Fe]});let i=n;return i})();var kd=[{path:"",component:vi,children:[{path:"",component:_i},{path:"current",component:hi},{path:":id",component:Xe,children:[{path:"tests",component:Yi}]},{path:":id/tests/:testId/edit",component:Xe,children:[{path:"",component:$i}]},{path:":id/tests/add",component:Xe,children:[{path:"",component:Oi}]},{path:":id/tests",children:[ai]}]}];export{kd as EVENTS_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-VTGXNMZL.js b/public/apps/webapp-schulverwaltung/chunk-NYTDIO5P.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-VTGXNMZL.js rename to public/apps/webapp-schulverwaltung/chunk-NYTDIO5P.js index 299099e3..2ea88289 100644 --- a/public/apps/webapp-schulverwaltung/chunk-VTGXNMZL.js +++ b/public/apps/webapp-schulverwaltung/chunk-NYTDIO5P.js @@ -1 +1 @@ -import{t as B,x as z}from"./chunk-FTRAQKUW.js";import{$ as I,$a as $,Bb as s,C as v,Cb as d,Cd as D,G as g,Ga as y,Ha as E,Hd as H,I as f,Ia as p,Id as K,O as _,Sa as r,Ta as o,Tb as P,Wb as k,Ya as O,Zc as F,_a as b,ad as w,ed as N,f as m,ga as T,ha as M,ia as S,jb as c,m as h,sd as V,tb as x,ua as l,w as C}from"./chunk-T7QWSMKM.js";function A(n,i){if(n&1){let u=O();r(0,"button",6),b("click",function(a){M(u);let t=$();return S(t.modelChange(a))}),r(1,"i",2),c(2,"clear"),o()()}}function j(n,i){n&1&&(r(0,"div",7)(1,"div",8)(2,"span",9),c(3,"Loading..."),o()()())}var q=300,U=3,oe=(()=>{let i=class i{constructor(){this.selectedItem$=new m(null),this.placeholder="shared.typeahead.default-placeholder",this.valueChange=this.selectedItem$.pipe(h(e=>e?e.Key:null),g()),this.componentId=D("bkd-typeahead-"),this.loading$=new m(!1),this.search=e=>e.pipe(G(U,q),_(this.fetchItems.bind(this)))}ngOnChanges(e){e.value&&e.value.currentValue&&e.value.currentValue!==this.selectedItemKey&&this.fetchItem(e.value.currentValue).subscribe(a=>{this.modelChange(a)})}format(e){return e.Value}modelChange(e){this.selectedItem$.next(e instanceof Object?e:null)}get selectedItemKey(){return this.selectedItem$.value?this.selectedItem$.value.Key:null}fetchItems(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItems(e,this.additionalHttpParams).pipe(f(()=>this.loading$.next(!1)))}fetchItem(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItemByKey(e).pipe(f(()=>this.loading$.next(!1)))}};i.\u0275fac=function(a){return new(a||i)},i.\u0275cmp=I({type:i,selectors:[["bkd-typeahead"]],inputs:{typeaheadService:"typeaheadService",placeholder:"placeholder",value:"value",additionalHttpParams:"additionalHttpParams"},outputs:{valueChange:"valueChange"},standalone:!0,features:[T,x],decls:11,vars:18,consts:[[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text",1,"form-control",3,"ngModelChange","ngbTypeahead","inputFormatter","resultFormatter","ngModel"],["class","btn btn-link text-decoration-none","type","button",3,"click",4,"ngIf"],["class","spinner-container",4,"ngIf"],["type","button",1,"btn","btn-link","text-decoration-none",3,"click"],[1,"spinner-container"],["role","status",1,"spinner-border","spinner-border-sm"],[1,"visually-hidden"]],template:function(a,t){a&1&&(r(0,"div",0)(1,"span",1)(2,"i",2),c(3,"search"),o()(),r(4,"input",3),s(5,"async"),s(6,"translate"),s(7,"translate"),b("ngModelChange",function(L){return t.modelChange(L)}),o(),y(8,A,3,0,"button",4),o(),y(9,j,4,0,"div",5),s(10,"async")),a&2&&(l(),p("id",t.componentId),l(3),p("ngbTypeahead",t.search)("inputFormatter",t.format)("resultFormatter",t.format)("ngModel",d(5,10,t.selectedItem$)),E("placeholder",d(6,12,t.placeholder))("aria-label",d(7,14,t.placeholder))("aria-describedby",t.componentId),l(4),p("ngIf",t.value),l(),p("ngIf",d(10,16,t.loading$)))},dependencies:[B,V,F,w,N,P,k,K,H],styles:["[_nghost-%COMP%]{display:block;position:relative;background:#fff}.spinner-container[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:.75rem;display:flex;align-items:center;z-index:1001}.spinner-border[_ngcontent-%COMP%]{color:#6c757d}input[_ngcontent-%COMP%]{padding-right:2.5em}.input-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5}"],changeDetection:0});let n=i;return n})();function G(n,i){return u=>u.pipe(v(i),h(R),g(),C(z(n)))}function R(n){return n.trim().toLowerCase()}export{oe as a}; +import{t as B,x as z}from"./chunk-C56YGDXA.js";import{$ as I,$a as $,$c as w,Ab as s,Bb as d,Bd as D,C as v,G as g,Ga as y,Gd as H,Ha as E,Hd as K,I as f,Ia as p,O as _,Sa as r,Sb as P,Ta as o,Vb as k,Ya as O,Yc as F,_a as b,dd as N,f as m,ga as T,ha as M,ia as S,jb as c,m as h,rd as V,tb as x,ua as l,w as C}from"./chunk-XTHSYQMN.js";function A(n,i){if(n&1){let u=O();r(0,"button",6),b("click",function(a){M(u);let t=$();return S(t.modelChange(a))}),r(1,"i",2),c(2,"clear"),o()()}}function j(n,i){n&1&&(r(0,"div",7)(1,"div",8)(2,"span",9),c(3,"Loading..."),o()()())}var q=300,U=3,oe=(()=>{let i=class i{constructor(){this.selectedItem$=new m(null),this.placeholder="shared.typeahead.default-placeholder",this.valueChange=this.selectedItem$.pipe(h(e=>e?e.Key:null),g()),this.componentId=D("bkd-typeahead-"),this.loading$=new m(!1),this.search=e=>e.pipe(G(U,q),_(this.fetchItems.bind(this)))}ngOnChanges(e){e.value&&e.value.currentValue&&e.value.currentValue!==this.selectedItemKey&&this.fetchItem(e.value.currentValue).subscribe(a=>{this.modelChange(a)})}format(e){return e.Value}modelChange(e){this.selectedItem$.next(e instanceof Object?e:null)}get selectedItemKey(){return this.selectedItem$.value?this.selectedItem$.value.Key:null}fetchItems(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItems(e,this.additionalHttpParams).pipe(f(()=>this.loading$.next(!1)))}fetchItem(e){return this.loading$.next(!0),this.typeaheadService.getTypeaheadItemByKey(e).pipe(f(()=>this.loading$.next(!1)))}};i.\u0275fac=function(a){return new(a||i)},i.\u0275cmp=I({type:i,selectors:[["bkd-typeahead"]],inputs:{typeaheadService:"typeaheadService",placeholder:"placeholder",value:"value",additionalHttpParams:"additionalHttpParams"},outputs:{valueChange:"valueChange"},standalone:!0,features:[T,x],decls:11,vars:18,consts:[[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["type","text",1,"form-control",3,"ngModelChange","ngbTypeahead","inputFormatter","resultFormatter","ngModel"],["class","btn btn-link text-decoration-none","type","button",3,"click",4,"ngIf"],["class","spinner-container",4,"ngIf"],["type","button",1,"btn","btn-link","text-decoration-none",3,"click"],[1,"spinner-container"],["role","status",1,"spinner-border","spinner-border-sm"],[1,"visually-hidden"]],template:function(a,t){a&1&&(r(0,"div",0)(1,"span",1)(2,"i",2),c(3,"search"),o()(),r(4,"input",3),s(5,"async"),s(6,"translate"),s(7,"translate"),b("ngModelChange",function(L){return t.modelChange(L)}),o(),y(8,A,3,0,"button",4),o(),y(9,j,4,0,"div",5),s(10,"async")),a&2&&(l(),p("id",t.componentId),l(3),p("ngbTypeahead",t.search)("inputFormatter",t.format)("resultFormatter",t.format)("ngModel",d(5,10,t.selectedItem$)),E("placeholder",d(6,12,t.placeholder))("aria-label",d(7,14,t.placeholder))("aria-describedby",t.componentId),l(4),p("ngIf",t.value),l(),p("ngIf",d(10,16,t.loading$)))},dependencies:[B,V,F,w,N,P,k,K,H],styles:["[_nghost-%COMP%]{display:block;position:relative;background:#fff}.spinner-container[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;right:.75rem;display:flex;align-items:center;z-index:1001}.spinner-border[_ngcontent-%COMP%]{color:#6c757d}input[_ngcontent-%COMP%]{padding-right:2.5em}.input-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5}"],changeDetection:0});let n=i;return n})();function G(n,i){return u=>u.pipe(v(i),h(R),g(),C(z(n)))}function R(n){return n.trim().toLowerCase()}export{oe as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-BTBVZYMS.js b/public/apps/webapp-schulverwaltung/chunk-ON6N652E.js similarity index 88% rename from public/apps/webapp-schulverwaltung/chunk-BTBVZYMS.js rename to public/apps/webapp-schulverwaltung/chunk-ON6N652E.js index 3981b0c7..b1ec364e 100644 --- a/public/apps/webapp-schulverwaltung/chunk-BTBVZYMS.js +++ b/public/apps/webapp-schulverwaltung/chunk-ON6N652E.js @@ -1 +1 @@ -import{a as Ee,b as ke,c as Ie}from"./chunk-V34B6ZOV.js";import{a as ye}from"./chunk-VTGXNMZL.js";import{a as Te}from"./chunk-VFMGCCGG.js";import{a as be}from"./chunk-RC3HL7KB.js";import"./chunk-KLXFX6SJ.js";import"./chunk-QHPTZGVN.js";import"./chunk-HHGALFFJ.js";import{b as pe,e as O}from"./chunk-2FIH3FGB.js";import"./chunk-MVTCHCDH.js";import"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{a as Ce,b as Se}from"./chunk-DXYHDL5D.js";import{a as he}from"./chunk-TK3HGFHH.js";import{a as xe}from"./chunk-2IXEFCAH.js";import{c as fe}from"./chunk-X2BR3YJG.js";import{d as ge}from"./chunk-LO5XSJLW.js";import"./chunk-DMYOU5OM.js";import"./chunk-RWNJF4OZ.js";import{P as de,T as _e}from"./chunk-GI4AZI25.js";import"./chunk-Q5U6YZUT.js";import{a as me,b as ve}from"./chunk-N6FFLIGM.js";import{a as ce,c as ue}from"./chunk-33NXTXD7.js";import{s as le}from"./chunk-FTRAQKUW.js";import"./chunk-3AROKYRB.js";import{$ as E,$a as _,Bb as p,Cb as d,E as q,Fb as L,Ga as v,Ha as J,Hd as j,Ia as c,Id as M,L as U,Nb as Z,O as N,Q as G,Rb as ee,Sa as s,Sb as te,Ta as l,Tb as ne,Ua as x,Va as F,W as X,Wa as w,Wb as ie,Wc as se,Ya as A,Z as S,_a as y,ha as I,ia as T,ib as P,jb as u,kb as h,lb as g,m as W,pb as R,pc as ae,qb as B,qc as re,ra as z,rb as $,sb as K,sc as oe,tb as k,ua as o,ub as Q,va as f,vb as V,xb as Y}from"./chunk-T7QWSMKM.js";var Ae=(()=>{let n=class n{constructor(t,i,r){this.studentsService=t,this.educationalEventsService=i,this.studyClassesService=r,this.filter={student:null,educationalEvent:null,studyClass:null},this.filterChange=new z,this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(this.filter)}};n.\u0275fac=function(i){return new(i||n)(f(fe),f(Ie),f(Te))},n.\u0275cmp=E({type:n,selectors:[["bkd-evaluate-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[k],decls:20,vars:19,consts:[[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"form-label"],[3,"valueChange","typeaheadService","value"],[3,"valueChange","typeaheadService","value","additionalHttpParams"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"label",2),u(3),p(4,"translate"),l(),s(5,"bkd-typeahead",3),$("valueChange",function(m){return B(r.filter.student,m)||(r.filter.student=m),m}),l()(),s(6,"div",1)(7,"label",2),u(8),p(9,"translate"),l(),s(10,"bkd-typeahead",3),$("valueChange",function(m){return B(r.filter.educationalEvent,m)||(r.filter.educationalEvent=m),m}),l()(),s(11,"div",1)(12,"label",2),u(13),p(14,"translate"),l(),s(15,"bkd-typeahead",4),$("valueChange",function(m){return B(r.filter.studyClass,m)||(r.filter.studyClass=m),m}),l()(),s(16,"div",5)(17,"button",6),y("click",function(){return r.show()}),u(18),p(19,"translate"),l()()()),i&2&&(o(3),h(d(4,11,"evaluate-absences.header.student")),o(2),c("typeaheadService",r.studentsService),R("value",r.filter.student),o(3),h(d(9,13,"evaluate-absences.header.module-instance")),o(2),c("typeaheadService",r.educationalEventsService),R("value",r.filter.educationalEvent),o(3),h(d(14,15,"evaluate-absences.header.study-class")),o(2),c("typeaheadService",r.studyClassesService),R("value",r.filter.studyClass),c("additionalHttpParams",r.classesHttpFilter),o(3),g(" ",d(19,17,"evaluate-absences.header.show")," "))},dependencies:[ye,M,j],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:1rem 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0});let e=n;return e})();var C=(()=>{let n=class n extends Se{constructor(t,i,r,b,m){super(t,i,m,r,"/evaluate-absences"),this.lessonPresenceService=b,this.queryParamsString$.pipe(G(this.destroy$)).subscribe(D=>this.confirmBackLinkParams={returnparams:D})}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null}}isValidFilter(t){return!!(t.student||t.educationalEvent||t.studyClass)}getInitialSorting(){return{key:"StudentFullName",ascending:!0}}loadEntries(t,i,r){return this.loadingService.load(this.lessonPresenceService.getStatistics(t,i,r),Ce)}buildParamsFromFilter(t){return Ee(t)}};n.\u0275fac=function(i){return new(i||n)(S(Z),S(ve),S(se),S(O),S(xe))},n.\u0275prov=X({token:n,factory:n.\u0275fac});let e=n;return e})();var Be=(e,n,a)=>({entries:e,hasMore:n,loadingPage:a}),$e=()=>[],je=e=>["student",e,"absences"],Me=e=>({returnparams:e});function Oe(e,n){if(e&1){let a=A();s(0,"th",16),y("click",function(){let i=I(a).$implicit,r=_(5);return T(r.state.sortService.toggleSorting(i.key))}),s(1,"div",17)(2,"div",18),p(3,"translate"),u(4),p(5,"translate"),l(),s(6,"div",19),u(7),p(8,"async"),l()()()}if(e&2){let a=n.$implicit,t=_(5);c("ngClass",a.label),o(2),c("ngbTooltip",d(3,4,"evaluate-absences.list.header."+a.label)),o(2),g(" ",d(5,6,"evaluate-absences.list.header."+a.label)," "),o(3),g(" ",d(8,8,t.state.sortService.getSortingChar$(a.key))," ")}}function De(e,n){if(e&1&&(s(0,"a",22),p(1,"async"),u(2),l()),e&2){let a=_().$implicit,t=_().$implicit,i=_(6);c("routerLink",V(5,je,t.StudentRef.Id))("queryParams",V(7,Me,d(1,3,i.profileReturnParams$))),o(2),g(" ",t[a.key]," ")}}function Ne(e,n){if(e&1&&u(0),e&2){let a=_().$implicit,t=_().$implicit;g(" ",t[a.key]," ")}}function Ve(e,n){if(e&1&&(s(0,"td"),p(1,"translate"),v(2,De,3,9,"a",21)(3,Ne,1,1,"ng-template",null,3,L),l()),e&2){let a=n.$implicit,t=P(4);J("data-label",d(1,3,"evaluate-absences.list.header."+a.label)),o(2),c("ngIf",a.key==="StudentFullName")("ngIfElse",t)}}function He(e,n){if(e&1&&(s(0,"tr"),v(1,Ve,5,5,"td",20),l()),e&2){let a=_(6);o(),c("ngForOf",a.columns)}}function We(e,n){if(e&1&&(s(0,"tbody"),v(1,He,2,1,"tr",20),l()),e&2){let a=_(4).bkdLet;o(),c("ngForOf",a.entries)}}function qe(e,n){e&1&&x(0,"bkd-spinner",23)}function Ue(e,n){if(e&1){let a=A();s(0,"button",24),y("click",function(){I(a);let i=_(5);return T(i.state.nextPage())}),u(1),p(2,"translate"),l()}e&2&&(o(),g(" ",d(2,1,"global.pagination.load-more")," "))}function Ge(e,n){if(e&1){let a=A();s(0,"div",8)(1,"div",9),x(2,"bkd-reports-link",10),p(3,"async"),l(),s(4,"table",11),y("scrolled",function(){I(a);let i=_(4);return T(i.onScroll())}),s(5,"thead")(6,"tr"),v(7,Oe,9,10,"th",12),l()(),v(8,We,2,1,"tbody",13),l(),v(9,qe,1,0,"bkd-spinner",14)(10,Ue,3,3,"button",15),l()}if(e&2){let a,t=_(3).bkdLet,i=_();o(2),c("reports",(a=d(3,5,i.reports$))!==null&&a!==void 0?a:Q(7,$e)),o(5),c("ngForOf",i.columns),o(),c("ngIf",t.entries&&t.entries.length>0),o(),c("ngIf",t.loadingPage),o(),c("ngIf",t.hasMore&&!t.loadingPage)}}function Xe(e,n){e&1&&(s(0,"p",25),u(1),p(2,"translate"),l()),e&2&&(o(),g(" ",d(2,1,"evaluate-absences.no-entries")," "))}function ze(e,n){if(e&1&&(F(0),v(1,Ge,11,8,"div",7)(2,Xe,3,3,"ng-template",null,2,L),w()),e&2){let a=P(3),t=_(2).bkdLet;o(),c("ngIf",t.entries&&t.entries.length>0||t.loadingPage)("ngIfElse",a)}}function Je(e,n){e&1&&x(0,"bkd-spinner")}function Ke(e,n){if(e&1&&(F(0),v(1,ze,4,2,"ng-container",6),p(2,"async"),v(3,Je,1,0,"ng-template",null,1,L),w()),e&2){let a=P(4),t=_(2);o(),c("ngIf",d(2,2,t.state.loading$)===!1)("ngIfElse",a)}}function Qe(e,n){e&1&&(s(0,"p",25),u(1),p(2,"translate"),l()),e&2&&(o(),h(d(2,1,"evaluate-absences.no-filter")))}function Ye(e,n){if(e&1){let a=A();F(0),s(1,"bkd-evaluate-absences-header",5),p(2,"async"),y("filterChange",function(i){I(a);let r=_();return T(r.state.setFilter(i))}),l(),v(3,Ke,5,4,"ng-container",6),p(4,"async"),v(5,Qe,3,3,"ng-template",null,0,L),w()}if(e&2){let a=P(6),t=_();o(),c("filter",d(2,3,t.filterFromParams$)),o(2),c("ngIf",d(4,5,t.state.isFilterValid$))("ngIfElse",a)}}var Le=(()=>{let n=class n{constructor(t,i,r,b,m,D){this.state=t,this.scrollPosition=i,this.route=r,this.presenceTypesService=b,this.reportsService=m,this.lessonPresencesService=D,this.reports$=this.loadReports(),this.columns=[{key:"StudentFullName",label:"student"},{key:"TotalAbsences",label:"total"},{key:"TotalAbsencesValidExcuse",label:"valid-excuse"},{key:"TotalAbsencesWithoutExcuse",label:"without-excuse"},{key:"TotalAbsencesUnconfirmed",label:"unconfirmed"},{key:"TotalAbsencesUnchecked",label:"unchecked"},{key:"TotalIncidents",label:"incident"}],this.filterFromParams$=this.route.queryParams.pipe(W(Ze)),this.profileReturnParams$=this.state.queryParamsString$}ngOnInit(){this.filterFromParams$.pipe(q(1)).subscribe(t=>this.state.setFilter(t)),this.presenceTypesService.halfDayActive$.subscribe(t=>{t&&(this.columns=[...this.columns,{key:"TotalHalfDays",label:"halfday"}])})}ngAfterViewInit(){this.scrollPosition.restore()}onScroll(){this.state.nextPage()}loadReports(){return this.state.validFilter$.pipe(N(t=>this.lessonPresencesService.getLessonRefs(t)),N(t=>t.length>0?this.reportsService.getEvaluateAbsencesReports(this.getReportRecordIds(t)):[]),U(1))}getReportRecordIds(t){return t.map(i=>`${i.LessonRef.Id}_${i.RegistrationRef.Id}`)}};n.\u0275fac=function(i){return new(i||n)(f(C),f(he),f(ae),f(_e),f(ge),f(O))},n.\u0275cmp=E({type:n,selectors:[["bkd-evaluate-absences-list"]],standalone:!0,features:[k],decls:7,vars:14,consts:[["noFilter",""],["loading",""],["noEntries",""],["noLink",""],[4,"bkdLet"],[3,"filterChange","filter"],[4,"ngIf","ngIfElse"],["class","py-3",4,"ngIf","ngIfElse"],[1,"py-3"],[1,"buttons"],[1,"mb-2",3,"reports"],["infiniteScroll","",1,"table","table-striped","table-fixed",3,"scrolled"],["scope","col",3,"ngClass","click",4,"ngFor","ngForOf"],[4,"ngIf"],["class","inline",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-sm d-block mx-auto",3,"click",4,"ngIf"],["scope","col",3,"click","ngClass"],[1,"d-flex"],[1,"column-title",3,"ngbTooltip"],[1,"sort-direction"],[4,"ngFor","ngForOf"],["class","student",3,"routerLink","queryParams",4,"ngIf","ngIfElse"],[1,"student",3,"routerLink","queryParams"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"],[1,"mt-3"]],template:function(i,r){i&1&&(s(0,"h1"),u(1),p(2,"translate"),l(),v(3,Ye,7,7,"ng-container",4),p(4,"async"),p(5,"async"),p(6,"async")),i&2&&(o(),h(d(2,2,"evaluate-absences.title")),o(2),c("bkdLet",Y(10,Be,d(4,4,r.state.entries$),d(5,6,r.state.hasMore$),d(6,8,r.state.loadingPage$))))},dependencies:[ce,Ae,ne,me,ke,te,ee,le,oe,ue,ie,M,j],styles:["th[_ngcontent-%COMP%]{cursor:pointer}th.student[_ngcontent-%COMP%]{width:30%}.column-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=n;return e})();function Ze(e){return{student:e.student?Number(e.student):null,educationalEvent:e.educationalEvent?Number(e.educationalEvent):null,studyClass:e.studyClass?Number(e.studyClass):null}}var Fe=(()=>{let n=class n{constructor(t){this.state=t}};n.\u0275fac=function(i){return new(i||n)(f(C))},n.\u0275cmp=E({type:n,selectors:[["bkd-evaluate-absences"]],standalone:!0,features:[K([C,{provide:pe,useExisting:C},de]),k],decls:1,vars:0,template:function(i,r){i&1&&x(0,"router-outlet")},dependencies:[re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let e=n;return e})();var Vt=[{path:"",component:Fe,children:[{path:"",component:Le,data:{restoreScrollPositionFrom:["/evaluate-absences/student/:id"]}},be]}];export{Vt as EVALUATE_ABSENCES_ROUTES}; +import{a as Ee,b as ke,c as Ie}from"./chunk-SOH5T2AJ.js";import{a as ye}from"./chunk-NYTDIO5P.js";import{a as Te}from"./chunk-GD4YO4IV.js";import{a as be}from"./chunk-GXZYLK4L.js";import"./chunk-U4HODSW3.js";import"./chunk-7LCBKZQT.js";import"./chunk-PSXDSPKS.js";import{b as pe,e as O}from"./chunk-C7XT5XXE.js";import"./chunk-YMJC6QZX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{a as Ce,b as Se}from"./chunk-UP3NEN2H.js";import{a as he}from"./chunk-DZZC2YX2.js";import{a as xe}from"./chunk-XLPJMZ3E.js";import{c as fe}from"./chunk-24AFRN2G.js";import{d as ge}from"./chunk-RFO4NYUO.js";import"./chunk-5RDJZAUT.js";import"./chunk-DB66EACG.js";import{P as de,T as _e}from"./chunk-ZK2MNT7Z.js";import"./chunk-AW7CSGKI.js";import{a as me,b as ve}from"./chunk-FTDG26ID.js";import{a as ce,c as ue}from"./chunk-SOHFFTKU.js";import{s as le}from"./chunk-C56YGDXA.js";import"./chunk-UX5TA32W.js";import{$ as E,$a as _,Ab as p,Bb as d,E as q,Eb as L,Ga as v,Gd as j,Ha as J,Hd as M,Ia as c,L as U,Mb as Z,O as N,Q as G,Qb as ee,Rb as te,Sa as s,Sb as ne,Ta as l,Ua as x,Va as F,Vb as ie,Vc as se,W as X,Wa as w,Ya as A,Z as S,_a as y,ha as I,ia as T,ib as P,jb as u,kb as h,lb as g,m as W,oc as ae,pb as R,pc as re,qb as B,ra as z,rb as $,rc as oe,sb as K,tb as k,ua as o,ub as Q,va as f,vb as V,xb as Y}from"./chunk-XTHSYQMN.js";var Ae=(()=>{let n=class n{constructor(t,i,r){this.studentsService=t,this.educationalEventsService=i,this.studyClassesService=r,this.filter={student:null,educationalEvent:null,studyClass:null},this.filterChange=new z,this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(this.filter)}};n.\u0275fac=function(i){return new(i||n)(f(fe),f(Ie),f(Te))},n.\u0275cmp=E({type:n,selectors:[["bkd-evaluate-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[k],decls:20,vars:19,consts:[[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[1,"form-label"],[3,"valueChange","typeaheadService","value"],[3,"valueChange","typeaheadService","value","additionalHttpParams"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(i,r){i&1&&(s(0,"div",0)(1,"div",1)(2,"label",2),u(3),p(4,"translate"),l(),s(5,"bkd-typeahead",3),$("valueChange",function(m){return B(r.filter.student,m)||(r.filter.student=m),m}),l()(),s(6,"div",1)(7,"label",2),u(8),p(9,"translate"),l(),s(10,"bkd-typeahead",3),$("valueChange",function(m){return B(r.filter.educationalEvent,m)||(r.filter.educationalEvent=m),m}),l()(),s(11,"div",1)(12,"label",2),u(13),p(14,"translate"),l(),s(15,"bkd-typeahead",4),$("valueChange",function(m){return B(r.filter.studyClass,m)||(r.filter.studyClass=m),m}),l()(),s(16,"div",5)(17,"button",6),y("click",function(){return r.show()}),u(18),p(19,"translate"),l()()()),i&2&&(o(3),h(d(4,11,"evaluate-absences.header.student")),o(2),c("typeaheadService",r.studentsService),R("value",r.filter.student),o(3),h(d(9,13,"evaluate-absences.header.module-instance")),o(2),c("typeaheadService",r.educationalEventsService),R("value",r.filter.educationalEvent),o(3),h(d(14,15,"evaluate-absences.header.study-class")),o(2),c("typeaheadService",r.studyClassesService),R("value",r.filter.studyClass),c("additionalHttpParams",r.classesHttpFilter),o(3),g(" ",d(19,17,"evaluate-absences.header.show")," "))},dependencies:[ye,M,j],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:1rem 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0});let e=n;return e})();var C=(()=>{let n=class n extends Se{constructor(t,i,r,b,m){super(t,i,m,r,"/evaluate-absences"),this.lessonPresenceService=b,this.queryParamsString$.pipe(G(this.destroy$)).subscribe(D=>this.confirmBackLinkParams={returnparams:D})}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null}}isValidFilter(t){return!!(t.student||t.educationalEvent||t.studyClass)}getInitialSorting(){return{key:"StudentFullName",ascending:!0}}loadEntries(t,i,r){return this.loadingService.load(this.lessonPresenceService.getStatistics(t,i,r),Ce)}buildParamsFromFilter(t){return Ee(t)}};n.\u0275fac=function(i){return new(i||n)(S(Z),S(ve),S(se),S(O),S(xe))},n.\u0275prov=X({token:n,factory:n.\u0275fac});let e=n;return e})();var Be=(e,n,a)=>({entries:e,hasMore:n,loadingPage:a}),$e=()=>[],je=e=>["student",e,"absences"],Me=e=>({returnparams:e});function Oe(e,n){if(e&1){let a=A();s(0,"th",16),y("click",function(){let i=I(a).$implicit,r=_(5);return T(r.state.sortService.toggleSorting(i.key))}),s(1,"div",17)(2,"div",18),p(3,"translate"),u(4),p(5,"translate"),l(),s(6,"div",19),u(7),p(8,"async"),l()()()}if(e&2){let a=n.$implicit,t=_(5);c("ngClass",a.label),o(2),c("ngbTooltip",d(3,4,"evaluate-absences.list.header."+a.label)),o(2),g(" ",d(5,6,"evaluate-absences.list.header."+a.label)," "),o(3),g(" ",d(8,8,t.state.sortService.getSortingChar$(a.key))," ")}}function De(e,n){if(e&1&&(s(0,"a",22),p(1,"async"),u(2),l()),e&2){let a=_().$implicit,t=_().$implicit,i=_(6);c("routerLink",V(5,je,t.StudentRef.Id))("queryParams",V(7,Me,d(1,3,i.profileReturnParams$))),o(2),g(" ",t[a.key]," ")}}function Ne(e,n){if(e&1&&u(0),e&2){let a=_().$implicit,t=_().$implicit;g(" ",t[a.key]," ")}}function Ve(e,n){if(e&1&&(s(0,"td"),p(1,"translate"),v(2,De,3,9,"a",21)(3,Ne,1,1,"ng-template",null,3,L),l()),e&2){let a=n.$implicit,t=P(4);J("data-label",d(1,3,"evaluate-absences.list.header."+a.label)),o(2),c("ngIf",a.key==="StudentFullName")("ngIfElse",t)}}function He(e,n){if(e&1&&(s(0,"tr"),v(1,Ve,5,5,"td",20),l()),e&2){let a=_(6);o(),c("ngForOf",a.columns)}}function We(e,n){if(e&1&&(s(0,"tbody"),v(1,He,2,1,"tr",20),l()),e&2){let a=_(4).bkdLet;o(),c("ngForOf",a.entries)}}function qe(e,n){e&1&&x(0,"bkd-spinner",23)}function Ue(e,n){if(e&1){let a=A();s(0,"button",24),y("click",function(){I(a);let i=_(5);return T(i.state.nextPage())}),u(1),p(2,"translate"),l()}e&2&&(o(),g(" ",d(2,1,"global.pagination.load-more")," "))}function Ge(e,n){if(e&1){let a=A();s(0,"div",8)(1,"div",9),x(2,"bkd-reports-link",10),p(3,"async"),l(),s(4,"table",11),y("scrolled",function(){I(a);let i=_(4);return T(i.onScroll())}),s(5,"thead")(6,"tr"),v(7,Oe,9,10,"th",12),l()(),v(8,We,2,1,"tbody",13),l(),v(9,qe,1,0,"bkd-spinner",14)(10,Ue,3,3,"button",15),l()}if(e&2){let a,t=_(3).bkdLet,i=_();o(2),c("reports",(a=d(3,5,i.reports$))!==null&&a!==void 0?a:Q(7,$e)),o(5),c("ngForOf",i.columns),o(),c("ngIf",t.entries&&t.entries.length>0),o(),c("ngIf",t.loadingPage),o(),c("ngIf",t.hasMore&&!t.loadingPage)}}function Xe(e,n){e&1&&(s(0,"p",25),u(1),p(2,"translate"),l()),e&2&&(o(),g(" ",d(2,1,"evaluate-absences.no-entries")," "))}function ze(e,n){if(e&1&&(F(0),v(1,Ge,11,8,"div",7)(2,Xe,3,3,"ng-template",null,2,L),w()),e&2){let a=P(3),t=_(2).bkdLet;o(),c("ngIf",t.entries&&t.entries.length>0||t.loadingPage)("ngIfElse",a)}}function Je(e,n){e&1&&x(0,"bkd-spinner")}function Ke(e,n){if(e&1&&(F(0),v(1,ze,4,2,"ng-container",6),p(2,"async"),v(3,Je,1,0,"ng-template",null,1,L),w()),e&2){let a=P(4),t=_(2);o(),c("ngIf",d(2,2,t.state.loading$)===!1)("ngIfElse",a)}}function Qe(e,n){e&1&&(s(0,"p",25),u(1),p(2,"translate"),l()),e&2&&(o(),h(d(2,1,"evaluate-absences.no-filter")))}function Ye(e,n){if(e&1){let a=A();F(0),s(1,"bkd-evaluate-absences-header",5),p(2,"async"),y("filterChange",function(i){I(a);let r=_();return T(r.state.setFilter(i))}),l(),v(3,Ke,5,4,"ng-container",6),p(4,"async"),v(5,Qe,3,3,"ng-template",null,0,L),w()}if(e&2){let a=P(6),t=_();o(),c("filter",d(2,3,t.filterFromParams$)),o(2),c("ngIf",d(4,5,t.state.isFilterValid$))("ngIfElse",a)}}var Le=(()=>{let n=class n{constructor(t,i,r,b,m,D){this.state=t,this.scrollPosition=i,this.route=r,this.presenceTypesService=b,this.reportsService=m,this.lessonPresencesService=D,this.reports$=this.loadReports(),this.columns=[{key:"StudentFullName",label:"student"},{key:"TotalAbsences",label:"total"},{key:"TotalAbsencesValidExcuse",label:"valid-excuse"},{key:"TotalAbsencesWithoutExcuse",label:"without-excuse"},{key:"TotalAbsencesUnconfirmed",label:"unconfirmed"},{key:"TotalAbsencesUnchecked",label:"unchecked"},{key:"TotalIncidents",label:"incident"}],this.filterFromParams$=this.route.queryParams.pipe(W(Ze)),this.profileReturnParams$=this.state.queryParamsString$}ngOnInit(){this.filterFromParams$.pipe(q(1)).subscribe(t=>this.state.setFilter(t)),this.presenceTypesService.halfDayActive$.subscribe(t=>{t&&(this.columns=[...this.columns,{key:"TotalHalfDays",label:"halfday"}])})}ngAfterViewInit(){this.scrollPosition.restore()}onScroll(){this.state.nextPage()}loadReports(){return this.state.validFilter$.pipe(N(t=>this.lessonPresencesService.getLessonRefs(t)),N(t=>t.length>0?this.reportsService.getEvaluateAbsencesReports(this.getReportRecordIds(t)):[]),U(1))}getReportRecordIds(t){return t.map(i=>`${i.LessonRef.Id}_${i.RegistrationRef.Id}`)}};n.\u0275fac=function(i){return new(i||n)(f(C),f(he),f(ae),f(_e),f(ge),f(O))},n.\u0275cmp=E({type:n,selectors:[["bkd-evaluate-absences-list"]],standalone:!0,features:[k],decls:7,vars:14,consts:[["noFilter",""],["loading",""],["noEntries",""],["noLink",""],[4,"bkdLet"],[3,"filterChange","filter"],[4,"ngIf","ngIfElse"],["class","py-3",4,"ngIf","ngIfElse"],[1,"py-3"],[1,"buttons"],[1,"mb-2",3,"reports"],["infiniteScroll","",1,"table","table-striped","table-fixed",3,"scrolled"],["scope","col",3,"ngClass","click",4,"ngFor","ngForOf"],[4,"ngIf"],["class","inline",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-sm d-block mx-auto",3,"click",4,"ngIf"],["scope","col",3,"click","ngClass"],[1,"d-flex"],[1,"column-title",3,"ngbTooltip"],[1,"sort-direction"],[4,"ngFor","ngForOf"],["class","student",3,"routerLink","queryParams",4,"ngIf","ngIfElse"],[1,"student",3,"routerLink","queryParams"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"],[1,"mt-3"]],template:function(i,r){i&1&&(s(0,"h1"),u(1),p(2,"translate"),l(),v(3,Ye,7,7,"ng-container",4),p(4,"async"),p(5,"async"),p(6,"async")),i&2&&(o(),h(d(2,2,"evaluate-absences.title")),o(2),c("bkdLet",Y(10,Be,d(4,4,r.state.entries$),d(5,6,r.state.hasMore$),d(6,8,r.state.loadingPage$))))},dependencies:[ce,Ae,ne,me,ke,te,ee,le,oe,ue,ie,M,j],styles:["th[_ngcontent-%COMP%]{cursor:pointer}th.student[_ngcontent-%COMP%]{width:30%}.column-title[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}"],changeDetection:0});let e=n;return e})();function Ze(e){return{student:e.student?Number(e.student):null,educationalEvent:e.educationalEvent?Number(e.educationalEvent):null,studyClass:e.studyClass?Number(e.studyClass):null}}var Fe=(()=>{let n=class n{constructor(t){this.state=t}};n.\u0275fac=function(i){return new(i||n)(f(C))},n.\u0275cmp=E({type:n,selectors:[["bkd-evaluate-absences"]],standalone:!0,features:[K([C,{provide:pe,useExisting:C},de]),k],decls:1,vars:0,template:function(i,r){i&1&&x(0,"router-outlet")},dependencies:[re],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let e=n;return e})();var Vt=[{path:"",component:Fe,children:[{path:"",component:Le,data:{restoreScrollPositionFrom:["/evaluate-absences/student/:id"]}},be]}];export{Vt as EVALUATE_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-HHGALFFJ.js b/public/apps/webapp-schulverwaltung/chunk-PSXDSPKS.js similarity index 83% rename from public/apps/webapp-schulverwaltung/chunk-HHGALFFJ.js rename to public/apps/webapp-schulverwaltung/chunk-PSXDSPKS.js index 3c9500ef..3c9d74eb 100644 --- a/public/apps/webapp-schulverwaltung/chunk-HHGALFFJ.js +++ b/public/apps/webapp-schulverwaltung/chunk-PSXDSPKS.js @@ -1,2 +1,2 @@ -import{v as b}from"./chunk-FTRAQKUW.js";import{a as g}from"./chunk-3AROKYRB.js";import{A as f,Gd as E,_ as i,bc as p,dc as m,j as t,l as u,rc as d}from"./chunk-T7QWSMKM.js";var S=new p(()=>({disableErrorHandling:!1,disableErrorHandlingForStatus:[]}));function R(){return(e,o)=>{let s=e.context.get(S);return o(e).pipe(f(h(s)))}}function h(e){let o=i(d),s=i(g),a=i(E);return r=>{if(r instanceof m&&!e.disableErrorHandling&&(!e.disableErrorHandlingForStatus||!e.disableErrorHandlingForStatus.includes(r.status)))switch(r.status){case 401:return n("noaccess"),o.navigate(["/unauthenticated"]),t;case 403:return n("noaccess"),o.navigate(["/dashboard"]),t;case 404:return n("notfound"),t;case 0:case 503:case 504:return n("unavailable"),t;case 409:return H(r),t;default:return n("server"),t}return u(()=>r)};function n(r){s.error(a.instant(`global.rest-errors.${r}-message`),a.instant(`global.rest-errors.${r}-title`))}function H(r){let c=a.instant("global.rest-errors.conflict-message"),l=v(r);s.error(l.length>0?l.join(` +import{v as b}from"./chunk-C56YGDXA.js";import{a as g}from"./chunk-UX5TA32W.js";import{A as f,Fd as E,_ as i,ac as p,cc as m,j as t,l as u,qc as d}from"./chunk-XTHSYQMN.js";var S=new p(()=>({disableErrorHandling:!1,disableErrorHandlingForStatus:[]}));function R(){return(e,o)=>{let s=e.context.get(S);return o(e).pipe(f(h(s)))}}function h(e){let o=i(d),s=i(g),a=i(E);return r=>{if(r instanceof m&&!e.disableErrorHandling&&(!e.disableErrorHandlingForStatus||!e.disableErrorHandlingForStatus.includes(r.status)))switch(r.status){case 401:return n("noaccess"),o.navigate(["/unauthenticated"]),t;case 403:return n("noaccess"),o.navigate(["/dashboard"]),t;case 404:return n("notfound"),t;case 0:case 503:case 504:return n("unavailable"),t;case 409:return H(r),t;default:return n("server"),t}return u(()=>r)};function n(r){s.error(a.instant(`global.rest-errors.${r}-message`),a.instant(`global.rest-errors.${r}-title`))}function H(r){let c=a.instant("global.rest-errors.conflict-message"),l=v(r);s.error(l.length>0?l.join(` `):c,a.instant("global.rest-errors.conflict-title"))}function v(r){return Array.isArray(r.error?.Issues)?r.error.Issues.map(c=>c?.Message).filter(b):[]}}export{S as a,R as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QHPTZGVN.js b/public/apps/webapp-schulverwaltung/chunk-QHPTZGVN.js deleted file mode 100644 index e5a9d3b5..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-QHPTZGVN.js +++ /dev/null @@ -1,2 +0,0 @@ -import{a as Tt}from"./chunk-Y4QYVF5K.js";import{a as yt}from"./chunk-WN7VWSJW.js";import{b as _t,c as Gt,d as Pt}from"./chunk-LO5XSJLW.js";import{b as Et}from"./chunk-N6FFLIGM.js";import{a as Te,b as de}from"./chunk-33NXTXD7.js";import{A as ye,a as ht,b as It,c as bt,d as St,e as vt,p as xt,q as Ct,u as Ce}from"./chunk-FTRAQKUW.js";import{$ as D,$a as v,$c as Fe,Ac as c,Bb as g,Bc as a,C as we,Cb as b,Cc as M,Db as K,Dd as oe,Eb as Ze,Ed as Q,Fb as ne,Fc as E,G as ze,Ga as y,Gc as C,Gd as xe,Hb as et,Hc as be,Hd as F,Ia as m,Id as k,J as Xe,Ja as Re,Jc as Oe,L as $e,Nc as o,O as G,Pb as tt,Q as Me,Sa as p,Sb as re,Sc as ae,Ta as l,Tb as O,Ua as te,Uc as rt,Va as fe,W as N,Wa as he,Wb as H,Wc as q,Xb as it,Ya as ie,Yb as nt,Z as _,Zc as st,_a as A,a as L,ad as Se,b as U,c as We,ca as Y,cb as Ie,dd as at,e as me,ec as se,ed as ot,f as B,g as pe,ga as W,gd as dt,ha as Z,ia as ee,ib as V,id as lt,jb as u,k as De,kb as P,l as Ke,lb as x,ld as pt,m as I,md as ct,n as ce,nd as ut,od as mt,pd as gt,r as ge,ra as Je,sd as ve,tb as $,td as ft,ua as d,v as qe,va as w,vb as Ye,w as Qe}from"./chunk-T7QWSMKM.js";function ri(i,t){if(i&1&&(p(0,"option",3),u(1),g(2,"translate"),l()),i&2){let r=v();m("ngValue",null),d(),x(" ",b(2,2,r.emptyLabel)," ")}}function si(i,t){if(i&1&&(p(0,"option",3),u(1),l()),i&2){let r=t.$implicit;m("ngValue",r),d(),x(" ",r.Value," ")}}var Dt=(()=>{let t=class t{constructor(){this.options=[],this.allowEmpty=!0,this.emptyLabel="",this.value=null,this.disabled=!1,this.tabindex=0,this.valueChange=new Je,this.options$=new B([]),this.rawValue$=new B(null),this.value$=ce([this.rawValue$,this.options$]).pipe(I(([e,n])=>n&&n.find(s=>s.Key===e)||null))}ngOnChanges(e){e.value&&this.rawValue$.next(e.value.currentValue),e.options&&this.options$.next(e.options.currentValue)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=D({type:t,selectors:[["bkd-select"]],inputs:{options:"options",allowEmpty:"allowEmpty",emptyLabel:"emptyLabel",value:"value",disabled:"disabled",tabindex:"tabindex"},outputs:{valueChange:"valueChange"},standalone:!0,features:[W,$],decls:5,vars:7,consts:[[1,"form-select",3,"ngModelChange","tabindex","disabled","ngModel"],[3,"ngValue",4,"ngIf"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"]],template:function(n,s){n&1&&(p(0,"select",0),g(1,"async"),A("ngModelChange",function(T){return s.valueChange.emit(T&&T.Key)}),y(2,ri,3,4,"option",1)(3,si,2,2,"option",2),u(4,` > -`),l()),n&2&&(Ie("tabindex",s.tabindex),m("disabled",s.disabled)("ngModel",b(1,5,s.value$)),d(2),m("ngIf",s.allowEmpty),d(),m("ngForOf",s.options))},dependencies:[ve,ct,ut,pt,Se,ot,O,re,H,k,F],changeDetection:0});let i=t;return i})();var wt=C({Id:a,Designation:c,StudentCount:a,Number:c});var ke=C({Id:c,TestId:a,CourseRegistrationId:a,GradeId:o(a),GradeValue:o(a),GradeDesignation:o(c),Points:o(a),StudentId:a});var $t=C({Id:a,CourseId:a,Date:ae,Designation:c,Weight:a,WeightPercent:a,IsPointGrading:M,MaxPoints:o(a),MaxPointsAdjusted:o(a),IsPublished:M,IsOwner:M,Owner:o(c),GradingScaleId:o(a),Results:o(E(ke))});var Mt=C({Id:a}),Rt=be({HRef:o(c)}),ai=be({HasEvaluationStarted:M,EvaluationUntil:o(ae),HasReviewOfEvaluationStarted:M,HasTestGrading:M,Id:a}),oi=Oe([Mt,Rt,ai]),di=be({Id:a,StudentCount:a}),li=Oe([Mt,Rt,di]),pi=C({Grade:c,AverageTestResult:a,Id:a,StudentId:a}),je=C({AverageTestResult:a,CanGrade:M,EventId:a,GradeId:o(a),GradeValue:o(a),Id:a,StudentId:a}),le=C({HRef:c,Id:a,Number:c,Designation:c,DateFrom:o(ae),DateTo:o(ae),StatusId:a,GradingScaleId:o(a),FinalGrades:o(E(pi)),Gradings:o(E(je)),Tests:o(E($t)),EvaluationStatusRef:oi,AttendanceRef:li,ParticipatingStudents:o(E(Gt)),Classes:o(E(wt))}),Ot=C({TestResults:E(ke),Gradings:E(je)}),Ft=C({Gradings:E(je)});var _e=(()=>{let t=class t extends de{constructor(e,n){super(e,n,le,"Courses"),this.statusCodec=C(rt(this.codec.props,["Id","StatusId","EvaluationStatusRef"]))}getNumberOfCoursesForRating(){return this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef&fields=Id,StatusId,EvaluationStatusRef&filter.StatusId=;10300;10240`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(G(Q(this.statusCodec)),I(e=>e.filter(n=>n.EvaluationStatusRef.HasEvaluationStarted===!0)),I(e=>e.length))}getExpandedCourses(e){return Tt(e,"TeacherRole")?this.http.get(`${this.baseUrl}/?expand=EvaluationStatusRef,AttendanceRef,Classes,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"TeacherRole"}}).pipe(G(Q(le))):De([])}getExpandedCourse(e){return this.http.get(`${this.baseUrl}/${e}?expand=ParticipatingStudents,EvaluationStatusRef,Tests,Gradings,FinalGrades,Classes`).pipe(G(oe(le)))}getExpandedCoursesForDossier(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades,EvaluationStatusRef,ParticipatingStudents,Classes&filter.StatusId=;${this.settings.eventlist.statusfilter}`).pipe(G(Q(le)))}getExpandedCoursesForStudent(){return this.http.get(`${this.baseUrl}/?expand=Tests,Gradings,FinalGrades&filter.StatusId=;${this.settings.eventlist.statusfilter}`,{headers:{"X-Role-Restriction":"StudentRole"}}).pipe(G(Q(le)))}add(e,n,s,f,T,j,h){let S={Tests:[{Date:n,Designation:s,Weight:f,IsPointGrading:T,MaxPoints:j,MaxPointsAdjusted:h}]};return this.http.put(`${this.baseUrl}/${e}/Tests/New`,S).pipe(I(()=>{}))}update(e,n,s,f,T,j,h,S){let J={Tests:[{Id:n,Designation:s,Date:f,Weight:T,IsPointGrading:j,MaxPoints:h,MaxPointsAdjusted:S}]};return this.http.put(`${this.baseUrl}/${e}/Tests/Update`,J).pipe(I(()=>{}))}delete(e,n){let s={TestIds:[n]};return this.http.put(`${this.baseUrl}/${e}/Tests/Delete`,s).pipe(I(()=>n))}updateTestResult(e,n){let S=n,{studentId:s,testId:f}=S,T=We(S,["studentId","testId"]),j={StudentIds:[s],TestId:f},h="gradeId"in T?U(L({},j),{GradeId:T.gradeId}):U(L({},j),{Points:T.points});return this.http.put(`${this.baseUrl}/${e}/SetTestResult`,h).pipe(G(oe(Ot)),G(({TestResults:J,Gradings:Ue})=>J.length<=1&&Ue.length===1?De({courseId:e,testResult:J[0]??null,grading:Ue[0]}):Ke(()=>new Error("`TestResults` or `Gradings` does not contain a single value"))))}setAverageAsFinalGrade(e){return this.http.put(`${this.baseUrl}/SetAverageTestResult`,e).pipe(G(oe(Ft)))}publishTest(e){let n={TestIds:[e]};return this.http.put(`${this.baseUrl}/PublishTest`,n).pipe(I(()=>e))}unpublishTest(e){let n={TestIds:[e]};return this.http.put(`${this.baseUrl}/UnpublishTest`,n).pipe(I(()=>e))}};t.\u0275fac=function(n){return new(n||t)(_(se),_(q))},t.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function Bt(i){return i.length===0?0:Be(i.map(({value:t,weight:r})=>t*r))/Be(i.map(({weight:t})=>t))}function Ne(i){return i.length===0?0:Number(Be(i)/i.length)}function Be(i){return i.reduce(ci,0)}function ci(i,t){return i+t}function In(i,t,r){return i?i.Tests?.reduce((e,n)=>e||n.Id===t&&n.Results?.find(s=>s.TestId===t&&s.StudentId===r)||null,null)??null:null}function bn(i,t,r){return t.map(e=>e.Id===i.TestId?Ve(i,e,r):e)}function Sn(i,t,r){return r.map(e=>e.Id===i?ui(t,e):e)}function vn(i,t){return t.map(r=>r.Id===i?U(L({},r),{IsPublished:!r.IsPublished}):r)}function xn(i){let t=gi(i);if(t.length===0)throw new Error("unable to calculate averages without results");return Ne(t)}function Ae(i){return i.MaxPointsAdjusted||i.MaxPoints}function Cn(i){let t=mi(i);if(t.length===0)throw new Error("unable to calculate averages without results");return Ne(t)}function X(i,t){return t.Results?.find(r=>r.StudentId===i)}function yn(i,t){return t===null?null:t.filter(r=>r.Id!==i)}function Ve(i,t,r){let e=r&&t.Results?.find(s=>s.TestId===i.TestId&&s.StudentId===i.StudentId),n=t.Results?.filter(s=>!(s.TestId===i.TestId&&s.StudentId===i.StudentId))||[];return e&&r==="grade"?i.GradeId=e.GradeId:e&&r==="points"&&(i.Points=e.Points),U(L({},t),{Results:[...n,i]})}function At(i){return i.slice().sort((t,r)=>r.Date.getTime()-t.Date.getTime())}function Ge(i,t){return t?.find(r=>r.Id===i.GradingScaleId)||null}function ui(i,t){return U(L({},t),{Results:t.Results?.filter(r=>r.StudentId!==i)||[]})}function mi(i){return i.Results?.filter(t=>t.GradeDesignation!==null).map(t=>Number(t.GradeDesignation)).filter(t=>!isNaN(t))||[]}function gi(i){return i.Results?.map(t=>t.Points!==null?t.Points:Nt).filter(t=>t>Nt)||[]}var Nt=-1;var He=C({Id:c,SubscriptionId:a,VssId:a,EventId:a,DropdownItems:o(E(yt)),IdPerson:a,ShowAsRadioButtons:M,Value:o(c)}),Vt=C({Id:a,CurrentWorkProgressId:o(c||o(a)),EventId:o(a),PersonId:o(a),Status:c,StatusId:o(a),IsOkay:o(M),IsQueued:o(M),EventDesignation:o(c),EventInformation:o(c||a),EventNotes:o(c||a),CheckPersonalInformation:o(M),CorrespondencePersonId:o(a),CorrespondenceAddressTypeId:o(c||a),Billing1PersonId:o(a),Billing1AddressTypeId:o(c||a),Billing2PersonId:o(c||a),Billing2AddressTypeId:o(c||a),KindOfPaymentId1:o(c||a),KindOfPaymentEmail1:o(c||a),KindOfPaymentId2:o(c||a),KindOfPaymentEmail2:o(c||a),IdObject:o(a),IdSubscription:o(a),IdStatus:o(a),AnsweredQuestions:o(c||a),Messages:o(c||a),SubscriptionDetails:o(E(He)),HRef:o(c)});var Ht=(()=>{let t=class t extends de{constructor(e,n){super(e,n,He,"Subscriptions")}getIdSubscriptionsByStudentAndCourse(e,n){return this.http.get(`${this.settings.apiUrl}/Subscriptions/?filter.PersonId==${e}&filter.EventId=;${n}`).pipe(G(Q(Vt)))}};t.\u0275fac=function(n){return new(n||t)(_(se),_(q))},t.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var hi=C({Id:a,Designation:c}),Le=C({Id:a,Grades:E(hi)});var Lt=(()=>{let t=class t extends de{constructor(e,n){super(e,n,Le,"GradingScales")}getGradingScale(e){return this.http.get(`${this.baseUrl}/${e}`).pipe(G(oe(Le)))}getGradingScales(e){return ge(e.map(this.getGradingScale.bind(this)))}};t.\u0275fac=function(n){return new(n||t)(_(se),_(q))},t.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var Ee=(()=>{let t=class t{constructor(e,n,s,f,T,j){this.coursesRestService=e,this.subscriptionRestService=n,this.reportsService=s,this.loadingService=f,this.gradingScalesRestService=T,this.settings=j,this.studentId$=new pe(1),this.initialStudentCourses$=this.studentId$.pipe(ze(),G(this.loadCourses.bind(this)),I(h=>h.sort((S,J)=>S.Designation.localeCompare(J.Designation))),$e(1)),this.action$=new pe(1),this.studentCourses$=qe(this.action$,this.initialStudentCourses$.pipe(I(h=>({type:"initializeCourses",payload:h})))).pipe(Xe(this.coursesReducer.bind(this),[]),$e(1)),this.loading$=this.loadingService.loading$,this.studentCourseIds$=this.studentCourses$.pipe(I(h=>h.flatMap(S=>S.Id))),this.idSubscriptions$=ce([this.studentId$,this.studentCourseIds$]).pipe(G(([h,S])=>this.subscriptionRestService.getIdSubscriptionsByStudentAndCourse(h,S))),this.ids$=this.idSubscriptions$.pipe(I(h=>h.map(S=>S.Id))),this.testReports$=this.ids$.pipe(I(h=>this.reportsService.getTeacherSubscriptionReports(h))),this.tests$=this.studentCourses$.pipe(I(h=>h.flatMap(S=>S.Tests).filter(Ce))),this.gradingScaleIdsFromTests$=this.tests$.pipe(I(h=>[...h.map(S=>S.GradingScaleId)].filter(Ce).filter(ye))),this.gradingScaleIdsFromCourses$=this.studentCourses$.pipe(I(h=>h.flatMap(S=>S.GradingScaleId).filter(Ce).filter(ye))),this.gradingScaleIds$=ce([this.gradingScaleIdsFromCourses$,this.gradingScaleIdsFromTests$]).pipe(I(([h,S])=>h.concat(S).filter(ye))),this.gradingScales$=this.gradingScaleIds$.pipe(G(h=>ge(h.map(S=>this.gradingScalesRestService.getGradingScale(S)))))}setStudentId(e){this.studentId$.next(e)}getFinalGradeForStudent(e,n){return e?.FinalGrades?.find(s=>s.StudentId===n)}getGradingForStudent(e,n){return e?.Gradings?.find(s=>s.StudentId===n)}getGradingScaleOfCourse(e,n){return n?.find(s=>s.Id===e.GradingScaleId)}getGradesForStudent(e,n,s){return e.Tests?.flatMap(f=>({value:Number(Ge(f,s)?.Grades.find(j=>j.Id===X(n,f)?.GradeId)?.Designation),weight:f.Weight})).filter(({value:f})=>!!f)||[]}updateStudentCourses(e){this.action$.next({type:"updateCourses",payload:e})}loadCourses(e){return this.loadingService.load(this.coursesRestService.getExpandedCoursesForDossier().pipe(I(n=>n.filter(s=>s.ParticipatingStudents?.find(f=>f.Id===e)))))}coursesReducer(e,n){switch(n.type){case"initializeCourses":return n.payload;case"updateCourses":return this.updateCourses([...e],n.payload);default:return e}}updateCourses(e,n){return e.map(s=>U(L({},s),{Tests:s.Tests!==null?s.Tests.map(f=>f.Id===n.Id?n:f):null}))}};t.\u0275fac=function(n){return new(n||t)(_(_e),_(Ht),_(Pt),_(Et),_(Lt),_(q))},t.\u0275prov=N({token:t,factory:t.\u0275fac});let i=t;return i})();var Wt=(()=>{let t=class t{constructor(e){this.modal=e}open(...e){let n=this.modal.open(...e);return this.applyPortalOffsetAndMaxHeight(n),this.disablePortalScrolling(n),n}get activeInstances(){return this.modal.activeInstances}dismissAll(...e){return this.modal.dismissAll(...e)}hasOpenModals(...e){return this.modal.hasOpenModals(...e)}applyPortalOffsetAndMaxHeight(e){let n=this.getModalWindowElement(e);if(!n){console.warn("Trying to apply portal offset to , but element is not present!");return}this.portalWindow&&(n.style.top=`${this.getModalIframeOffset()}px`,n.style.maxHeight=`${this.getModalHeight()}px`)}disablePortalScrolling(e){if(this.portalWindow&&this.portalDocument){let n=this.portalWindow.innerWidth-this.portalDocument.clientWidth;this.portalDocument.style.paddingRight=`${n}px`,this.portalDocument.style.overflow="hidden"}e.hidden.subscribe(()=>{this.portalDocument&&(this.portalDocument.style.paddingRight="0px",this.portalDocument.style.overflow="auto")})}getModalWindowElement(e){return e._windowCmptRef?.instance?._elRef?.nativeElement??null}getModalIframeOffset(){return Math.max(this.getViewportTop()-this.getIframeTop(),0)}getIframeTop(){return this.portalQuerySelector("bkd-content")?.shadowRoot?.querySelector("iframe")?.offsetTop??0}getIFrameBottom(){let e=this.portalQuerySelector("bkd-content")?.shadowRoot?.querySelector("iframe");return e?e.offsetTop+e.offsetHeight:0}getModalTop(){return Math.max(this.getViewportTop(),this.getIframeTop())}getModalBottom(){return Math.min(this.getViewportBottom(),this.getIFrameBottom())}getModalHeight(){return this.getModalBottom()-this.getModalTop()}getViewportTop(){return this.portalWindow?.scrollY??0}getViewportBottom(){return this.getViewportTop()+this.getViewportHeight()}getViewportHeight(){return this.portalWindow?.innerHeight??0}portalQuerySelector(e){return this.portalWindow?.document?.querySelector("bkd-portal")?.shadowRoot?.querySelector(e)??null}get portalDocument(){return this.portalWindow?.document.documentElement??null}get portalWindow(){return window.parent===window?null:window.parent}};t.\u0275fac=function(n){return new(n||t)(_(Ct))},t.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function Pe(i,t,r){return t?t.Grade:vi(i,r)||i?.GradeValue}function vi(i,t){return t?.Grades.find(r=>r.Id===i?.GradeId)?.Designation}var xi="1-3",qt="\u2013",Qt=(()=>{let t=class t{constructor(e){this.locale=e}transform(e,n,s){let f=Number(e??null);return isNaN(f)?qt:Ci(Number(e??null),s??this.locale,n)}};t.\u0275fac=function(n){return new(n||t)(w(et,16))},t.\u0275pipe=Y({name:"decimalOrDash",type:t,pure:!0,standalone:!0});let i=t;return i})();function Ci(i,t,r){return i===0?qt:tt(i,t,`1.${yi(r)}`)}function yi(i){return i?String(i).includes("-")?String(i):`${i}-${i}`:xi}var zt=(()=>{let t=class t{constructor(){}getGradeForStudent(){return Pe(this.grading,this.finalGrade,this.gradingScale)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-final-grade"]],inputs:{finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},standalone:!0,features:[$],decls:14,vars:11,consts:[[1,"final-entry"],["data-testid","final-grade"],["data-testid","average-test-results"]],template:function(n,s){n&1&&(p(0,"div",0)(1,"div"),u(2),g(3,"translate"),l(),p(4,"div",1)(5,"span"),u(6),l()(),p(7,"div"),u(8),g(9,"translate"),l(),p(10,"div",2)(11,"span"),u(12),g(13,"decimalOrDash"),l()()()),n&2&&(d(2),P(b(3,4,"dossier.grade")),d(4),P(s.getGradeForStudent()||"\u2013"),d(2),P(b(9,6,"dossier.average")),d(4),P(K(13,8,s.average,"1-3")))},dependencies:[k,F,Qt],styles:[".final-entry[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:repeat(2,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}"]});let i=t;return i})();var Xt=(()=>{let t=class t{constructor(e){this.translate=e}transform(e,n,s,f="tests.points"){return e.IsPointGrading&&(e.IsPublished||s)?`${X(n,e)?.Points||"\u2013"} / ${e.MaxPointsAdjusted||e.MaxPoints} ${this.translate.instant(f)}`:""}};t.\u0275fac=function(n){return new(n||t)(w(xe,16))},t.\u0275pipe=Y({name:"bkdTestPoints",type:t,pure:!0,standalone:!0});let i=t;return i})();var Jt=(()=>{let t=class t{constructor(e){this.translate=e}transform(e){return`${this.translate.instant("tests.factor")} ${e.Weight} (${e.WeightPercent}%)`}};t.\u0275fac=function(n){return new(n||t)(w(xe,16))},t.\u0275pipe=Y({name:"bkdTestWeight",type:t,pure:!0,standalone:!0});let i=t;return i})();var Ti=i=>({maxPoints:i});function _i(i,t){if(i&1&&(p(0,"div",15),u(1),g(2,"translate"),l()),i&2){let r=v(2);d(),x(" ",K(2,1,"global.validation-errors.invalidPoints",Ye(4,Ti,r.maxPoints))," ")}}function Gi(i,t){if(i&1){let r=ie();p(0,"div",11)(1,"label",12),u(2),g(3,"translate"),l(),p(4,"div",6)(5,"input",13,0),A("input",function(){Z(r);let n=V(6),s=v();return ee(s.onPointsChange(n.value))}),l()(),y(7,_i,3,6,"div",14),l()}if(i&2){let r=v();d(2),P(b(3,8,"dossier.dialog.points")),d(2),Re("is-invalid",r.pointsInput.errors),d(),Re("is-invalid",r.pointsInput.errors),Ie("max",r.maxPoints),m("formControl",r.pointsInput),d(2),m("ngIf",r.pointsInput.errors)}}var Yt=500,Zt=(()=>{let t=class t{constructor(e,n){this.activeModal=e,this.courseService=n,this.maxPoints=0,this.gradeSubject$=new me,this.pointsSubject$=new me,this.closeButtonDisabled$=new B(!1),this.gradingScaleDisabled$=new B(!0),this.grade$=this.gradeSubject$.pipe(we(Yt)),this.points$=this.pointsSubject$.pipe(we(Yt),Qe(this.isValid.bind(this)),I(Number)),this.destroy$=new me}ngOnInit(){this.maxPoints=Ae(this.test),this.pointsInput=new at({value:this.points,disabled:!1},[Fe.min(0),Fe.pattern("[0-9]+([\\.][0-9]+)?"),this.maxPointValidator()]),this.gradingScaleDisabled$.next(this.test.IsPointGrading&&this.points>0),this.points$.pipe(Me(this.destroy$)).subscribe(e=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,points:e})),this.grade$.pipe(Me(this.destroy$)).subscribe(e=>this.updateTestResult({studentId:this.studentId,testId:this.test.Id,gradeId:e}))}onGradeChange(e){this.gradeSubject$.next(e)}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabled$.next(e.length>0)}updateTestResult(e){this.closeButtonDisabled$.next(!0),this.courseService.updateTestResult(this.test.CourseId,e).subscribe(({testResult:n})=>{this.gradeId=n?.GradeId??null,this.updatedTestResult=n,this.closeButtonDisabled$.next(!1)})}isValid(e){return e===""||isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}maxPointValidator(){return e=>Number(e.value)>Ae(this.test)?{customMax:!0}:null}};t.\u0275fac=function(n){return new(n||t)(w(xt),w(_e))},t.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-edit"]],inputs:{test:"test",gradeId:"gradeId",gradeOptions:"gradeOptions",points:"points",studentId:"studentId"},standalone:!0,features:[$],decls:19,vars:20,consts:[["pointInput",""],[1,"modal-body"],[1,"mb-4"],["class","form-group row",4,"ngIf"],[1,"form-group","row","mt-2"],["for","grade",1,"col-6","col-form-label"],[1,"col-6"],["id","grade",3,"valueChange","options","value","allowEmpty","disabled"],[1,"text-muted","mt-4"],[1,"modal-footer"],["type","button",1,"btn","btn-primary",3,"click","disabled"],[1,"form-group","row"],["for","points",1,"col-6","col-form-label"],["id","points","type","number","step","0.01","min","0",1,"form-control",3,"input","max","formControl"],["class","invalid-feedback col-6 offset-6","data-testid","validation-error-message",4,"ngIf"],["data-testid","validation-error-message",1,"invalid-feedback","col-6","offset-6"]],template:function(n,s){n&1&&(p(0,"div",1)(1,"p",2),u(2),l(),y(3,Gi,8,10,"div",3),p(4,"div",4)(5,"label",5),u(6),g(7,"translate"),l(),p(8,"div",6)(9,"bkd-select",7),g(10,"async"),A("valueChange",function(T){return T&&s.onGradeChange(T)}),l()()(),p(11,"p",8),u(12),g(13,"translate"),l()(),p(14,"div",9)(15,"button",10),g(16,"async"),A("click",function(){return s.activeModal.close(s.updatedTestResult)}),u(17),g(18,"translate"),l()()),n&2&&(d(2),P(s.test.Designation),d(),m("ngIf",s.test.IsPointGrading),d(3),P(b(7,10,"dossier.dialog.grade")),d(3),m("options",s.gradeOptions)("value",s.gradeId)("allowEmpty",!1)("disabled",b(10,12,s.gradingScaleDisabled$)),d(3),x(" ",b(13,14,s.test.IsPointGrading?"dossier.dialog.hint.points":"dossier.dialog.hint.grade")," "),d(3),m("disabled",b(16,16,s.closeButtonDisabled$)),d(2),x(" ",b(18,18,"dossier.dialog.close")," "))},dependencies:[O,ve,st,dt,Se,gt,mt,ft,lt,Dt,H,k,F]});let i=t;return i})();function Ei(i,t){if(i&1){let r=ie();p(0,"a",11),A("click",function(){Z(r);let n=v().bkdLet,s=v();return ee(s.editGrading(n))}),p(1,"i",12),u(2,"edit"),l(),p(3,"span",13),u(4),g(5,"async"),l()()}if(i&2){let r=v(2);d(4),P(b(5,1,r.grading$))}}function Pi(i,t){if(i&1&&(p(0,"span",13),u(1),g(2,"async"),l()),i&2){let r=v(2);d(),P(b(2,1,r.grading$))}}function Di(i,t){if(i&1&&(p(0,"div",14),u(1),g(2,"translate"),l()),i&2){let r=v().bkdLet;d(),x(" ",b(2,1,r.IsPublished?"tests.published":"tests.not-published")," ")}}function wi(i,t){if(i&1&&(p(0,"div",2)(1,"div",3),u(2),l(),p(3,"div",4),u(4),g(5,"date"),l(),p(6,"div",5),y(7,Ei,6,3,"a",6)(8,Pi,3,3,"ng-template",null,0,ne),l(),p(10,"div",7),u(11),g(12,"bkdTestWeight"),l(),p(13,"div",8)(14,"span"),u(15),g(16,"bkdTestPoints"),l()(),p(17,"div",9),u(18),l(),y(19,Di,3,3,"div",10),l()),i&2){let r=t.bkdLet,e=V(9),n=v();d(2),x(" ",r.Designation," "),d(2),x(" ",K(5,8,r.Date,"dd.MM.yyyy")," "),d(3),m("ngIf",n.isEditable&&r.IsOwner)("ngIfElse",e),d(4),x(" ",b(12,11,r)," "),d(4),P(Ze(16,13,r,n.studentId,n.isEditable,"dossier.points")),d(3),x(" ",r.Owner," "),d(),m("ngIf",n.isEditable)}}var ei=(()=>{let t=class t{constructor(e,n){this.gradeService=e,this.modalService=n,this.test$=new pe(1),this.grading$=this.test$.pipe(I(this.getGrading.bind(this)))}ngOnChanges(e){e.test&&this.test$.next(this.test)}editGrading(e){let n=this.modalService.open(Zt,{backdrop:"static"});n.componentInstance.test=e,n.componentInstance.gradeId=this.getGradeId(e),n.componentInstance.gradeOptions=t.mapToOptions(this.gradingScale),n.componentInstance.studentId=this.studentId,n.componentInstance.points=this.getPoints(e),n.result.then(s=>{s&&this.updateStudentGrade(s,e)},()=>{})}updateStudentGrade(e,n){let s=Ve(e,n);this.gradeService.updateStudentCourses(s)}getGrading(e){return this.gradingScale?.Grades.find(n=>n.Id===this.getGradeId(e))?.Designation||"\u2013"}getGradeId(e){return X(this.studentId,e)?.GradeId||null}getPoints(e){return X(this.studentId,e)?.Points||null}static mapToOptions(e){return e?.Grades.map(n=>({Key:n.Id,Value:n.Designation}))||null}};t.\u0275fac=function(n){return new(n||t)(w(Ee),w(Wt))},t.\u0275cmp=D({type:t,selectors:[["bkd-dossier-single-test"]],inputs:{test:"test",studentId:"studentId",gradingScale:"gradingScale",isEditable:"isEditable"},standalone:!0,features:[W,$],decls:2,vars:3,consts:[["notEditable",""],["class","test-entry",4,"bkdLet"],[1,"test-entry"],["data-testid","test-designation",1,"designation"],["data-testid","test-date",1,"date"],[1,"grade"],["class","btn btn-link","aria-label","edit grade",3,"click",4,"ngIf","ngIfElse"],["data-testid","test-factor",1,"factor"],["data-testid","test-points",1,"points"],["data-testid","test-teacher",1,"teacher"],["class","state","data-testid","test-status",4,"ngIf"],["aria-label","edit grade",1,"btn","btn-link",3,"click"],["data-testid","test-grade-edit-icon",1,"material-icons"],["data-testid","test-grade"],["data-testid","test-status",1,"state"]],template:function(n,s){n&1&&(y(0,wi,20,18,"div",1),g(1,"async")),n&2&&m("bkdLet",b(1,1,s.test$))},dependencies:[Te,O,H,it,k,F,Xt,Jt],styles:['.test-entry[_ngcontent-%COMP%]{border-top:1px solid #dee2e6;padding:1rem;display:grid;grid-template-areas:"designation designation grade factor" "date date points ." "teacher teacher . ." "state state . .";grid-template-columns:repeat(4,1fr)}span[_ngcontent-%COMP%]{margin-left:2em}.designation[_ngcontent-%COMP%]{grid-area:designation}.date[_ngcontent-%COMP%]{grid-area:date}.grade[_ngcontent-%COMP%]{grid-area:grade}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;color:#000;padding:0;text-decoration:none}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.grade[_ngcontent-%COMP%] a[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.grade[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:-1em;color:#00000080}.points[_ngcontent-%COMP%]{grid-area:points;color:#00000080}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.state[_ngcontent-%COMP%]{grid-area:state}@media (max-width: 575.98px){.test-entry[_ngcontent-%COMP%]{grid-template-areas:"designation designation" "date grade" "factor points" "teacher teacher" "state state";grid-template-columns:repeat(2,1fr)}}']});let i=t;return i})();function $i(i,t){if(i&1&&te(0,"bkd-dossier-single-test",5),i&2){let r=t.$implicit,e=v(3);m("test",r)("studentId",e.studentId)("gradingScale",e.getGradingScaleOfTest(r))("isEditable",e.isEditable)}}function Mi(i,t){if(i&1&&(p(0,"div"),te(1,"bkd-dossier-grades-final-grade",3),y(2,$i,1,4,"bkd-dossier-single-test",4),l()),i&2){let r=v().bkdLet,e=v();d(),m("finalGrade",e.decoratedCourse.finalGrade)("grading",e.decoratedCourse.grading)("gradingScale",e.decoratedCourse.gradingScale)("average",e.decoratedCourse.average),d(),m("ngForOf",r)}}function Ri(i,t){i&1&&(p(0,"p",6),u(1),g(2,"translate"),l()),i&2&&(d(),x(" ",b(2,1,"dossier.no-tests")," "))}function Oi(i,t){if(i&1&&(fe(0),y(1,Mi,3,5,"div",2)(2,Ri,3,3,"ng-template",null,0,ne),he()),i&2){let r=t.bkdLet,e=V(3);d(),m("ngIf",r.length>0)("ngIfElse",e)}}var ti=(()=>{let t=class t{ngOnChanges(e){e.decoratedCourse&&this.sortedTests$.next(this.sortedTests())}constructor(){this.sortedTests$=new B([])}sortedTests(){return this.decoratedCourse.course.Tests?At(this.decoratedCourse.course.Tests):[]}getGradingScaleOfTest(e){return Ge(e,this.gradingScales)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=D({type:t,selectors:[["bkd-dossier-course-tests"]],inputs:{studentId:"studentId",decoratedCourse:"decoratedCourse",gradingScales:"gradingScales",isEditable:"isEditable"},standalone:!0,features:[W,$],decls:2,vars:3,consts:[["noTests",""],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[3,"finalGrade","grading","gradingScale","average"],[3,"test","studentId","gradingScale","isEditable",4,"ngFor","ngForOf"],[3,"test","studentId","gradingScale","isEditable"],["data-testid","message-no-tests",1,"p-3"]],template:function(n,s){n&1&&(y(0,Oi,4,2,"ng-container",1),g(1,"async")),n&2&&m("bkdLet",b(1,1,s.sortedTests$))},dependencies:[Te,O,zt,re,ei,H,k,F]});let i=t;return i})();function Fi(i,t){if(i&1&&(p(0,"span",2),u(1),l()),i&2){let r=v();d(),x(" (",r.grade,")")}}function ki(i,t){if(i&1&&(p(0,"span",3),u(1),g(2,"number"),l()),i&2){let r=v();d(),x(" (",K(2,1,r.average,"1.1-3"),")")}}var ii=(()=>{let t=class t{constructor(){}get grade(){return this.getGradeForStudent()}getGradeForStudent(){return Pe(this.grading,this.finalGrade,this.gradingScale)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-course-header"]],inputs:{designation:"designation",finalGrade:"finalGrade",grading:"grading",gradingScale:"gradingScale",average:"average"},standalone:!0,features:[$],decls:3,vars:3,consts:[["class","grade","data-testId","grade",4,"ngIf"],["class","average","data-testId","average",4,"ngIf"],["data-testId","grade",1,"grade"],["data-testId","average",1,"average"]],template:function(n,s){n&1&&(u(0),y(1,Fi,2,1,"span",0)(2,ki,3,4,"span",1)),n&2&&(P(s.designation),d(),m("ngIf",s.grade),d(),m("ngIf",!s.grade&&s.average))},dependencies:[O,nt],styles:[".average[_ngcontent-%COMP%]{color:#00000080}"]});let i=t;return i})();function ji(i,t){if(i&1&&te(0,"bkd-dossier-course-tests",11),i&2){let r=v().$implicit,e=v(2);m("decoratedCourse",r)("studentId",e.studentId)("gradingScales",e.gradingScales)("isEditable",e.isEditable)}}function Bi(i,t){if(i&1){let r=ie();p(0,"div")(1,"div",4)(2,"div",5,1)(4,"div",6)(5,"bkd-student-dossier-entry-header",7),A("click",function(){Z(r);let n=V(3);return ee(n.toggle())}),te(6,"bkd-dossier-grades-course-header",8),l()(),p(7,"div",9)(8,"div",10),y(9,ji,1,4,"ng-template"),l()()()()()}if(i&2){let r=t.$implicit,e=V(3);d(5),m("opened",!e.collapsed),d(),m("designation",r.course.Designation)("finalGrade",r.finalGrade)("grading",r.grading)("gradingScale",r.gradingScale)("average",r.average)}}function Ni(i,t){if(i&1&&(fe(0),y(1,Bi,10,6,"div",3),g(2,"async"),he()),i&2){let r=v();d(),m("ngForOf",b(2,2,r.decoratedCoursesSubject$))("ngForTrackBy",r.trackByCourseId)}}function Ai(i,t){i&1&&(p(0,"p",12),u(1),g(2,"translate"),l()),i&2&&(d(),x(" ",b(2,1,"dossier.no-courses")," "))}var Ar=(()=>{let t=class t{constructor(e){this.dossierGradeService=e,this.isEditable=!0,this.decoratedCoursesSubject$=new B([])}ngOnChanges(){this.decoratedCoursesSubject$.next(this.decorateCourses())}trackByCourseId(e,n){return n.course.Id}decorateCourses(){return this.courses?.map(e=>{let n=this.dossierGradeService.getFinalGradeForStudent(e,this.studentId),s=this.dossierGradeService.getGradesForStudent(e,this.studentId,this.gradingScales);return{course:e,finalGrade:n,grading:this.dossierGradeService.getGradingForStudent(e,this.studentId),gradingScale:this.dossierGradeService.getGradingScaleOfCourse(e,this.gradingScales),average:n?.AverageTestResult||Bt(s)}})}};t.\u0275fac=function(n){return new(n||t)(w(Ee))},t.\u0275cmp=D({type:t,selectors:[["bkd-dossier-grades-view"]],inputs:{courses:"courses",studentId:"studentId",gradingScales:"gradingScales",isEditable:"isEditable"},standalone:!0,features:[W,$],decls:3,vars:2,consts:[["noCourses",""],["courses","ngbAccordionItem"],[4,"ngIf","ngIfElse"],[4,"ngFor","ngForOf","ngForTrackBy"],["ngbAccordion",""],["ngbAccordionItem",""],["ngbAccordionHeader",""],[3,"click","opened"],[3,"designation","finalGrade","grading","gradingScale","average"],["ngbAccordionCollapse",""],["ngbAccordionBody",""],[3,"decoratedCourse","studentId","gradingScales","isEditable"],["data-testid","message-no-courses",1,"py-3"]],template:function(n,s){if(n&1&&y(0,Ni,3,4,"ng-container",2)(1,Ai,3,3,"ng-template",null,0,ne),n&2){let f,T=V(2);m("ngIf",((f=s.courses==null?null:s.courses.length)!==null&&f!==void 0?f:0)>0)("ngIfElse",T)}},dependencies:[O,re,vt,St,bt,_t,ii,It,ht,ti,H,k,F]});let i=t;return i})();export{Ne as a,In as b,bn as c,Sn as d,vn as e,xn as f,Cn as g,yn as h,At as i,qt as j,Qt as k,Ci as l,Dt as m,wt as n,je as o,_e as p,He as q,Ht as r,Lt as s,Ee as t,Wt as u,Ar as v}; diff --git a/public/apps/webapp-schulverwaltung/chunk-LO5XSJLW.js b/public/apps/webapp-schulverwaltung/chunk-RFO4NYUO.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-LO5XSJLW.js rename to public/apps/webapp-schulverwaltung/chunk-RFO4NYUO.js index cf47068d..46065148 100644 --- a/public/apps/webapp-schulverwaltung/chunk-LO5XSJLW.js +++ b/public/apps/webapp-schulverwaltung/chunk-RFO4NYUO.js @@ -1 +1 @@ -import{$ as d,Ac as a,Bc as R,Dc as b,Dd as G,Fc as w,Gc as y,Ia as j,Ic as L,Jd as N,Nc as p,O as C,Oc as O,Sa as g,Sc as B,Ta as f,Ua as D,W as M,Wc as E,Z as m,a as v,ab as F,b as A,bb as T,ec as k,jb as U,k as S,kb as $,m as P,n as x,tb as h,ua as u,ud as I,yd as z}from"./chunk-T7QWSMKM.js";var X=(()=>{let n=class n{constructor(){this.expanded=!1}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=d({type:n,selectors:[["bkd-caret"]],inputs:{expanded:"expanded"},standalone:!0,features:[h],decls:2,vars:1,consts:[["role","button",1,"d-flex","material-icons"]],template:function(e,r){e&1&&(g(0,"i",0),U(1),f()),e&2&&(u(),$(r.expanded?"expand_less":"expand_more"))},styles:["i[_ngcontent-%COMP%]:hover{color:#ea161f}"]});let o=n;return o})();var K=["*"],Z=(()=>{let n=class n{constructor(){this.opened=!1}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=d({type:n,selectors:[["bkd-student-dossier-entry-header"]],inputs:{opened:"opened"},standalone:!0,features:[h],ngContentSelectors:K,decls:3,vars:1,consts:[[1,"m-0"],[1,"d-flex","align-items-center",3,"expanded"]],template:function(e,r){e&1&&(F(),g(0,"h5",0),T(1),f(),D(2,"bkd-caret",1)),e&2&&(u(2),j("expanded",r.opened))},dependencies:[X],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-top:1px solid #dee2e6;cursor:pointer}button[_ngcontent-%COMP%]{color:#000;text-decoration:none}.btn-link[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0});let o=n;return o})();var V=y({Id:R,Title:a}),q=p(w(V));var ct=(()=>{let n=class n{constructor(t,e,r){this.settings=t,this.storageService=e,this.http=r}getPersonMasterDataReports(t){return this.getAvailableReports("Person",this.settings.personMasterDataReports,[t])}getStudentConfirmationReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.studentConfirmationReports,t)}getEvaluateAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.evaluateAbsencesReports,t)}getMyAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.myAbsencesReports,t)}getCourseReports(t){return this.getAvailableReports("Anlass",this.settings.testsByCourseReports,[t])}getStudentSubscriptionReports(t){return this.settings.testsBySubscriptionStudentReports.map((r,s)=>{let i=this.getReportUrl(r.type,"Anmeldung",r.id,t);return A(v({},r),{title:`Report ${s+1}`,url:i})})}getTeacherSubscriptionReports(t){return this.settings.testsBySubscriptionTeacherReports.map((r,s)=>{let i=this.getReportUrl(r.type,"Anmeldung",r.id,t);return A(v({},r),{title:`Report ${s+1}`,url:i})})}getAvailableReports(t,e,r){let s=z(e,l=>l.type),i=x(Object.keys(s).map(l=>this.getAvailableReportsForType(l,t,s[l].map(({id:c})=>c),r)));return this.mergeAvailableReports(i,e)}getAvailableReportsForType(t,e,r,s){return s.length===0?S([]):this.http.get(this.getReportAvailabilityUrl(t,e,r,s)).pipe(C(G(q)),P(i=>i?i.map(({Id:l,Title:c})=>({type:t,id:l,title:c,url:this.getReportUrl(t,e,l,s)})):[]))}mergeAvailableReports(t,e){return t.pipe(P(r=>{let s=I(r);return e.reduce((i,l)=>{let c=s.find(({id:J})=>J===l.id);return c?[...i,c]:i},[])}))}getReportUrl(t,e,r,s){let i=new URL(`${this.settings.apiUrl}/Files/${this.getReportTypePathPart(t)}/${e}/${r}`);return i.searchParams.set("ids",s.join(",")),i.searchParams.set("token",this.storageService.getAccessToken()??""),i.toString()}getReportAvailabilityUrl(t,e,r,s){let i=new URL(`${this.settings.apiUrl}/${this.getReportTypePathPart(t)}/AvailableReports/${e}`);return i.searchParams.set("ids",Array.isArray(r)?r.join(","):String(r)),i.searchParams.set("keys",s.join(",")),i.toString()}getReportTypePathPart(t){return`${t[0].toUpperCase()+t.slice(1)}Reports`}};n.\u0275fac=function(e){return new(e||n)(m(E),m(N),m(k))},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var gt=y({Id:R,AddressLine1:p(a),AddressLine2:O(a),Birthdate:p(B),DisplayEmail:p(a),FullName:a,Gender:L([b("M"),b("F"),b("X")]),Location:p(a),PhoneMobile:p(a),PhonePrivate:p(a),PostalCode:p(a)});export{X as a,Z as b,gt as c,ct as d}; +import{$ as d,Ac as R,Cc as b,Cd as G,Ec as w,Fc as y,Hc as L,Ia as j,Id as N,Mc as p,Nc as O,O as C,Rc as B,Sa as g,Ta as f,Ua as D,Vc as E,W as M,Z as m,a as v,ab as F,b as A,bb as T,dc as k,jb as U,k as S,kb as $,m as P,n as x,tb as h,td as I,ua as u,xd as z,zc as a}from"./chunk-XTHSYQMN.js";var X=(()=>{let n=class n{constructor(){this.expanded=!1}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=d({type:n,selectors:[["bkd-caret"]],inputs:{expanded:"expanded"},standalone:!0,features:[h],decls:2,vars:1,consts:[["role","button",1,"d-flex","material-icons"]],template:function(e,r){e&1&&(g(0,"i",0),U(1),f()),e&2&&(u(),$(r.expanded?"expand_less":"expand_more"))},styles:["i[_ngcontent-%COMP%]:hover{color:#ea161f}"]});let o=n;return o})();var K=["*"],Z=(()=>{let n=class n{constructor(){this.opened=!1}};n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=d({type:n,selectors:[["bkd-student-dossier-entry-header"]],inputs:{opened:"opened"},standalone:!0,features:[h],ngContentSelectors:K,decls:3,vars:1,consts:[[1,"m-0"],[1,"d-flex","align-items-center",3,"expanded"]],template:function(e,r){e&1&&(F(),g(0,"h5",0),T(1),f(),D(2,"bkd-caret",1)),e&2&&(u(2),j("expanded",r.opened))},dependencies:[X],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;border-top:1px solid #dee2e6;cursor:pointer}button[_ngcontent-%COMP%]{color:#000;text-decoration:none}.btn-link[_ngcontent-%COMP%]:hover{text-decoration:none}"],changeDetection:0});let o=n;return o})();var V=y({Id:R,Title:a}),q=p(w(V));var ct=(()=>{let n=class n{constructor(t,e,r){this.settings=t,this.storageService=e,this.http=r}getPersonMasterDataReports(t){return this.getAvailableReports("Person",this.settings.personMasterDataReports,[t])}getStudentConfirmationReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.studentConfirmationReports,t)}getEvaluateAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.evaluateAbsencesReports,t)}getMyAbsencesReports(t){return this.getAvailableReports("Praesenzinformation",this.settings.myAbsencesReports,t)}getCourseReports(t){return this.getAvailableReports("Anlass",this.settings.testsByCourseReports,[t])}getStudentSubscriptionReports(t){return this.settings.testsBySubscriptionStudentReports.map((r,s)=>{let i=this.getReportUrl(r.type,"Anmeldung",r.id,t);return A(v({},r),{title:`Report ${s+1}`,url:i})})}getTeacherSubscriptionReports(t){return this.settings.testsBySubscriptionTeacherReports.map((r,s)=>{let i=this.getReportUrl(r.type,"Anmeldung",r.id,t);return A(v({},r),{title:`Report ${s+1}`,url:i})})}getAvailableReports(t,e,r){let s=z(e,l=>l.type),i=x(Object.keys(s).map(l=>this.getAvailableReportsForType(l,t,s[l].map(({id:c})=>c),r)));return this.mergeAvailableReports(i,e)}getAvailableReportsForType(t,e,r,s){return s.length===0?S([]):this.http.get(this.getReportAvailabilityUrl(t,e,r,s)).pipe(C(G(q)),P(i=>i?i.map(({Id:l,Title:c})=>({type:t,id:l,title:c,url:this.getReportUrl(t,e,l,s)})):[]))}mergeAvailableReports(t,e){return t.pipe(P(r=>{let s=I(r);return e.reduce((i,l)=>{let c=s.find(({id:J})=>J===l.id);return c?[...i,c]:i},[])}))}getReportUrl(t,e,r,s){let i=new URL(`${this.settings.apiUrl}/Files/${this.getReportTypePathPart(t)}/${e}/${r}`);return i.searchParams.set("ids",s.join(",")),i.searchParams.set("token",this.storageService.getAccessToken()??""),i.toString()}getReportAvailabilityUrl(t,e,r,s){let i=new URL(`${this.settings.apiUrl}/${this.getReportTypePathPart(t)}/AvailableReports/${e}`);return i.searchParams.set("ids",Array.isArray(r)?r.join(","):String(r)),i.searchParams.set("keys",s.join(",")),i.toString()}getReportTypePathPart(t){return`${t[0].toUpperCase()+t.slice(1)}Reports`}};n.\u0275fac=function(e){return new(e||n)(m(E),m(N),m(k))},n.\u0275prov=M({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var gt=y({Id:R,AddressLine1:p(a),AddressLine2:O(a),Birthdate:p(B),DisplayEmail:p(a),FullName:a,Gender:L([b("M"),b("F"),b("X")]),Location:p(a),PhoneMobile:p(a),PhonePrivate:p(a),PostalCode:p(a)});export{X as a,Z as b,gt as c,ct as d}; diff --git a/public/apps/webapp-schulverwaltung/chunk-QUM6674D.js b/public/apps/webapp-schulverwaltung/chunk-S2U6O7J2.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-QUM6674D.js rename to public/apps/webapp-schulverwaltung/chunk-S2U6O7J2.js index ca3e3caa..79048fb4 100644 --- a/public/apps/webapp-schulverwaltung/chunk-QUM6674D.js +++ b/public/apps/webapp-schulverwaltung/chunk-S2U6O7J2.js @@ -1,2 +1,2 @@ -import{b as Te}from"./chunk-67IXHFR4.js";import{b as xe}from"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{a as Se,c as Me}from"./chunk-33NXTXD7.js";import{a as be}from"./chunk-3AROKYRB.js";import{$ as g,$a as _,Ad as ye,Bb as u,Cb as f,Cd as ve,G as z,Ga as h,Gd as Ce,Ha as T,Hd as E,I as B,Ia as l,Ib as oe,Id as P,Ja as U,Jd as _e,L,M as H,O as I,Q as N,Sa as p,Sb as O,T as A,Ta as a,Tb as w,Ua as b,V as Y,W as J,Wb as se,Wc as ae,Xc as le,Yc as pe,Z as V,_a as X,a as D,ad as $,b as R,bd as ce,e as K,ed as de,f as W,fd as me,jb as y,jd as ue,k as j,kb as S,kd as fe,lb as k,m as M,pb as Z,qb as ee,qc as re,ra as Q,rb as te,rd as ge,sb as ie,sd as G,tb as v,td as he,ua as r,v as q,va as C,wb as ne}from"./chunk-T7QWSMKM.js";var ke=(()=>{let t=class t{constructor(){this.id=null,this.label=null,this.disabled=!1,this.value=!1,this.valueChange=new Q,this.fallbackId=ve("bkd-switch")}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=g({type:t,selectors:[["bkd-switch"]],inputs:{id:"id",label:"label",disabled:"disabled",value:"value"},outputs:{valueChange:"valueChange"},standalone:!0,features:[v],decls:3,vars:5,consts:[["type","checkbox",3,"ngModelChange","disabled","ngModel"]],template:function(n,o){if(n&1&&(p(0,"input",0),X("ngModelChange",function(m){return o.valueChange.emit(m)}),a(),p(1,"label"),y(2),a()),n&2){let c,m;l("disabled",o.disabled)("ngModel",o.value),T("id",(c=o.id)!==null&&c!==void 0?c:o.fallbackId),r(),T("for",(m=o.id)!==null&&m!==void 0?m:o.fallbackId),r(),S(o.label)}},dependencies:[G,pe,$,de],styles:['input[_ngcontent-%COMP%]{opacity:0;position:absolute}label[_ngcontent-%COMP%]{cursor:pointer;text-indent:-9999px;width:36px;height:18px;border:1px solid rgb(0,0,0);background:#fff;display:block;border-radius:18px;position:relative}label[_ngcontent-%COMP%]:after{content:"";position:absolute;top:1px;left:1px;width:14px;height:14px;background:#000;border-radius:14px;transition:.3s}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border-color:#000;background:#000}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:calc(100% - 1px);transform:translate(-100%);background:#fff}input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{box-shadow:0 0 0 .25rem #4e4e4e40}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{cursor:default;background:#fff;border-color:#dedede}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]:after{background:#dedede}label[_ngcontent-%COMP%]:active:after{width:18.2px}'],changeDetection:0});let i=t;return i})();function Ee(i,t){if(i&1&&(p(0,"div"),y(1),a()),i&2){let s=t.$implicit;r(),k(" ",s," ")}}function Pe(i,t){if(i&1&&(p(0,"div",4),h(1,Ee,2,1,"div",5),a()),i&2){let s=_();r(),l("ngForOf",s.descriptionLines)}}var Fe=(()=>{let t=class t{constructor(e){this.cd=e,this.id="",this.label="",this.description=null,this.disabled=!1,this.onChange=n=>{},this.onTouched=()=>{},this._value=!1}get value(){return this._value}set value(e){this._value=e,this.onChange(e)}get descriptionLines(){return this.description?this.description.split(` +import{b as Te}from"./chunk-KDAC4GJ5.js";import{b as xe}from"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{a as Se,c as Me}from"./chunk-SOHFFTKU.js";import{a as be}from"./chunk-UX5TA32W.js";import{$ as g,$a as _,$c as $,Ab as u,Bb as f,Bd as ve,Fd as Ce,G as z,Ga as h,Gd as E,Ha as T,Hb as oe,Hd as P,I as B,Ia as l,Id as _e,Ja as U,L,M as H,O as I,Q as N,Rb as O,Sa as p,Sb as w,T as A,Ta as a,Ua as b,V as Y,Vb as se,Vc as ae,W as J,Wc as le,Xc as pe,Z as V,_a as X,a as D,ad as ce,b as R,dd as de,e as K,ed as me,f as W,id as ue,jb as y,jd as fe,k as j,kb as S,lb as k,m as M,pb as Z,pc as re,qb as ee,qd as ge,ra as Q,rb as te,rd as G,sb as ie,sd as he,tb as v,ua as r,v as q,va as C,wb as ne,zd as ye}from"./chunk-XTHSYQMN.js";var ke=(()=>{let t=class t{constructor(){this.id=null,this.label=null,this.disabled=!1,this.value=!1,this.valueChange=new Q,this.fallbackId=ve("bkd-switch")}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=g({type:t,selectors:[["bkd-switch"]],inputs:{id:"id",label:"label",disabled:"disabled",value:"value"},outputs:{valueChange:"valueChange"},standalone:!0,features:[v],decls:3,vars:5,consts:[["type","checkbox",3,"ngModelChange","disabled","ngModel"]],template:function(n,o){if(n&1&&(p(0,"input",0),X("ngModelChange",function(m){return o.valueChange.emit(m)}),a(),p(1,"label"),y(2),a()),n&2){let c,m;l("disabled",o.disabled)("ngModel",o.value),T("id",(c=o.id)!==null&&c!==void 0?c:o.fallbackId),r(),T("for",(m=o.id)!==null&&m!==void 0?m:o.fallbackId),r(),S(o.label)}},dependencies:[G,pe,$,de],styles:['input[_ngcontent-%COMP%]{opacity:0;position:absolute}label[_ngcontent-%COMP%]{cursor:pointer;text-indent:-9999px;width:36px;height:18px;border:1px solid rgb(0,0,0);background:#fff;display:block;border-radius:18px;position:relative}label[_ngcontent-%COMP%]:after{content:"";position:absolute;top:1px;left:1px;width:14px;height:14px;background:#000;border-radius:14px;transition:.3s}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{border-color:#000;background:#000}input[_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]:after{left:calc(100% - 1px);transform:translate(-100%);background:#fff}input[_ngcontent-%COMP%]:focus + label[_ngcontent-%COMP%]{box-shadow:0 0 0 .25rem #4e4e4e40}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]{cursor:default;background:#fff;border-color:#dedede}input[_ngcontent-%COMP%]:disabled + label[_ngcontent-%COMP%]:after{background:#dedede}label[_ngcontent-%COMP%]:active:after{width:18.2px}'],changeDetection:0});let i=t;return i})();function Ee(i,t){if(i&1&&(p(0,"div"),y(1),a()),i&2){let s=t.$implicit;r(),k(" ",s," ")}}function Pe(i,t){if(i&1&&(p(0,"div",4),h(1,Ee,2,1,"div",5),a()),i&2){let s=_();r(),l("ngForOf",s.descriptionLines)}}var Fe=(()=>{let t=class t{constructor(e){this.cd=e,this.id="",this.label="",this.description=null,this.disabled=!1,this.onChange=n=>{},this.onTouched=()=>{},this._value=!1}get value(){return this._value}set value(e){this._value=e,this.onChange(e)}get descriptionLines(){return this.description?this.description.split(` `):[]}writeValue(e){this._value=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}};t.\u0275fac=function(n){return new(n||t)(C(oe))},t.\u0275cmp=g({type:t,selectors:[["bkd-my-settings-notifications-toggle"]],inputs:{id:"id",label:"label",description:"description",disabled:"disabled"},standalone:!0,features:[ie([{provide:le,useExisting:Y(()=>t),multi:!0}]),v],decls:5,vars:6,consts:[[1,"d-flex","align-items-center"],[1,"flex-fill"],[3,"valueChange","id","value","disabled"],["class","form-text",4,"ngIf"],[1,"form-text"],[4,"ngFor","ngForOf"]],template:function(n,o){n&1&&(p(0,"div",0)(1,"label",1),y(2),a(),p(3,"bkd-switch",2),te("valueChange",function(m){return ee(o.value,m)||(o.value=m),m}),a()(),h(4,Pe,2,1,"div",3)),n&2&&(r(),T("for",o.id),r(),k(" ",o.label," "),r(),l("id",o.id),Z("value",o.value),l("disabled",o.disabled),r(),l("ngIf",o.description))},dependencies:[ke,w,O],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let i=t;return i})();var Ie=(()=>{let t=class t{constructor(e,n){this.settings=e,this.storage=n,this.currentRoles=null}getNotificationTypes(){return this.getNotificationTypeKeys().map(e=>{if(!(e in this.settings.notificationTypes))throw new Error(`Key '${e}' is missing in 'notificationTypes' setting`);return{key:e,text:this.settings.notificationTypes[e]}})}getNotificationTypeKeys(){return ye(this.settings.notificationTypesAssignments.reduce((e,{roles:n,types:o})=>this.hasAnyRole(n)?[...e,...o]:e,[]))}hasAnyRole(e){return this.currentRoles===null&&(this.currentRoles=xe(this.storage.getPayload()?.roles)),this.currentRoles.some(n=>e.includes(n))}};t.\u0275fac=function(n){return new(n||t)(V(ae),V(_e))},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var je=(i,t)=>({channelsFormGroup:i,typesFormGroup:t});function Be(i,t){i&1&&(p(0,"div",6),b(1,"bkd-spinner",7),a())}function Le(i,t){if(i&1&&(b(0,"bkd-my-settings-notifications-toggle",10),u(1,"async"),u(2,"async")),i&2){let s=t.$implicit,e=t.index;U("mt-4",e>0),l("id","notification-channels-"+s.key)("label",f(1,6,s.label))("description",f(2,8,s.description))("formControlName",s.key)}}function Ae(i,t){if(i&1&&(p(0,"form",8),h(1,Le,3,10,"bkd-my-settings-notifications-toggle",9),a()),i&2){let s=_().bkdLet,e=_();l("formGroup",s.channelsFormGroup),r(),l("ngForOf",e.channelsSettings)}}function Ve(i,t){if(i&1&&(b(0,"bkd-my-settings-notifications-toggle",10),u(1,"async"),u(2,"async")),i&2){let s=t.$implicit,e=t.index;U("mt-4",e>0),l("id","notification-types-"+s.key)("label",f(1,6,s.label))("description",f(2,8,s.description))("formControlName",s.key)}}function Ue(i,t){if(i&1&&(p(0,"form",8),h(1,Ve,3,10,"bkd-my-settings-notifications-toggle",9),a()),i&2){let s=_().bkdLet,e=_();l("formGroup",s.typesFormGroup),r(),l("ngForOf",e.typesSettings)}}function Ke(i,t){if(i&1&&(p(0,"div",1)(1,"h2",2)(2,"span"),y(3),u(4,"translate"),a(),h(5,Be,2,0,"div",3),u(6,"async"),a(),h(7,Ae,2,2,"form",4),p(8,"p",5),y(9),u(10,"translate"),a(),b(11,"hr"),h(12,Ue,2,2,"form",4),a()),i&2){let s=t.bkdLet,e=_();r(3),S(f(4,5,"my-settings.notifications.title")),r(2),l("ngIf",f(6,7,e.saving$)),r(2),l("ngIf",s.channelsFormGroup),r(2),k(" ",f(10,9,"my-settings.notifications.privacy-hint")," "),r(3),l("ngIf",s.typesFormGroup)}}var Ne=(()=>{let t=class t{constructor(e,n,o,c,m){this.userSettings=e,this.formBuilder=n,this.toastService=o,this.translate=c,this.notificationTypes=m,this.channelsSettings=[{key:"gui",label:this.translate.get("my-settings.notifications.gui")},{key:"mail",label:this.translate.get("my-settings.notifications.mail")},{key:"phoneMobile",label:this.translate.get("my-settings.notifications.phoneMobile")}],this.typesSettings=this.notificationTypes.getNotificationTypes().map(d=>{let{label:x,description:$e}=this.translate.currentLang==="fr-CH"?d.text.fr:d.text.de;return{key:d.key,label:j(x),description:j($e)}}),this.channelsValue$=this.userSettings.getNotificationChannels(),this.typesValue$=this.userSettings.getNotificationTypesInactive().pipe(M(this.typesArrayToRecord.bind(this))),this.channelsFormGroup$=this.channelsValue$.pipe(M(d=>this.createFormGroup(this.channelsSettings,d)),L(1)),this.allChannelsInactive$=q(this.channelsValue$,this.channelsFormGroup$.pipe(I(d=>d.valueChanges))).pipe(M(d=>Object.values(d).every(x=>!x)),z()),this.typesFormGroup$=this.typesValue$.pipe(A(this.allChannelsInactive$),M(([d,x])=>this.createFormGroup(this.typesSettings,d,!0,x)),L(1)),this.saving$=new W(!1),this.destroy$=new K}ngOnInit(){this.userSettings.refetch(),this.allChannelsInactive$.pipe(H(1),A(this.typesFormGroup$),N(this.destroy$)).subscribe(([e,n])=>{Object.values(n.controls).forEach(o=>e?o.disable():o.enable())}),this.channelsFormGroup$.pipe(N(this.destroy$),I(e=>e.valueChanges)).subscribe(this.saveChannels.bind(this)),this.typesFormGroup$.pipe(N(this.destroy$),I(e=>e.valueChanges)).subscribe(this.saveTypes.bind(this))}ngOnDestroy(){this.destroy$.next()}createFormGroup(e,n,o=!1,c=!1){return this.formBuilder.group(e.reduce((m,{key:d})=>R(D({},m),{[d]:[{value:n[d]??o,disabled:c}]}),{}))}saveChannels(e){this.saving$.next(!0),this.userSettings.saveNotificationChannels(e).pipe(B(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}saveTypes(e){this.saving$.next(!0),this.userSettings.saveNotificationTypesInactive(this.typesRecordToArray(e)).pipe(B(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("my-settings.notifications.save-success"))}typesArrayToRecord(e){return this.typesSettings.reduce((o,{key:c})=>R(D({},o),{[c]:!e.includes(c)}),{})}typesRecordToArray(e){return Object.keys(e).reduce((o,c)=>e[c]?o:[...o,c],[])}};t.\u0275fac=function(n){return new(n||t)(C(Te),C(ge),C(be),C(Ce),C(Ie))},t.\u0275cmp=g({type:t,selectors:[["bkd-my-settings-notifications"]],standalone:!0,features:[v],decls:3,vars:8,consts:[["class","pb-4",4,"bkdLet"],[1,"pb-4"],[1,"m-0","pb-3","d-flex","align-items-stretch"],["class","position-relative",4,"ngIf"],[3,"formGroup",4,"ngIf"],[1,"mt-4","form-text"],[1,"position-relative"],[1,"position-absolute","inline","small","d-inline-block","ms-2"],[3,"formGroup"],[3,"id","label","description","formControlName","mt-4",4,"ngFor","ngForOf"],[3,"id","label","description","formControlName"]],template:function(n,o){n&1&&(h(0,Ke,13,11,"div",0),u(1,"async"),u(2,"async")),n&2&&l("bkdLet",ne(5,je,f(1,1,o.channelsFormGroup$),f(2,3,o.typesFormGroup$)))},dependencies:[Se,w,Me,G,me,$,ce,he,ue,fe,O,Fe,se,P,E],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important}"],changeDetection:0});let i=t;return i})();var Oe=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=g({type:t,selectors:[["bkd-my-settings-show"]],standalone:!0,features:[v],decls:5,vars:3,consts:[[1,"bkd-container","bkd-container-limited"]],template:function(n,o){n&1&&(p(0,"div",0)(1,"h1"),y(2),u(3,"translate"),a(),b(4,"bkd-my-settings-notifications"),a()),n&2&&(r(2),S(f(3,1,"my-settings.title")))},dependencies:[Ne,P,E]});let i=t;return i})();var we=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=g({type:t,selectors:[["bkd-my-settings"]],standalone:!0,features:[v],decls:1,vars:0,template:function(n,o){n&1&&b(0,"router-outlet")},dependencies:[re],changeDetection:0});let i=t;return i})();var Ot=[{path:"",component:we,children:[{path:"",component:Oe}]}];export{Ot as MY_SETTINGS_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-V34B6ZOV.js b/public/apps/webapp-schulverwaltung/chunk-SOH5T2AJ.js similarity index 95% rename from public/apps/webapp-schulverwaltung/chunk-V34B6ZOV.js rename to public/apps/webapp-schulverwaltung/chunk-SOH5T2AJ.js index 2207a66f..f095d647 100644 --- a/public/apps/webapp-schulverwaltung/chunk-V34B6ZOV.js +++ b/public/apps/webapp-schulverwaltung/chunk-SOH5T2AJ.js @@ -1 +1 @@ -import{t as A}from"./chunk-GI4AZI25.js";import{b as B}from"./chunk-33NXTXD7.js";import{a as V}from"./chunk-3AROKYRB.js";import{Ac as D,Ba as k,Bc as R,Ed as b,Gc as S,Gd as x,O as m,R as w,S as P,Uc as Y,W as M,Wc as $,Z as d,a as p,b as h,ba as j,ec as z,ga as U,j as O,k as g,m as u,o as K,qa as F,ra as T,s as I,va as y,w as N}from"./chunk-T7QWSMKM.js";function _(t,e,i,o){let n=window&&!!window.document&&window.document.documentElement,r=n&&e?window:i;if(t&&(r=t&&n&&typeof t=="string"?tt(t,i.nativeElement,o):t,!r))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return r}function tt(t,e,i){return(i?window.document:e).querySelector(t)}function C(t){return t&&!t.firstChange}function et(){return typeof window<"u"}var ot={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},it={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},E=class{constructor(e=!0){this.vertical=e,this.propsMap=e?ot:it}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};function nt(t,e,i){return!!(t&&e||!i&&e)}function rt({windowElement:t,axis:e}){return lt({axis:e,isWindow:st(t)},t)}function lt(t,e){let i=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return h(p({},t),{container:i})}function st(t){return["Window","global"].some(i=>Object.prototype.toString.call(t).includes(i))}function W(t,e){return t?e.document.documentElement:null}function G(t,e){let i=ft(e);return e.isWindow?ct(i,t,e):at(i,t,e)}function ct(t,e,i){let{axis:o,container:n,isWindow:r}=i,{offsetHeightKey:l,clientHeightKey:c}=X(o),a=t+q(W(r,n),o,r),s=L(e.nativeElement,r,l,c),f=ut(e.nativeElement,o,r)+s;return{height:t,scrolled:a,totalToScroll:f,isWindow:r}}function at(t,e,i){let{axis:o,container:n}=i,r=n[o.scrollTopKey()],l=n[o.scrollHeightKey()];return{height:t,scrolled:r,totalToScroll:l,isWindow:!1}}function X(t){return{offsetHeightKey:t.offsetHeightKey(),clientHeightKey:t.clientHeightKey()}}function ft({container:t,isWindow:e,axis:i}){let{offsetHeightKey:o,clientHeightKey:n}=X(i);return L(t,e,o,n)}function L(t,e,i,o){if(isNaN(t[i])){let n=W(e,t);return n?n[o]:0}else return t[i]}function ut(t,e,i){let o=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[o]+q(t,e,i)}function q(t,e,i){let o=e.pageYOffsetKey(),n=e.scrollTopKey(),r=e.offsetTopKey();return isNaN(window.pageYOffset)?W(i,t)[n]:t.ownerDocument?t.ownerDocument.defaultView[o]:t[r]}function dt(t,e={down:0,up:0},i){let o,n;if(t.totalToScroll<=0)return!1;let r=t.isWindow?t.scrolled:t.height+t.scrolled;if(i)o=(t.totalToScroll-r)/t.totalToScroll,n=(e?.down?e.down:0)/10;else{let c=t.scrolled+(t.totalToScroll-r);o=t.scrolled/c,n=(e?.up?e.up:0)/10}return o<=n}function pt(t,e){return tg(G(o,r))),u(s=>St(l.lastScrollPosition,s,a)),w(({stats:s})=>l.updateScroll(s.scrolled,s.totalToScroll)),N(({fire:s,scrollDown:f,stats:{totalToScroll:J}})=>nt(t.alwaysCallback,s,l.isTriggeredScroll(J,f))),w(({scrollDown:s,stats:{totalToScroll:f}})=>{l.updateTriggeredFlag(f,s)}),u(wt))}function mt(t){let e=I(t.container,"scroll");return t.throttle&&(e=e.pipe(P(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function St(t,e,i){let{scrollDown:o,fire:n}=ht(t,e,i);return{scrollDown:o,fire:n,stats:e}}var v={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function wt(t){let{scrollDown:e,stats:{scrolled:i}}=t;return{type:e?v.DOWN:v.UP,payload:{currentScrollPosition:i}}}var Nt=(()=>{let e=class e{constructor(o,n){this.element=o,this.zone=n,this.scrolled=new T,this.scrolledUp=new T,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:o,infiniteScrollDisabled:n,infiniteScrollDistance:r}){let l=C(o),c=C(n),a=C(r),s=!c&&!this.infiniteScrollDisabled||c&&!n.currentValue||a;(l||c||a)&&(this.destroyScroller(),s&&this.setup())}ngOnDestroy(){this.destroyScroller()}setup(){et()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=gt({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(o=>this.handleOnScroll(o))})}handleOnScroll({type:o,payload:n}){let r=o===v.DOWN?this.scrolled:this.scrolledUp;Tt(r)&&this.zone.run(()=>r.emit(n))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}};e.\u0275fac=function(n){return new(n||e)(y(F),y(k))},e.\u0275dir=j({type:e,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},standalone:!0,features:[U]});let t=e;return t})();function Tt(t){return t.observed??t.observers.length>0}function Ut(t){return Object.keys(t).reduce((e,i)=>{let o=yt(t[i]);return o?h(p({},e),{[i]:o}):e},{})}function yt(t){return t?t instanceof Date?A(t,"yyyy-MM-dd"):String(t):null}var Z=S({Id:R,Designation:D,Number:D});var qt=(()=>{let e=class e extends B{constructor(o,n,r,l){super(o,n,Z,"EducationalEvents"),this.translate=r,this.toastService=l,this.typeaheadCodec=S(Y(this.codec.props,["Id","Designation","Number"]))}getTypeaheadItems(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Designation":`~*${o}*`}}).pipe(m(b(this.typeaheadCodec)),u(n=>n.map(r=>({Key:r.Id,Value:`${r.Designation} (${r.Number})`}))))}getTypeaheadItemByKey(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Id":`=${o}`}}).pipe(m(b(this.typeaheadCodec)),m(n=>n.length===0?(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),O):g({Key:n[0].Id,Value:`${n[0].Designation} (${n[0].Number})`})))}};e.\u0275fac=function(n){return new(n||e)(d(z),d($),d(x),d(V))},e.\u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{Ut as a,Nt as b,qt as c}; +import{t as A}from"./chunk-ZK2MNT7Z.js";import{b as B}from"./chunk-SOHFFTKU.js";import{a as V}from"./chunk-UX5TA32W.js";import{Ac as R,Ba as k,Dd as b,Fc as S,Fd as x,O as m,R as w,S as P,Tc as Y,Vc as $,W as M,Z as d,a as p,b as h,ba as j,dc as z,ga as U,j as O,k as g,m as u,o as K,qa as F,ra as T,s as I,va as y,w as N,zc as D}from"./chunk-XTHSYQMN.js";function _(t,e,i,o){let n=window&&!!window.document&&window.document.documentElement,r=n&&e?window:i;if(t&&(r=t&&n&&typeof t=="string"?tt(t,i.nativeElement,o):t,!r))throw new Error("ngx-infinite-scroll {resolveContainerElement()}: selector for");return r}function tt(t,e,i){return(i?window.document:e).querySelector(t)}function C(t){return t&&!t.firstChange}function et(){return typeof window<"u"}var ot={clientHeight:"clientHeight",offsetHeight:"offsetHeight",scrollHeight:"scrollHeight",pageYOffset:"pageYOffset",offsetTop:"offsetTop",scrollTop:"scrollTop",top:"top"},it={clientHeight:"clientWidth",offsetHeight:"offsetWidth",scrollHeight:"scrollWidth",pageYOffset:"pageXOffset",offsetTop:"offsetLeft",scrollTop:"scrollLeft",top:"left"},E=class{constructor(e=!0){this.vertical=e,this.propsMap=e?ot:it}clientHeightKey(){return this.propsMap.clientHeight}offsetHeightKey(){return this.propsMap.offsetHeight}scrollHeightKey(){return this.propsMap.scrollHeight}pageYOffsetKey(){return this.propsMap.pageYOffset}offsetTopKey(){return this.propsMap.offsetTop}scrollTopKey(){return this.propsMap.scrollTop}topKey(){return this.propsMap.top}};function nt(t,e,i){return!!(t&&e||!i&&e)}function rt({windowElement:t,axis:e}){return lt({axis:e,isWindow:st(t)},t)}function lt(t,e){let i=t.isWindow||e&&!e.nativeElement?e:e.nativeElement;return h(p({},t),{container:i})}function st(t){return["Window","global"].some(i=>Object.prototype.toString.call(t).includes(i))}function W(t,e){return t?e.document.documentElement:null}function G(t,e){let i=ft(e);return e.isWindow?ct(i,t,e):at(i,t,e)}function ct(t,e,i){let{axis:o,container:n,isWindow:r}=i,{offsetHeightKey:l,clientHeightKey:c}=X(o),a=t+q(W(r,n),o,r),s=L(e.nativeElement,r,l,c),f=ut(e.nativeElement,o,r)+s;return{height:t,scrolled:a,totalToScroll:f,isWindow:r}}function at(t,e,i){let{axis:o,container:n}=i,r=n[o.scrollTopKey()],l=n[o.scrollHeightKey()];return{height:t,scrolled:r,totalToScroll:l,isWindow:!1}}function X(t){return{offsetHeightKey:t.offsetHeightKey(),clientHeightKey:t.clientHeightKey()}}function ft({container:t,isWindow:e,axis:i}){let{offsetHeightKey:o,clientHeightKey:n}=X(i);return L(t,e,o,n)}function L(t,e,i,o){if(isNaN(t[i])){let n=W(e,t);return n?n[o]:0}else return t[i]}function ut(t,e,i){let o=e.topKey();if(t.getBoundingClientRect)return t.getBoundingClientRect()[o]+q(t,e,i)}function q(t,e,i){let o=e.pageYOffsetKey(),n=e.scrollTopKey(),r=e.offsetTopKey();return isNaN(window.pageYOffset)?W(i,t)[n]:t.ownerDocument?t.ownerDocument.defaultView[o]:t[r]}function dt(t,e={down:0,up:0},i){let o,n;if(t.totalToScroll<=0)return!1;let r=t.isWindow?t.scrolled:t.height+t.scrolled;if(i)o=(t.totalToScroll-r)/t.totalToScroll,n=(e?.down?e.down:0)/10;else{let c=t.scrolled+(t.totalToScroll-r);o=t.scrolled/c,n=(e?.up?e.up:0)/10}return o<=n}function pt(t,e){return tg(G(o,r))),u(s=>St(l.lastScrollPosition,s,a)),w(({stats:s})=>l.updateScroll(s.scrolled,s.totalToScroll)),N(({fire:s,scrollDown:f,stats:{totalToScroll:J}})=>nt(t.alwaysCallback,s,l.isTriggeredScroll(J,f))),w(({scrollDown:s,stats:{totalToScroll:f}})=>{l.updateTriggeredFlag(f,s)}),u(wt))}function mt(t){let e=I(t.container,"scroll");return t.throttle&&(e=e.pipe(P(t.throttle,void 0,{leading:!0,trailing:!0}))),e}function St(t,e,i){let{scrollDown:o,fire:n}=ht(t,e,i);return{scrollDown:o,fire:n,stats:e}}var v={DOWN:"[NGX_ISE] DOWN",UP:"[NGX_ISE] UP"};function wt(t){let{scrollDown:e,stats:{scrolled:i}}=t;return{type:e?v.DOWN:v.UP,payload:{currentScrollPosition:i}}}var Nt=(()=>{let e=class e{constructor(o,n){this.element=o,this.zone=n,this.scrolled=new T,this.scrolledUp=new T,this.infiniteScrollDistance=2,this.infiniteScrollUpDistance=1.5,this.infiniteScrollThrottle=150,this.infiniteScrollDisabled=!1,this.infiniteScrollContainer=null,this.scrollWindow=!0,this.immediateCheck=!1,this.horizontal=!1,this.alwaysCallback=!1,this.fromRoot=!1}ngAfterViewInit(){this.infiniteScrollDisabled||this.setup()}ngOnChanges({infiniteScrollContainer:o,infiniteScrollDisabled:n,infiniteScrollDistance:r}){let l=C(o),c=C(n),a=C(r),s=!c&&!this.infiniteScrollDisabled||c&&!n.currentValue||a;(l||c||a)&&(this.destroyScroller(),s&&this.setup())}ngOnDestroy(){this.destroyScroller()}setup(){et()&&this.zone.runOutsideAngular(()=>{this.disposeScroller=gt({fromRoot:this.fromRoot,alwaysCallback:this.alwaysCallback,disable:this.infiniteScrollDisabled,downDistance:this.infiniteScrollDistance,element:this.element,horizontal:this.horizontal,scrollContainer:this.infiniteScrollContainer,scrollWindow:this.scrollWindow,throttle:this.infiniteScrollThrottle,upDistance:this.infiniteScrollUpDistance}).subscribe(o=>this.handleOnScroll(o))})}handleOnScroll({type:o,payload:n}){let r=o===v.DOWN?this.scrolled:this.scrolledUp;Tt(r)&&this.zone.run(()=>r.emit(n))}destroyScroller(){this.disposeScroller&&this.disposeScroller.unsubscribe()}};e.\u0275fac=function(n){return new(n||e)(y(F),y(k))},e.\u0275dir=j({type:e,selectors:[["","infiniteScroll",""],["","infinite-scroll",""],["","data-infinite-scroll",""]],inputs:{infiniteScrollDistance:"infiniteScrollDistance",infiniteScrollUpDistance:"infiniteScrollUpDistance",infiniteScrollThrottle:"infiniteScrollThrottle",infiniteScrollDisabled:"infiniteScrollDisabled",infiniteScrollContainer:"infiniteScrollContainer",scrollWindow:"scrollWindow",immediateCheck:"immediateCheck",horizontal:"horizontal",alwaysCallback:"alwaysCallback",fromRoot:"fromRoot"},outputs:{scrolled:"scrolled",scrolledUp:"scrolledUp"},standalone:!0,features:[U]});let t=e;return t})();function Tt(t){return t.observed??t.observers.length>0}function Ut(t){return Object.keys(t).reduce((e,i)=>{let o=yt(t[i]);return o?h(p({},e),{[i]:o}):e},{})}function yt(t){return t?t instanceof Date?A(t,"yyyy-MM-dd"):String(t):null}var Z=S({Id:R,Designation:D,Number:D});var qt=(()=>{let e=class e extends B{constructor(o,n,r,l){super(o,n,Z,"EducationalEvents"),this.translate=r,this.toastService=l,this.typeaheadCodec=S(Y(this.codec.props,["Id","Designation","Number"]))}getTypeaheadItems(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Designation":`~*${o}*`}}).pipe(m(b(this.typeaheadCodec)),u(n=>n.map(r=>({Key:r.Id,Value:`${r.Designation} (${r.Number})`}))))}getTypeaheadItemByKey(o){return this.http.get(`${this.baseUrl}/CurrentSemester`,{params:{fields:["Id","Designation","Number"].join(","),"filter.Id":`=${o}`}}).pipe(m(b(this.typeaheadCodec)),m(n=>n.length===0?(this.toastService.error(this.translate.instant("global.rest-errors.notfound-message"),this.translate.instant("global.rest-errors.notfound-title")),O):g({Key:n[0].Id,Value:`${n[0].Designation} (${n[0].Number})`})))}};e.\u0275fac=function(n){return new(n||e)(d(z),d($),d(x),d(V))},e.\u0275prov=M({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{Ut as a,Nt as b,qt as c}; diff --git a/public/apps/webapp-schulverwaltung/chunk-33NXTXD7.js b/public/apps/webapp-schulverwaltung/chunk-SOHFFTKU.js similarity index 91% rename from public/apps/webapp-schulverwaltung/chunk-33NXTXD7.js rename to public/apps/webapp-schulverwaltung/chunk-SOHFFTKU.js index 2a324379..6a6ef3cf 100644 --- a/public/apps/webapp-schulverwaltung/chunk-33NXTXD7.js +++ b/public/apps/webapp-schulverwaltung/chunk-SOHFFTKU.js @@ -1 +1 @@ -import{$ as w,A as g,Ca as y,D as x,Dd as L,Ed as I,N as p,O as o,Sa as O,T as b,Ta as C,ba as v,dc as E,jb as P,k as d,l as h,m as s,p as u,s as m,tb as k,u as f,v as c,va as a,xa as M}from"./chunk-T7QWSMKM.js";var l=class{constructor(){this.$implicit=null,this.bkdLet=null}},U=(()=>{let t=class t{set bkdLet(i){this.context.$implicit=this.context.bkdLet=i}constructor(i,r){this.vcr=i,this.templateRef=r,this.context=new l}ngOnInit(){this.vcr.createEmbeddedView(this.templateRef,this.context)}};t.\u0275fac=function(r){return new(r||t)(a(y),a(M))},t.\u0275dir=v({type:t,selectors:[["","bkdLet",""]],inputs:{bkdLet:"bkdLet"},standalone:!0});let e=t;return e})();var D=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=w({type:t,selectors:[["bkd-spinner"]],standalone:!0,features:[k],decls:4,vars:0,consts:[[1,"spinner-container"],["role","status",1,"spinner-border"],[1,"visually-hidden"]],template:function(r,F){r&1&&(O(0,"div",0)(1,"div",1)(2,"span",2),P(3,"Loading..."),C()()())},styles:[".spinner-container[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]:not(.inline) .spinner-container[_ngcontent-%COMP%]{top:-131px;min-height:200px}.spinner-border[_ngcontent-%COMP%]{width:4rem;height:4rem}[_nghost-%COMP%]:not(.inline) .spinner-border[_ngcontent-%COMP%]{margin-top:100px}.small[_nghost-%COMP%] .spinner-border[_ngcontent-%COMP%]{width:2rem;height:2rem;--bs-spinner-vertical-align: -.2em;--bs-spinner-border-width: .15em}"]});let e=t;return e})();var $=class{constructor(t,n,i,r){this.http=t,this.settings=n,this.codec=i,this.resourcePath=r}get(t,n){return this.http.get(`${this.baseUrl}/${t}`,n).pipe(o(L(this.codec)))}getList(t){return this.http.get(`${this.baseUrl}/`,t).pipe(o(I(this.codec)))}get baseUrl(){return`${this.settings.apiUrl}/${this.resourcePath}`}};function z(e){return g(t=>t instanceof E&&t.status===404?d(e||null):h(()=>t))}function B(e){return t=>u(()=>(e(),t))}function G(e){return t=>t.pipe(s(n=>n??e),x(e))}function J(e,t){return e.pipe(o(n=>t.pipe(p(n),s(()=>n))))}function K(e,t=window.document){return c(...["click","keydown"].map(n=>m(t,n))).pipe(p(null),o(()=>f(e)),s(()=>{}))}function N(e,t){return c(e,t.pipe(b(e),s(([n,i])=>i)))}export{U as a,$ as b,D as c,z as d,B as e,G as f,J as g,K as h,N as i}; +import{$ as w,A as g,Ca as y,Cd as L,D as x,Dd as I,N as p,O as o,Sa as O,T as b,Ta as C,ba as v,cc as E,jb as P,k as d,l as h,m as s,p as u,s as m,tb as k,u as f,v as c,va as a,xa as M}from"./chunk-XTHSYQMN.js";var l=class{constructor(){this.$implicit=null,this.bkdLet=null}},U=(()=>{let t=class t{set bkdLet(i){this.context.$implicit=this.context.bkdLet=i}constructor(i,r){this.vcr=i,this.templateRef=r,this.context=new l}ngOnInit(){this.vcr.createEmbeddedView(this.templateRef,this.context)}};t.\u0275fac=function(r){return new(r||t)(a(y),a(M))},t.\u0275dir=v({type:t,selectors:[["","bkdLet",""]],inputs:{bkdLet:"bkdLet"},standalone:!0});let e=t;return e})();var D=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(r){return new(r||t)},t.\u0275cmp=w({type:t,selectors:[["bkd-spinner"]],standalone:!0,features:[k],decls:4,vars:0,consts:[[1,"spinner-container"],["role","status",1,"spinner-border"],[1,"visually-hidden"]],template:function(r,F){r&1&&(O(0,"div",0)(1,"div",1)(2,"span",2),P(3,"Loading..."),C()()())},styles:[".spinner-container[_ngcontent-%COMP%]{text-align:center}[_nghost-%COMP%]:not(.inline) .spinner-container[_ngcontent-%COMP%]{top:-131px;min-height:200px}.spinner-border[_ngcontent-%COMP%]{width:4rem;height:4rem}[_nghost-%COMP%]:not(.inline) .spinner-border[_ngcontent-%COMP%]{margin-top:100px}.small[_nghost-%COMP%] .spinner-border[_ngcontent-%COMP%]{width:2rem;height:2rem;--bs-spinner-vertical-align: -.2em;--bs-spinner-border-width: .15em}"]});let e=t;return e})();var $=class{constructor(t,n,i,r){this.http=t,this.settings=n,this.codec=i,this.resourcePath=r}get(t,n){return this.http.get(`${this.baseUrl}/${t}`,n).pipe(o(L(this.codec)))}getList(t){return this.http.get(`${this.baseUrl}/`,t).pipe(o(I(this.codec)))}get baseUrl(){return`${this.settings.apiUrl}/${this.resourcePath}`}};function z(e){return g(t=>t instanceof E&&t.status===404?d(e||null):h(()=>t))}function B(e){return t=>u(()=>(e(),t))}function G(e){return t=>t.pipe(s(n=>n??e),x(e))}function J(e,t){return e.pipe(o(n=>t.pipe(p(n),s(()=>n))))}function K(e,t=window.document){return c(...["click","keydown"].map(n=>m(t,n))).pipe(p(null),o(()=>f(e)),s(()=>{}))}function N(e,t){return c(e,t.pipe(b(e),s(([n,i])=>i)))}export{U as a,$ as b,D as c,z as d,B as e,G as f,J as g,K as h,N as i}; diff --git a/public/apps/webapp-schulverwaltung/chunk-KLXFX6SJ.js b/public/apps/webapp-schulverwaltung/chunk-U4HODSW3.js similarity index 94% rename from public/apps/webapp-schulverwaltung/chunk-KLXFX6SJ.js rename to public/apps/webapp-schulverwaltung/chunk-U4HODSW3.js index 23770647..fa9e77f8 100644 --- a/public/apps/webapp-schulverwaltung/chunk-KLXFX6SJ.js +++ b/public/apps/webapp-schulverwaltung/chunk-U4HODSW3.js @@ -1,2 +1,2 @@ -import{a as G}from"./chunk-HHGALFFJ.js";import{a as de,b as fe}from"./chunk-MVTCHCDH.js";import{c as ue,d as he}from"./chunk-X2BR3YJG.js";import{d as M,e as X}from"./chunk-Q5U6YZUT.js";import{b as ge}from"./chunk-N6FFLIGM.js";import{b as H,d as ee}from"./chunk-33NXTXD7.js";import{u as W}from"./chunk-FTRAQKUW.js";import{$ as E,$a as l,Ac as g,Bb as h,Bc as J,Cb as _,Db as N,Ga as P,Gc as $,Hd as ce,Ia as s,Id as le,Ja as ae,Jd as me,Nc as v,O as z,Oc as U,Sa as u,Ta as f,Tb as R,Ua as c,Ub as oe,Va as m,W as k,Wa as d,Wc as B,Xb as pe,Z as S,ca as ie,cc as O,db as x,ec as Y,ga as re,jb as p,k as L,kb as y,lb as F,m as K,mb as I,n as j,sc as se,ta as C,tb as A,ua as o,va as Q,w as ne}from"./chunk-T7QWSMKM.js";function be(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),F(" ",n.student.AddressLine2,"")}}function Pe(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),f(),c(3,"br"),d()),e&2){let n=l();o(),x("href","tel:",n.student.PhonePrivate,"",C),o(),F(" ",n.student.PhonePrivate," ")}}function Me(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),f(),c(3,"br"),d()),e&2){let n=l();o(),x("href","tel:",n.student.PhoneMobile,"",C),o(),F(" ",n.student.PhoneMobile," ")}}function Te(e,t){if(e&1&&(u(0,"a",2),p(1),f()),e&2){let n=l();x("href","mailto:",n.email,"",C),o(),F(" ",n.email," ")}}var tt=(()=>{let t=class t{constructor(){this.emailProperty="DisplayEmail"}get postalCode(){return"PostalCode"in this.student?this.student.PostalCode:this.student.Zip}get email(){return this.emailProperty==="Email2"&&"Email2"in this.student?this.student.Email2||null:this.student.DisplayEmail}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=E({type:t,selectors:[["bkd-student-dossier-address"]],inputs:{student:"student",emailProperty:"emailProperty"},standalone:!0,features:[A],decls:9,vars:7,consts:[[4,"ngIf"],[3,"href",4,"ngIf"],[3,"href"]],template:function(a,r){a&1&&(u(0,"address"),p(1),c(2,"br"),P(3,be,3,1,"ng-container",0),p(4),c(5,"br"),P(6,Pe,4,3,"ng-container",0)(7,Me,4,3,"ng-container",0)(8,Te,2,3,"a",1),f()),a&2&&(o(),F(" ",r.student.AddressLine1,""),o(2),s("ngIf",r.student.AddressLine2),o(),I(" ",r.postalCode||""," ",r.student.Location,""),o(2),s("ngIf",r.student.PhonePrivate),o(),s("ngIf",r.student.PhoneMobile),o(),s("ngIf",r.email))},dependencies:[R],changeDetection:0});let e=t;return e})();var V=(()=>{let t=class t{transform(i){return i?.DisplayEmail||i?.Email||i?.Email2||null}};t.\u0275fac=function(a){return new(a||t)},t.\u0275pipe=ie({name:"bkdPersonEmail",type:t,pure:!0,standalone:!0});let e=t;return e})();function Ee(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.CompanyName)}}function Ae(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.CompanyNameAddition)}}function De(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),I(" ",(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.Lastname)||""," ",(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.Firstname)||"","")}}function Le(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.AddressLine1)}}function je(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.AddressLine2)}}function ke(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),I("",n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.PostalCode," ",n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.Location,"")}}function Fe(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),c(3,"br"),f(),d()),e&2){let n=l();o(),x("href","tel:",n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.PhoneBusiness,"",C),o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.PhoneBusiness)}}function Re(e,t){if(e&1&&(m(0),u(1,"a",2),h(2,"bkdPersonEmail"),p(3),h(4,"bkdPersonEmail"),f(),d()),e&2){let n=l();o(),x("href","mailto:",_(2,3,n.company.apprenticeshipManager),"",C),o(2),y(_(4,5,n.company.apprenticeshipManager))}}function Be(e,t){if(e&1&&(u(0,"div",3),p(1),h(2,"translate"),h(3,"addSpace"),c(4,"br"),p(5),h(6,"date"),h(7,"date"),f()),e&2){let n=l();o(),I(" ",_(2,4,"shared.profile.apprenticeship-period"),"",N(3,6,":",":"),""),o(4),I(" ",N(6,9,n.company.apprenticeshipContract.ContractDateFrom,"dd.MM.yyyy"),"\u2013",N(7,12,n.company.apprenticeshipContract.ContractDateTo,"dd.MM.yyyy"),` +import{a as G}from"./chunk-PSXDSPKS.js";import{a as de,b as fe}from"./chunk-YMJC6QZX.js";import{c as ue,d as he}from"./chunk-24AFRN2G.js";import{d as M,e as X}from"./chunk-AW7CSGKI.js";import{b as ge}from"./chunk-FTDG26ID.js";import{b as H,d as ee}from"./chunk-SOHFFTKU.js";import{u as W}from"./chunk-C56YGDXA.js";import{$ as E,$a as l,Ab as h,Ac as J,Bb as _,Cb as N,Fc as $,Ga as P,Gd as ce,Hd as le,Ia as s,Id as me,Ja as ae,Mc as v,Nc as U,O as z,Sa as u,Sb as R,Ta as f,Tb as oe,Ua as c,Va as m,Vc as B,W as k,Wa as d,Wb as pe,Z as S,bc as O,ca as ie,db as x,dc as Y,ga as re,jb as p,k as L,kb as y,lb as F,m as K,mb as I,n as j,rc as se,ta as C,tb as A,ua as o,va as Q,w as ne,zc as g}from"./chunk-XTHSYQMN.js";function be(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),F(" ",n.student.AddressLine2,"")}}function Pe(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),f(),c(3,"br"),d()),e&2){let n=l();o(),x("href","tel:",n.student.PhonePrivate,"",C),o(),F(" ",n.student.PhonePrivate," ")}}function Me(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),f(),c(3,"br"),d()),e&2){let n=l();o(),x("href","tel:",n.student.PhoneMobile,"",C),o(),F(" ",n.student.PhoneMobile," ")}}function Te(e,t){if(e&1&&(u(0,"a",2),p(1),f()),e&2){let n=l();x("href","mailto:",n.email,"",C),o(),F(" ",n.email," ")}}var tt=(()=>{let t=class t{constructor(){this.emailProperty="DisplayEmail"}get postalCode(){return"PostalCode"in this.student?this.student.PostalCode:this.student.Zip}get email(){return this.emailProperty==="Email2"&&"Email2"in this.student?this.student.Email2||null:this.student.DisplayEmail}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=E({type:t,selectors:[["bkd-student-dossier-address"]],inputs:{student:"student",emailProperty:"emailProperty"},standalone:!0,features:[A],decls:9,vars:7,consts:[[4,"ngIf"],[3,"href",4,"ngIf"],[3,"href"]],template:function(a,r){a&1&&(u(0,"address"),p(1),c(2,"br"),P(3,be,3,1,"ng-container",0),p(4),c(5,"br"),P(6,Pe,4,3,"ng-container",0)(7,Me,4,3,"ng-container",0)(8,Te,2,3,"a",1),f()),a&2&&(o(),F(" ",r.student.AddressLine1,""),o(2),s("ngIf",r.student.AddressLine2),o(),I(" ",r.postalCode||""," ",r.student.Location,""),o(2),s("ngIf",r.student.PhonePrivate),o(),s("ngIf",r.student.PhoneMobile),o(),s("ngIf",r.email))},dependencies:[R],changeDetection:0});let e=t;return e})();var V=(()=>{let t=class t{transform(i){return i?.DisplayEmail||i?.Email||i?.Email2||null}};t.\u0275fac=function(a){return new(a||t)},t.\u0275pipe=ie({name:"bkdPersonEmail",type:t,pure:!0,standalone:!0});let e=t;return e})();function Ee(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.CompanyName)}}function Ae(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.CompanyNameAddition)}}function De(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),I(" ",(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.Lastname)||""," ",(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.Firstname)||"","")}}function Le(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.AddressLine1)}}function je(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.AddressLine2)}}function ke(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),I("",n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.PostalCode," ",n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.Location,"")}}function Fe(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),c(3,"br"),f(),d()),e&2){let n=l();o(),x("href","tel:",n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.PhoneBusiness,"",C),o(),y(n.company.apprenticeshipManager==null?null:n.company.apprenticeshipManager.PhoneBusiness)}}function Re(e,t){if(e&1&&(m(0),u(1,"a",2),h(2,"bkdPersonEmail"),p(3),h(4,"bkdPersonEmail"),f(),d()),e&2){let n=l();o(),x("href","mailto:",_(2,3,n.company.apprenticeshipManager),"",C),o(2),y(_(4,5,n.company.apprenticeshipManager))}}function Be(e,t){if(e&1&&(u(0,"div",3),p(1),h(2,"translate"),h(3,"addSpace"),c(4,"br"),p(5),h(6,"date"),h(7,"date"),f()),e&2){let n=l();o(),I(" ",_(2,4,"shared.profile.apprenticeship-period"),"",N(3,6,":",":"),""),o(4),I(" ",N(6,9,n.company.apprenticeshipContract.ContractDateFrom,"dd.MM.yyyy"),"\u2013",N(7,12,n.company.apprenticeshipContract.ContractDateTo,"dd.MM.yyyy"),` `)}}function we(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l(2);o(),I(" ",n.company.jobTrainer.Lastname||""," ",n.company.jobTrainer.Firstname||"","")}}function Ne(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),c(3,"br"),f(),d()),e&2){let n=l(2);o(),x("href","tel:",n.company.jobTrainer.PhoneBusiness,"",C),o(),y(n.company.jobTrainer.PhoneBusiness)}}function Ue(e,t){if(e&1&&(m(0),u(1,"a",2),p(2),c(3,"br"),f(),d()),e&2){let n=l(2);o(),x("href","tel:",n.company.jobTrainer.PhoneMobile,"",C),o(),y(n.company.jobTrainer.PhoneMobile)}}function ze(e,t){if(e&1&&(m(0),u(1,"a",2),h(2,"bkdPersonEmail"),p(3),h(4,"bkdPersonEmail"),f(),d()),e&2){let n=l(2);o(),x("href","mailto:",_(2,3,n.company.jobTrainer),"",C),o(2),y(_(4,5,n.company.jobTrainer))}}function Oe(e,t){if(e&1&&(u(0,"div",3),p(1),h(2,"translate"),h(3,"addSpace"),u(4,"address"),P(5,we,3,2,"ng-container",0)(6,Ne,4,3,"ng-container",0)(7,Ue,4,3,"ng-container",0)(8,ze,5,7,"ng-container",0),h(9,"bkdPersonEmail"),f()()),e&2){let n=l();o(),I(" ",_(2,6,"shared.profile.job-trainer"),"",N(3,8,":",":")," "),o(4),s("ngIf",n.company.jobTrainer.Lastname||n.company.jobTrainer.Firstname),o(),s("ngIf",n.company.jobTrainer.PhoneBusiness),o(),s("ngIf",n.company.jobTrainer.PhoneMobile),o(),s("ngIf",_(9,11,n.company.jobTrainer))}}var ct=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=E({type:t,selectors:[["bkd-student-dossier-apprenticeship-company"]],inputs:{company:"company"},standalone:!0,features:[A],decls:12,vars:12,consts:[[4,"ngIf"],["class","subentry",4,"ngIf"],[3,"href"],[1,"subentry"]],template:function(a,r){a&1&&(u(0,"address"),P(1,Ee,3,1,"ng-container",0)(2,Ae,3,1,"ng-container",0)(3,De,3,2,"ng-container",0)(4,Le,3,1,"ng-container",0)(5,je,3,1,"ng-container",0)(6,ke,3,2,"ng-container",0)(7,Fe,4,3,"ng-container",0)(8,Re,5,7,"ng-container",0),h(9,"bkdPersonEmail"),f(),P(10,Be,8,15,"div",1)(11,Oe,10,13,"div",1)),a&2&&(o(),s("ngIf",r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.CompanyName),o(),s("ngIf",r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.CompanyNameAddition),o(),s("ngIf",(r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.Lastname)||(r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.Firstname)),o(),s("ngIf",r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.AddressLine1),o(),s("ngIf",r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.AddressLine2),o(),s("ngIf",(r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.PostalCode)&&(r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.Location)),o(),s("ngIf",r.company.apprenticeshipManager==null?null:r.company.apprenticeshipManager.PhoneBusiness),o(),s("ngIf",_(9,10,r.company.apprenticeshipManager)),o(2),s("ngIf",r.company.apprenticeshipContract.ContractDateFrom),o(),s("ngIf",r.company.jobTrainer))},dependencies:[R,pe,le,ce,he,V],styles:[".subentry[_ngcontent-%COMP%]{padding-bottom:1rem}"],changeDetection:0});let e=t;return e})();function Ye(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.person.AddressLine1)}}function Je(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),y(n.person.AddressLine2)}}function $e(e,t){if(e&1&&(m(0),p(1),c(2,"br"),d()),e&2){let n=l();o(),I("",n.person.Zip," ",n.person.Location,"")}}function He(e,t){if(e&1&&(m(0),u(1,"a",1),p(2),c(3,"br"),f(),d()),e&2){let n=l();o(),x("href","tel:",n.person.PhonePrivate,"",C),o(),y(n.person.PhonePrivate)}}function Ge(e,t){if(e&1&&(m(0),u(1,"a",1),p(2),c(3,"br"),f(),d()),e&2){let n=l();o(),x("href","tel:",n.person.PhoneMobile,"",C),o(),y(n.person.PhoneMobile)}}function Ve(e,t){if(e&1&&(m(0),u(1,"a",1),h(2,"bkdPersonEmail"),p(3),h(4,"bkdPersonEmail"),f(),d()),e&2){let n=l();o(),x("href","mailto:",_(2,3,n.person),"",C),o(2),y(_(4,5,n.person))}}var ut=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(a){return new(a||t)},t.\u0275cmp=E({type:t,selectors:[["bkd-student-dossier-legal-representative"]],inputs:{person:"person"},standalone:!0,features:[A],decls:10,vars:10,consts:[[4,"ngIf"],[3,"href"]],template:function(a,r){a&1&&(u(0,"address"),p(1),c(2,"br"),P(3,Ye,3,1,"ng-container",0)(4,Je,3,1,"ng-container",0)(5,$e,3,2,"ng-container",0)(6,He,4,3,"ng-container",0)(7,Ge,4,3,"ng-container",0)(8,Ve,5,7,"ng-container",0),h(9,"bkdPersonEmail"),f()),a&2&&(o(),I(" ",r.person.LastName," ",r.person.FirstName,""),o(2),s("ngIf",r.person.AddressLine1),o(),s("ngIf",r.person.AddressLine2),o(),s("ngIf",r.person.Zip&&r.person.Zip),o(),s("ngIf",r.person.PhonePrivate),o(),s("ngIf",r.person.PhoneMobile),o(),s("ngIf",_(9,8,r.person)))},dependencies:[R,V],changeDetection:0});let e=t;return e})();function te(e,t){let n=M(e),i=M(t),a=n.getTime()-i.getTime();return a<0?-1:a>0?1:a}function ye(e,t){let n=M(e),i=M(t);return n.getFullYear()-i.getFullYear()}function ve(e,t){let n=M(e),i=M(t),a=te(n,i),r=Math.abs(ye(n,i));n.setFullYear(1584),i.setFullYear(1584);let b=te(n,i)===-a,T=a*(r-+b);return T===0?0:T}var Ze=18;function Ce(e){return ve(new Date,e.Birthdate||new Date)>=Ze}var xe=$({Email:v(g),Email2:v(g),PhoneBusiness:v(g),CompanyName:U(g),CompanyNameAddition:U(g),Firstname:v(g),Lastname:v(g),AddressLine1:U(g),AddressLine2:U(g),PostalCode:v(g),Location:v(g),Id:J});var Se=(()=>{let t=class t extends H{constructor(i,a){super(i,a,xe,"ApprenticeshipManagers")}};t.\u0275fac=function(a){return new(a||t)(S(Y),S(B))},t.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var _e=$({Email:v(g),Email2:v(g),PhoneBusiness:v(g),PhoneMobile:v(g),Firstname:v(g),Lastname:v(g),Id:J});var Ie=(()=>{let t=class t extends H{constructor(i,a){super(i,a,_e,"JobTrainers")}};t.\u0275fac=function(a){return new(a||t)(S(Y),S(B))},t.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Vt=(()=>{let t=class t{constructor(i,a,r,b,T,w){this.studentService=i,this.personsService=a,this.apprenticeshipManagersService=r,this.jobTrainersService=b,this.loadingService=T,this.dropDownItemsService=w,this.loading$=this.loadingService.loading$}getProfile(i){return this.loadingService.load(j([this.loadStudent(i),this.loadLegalRepresentatives(i),this.loadApprenticeshipContracts(i)]).pipe(z(X(this.mapToProfile.bind(this)))))}getMyProfile(){return this.loadingService.load(this.personsService.getMyself({context:new O().set(G,{disableErrorHandlingForStatus:[403]})}).pipe(z(i=>j([L(i),this.loadLegalRepresentatives(i.Id),this.loadApprenticeshipContracts(i.Id),this.loadStayPermitValue(i.StayPermit)]))).pipe(z(X(this.mapToProfile.bind(this))),ne(W)))}loadStudent(i){return this.studentService.get(i,{context:new O().set(G,{disableErrorHandlingForStatus:[404]})}).pipe(ee())}loadLegalRepresentatives(i){return this.studentService.getLegalRepresentatives(i)}loadApprenticeshipContracts(i){return this.studentService.getCurrentApprenticeshipContracts(i,{context:new O().set(G,{disableErrorHandlingForStatus:[404]})}).pipe(ee([]))}loadStayPermitValue(i){return this.dropDownItemsService.getStayPermits().pipe(K(a=>a.find(r=>r.Key===i)?.Value||null))}mapToProfile(i,a,r,b=null){return i?(a=this.getRelevantLegalRepresentatives(i,a),j([this.loadLegalRepresentativPersons(a),this.loadJobTrainers(r),this.loadApprenticeshipManagers(r)]).pipe(K(([T,w,Z])=>this.createProfile(i,b,a,T,r,Z,w)))):L(null)}loadLegalRepresentativPersons(i){return i.length===0?L([]):this.personsService.getListForIds(i.map(a=>a.RepresentativeId))}loadJobTrainers(i){let a=i.map(r=>r.JobTrainer).filter(r=>typeof r=="number");return a.length===0?L([]):j(a.map(r=>this.jobTrainersService.get(r)))}loadApprenticeshipManagers(i){let a=i.map(r=>r.ApprenticeshipManagerId);return a.length===0?L([]):j(a.map(r=>this.apprenticeshipManagersService.get(r)))}createProfile(i,a,r,b,T,w,Z){return{student:i,stayPermitValue:a||void 0,legalRepresentativePersons:r.map(q=>this.findPerson(q.RepresentativeId,b)).filter(W),apprenticeshipCompanies:T.map(q=>this.createApprenticeshipCompany(q,w,Z))}}getRelevantLegalRepresentatives(i,a){let r=Ce(i);return a.filter(b=>!r||b.RepresentativeAfterMajority)}createApprenticeshipCompany(i,a,r){return{apprenticeshipContract:i,jobTrainer:this.findPerson(i.JobTrainer,r),apprenticeshipManager:this.findPerson(i.ApprenticeshipManagerId,a)}}findPerson(i,a){return i&&a.find(r=>r.Id===i)||null}};t.\u0275fac=function(a){return new(a||t)(S(ue),S(fe),S(Se),S(Ie),S(ge),S(de))},t.\u0275prov=k({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Xt=(()=>{let t=class t{constructor(i,a){this.settings=i,this.storageService=a,this.avatarStyles={}}ngOnChanges(i){i.studentId&&(this.avatarStyles=this.buildAvatarStyles(this.studentId))}buildAvatarStyles(i){return{"background-image":[this.buildAvatarUrl(i),this.fallbackAvatarUrl].map(a=>`url(${a})`).join(", ")}}buildAvatarUrl(i){let a=this.storageService.getAccessToken()||"";return`${this.settings.apiUrl}/Files/personPictures/${i}?token=${a}`}get fallbackAvatarUrl(){return`${this.settings.scriptsAndAssetsPath}/assets/images/avatar-placeholder.png`}};t.\u0275fac=function(a){return new(a||t)(Q(B),Q(me))},t.\u0275cmp=E({type:t,selectors:[["bkd-avatar"]],inputs:{studentId:"studentId",link:"link",linkParams:"linkParams"},standalone:!0,features:[re,A],decls:1,vars:5,consts:[[1,"avatar",3,"routerLink","queryParams","ngStyle"]],template:function(a,r){a&1&&c(0,"a",0),a&2&&(ae("disabled",!r.link),s("routerLink",r.link)("queryParams",r.linkParams)("ngStyle",r.avatarStyles))},dependencies:[se,oe],styles:["[_nghost-%COMP%]{display:flex}.small[_nghost-%COMP%]{width:40px;min-width:40px;height:50px}.medium[_nghost-%COMP%]{width:58px;min-width:58px;height:75px}.large[_nghost-%COMP%]{width:100px;min-width:100px;height:130px}.avatar[_ngcontent-%COMP%]{flex:1;border:1px solid rgba(0,0,0,.25);background-repeat:no-repeat;background-size:cover;background-position:center}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}"]});let e=t;return e})();export{Vt as a,tt as b,ct as c,ut as d,Xt as e}; diff --git a/public/apps/webapp-schulverwaltung/chunk-DXYHDL5D.js b/public/apps/webapp-schulverwaltung/chunk-UP3NEN2H.js similarity index 91% rename from public/apps/webapp-schulverwaltung/chunk-DXYHDL5D.js rename to public/apps/webapp-schulverwaltung/chunk-UP3NEN2H.js index 3f71133f..5893cb82 100644 --- a/public/apps/webapp-schulverwaltung/chunk-DXYHDL5D.js +++ b/public/apps/webapp-schulverwaltung/chunk-UP3NEN2H.js @@ -1 +1 @@ -import{b as v}from"./chunk-DMYOU5OM.js";import{e as P}from"./chunk-Q5U6YZUT.js";import{B as d,C as f,E as m,G as u,J as l,L as h,Q as b,W as F,e as a,f as c,m as i,n as $,v as n,w as g,wa as S,xd as x,zd as y}from"./chunk-T7QWSMKM.js";var q="page",M=(()=>{let r=class r{constructor(e,s,E,R,I){this.location=e,this.loadingService=s,this.sortService=E,this.settings=R,this.loading$=this.loadingService.loading$,this.loadingPage$=this.loadingService.loading(q),this.sorting$=this.sortService.sorting$,this.filter$=new c(this.getInitialFilter()),this.isFilterValid$=this.filter$.pipe(i(this.isValidFilter.bind(this))),this.validFilter$=this.filter$.pipe(g(this.isValidFilter.bind(this)),u(y),h(1)),this.resetEntries$=new a,this.nextPage$=new a,this.page$=n(this.nextPage$.pipe(i(()=>"next")),n(this.resetEntries$,this.validFilter$,this.sorting$).pipe(i(()=>"reset"))).pipe(l((t,p)=>p==="next"?t+1:0,0)),this.offset$=this.page$.pipe(i(t=>t*this.settings.paginationLimit)),this.pageResult$=$([this.validFilter$,this.sorting$,this.offset$]).pipe(f(10),d(P(this.loadEntries.bind(this))),h(1)),this.entries$=n(n(this.resetEntries$,this.validFilter$,this.sorting$).pipe(i(()=>({action:"reset"}))),this.pageResult$.pipe(i(t=>t.offset===0?{action:"reset",entries:t.entries}:{action:"append",entries:t.entries}))).pipe(l(this.entriesActionReducer.bind(this),[]),h(1)),this.total$=this.pageResult$.pipe(i(({total:t})=>t)),this.hasMore$=this.pageResult$.pipe(i(({offset:t,total:p})=>tthis.location.replaceState(I,t)),this.sortService.setSorting(this.getInitialSorting())}ngOnDestroy(){this.destroy$.next()}setFilter(e){this.filter$.next(x(e))}nextPage(){this.hasMore$.pipe(m(1)).subscribe(e=>{e&&this.nextPage$.next()})}resetEntries(){this.resetEntries$.next()}getInitialSorting(){return null}entriesActionReducer(e,s){switch(s.action){case"append":return[...e,...s.entries];case"reset":return s.entries?s.entries:[];default:return e}}};r.\u0275fac=function(s){S()},r.\u0275prov=F({token:r,factory:r.\u0275fac});let o=r;return o})();export{q as a,M as b}; +import{b as v}from"./chunk-5RDJZAUT.js";import{e as P}from"./chunk-AW7CSGKI.js";import{B as d,C as f,E as m,G as u,J as l,L as h,Q as b,W as F,e as a,f as c,m as i,n as $,v as n,w as g,wa as S,wd as x,yd as y}from"./chunk-XTHSYQMN.js";var q="page",M=(()=>{let r=class r{constructor(e,s,E,R,I){this.location=e,this.loadingService=s,this.sortService=E,this.settings=R,this.loading$=this.loadingService.loading$,this.loadingPage$=this.loadingService.loading(q),this.sorting$=this.sortService.sorting$,this.filter$=new c(this.getInitialFilter()),this.isFilterValid$=this.filter$.pipe(i(this.isValidFilter.bind(this))),this.validFilter$=this.filter$.pipe(g(this.isValidFilter.bind(this)),u(y),h(1)),this.resetEntries$=new a,this.nextPage$=new a,this.page$=n(this.nextPage$.pipe(i(()=>"next")),n(this.resetEntries$,this.validFilter$,this.sorting$).pipe(i(()=>"reset"))).pipe(l((t,p)=>p==="next"?t+1:0,0)),this.offset$=this.page$.pipe(i(t=>t*this.settings.paginationLimit)),this.pageResult$=$([this.validFilter$,this.sorting$,this.offset$]).pipe(f(10),d(P(this.loadEntries.bind(this))),h(1)),this.entries$=n(n(this.resetEntries$,this.validFilter$,this.sorting$).pipe(i(()=>({action:"reset"}))),this.pageResult$.pipe(i(t=>t.offset===0?{action:"reset",entries:t.entries}:{action:"append",entries:t.entries}))).pipe(l(this.entriesActionReducer.bind(this),[]),h(1)),this.total$=this.pageResult$.pipe(i(({total:t})=>t)),this.hasMore$=this.pageResult$.pipe(i(({offset:t,total:p})=>tthis.location.replaceState(I,t)),this.sortService.setSorting(this.getInitialSorting())}ngOnDestroy(){this.destroy$.next()}setFilter(e){this.filter$.next(x(e))}nextPage(){this.hasMore$.pipe(m(1)).subscribe(e=>{e&&this.nextPage$.next()})}resetEntries(){this.resetEntries$.next()}getInitialSorting(){return null}entriesActionReducer(e,s){switch(s.action){case"append":return[...e,...s.entries];case"reset":return s.entries?s.entries:[];default:return e}}};r.\u0275fac=function(s){S()},r.\u0275prov=F({token:r,factory:r.\u0275fac});let o=r;return o})();export{q as a,M as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-3AROKYRB.js b/public/apps/webapp-schulverwaltung/chunk-UX5TA32W.js similarity index 92% rename from public/apps/webapp-schulverwaltung/chunk-3AROKYRB.js rename to public/apps/webapp-schulverwaltung/chunk-UX5TA32W.js index cf2f9acd..eea1df71 100644 --- a/public/apps/webapp-schulverwaltung/chunk-3AROKYRB.js +++ b/public/apps/webapp-schulverwaltung/chunk-UX5TA32W.js @@ -1 +1 @@ -import{E as n,W as c,f as r,zd as o}from"./chunk-T7QWSMKM.js";var l=(()=>{let s=class s{constructor(){this.toastsSubject=new r([]),this.toasts$=this.toastsSubject.asObservable()}success(t,e){this.addUnique({message:t,header:e,classname:"bg-success text-light",icon:"check_circle"})}warning(t,e){this.addUnique({message:t,header:e,classname:"bg-warning",icon:"help"})}error(t,e){this.addUnique({message:t,header:e,classname:"bg-danger text-light",icon:"cancel"})}remove(t){this.updateToasts(e=>e.filter(i=>!o(i,t)))}addUnique(t){this.updateToasts(e=>{if(!this.exists(e,t))return[...e,t]})}exists(t,e){return!!t.find(i=>i.message===e.message&&i.header===e.header)}updateToasts(t){this.toasts$.pipe(n(1)).subscribe(e=>{let i=t(e);i&&this.toastsSubject.next(i)})}};s.\u0275fac=function(e){return new(e||s)},s.\u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"});let a=s;return a})();export{l as a}; +import{E as n,W as c,f as r,yd as o}from"./chunk-XTHSYQMN.js";var l=(()=>{let s=class s{constructor(){this.toastsSubject=new r([]),this.toasts$=this.toastsSubject.asObservable()}success(t,e){this.addUnique({message:t,header:e,classname:"bg-success text-light",icon:"check_circle"})}warning(t,e){this.addUnique({message:t,header:e,classname:"bg-warning",icon:"help"})}error(t,e){this.addUnique({message:t,header:e,classname:"bg-danger text-light",icon:"cancel"})}remove(t){this.updateToasts(e=>e.filter(i=>!o(i,t)))}addUnique(t){this.updateToasts(e=>{if(!this.exists(e,t))return[...e,t]})}exists(t,e){return!!t.find(i=>i.message===e.message&&i.header===e.header)}updateToasts(t){this.toasts$.pipe(n(1)).subscribe(e=>{let i=t(e);i&&this.toastsSubject.next(i)})}};s.\u0275fac=function(e){return new(e||s)},s.\u0275prov=c({token:s,factory:s.\u0275fac,providedIn:"root"});let a=s;return a})();export{l as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-VSATLVUN.js b/public/apps/webapp-schulverwaltung/chunk-VSATLVUN.js deleted file mode 100644 index 1faa069d..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-VSATLVUN.js +++ /dev/null @@ -1 +0,0 @@ -import{a as si}from"./chunk-3V5HHMRH.js";import{a as oi,b as li}from"./chunk-ZK2M6PDV.js";import{a as ci}from"./chunk-VFMGCCGG.js";import{a as ai}from"./chunk-RC3HL7KB.js";import"./chunk-KLXFX6SJ.js";import{a as et,b as Wt,c as zt,d as Kt,e as Yt,f as Ue,g as qe,h as Jt,i as Qt,j as Xt,k as Zt,l as ei,m as ye,o as ti,p as pe,s as ni,u as We}from"./chunk-QHPTZGVN.js";import"./chunk-HHGALFFJ.js";import"./chunk-2FIH3FGB.js";import"./chunk-MVTCHCDH.js";import{a as Ht}from"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{a as di}from"./chunk-TNMAZX5O.js";import{a as pi}from"./chunk-2IXEFCAH.js";import"./chunk-X2BR3YJG.js";import{a as qt,d as ii}from"./chunk-LO5XSJLW.js";import"./chunk-DMYOU5OM.js";import"./chunk-RWNJF4OZ.js";import{P as Vt,Y as ri,t as At}from"./chunk-GI4AZI25.js";import{a as xe,c as Lt,e as be}from"./chunk-Q5U6YZUT.js";import{a as Ut,b as He}from"./chunk-N6FFLIGM.js";import{a as Z,b as Nt,c as Ce}from"./chunk-33NXTXD7.js";import{f as Gt,g as Ot,i as $t,j as Ft,p as Ae,u as Ne}from"./chunk-FTRAQKUW.js";import{a as Ve}from"./chunk-3AROKYRB.js";import{$ as C,$a as u,$c as _e,A as ot,Ab as xt,Ad as Rt,B as dt,Bb as l,C as lt,Cb as p,Cd as Dt,Db as G,E as ee,Fb as re,G as W,Ga as f,Gd as X,Hb as bt,Hd as P,I as Ge,Ia as c,Id as w,J as pt,Ja as se,Jd as jt,L as z,N as ct,O as D,Q as ce,Rb as le,Sa as o,Sb as ge,Ta as d,Tb as B,Ua as E,Va as K,W as me,Wa as Y,Wb as V,Wc as he,Xb as Oe,Ya as O,Z as A,Zc as Be,_a as _,a as R,ab as gt,ad as Re,b as j,bb as ft,bd as yt,ca as mt,cb as oe,e as te,ec as Ct,ed as St,f as L,fd as It,g as Xe,ga as ue,gd as De,ha as S,hd as Tt,ia as I,ib as q,jb as m,jd as Et,k as U,ka as ut,kb as x,kd as kt,l as st,lb as h,m as b,mb as Ze,n as ie,od as je,pc as fe,pd as Le,qc as $e,qd as Pt,ra as ne,rc as Fe,rd as wt,sb as de,sc as ae,sd as ve,ta as ke,tb as y,td as Mt,ua as s,ub as ht,v as Me,va as v,vb as M,w as Ee,wb as Pe,xb as _t,zb as vt,zd as Bt}from"./chunk-T7QWSMKM.js";var qi=t=>[t,"tests"];function Wi(t,n){if(t&1&&(o(0,"span"),m(1),l(2,"date"),E(3,"wbr"),m(4),l(5,"date"),d()),t&2){let r=u();s(),h("",G(2,2,r.event.dateFrom,"dd.MM.yyyy"),"\u2013"),s(3),x(G(5,5,r.event.dateTo,"dd.MM.yyyy"))}}function zi(t,n){if(t&1&&(o(0,"a",10)(1,"i",11),m(2,"arrow_right_alt"),d(),o(3,"span",12),m(4),d()()),t&2){let r=u(2);c("routerLink",M(2,qi,r.event.id)),s(4),x(r.event.evaluationText)}}function Ki(t,n){if(t&1&&(o(0,"a",13)(1,"i",11),m(2,"arrow_right_alt"),d(),o(3,"span",12),m(4),d()()),t&2){let r=u(2);c("href",r.event.evaluationLink,ke),s(4),h("",r.event.evaluationText," ")}}function Yi(t,n){if(t&1&&(o(0,"div",7),f(1,zi,5,4,"a",8)(2,Ki,5,2,"a",9),d()),t&2){let r=u();s(),c("ngIf",!r.event.evaluationLink),s(),c("ngIf",r.event.evaluationLink)}}var mi=(()=>{let n=class n{constructor(){this.withRatings=!0}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events-list-entry"]],inputs:{event:"event",withRatings:"withRatings"},standalone:!0,features:[y],decls:11,vars:8,consts:[[1,"designation"],[3,"href"],[1,"date"],[4,"ngIf"],[1,"registrations"],[1,"registrations-label"],["class","rating",4,"ngIf"],[1,"rating"],["class","d-flex",3,"routerLink",4,"ngIf"],["class","d-flex",3,"href",4,"ngIf"],[1,"d-flex",3,"routerLink"],[1,"material-icons"],[1,"ps-1"],[1,"d-flex",3,"href"]],template:function(i,a){i&1&&(o(0,"div",0)(1,"a",1),m(2),d()(),o(3,"div",2),f(4,Wi,6,8,"span",3),d(),o(5,"div",4),m(6),o(7,"span",5),m(8),l(9,"translate"),d()(),f(10,Yi,3,2,"div",6)),i&2&&(s(),c("href",a.event.detailLink,ke),s(),x(a.event.designation),s(2),c("ngIf",a.event.dateFrom&&a.event.dateTo),s(2),h(" ",a.event.studentCount," "),s(2),x(p(9,6,a.event.studentCount===1?"events.registration":"events.registrations")),s(2),c("ngIf",a.withRatings&&a.event.evaluationText))},dependencies:[B,ae,Oe,w,P],styles:['[_nghost-%COMP%]{display:grid;padding:1rem;border-bottom:1px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}.designation[_ngcontent-%COMP%]{grid-area:designation;padding-right:1rem}.date[_ngcontent-%COMP%]{grid-area:date;padding-right:1rem}.registrations[_ngcontent-%COMP%]{grid-area:registrations;padding-right:1rem}.rating[_ngcontent-%COMP%]{grid-area:rating}.rating[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.rating[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.registrations-label[_ngcontent-%COMP%]{display:none}@media (max-width: 575.98px){.registrations-label[_ngcontent-%COMP%]{display:inline}.designation[_ngcontent-%COMP%], .date[_ngcontent-%COMP%], .registrations[_ngcontent-%COMP%]{padding-right:0}[_nghost-%COMP%]{grid-template-areas:"designation" "date" "registrations" "rating";grid-template-columns:1fr}}']});let t=n;return t})();var Ji=10300,Qi=10260,Xi=10250,Zi=14030,en=10350;function ze(t){let{HasEvaluationStarted:n,EvaluationUntil:r,HasTestGrading:e}=t.EvaluationStatusRef;if(n===!0&&(t.StatusId===Zi||t.StatusId===en))return{value:Q.Rating};if(n===!0&&e===!1){if(r)return{value:Q.RatingUntil};if(t.StatusId===Ji)return{value:Q.IntermediateRating}}return n===!1&&e===!0&&t.StatusId!==Qi&&t.StatusId!==Xi?{value:Q.Tests}:n===!0&&e===!0?r?{value:Q.Tests,label:Q.RatingUntil}:{value:Q.Tests,label:Q.IntermediateRating}:null}function ui(t){return t.EvaluationStatusRef.HasEvaluationStarted===!0}function gi(t){return t.EvaluationStatusRef.HasReviewOfEvaluationStarted===!0&&!!t.FinalGrades?.length}function Ke(t){let n=t.Classes?t.Classes.map(r=>r.Number).join(", "):null;return n?t.Designation+", "+n:t.Designation}var Q=function(t){return t.Rating="rating",t.RatingUntil="rating-until",t.IntermediateRating="intermediate-rating",t.Tests="add-tests",t}(Q||{}),Se=(()=>{let n=class n{constructor(e,i,a,g,k,T){this.coursesRestService=e,this.eventsRestService=i,this.studyClassRestService=a,this.loadingService=g,this.translate=k,this.settings=T,this.loading$=this.loadingService.loading$,this.searchSubject$=new L(""),this.search$=this.searchSubject$.asObservable(),this.roles$=new L(null),this.isClassTeacher$=this.roles$.pipe(b(F=>Ht(F,"ClassTeacherRole")),z(1)),this.withStudyCourses$=new L(!1),this.unratedCourses$=this.roles$.pipe(D(this.loadUnratedCourses.bind(this)),z(1)),this.studyCourses$=this.withStudyCourses$.pipe(D(this.loadStudyCourses.bind(this)),z(1)),this.formativeAssessments$=this.isClassTeacher$.pipe(D(this.loadFormativeAssessments.bind(this)),z(1)),this.studyClasses$=this.isClassTeacher$.pipe(D(this.loadStudyClasses.bind(this)),z(1)),this.events$=this.getEvents().pipe(z(1)),this.filteredEvents$=ie([this.events$,this.search$]).pipe(b(be(oi)))}setSearch(e){this.searchSubject$.next(e)}setRoles(e){this.roles$.next(e)}setWithStudyCourses(e){this.withStudyCourses$.next(e)}getEntries(e=!1){return this.filteredEvents$.pipe(b(i=>e?i.filter(a=>a.evaluationText):i))}getEvents(){return this.loadingService.load(ie([this.unratedCourses$,this.studyCourses$,this.formativeAssessments$,this.studyClasses$]),{stopOnFirstValue:!0}).pipe(b(be(this.createAndSortEvents.bind(this))))}loadUnratedCourses(e){return this.coursesRestService.getExpandedCourses(e).pipe(b(i=>i.filter(a=>!gi(a))))}loadStudyCourses(e){return e?this.eventsRestService.getStudyCourseEvents():U([])}loadFormativeAssessments(e){return e?this.studyClassRestService.getActiveFormativeAssessments():U([])}loadStudyClasses(e){return e?this.studyClassRestService.getActive():U([])}createAndSortEvents(e,i,a,g){let k=g.filter(T=>!a.map(F=>F.Id).includes(T.Id));return[...this.createFromCourses(e),...this.createFromStudyCourses(i),...this.createFromAssessments(a),...this.createFromStudyClasses(k)].sort((T,F)=>T.designation.localeCompare(F.designation))}createFromCourses(e){return e.map(i=>{let a=ze(i);return{id:i.Id,designation:Ke(i),detailLink:this.buildLink(i.Id,"eventdetail"),studentCount:i.AttendanceRef.StudentCount||0,dateFrom:i.DateFrom,dateTo:i.DateTo,state:a?.value||null,evaluationText:this.getEvaluationText(a,i.EvaluationStatusRef.EvaluationUntil),evaluationLink:this.getEvaluationLink(a?.value,i)}})}createFromStudyCourses(e){return e.map(i=>({id:i.Id,designation:i.Designation,detailLink:this.buildLink(i.Id,"eventdetail"),studentCount:i.StudentCount,state:null}))}createFromAssessments(e){return this.createFromStudyClasses(e).map(a=>j(R({},a),{state:Q.Rating,evaluationText:this.translate.instant("events.state.rating"),evaluationLink:this.buildLink(a.id,"evaluation")}))}createFromStudyClasses(e){return e.map(i=>({id:i.Id,designation:i.Number,detailLink:this.buildLink(i.Id,"eventdetail"),studentCount:i.StudentCount,state:null}))}getEvaluationText(e,i){let a=e?.label||e?.value;return a?this.translate.instant(`events.state.${a}`)+(a===Q.RatingUntil?` ${i?At(i,"dd.MM.yyyy"):""}`:""):""}getEvaluationLink(e,i){return e&&e!==Q.Tests?this.buildLink(i.Id,"evaluation"):null}buildLink(e,i){return(this.settings.eventlist[i]??"").replace(":id",String(e))}};n.\u0275fac=function(i){return new(i||n)(A(pe),A(si),A(ci),A(He),A(X),A(he))},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let t=n;return t})();var rn=t=>({events:t});function an(t,n){t&1&&(o(0,"div",12),m(1),l(2,"translate"),d()),t&2&&(s(),h(" ",p(2,1,"events.rating")," "))}function sn(t,n){if(t&1&&E(0,"bkd-events-list-entry",13),t&2){let r=n.$implicit,e=u(4);c("event",r)("withRatings",e.withRatings)}}function on(t,n){if(t&1&&(K(0),o(1,"div",6)(2,"div",7),m(3),l(4,"translate"),d(),o(5,"div",8),m(6),l(7,"translate"),d(),o(8,"div",9),m(9),l(10,"translate"),d(),f(11,an,3,3,"div",10),d(),f(12,sn,1,2,"bkd-events-list-entry",11),Y()),t&2){let r=u(2).bkdLet,e=u();s(3),x(p(4,5,"events.designation")),s(3),x(p(7,7,"events.date")),s(3),h(" ",p(10,9,"events.registrations")," "),s(2),c("ngIf",e.withRatings),s(),c("ngForOf",r.events)}}function dn(t,n){t&1&&(o(0,"p",14),m(1),l(2,"translate"),d()),t&2&&(s(),x(p(2,1,"events.no-events")))}function ln(t,n){if(t&1&&(K(0),f(1,on,13,11,"ng-container",5)(2,dn,3,3,"ng-template",null,1,re),Y()),t&2){let r=q(3),e=u().bkdLet;s(),c("ngIf",(e.events==null?null:e.events.length)>0)("ngIfElse",r)}}function pn(t,n){t&1&&E(0,"bkd-spinner")}function cn(t,n){if(t&1){let r=O();o(0,"div",3)(1,"bkd-resettable-input",4),l(2,"async"),l(3,"translate"),l(4,"translate"),_("valueChange",function(i){S(r);let a=u();return I(a.state.setSearch(i))}),d(),f(5,ln,4,2,"ng-container",5),l(6,"async"),f(7,pn,1,0,"ng-template",null,0,re),d()}if(t&2){let r=n.bkdLet,e=q(8),i=u();s(),c("value",p(2,6,i.state.search$))("placeholder",p(3,8,"events.search-by"))("label",p(4,10,"events.search"))("disabled",!r.events),s(4),c("ngIf",p(6,12,i.state.loading$)===!1)("ngIfElse",e)}}var Ye=(()=>{let n=class n{constructor(e,i){this.state=e,this.storage=i,this.withStudyCourses=!1,this.withRatings=!0,this.state.setRoles(this.storage.getPayload()?.roles??null)}ngOnChanges(e){e.withStudyCourses&&this.state.setWithStudyCourses(e.withStudyCourses.currentValue)}};n.\u0275fac=function(i){return new(i||n)(v(Se),v(jt))},n.\u0275cmp=C({type:n,selectors:[["bkd-events-list"]],inputs:{withStudyCourses:"withStudyCourses",withRatings:"withRatings"},standalone:!0,features:[ue,y],decls:2,vars:5,consts:[["loading",""],["noEvents",""],["class","bkd-container",4,"bkdLet"],[1,"bkd-container"],[1,"d-flex","search",3,"valueChange","value","placeholder","label","disabled"],[4,"ngIf","ngIfElse"],[1,"event-header"],[1,"designation"],[1,"date"],[1,"registrations"],["class","rating",4,"ngIf"],[3,"event","withRatings",4,"ngFor","ngForOf"],[1,"rating"],[3,"event","withRatings"],[1,"mt-3"]],template:function(i,a){i&1&&(f(0,cn,9,14,"div",2),l(1,"async")),i&2&&c("bkdLet",M(3,rn,p(1,1,a.state.getEntries(a.withRatings))))},dependencies:[Z,li,B,ge,Ce,V,w,P,mi],styles:['.search[_ngcontent-%COMP%]{max-width:500px}.event-header[_ngcontent-%COMP%]{display:grid;padding:1rem;border-bottom:2px solid #dee2e6;grid-template-areas:"designation date registrations rating";grid-template-columns:4fr 2fr 2fr 3fr}@media (max-width: 575.98px){.event-header[_ngcontent-%COMP%]{display:none}}']});let t=n;return t})();var fi=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events-current"]],standalone:!0,features:[y],decls:4,vars:5,consts:[[3,"withStudyCourses","withRatings"]],template:function(i,a){i&1&&(o(0,"h1"),m(1),l(2,"translate"),d(),E(3,"bkd-events-list",0)),i&2&&(s(),x(p(2,3,"events.current.title")),s(2),c("withStudyCourses",!0)("withRatings",!1))},dependencies:[Ye,w,P]});let t=n;return t})();var hi=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events-tests"]],standalone:!0,features:[y],decls:4,vars:4,consts:[[3,"withRatings"]],template:function(i,a){i&1&&(o(0,"h1"),m(1),l(2,"translate"),d(),E(3,"bkd-events-list",0)),i&2&&(s(),x(p(2,2,"events.title")),s(2),c("withRatings",!0))},dependencies:[Ye,w,P]});let t=n;return t})();var _i=(()=>{let n=class n{constructor(){}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-events"]],standalone:!0,features:[de([Se,Vt]),y],decls:1,vars:0,template:function(i,a){i&1&&E(0,"router-outlet")},dependencies:[$e]});let t=n;return t})();function vi(t){return n=>{let r=Number(n.value);return r<=t?{greaterThan:{value:r,greaterThanValue:t}}:null}}function it(t){return t.map(({finalGrade:n})=>n).filter(mn)}function mn(t){return t!==null}function Ci(t,n,r,e){return t?.map(i=>({student:i,finalGrade:gn(i,r,e),grades:un(i,n)}))}function un(t,n){return n.map(r=>{if(r.Results===void 0||r.Results?.length===0)return{kind:"no-result",test:r};let e=r.Results?.find(i=>i.StudentId===t.Id);return e!==void 0?{kind:"grade",result:e,test:r}:{kind:"no-result",test:r}})}function gn(t,n,r){let e=n.find(a=>a.StudentId===t.Id),i=r.find(a=>a.StudentId===t.Id);return e?{id:e.Id,average:fn(e),finalGradeId:e.GradeId,freeHandGrade:i?Number(i.Grade):null,canGrade:e.CanGrade}:null}function fn(t){return t.AverageTestResult===0?null:t.AverageTestResult}var yi=({key:t,ascending:n})=>(r,e)=>{let i=n?1:-1;switch(t){case"FullName":return i*r.student.FullName.localeCompare(e.student.FullName);case"FinalGrade":return!r.finalGrade?.finalGradeId||!e.finalGrade?.finalGradeId?i*-1:i*xi(r.finalGrade.finalGradeId,e.finalGrade.finalGradeId);case"TestsMean":return!r.finalGrade?.average||!e.finalGrade?.average?i*-1:i*xi(r.finalGrade.average,e.finalGrade.average)}return i*hn(t,r,e)},hn=(t,n,r)=>{let e=n.grades.filter(bi).find(a=>a.test.Id===t.Id),i=r.grades.filter(bi).find(a=>a.test.Id===t.Id);return t.IsPointGrading&&e?.result.GradeId===i?.result.GradeId?(e?.result.Points??0)-(i?.result.Points??0):((e?.result.GradeId??Number.POSITIVE_INFINITY)-(i?.result.GradeId??Number.POSITIVE_INFINITY))*-1};function xi(t,n){return t===n?0:tr.average).filter(r=>r!=null&&r!==0).map(Number);return et(n)}function Ti(t,n){let r=t.map(i=>i.freeHandGrade).filter(i=>!!i),e=t.map(i=>i.finalGradeId).filter(i=>i!==null).map(i=>n.find(a=>a.Key===i)).filter(i=>i!==void 0).map(i=>i?.Value).filter(i=>i!==void 0).map(Number).filter(i=>!isNaN(i));return et([...e,...r])}function nt(t,n){return[...n.filter(r=>r.Id!==t?.Id),t].filter(r=>r!=null)}function Ei({id:t,selectedGradeId:n},r){return r.map(e=>e.Id!==t?e:j(R({},e),{GradeId:n}))}function ki(t,n){switch(n.type){case"reset":return n.payload;case"updateResult":return t?j(R({},t),{Tests:zt(n.payload.testResult,t.Tests||[],n.payload.ignore),Gradings:n.payload.grading?nt(n.payload.grading,t.Gradings||[]):t.Gradings}):null;case"deleteResult":return t?j(R({},t),{Tests:Kt(n.payload.testId,n.payload.studentId,t.Tests||[]),Gradings:n.payload.grading?nt(n.payload.grading,t.Gradings||[]):t.Gradings||[]}):null;case"toggle-test-state":return t?j(R({},t),{Tests:Yt(n.payload,t.Tests||[])}):null;case"final-grade-overwritten":return t?j(R({},t),{Gradings:Ei({id:n.payload.id,selectedGradeId:n.payload.selectedGradeId},t.Gradings||[])}):null;case"replace-grades":return t?j(R({},t),{Gradings:n.payload}):null;case"delete-test":return t?j(R({},t),{Tests:Jt(n.payload,t.Tests||[])}):null;default:return t}}var Pi=(()=>{let n=class n extends Nt{constructor(e,i){super(e,i,ti,"Gradings")}updateGrade(e,i){return this.http.put(`${this.baseUrl}/${e}`,{GradeId:i}).pipe(b(()=>e))}};n.\u0275fac=function(i){return new(i||n)(A(Ct),A(he))},n.\u0275prov=me({token:n,factory:n.\u0275fac,providedIn:"root"});let t=n;return t})();var rt={onlyMine:!1,hidePublished:!1},J=(()=>{let n=class n{constructor(e,i,a,g,k){this.coursesRestService=e,this.gradingScalesRestService=i,this.gradingsRestService=a,this.loadingService=g,this.sortService=k,this.action$=new Xe(1),this.loading$=this.loadingService.loading$,this._courseId$=new Xe(1),this.courseId$=this._courseId$.asObservable(),this.fetchedCourse$=this._courseId$.pipe(D(T=>this.loadingService.load(this.coursesRestService.getExpandedCourse(T))),z(1)),this.course$=Me(this.action$,this.fetchedCourse$.pipe(Ee(Ne),b(T=>({type:"reset",payload:T})))).pipe(pt(ki,null),Ee(Ne),z(1)),this.tests$=this.course$.pipe(b(T=>T.Tests||[]),b(Qt)),this.hasTests$=this.tests$.pipe(b(T=>T.length>0)),this.filterSubject$=new L(rt),this.filter$=this.filterSubject$.asObservable(),this.expandedHeader$=new L(!1),this.filteredTests$=ie([this.tests$,this.filter$]).pipe(b(([T,F])=>T.filter(H=>(!F.onlyMine||H.IsOwner)&&(!F.hidePublished||!H.IsPublished)))),this.sorting$=this.sortService.sorting$,this.studentGrades$=ie([this.course$,this.filteredTests$,this.sorting$]).pipe(b(be(this.toStudentGrades.bind(this)))),this.canSetFinalGrade$=this.course$.pipe(b(ui)),this.gradingScaleIds$=this.course$.pipe(b(T=>Rt([...(T.Tests??[]).map(F=>F.GradingScaleId),T.GradingScaleId]).filter(Ne)),W(Bt),z(1)),this.gradingScales$=this.gradingScaleIds$.pipe(D(T=>this.gradingScalesRestService.getGradingScales(T)),z(1)),this.UNDEFINED_GRADINGSCALE_ID=-1,this.gradingScalesOptions$=this.gradingScales$.pipe(b(T=>T.map(F=>{let H=F?.Id||this.UNDEFINED_GRADINGSCALE_ID,Te=F?.Grades.map(we=>({Key:we.Id,Value:we.Designation}))||[];return{id:H,options:Te}}).reduce((F,H)=>j(R({},F),{[H.id]:H.options}),{})),z(1)),this.meanOfStudentGradesForCourse$=this.studentGrades$.pipe(b(T=>Ii(it(T)))),this.meanOfFinalGradesForCourse$=ie([this.gradingScalesOptions$,this.studentGrades$]).pipe(D(be(this.meanOfOverwrittenGradesForCourse.bind(this))))}setCourseId(e){this._courseId$.next(e)}setFilter(e){this.filterSubject$.next(e)}gradingOptionsForTest$(e){return this.gradingOptions$(e.GradingScaleId)}gradingOptionsForCourse$(){return this.course$.pipe(D(e=>this.gradingOptions$(e.GradingScaleId)))}toStudentGrades(e,i=[],a){return Ci(e.ParticipatingStudents??[],i,e.Gradings??[],e.FinalGrades??[]).sort(yi(a))}setSorting(e){this.sortService.setSorting(e)}getSortingChar$(e){return this.sortService.getSortingChar$(e)}sortBy(e){this.sortService.toggleSorting(e)}toggleHeader(e){this.expandedHeader$.next(e)}optimisticallyUpdateGrade(e){return this.course$.pipe(ee(1),b(i=>{let{originalResult:a,updatedResult:g}=this.buildOptimisticResultUpdate(i,e);return this.updateTestResult(g,null),a}))}saveGrade(e,i){this.course$.pipe(ee(1),D(a=>this.coursesRestService.updateTestResult(a.Id,e).pipe(ot(g=>(i&&this.updateTestResult(R({},i),null),st(()=>g)))))).subscribe(({testResult:a,grading:g})=>this.updateOrDeleteTestResult(e.testId,e.studentId,a,g,"gradeId"in e?"grade":"points"))}publish(e){this.coursesRestService.publishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}unpublish(e){this.coursesRestService.unpublishTest(e.Id).subscribe(this.toggleTestPublishedState.bind(this))}deleteTest(e){this.action$.next({type:"delete-test",payload:e})}overwriteFinalGrade({id:e,selectedGradeId:i}){this.gradingsRestService.updateGrade(e,i).subscribe(()=>{this.action$.next({type:"final-grade-overwritten",payload:{id:e,selectedGradeId:i}})})}setAveragesAsFinalGrades(e){this.coursesRestService.setAverageAsFinalGrade(e).subscribe(i=>this.action$.next({type:"replace-grades",payload:i.Gradings}))}buildOptimisticResultUpdate(e,i){let a=Wt(e,i.testId,i.studentId),g=a?R({},a):{Id:"",TestId:i.testId,StudentId:i.studentId,CourseRegistrationId:0,GradeId:null,GradeValue:null,GradeDesignation:null,Points:null};return g.GradeId="gradeId"in i?i.gradeId:a?.GradeId??null,g.Points="points"in i?i.points:a?.Points??null,{originalResult:a,updatedResult:g}}updateOrDeleteTestResult(e,i,a,g,k){a?this.updateTestResult(a,g,k):this.deleteTestResult(e,i,g)}updateTestResult(e,i,a){this.action$.next({type:"updateResult",payload:{testResult:e,grading:i??null,ignore:a}})}deleteTestResult(e,i,a){this.action$.next({type:"deleteResult",payload:{testId:e,studentId:i,grading:a}})}toggleTestPublishedState(e){this.action$.next({type:"toggle-test-state",payload:e})}gradingOptions$(e){return e===null?U(null):this.gradingScalesOptions$.pipe(b(i=>i[e]),z(1))}meanOfOverwrittenGradesForCourse(e,i){return this.course$.pipe(b(a=>{if(a.GradingScaleId===null||e[a.GradingScaleId]===void 0)return null;let g=e[a.GradingScaleId];return Ti(it(i),g)}))}};n.\u0275fac=function(i){return new(i||n)(A(pe),A(ni),A(Pi),A(He),A(pi))},n.\u0275prov=me({token:n,factory:n.\u0275fac});let t=n;return t})();var xn=t=>({formGroup:t}),bn=t=>["/events",t,"tests"];function Cn(t,n){if(t&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),t&2){let r=n.$implicit;s(),h(" ",G(2,1,"global.validation-errors."+r.error,r.params)," ")}}function yn(t,n){if(t&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),t&2){let r=n.$implicit;s(),h(" ",G(2,1,"global.validation-errors."+r.error,r.params)," ")}}function Sn(t,n){if(t&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),t&2){let r=n.$implicit;s(),h(" ",G(2,1,"global.validation-errors."+r.error,r.params)," ")}}function In(t,n){if(t&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),t&2){let r=n.$implicit;s(),h(" ",G(2,1,"global.validation-errors."+r.error,r.params)," ")}}function Tn(t,n){if(t&1&&(o(0,"div",31),m(1),l(2,"translate"),d()),t&2){let r=n.$implicit;s(),h(" ",G(2,1,"global.validation-errors."+r.error,r.params)," ")}}function En(t,n){if(t&1&&(K(0),o(1,"div",32)(2,"div",33)(3,"div",17)(4,"label",34),m(5),l(6,"translate"),d(),o(7,"div",35),E(8,"input",36),l(9,"async"),f(10,In,3,4,"div",8),l(11,"async"),d()()(),o(12,"div",33)(13,"div",17)(14,"label",37),m(15),l(16,"translate"),d(),o(17,"div",35),E(18,"input",38),l(19,"async"),f(20,Tn,3,4,"div",8),l(21,"async"),d()()()(),o(22,"div",39),ut(),o(23,"math")(24,"mi"),m(25),l(26,"translate"),d(),o(27,"mo"),m(28,"="),d(),o(29,"mfrac")(30,"mrow")(31,"mi"),m(32),l(33,"translate"),d(),o(34,"mo"),m(35,"\xD7"),d(),o(36,"mn"),m(37,"5"),d()(),o(38,"mi"),m(39),l(40,"translate"),d()(),o(41,"mo"),m(42,"+"),d(),o(43,"mn"),m(44,"1"),d()()(),Y()),t&2){let r,e,i=u(3);s(5),x(p(6,11,"tests.form.max-points")),s(3),se("is-invalid",((r=p(9,13,i.maxPointsErrors$))==null?null:r.length)||!1),s(2),c("ngForOf",p(11,15,i.maxPointsErrors$)),s(5),x(p(16,17,"tests.form.max-points-adjusted")),s(3),se("is-invalid",((e=p(19,19,i.maxPointsAdjustedErrors$))==null?null:e.length)||!1),s(2),c("ngForOf",p(21,21,i.maxPointsAdjustedErrors$)),s(5),h(" ",p(26,23,"tests.form.math.grade")," "),s(7),h(" ",p(33,25,"tests.form.math.points")," "),s(7),x(p(40,27,"tests.form.math.max-points"))}}function kn(t,n){t&1&&(o(0,"div",40)(1,"span",41),m(2,"Loading..."),d()())}function Pn(t,n){if(t&1){let r=O();o(0,"form",3),_("ngSubmit",function(){S(r);let i=u(2);return I(i.onSubmit())}),o(1,"div",4)(2,"div",5)(3,"label",6),m(4),l(5,"translate"),d(),E(6,"input",7),l(7,"async"),l(8,"translate"),f(9,Cn,3,4,"div",8),l(10,"async"),d(),o(11,"div",9)(12,"label",10),m(13),l(14,"translate"),d(),o(15,"div",11)(16,"span",12)(17,"i",13),m(18,"calendar_today"),d()(),o(19,"input",14,0),l(21,"async"),l(22,"translate"),_("click",function(){S(r);let i=q(20);return I(i.toggle())}),d(),f(23,yn,3,4,"div",8),l(24,"async"),d()()(),o(25,"div",15)(26,"label",16),m(27),l(28,"translate"),d(),o(29,"div",5)(30,"div",17)(31,"label",18),m(32),l(33,"translate"),d(),o(34,"div",19),E(35,"input",20),l(36,"async"),f(37,Sn,3,4,"div",8),l(38,"async"),d()()()(),o(39,"div")(40,"label",16),m(41),l(42,"translate"),d(),o(43,"div",21),E(44,"input",22),o(45,"label",23),m(46),l(47,"translate"),d()(),o(48,"div",21),E(49,"input",24),o(50,"label",25),m(51),l(52,"translate"),d()(),f(53,En,45,29,"ng-container",26),d(),o(54,"div",27)(55,"button",28),l(56,"async"),m(57),l(58,"translate"),d(),o(59,"button",29),m(60),l(61,"translate"),f(62,kn,3,0,"div",30),d()()()}if(t&2){let r,e,i,a=u().bkdLet,g=u();c("formGroup",a.formGroup),s(4),x(p(5,29,"tests.form.designation")),s(2),se("is-invalid",((r=p(7,31,g.designationErrors$))==null?null:r.length)||!1),c("placeholder",p(8,33,"tests.form.designation-placeholder")),s(3),c("ngForOf",p(10,35,g.designationErrors$)),s(4),x(p(14,37,"tests.form.date")),s(3),c("id",g.componentId),s(3),se("is-invalid",((e=p(21,39,g.dateErrors$))==null?null:e.length)||!1),c("placeholder",p(22,41,"shared.date-select.default-placeholder")),s(4),c("ngForOf",p(24,43,g.dateErrors$)),s(4),x(p(28,45,"tests.form.weight")),s(5),x(p(33,47,"tests.form.factor")),s(3),se("is-invalid",((i=p(36,49,g.weightErrors$))==null?null:i.length)||!1),s(2),c("ngForOf",p(38,51,g.weightErrors$)),s(4),x(p(42,53,"tests.form.grading-type")),s(3),c("value",!1),s(2),x(p(47,55,"tests.form.grades")),s(3),c("value",!0),s(2),x(p(52,57,"tests.form.points")),s(2),c("ngIf",a.formGroup.get("isPointGrading").value),s(2),c("disabled",g.saving)("routerLink",M(65,bn,p(56,59,g.courseId$))),s(2),h(" ",p(58,61,"tests.form.cancel")," "),s(2),c("disabled",g.saving),s(),h(" ",p(61,63,"tests.form.save")," "),s(2),c("ngIf",g.saving)}}function wn(t,n){if(t&1&&(K(0),f(1,Pn,63,67,"form",2),Y()),t&2){let r=n.bkdLet;s(),c("ngIf",r.formGroup)}}var Je=(()=>{let n=class n{constructor(e,i,a){this.fb=e,this.translate=i,this.testStateService=a,this.test=null,this.saving=!1,this.save=new ne,this.componentId=Dt("bkd-tests-edit-form"),this.formGroup=this.createFormGroup(),this.submitted$=new L(!1),this.destroy$=new te,this.designationErrors$=xe(U(this.formGroup),this.submitted$,"designation"),this.dateErrors$=xe(U(this.formGroup),this.submitted$,"date"),this.maxPointsErrors$=xe(U(this.formGroup),this.submitted$,"maxPoints"),this.maxPointsAdjustedErrors$=xe(U(this.formGroup),this.submitted$,"maxPointsAdjusted"),this.weightErrors$=xe(U(this.formGroup),this.submitted$,"weight"),this.courseId$=this.testStateService.courseId$}ngOnInit(){this.test&&this.setInitialValues(this.test),Lt(U(this.formGroup),"isPointGrading").pipe(ce(this.destroy$)).subscribe(this.togglePointFieldsDisability.bind(this))}ngOnDestroy(){this.destroy$.next()}onSubmit(){this.submitted$.next(!0),this.formGroup.valid&&this.save.emit(this.formGroup.value)}createFormGroup(){return this.fb.group({designation:["",_e.required],date:[null,_e.required],weight:[1,_e.compose([_e.required,vi(0)])],isPointGrading:[!1],maxPoints:[{value:null,disabled:!0},_e.required],maxPointsAdjusted:[{value:null,disabled:!0},null]})}setInitialValues(e){this.formGroup.patchValue({designation:e.Designation,date:e.Date,weight:e.Weight,isPointGrading:e.IsPointGrading,maxPoints:e.MaxPoints,maxPointsAdjusted:e.MaxPointsAdjusted}),e.Results&&e.Results.length>0&&(this.formGroup.get("isPointGrading")?.disable(),this.formGroup.get("maxPoints")?.disable(),this.formGroup.get("maxPointsAdjusted")?.disable()),this.togglePointFieldsDisability()}togglePointFieldsDisability(){let e=this.formGroup.get("maxPoints"),i=this.formGroup.get("maxPointsAdjusted");this.formGroup.get("isPointGrading")?.value?(e?.enable(),i?.enable()):(e?.reset({value:this.test?.MaxPoints,disabled:!0}),i?.reset({value:this.test?.MaxPointsAdjusted,disabled:!0}))}};n.\u0275fac=function(i){return new(i||n)(v(wt),v(X),v(J))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-edit-form"]],inputs:{test:"test",saving:"saving"},outputs:{save:"save"},standalone:!0,features:[de([{provide:Gt,useClass:Ft},{provide:Ot,useClass:di}]),y],decls:1,vars:3,consts:[["dp","ngbDatepicker"],[4,"bkdLet"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"row","g-3","mb-3"],[1,"col-md-6"],["for","designation",1,"form-label"],["id","designation","name","designation","type","text","formControlName","designation","required","",1,"form-control",3,"placeholder"],["class","invalid-feedback",4,"ngFor","ngForOf"],[1,"col-md-6","mb-3"],["for","date",1,"form-label"],[1,"input-group"],[1,"input-group-text",3,"id"],[1,"material-icons"],["id","date","name","date","type","text","ngbDatepicker","","formControlName","date","required","",1,"form-control",3,"click","placeholder"],[1,"row","mb-3"],[1,"form-label"],[1,"row"],["for","factor",1,"form-label","col-3","col-sm-2"],[1,"col-9","col-sm-10"],["id","factor","name","factor","type","number","formControlName","weight","step","0.05","min","0","required","",1,"form-control"],[1,"form-check"],["type","radio","formControlName","isPointGrading","id","type-grades",1,"form-check-input",3,"value"],["for","type-grades",1,"form-check-label"],["type","radio","formControlName","isPointGrading","id","type-points",1,"form-check-input",3,"value"],["for","type-points",1,"form-check-label"],[4,"ngIf"],[1,"d-flex","justify-content-end","mt-4"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","routerLink"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"invalid-feedback"],[1,"row","ms-4","mb-3","g-3"],[1,"col-sm-6","col-md-4"],["for","max-points",1,"ms-2","col-4","col-form-label"],[1,"col-6"],["type","number","name","maxPoints","id","max-points","formControlName","maxPoints","step","0.01","min","0","max","999","required","",1,"form-control"],["for","max-points-adjusted",1,"ms-2","col-4","col-form-label"],["type","number","name","maxPointsAdjusted","id","max-points-adjusted","formControlName","maxPointsAdjusted","step","0.01","min","0","max","999",1,"form-control"],[1,"ms-4","ps-3","py-3"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(i,a){i&1&&f(0,wn,2,1,"ng-container",1),i&2&&c("bkdLet",M(1,xn,a.formGroup))},dependencies:[Z,B,ve,It,Be,De,Tt,Re,yt,Pt,Le,je,Mt,Et,kt,ge,$t,ae,V,w,P],styles:["#factor[_ngcontent-%COMP%], #max-points[_ngcontent-%COMP%], #max-points-adjusted[_ngcontent-%COMP%]{width:5em}"]});let t=n;return t})();var Gn=(t,n)=>({courseId:t,saving:n});function On(t,n){if(t&1){let r=O();o(0,"div",1)(1,"bkd-tests-edit-form",2),_("save",function(i){S(r);let a=u();return I(a.save(i))}),d()()}if(t&2){let r=n.bkdLet;s(),c("saving",r.saving)}}var Mi=(()=>{let n=class n{constructor(e,i,a,g,k){this.route=e,this.courseService=i,this.toastService=a,this.translate=g,this.router=k,this.saving$=new L(!1),this.courseId$=this.route.paramMap.pipe(b(T=>Number(T.get("id"))),W())}save(e){this.saving$.next(!0);let{designation:i,date:a,weight:g,isPointGrading:k,maxPoints:T,maxPointsAdjusted:F}=e;this.courseId$.pipe(D(H=>this.courseService.add(H,a,i,g,k,T,F)),Ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}navigateBack(){this.courseId$.subscribe(e=>this.router.navigate(["events",e,"tests"]))}};n.\u0275fac=function(i){return new(i||n)(v(fe),v(pe),v(Ve),v(X),v(Fe))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-add"]],standalone:!0,features:[y],decls:6,vars:11,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"save","saving"]],template:function(i,a){i&1&&(o(0,"h1"),m(1),l(2,"translate"),d(),f(3,On,2,1,"div",0),l(4,"async"),l(5,"async")),i&2&&(s(),x(p(2,2,"tests.add-title")),s(2),c("bkdLet",Pe(8,Gn,p(4,4,a.courseId$),p(5,6,a.saving$))))},dependencies:[Z,Je,V,w,P]});let t=n;return t})();var Gi=(()=>{let n=class n{constructor(e){this.activeModal=e}get canDeleteTest(){return(this.test?.Results?.filter(i=>i.GradeId!==null||i.GradeValue!==null||i.Points!==null)||[]).length===0}};n.\u0275fac=function(i){return new(i||n)(v(Ae))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-delete"]],inputs:{test:"test"},standalone:!0,features:[y],decls:13,vars:10,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click","hidden"],[1,"px-2"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"],[1,"px-3"]],template:function(i,a){i&1&&(o(0,"div",0)(1,"p",1),m(2),l(3,"translate"),d()(),o(4,"div",2)(5,"button",3),_("click",function(){return a.activeModal.dismiss()}),o(6,"span",4),m(7),l(8,"translate"),d()(),o(9,"button",5),_("click",function(){return a.activeModal.close(a.canDeleteTest?a.test:null)}),o(10,"span",6),m(11),l(12,"translate"),d()()()),i&2&&(s(2),h(" ",p(3,4,a.canDeleteTest?"tests.form.confirm":"tests.form.delete-not-allowed")," "),s(3),c("hidden",!a.canDeleteTest),s(2),h(" ",p(8,6,"tests.dialog.no")," "),s(4),h(" ",p(12,8,a.canDeleteTest?"tests.dialog.yes":"tests.dialog.ok")," "))},dependencies:[w,P]});let t=n;return t})();var Bn=(t,n,r)=>({courseId:t,test:n,saving:r}),Rn=t=>({test:t});function Dn(t,n){if(t&1){let r=O();K(0),o(1,"div",4)(2,"h1"),m(3),l(4,"translate"),d(),o(5,"button",5),_("click",function(){S(r);let i=u().bkdLet,a=u();return I(a.openDeleteModal(i.test))}),o(6,"i",6),m(7,"delete"),d()()(),o(8,"bkd-tests-edit-form",7),_("save",function(i){S(r);let a=u(2);return I(a.save(i))}),d(),Y()}if(t&2){let r=u().bkdLet;s(3),h(" ",G(4,3,"tests.edit-title",M(6,Rn,r.test.Designation))," "),s(5),c("test",r.test)("saving",r.saving)}}function jn(t,n){t&1&&E(0,"bkd-spinner")}function Ln(t,n){if(t&1&&(o(0,"div",2),f(1,Dn,9,8,"ng-container",3),l(2,"async"),f(3,jn,1,0,"ng-template",null,0,re),d()),t&2){let r=q(4),e=u();s(),c("ngIf",p(2,2,e.state.loading$)===!1)("ngIfElse",r)}}var Oi=(()=>{let n=class n{constructor(e,i,a,g,k,T,F){this.state=e,this.courseService=i,this.route=a,this.toastService=g,this.translate=k,this.router=T,this.modalService=F,this.saving$=new L(!1),this.testId$=this.route.paramMap.pipe(b(H=>Number(H.get("testId"))),W()),this.test$=ie([this.state.tests$,this.testId$]).pipe(b(([H,Te])=>H.find(we=>we.Id===Te)))}openDeleteModal(e){let i=this.modalService.open(Gi);i.componentInstance.test=e,i.result.then(a=>{a&&this.courseService.delete(e.CourseId,e.Id).subscribe(this.onDeleteSuccess.bind(this))},()=>{})}save(e){this.saving$.next(!0);let{designation:i,date:a,weight:g,isPointGrading:k,maxPoints:T,maxPointsAdjusted:F}=e;ie([this.state.courseId$,this.testId$]).pipe(ee(1),D(([H,Te])=>this.courseService.update(H,Te,i,a,g,k,T,F)),Ge(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.toastService.success(this.translate.instant("tests.form.save-success")),this.navigateBack()}onDeleteSuccess(e){this.toastService.success(this.translate.instant("tests.form.delete-success")),this.state.deleteTest(e),this.navigateBack()}navigateBack(){this.state.courseId$.pipe(ee(1)).subscribe(e=>this.router.navigate(["events",e,"tests"]))}};n.\u0275fac=function(i){return new(i||n)(v(J),v(pe),v(fe),v(Ve),v(X),v(Fe),v(We))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-edit"]],standalone:!0,features:[y],decls:4,vars:11,consts:[["loading",""],["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[4,"ngIf","ngIfElse"],[1,"d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-primary","btn-icon",3,"click"],[1,"material-icons"],[3,"save","test","saving"]],template:function(i,a){i&1&&(f(0,Ln,5,4,"div",1),l(1,"async"),l(2,"async"),l(3,"async")),i&2&&c("bkdLet",_t(7,Bn,p(1,1,a.state.courseId$),p(2,3,a.test$),p(3,5,a.saving$)))},dependencies:[Z,B,Je,Ce,V,w,P]});let t=n;return t})();var An=t=>({designation:t}),$i=(()=>{let n=class n{constructor(e){this.activeModal=e}};n.\u0275fac=function(i){return new(i||n)(v(Ae))},n.\u0275cmp=C({type:n,selectors:[["bkd-publish-test"]],inputs:{test:"test"},standalone:!0,features:[y],decls:11,vars:12,consts:[[1,"modal-body"],["data-testid","confirmation-message"],[1,"modal-footer"],["data-testid","cancel-button","type","button",1,"btn","btn-outline-secondary",3,"click"],["data-testid","confirm-button","type","button",1,"btn","btn-primary",3,"click"]],template:function(i,a){i&1&&(o(0,"div",0)(1,"p",1),m(2),l(3,"translate"),d()(),o(4,"div",2)(5,"button",3),_("click",function(){return a.activeModal.dismiss()}),m(6),l(7,"translate"),d(),o(8,"button",4),_("click",function(){return a.activeModal.close(!0)}),m(9),l(10,"translate"),d()()),i&2&&(s(2),h(" ",G(3,3,a.test.IsPublished?"tests.publishing.unpublish":"tests.publishing.publish",M(10,An,a.test.Designation))," "),s(4),h(" ",p(7,6,"tests.publishing.cancel")," "),s(3),h(" ",p(10,8,"tests.publishing.confirm")," "))},dependencies:[w,P],encapsulation:2});let t=n;return t})();var Vn=t=>({maxPoints:t});function Nn(t,n){if(t&1&&(o(0,"div",8),m(1),l(2,"translate"),d()),t&2){let r=u(2);s(),h(" ",G(2,1,"global.validation-errors.invalidPoints",M(4,Vn,r.maxPoints))," ")}}function Hn(t,n){if(t&1){let r=O();o(0,"div",5)(1,"input",6,0),_("ngModelChange",function(){S(r);let i=q(2),a=u();return I(a.onPointsChange(i.value))}),d(),f(3,Nn,3,6,"div",7),d()}if(t&2){let r=q(2),e=u();s(),se("is-invalid",r.errors),oe("max",e.maxPoints),oe("tabindex",e.tabIndex),c("disabled",e.grade.test.IsPublished)("ngModel",e.grade.kind==="grade"?e.grade.result.Points:null),s(2),c("ngIf",r.errors)}}var Un=1250,Fi=(()=>{let n=class n{constructor(e){this.state=e,this.maxPoints=0,this.pointsSubject$=new te,this.gradeSubject$=new te,this.gradingScaleDisabledSubject$=new L(!0),this.gradingScaleDisabled$=this.gradingScaleDisabledSubject$.asObservable(),this.destroy$=new te}ngOnInit(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale()),this.maxPoints=Si(this.grade),this.initSave(this.pointsSubject$.pipe(Ee(this.isValid.bind(this)),b(e=>({studentId:this.student.Id,testId:this.grade.test.Id,points:e?Number(e):null})))),this.initSave(this.gradeSubject$.pipe(b(e=>({studentId:this.student.Id,testId:this.grade.test.Id,gradeId:e}))))}ngOnChanges(){this.gradingScaleDisabledSubject$.next(this.disableGradingScale())}ngOnDestroy(){this.destroy$.next()}onPointsChange(e){this.pointsSubject$.next(e),this.gradingScaleDisabledSubject$.next(!(e===null||e===""))}onGradeChange(e){this.gradeSubject$.next(e)}isValid(e){return e===""||e===null?!0:isNaN(Number(e))?!1:!(Number(e)<0||Number(e)>this.maxPoints)}initSave(e){e.pipe(dt(i=>this.state.optimisticallyUpdateGrade(i).pipe(b(a=>({params:i,originalResult:a})))),lt(Un),ce(this.destroy$)).subscribe(({params:i,originalResult:a})=>this.state.saveGrade(i,a))}disableGradingScale(){return this.grade.test.IsPublished?!0:this.grade.kind==="no-result"?!1:this.grade.result.Points!=null&&this.grade.test.IsPointGrading}};n.\u0275fac=function(i){return new(i||n)(v(J))},n.\u0275cmp=C({type:n,selectors:[["bkd-grade"]],inputs:{grade:"grade",student:"student",tabIndex:"tabIndex",gradeOptions:"gradeOptions"},standalone:!0,features:[ue,y],decls:5,vars:8,consts:[["points","ngModel"],[1,"d-flex","flex-column","w-100"],[1,"d-flex","flex-row"],["class","point-input-container me-2 me-md-3",4,"ngIf"],["data-testid","grade-select",1,"grade-select",3,"valueChange","options","allowEmpty","value","disabled","tabindex"],[1,"point-input-container","me-2","me-md-3"],["type","number","step","0.01","min","0","data-testid","point-input",1,"form-control",3,"ngModelChange","max","disabled","tabindex","ngModel"],["class","invalid-feedback","data-testid","validation-error-message",4,"ngIf"],["data-testid","validation-error-message",1,"invalid-feedback"]],template:function(i,a){i&1&&(o(0,"div",1)(1,"div",2),f(2,Hn,4,7,"div",3),o(3,"bkd-select",4),l(4,"async"),_("valueChange",function(k){return a.onGradeChange(k)}),d()()()),i&2&&(s(2),c("ngIf",a.grade.test.IsPointGrading),s(),c("options",a.gradeOptions)("allowEmpty",!0)("value",a.grade.kind==="grade"?a.grade.result.GradeId:null)("disabled",p(4,6,a.gradingScaleDisabled$))("tabindex",a.tabIndex))},dependencies:[B,ve,Be,De,Re,Le,je,St,ye,V,w,P],styles:[".point-input-container[_ngcontent-%COMP%]{width:4em}[_nghost-%COMP%] select{min-width:13ch}@media (min-width: 576px){.point-input-container[_ngcontent-%COMP%]{width:5em}}"]});let t=n;return t})();function qn(t,n){if(t&1&&(o(0,"span",3),m(1),d()),t&2){let r=u();s(),x(r.calculatePointsAverage(r.test))}}var Bi=(()=>{let n=class n{constructor(e){this.locale=e}calculatePointsAverage(e){return this.safeAverage(e,2,Ue)}calculateGradeAverage(e){return this.safeAverage(e,3,qe)}safeAverage(e,i,a){try{return ei(a(e),this.locale,i)}catch{return Xt}}};n.\u0275fac=function(i){return new(i||n)(v(bt))},n.\u0275cmp=C({type:n,selectors:[["bkd-average-grades"]],inputs:{test:"test"},standalone:!0,features:[y],decls:4,vars:2,consts:[[1,"d-flex","flex-row","w-100"],["class","mr-2 mr-md-3 average-points","data-testid","average-points",4,"ngIf"],["data-testid","average-grade"],["data-testid","average-points",1,"mr-2","mr-md-3","average-points"]],template:function(i,a){i&1&&(o(0,"div",0),f(1,qn,2,1,"span",1),o(2,"span",2),m(3),d()()),i&2&&(s(),c("ngIf",a.test.IsPointGrading),s(2),x(a.calculateGradeAverage(a.test)))},dependencies:[B],styles:[".average-points[_ngcontent-%COMP%]{min-width:4.5em}@media (min-width: 576px){.average-points[_ngcontent-%COMP%]{min-width:6em}}"]});let t=n;return t})();var Ri=(()=>{let n=class n{constructor(){this.disabled=!1,this.gradeIdSelected=new ne}onGradeChange(e){this.gradeId?.valueOf()!==void 0&&this.gradeIdSelected.emit({id:this.gradeId?.valueOf(),selectedGradeId:e})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-grade-select"]],inputs:{options:"options",valueId:"valueId",gradeId:"gradeId",disabled:"disabled"},outputs:{gradeIdSelected:"gradeIdSelected"},standalone:!0,features:[y],decls:1,vars:4,consts:[["data-testid","grade-select",3,"valueChange","options","allowEmpty","value","disabled"]],template:function(i,a){i&1&&(o(0,"bkd-select",0),_("valueChange",function(k){return a.onGradeChange(k)}),d()),i&2&&c("options",a.options)("allowEmpty",!0)("value",a.valueId)("disabled",a.disabled)},dependencies:[ye],styles:["[_nghost-%COMP%] select{min-width:13ch}"]});let t=n;return t})();var Di=(t,n)=>({"btn-primary":t,"btn-outline-secondary":n}),ji=(()=>{let n=class n{constructor(){this.filter=rt,this.filterChange=new ne}showOnlyMine(){this.filterChange.next(j(R({},this.filter),{onlyMine:!0}))}showAll(){this.filterChange.next(j(R({},this.filter),{onlyMine:!1}))}onHidePublishedChange(e){let i=(e.target&&e.target instanceof HTMLInputElement&&e.target?.checked)??!1;this.filterChange.next(j(R({},this.filter),{hidePublished:i}))}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-test-table-filter"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[y],decls:13,vars:18,consts:[[1,"only-mine-buttons"],["type","button",1,"btn","desktop",3,"click","ngClass"],["type","button",1,"btn","ms-2","desktop",3,"click","ngClass"],[1,"hide-published"],[1,"form-check"],["id","hide-published","type","checkbox",1,"form-check-input",3,"change","checked"],["for","hide-published",1,"form-check-label"]],template:function(i,a){i&1&&(o(0,"div",0)(1,"button",1),_("click",function(){return a.showAll()}),m(2),l(3,"translate"),d(),o(4,"button",2),_("click",function(){return a.showOnlyMine()}),m(5),l(6,"translate"),d()(),o(7,"div",3)(8,"div",4)(9,"input",5),_("change",function(k){return a.onHidePublishedChange(k)}),d(),o(10,"label",6),m(11),l(12,"translate"),d()()()),i&2&&(s(),c("ngClass",Pe(12,Di,!a.filter.onlyMine,a.filter.onlyMine)),s(),h(" ",p(3,6,"tests.all-tests")," "),s(2),c("ngClass",Pe(15,Di,a.filter.onlyMine,!a.filter.onlyMine)),s(),h(" ",p(6,8,"tests.owned-tests")," "),s(4),c("checked",a.filter.hidePublished),s(2),h(" ",p(12,10,"tests.hide-published")," "))},dependencies:[le,ve,w,P],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;height:100%}.only-mine-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;height:3.625rem}.hide-published[_ngcontent-%COMP%]{display:flex;align-items:center;height:2.375rem;margin-bottom:1rem}.hide-published[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{font-weight:300}.hide-published[_ngcontent-%COMP%] .form-check[_ngcontent-%COMP%]{margin-bottom:0}"]});let t=n;return t})();var Wn=["*"],Li=(()=>{let n=class n{};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-preserve-line-height"]],standalone:!0,features:[y],ngContentSelectors:Wn,decls:3,vars:0,template:function(i,a){i&1&&(gt(),o(0,"div"),ft(1),m(2,"\xA0"),d())},encapsulation:2});let t=n;return t})();var Ai=(()=>{let n=class n{constructor(e){this.translate=e}transform(e){return`${e.Weight} (${e.WeightPercent}%)${this.getPoints(e)}`}getPoints(e){return e.IsPointGrading?`, ${e.MaxPointsAdjusted??e.MaxPoints} ${this.translate.instant("tests.summary.points")}`:""}};n.\u0275fac=function(i){return new(i||n)(v(X,16))},n.\u0275pipe=mt({name:"testSummaryShort",type:n,pure:!0,standalone:!0});let t=n;return t})();var zn=t=>[t,"edit"];function Kn(t,n){t&1&&(o(0,"i",12),m(1,"edit"),d())}function Yn(t,n){if(t&1&&(o(0,"div",8)(1,"div",9)(2,"bkd-preserve-line-height"),m(3),l(4,"date"),d(),o(5,"a",10),f(6,Kn,2,0,"i",11),d()(),o(7,"bkd-preserve-line-height"),m(8),l(9,"testSummaryShort"),d(),o(10,"bkd-preserve-line-height"),m(11),d()()),t&2){let r=u();s(3),x(G(4,5,r.test.Date,"dd.MM.yyyy")),s(2),c("routerLink",M(10,zn,r.test.Id)),s(),c("ngIf",r.test.IsOwner&&r.test.IsPublished===!1),s(2),h(" ",p(9,8,r.test)," "),s(3),x(r.test.Owner)}}function Jn(t,n){if(t&1){let r=O();o(0,"div",13)(1,"a",14),l(2,"translate"),_("click",function(){S(r);let i=u();return I(i.unpublishTest())}),o(3,"i",15),m(4,"lock"),d(),o(5,"span"),m(6),l(7,"translate"),d()(),o(8,"bkd-caret",16),_("click",function(){S(r);let i=u();return I(i.toggleHeader())}),d()()}if(t&2){let r=u();s(),oe("title",p(2,3,"tests.edit")),s(5),x(p(7,5,"tests.published")),s(2),c("expanded",r.expanded)}}function Qn(t,n){if(t&1){let r=O();o(0,"div",13)(1,"a",17),l(2,"translate"),_("click",function(){S(r);let i=u();return I(i.publishTest())}),o(3,"i",15),m(4,"lock_open"),d(),o(5,"span"),m(6),l(7,"translate"),d()(),o(8,"bkd-caret",16),_("click",function(){S(r);let i=u();return I(i.toggleHeader())}),d()()}if(t&2){let r=u();s(),oe("title",p(2,3,"tests.publish")),s(5),x(p(7,5,"tests.not-published")),s(2),c("expanded",r.expanded)}}var Vi=(()=>{let n=class n{constructor(){this.toggle=new ne,this.publish=new ne,this.unpublish=new ne}toggleHeader(){this.toggle.emit(!this.expanded)}publishTest(){this.publish.emit(this.test)}unpublishTest(){this.unpublish.emit(this.test)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=C({type:n,selectors:[["bkd-test-table-header"]],inputs:{test:"test",expanded:"expanded"},outputs:{toggle:"toggle",publish:"publish",unpublish:"unpublish"},standalone:!0,features:[y],decls:10,vars:6,consts:[["notPublished",""],[1,"d-flex","flex-column","h-100","justify-content-between"],["role","button",1,"test-designation","d-flex","flex-row","my-3","align-items-end","justify-content-between",3,"click"],[3,"ngClass"],[1,"align-self-start",3,"expanded"],[1,"d-flex","flex-column"],["class","d-flex flex-column mb-3",4,"ngIf"],["class","d-flex align-items-center justify-content-between test-status",4,"ngIf","ngIfElse"],[1,"d-flex","flex-column","mb-3"],[1,"d-flex","flex-row","justify-content-between"],[1,"btn","btn-link","p-0","edit",3,"routerLink"],["class","material-icons",4,"ngIf"],[1,"material-icons"],[1,"d-flex","align-items-center","justify-content-between","test-status"],[1,"d-flex","btn","btn-link","ps-0","edit",3,"click","title"],[1,"material-icons","me-1"],[1,"expand-mobile",3,"click","expanded"],[1,"d-flex","btn","btn-link","ps-0",3,"click","title"]],template:function(i,a){if(i&1){let g=O();o(0,"div",1)(1,"div",2),_("click",function(){return S(g),I(a.toggleHeader())}),o(2,"div",3),m(3),d(),E(4,"bkd-caret",4),d(),o(5,"div",5),f(6,Yn,12,12,"div",6)(7,Jn,9,7,"div",7)(8,Qn,9,7,"ng-template",null,0,re),d()()}if(i&2){let g=q(9);s(2),c("ngClass",a.expanded?"expanded":"collapsed"),s(),h(" ",a.test.Designation," "),s(),c("expanded",a.expanded),s(2),c("ngIf",a.expanded),s(),c("ngIf",a.test.IsPublished)("ngIfElse",g)}},dependencies:[le,qt,B,Li,ae,Oe,w,P,Ai],styles:["[_nghost-%COMP%]{font-weight:300}.collapsed[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.test-designation[_ngcontent-%COMP%]{display:none!important}.test-status[_ngcontent-%COMP%]{order:-1;padding-bottom:1rem}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.test-status[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#000}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.test-status[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.edit[_ngcontent-%COMP%]{color:#00000080;text-decoration:none}@media (min-width: 750px){.test-designation[_ngcontent-%COMP%]{display:inherit!important}.test-status[_ngcontent-%COMP%]{order:initial}.expand-mobile[_ngcontent-%COMP%]{display:none!important}}"]});let t=n;return t})();var Xn=(t,n,r,e,i)=>({tests:t,hasTests:n,studentGrades:r,filter:e,expanded:i}),at=t=>({selected:t}),Zn=t=>["student",t,"grades"],er=t=>({"visible-on-mobile":t});function tr(t,n){if(t&1){let r=O();o(0,"th",24)(1,"bkd-test-table-header",25),_("toggle",function(i){S(r);let a=u(2);return I(a.state.toggleHeader(i))})("publish",function(i){S(r);let a=u(2);return I(a.publish(i))})("unpublish",function(i){S(r);let a=u(2);return I(a.unpublish(i))}),d()()}if(t&2){let r=n.$implicit,e=u().bkdLet,i=u();c("ngClass",r.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),s(),c("test",r)("expanded",e.expanded)}}function ir(t,n){if(t&1){let r=O();o(0,"th",26)(1,"bkd-test-table-header",25),_("toggle",function(i){S(r);let a=u(2);return I(a.state.toggleHeader(i))})("publish",function(i){S(r);let a=u(2);return I(a.publish(i))})("unpublish",function(i){S(r);let a=u(2);return I(a.unpublish(i))}),d()()}if(t&2){let r=n.$implicit,e=u().bkdLet,i=u();c("ngClass",r.Id===(i.selectedTest==null?null:i.selectedTest.Id)?"selected":""),s(),c("test",r)("expanded",e.expanded)}}function nr(t,n){if(t&1){let r=O();o(0,"div",30)(1,"span",29),_("click",function(){S(r);let i=u().$implicit,a=u(2);return I(a.state.sortBy(i))}),m(2),l(3,"translate"),d()()}t&2&&(s(2),h("",p(3,1,"tests.points")," "))}function rr(t,n){if(t&1){let r=O();o(0,"th",27)(1,"div",10),f(2,nr,4,3,"div",28),o(3,"div",11)(4,"span",29),_("click",function(){let i=S(r).$implicit,a=u(2);return I(a.state.sortBy(i))}),m(5),l(6,"translate"),d()(),o(7,"div",12),m(8),l(9,"async"),d()()()}if(t&2){let r=n.$implicit,e=u(2);c("ngClass",r.Id===(e.selectedTest==null?null:e.selectedTest.Id)?"selected":""),s(2),c("ngIf",r.IsPointGrading),s(3),x(p(6,4,"tests.grade")),s(3),h(" ",p(9,6,e.state.getSortingChar$(r))," ")}}function ar(t,n){if(t&1){let r=O();o(0,"bkd-grade-select",38),l(1,"async"),l(2,"async"),_("gradeIdSelected",function(i){S(r);let a=u(3);return I(a.state.overwriteFinalGrade(i))}),d()}if(t&2){let r=u().$implicit,e=u(2);c("options",p(1,4,e.state.gradingOptionsForCourse$()))("valueId",r.finalGrade.finalGradeId)("gradeId",r.finalGrade.id)("disabled",p(2,6,e.isEditFinalGradesAllowed(r))===!1)}}function sr(t,n){if(t&1&&(o(0,"div"),m(1),d()),t&2){let r=u().$implicit;s(),h(" ",r.finalGrade.freeHandGrade," ")}}function or(t,n){if(t&1&&(o(0,"td",39),E(1,"bkd-grade",40),l(2,"async"),d()),t&2){let r=n.$implicit,e=n.index,i=u(),a=i.$implicit,g=i.index,k=u(2);c("ngClass",k.selectedTest!==void 0&&r.test.Id===k.selectedTest.Id?"selected":""),s(),c("grade",r)("gradeOptions",p(2,5,k.state.gradingOptionsForTest$(r.test)))("student",a.student)("tabIndex",(1+e)*1e3+g)}}function dr(t,n){if(t&1&&(o(0,"tr")(1,"td",31)(2,"a",32)(3,"span"),m(4),d(),o(5,"span",19),m(6),l(7,"translate"),l(8,"decimalOrDash"),d()()(),o(9,"td",33),f(10,ar,3,8,"bkd-grade-select",34)(11,sr,2,1,"div",35),d(),o(12,"td",36),m(13),l(14,"decimalOrDash"),d(),f(15,or,3,7,"td",37),d()),t&2){let r=n.$implicit,e=u(2);s(2),c("routerLink",M(18,Zn,r.student.Id)),s(2),x(r.student.FullName),s(2),Ze(" ",p(7,10,"tests.mean"),": ",G(8,12,r.finalGrade==null?null:r.finalGrade.average,"1-3")," "),s(3),c("ngClass",M(20,at,e.selectedTest===void 0)),s(),c("ngIf",r.finalGrade&&!r.finalGrade.freeHandGrade),s(),c("ngIf",r.finalGrade&&r.finalGrade.freeHandGrade),s(2),h(" ",G(14,15,r.finalGrade==null?null:r.finalGrade.average,"1-3")," "),s(2),c("ngForOf",r.grades)("ngForTrackBy",e.trackGradeOf(r.student))}}function lr(t,n){if(t&1&&(o(0,"td",39),E(1,"bkd-average-grades",41),d()),t&2){let r=n.$implicit,e=u(2);c("ngClass",r.Id===(e.selectedTest==null?null:e.selectedTest.Id)||r.Id===(e.selectedTest==null?null:e.selectedTest.Id)?"selected":""),s(),c("test",r)}}function pr(t,n){if(t&1){let r=O();o(0,"button",42),_("click",function(){S(r);let i=u(2);return I(i.setAverageAsFinalGrade())}),m(1),l(2,"translate"),d()}if(t&2){let r=u().bkdLet,e=u();c("ngClass",M(4,er,!r.hasTests||!e.selectedTest)),s(),h(" ",p(2,2,"tests.set-final-grade")," ")}}function cr(t,n){if(t&1){let r=O();K(0),o(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr",4)(5,"th",5)(6,"bkd-test-table-filter",6),_("filterChange",function(i){S(r);let a=u();return I(a.state.setFilter(i))}),d()(),f(7,tr,2,3,"th",7)(8,ir,2,3,"th",8),d(),o(9,"tr")(10,"th",9),_("click",function(){S(r);let i=u();return I(i.state.sortBy("FullName"))}),o(11,"div",10)(12,"div",11),m(13),l(14,"translate"),d(),o(15,"div",12),m(16),l(17,"async"),d()()(),o(18,"th",13),_("click",function(){S(r);let i=u();return I(i.state.sortBy("FinalGrade"))}),o(19,"div",10)(20,"div",11),m(21),l(22,"translate"),d(),o(23,"div",12),m(24),l(25,"async"),d()()(),o(26,"th",14),_("click",function(){S(r);let i=u();return I(i.state.sortBy("TestsMean"))}),o(27,"div",10)(28,"div",11),m(29),l(30,"translate"),d(),o(31,"div",12),m(32),l(33,"async"),d()()(),f(34,rr,10,8,"th",15),d()(),o(35,"tbody"),f(36,dr,16,22,"tr",16),o(37,"tr")(38,"td",17)(39,"div",18)(40,"div"),m(41),l(42,"translate"),d(),o(43,"div",19),m(44),l(45,"translate"),l(46,"async"),l(47,"decimalOrDash"),d()()(),o(48,"td",20),m(49),l(50,"async"),l(51,"decimalOrDash"),d(),o(52,"td",21),m(53),l(54,"async"),l(55,"decimalOrDash"),d(),f(56,lr,2,2,"td",22),d()()(),f(57,pr,3,6,"button",23),l(58,"async"),d(),Y()}if(t&2){let r=n.bkdLet,e=u();s(6),c("filter",r.filter),s(),c("ngForOf",r.tests),s(),c("ngForOf",r.tests),s(5),h(" ",p(14,21,"tests.student.name")," "),s(3),h(" ",p(17,23,e.state.getSortingChar$("FullName"))," "),s(2),c("ngClass",M(54,at,e.selectedTest===void 0)),s(3),h(" ",p(22,25,"tests.grade")," "),s(3),h(" ",p(25,27,e.state.getSortingChar$("FinalGrade"))," "),s(5),h(" ",p(30,29,"tests.mean")," "),s(3),h(" ",p(33,31,e.state.getSortingChar$("TestsMean"))," "),s(2),c("ngForOf",r.tests),s(2),c("ngForOf",r.studentGrades)("ngForTrackBy",e.trackStudentGrade),s(5),x(p(42,33,"tests.average")),s(3),Ze(" ",p(45,35,"tests.mean"),": ",G(47,39,p(46,37,e.state.meanOfStudentGradesForCourse$),"1-3")," "),s(4),c("ngClass",M(56,at,e.selectedTest===void 0)),s(),h(" ",G(51,44,p(50,42,e.state.meanOfFinalGradesForCourse$),"1-3")," "),s(4),h(" ",G(55,49,p(54,47,e.state.meanOfStudentGradesForCourse$),"1-3")," "),s(3),c("ngForOf",r.tests),s(),c("ngIf",p(58,52,e.state.canSetFinalGrade$))}}var Ni=(()=>{let n=class n{constructor(e,i){this.state=e,this.modalService=i}ngOnInit(){this.state.setSorting({key:"FullName",ascending:!0})}setAverageAsFinalGrade(){this.state.course$.pipe(ee(1)).subscribe(e=>this.state.setAveragesAsFinalGrades({CourseIds:[e.Id]}))}isEditFinalGradesAllowed(e){return this.state.course$.pipe(b(i=>!!(ze(i)?.value&&e.finalGrade?.canGrade)))}publish(e){let i=this.openModal(e);this.onCloseModal(i,()=>this.state.publish(e))}unpublish(e){let i=this.openModal(e);this.onCloseModal(i,()=>this.state.unpublish(e))}trackStudentGrade(e){return e}trackGradeOf(e){return function(i,a){return`${e.Id}_${a.test.Id}`}}calculatePointsAverage(e){return this.safeAverage(e,Ue)}calculateGradeAverage(e){return this.safeAverage(e,qe)}safeAverage(e,i){try{return i(e).toString()}catch{return"\u2013"}}openModal(e){let i=this.modalService.open($i);return i.componentInstance.test=e,i}onCloseModal(e,i){e.result.then(a=>{a&&i()},()=>{})}};n.\u0275fac=function(i){return new(i||n)(v(J),v(We))},n.\u0275cmp=C({type:n,selectors:[["bkd-test-edit-grades"]],inputs:{selectedTest:"selectedTest"},standalone:!0,features:[de([Se]),y],decls:6,vars:17,consts:[[4,"bkdLet"],[1,"table-responsive-wrapper"],[1,"table","table-hover","h-100"],[1,"h-100"],[1,"h-100","header-collapsible"],["colspan","3",1,"desktop","sticky"],[3,"filterChange","filter"],["container","body","class","grade h-100 test-info-desktop",3,"ngClass",4,"ngFor","ngForOf"],["container","body","class","grade h-100 header-mobile test-info-mobile","colspan","3",3,"ngClass",4,"ngFor","ngForOf"],[1,"primary-column-width","sticky",3,"click"],[1,"d-flex"],[1,"column-title"],[1,"sort-direction","ms-1"],[1,"secondary-column-width","sticky","sticky-col-2","desktop",3,"click","ngClass"],[1,"secondary-column-width","border-end","sticky","sticky-col-3","desktop",3,"click"],["container","body","class","grade h-100",3,"ngClass",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"sticky"],[1,"d-flex","flex-column"],[1,"mobile","mean"],[1,"desktop","sticky","sticky","sticky-col-2",3,"ngClass"],[1,"desktop","border-end","sticky","sticky-col-3"],["class","grade",3,"ngClass",4,"ngFor","ngForOf"],["data-testId","apply-average-button","class","apply-average-button btn btn-primary m-3","type","button",3,"ngClass","click",4,"ngIf"],["container","body",1,"grade","h-100","test-info-desktop",3,"ngClass"],[3,"toggle","publish","unpublish","test","expanded"],["container","body","colspan","3",1,"grade","h-100","header-mobile","test-info-mobile",3,"ngClass"],["container","body",1,"grade","h-100",3,"ngClass"],["class","column-title me-3 point-input-container",4,"ngIf"],[3,"click"],[1,"column-title","me-3","point-input-container"],[1,"primary-column-width","sticky","name"],[3,"routerLink"],[1,"grade","sticky","sticky-col-2",3,"ngClass"],[3,"options","valueId","gradeId","disabled","gradeIdSelected",4,"ngIf"],[4,"ngIf"],[1,"grade","border-end","sticky","sticky-col-3"],["class","grade",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[3,"gradeIdSelected","options","valueId","gradeId","disabled"],[1,"grade",3,"ngClass"],[3,"grade","gradeOptions","student","tabIndex"],[3,"test"],["data-testId","apply-average-button","type","button",1,"apply-average-button","btn","btn-primary","m-3",3,"click","ngClass"]],template:function(i,a){i&1&&(f(0,cr,59,58,"ng-container",0),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async")),i&2&&c("bkdLet",vt(11,Xn,p(1,1,a.state.filteredTests$),p(2,3,a.state.hasTests$),p(3,5,a.state.studentGrades$),p(4,7,a.state.filter$),p(5,9,a.state.expandedHeader$)))},dependencies:[Z,le,ge,ji,Vi,B,ae,Ri,Fi,Bi,V,w,P,Zt],styles:[".filter-hover[_ngcontent-%COMP%]:hover{background-color:#dedede}table[_ngcontent-%COMP%] th.grade.selected[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td.grade.selected[_ngcontent-%COMP%]{display:table-cell!important}table[_ngcontent-%COMP%] th.grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td.grade[_ngcontent-%COMP%], .desktop[_ngcontent-%COMP%]{display:none!important}.desktop.selected[_ngcontent-%COMP%]{display:table-cell!important}thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;vertical-align:top}.header-collapsible[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6;padding:0 1rem}.mobile[_ngcontent-%COMP%]{display:block!important}.mean[_ngcontent-%COMP%]{color:#4e4e4ef2;font-size:.875rem;line-height:1}td.name[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}td.name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{text-decoration:underline}td.name[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%]{display:none!important}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1rem}table[_ngcontent-%COMP%] td.name[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td.average[_ngcontent-%COMP%]{max-width:18ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-right:0}.point-input-container[_ngcontent-%COMP%]{width:5em}@media (min-width: 576px){.table-responsive-wrapper[_ngcontent-%COMP%]{display:block;overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:separate;border-spacing:0}thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th.test-info-mobile[_ngcontent-%COMP%]{display:none!important}thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th.test-info-desktop[_ngcontent-%COMP%], table[_ngcontent-%COMP%] th.grade[_ngcontent-%COMP%], table[_ngcontent-%COMP%] td.grade[_ngcontent-%COMP%], .desktop[_ngcontent-%COMP%]{display:table-cell!important}table[_ngcontent-%COMP%] td.name[_ngcontent-%COMP%]{max-width:auto;overflow:visible}thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-top:none;padding-top:.25rem;padding-bottom:.25rem;border-top:initial;min-width:100px;max-width:100px}thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th.grade[_ngcontent-%COMP%]{min-width:300px;max-width:300px}.mobile[_ngcontent-%COMP%]{display:none!important}.primary-column-width[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:300px;max-width:300px}.secondary-column-width[_ngcontent-%COMP%]{min-width:100px;max-width:100px}table[_ngcontent-%COMP%] .sticky[_ngcontent-%COMP%]{position:sticky;left:0;background-color:#fff}table[_ngcontent-%COMP%] .sticky.sticky-col-2[_ngcontent-%COMP%]{left:300px}table[_ngcontent-%COMP%] .sticky.sticky-col-3[_ngcontent-%COMP%]{left:452px}}@media (max-width: 575.98px){.apply-average-button[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]});let t=n;return t})();var mr=()=>["/events"],ur=t=>({count:t});function gr(t,n){if(t&1&&(o(0,"div",8),m(1),l(2,"translate"),d()),t&2){let r=u();s(),h(" ",G(2,1,r.course.ParticipatingStudents.length===1?"courses.registration":"courses.registrations",M(4,ur,r.course.ParticipatingStudents.length))," ")}}var Hi=(()=>{let n=class n{constructor(e){this.reportsService=e,this.course$=new L(null),this.reports$=this.course$.pipe(b(i=>i?.Id),W(),D(i=>i?this.reportsService.getCourseReports(i):U([])),ct([]))}ngOnChanges(e){e.course&&this.course$.next(e.course.currentValue)}getDesignation(){return Ke(this.course)}};n.\u0275fac=function(i){return new(i||n)(v(ii))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-header"]],inputs:{course:"course"},standalone:!0,features:[ue,y],decls:12,vars:7,consts:[[3,"link"],[1,"d-flex"],["routerLink","add",1,"edit","btn","btn-primary","btn-icon","ms-2"],[1,"material-icons"],[1,"ms-2",3,"reports"],["id","excel-import"],[1,"d-flex","flex-column","header"],["class","additional-info",4,"ngIf"],[1,"additional-info"]],template:function(i,a){i&1&&(o(0,"bkd-backlink",0)(1,"div",1)(2,"a",2)(3,"i",3),m(4,"add"),d()(),E(5,"bkd-reports-link",4),l(6,"async"),E(7,"div",5),d()(),o(8,"div",6)(9,"h1"),m(10),d(),f(11,gr,3,6,"div",7),d()),i&2&&(c("link",ht(6,mr)),s(5),c("reports",p(6,4,a.reports$)),s(5),x(a.getDesignation()),s(),c("ngIf",a.course.ParticipatingStudents))},dependencies:[ri,ae,Ut,B,V,w,P],styles:[".header[_ngcontent-%COMP%]{padding-bottom:1rem;border-bottom:1px solid #dee2e6}h1[_ngcontent-%COMP%]{margin-bottom:0}.additional-info[_ngcontent-%COMP%]{color:#adb5bd}"]});let t=n;return t})();var fr=(t,n,r,e,i,a)=>({course:t,tests:n,hasTests:r,testOptions:e,selectedTestId:i,selectedTest:a}),hr=t=>({"visible-on-mobile":t});function _r(t,n){if(t&1){let r=O();K(0),o(1,"bkd-select",7),_("valueChange",function(i){S(r);let a=u(3);return I(i&&a.testSelected(i))}),d(),E(2,"bkd-test-edit-grades",8),Y()}if(t&2){let r=u(2).bkdLet;s(),c("options",r.testOptions)("value",r.selectedTestId)("allowEmpty",!1),s(),c("selectedTest",r.selectedTest)}}function vr(t,n){if(t&1&&(o(0,"a",9),l(1,"async"),o(2,"i",10),m(3,"arrow_right_alt"),d(),o(4,"span",11),m(5),l(6,"translate"),d()()),t&2){let r=u(2).bkdLet,e=u();oe("href",p(1,3,e.buildLinkToRatingOverview()),ke),c("ngClass",M(7,hr,!r.hasTests||!r.selectedTest)),s(5),x(p(6,5,"tests.link-to-rating-overview"))}}function xr(t,n){if(t&1&&(K(0),E(1,"bkd-tests-header",5),f(2,_r,3,4,"ng-container",4)(3,vr,7,9,"a",6),l(4,"async"),Y()),t&2){let r=u().bkdLet,e=u(),i=q(9);s(),c("course",r.course),s(),c("ngIf",r.tests.length>0)("ngIfElse",i),s(),c("ngIf",p(4,4,e.state.canSetFinalGrade$))}}function br(t,n){if(t&1&&(K(0),f(1,xr,5,6,"ng-container",4),l(2,"async"),Y()),t&2){let r=u(),e=q(11);s(),c("ngIf",p(2,2,r.state.loading$)===!1)("ngIfElse",e)}}function Cr(t,n){t&1&&(o(0,"p",12),m(1),l(2,"translate"),d()),t&2&&(s(),x(p(2,1,"tests.no-tests")))}function yr(t,n){t&1&&E(0,"bkd-spinner")}var Ui=(()=>{let n=class n{constructor(e,i,a){this.settings=e,this.state=i,this.translate=a,this.selectTest$=new te,this.testOptions$=this.state.tests$.pipe(b(g=>[{Key:-1,Value:this.translate.instant("tests.grade")},...g.map(k=>({Key:k.Id,Value:k.Designation}))]),W()),this.selectedTestId$=Me(this.selectTest$,this.state.tests$.pipe(ee(1),b(g=>g[0]?.Id))).pipe(W()),this.selectedTest$=this.selectedTestId$.pipe(D(g=>this.state.tests$.pipe(b(k=>k.find(T=>T.Id===g)))),W())}testSelected(e){this.selectTest$.next(e)}buildLinkToRatingOverview(){return this.state.course$.pipe(ee(1),b(e=>this.settings.eventlist.evaluation.replace(":id",String(e.Id))))}};n.\u0275fac=function(i){return new(i||n)(v(he),v(J),v(X))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests-list"]],standalone:!0,features:[y],decls:12,vars:20,consts:[["noTests",""],["loading",""],[1,"bkd-container"],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[3,"course"],["class","rating-overview d-flex justify-content-end pe-3 border-top pt-3",3,"ngClass","href",4,"ngIf"],[1,"tests-dropdown",3,"valueChange","options","value","allowEmpty"],[3,"selectedTest"],[1,"rating-overview","d-flex","justify-content-end","pe-3","border-top","pt-3",3,"ngClass","href"],[1,"material-icons","fw-bold"],[1,"ps-1"],[1,"mt-3","px-3"]],template:function(i,a){i&1&&(o(0,"div",2),f(1,br,3,4,"ng-container",3),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),f(8,Cr,3,3,"ng-template",null,0,re)(10,yr,1,0,"ng-template",null,1,re),d()),i&2&&(s(),c("bkdLet",xt(13,fr,p(2,1,a.state.course$),p(3,3,a.state.tests$),p(4,5,a.state.hasTests$),p(5,7,a.testOptions$),p(6,9,a.selectedTestId$),p(7,11,a.selectedTest$))))},dependencies:[Z,B,Hi,ye,Ni,le,Ce,V,w,P],styles:[".tests-dropdown[_ngcontent-%COMP%]{display:block;padding:1rem 0}@media (min-width: 576px){.tests-dropdown[_ngcontent-%COMP%]{display:none}}a.rating-overview[_ngcontent-%COMP%]{text-decoration:none}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}a.rating-overview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}@media (max-width: 575.98px){a.rating-overview[_ngcontent-%COMP%]:not(.visible-on-mobile){display:none!important}}"]});let t=n;return t})();var Qe=(()=>{let n=class n{constructor(e,i){this.state=e,this.route=i,this.courseId$=this.route.paramMap.pipe(b(a=>Number(a.get("id"))),W()),this.destroy$=new te}ngOnInit(){this.courseId$.pipe(ce(this.destroy$)).subscribe(e=>this.state.setCourseId(e))}ngOnDestroy(){this.destroy$.next()}};n.\u0275fac=function(i){return new(i||n)(v(J),v(fe))},n.\u0275cmp=C({type:n,selectors:[["bkd-tests"]],standalone:!0,features:[de([J]),y],decls:1,vars:0,template:function(i,a){i&1&&E(0,"router-outlet")},dependencies:[$e]});let t=n;return t})();var Xo=[{path:"",component:_i,children:[{path:"",component:hi},{path:"current",component:fi},{path:":id",component:Qe,children:[{path:"tests",component:Ui}]},{path:":id/tests/:testId/edit",component:Qe,children:[{path:"",component:Oi}]},{path:":id/tests/add",component:Qe,children:[{path:"",component:Mi}]},{path:":id/tests",children:[ai]}]}];export{Xo as EVENTS_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-73JV7FSB.js b/public/apps/webapp-schulverwaltung/chunk-WIOGFCJH.js similarity index 96% rename from public/apps/webapp-schulverwaltung/chunk-73JV7FSB.js rename to public/apps/webapp-schulverwaltung/chunk-WIOGFCJH.js index 30e3c10d..e470fb08 100644 --- a/public/apps/webapp-schulverwaltung/chunk-73JV7FSB.js +++ b/public/apps/webapp-schulverwaltung/chunk-WIOGFCJH.js @@ -1 +1 @@ -import{a as Cn,b as vn}from"./chunk-JX2LWS6H.js";import{a as me,b as we}from"./chunk-67IXHFR4.js";import{b as bn}from"./chunk-IA3IH2MK.js";import{a as yn}from"./chunk-3V5HHMRH.js";import{a as Pn,b as xn}from"./chunk-ZK2M6PDV.js";import{a as _n}from"./chunk-RC3HL7KB.js";import{e as fn}from"./chunk-KLXFX6SJ.js";import{q as gn,u as Ie}from"./chunk-QHPTZGVN.js";import{a as at}from"./chunk-HHGALFFJ.js";import{b as Jt,e as Ke}from"./chunk-2FIH3FGB.js";import{a as rn}from"./chunk-MVTCHCDH.js";import"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{a as In}from"./chunk-TK3HGFHH.js";import{a as Sn}from"./chunk-TNMAZX5O.js";import{a as pt,d as un}from"./chunk-X2BR3YJG.js";import{a as cn}from"./chunk-LO5XSJLW.js";import{a as an,b as pn}from"./chunk-DMYOU5OM.js";import"./chunk-RWNJF4OZ.js";import{E as en,F as tn,L as nn,P as on,T as Se,U as sn,W as ct,Y as hn,j as Xt,t as Yt,y as Zt,z as We}from"./chunk-GI4AZI25.js";import{d as st,e as K}from"./chunk-Q5U6YZUT.js";import{b as pe}from"./chunk-N6FFLIGM.js";import{a as ae,b as Qe,c as xe,g as ln,h as dn,i as mn}from"./chunk-33NXTXD7.js";import{f as Rt,g as Nt,h as Ue,i as Gt,j as Ut,k as Ht,m as qt,n as Wt,o as Le,p as ce,u as zt,w as qe}from"./chunk-FTRAQKUW.js";import{a as Pe}from"./chunk-3AROKYRB.js";import{$ as L,$a as u,A as ht,Ad as Ee,B as _t,Bb as l,C as nt,Cb as m,Db as U,E as D,Ed as Qt,Fb as _e,G as Fe,Ga as v,Gd as Q,Hd as j,Ia as g,Id as F,J as Ct,Ja as z,Jd as Kt,K as vt,Ka as Pt,L as B,La as Ae,M as it,Mc as jt,N as Ve,Nb as Et,O as T,Q as q,Rb as Dt,Sa as c,Sb as R,Ta as p,Tb as oe,Ua as W,Va as ee,W as A,Wa as te,Wb as re,Wc as H,Xb as Ce,Ya as M,Z as y,Zc as Ft,_a as b,a as ue,ad as Vt,b as ge,bd as ve,cc as ot,cd as be,db as J,e as $,ec as Re,ed as At,f as fe,fb as St,fd as ye,g as Oe,ga as bt,gb as xt,ha as P,hb as It,ia as S,ib as ne,jb as d,k as X,kb as w,la as yt,lb as x,m as f,mb as wt,n as O,nb as Mt,ob as kt,pc as Ne,qc as Bt,r as Te,ra as Z,sb as he,sc as Ge,sd as se,t as ft,tb as E,ua as s,ub as Ot,ud as rt,v as Y,va as _,vb as ie,w as $e,wb as Tt,xb as $t,yb as Lt,zd as He}from"./chunk-T7QWSMKM.js";function wn(n,i){let r=st(n),e=st(i);return+r==+e}function Mn(n,i,r){let e=i.map(o=>({eventId:o,group:n})),t=r.map(o=>e.find(a=>a.eventId===o.eventId)||o);return[...new Set([...t,...e])].filter(o=>o.group!==null)}var ze=(()=>{let i=class i extends nn{};i.\u0275fac=(()=>{let e;return function(o){return(e||(e=yt(i)))(o||i)}})(),i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();function kn(n,i){return[...n].sort(ei(i))}function ei(n){return(i,r)=>{switch(n.primarySortKey){case"name":{let e=i.name.localeCompare(r.name);return n.ascending?e*-1:e}case"group":{let e=(i.detail.Value||"").localeCompare(r.detail.Value||"");return n.ascending?e*-1:e}}}}function On(n,i){return n.map(r=>ti(r,i))}function ti(n,i){return{id:n.IdPerson,name:i.find(r=>r.StudentRef.Id===n.IdPerson)?.StudentFullName||"",group:n.Value,detail:n}}function Tn(n,i){return n.filter(r=>r.VssId===i.subscriptionDetailGroupId)}function lt(n,i){return n.find(r=>r.VssId===i.subscriptionDetailGroupId)}function ni(n,i){if(n&1){let r=M();c(0,"div",5)(1,"input",6),b("change",function(){let t=P(r).$implicit,o=u();return S(o.onSelectionChange(t))}),p(),c(2,"label",7),d(3),p()()}if(n&2){let r=i.$implicit,e=i.index,t=u();s(),J("id","group-",e,""),g("checked",r.id===t.selected.id)("value",r.id),s(),J("for","group-",e,""),s(),x(" ",r.label," ")}}var De=function(n){return n.Select="select",n.Assign="assign",n}(De||{}),$n=(()=>{let i=class i{constructor(e,t){this.activeModal=e,this.translate=t,this.groupOptions=[]}ngOnInit(){this.title=`presence-control.groups.${this.dialogMode}.title`;let e=this.createEmtpyOption();this.groupOptions=this.createGroupOptions(this.subscriptionDetailsDefinitions),this.groupOptions.unshift(e),this.selected=this.groupOptions.find(t=>t.id===this.group)||e}createEmtpyOption(){let e=this.dialogMode===De.Select?"presence-control.groups.all":"presence-control.groups.none";return{id:null,label:this.translate.instant(e)}}createGroupOptions(e){return e.DropdownItems?e.DropdownItems.map(t=>({id:t.Key,label:`${this.translate.instant("presence-control.groups.group")} ${t.Value}`})):[]}getSelectedGroup(){return this.selected}onSelectionChange(e){this.selected=e}};i.\u0275fac=function(t){return new(t||i)(_(ce),_(Q))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-group-dialog"]],inputs:{dialogMode:"dialogMode",subscriptionDetailsDefinitions:"subscriptionDetailsDefinitions",group:"group"},standalone:!0,features:[E],decls:13,vars:10,consts:[[1,"modal-body"],["class","form-check",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[1,"form-check"],["type","radio","name","groups",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),c(4,"form"),v(5,ni,4,7,"div",1),p()(),c(6,"div",2)(7,"button",3),b("click",function(){return o.activeModal.dismiss()}),d(8),l(9,"translate"),p(),c(10,"button",4),b("click",function(){return o.activeModal.close(o.getSelectedGroup())}),d(11),l(12,"translate"),p()()),t&2&&(s(2),x(" ",m(3,4,o.title)," "),s(3),g("ngForOf",o.groupOptions),s(3),x(" ",m(9,6,"presence-control.groups.cancel")," "),s(3),x(" ",m(12,8,"presence-control.groups.save")," "))},dependencies:[se,ye,ve,be,R,F,j]});let n=i;return n})();function Ln(n,i,r,e){return n.map(t=>{let o=i.find(a=>ii(a.presence,t));if(o){let a;return!o.newPresenceTypeId&&t.Comment?a=r.find(h=>h.IsComment)||null:a=r.find(h=>h.Id===o.newPresenceTypeId)||null,ge(ue({},t),{TypeRef:oi(a),Date:null,Type:a?a.Designation:null,ConfirmationStateId:We(a,e)})}return t})}function ii(n,i){return n.LessonRef.Id===i.LessonRef.Id&&n.StudentRef.Id===i.StudentRef.Id}function oi(n){return{Id:n?n.Id:null,HRef:null}}function Xe(n){return i=>i.reduce((r,e)=>r+(e.presenceCategory===n?1:0),0)}function En(){return n=>n.reduce((i,r)=>i+(r.precedingAbsences&&r.precedingAbsences.length>0?1:0),0)}var Dn=(()=>{let i=class i extends Qe{constructor(e,t){super(e,t,pt,"LessonTeachers")}loadOtherTeachersLessonAbsences(e,t,o){let a=`${this.baseUrl}/except/${e}/LessonAbsences?expand=LessonRef`;return t&&t.length>0&&(a=a.concat("&filter.StudentRef=;"+t.join(";"))),this.http.get(a,{params:o}).pipe(T(Qt(pt)))}};i.\u0275fac=function(t){return new(t||i)(y(Re),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var Ye=(()=>{let i=class i extends Qe{constructor(e,t){super(e,t,gn,"SubscriptionDetails")}getListForEvent(e){return this.getList({params:{IdEvent:String(e)}})}update(e,t){let o={IdPerson:t.IdPerson,EventId:t.EventId,Value:e};return this.http.put(`${this.baseUrl}/${t.Id}`,o).pipe(f(()=>{}))}};i.\u0275fac=function(t){return new(t||i)(y(Re),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var jn="presence-control-group",de=(()=>{let i=class i{constructor(e,t,o,a,h){this.userSettings=e,this.eventService=t,this.subscriptionDetailsService=o,this.loadingService=a,this.settings=h,this.selectGroup$=new $,this.selectedLesson$=new Oe,this.lessonPresences$=new Oe,this.reloadSubscriptionDetails$=new $,this.defaultGroup=null,this.savedGroup$=this.selectedLesson$.pipe(T(C=>this.userSettings.getPresenceControlGroupView().pipe(f(k=>this.findGroupByLesson(k,C))))),this.group$=Y(this.selectGroup$,this.savedGroup$).pipe(Ve(this.defaultGroup),B(1)),this.loading$=this.loadingService.loading(jn),this.subscriptionDetailsDefinitions$=this.selectedLesson$.pipe(f(C=>C?.getEventIds()||[]),T(C=>Te(C.map(k=>this.eventService.getSubscriptionDetailsDefinitions(k)))),B(1)),this.groupsAvailability$=this.subscriptionDetailsDefinitions$.pipe(f(C=>C.every(k=>lt(k,this.settings))),B(1)),this.subscriptionDetails$=O([this.selectedLesson$,this.groupsAvailability$,this.reloadSubscriptionDetails$.pipe(f(()=>!1),Ve(!0))]).pipe(T(([C,k,N])=>C&&k?this.loadSubscriptionDetailsForLesson(C,N):X([])),f(C=>Tn(C,this.settings)),B(1)),this.subscriptionDetailPersonIds$=O([this.group$,this.subscriptionDetails$]).pipe(f(([C,k])=>k.filter(N=>N.Value===C).map(N=>N.IdPerson)),Ve([]))}selectGroup(e){this.selectGroup$.next(e)}setSelectedLesson(e){this.selectedLesson$.next(e)}setLessonPresences(e){this.lessonPresences$.next(e)}getSubscriptionDetailsDefinitions(){return this.subscriptionDetailsDefinitions$.pipe(f(rt),f(e=>lt(e,this.settings)))}getSubscriptionDetailsForStudents(){return O([this.subscriptionDetails$,this.lessonPresences$]).pipe(f(K(On)))}reloadSubscriptionDetails(){this.reloadSubscriptionDetails$.next(void 0)}loadSubscriptionDetailsForLesson(e,t=!0){return this.loadingService.load(Te(Ee(e.getEventIds()).map(o=>this.subscriptionDetailsService.getListForEvent(o))),t?void 0:jn).pipe(f(rt))}findGroupByLesson(e,t){return e.find(a=>a.eventId===t?.getEventIds()[0])?.group||this.defaultGroup}};i.\u0275fac=function(t){return new(t||i)(y(we),y(yn),y(Ye),y(pe),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();var An=Object.values(me),G=(()=>{let i=class i{constructor(e,t,o,a,h,C,k,N,tt,Me){this.userSettings=e,this.lessonPresencesService=t,this.lessonTeacherService=o,this.presenceTypesService=a,this.groupService=h,this.dropDownItemsService=C,this.loadingService=k,this.storageService=N,this.settings=tt,this.location=Me,this.selectedDateSubject$=new fe(new Date),this.selectedDate$=this.selectedDateSubject$.asObservable().pipe(f(Xt),Fe(He)),this.viewModeSubject$=new $,this.viewMode$=Y(this.viewModeSubject$,this.userSettings.getPresenceControlViewMode().pipe(D(1))),this.lessons$=this.selectedDate$.pipe(T(I=>this.loadLessonsByDate(I)),B(1)),this.selectLessonId$=new $,this.selectLesson$=this.selectLessonId$.pipe(T(I=>this.getLessonById(I))),this.selectedLesson$=O([ln(this.selectLesson$.pipe(Fe((I,ke)=>He(I,ke))),dn(this.settings.lessonPresencesRefreshTime)),this.lessons$]).pipe(f(([I,ke])=>ke.find(Yn=>Yn.id===I.id)?I:null),B(1)),this.studyClassCount$=this.selectedLesson$.pipe(f(I=>I?.lessons.length||0)),this.updateLessonPresences$=new $,this.reloadLessonPresences$=new $,this.lessonPresences$=Y(mn(this.selectedLesson$,this.reloadLessonPresences$).pipe(T(I=>I?this.loadLessonPresencesByLesson(I):X([]))),this.updateLessonPresences$).pipe(B(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(B(1)),this.reloadStudentIdsWithUnconfirmedAbsences$=new $,this.studentIdsWithUnconfirmedAbsences$=Y(this.selectedDate$,this.selectedLesson$.pipe(it(1)),this.reloadStudentIdsWithUnconfirmedAbsences$).pipe(T(()=>this.loadStudentIdsWithUnconfirmedAbsences()),B(1)),this.loading$=this.loadingService.loading$,this.absenceConfirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(B(1)),this.studentIds$=this.lessonPresences$.pipe(f(I=>Ee(I.map(ke=>ke.StudentRef.Id))),B(1)),this.otherTeachersAbsences$=this.studentIds$.pipe(Fe(He),T(I=>I.length>0?this.lessonTeacherService.loadOtherTeachersLessonAbsences(this.getMyself(),I):X([])),B(1)),this.groupsAvailability$=this.groupService.groupsAvailability$,this.presenceControlEntries$=O([this.selectedLesson$,this.lessonPresences$,this.presenceTypes$,this.absenceConfirmationStates$,this.otherTeachersAbsences$]).pipe(f(K(en))),this.presenceControlEntriesByGroup$=O([this.groupService.group$,this.presenceControlEntries$,this.groupService.subscriptionDetailPersonIds$]).pipe(f(K(bn)),B(1)),this.presentCount$=this.presenceControlEntriesByGroup$.pipe(f(Xe("present"))),this.absentCount$=this.presenceControlEntriesByGroup$.pipe(f(Xe("absent"))),this.unapprovedCount$=this.presenceControlEntriesByGroup$.pipe(f(Xe("unapproved"))),this.absentPrecedingCount$=this.presenceControlEntriesByGroup$.pipe(f(En())),this.queryParamsString$=O([this.selectedDate$,this.selectedLesson$,this.viewMode$]).pipe(f(K(this.buildQueryParams.bind(this))),f(pn)),this.destroy$=new $,this.queryParamsString$.pipe(q(this.destroy$)).subscribe(I=>{this.location.replaceState("/presence-control",I),this.confirmBackLinkParams={returnparams:I}}),this.viewMode$.pipe(it(1),T(I=>this.userSettings.savePresenceControlViewMode(I)),q(this.destroy$)).subscribe(),this.selectedLesson$.pipe(q(this.destroy$)).subscribe(I=>{this.groupService.setSelectedLesson(I)}),this.lessonPresences$.pipe(q(this.destroy$)).subscribe(I=>this.groupService.setLessonPresences(I))}ngOnDestroy(){this.destroy$.next()}setDate(e){this.selectedDateSubject$.next(e)}setLessonId(e){this.selectLessonId$.next(e)}setViewMode(e){this.viewModeSubject$.next(e)}updateLessonPresencesTypes(e){O([this.lessonPresences$.pipe(D(1)),this.presenceTypes$.pipe(D(1))]).pipe(f(([t,o])=>Ln(t,e,o,this.settings))).subscribe(t=>this.updateLessonPresences$.next(t))}getNextPresenceType(e){return this.presenceTypes$.pipe(D(1),f(t=>e.getNextPresenceType(t)))}hasUnconfirmedAbsences(e){return this.studentIdsWithUnconfirmedAbsences$.pipe(f(t=>t.includes(e.lessonPresence.StudentRef.Id)))}updateAfterConfirm(){this.reloadLessonPresences$.next(),this.reloadStudentIdsWithUnconfirmedAbsences$.next()}loadLessonPresencesByLesson(e){return this.loadingService.load(this.lessonPresencesService.getListByLessons(e.lessons))}loadLessonsByDate(e){return this.loadingService.load(this.lessonPresencesService.getLessonsByDate(e)).pipe(f(Cn))}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.presenceTypes$)}loadStudentIdsWithUnconfirmedAbsences(){return ft(0,this.settings.unconfirmedAbsencesRefreshTime||-1).pipe(T(()=>this.lessonPresencesService.getListOfUnconfirmed()),f(e=>Ee(e.map(t=>t.StudentRef.Id))))}buildQueryParams(e,t,o){let a={date:Yt(e,"yyyy-MM-dd"),viewMode:o};return t&&(a.lesson=String(t.id)),a}getLessonById(e){let t=String(e);return this.lessons$.pipe(f(o=>t&&o.find(a=>a.id===t)||vn(o)),$e(Boolean))}getMyself(){let e=this.storageService.getPayload();return Number(e?.holder_id||e?.id_person)}};i.\u0275fac=function(t){return new(t||i)(y(we),y(Ke),y(Dn),y(Se),y(de),y(rn),y(pe),y(Kt),y(H),y(Et))},i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();var pi=(n,i,r,e)=>({sortCriteria:n,sortedEntries:i,selection:r,group:e}),li=()=>["/presence-control"];function di(n,i){if(n&1){let r=M();c(0,"div",14),b("click",function(){let t=P(r).$implicit,o=u(2);return S(o.toggleSort(t))}),d(1),l(2,"translate"),c(3,"span",15),d(4),p()()}if(n&2){let r=i.$implicit,e=u().bkdLet,t=u();g("className",r),s(),x(" ",m(2,3,"presence-control.groups.list.header."+r)," "),s(3),w(t.getSortDirectionCharacter(e.sortCriteria,r))}}function mi(n,i){n&1&&W(0,"bkd-spinner",23)}function ui(n,i){if(n&1){let r=M();ee(0),c(1,"div",17)(2,"div",18)(3,"input",19,1),l(5,"async"),b("change",function(){let t=P(r).$implicit,o=u(3);return S(o.selectionService.toggle(t))}),p()(),c(6,"div",20),d(7),p(),c(8,"div",21)(9,"span"),d(10),p(),v(11,mi,1,0,"bkd-spinner",22),l(12,"async"),p()(),te()}if(n&2){let r=i.$implicit,e=u(3);s(3),g("checked",m(5,4,e.selectionService.isSelected$(r))),s(4),x(" ",r.name," "),s(3),w(r.group?r.group:""),s(),g("ngIf",m(12,6,e.groupService.loading$))}}function gi(n,i){if(n&1&&(ee(0),v(1,ui,13,8,"ng-container",16),te()),n&2){let r=u().bkdLet;s(),g("ngForOf",r.sortedEntries)}}function fi(n,i){n&1&&W(0,"bkd-spinner")}function hi(n,i){if(n&1){let r=M();c(0,"div"),W(1,"bkd-backlink",3),l(2,"async"),c(3,"h1"),d(4),l(5,"translate"),p(),c(6,"div",4)(7,"div",5)(8,"span",6),d(9),l(10,"translate"),p(),c(11,"button",7),b("click",function(){P(r);let t=u();return S(t.selectGroup())}),d(12),l(13,"translate"),l(14,"translate"),p()(),c(15,"a",8),b("click",function(){P(r);let t=u();return S(t.assignGroup())}),c(16,"i",9),d(17,"edit"),p()()(),c(18,"div",10)(19,"div",11),v(20,di,5,5,"div",12),p(),v(21,gi,2,1,"ng-container",13),l(22,"async"),v(23,fi,1,0,"ng-template",null,0,_e),p()()}if(n&2){let r=i.bkdLet,e=ne(24),t=u();s(),g("link",Ot(22,li))("params",m(2,10,t.backlinkQueryParams$)),s(3),w(m(5,12,"presence-control.groups.title")),s(5),w(m(10,14,"presence-control.groups.show")),s(3),x(" ",r.group?m(13,16,"presence-control.groups.group")+" "+r.group:m(14,18,"presence-control.groups.all")," "),s(3),z("disabled",r.selection.length===0),s(5),g("ngForOf",t.primarySortKeys),s(),g("ngIf",m(22,20,t.state.loading$)===!1)("ngIfElse",e)}}var Gn=(()=>{let i=class i{constructor(e,t,o,a,h,C,k,N,tt){this.route=e,this.state=t,this.selectionService=o,this.groupService=a,this.userSettings=h,this.subscriptionDetailService=C,this.toastService=k,this.translate=N,this.modalService=tt,this.primarySortKeys=["name","group"],this.backlinkQueryParams$=this.route.queryParams.pipe(f(({returnparams:Me})=>Me),f(an)),this.eventIds$=this.state.selectedLesson$.pipe(f(Me=>Me?.getEventIds()||[])),this.sortCriteriaSubject$=new fe({primarySortKey:"name",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=O([this.groupService.getSubscriptionDetailsForStudents(),this.sortCriteria$]).pipe(f(K(kn))),this.selected=[]}ngOnInit(){this.selectionService.selection$.subscribe(e=>this.selected=e)}selectGroup(){this.openGroupModal(De.Select,this.selectCallback.bind(this))}assignGroup(){this.openGroupModal(De.Assign,this.assignCallback.bind(this))}openGroupModal(e,t){O([this.groupService.getSubscriptionDetailsDefinitions(),this.groupService.group$]).pipe(D(1)).subscribe(([o,a])=>{let h=this.modalService.open($n);h.componentInstance.dialogMode=e,h.componentInstance.subscriptionDetailsDefinitions=o,h.componentInstance.group=a,h.result.then(C=>{t(C)},()=>{})})}selectCallback(e){O([this.eventIds$,this.userSettings.getPresenceControlGroupView()]).pipe(D(1),T(([t,o])=>this.userSettings.savePresenceControlGroupView(Mn(e.id,t,o))),f(()=>e.id)).subscribe(t=>this.groupService.selectGroup(t))}assignCallback(e){Te(this.selected.map(t=>this.subscriptionDetailService.update(e.id,t.detail))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.groupService.reloadSubscriptionDetails(),this.selectionService.clear(),this.toastService.success(this.translate.instant("presence-control.groups.notifications.save-success"))}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}toggleSort(e){this.sortCriteriaSubject$.pipe(D(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}};i.\u0275fac=function(t){return new(t||i)(_(Ne),_(G),_(ze),_(de),_(we),_(Ye),_(Pe),_(Q),_(Ie))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-group"]],standalone:!0,features:[he([ze]),E],decls:5,vars:14,consts:[["loading",""],["checkbox",""],[4,"bkdLet"],[3,"link","params"],[1,"group-header","mb-2","d-flex","justify-content-between"],[1,"d-flex","align-items-baseline"],[1,"ps-3"],["type","button",1,"show","btn","btn-link",3,"click"],["aria-label","edit",1,"btn","btn-primary","btn-icon","me-2",3,"click"],[1,"material-icons"],[1,"group-list"],[1,"group-list-header"],[3,"className","click",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[3,"click","className"],[1,"sort-direction"],[4,"ngFor","ngForOf"],[1,"group-list-entry"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"name","pe-2"],[1,"group","d-flex","justify-content-between"],["class","inline small",4,"ngIf"],[1,"inline","small"]],template:function(t,o){t&1&&(v(0,hi,25,23,"div",2),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async")),t&2&&g("bkdLet",Lt(9,pi,m(1,1,o.sortCriteria$),m(2,3,o.sortedEntries$),m(3,5,o.selectionService.selection$),m(4,7,o.groupService.group$)))},dependencies:[ae,hn,R,oe,xe,re,F,j],styles:['[_nghost-%COMP%]{display:block}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#000;font-weight:300;text-decoration:underline;padding-left:.5rem}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.group-list-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"name group";grid-template-columns:3fr 2fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}.group-list-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name group";grid-template-columns:min-content 3fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.group[_ngcontent-%COMP%]{grid-area:group}@media (max-width: 750px){.group-list[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.group-list-header[_ngcontent-%COMP%]{grid-template-columns:3fr 1fr}.group-list-entry[_ngcontent-%COMP%]{grid-template-columns:min-content 3fr 1fr}}'],changeDetection:0});let n=i;return n})();function _i(n,i){if(n&1){let r=M();c(0,"div",3)(1,"input",4),b("change",function(){let t=P(r).$implicit;return S(t.selected=!t.selected)}),p(),c(2,"label",5)(3,"i"),d(4),p(),c(5,"div",6),d(6),l(7,"date"),l(8,"date"),p()()()}if(n&2){let r=i.$implicit,e=i.index,t=u();s(),J("id","lesson-presence-",e,""),g("checked",r.selected),s(),z("fw-bold",t.isCurrentLesson(r)),J("for","lesson-presence-",e,""),s(),Ae("",r.entry.presenceCategory," material-icons pe-2"),s(),w(r.entry.presenceCategoryIcon),s(2),Mt(" ",U(7,14,r.entry.lessonPresence.LessonDateTimeFrom,"HH:mm"),"\u2013",U(8,17,r.entry.lessonPresence.LessonDateTimeTo,"HH:mm")," ",r.entry.lessonPresence.EventDesignation," ")}}function Ci(n,i){if(n&1){let r=M();c(0,"div",7)(1,"button",8),b("click",function(){P(r);let t=u();return S(t.activeModal.close())}),d(2),l(3,"translate"),p(),c(4,"button",9),b("click",function(){let t=P(r).bkdLet,o=u();return S(o.activeModal.close(t))}),d(5),l(6,"translate"),p()()}if(n&2){let r=i.bkdLet;s(2),x(" ",m(3,3,"presence-control.block-lesson.cancel")," "),s(2),g("disabled",r.length===0),s(),x(" ",m(6,5,"presence-control.block-lesson.save")," ")}}var Un=(()=>{let i=class i{constructor(e){this.activeModal=e,this.blockLessonOptions=[]}ngOnInit(){this.blockLessonOptions=this.buildLessonPresenceOptions()}getSelectedEntries(){return this.blockLessonOptions.filter(({selected:e})=>e).map(({entry:e})=>e)}isCurrentLesson(e){return wn(e.entry.lessonPresence.LessonDateTimeFrom,this.entry.lessonPresence.LessonDateTimeFrom)}buildLessonPresenceOptions(){return this.blockPresenceControlEntries.map(e=>({entry:e,selected:this.entry.confirmationState===e.confirmationState}))}};i.\u0275fac=function(t){return new(t||i)(_(ce))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-block-lesson-component"]],inputs:{entry:"entry",blockPresenceControlEntries:"blockPresenceControlEntries"},standalone:!0,features:[E],decls:7,vars:5,consts:[[1,"modal-body"],["class","form-check",4,"ngFor","ngForOf"],["class","modal-footer",4,"bkdLet"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label","d-flex",3,"for"],[1,"d-block","text-truncate"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),c(4,"form"),v(5,_i,9,20,"div",1),p()(),v(6,Ci,7,7,"div",2)),t&2&&(s(2),x(" ",m(3,3,"presence-control.block-lesson.text")," "),s(3),g("ngForOf",o.blockLessonOptions),s(),g("bkdLet",o.getSelectedEntries()))},dependencies:[se,ye,ve,be,R,ae,Ce,F,j],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.absent[_ngcontent-%COMP%]{color:#ea161f}.present[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_ngcontent-%COMP%]{color:#ffa814}"]});let n=i;return n})();var vi=30;function gt(n){return`blockLesson${n.lessonPresence.Id}`}var Ze=(()=>{let i=class i{constructor(e,t,o,a){this.state=e,this.lessonPresencesService=t,this.loadingService=o,this.settings=a}getBlockLessonPresenceControlEntries(e){return O([this.state.lessons$.pipe(D(1)),this.loadChangeableLessonPresences(e),this.state.presenceTypes$.pipe(D(1)),this.state.absenceConfirmationStates$.pipe(D(1)),this.state.otherTeachersAbsences$.pipe(D(1))]).pipe(f(([t,o,a,h,C])=>this.filterBlockLessonPresences(e,o).map(k=>tn(t.find(N=>N.id===k.LessonRef.Id.toString()),k,a,h,C))))}filterBlockLessonPresences(e,t){return[...t].sort((o,a)=>o.LessonDateTimeFrom>a.LessonDateTimeFrom?1:-1).reduce((o,a)=>{let h=o[o.length-1];return this.isWithinBlockTime(a,h)?(o.push(a),o):o.find(C=>C.Id===e.lessonPresence.Id)?o:[a]},[])}isWithinBlockTime(e,t){return t?e.LessonDateTimeFrom.getTime()-t.LessonDateTimeTo.getTime()<=vi*60*1e3:!0}loadChangeableLessonPresences(e){return O([this.loadLessonPresences(e),this.state.presenceTypes$.pipe(D(1))]).pipe(f(([t,o])=>t.filter(a=>Zt(a,o.find(h=>h.Id===a.TypeRef.Id)||null,this.settings))))}loadLessonPresences(e){return this.loadingService.load(this.lessonPresencesService.getListByDateStudentClass(e.lessonPresence.LessonDateTimeFrom,e.lessonPresence.StudentRef.Id,e.lessonPresence.StudyClassRef.Id??void 0).pipe(f(t=>t.filter(o=>o.TeacherInformation===e.lessonPresence.TeacherInformation))),gt(e))}};i.\u0275fac=function(t){return new(t||i)(y(G),y(Ke),y(pe),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();function yi(n,i){if(n&1&&(c(0,"div"),d(1),l(2,"date"),l(3,"date"),l(4,"addSpace"),p()),n&2){let r=i.$implicit;s(),kt(" ",U(2,5,r.LessonRef.From,"HH:mm"),"\u2013",U(3,8,r.LessonRef.To,"HH:mm")," ",r.LessonRef.EventDesignation,"",U(4,11,":",":")," ",r.Type," ")}}var Hn=(()=>{let i=class i{constructor(e){this.activeModal=e}};i.\u0275fac=function(t){return new(t||i)(_(ce))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-preceding-absence"]],inputs:{precedingAbsences:"precedingAbsences"},standalone:!0,features:[E],decls:9,vars:7,consts:[[1,"modal-body"],[4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),v(4,yi,5,14,"div",1),p(),c(5,"div",2)(6,"button",3),b("click",function(){return o.activeModal.dismiss()}),d(7),l(8,"translate"),p()()),t&2&&(s(2),x(" ",m(3,3,"presence-control.preceding-absence.text")," "),s(2),g("ngForOf",o.precedingAbsences),s(3),x(" ",m(8,5,"presence-control.preceding-absence.cancel")," "))},dependencies:[R,Ce,F,j,un]});let n=i;return n})();var Pi=n=>["student",n,"absences"],Si=n=>["/presence-control/student",n,"absences"];function xi(n,i){if(n&1&&(W(0,"bkd-avatar",9),l(1,"async")),n&2){let r=u();g("studentId",m(1,3,r.studentId$))("link",ie(5,Si,r.entry.lessonPresence.StudentRef.Id.toString()))("linkParams",r.profileReturnParams)}}function Ii(n,i){if(n&1&&(c(0,"span"),d(1),p()),n&2){let r=u(2);s(),w(r.entry.presenceType==null?null:r.entry.presenceType.Designation)}}function wi(n,i){if(n&1){let r=M();c(0,"button",10),b("click",function(){P(r);let t=u();return S(t.updatePresenceType(t.entry))}),v(1,Ii,2,1,"span",11),p()}if(n&2){let r=u();s(),g("ngIf",!(r.entry.presenceType!=null&&r.entry.presenceType.IsIncident))}}function Mi(n,i){n&1&&W(0,"bkd-spinner",16)}function ki(n,i){if(n&1){let r=M();c(0,"button",12),b("click",function(){P(r);let t=u();return S(t.updatePresenceType(t.entry))}),c(1,"div",13)(2,"i",14),d(3),p(),v(4,Mi,1,0,"bkd-spinner",15),p()()}if(n&2){let r=i.bkdLet,e=u();g("disabled",r),s(2),z("invisible",r),s(),w(e.entry.presenceCategoryIcon),s(),g("ngIf",r)}}function Oi(n,i){if(n&1){let r=M();c(0,"button",17),b("click",function(){P(r);let t=u();return S(t.showPrecedingAbsences(t.entry))}),c(1,"i",18),d(2,"info"),p()()}}function Ti(n,i){if(n&1&&(c(0,"span",19),d(1),p()),n&2){let r=u();s(),x(" ",r.entry.lessonPresence.StudyClassNumber," ")}}function $i(n,i){if(n&1){let r=M();c(0,"a",20),b("click",function(){P(r);let t=u();return S(t.updateIncident(t.entry))}),c(1,"i",14),d(2,"edit"),p(),c(3,"span"),d(4),l(5,"translate"),p()()}if(n&2){let r=u();s(4),w(m(5,1,(r.entry.presenceType==null?null:r.entry.presenceType.IsIncident)&&(r.entry.presenceType==null?null:r.entry.presenceType.Designation)||"presence-control.entry.incident"))}}var qn=(()=>{let i=class i{get classNames(){return[this.entry.presenceCategory,this.viewMode].join(" ")}constructor(e,t,o,a){this.toastService=e,this.translate=t,this.modalService=o,this.loadingService=a,this.hasUnconfirmedAbsences=!1,this.showClassName=!1,this.togglePresenceType=new Z,this.changeIncident=new Z,this.entry$=new Oe(1),this.studentId$=this.entry$.pipe(f(({lessonPresence:h})=>h.StudentRef.Id)),this.loading$=this.entry$.pipe(T(h=>this.loadingService.loading(gt(h))))}ngOnChanges(e){e.entry&&this.entry$.next(e.entry.currentValue)}get isListViewMode(){return this.viewMode===me.List}updatePresenceType(e){e.canChangePresenceType?this.togglePresenceType.emit(e):this.toastService.warning(this.translate.instant("presence-control.entry.update-warning"))}updateIncident(e){e.canChangeIncident&&this.changeIncident.emit(e)}showPrecedingAbsences(e){let t=this.modalService.open(Hn);t.componentInstance.precedingAbsences=e.precedingAbsences}};i.\u0275fac=function(t){return new(t||i)(_(Pe),_(Q),_(Ie),_(pe))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-entry"]],hostVars:2,hostBindings:function(t,o){t&2&&Pt(o.classNames)},inputs:{entry:"entry",hasUnconfirmedAbsences:"hasUnconfirmedAbsences",viewMode:"viewMode",showClassName:"showClassName",profileReturnParams:"profileReturnParams"},outputs:{togglePresenceType:"togglePresenceType",changeIncident:"changeIncident"},standalone:!0,features:[bt,E],decls:13,vars:16,consts:[["class","avatar large",3,"studentId","link","linkParams",4,"ngIf"],["type","button","class","presence-category designation btn btn-link",3,"click",4,"ngIf"],["type","button","class","presence-category status btn btn-link",3,"disabled","click",4,"bkdLet"],["type","button","class","previously-absent d-flex btn btn-link",3,"click",4,"ngIf"],[1,"student-info",3,"routerLink","queryParams"],[1,"student-name","text-truncate"],["class","study-class text-truncate",4,"ngIf"],[1,"unconfirmed-absences"],["class","incident btn btn-link",3,"click",4,"ngIf"],[1,"avatar","large",3,"studentId","link","linkParams"],["type","button",1,"presence-category","designation","btn","btn-link",3,"click"],[4,"ngIf"],["type","button",1,"presence-category","status","btn","btn-link",3,"click","disabled"],[1,"position-relative"],[1,"material-icons"],["class","inline small",4,"ngIf"],[1,"inline","small"],["type","button",1,"previously-absent","d-flex","btn","btn-link",3,"click"],[1,"material-icons-outlined"],[1,"study-class","text-truncate"],[1,"incident","btn","btn-link",3,"click"]],template:function(t,o){t&1&&(v(0,xi,2,7,"bkd-avatar",0)(1,wi,2,1,"button",1)(2,ki,5,5,"button",2),l(3,"async"),v(4,Oi,3,0,"button",3),c(5,"a",4)(6,"span",5),d(7),p(),v(8,Ti,2,1,"span",6),c(9,"span",7),d(10),l(11,"translate"),p()(),v(12,$i,6,3,"a",8)),t&2&&(g("ngIf",!o.isListViewMode),s(),g("ngIf",o.entry.showDesignation),s(),g("bkdLet",m(3,10,o.loading$)),s(2),g("ngIf",(o.entry.precedingAbsences==null?null:o.entry.precedingAbsences.length)||!1),s(),g("routerLink",ie(14,Pi,o.entry.lessonPresence.StudentRef.Id))("queryParams",o.profileReturnParams),s(2),w(o.entry.lessonPresence.StudentFullName),s(),g("ngIf",o.isListViewMode&&o.showClassName),s(2),x(" ",o.hasUnconfirmedAbsences?m(11,12,"presence-control.entry.unconfirmed-absences"):""," "),s(2),g("ngIf",o.entry.canChangeIncident))},dependencies:[oe,fn,ae,xe,Ge,re,F,j],styles:['[_nghost-%COMP%]{padding:2rem 1rem;background-color:#fff;display:grid;grid-template-areas:"avatar status designation previously-absent" "avatar student-info student-info student-info" "avatar incident incident incident";grid-template-columns:min-content min-content 3fr min-content}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{align-self:center}.presence-category[_ngcontent-%COMP%]{text-decoration:none}.presence-category[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:.1875rem}.absent[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ea161f}.present[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ffa814}.presence-category[_ngcontent-%COMP%] bkd-spinner[_ngcontent-%COMP%]{color:#000;position:absolute;top:4px;left:5px}.designation[_ngcontent-%COMP%], .student-info[_ngcontent-%COMP%], a.incident[_ngcontent-%COMP%], .incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.status[_ngcontent-%COMP%]{grid-area:status}.status[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:2rem}.designation[_ngcontent-%COMP%]{grid-area:designation;text-align:left;line-height:2.375rem}.previously-absent[_ngcontent-%COMP%]{grid-area:previously-absent;text-decoration:none;color:#00000080;justify-self:end}.student-info[_ngcontent-%COMP%]{grid-area:student-info;display:flex;flex-direction:column;text-decoration:none}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{text-decoration:underline}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.unconfirmed-absences[_ngcontent-%COMP%]{color:#ea161f;font-size:.875rem;line-height:1}.study-class[_ngcontent-%COMP%]{font-size:.875rem;line-height:1}.incident[_ngcontent-%COMP%]{color:#00000080;padding-right:1.5rem;grid-area:incident;display:flex;text-decoration:none}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.incident[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.3em}.grid[_nghost-%COMP%] .status[_ngcontent-%COMP%], .grid[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{align-self:start;margin-left:-1.5rem;margin-top:-.375rem}.grid[_nghost-%COMP%] .incident[_ngcontent-%COMP%]{align-self:end;margin-left:-1.5rem;margin-bottom:-.375rem}.grid[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0;align-self:start}.grid[_nghost-%COMP%] .unconfirmed-absences[_ngcontent-%COMP%]{height:.875rem}.list[_nghost-%COMP%]{grid-template-areas:"student-info status incidentordesignation previously-absent";grid-template-columns:3fr min-content 4fr 3em;padding:.5rem 1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{justify-self:start}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{line-height:1;margin-bottom:.5rem}.list[_nghost-%COMP%] .incident[_ngcontent-%COMP%], .list[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{grid-area:incidentordesignation}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0}@media (max-width: 750px){.list[_nghost-%COMP%]{grid-template-areas:"student-info student-info student-info previously-absent" "status incidentordesignation incidentordesignation incidentordesignation";grid-template-columns:min-content 1fr 1fr min-content;row-gap:1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{margin-top:.5rem}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{align-self:start}}']});let n=i;return n})();var Li=(n,i)=>({"btn-link":n,"btn-danger":i}),Ei=n=>["groups",n],Di=n=>({returnparams:n});function Bi(n,i){if(n&1){let r=M();c(0,"div",22),b("click",function(){P(r);let t=u();return S(t.lessonDropdown==null?null:t.lessonDropdown.toggle())}),d(1),l(2,"date"),c(3,"span",23),d(4),l(5,"date"),p()()}if(n&2){let r=u();s(),x(" ",U(2,2,r.selectedLesson.LessonDateTimeFrom,"HH:mm"),"\u2013"),s(3),w(U(5,5,r.selectedLesson.LessonDateTimeTo,"HH:mm"))}}function ji(n,i){if(n&1){let r=M();c(0,"div",29),b("click",function(){let t=P(r).$implicit,o=u(2);return S(o.selectLessonChange.emit(t))}),c(1,"div",30)(2,"div"),d(3),l(4,"date"),l(5,"date"),p(),c(6,"div",26),d(7),p(),c(8,"div",26),d(9),p()()()}if(n&2){let r=i.$implicit,e=u(2);z("active",r.id===e.selectedLesson.id),s(3),wt(" ",U(4,6,r.LessonDateTimeFrom,"HH:mm"),"\u2013",U(5,9,r.LessonDateTimeTo,"HH:mm")," "),s(4),w(r.eventDesignations),s(2),w(r.studyClassNumbers)}}function Fi(n,i){if(n&1&&(c(0,"div",24)(1,"div",25)(2,"div",26),d(3),p(),c(4,"div",26),d(5),p()(),c(6,"div",27),v(7,ji,10,12,"div",28),p()()),n&2){let r=u();s(3),w(r.selectedLesson.eventDesignations),s(2),w(r.selectedLesson.studyClassNumbers),s(2),g("ngForOf",r.lessons)}}function Vi(n,i){if(n&1){let r=M();c(0,"bkd-caret",31),b("click",function(){P(r);let t=u();return S(t.lessonDropdown==null?null:t.lessonDropdown.toggle())}),p()}if(n&2){let r=u();g("expanded",(r.lessonDropdown==null?null:r.lessonDropdown.isOpen())||!1)}}function Ai(n,i){if(n&1&&(c(0,"a",32),l(1,"async"),l(2,"async"),l(3,"async"),c(4,"i",33),d(5,"groups"),p()()),n&2){let r=u();g("ngClass",Tt(9,Li,m(1,3,r.isGroupSelected$)===!1,m(2,5,r.isGroupSelected$)))("routerLink",ie(12,Ei,r.selectedLesson.id))("queryParams",ie(14,Di,m(3,7,r.state.queryParamsString$)))}}function Ri(n,i){if(n&1){let r=M();c(0,"button",34),b("click",function(){let t=P(r).$implicit,o=u();return S(o.viewModeChange.emit(t.viewMode))}),c(1,"i",33),d(2),p()()}if(n&2){let r=i.$implicit,e=u();z("btn-outline-secondary",r.viewMode===e.viewMode)("btn-link",r.viewMode!==e.viewMode)("active",r.viewMode===e.viewMode),g("disabled",!e.selectedLesson),s(2),w(r.icon)}}var Ni=Le.prototype._positionMenu;Le.prototype._positionMenu=function(...i){let r=Ni.apply(this,i);if(this._anchor.nativeElement.id==="lesson-dropdown"){let e=this._bodyContainer||this._menu.nativeElement,t=e.style.transform?.match(/translate\(([0-9-.]+)px, ([0-9-.]+)px\)/);t&&parseFloat(t[1])<0&&(e.style.transform=`translate(0px, ${t[2]}px)`)}return r};var Wn=(()=>{let i=class i{constructor(e,t,o){this.state=e,this.groupService=t,this.presentCount=null,this.absentCount=null,this.unapprovedCount=null,this.absentPrecedingCount=null,this.search="",this.selectLessonChange=new Z,this.selectDateChange=new Z,this.searchChange=new Z,this.viewModeChange=new Z,this.viewModeOptions=[{viewMode:me.List,icon:"list"},{viewMode:me.Grid,icon:"view_module"}],this.isGroupSelected$=this.groupService.group$.pipe(f(zt)),o.popperOptions=a=>ge(ue({},a),{modifiers:a.modifiers?.map(h=>(h.name==="offset"&&(h.options={offset:({placement:C,reference:k,popper:N})=>C==="bottom-start"?[(window.innerWidth-N.width)/2-k.x,0]:[]}),h))})}};i.\u0275fac=function(t){return new(t||i)(_(G),_(de),_(Ue))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-header"]],viewQuery:function(t,o){if(t&1&&St(Le,5),t&2){let a;xt(a=It())&&(o.lessonDropdown=a.first)}},inputs:{selectedLesson:"selectedLesson",lessons:"lessons",presentCount:"presentCount",absentCount:"absentCount",unapprovedCount:"unapprovedCount",absentPrecedingCount:"absentPrecedingCount",viewMode:"viewMode",selectDate:"selectDate",search:"search"},outputs:{selectLessonChange:"selectLessonChange",selectDateChange:"selectDateChange",searchChange:"searchChange",viewModeChange:"viewModeChange"},standalone:!0,features:[he([Ue,{provide:Rt,useClass:Ut},{provide:Nt,useClass:Sn}]),E],decls:40,vars:20,consts:[["d","ngbDatepicker"],[1,"navigation"],[1,"lesson-date"],["type","button",1,"btn","btn-link",3,"click"],[1,"material-icons"],["positionTarget",".lesson-date-input","ngbDatepicker","","placement","bottom-start",1,"lesson-date-input",3,"ngModelChange","ngModel"],["class","lesson-time",3,"click",4,"ngIf"],["ngbDropdown","","class","lesson-description","container","body","display","dynamic","placement","bottom",4,"ngIf"],["class","dropdown-caret",3,"expanded","click",4,"ngIf"],[1,"states"],[1,"state","present"],[1,"count"],[1,"state","absent"],[1,"state","unapproved"],[1,"state","previously-absent"],[1,"material-icons-outlined"],[1,"search-and-views"],[1,"search",3,"valueChange","value","disabled","placeholder","label"],[1,"group-and-views","d-flex","align-items-center"],["type","button","class","group btn me-2 me-sm-4",3,"ngClass","routerLink","queryParams",4,"ngIf"],[1,"views"],["type","button","class","view btn btn-primary btn-icon",3,"disabled","btn-outline-secondary","btn-link","active","click",4,"ngFor","ngForOf"],[1,"lesson-time",3,"click"],[1,"lesson-time-to"],["ngbDropdown","","container","body","display","dynamic","placement","bottom",1,"lesson-description"],["id","lesson-dropdown","ngbDropdownToggle",""],[1,"text-truncate"],["ngbDropdownMenu","","aria-labelledby","lesson-dropdown"],["ngbDropdownItem","",3,"active","click",4,"ngFor","ngForOf"],["ngbDropdownItem","",3,"click"],[1,"lesson-entry"],[1,"dropdown-caret",3,"click","expanded"],["type","button",1,"group","btn","me-2","me-sm-4",3,"ngClass","routerLink","queryParams"],[1,"material-icons","align-middle"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"click","disabled"]],template:function(t,o){if(t&1){let a=M();c(0,"div",1)(1,"div",2)(2,"button",3),b("click",function(){P(a);let C=ne(6);return S(C.toggle())}),c(3,"i",4),d(4,"calendar_today"),p()(),c(5,"input",5,0),b("ngModelChange",function(C){return P(a),S(o.selectDateChange.emit(C))}),p()(),v(7,Bi,6,8,"div",6)(8,Fi,8,3,"div",7)(9,Vi,1,1,"bkd-caret",8),p(),c(10,"div",9)(11,"div",10)(12,"i",4),d(13,"check_circle"),p(),c(14,"span",11),d(15),p()(),c(16,"div",12)(17,"i",4),d(18,"cancel"),p(),c(19,"span",11),d(20),p()(),c(21,"div",13)(22,"i",4),d(23,"help"),p(),c(24,"span",11),d(25),p()(),c(26,"div",14)(27,"i",15),d(28,"info"),p(),c(29,"span",11),d(30),p()()(),c(31,"div",16)(32,"bkd-resettable-input",17),l(33,"translate"),l(34,"translate"),b("valueChange",function(C){return P(a),S(o.searchChange.emit(C))}),p(),c(35,"div",18),v(36,Ai,6,16,"a",19),l(37,"async"),c(38,"div",20),v(39,Ri,3,8,"button",21),p()()()}t&2&&(s(5),g("ngModel",o.selectDate),s(2),g("ngIf",o.selectedLesson),s(),g("ngIf",o.selectedLesson),s(),g("ngIf",o.lessons.length>0),s(6),w(o.presentCount!==null?o.presentCount:"?"),s(5),w(o.absentCount!==null?o.absentCount:"?"),s(5),w(o.unapprovedCount!==null?o.unapprovedCount:"?"),s(5),w(o.absentPrecedingCount!==null?o.absentPrecedingCount:"?"),s(2),g("value",o.search)("disabled",!o.selectedLesson)("placeholder",m(33,14,"presence-control.header.search-by-name"))("label",m(34,16,"presence-control.header.search")),s(4),g("ngIf",m(37,18,o.selectedLesson&&o.state.groupsAvailability$)),s(3),g("ngForOf",o.viewModeOptions))},dependencies:[Gt,se,Ft,Vt,At,oe,Le,Wt,qt,R,Ht,cn,xn,Dt,Ge,re,Ce,F,j],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;padding:.75rem 0}.navigation[_ngcontent-%COMP%]{display:grid;grid-template-areas:". date time dropdown-caret" ". description description dropdown-caret";grid-template-columns:1fr auto auto 1fr;align-items:center}.lesson-date[_ngcontent-%COMP%]{grid-area:date;justify-self:end;display:flex;align-items:center;justify-content:flex-end}.lesson-date[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 .5ch 0 0}.lesson-date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#000;position:relative}.lesson-date-input[_ngcontent-%COMP%]{font-weight:600;background:transparent;border:none;width:11ch}.lesson-time[_ngcontent-%COMP%]{grid-area:time;cursor:pointer}.lesson-description[_ngcontent-%COMP%]{grid-area:description;overflow:hidden;text-align:center;cursor:pointer}.dropdown-toggle[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.dropdown-caret[_ngcontent-%COMP%]{grid-area:dropdown-caret;line-height:100%;text-align:left;color:#000}.dropdown-menu[_ngcontent-%COMP%]{width:50ch;padding:0;box-shadow:2px 2px 3px -1px #0003}@media (max-width: 800px){.dropdown-menu[_ngcontent-%COMP%]{width:100vw}}.dropdown-item[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6}.states[_ngcontent-%COMP%]{margin:.75rem 0;display:flex;justify-content:center}.state[_ngcontent-%COMP%]{margin-right:7%;display:flex}.state[_ngcontent-%COMP%]:last-child{margin-right:0}@media (min-width: 1000px){.state[_ngcontent-%COMP%]{margin-right:4rem}}.state.present[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#3d8608}.state.absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ea161f}.state.unapproved[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ffa814}.state.previously-absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#00000080}.state[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{margin-left:.3em;margin-top:1px}.search-and-views[_ngcontent-%COMP%]{padding-top:.75rem;display:flex;justify-content:space-between;border-top:1px solid #dee2e6}.search[_ngcontent-%COMP%]{flex:auto;max-width:300px;margin-right:1rem}.views[_ngcontent-%COMP%]{display:flex}.view[_ngcontent-%COMP%]{color:#4e4e4ef2;background-color:#fff}.view.active[_ngcontent-%COMP%]{color:#fff;background-color:#4e4e4ef2;border:none}.group[_ngcontent-%COMP%], .view[_ngcontent-%COMP%]{text-decoration:none;padding-left:0;padding-right:0;aspect-ratio:1/1;width:calc(.75rem + 2 * var(--bs-border-width) + 1.625rem);border-radius:50%}.group.btn-link[_ngcontent-%COMP%]{color:#000}@media (max-width: 380px){[_nghost-%COMP%]{padding-left:.5rem;padding-right:.5rem}#search-addon[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem}}@media (max-width: 365px){.lesson-time[_ngcontent-%COMP%]{line-height:1}.lesson-time-to[_ngcontent-%COMP%]{display:block}.dropdown-caret[_ngcontent-%COMP%]{padding-left:0}}']});let n=i;return n})();function Gi(n,i){if(n&1){let r=M();c(0,"div",5)(1,"input",6),b("change",function(){let t=P(r).$implicit,o=u();return S(o.onSelectionChange(t))}),p(),c(2,"label",7),d(3),p()()}if(n&2){let r=i.$implicit,e=i.index,t=u();s(),J("id","incident-",e,""),g("checked",r.id===t.selected.id)("value",r.id),s(),J("for","incident-",e,""),s(),x(" ",r.label," ")}}var Qn=(()=>{let i=class i{constructor(e,t){this.activeModal=e,this.translate=t,this.incidentOptions=[]}ngOnInit(){let e=this.createIncidentOption();this.incidentOptions=this.incidentTypes.map(t=>this.createIncidentOption(t)),this.incidentOptions.unshift(e),this.selected=this.incidentOptions.find(t=>t.id===this.incident?.Id)||e}createIncidentOption(e){return{id:e?e.Id:null,label:e?e.Designation:this.translate.instant("presence-control.incident.no-incident")}}onSelectionChange(e){this.selected=e}getSelectedIncident(){return this.incidentTypes.find(e=>e.Id===this.selected?.id)||null}};i.\u0275fac=function(t){return new(t||i)(_(ce),_(Q))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-incident"]],inputs:{incident:"incident",incidentTypes:"incidentTypes"},standalone:!0,features:[E],decls:13,vars:10,consts:[[1,"modal-body"],["class","form-check",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[1,"form-check"],["type","radio","name","incident",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),c(4,"form"),v(5,Gi,4,7,"div",1),p()(),c(6,"div",2)(7,"button",3),b("click",function(){return o.activeModal.dismiss()}),d(8),l(9,"translate"),p(),c(10,"button",4),b("click",function(){return o.activeModal.close(o.getSelectedIncident())}),d(11),l(12,"translate"),p()()),t&2&&(s(2),x(" ",m(3,4,"presence-control.incident.text")," "),s(3),g("ngForOf",o.incidentOptions),s(3),x(" ",m(9,6,"presence-control.incident.cancel")," "),s(3),x(" ",m(12,8,"presence-control.incident.save")," "))},dependencies:[se,ye,ve,be,R,F,j],styles:["form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #dee2e6;padding-bottom:1rem;margin-bottom:1rem}"]});let n=i;return n})();var Ui=20,Hi=100,je=function(n){return n.AddUpdateAction="ADD",n.RemoveUpdateAction="REMOVE",n}(je||{}),et=(()=>{let i=class i{constructor(e,t,o,a,h){this.toastService=e,this.translate=t,this.restService=o,this.presenceTypesService=a,this.settings=h,this.destroy$=new $,this.action$=new $,this.pendingUpdates$=this.action$.pipe(Ct(this.reduceUpdates.bind(this),[]),vt()),this.revertUpdates$=new $,this.performUpdates$=this.pendingUpdates$.pipe(nt(Hi),$e(qe(ct)),_t(this.performUpdates.bind(this))),this.stateUpdates$=Y(this.pendingUpdates$,this.revertUpdates$).pipe(nt(Ui),$e(qe(ct))),this.performUpdates$.pipe(q(this.destroy$)).subscribe()}ngOnDestroy(){this.destroy$.next()}updatePresenceType(e,t=null){this.dispatchAddUpdate(e.lessonPresence,t)}performUpdates(e){let t=this.groupUpdates(e);return O(Object.keys(t).reduce((o,a)=>{let h=t[a];return Object.keys(h).forEach(C=>{let k=h[C];o.push(this.performUpdateForGroup(k))}),o},[])).pipe(f(()=>t))}performUpdateForGroup(e){return e.forEach(t=>this.dispatchRemoveUpdate(t.presence)),this.performLessonPresencesUpdatesByIds(e[0].presence.LessonRef.Id,e.map(t=>t.presence.StudentRef.Id),e[0].newPresenceTypeId).pipe(ht(t=>this.revertUpdatesAfterError(e,t)))}performLessonPresencesUpdatesByIds(e,t,o=null){return o?(o?this.presenceTypesService.getPresenceType(o):X(null)).pipe(T(h=>this.restService.editLessonPresences([e],t,h?.Id,We(h,this.settings)||void 0,{context:new ot().set(at,{disableErrorHandling:!0})}))):this.restService.removeLessonPresences([e],t,{context:new ot().set(at,{disableErrorHandling:!0})})}revertUpdatesAfterError(e,t){return console.error("Bulk-update of lesson presences failed"),console.error(t),this.toastService.error(this.translate.instant("shared.lesson-presences-update.error")),this.revertUpdates$.next(e.map(o=>ge(ue({},o),{newPresenceTypeId:o.presence.TypeRef.Id}))),X(void 0)}groupUpdates(e){return e.reduce((t,o)=>{let a=String(o.newPresenceTypeId&&o.newPresenceTypeId);return t[a]||(t[a]={}),Array.isArray(t[a][o.presence.LessonRef.Id])||(t[a][o.presence.LessonRef.Id]=[]),t[a][o.presence.LessonRef.Id].push(o),t},{})}reduceUpdates(e,t){switch(t.type){case je.AddUpdateAction:{let{presence:o,newPresenceTypeId:a}=t.payload,h=e.findIndex(Kn(o));return h===-1?[...e,{presence:o,newPresenceTypeId:a}]:[...e.slice(0,h),{presence:e[h].presence,newPresenceTypeId:a},...e.slice(h+1)]}case je.RemoveUpdateAction:return e.filter(qe(Kn(t.payload)));default:return e}}dispatchAddUpdate(e,t){this.action$.next({type:je.AddUpdateAction,payload:{presence:e,newPresenceTypeId:t}})}dispatchRemoveUpdate(e){this.action$.next({type:je.RemoveUpdateAction,payload:e})}};i.\u0275fac=function(t){return new(t||i)(y(Pe),y(Q),y(sn),y(Se),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();function Kn(n){return i=>i.presence.LessonRef.Id===n.LessonRef.Id&&i.presence.StudentRef.Id===n.StudentRef.Id}var qi=(n,i,r)=>({lesson:n,lessons:i,entries:r}),Wi=n=>({returnparams:n});function Qi(n,i){if(n&1){let r=M();c(0,"bkd-presence-control-entry",7),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),b("togglePresenceType",function(t){P(r);let o=u(5);return S(o.togglePresenceType(t))})("changeIncident",function(t){P(r);let o=u(5);return S(o.changeIncident(t))}),p()}if(n&2){let r,e=i.$implicit,t=u(5);g("entry",e)("hasUnconfirmedAbsences",m(1,5,t.state.hasUnconfirmedAbsences(e)))("viewMode",m(2,7,t.state.viewMode$))("showClassName",((r=m(3,9,t.state.studyClassCount$))!==null&&r!==void 0?r:0)>1)("profileReturnParams",ie(13,Wi,m(4,11,t.state.queryParamsString$)))}}function Ki(n,i){if(n&1&&(ee(0),c(1,"div"),l(2,"async"),v(3,Qi,5,15,"bkd-presence-control-entry",6),p(),te()),n&2){let r=u(3).bkdLet,e=u();s(),Ae("default-entries entries view-mode-",m(2,4,e.state.viewMode$),""),s(2),g("ngForOf",r.entries)}}function zi(n,i){n&1&&(c(0,"p",8),d(1),l(2,"translate"),p()),n&2&&(s(),x(" ",m(2,1,"presence-control.no-lesson-presences")," "))}function Ji(n,i){if(n&1&&(ee(0),v(1,Ki,4,6,"ng-container",4)(2,zi,3,3,"ng-template",null,2,_e),te()),n&2){let r=ne(3),e=u(2).bkdLet;s(),g("ngIf",(e.entries==null?null:e.entries.length)>0)("ngIfElse",r)}}function Xi(n,i){n&1&&(c(0,"p",8),d(1),l(2,"translate"),p()),n&2&&(s(),w(m(2,1,"presence-control.no-lessons")))}function Yi(n,i){if(n&1){let r=M();ee(0),c(1,"bkd-presence-control-header",5),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),l(8,"async"),b("searchChange",function(t){P(r);let o=u(2);return S(o.search$.next(t))})("viewModeChange",function(t){P(r);let o=u(2);return S(o.state.setViewMode(t))})("selectDateChange",function(t){P(r);let o=u(2);return S(o.state.setDate(t))})("selectLessonChange",function(t){P(r);let o=u(2);return S(o.state.setLessonId(t.id))}),p(),v(9,Ji,4,2,"ng-container",4)(10,Xi,3,3,"ng-template",null,1,_e),te()}if(n&2){let r=ne(11),e=u().bkdLet,t=u();s(),g("selectedLesson",e.lesson)("lessons",e.lessons)("presentCount",m(2,11,t.state.presentCount$))("absentCount",m(3,13,t.state.absentCount$))("unapprovedCount",m(4,15,t.state.unapprovedCount$))("absentPrecedingCount",m(5,17,t.state.absentPrecedingCount$))("viewMode",m(6,19,t.state.viewMode$))("selectDate",m(7,21,t.state.selectedDate$))("search",m(8,23,t.search$)),s(8),g("ngIf",e.lesson)("ngIfElse",r)}}function Zi(n,i){n&1&&W(0,"bkd-spinner")}function eo(n,i){if(n&1&&(ee(0),v(1,Yi,12,25,"ng-container",4),l(2,"async"),v(3,Zi,1,0,"ng-template",null,0,_e),te()),n&2){let r=ne(4),e=u();s(),g("ngIf",m(2,2,e.state.loading$)===!1)("ngIfElse",r)}}var Jn=(()=>{let i=class i{constructor(e,t,o,a,h,C,k){this.state=e,this.blockLessons=t,this.lessonPresencesUpdateService=o,this.presenceTypesService=a,this.modalService=h,this.scrollPosition=C,this.route=k,this.search$=new fe(""),this.entries$=O([this.state.presenceControlEntriesByGroup$,this.search$]).pipe(f(K(Pn)),B(1)),this.destroy$=new $}ngOnInit(){this.route.queryParams.pipe(q(this.destroy$)).subscribe(this.restoreStateFromParams.bind(this))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}doTogglePresenceType(e){e.forEach(t=>this.state.getNextPresenceType(t).subscribe(o=>this.lessonPresencesUpdateService.updatePresenceType(t,o?o.Id:null)))}togglePresenceType(e){this.blockLessons.getBlockLessonPresenceControlEntries(e).pipe(D(1)).subscribe(t=>{if(t.length===1){let o=t[0];this.doTogglePresenceType([o])}else{let o=this.modalService.open(Un);o.componentInstance.entry=e,o.componentInstance.blockPresenceControlEntries=t,o.result.then(a=>{a&&this.doTogglePresenceType(a)},()=>{})}})}updateIncident(e,t){this.lessonPresencesUpdateService.updatePresenceType(e,t)}changeIncident(e){this.presenceTypesService.incidentTypes$.subscribe(t=>{let o=this.modalService.open(Qn);o.componentInstance.incident=t.find(a=>a.Id===e.presenceType?.Id)||null,o.componentInstance.incidentTypes=t,o.result.then(a=>{this.updateIncident(e,a?.Id||null)},()=>{})})}restoreStateFromParams(e){e.date&&this.state.setDate(jt(e.date));let t=String(e.lesson);t&&this.state.setLessonId(t),e.viewMode&&An.includes(e.viewMode)&&this.state.setViewMode(e.viewMode)}};i.\u0275fac=function(t){return new(t||i)(_(G),_(Ze),_(et),_(Se),_(Ie),_(In),_(Ne))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-list"]],standalone:!0,features:[E],decls:7,vars:14,consts:[["loading",""],["noLessons",""],["noLessonPresences",""],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[3,"searchChange","viewModeChange","selectDateChange","selectLessonChange","selectedLesson","lessons","presentCount","absentCount","unapprovedCount","absentPrecedingCount","viewMode","selectDate","search"],[3,"entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams","togglePresenceType","changeIncident",4,"ngFor","ngForOf"],[3,"togglePresenceType","changeIncident","entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"],[1,"mt-3"]],template:function(t,o){t&1&&(c(0,"h1"),d(1),l(2,"translate"),p(),v(3,eo,5,4,"ng-container",3),l(4,"async"),l(5,"async"),l(6,"async")),t&2&&(s(),w(m(2,2,"presence-control.title")),s(2),g("bkdLet",$t(10,qi,m(4,4,o.state.selectedLesson$),m(5,6,o.state.lessons$),m(6,8,o.entries$))))},dependencies:[ae,oe,Wn,R,qn,xe,re,F,j],styles:["bkd-presence-control-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.entries.view-mode-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}@media (min-width: 400px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%;border-right:1px solid #dee2e6}}@media (min-width: 800px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:50%;border-right:1px solid #dee2e6}}@media (min-width: 1200px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:33.3333333333%;border-right:1px solid #dee2e6}}@media (min-width: 1600px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:25%;border-right:1px solid #dee2e6}}@media (min-width: 2000px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:20%;border-right:1px solid #dee2e6}}@media (min-width: 2400px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:16.6666666667%;border-right:1px solid #dee2e6}}[_nghost-%COMP%]{display:block;overflow:hidden;width:100%}.entries.view-mode-grid[_ngcontent-%COMP%]{width:calc(100% + 1px)}"],changeDetection:0});let n=i;return n})();var Xn=(()=>{let i=class i{constructor(e,t){this.state=e,this.lessonPresencesUpdateService=t,this.destroy$=new $}ngOnInit(){this.lessonPresencesUpdateService.stateUpdates$.pipe(q(this.destroy$)).subscribe(e=>this.state.updateLessonPresencesTypes(e))}ngOnDestroy(){this.destroy$.next()}};i.\u0275fac=function(t){return new(t||i)(_(G),_(et))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control"]],standalone:!0,features:[he([G,Ze,de,on,{provide:Jt,useExisting:G}]),E],decls:1,vars:0,template:function(t,o){t&1&&W(0,"router-outlet")},dependencies:[Bt],changeDetection:0});let n=i;return n})();var Qs=[{path:"",component:Xn,children:[{path:"",component:Jn,data:{restoreScrollPositionFrom:["/presence-control/student/:id/addresses","/presence-control/student/:id/absences","/presence-control/student/:id/grades"]}},_n,{path:"groups/:id",component:Gn}]}];export{Qs as PRESENCE_CONTROL_ROUTES}; +import{a as Cn,b as vn}from"./chunk-673RVEOB.js";import{a as me,b as we}from"./chunk-KDAC4GJ5.js";import{b as bn}from"./chunk-ZROJU7EX.js";import{a as yn}from"./chunk-XYF73IOS.js";import{a as Pn,b as xn}from"./chunk-Y673JQTS.js";import{a as _n}from"./chunk-GXZYLK4L.js";import{e as fn}from"./chunk-U4HODSW3.js";import{q as gn,v as Ie}from"./chunk-7LCBKZQT.js";import{a as at}from"./chunk-PSXDSPKS.js";import{b as Jt,e as Ke}from"./chunk-C7XT5XXE.js";import{a as rn}from"./chunk-YMJC6QZX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{a as In}from"./chunk-DZZC2YX2.js";import{a as Sn}from"./chunk-K3EEKOGY.js";import{a as pt,d as un}from"./chunk-24AFRN2G.js";import{a as cn}from"./chunk-RFO4NYUO.js";import{a as an,b as pn}from"./chunk-5RDJZAUT.js";import"./chunk-DB66EACG.js";import{E as en,F as tn,L as nn,P as on,T as Se,U as sn,W as ct,Y as hn,j as Xt,t as Yt,y as Zt,z as We}from"./chunk-ZK2MNT7Z.js";import{d as st,e as K}from"./chunk-AW7CSGKI.js";import{b as pe}from"./chunk-FTDG26ID.js";import{a as ae,b as Qe,c as xe,g as ln,h as dn,i as mn}from"./chunk-SOHFFTKU.js";import{f as Rt,g as Nt,h as Ue,i as Gt,j as Ut,k as Ht,m as qt,n as Wt,o as Le,p as ce,u as zt,w as qe}from"./chunk-C56YGDXA.js";import{a as Pe}from"./chunk-UX5TA32W.js";import{$ as L,$a as u,$c as Vt,A as ht,Ab as l,B as _t,Bb as m,C as nt,Cb as U,Dd as Qt,E as D,Eb as _e,Fd as Q,G as Fe,Ga as v,Gd as j,Hd as F,Ia as g,Id as Kt,J as Ct,Ja as z,K as vt,Ka as Pt,L as B,La as Ae,Lc as jt,M as it,Mb as Et,N as Ve,O as T,Q as q,Qb as Dt,Rb as R,Sa as c,Sb as oe,Ta as p,Ua as W,Va as ee,Vb as re,Vc as H,W as A,Wa as te,Wb as Ce,Ya as M,Yc as Ft,Z as y,_a as b,a as ue,ad as ve,b as ge,bc as ot,bd as be,db as J,dc as Re,dd as At,e as $,ed as ye,f as fe,fb as St,g as Oe,ga as bt,gb as xt,ha as P,hb as It,ia as S,ib as ne,jb as d,k as X,kb as w,la as yt,lb as x,m as f,mb as wt,n as O,nb as Mt,ob as kt,oc as Ne,pc as Bt,r as Te,ra as Z,rc as Ge,rd as se,sb as he,t as ft,tb as E,td as rt,ua as s,ub as Ot,v as Y,va as _,vb as ie,w as $e,wb as Tt,xb as $t,yb as Lt,yd as He,zd as Ee}from"./chunk-XTHSYQMN.js";function wn(n,i){let r=st(n),e=st(i);return+r==+e}function Mn(n,i,r){let e=i.map(o=>({eventId:o,group:n})),t=r.map(o=>e.find(a=>a.eventId===o.eventId)||o);return[...new Set([...t,...e])].filter(o=>o.group!==null)}var ze=(()=>{let i=class i extends nn{};i.\u0275fac=(()=>{let e;return function(o){return(e||(e=yt(i)))(o||i)}})(),i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();function kn(n,i){return[...n].sort(ei(i))}function ei(n){return(i,r)=>{switch(n.primarySortKey){case"name":{let e=i.name.localeCompare(r.name);return n.ascending?e*-1:e}case"group":{let e=(i.detail.Value||"").localeCompare(r.detail.Value||"");return n.ascending?e*-1:e}}}}function On(n,i){return n.map(r=>ti(r,i))}function ti(n,i){return{id:n.IdPerson,name:i.find(r=>r.StudentRef.Id===n.IdPerson)?.StudentFullName||"",group:n.Value,detail:n}}function Tn(n,i){return n.filter(r=>r.VssId===i.subscriptionDetailGroupId)}function lt(n,i){return n.find(r=>r.VssId===i.subscriptionDetailGroupId)}function ni(n,i){if(n&1){let r=M();c(0,"div",5)(1,"input",6),b("change",function(){let t=P(r).$implicit,o=u();return S(o.onSelectionChange(t))}),p(),c(2,"label",7),d(3),p()()}if(n&2){let r=i.$implicit,e=i.index,t=u();s(),J("id","group-",e,""),g("checked",r.id===t.selected.id)("value",r.id),s(),J("for","group-",e,""),s(),x(" ",r.label," ")}}var De=function(n){return n.Select="select",n.Assign="assign",n}(De||{}),$n=(()=>{let i=class i{constructor(e,t){this.activeModal=e,this.translate=t,this.groupOptions=[]}ngOnInit(){this.title=`presence-control.groups.${this.dialogMode}.title`;let e=this.createEmtpyOption();this.groupOptions=this.createGroupOptions(this.subscriptionDetailsDefinitions),this.groupOptions.unshift(e),this.selected=this.groupOptions.find(t=>t.id===this.group)||e}createEmtpyOption(){let e=this.dialogMode===De.Select?"presence-control.groups.all":"presence-control.groups.none";return{id:null,label:this.translate.instant(e)}}createGroupOptions(e){return e.DropdownItems?e.DropdownItems.map(t=>({id:t.Key,label:`${this.translate.instant("presence-control.groups.group")} ${t.Value}`})):[]}getSelectedGroup(){return this.selected}onSelectionChange(e){this.selected=e}};i.\u0275fac=function(t){return new(t||i)(_(ce),_(Q))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-group-dialog"]],inputs:{dialogMode:"dialogMode",subscriptionDetailsDefinitions:"subscriptionDetailsDefinitions",group:"group"},standalone:!0,features:[E],decls:13,vars:10,consts:[[1,"modal-body"],["class","form-check",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[1,"form-check"],["type","radio","name","groups",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),c(4,"form"),v(5,ni,4,7,"div",1),p()(),c(6,"div",2)(7,"button",3),b("click",function(){return o.activeModal.dismiss()}),d(8),l(9,"translate"),p(),c(10,"button",4),b("click",function(){return o.activeModal.close(o.getSelectedGroup())}),d(11),l(12,"translate"),p()()),t&2&&(s(2),x(" ",m(3,4,o.title)," "),s(3),g("ngForOf",o.groupOptions),s(3),x(" ",m(9,6,"presence-control.groups.cancel")," "),s(3),x(" ",m(12,8,"presence-control.groups.save")," "))},dependencies:[se,ye,ve,be,R,F,j]});let n=i;return n})();function Ln(n,i,r,e){return n.map(t=>{let o=i.find(a=>ii(a.presence,t));if(o){let a;return!o.newPresenceTypeId&&t.Comment?a=r.find(h=>h.IsComment)||null:a=r.find(h=>h.Id===o.newPresenceTypeId)||null,ge(ue({},t),{TypeRef:oi(a),Date:null,Type:a?a.Designation:null,ConfirmationStateId:We(a,e)})}return t})}function ii(n,i){return n.LessonRef.Id===i.LessonRef.Id&&n.StudentRef.Id===i.StudentRef.Id}function oi(n){return{Id:n?n.Id:null,HRef:null}}function Xe(n){return i=>i.reduce((r,e)=>r+(e.presenceCategory===n?1:0),0)}function En(){return n=>n.reduce((i,r)=>i+(r.precedingAbsences&&r.precedingAbsences.length>0?1:0),0)}var Dn=(()=>{let i=class i extends Qe{constructor(e,t){super(e,t,pt,"LessonTeachers")}loadOtherTeachersLessonAbsences(e,t,o){let a=`${this.baseUrl}/except/${e}/LessonAbsences?expand=LessonRef`;return t&&t.length>0&&(a=a.concat("&filter.StudentRef=;"+t.join(";"))),this.http.get(a,{params:o}).pipe(T(Qt(pt)))}};i.\u0275fac=function(t){return new(t||i)(y(Re),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var Ye=(()=>{let i=class i extends Qe{constructor(e,t){super(e,t,gn,"SubscriptionDetails")}getListForEvent(e){return this.getList({params:{IdEvent:String(e)}})}update(e,t){let o={IdPerson:t.IdPerson,EventId:t.EventId,Value:e};return this.http.put(`${this.baseUrl}/${t.Id}`,o).pipe(f(()=>{}))}};i.\u0275fac=function(t){return new(t||i)(y(Re),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();var jn="presence-control-group",de=(()=>{let i=class i{constructor(e,t,o,a,h){this.userSettings=e,this.eventService=t,this.subscriptionDetailsService=o,this.loadingService=a,this.settings=h,this.selectGroup$=new $,this.selectedLesson$=new Oe,this.lessonPresences$=new Oe,this.reloadSubscriptionDetails$=new $,this.defaultGroup=null,this.savedGroup$=this.selectedLesson$.pipe(T(C=>this.userSettings.getPresenceControlGroupView().pipe(f(k=>this.findGroupByLesson(k,C))))),this.group$=Y(this.selectGroup$,this.savedGroup$).pipe(Ve(this.defaultGroup),B(1)),this.loading$=this.loadingService.loading(jn),this.subscriptionDetailsDefinitions$=this.selectedLesson$.pipe(f(C=>C?.getEventIds()||[]),T(C=>Te(C.map(k=>this.eventService.getSubscriptionDetailsDefinitions(k)))),B(1)),this.groupsAvailability$=this.subscriptionDetailsDefinitions$.pipe(f(C=>C.every(k=>lt(k,this.settings))),B(1)),this.subscriptionDetails$=O([this.selectedLesson$,this.groupsAvailability$,this.reloadSubscriptionDetails$.pipe(f(()=>!1),Ve(!0))]).pipe(T(([C,k,N])=>C&&k?this.loadSubscriptionDetailsForLesson(C,N):X([])),f(C=>Tn(C,this.settings)),B(1)),this.subscriptionDetailPersonIds$=O([this.group$,this.subscriptionDetails$]).pipe(f(([C,k])=>k.filter(N=>N.Value===C).map(N=>N.IdPerson)),Ve([]))}selectGroup(e){this.selectGroup$.next(e)}setSelectedLesson(e){this.selectedLesson$.next(e)}setLessonPresences(e){this.lessonPresences$.next(e)}getSubscriptionDetailsDefinitions(){return this.subscriptionDetailsDefinitions$.pipe(f(rt),f(e=>lt(e,this.settings)))}getSubscriptionDetailsForStudents(){return O([this.subscriptionDetails$,this.lessonPresences$]).pipe(f(K(On)))}reloadSubscriptionDetails(){this.reloadSubscriptionDetails$.next(void 0)}loadSubscriptionDetailsForLesson(e,t=!0){return this.loadingService.load(Te(Ee(e.getEventIds()).map(o=>this.subscriptionDetailsService.getListForEvent(o))),t?void 0:jn).pipe(f(rt))}findGroupByLesson(e,t){return e.find(a=>a.eventId===t?.getEventIds()[0])?.group||this.defaultGroup}};i.\u0275fac=function(t){return new(t||i)(y(we),y(yn),y(Ye),y(pe),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();var An=Object.values(me),G=(()=>{let i=class i{constructor(e,t,o,a,h,C,k,N,tt,Me){this.userSettings=e,this.lessonPresencesService=t,this.lessonTeacherService=o,this.presenceTypesService=a,this.groupService=h,this.dropDownItemsService=C,this.loadingService=k,this.storageService=N,this.settings=tt,this.location=Me,this.selectedDateSubject$=new fe(new Date),this.selectedDate$=this.selectedDateSubject$.asObservable().pipe(f(Xt),Fe(He)),this.viewModeSubject$=new $,this.viewMode$=Y(this.viewModeSubject$,this.userSettings.getPresenceControlViewMode().pipe(D(1))),this.lessons$=this.selectedDate$.pipe(T(I=>this.loadLessonsByDate(I)),B(1)),this.selectLessonId$=new $,this.selectLesson$=this.selectLessonId$.pipe(T(I=>this.getLessonById(I))),this.selectedLesson$=O([ln(this.selectLesson$.pipe(Fe((I,ke)=>He(I,ke))),dn(this.settings.lessonPresencesRefreshTime)),this.lessons$]).pipe(f(([I,ke])=>ke.find(Yn=>Yn.id===I.id)?I:null),B(1)),this.studyClassCount$=this.selectedLesson$.pipe(f(I=>I?.lessons.length||0)),this.updateLessonPresences$=new $,this.reloadLessonPresences$=new $,this.lessonPresences$=Y(mn(this.selectedLesson$,this.reloadLessonPresences$).pipe(T(I=>I?this.loadLessonPresencesByLesson(I):X([]))),this.updateLessonPresences$).pipe(B(1)),this.presenceTypes$=this.loadPresenceTypes().pipe(B(1)),this.reloadStudentIdsWithUnconfirmedAbsences$=new $,this.studentIdsWithUnconfirmedAbsences$=Y(this.selectedDate$,this.selectedLesson$.pipe(it(1)),this.reloadStudentIdsWithUnconfirmedAbsences$).pipe(T(()=>this.loadStudentIdsWithUnconfirmedAbsences()),B(1)),this.loading$=this.loadingService.loading$,this.absenceConfirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(B(1)),this.studentIds$=this.lessonPresences$.pipe(f(I=>Ee(I.map(ke=>ke.StudentRef.Id))),B(1)),this.otherTeachersAbsences$=this.studentIds$.pipe(Fe(He),T(I=>I.length>0?this.lessonTeacherService.loadOtherTeachersLessonAbsences(this.getMyself(),I):X([])),B(1)),this.groupsAvailability$=this.groupService.groupsAvailability$,this.presenceControlEntries$=O([this.selectedLesson$,this.lessonPresences$,this.presenceTypes$,this.absenceConfirmationStates$,this.otherTeachersAbsences$]).pipe(f(K(en))),this.presenceControlEntriesByGroup$=O([this.groupService.group$,this.presenceControlEntries$,this.groupService.subscriptionDetailPersonIds$]).pipe(f(K(bn)),B(1)),this.presentCount$=this.presenceControlEntriesByGroup$.pipe(f(Xe("present"))),this.absentCount$=this.presenceControlEntriesByGroup$.pipe(f(Xe("absent"))),this.unapprovedCount$=this.presenceControlEntriesByGroup$.pipe(f(Xe("unapproved"))),this.absentPrecedingCount$=this.presenceControlEntriesByGroup$.pipe(f(En())),this.queryParamsString$=O([this.selectedDate$,this.selectedLesson$,this.viewMode$]).pipe(f(K(this.buildQueryParams.bind(this))),f(pn)),this.destroy$=new $,this.queryParamsString$.pipe(q(this.destroy$)).subscribe(I=>{this.location.replaceState("/presence-control",I),this.confirmBackLinkParams={returnparams:I}}),this.viewMode$.pipe(it(1),T(I=>this.userSettings.savePresenceControlViewMode(I)),q(this.destroy$)).subscribe(),this.selectedLesson$.pipe(q(this.destroy$)).subscribe(I=>{this.groupService.setSelectedLesson(I)}),this.lessonPresences$.pipe(q(this.destroy$)).subscribe(I=>this.groupService.setLessonPresences(I))}ngOnDestroy(){this.destroy$.next()}setDate(e){this.selectedDateSubject$.next(e)}setLessonId(e){this.selectLessonId$.next(e)}setViewMode(e){this.viewModeSubject$.next(e)}updateLessonPresencesTypes(e){O([this.lessonPresences$.pipe(D(1)),this.presenceTypes$.pipe(D(1))]).pipe(f(([t,o])=>Ln(t,e,o,this.settings))).subscribe(t=>this.updateLessonPresences$.next(t))}getNextPresenceType(e){return this.presenceTypes$.pipe(D(1),f(t=>e.getNextPresenceType(t)))}hasUnconfirmedAbsences(e){return this.studentIdsWithUnconfirmedAbsences$.pipe(f(t=>t.includes(e.lessonPresence.StudentRef.Id)))}updateAfterConfirm(){this.reloadLessonPresences$.next(),this.reloadStudentIdsWithUnconfirmedAbsences$.next()}loadLessonPresencesByLesson(e){return this.loadingService.load(this.lessonPresencesService.getListByLessons(e.lessons))}loadLessonsByDate(e){return this.loadingService.load(this.lessonPresencesService.getLessonsByDate(e)).pipe(f(Cn))}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.presenceTypes$)}loadStudentIdsWithUnconfirmedAbsences(){return ft(0,this.settings.unconfirmedAbsencesRefreshTime||-1).pipe(T(()=>this.lessonPresencesService.getListOfUnconfirmed()),f(e=>Ee(e.map(t=>t.StudentRef.Id))))}buildQueryParams(e,t,o){let a={date:Yt(e,"yyyy-MM-dd"),viewMode:o};return t&&(a.lesson=String(t.id)),a}getLessonById(e){let t=String(e);return this.lessons$.pipe(f(o=>t&&o.find(a=>a.id===t)||vn(o)),$e(Boolean))}getMyself(){let e=this.storageService.getPayload();return Number(e?.holder_id||e?.id_person)}};i.\u0275fac=function(t){return new(t||i)(y(we),y(Ke),y(Dn),y(Se),y(de),y(rn),y(pe),y(Kt),y(H),y(Et))},i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();var pi=(n,i,r,e)=>({sortCriteria:n,sortedEntries:i,selection:r,group:e}),li=()=>["/presence-control"];function di(n,i){if(n&1){let r=M();c(0,"div",14),b("click",function(){let t=P(r).$implicit,o=u(2);return S(o.toggleSort(t))}),d(1),l(2,"translate"),c(3,"span",15),d(4),p()()}if(n&2){let r=i.$implicit,e=u().bkdLet,t=u();g("className",r),s(),x(" ",m(2,3,"presence-control.groups.list.header."+r)," "),s(3),w(t.getSortDirectionCharacter(e.sortCriteria,r))}}function mi(n,i){n&1&&W(0,"bkd-spinner",23)}function ui(n,i){if(n&1){let r=M();ee(0),c(1,"div",17)(2,"div",18)(3,"input",19,1),l(5,"async"),b("change",function(){let t=P(r).$implicit,o=u(3);return S(o.selectionService.toggle(t))}),p()(),c(6,"div",20),d(7),p(),c(8,"div",21)(9,"span"),d(10),p(),v(11,mi,1,0,"bkd-spinner",22),l(12,"async"),p()(),te()}if(n&2){let r=i.$implicit,e=u(3);s(3),g("checked",m(5,4,e.selectionService.isSelected$(r))),s(4),x(" ",r.name," "),s(3),w(r.group?r.group:""),s(),g("ngIf",m(12,6,e.groupService.loading$))}}function gi(n,i){if(n&1&&(ee(0),v(1,ui,13,8,"ng-container",16),te()),n&2){let r=u().bkdLet;s(),g("ngForOf",r.sortedEntries)}}function fi(n,i){n&1&&W(0,"bkd-spinner")}function hi(n,i){if(n&1){let r=M();c(0,"div"),W(1,"bkd-backlink",3),l(2,"async"),c(3,"h1"),d(4),l(5,"translate"),p(),c(6,"div",4)(7,"div",5)(8,"span",6),d(9),l(10,"translate"),p(),c(11,"button",7),b("click",function(){P(r);let t=u();return S(t.selectGroup())}),d(12),l(13,"translate"),l(14,"translate"),p()(),c(15,"a",8),b("click",function(){P(r);let t=u();return S(t.assignGroup())}),c(16,"i",9),d(17,"edit"),p()()(),c(18,"div",10)(19,"div",11),v(20,di,5,5,"div",12),p(),v(21,gi,2,1,"ng-container",13),l(22,"async"),v(23,fi,1,0,"ng-template",null,0,_e),p()()}if(n&2){let r=i.bkdLet,e=ne(24),t=u();s(),g("link",Ot(22,li))("params",m(2,10,t.backlinkQueryParams$)),s(3),w(m(5,12,"presence-control.groups.title")),s(5),w(m(10,14,"presence-control.groups.show")),s(3),x(" ",r.group?m(13,16,"presence-control.groups.group")+" "+r.group:m(14,18,"presence-control.groups.all")," "),s(3),z("disabled",r.selection.length===0),s(5),g("ngForOf",t.primarySortKeys),s(),g("ngIf",m(22,20,t.state.loading$)===!1)("ngIfElse",e)}}var Gn=(()=>{let i=class i{constructor(e,t,o,a,h,C,k,N,tt){this.route=e,this.state=t,this.selectionService=o,this.groupService=a,this.userSettings=h,this.subscriptionDetailService=C,this.toastService=k,this.translate=N,this.modalService=tt,this.primarySortKeys=["name","group"],this.backlinkQueryParams$=this.route.queryParams.pipe(f(({returnparams:Me})=>Me),f(an)),this.eventIds$=this.state.selectedLesson$.pipe(f(Me=>Me?.getEventIds()||[])),this.sortCriteriaSubject$=new fe({primarySortKey:"name",ascending:!1}),this.sortCriteria$=this.sortCriteriaSubject$.asObservable(),this.sortedEntries$=O([this.groupService.getSubscriptionDetailsForStudents(),this.sortCriteria$]).pipe(f(K(kn))),this.selected=[]}ngOnInit(){this.selectionService.selection$.subscribe(e=>this.selected=e)}selectGroup(){this.openGroupModal(De.Select,this.selectCallback.bind(this))}assignGroup(){this.openGroupModal(De.Assign,this.assignCallback.bind(this))}openGroupModal(e,t){O([this.groupService.getSubscriptionDetailsDefinitions(),this.groupService.group$]).pipe(D(1)).subscribe(([o,a])=>{let h=this.modalService.open($n);h.componentInstance.dialogMode=e,h.componentInstance.subscriptionDetailsDefinitions=o,h.componentInstance.group=a,h.result.then(C=>{t(C)},()=>{})})}selectCallback(e){O([this.eventIds$,this.userSettings.getPresenceControlGroupView()]).pipe(D(1),T(([t,o])=>this.userSettings.savePresenceControlGroupView(Mn(e.id,t,o))),f(()=>e.id)).subscribe(t=>this.groupService.selectGroup(t))}assignCallback(e){Te(this.selected.map(t=>this.subscriptionDetailService.update(e.id,t.detail))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.groupService.reloadSubscriptionDetails(),this.selectionService.clear(),this.toastService.success(this.translate.instant("presence-control.groups.notifications.save-success"))}getSortDirectionCharacter(e,t){return e.primarySortKey!==t?"":e.ascending?"\u2193":"\u2191"}toggleSort(e){this.sortCriteriaSubject$.pipe(D(1)).subscribe(t=>{t.primarySortKey===e?this.sortCriteriaSubject$.next({primarySortKey:e,ascending:!t.ascending}):this.sortCriteriaSubject$.next({primarySortKey:e,ascending:e==="name"})})}};i.\u0275fac=function(t){return new(t||i)(_(Ne),_(G),_(ze),_(de),_(we),_(Ye),_(Pe),_(Q),_(Ie))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-group"]],standalone:!0,features:[he([ze]),E],decls:5,vars:14,consts:[["loading",""],["checkbox",""],[4,"bkdLet"],[3,"link","params"],[1,"group-header","mb-2","d-flex","justify-content-between"],[1,"d-flex","align-items-baseline"],[1,"ps-3"],["type","button",1,"show","btn","btn-link",3,"click"],["aria-label","edit",1,"btn","btn-primary","btn-icon","me-2",3,"click"],[1,"material-icons"],[1,"group-list"],[1,"group-list-header"],[3,"className","click",4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[3,"click","className"],[1,"sort-direction"],[4,"ngFor","ngForOf"],[1,"group-list-entry"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"name","pe-2"],[1,"group","d-flex","justify-content-between"],["class","inline small",4,"ngIf"],[1,"inline","small"]],template:function(t,o){t&1&&(v(0,hi,25,23,"div",2),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async")),t&2&&g("bkdLet",Lt(9,pi,m(1,1,o.sortCriteria$),m(2,3,o.sortedEntries$),m(3,5,o.selectionService.selection$),m(4,7,o.groupService.group$)))},dependencies:[ae,hn,R,oe,xe,re,F,j],styles:['[_nghost-%COMP%]{display:block}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:#000;font-weight:300;text-decoration:underline;padding-left:.5rem}.group-header[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.group-list-header[_ngcontent-%COMP%]{cursor:pointer;padding:1rem;display:grid;grid-template-areas:"name group";grid-template-columns:3fr 2fr;border-top:1px solid #dee2e6;border-bottom:2px solid #dee2e6}.group-list-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox name group";grid-template-columns:min-content 3fr 2fr}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.name[_ngcontent-%COMP%]{grid-area:name;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.group[_ngcontent-%COMP%]{grid-area:group}@media (max-width: 750px){.group-list[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.group-list-header[_ngcontent-%COMP%]{grid-template-columns:3fr 1fr}.group-list-entry[_ngcontent-%COMP%]{grid-template-columns:min-content 3fr 1fr}}'],changeDetection:0});let n=i;return n})();function _i(n,i){if(n&1){let r=M();c(0,"div",3)(1,"input",4),b("change",function(){let t=P(r).$implicit;return S(t.selected=!t.selected)}),p(),c(2,"label",5)(3,"i"),d(4),p(),c(5,"div",6),d(6),l(7,"date"),l(8,"date"),p()()()}if(n&2){let r=i.$implicit,e=i.index,t=u();s(),J("id","lesson-presence-",e,""),g("checked",r.selected),s(),z("fw-bold",t.isCurrentLesson(r)),J("for","lesson-presence-",e,""),s(),Ae("",r.entry.presenceCategory," material-icons pe-2"),s(),w(r.entry.presenceCategoryIcon),s(2),Mt(" ",U(7,14,r.entry.lessonPresence.LessonDateTimeFrom,"HH:mm"),"\u2013",U(8,17,r.entry.lessonPresence.LessonDateTimeTo,"HH:mm")," ",r.entry.lessonPresence.EventDesignation," ")}}function Ci(n,i){if(n&1){let r=M();c(0,"div",7)(1,"button",8),b("click",function(){P(r);let t=u();return S(t.activeModal.close())}),d(2),l(3,"translate"),p(),c(4,"button",9),b("click",function(){let t=P(r).bkdLet,o=u();return S(o.activeModal.close(t))}),d(5),l(6,"translate"),p()()}if(n&2){let r=i.bkdLet;s(2),x(" ",m(3,3,"presence-control.block-lesson.cancel")," "),s(2),g("disabled",r.length===0),s(),x(" ",m(6,5,"presence-control.block-lesson.save")," ")}}var Un=(()=>{let i=class i{constructor(e){this.activeModal=e,this.blockLessonOptions=[]}ngOnInit(){this.blockLessonOptions=this.buildLessonPresenceOptions()}getSelectedEntries(){return this.blockLessonOptions.filter(({selected:e})=>e).map(({entry:e})=>e)}isCurrentLesson(e){return wn(e.entry.lessonPresence.LessonDateTimeFrom,this.entry.lessonPresence.LessonDateTimeFrom)}buildLessonPresenceOptions(){return this.blockPresenceControlEntries.map(e=>({entry:e,selected:this.entry.confirmationState===e.confirmationState}))}};i.\u0275fac=function(t){return new(t||i)(_(ce))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-block-lesson-component"]],inputs:{entry:"entry",blockPresenceControlEntries:"blockPresenceControlEntries"},standalone:!0,features:[E],decls:7,vars:5,consts:[[1,"modal-body"],["class","form-check",4,"ngFor","ngForOf"],["class","modal-footer",4,"bkdLet"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"change","id","checked"],[1,"form-check-label","d-flex",3,"for"],[1,"d-block","text-truncate"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click","disabled"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),c(4,"form"),v(5,_i,9,20,"div",1),p()(),v(6,Ci,7,7,"div",2)),t&2&&(s(2),x(" ",m(3,3,"presence-control.block-lesson.text")," "),s(3),g("ngForOf",o.blockLessonOptions),s(),g("bkdLet",o.getSelectedEntries()))},dependencies:[se,ye,ve,be,R,ae,Ce,F,j],styles:[".checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.absent[_ngcontent-%COMP%]{color:#ea161f}.present[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_ngcontent-%COMP%]{color:#ffa814}"]});let n=i;return n})();var vi=30;function gt(n){return`blockLesson${n.lessonPresence.Id}`}var Ze=(()=>{let i=class i{constructor(e,t,o,a){this.state=e,this.lessonPresencesService=t,this.loadingService=o,this.settings=a}getBlockLessonPresenceControlEntries(e){return O([this.state.lessons$.pipe(D(1)),this.loadChangeableLessonPresences(e),this.state.presenceTypes$.pipe(D(1)),this.state.absenceConfirmationStates$.pipe(D(1)),this.state.otherTeachersAbsences$.pipe(D(1))]).pipe(f(([t,o,a,h,C])=>this.filterBlockLessonPresences(e,o).map(k=>tn(t.find(N=>N.id===k.LessonRef.Id.toString()),k,a,h,C))))}filterBlockLessonPresences(e,t){return[...t].sort((o,a)=>o.LessonDateTimeFrom>a.LessonDateTimeFrom?1:-1).reduce((o,a)=>{let h=o[o.length-1];return this.isWithinBlockTime(a,h)?(o.push(a),o):o.find(C=>C.Id===e.lessonPresence.Id)?o:[a]},[])}isWithinBlockTime(e,t){return t?e.LessonDateTimeFrom.getTime()-t.LessonDateTimeTo.getTime()<=vi*60*1e3:!0}loadChangeableLessonPresences(e){return O([this.loadLessonPresences(e),this.state.presenceTypes$.pipe(D(1))]).pipe(f(([t,o])=>t.filter(a=>Zt(a,o.find(h=>h.Id===a.TypeRef.Id)||null,this.settings))))}loadLessonPresences(e){return this.loadingService.load(this.lessonPresencesService.getListByDateStudentClass(e.lessonPresence.LessonDateTimeFrom,e.lessonPresence.StudentRef.Id,e.lessonPresence.StudyClassRef.Id??void 0).pipe(f(t=>t.filter(o=>o.TeacherInformation===e.lessonPresence.TeacherInformation))),gt(e))}};i.\u0275fac=function(t){return new(t||i)(y(G),y(Ke),y(pe),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac});let n=i;return n})();function yi(n,i){if(n&1&&(c(0,"div"),d(1),l(2,"date"),l(3,"date"),l(4,"addSpace"),p()),n&2){let r=i.$implicit;s(),kt(" ",U(2,5,r.LessonRef.From,"HH:mm"),"\u2013",U(3,8,r.LessonRef.To,"HH:mm")," ",r.LessonRef.EventDesignation,"",U(4,11,":",":")," ",r.Type," ")}}var Hn=(()=>{let i=class i{constructor(e){this.activeModal=e}};i.\u0275fac=function(t){return new(t||i)(_(ce))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-preceding-absence"]],inputs:{precedingAbsences:"precedingAbsences"},standalone:!0,features:[E],decls:9,vars:7,consts:[[1,"modal-body"],[4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),v(4,yi,5,14,"div",1),p(),c(5,"div",2)(6,"button",3),b("click",function(){return o.activeModal.dismiss()}),d(7),l(8,"translate"),p()()),t&2&&(s(2),x(" ",m(3,3,"presence-control.preceding-absence.text")," "),s(2),g("ngForOf",o.precedingAbsences),s(3),x(" ",m(8,5,"presence-control.preceding-absence.cancel")," "))},dependencies:[R,Ce,F,j,un]});let n=i;return n})();var Pi=n=>["student",n,"absences"],Si=n=>["/presence-control/student",n,"absences"];function xi(n,i){if(n&1&&(W(0,"bkd-avatar",9),l(1,"async")),n&2){let r=u();g("studentId",m(1,3,r.studentId$))("link",ie(5,Si,r.entry.lessonPresence.StudentRef.Id.toString()))("linkParams",r.profileReturnParams)}}function Ii(n,i){if(n&1&&(c(0,"span"),d(1),p()),n&2){let r=u(2);s(),w(r.entry.presenceType==null?null:r.entry.presenceType.Designation)}}function wi(n,i){if(n&1){let r=M();c(0,"button",10),b("click",function(){P(r);let t=u();return S(t.updatePresenceType(t.entry))}),v(1,Ii,2,1,"span",11),p()}if(n&2){let r=u();s(),g("ngIf",!(r.entry.presenceType!=null&&r.entry.presenceType.IsIncident))}}function Mi(n,i){n&1&&W(0,"bkd-spinner",16)}function ki(n,i){if(n&1){let r=M();c(0,"button",12),b("click",function(){P(r);let t=u();return S(t.updatePresenceType(t.entry))}),c(1,"div",13)(2,"i",14),d(3),p(),v(4,Mi,1,0,"bkd-spinner",15),p()()}if(n&2){let r=i.bkdLet,e=u();g("disabled",r),s(2),z("invisible",r),s(),w(e.entry.presenceCategoryIcon),s(),g("ngIf",r)}}function Oi(n,i){if(n&1){let r=M();c(0,"button",17),b("click",function(){P(r);let t=u();return S(t.showPrecedingAbsences(t.entry))}),c(1,"i",18),d(2,"info"),p()()}}function Ti(n,i){if(n&1&&(c(0,"span",19),d(1),p()),n&2){let r=u();s(),x(" ",r.entry.lessonPresence.StudyClassNumber," ")}}function $i(n,i){if(n&1){let r=M();c(0,"a",20),b("click",function(){P(r);let t=u();return S(t.updateIncident(t.entry))}),c(1,"i",14),d(2,"edit"),p(),c(3,"span"),d(4),l(5,"translate"),p()()}if(n&2){let r=u();s(4),w(m(5,1,(r.entry.presenceType==null?null:r.entry.presenceType.IsIncident)&&(r.entry.presenceType==null?null:r.entry.presenceType.Designation)||"presence-control.entry.incident"))}}var qn=(()=>{let i=class i{get classNames(){return[this.entry.presenceCategory,this.viewMode].join(" ")}constructor(e,t,o,a){this.toastService=e,this.translate=t,this.modalService=o,this.loadingService=a,this.hasUnconfirmedAbsences=!1,this.showClassName=!1,this.togglePresenceType=new Z,this.changeIncident=new Z,this.entry$=new Oe(1),this.studentId$=this.entry$.pipe(f(({lessonPresence:h})=>h.StudentRef.Id)),this.loading$=this.entry$.pipe(T(h=>this.loadingService.loading(gt(h))))}ngOnChanges(e){e.entry&&this.entry$.next(e.entry.currentValue)}get isListViewMode(){return this.viewMode===me.List}updatePresenceType(e){e.canChangePresenceType?this.togglePresenceType.emit(e):this.toastService.warning(this.translate.instant("presence-control.entry.update-warning"))}updateIncident(e){e.canChangeIncident&&this.changeIncident.emit(e)}showPrecedingAbsences(e){let t=this.modalService.open(Hn);t.componentInstance.precedingAbsences=e.precedingAbsences}};i.\u0275fac=function(t){return new(t||i)(_(Pe),_(Q),_(Ie),_(pe))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-entry"]],hostVars:2,hostBindings:function(t,o){t&2&&Pt(o.classNames)},inputs:{entry:"entry",hasUnconfirmedAbsences:"hasUnconfirmedAbsences",viewMode:"viewMode",showClassName:"showClassName",profileReturnParams:"profileReturnParams"},outputs:{togglePresenceType:"togglePresenceType",changeIncident:"changeIncident"},standalone:!0,features:[bt,E],decls:13,vars:16,consts:[["class","avatar large",3,"studentId","link","linkParams",4,"ngIf"],["type","button","class","presence-category designation btn btn-link",3,"click",4,"ngIf"],["type","button","class","presence-category status btn btn-link",3,"disabled","click",4,"bkdLet"],["type","button","class","previously-absent d-flex btn btn-link",3,"click",4,"ngIf"],[1,"student-info",3,"routerLink","queryParams"],[1,"student-name","text-truncate"],["class","study-class text-truncate",4,"ngIf"],[1,"unconfirmed-absences"],["class","incident btn btn-link",3,"click",4,"ngIf"],[1,"avatar","large",3,"studentId","link","linkParams"],["type","button",1,"presence-category","designation","btn","btn-link",3,"click"],[4,"ngIf"],["type","button",1,"presence-category","status","btn","btn-link",3,"click","disabled"],[1,"position-relative"],[1,"material-icons"],["class","inline small",4,"ngIf"],[1,"inline","small"],["type","button",1,"previously-absent","d-flex","btn","btn-link",3,"click"],[1,"material-icons-outlined"],[1,"study-class","text-truncate"],[1,"incident","btn","btn-link",3,"click"]],template:function(t,o){t&1&&(v(0,xi,2,7,"bkd-avatar",0)(1,wi,2,1,"button",1)(2,ki,5,5,"button",2),l(3,"async"),v(4,Oi,3,0,"button",3),c(5,"a",4)(6,"span",5),d(7),p(),v(8,Ti,2,1,"span",6),c(9,"span",7),d(10),l(11,"translate"),p()(),v(12,$i,6,3,"a",8)),t&2&&(g("ngIf",!o.isListViewMode),s(),g("ngIf",o.entry.showDesignation),s(),g("bkdLet",m(3,10,o.loading$)),s(2),g("ngIf",(o.entry.precedingAbsences==null?null:o.entry.precedingAbsences.length)||!1),s(),g("routerLink",ie(14,Pi,o.entry.lessonPresence.StudentRef.Id))("queryParams",o.profileReturnParams),s(2),w(o.entry.lessonPresence.StudentFullName),s(),g("ngIf",o.isListViewMode&&o.showClassName),s(2),x(" ",o.hasUnconfirmedAbsences?m(11,12,"presence-control.entry.unconfirmed-absences"):""," "),s(2),g("ngIf",o.entry.canChangeIncident))},dependencies:[oe,fn,ae,xe,Ge,re,F,j],styles:['[_nghost-%COMP%]{padding:2rem 1rem;background-color:#fff;display:grid;grid-template-areas:"avatar status designation previously-absent" "avatar student-info student-info student-info" "avatar incident incident incident";grid-template-columns:min-content min-content 3fr min-content}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{align-self:center}.presence-category[_ngcontent-%COMP%]{text-decoration:none}.presence-category[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{top:.1875rem}.absent[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ea161f}.present[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#3d8608}.unapproved[_nghost-%COMP%] .presence-category[_ngcontent-%COMP%]{color:#ffa814}.presence-category[_ngcontent-%COMP%] bkd-spinner[_ngcontent-%COMP%]{color:#000;position:absolute;top:4px;left:5px}.designation[_ngcontent-%COMP%], .student-info[_ngcontent-%COMP%], a.incident[_ngcontent-%COMP%], .incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.avatar[_ngcontent-%COMP%]{grid-area:avatar;margin-right:1.5rem}.status[_ngcontent-%COMP%]{grid-area:status}.status[_ngcontent-%COMP%] .material-icons[_ngcontent-%COMP%]{font-size:2rem}.designation[_ngcontent-%COMP%]{grid-area:designation;text-align:left;line-height:2.375rem}.previously-absent[_ngcontent-%COMP%]{grid-area:previously-absent;text-decoration:none;color:#00000080;justify-self:end}.student-info[_ngcontent-%COMP%]{grid-area:student-info;display:flex;flex-direction:column;text-decoration:none}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child{text-decoration:underline}.student-info[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:first-child:hover{text-decoration-color:#ea161f}.unconfirmed-absences[_ngcontent-%COMP%]{color:#ea161f;font-size:.875rem;line-height:1}.study-class[_ngcontent-%COMP%]{font-size:.875rem;line-height:1}.incident[_ngcontent-%COMP%]{color:#00000080;padding-right:1.5rem;grid-area:incident;display:flex;text-decoration:none}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{text-decoration:underline}.incident[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:hover{text-decoration-color:#ea161f}.incident[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-right:.3em}.grid[_nghost-%COMP%] .status[_ngcontent-%COMP%], .grid[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{align-self:start;margin-left:-1.5rem;margin-top:-.375rem}.grid[_nghost-%COMP%] .incident[_ngcontent-%COMP%]{align-self:end;margin-left:-1.5rem;margin-bottom:-.375rem}.grid[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0;align-self:start}.grid[_nghost-%COMP%] .unconfirmed-absences[_ngcontent-%COMP%]{height:.875rem}.list[_nghost-%COMP%]{grid-template-areas:"student-info status incidentordesignation previously-absent";grid-template-columns:3fr min-content 4fr 3em;padding:.5rem 1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{justify-self:start}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{line-height:1;margin-bottom:.5rem}.list[_nghost-%COMP%] .incident[_ngcontent-%COMP%], .list[_nghost-%COMP%] .designation[_ngcontent-%COMP%]{grid-area:incidentordesignation}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{padding-right:0}@media (max-width: 750px){.list[_nghost-%COMP%]{grid-template-areas:"student-info student-info student-info previously-absent" "status incidentordesignation incidentordesignation incidentordesignation";grid-template-columns:min-content 1fr 1fr min-content;row-gap:1rem}.list[_nghost-%COMP%] .status[_ngcontent-%COMP%]{padding-left:0;padding-right:0}.list[_nghost-%COMP%] .student-name[_ngcontent-%COMP%]{margin-top:.5rem}.list[_nghost-%COMP%] .previously-absent[_ngcontent-%COMP%]{align-self:start}}']});let n=i;return n})();var Li=(n,i)=>({"btn-link":n,"btn-danger":i}),Ei=n=>["groups",n],Di=n=>({returnparams:n});function Bi(n,i){if(n&1){let r=M();c(0,"div",22),b("click",function(){P(r);let t=u();return S(t.lessonDropdown==null?null:t.lessonDropdown.toggle())}),d(1),l(2,"date"),c(3,"span",23),d(4),l(5,"date"),p()()}if(n&2){let r=u();s(),x(" ",U(2,2,r.selectedLesson.LessonDateTimeFrom,"HH:mm"),"\u2013"),s(3),w(U(5,5,r.selectedLesson.LessonDateTimeTo,"HH:mm"))}}function ji(n,i){if(n&1){let r=M();c(0,"div",29),b("click",function(){let t=P(r).$implicit,o=u(2);return S(o.selectLessonChange.emit(t))}),c(1,"div",30)(2,"div"),d(3),l(4,"date"),l(5,"date"),p(),c(6,"div",26),d(7),p(),c(8,"div",26),d(9),p()()()}if(n&2){let r=i.$implicit,e=u(2);z("active",r.id===e.selectedLesson.id),s(3),wt(" ",U(4,6,r.LessonDateTimeFrom,"HH:mm"),"\u2013",U(5,9,r.LessonDateTimeTo,"HH:mm")," "),s(4),w(r.eventDesignations),s(2),w(r.studyClassNumbers)}}function Fi(n,i){if(n&1&&(c(0,"div",24)(1,"div",25)(2,"div",26),d(3),p(),c(4,"div",26),d(5),p()(),c(6,"div",27),v(7,ji,10,12,"div",28),p()()),n&2){let r=u();s(3),w(r.selectedLesson.eventDesignations),s(2),w(r.selectedLesson.studyClassNumbers),s(2),g("ngForOf",r.lessons)}}function Vi(n,i){if(n&1){let r=M();c(0,"bkd-caret",31),b("click",function(){P(r);let t=u();return S(t.lessonDropdown==null?null:t.lessonDropdown.toggle())}),p()}if(n&2){let r=u();g("expanded",(r.lessonDropdown==null?null:r.lessonDropdown.isOpen())||!1)}}function Ai(n,i){if(n&1&&(c(0,"a",32),l(1,"async"),l(2,"async"),l(3,"async"),c(4,"i",33),d(5,"groups"),p()()),n&2){let r=u();g("ngClass",Tt(9,Li,m(1,3,r.isGroupSelected$)===!1,m(2,5,r.isGroupSelected$)))("routerLink",ie(12,Ei,r.selectedLesson.id))("queryParams",ie(14,Di,m(3,7,r.state.queryParamsString$)))}}function Ri(n,i){if(n&1){let r=M();c(0,"button",34),b("click",function(){let t=P(r).$implicit,o=u();return S(o.viewModeChange.emit(t.viewMode))}),c(1,"i",33),d(2),p()()}if(n&2){let r=i.$implicit,e=u();z("btn-outline-secondary",r.viewMode===e.viewMode)("btn-link",r.viewMode!==e.viewMode)("active",r.viewMode===e.viewMode),g("disabled",!e.selectedLesson),s(2),w(r.icon)}}var Ni=Le.prototype._positionMenu;Le.prototype._positionMenu=function(...i){let r=Ni.apply(this,i);if(this._anchor.nativeElement.id==="lesson-dropdown"){let e=this._bodyContainer||this._menu.nativeElement,t=e.style.transform?.match(/translate\(([0-9-.]+)px, ([0-9-.]+)px\)/);t&&parseFloat(t[1])<0&&(e.style.transform=`translate(0px, ${t[2]}px)`)}return r};var Wn=(()=>{let i=class i{constructor(e,t,o){this.state=e,this.groupService=t,this.presentCount=null,this.absentCount=null,this.unapprovedCount=null,this.absentPrecedingCount=null,this.search="",this.selectLessonChange=new Z,this.selectDateChange=new Z,this.searchChange=new Z,this.viewModeChange=new Z,this.viewModeOptions=[{viewMode:me.List,icon:"list"},{viewMode:me.Grid,icon:"view_module"}],this.isGroupSelected$=this.groupService.group$.pipe(f(zt)),o.popperOptions=a=>ge(ue({},a),{modifiers:a.modifiers?.map(h=>(h.name==="offset"&&(h.options={offset:({placement:C,reference:k,popper:N})=>C==="bottom-start"?[(window.innerWidth-N.width)/2-k.x,0]:[]}),h))})}};i.\u0275fac=function(t){return new(t||i)(_(G),_(de),_(Ue))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-header"]],viewQuery:function(t,o){if(t&1&&St(Le,5),t&2){let a;xt(a=It())&&(o.lessonDropdown=a.first)}},inputs:{selectedLesson:"selectedLesson",lessons:"lessons",presentCount:"presentCount",absentCount:"absentCount",unapprovedCount:"unapprovedCount",absentPrecedingCount:"absentPrecedingCount",viewMode:"viewMode",selectDate:"selectDate",search:"search"},outputs:{selectLessonChange:"selectLessonChange",selectDateChange:"selectDateChange",searchChange:"searchChange",viewModeChange:"viewModeChange"},standalone:!0,features:[he([Ue,{provide:Rt,useClass:Ut},{provide:Nt,useClass:Sn}]),E],decls:40,vars:20,consts:[["d","ngbDatepicker"],[1,"navigation"],[1,"lesson-date"],["type","button",1,"btn","btn-link",3,"click"],[1,"material-icons"],["positionTarget",".lesson-date-input","ngbDatepicker","","placement","bottom-start",1,"lesson-date-input",3,"ngModelChange","ngModel"],["class","lesson-time",3,"click",4,"ngIf"],["ngbDropdown","","class","lesson-description","container","body","display","dynamic","placement","bottom",4,"ngIf"],["class","dropdown-caret",3,"expanded","click",4,"ngIf"],[1,"states"],[1,"state","present"],[1,"count"],[1,"state","absent"],[1,"state","unapproved"],[1,"state","previously-absent"],[1,"material-icons-outlined"],[1,"search-and-views"],[1,"search",3,"valueChange","value","disabled","placeholder","label"],[1,"group-and-views","d-flex","align-items-center"],["type","button","class","group btn me-2 me-sm-4",3,"ngClass","routerLink","queryParams",4,"ngIf"],[1,"views"],["type","button","class","view btn btn-primary btn-icon",3,"disabled","btn-outline-secondary","btn-link","active","click",4,"ngFor","ngForOf"],[1,"lesson-time",3,"click"],[1,"lesson-time-to"],["ngbDropdown","","container","body","display","dynamic","placement","bottom",1,"lesson-description"],["id","lesson-dropdown","ngbDropdownToggle",""],[1,"text-truncate"],["ngbDropdownMenu","","aria-labelledby","lesson-dropdown"],["ngbDropdownItem","",3,"active","click",4,"ngFor","ngForOf"],["ngbDropdownItem","",3,"click"],[1,"lesson-entry"],[1,"dropdown-caret",3,"click","expanded"],["type","button",1,"group","btn","me-2","me-sm-4",3,"ngClass","routerLink","queryParams"],[1,"material-icons","align-middle"],["type","button",1,"view","btn","btn-primary","btn-icon",3,"click","disabled"]],template:function(t,o){if(t&1){let a=M();c(0,"div",1)(1,"div",2)(2,"button",3),b("click",function(){P(a);let C=ne(6);return S(C.toggle())}),c(3,"i",4),d(4,"calendar_today"),p()(),c(5,"input",5,0),b("ngModelChange",function(C){return P(a),S(o.selectDateChange.emit(C))}),p()(),v(7,Bi,6,8,"div",6)(8,Fi,8,3,"div",7)(9,Vi,1,1,"bkd-caret",8),p(),c(10,"div",9)(11,"div",10)(12,"i",4),d(13,"check_circle"),p(),c(14,"span",11),d(15),p()(),c(16,"div",12)(17,"i",4),d(18,"cancel"),p(),c(19,"span",11),d(20),p()(),c(21,"div",13)(22,"i",4),d(23,"help"),p(),c(24,"span",11),d(25),p()(),c(26,"div",14)(27,"i",15),d(28,"info"),p(),c(29,"span",11),d(30),p()()(),c(31,"div",16)(32,"bkd-resettable-input",17),l(33,"translate"),l(34,"translate"),b("valueChange",function(C){return P(a),S(o.searchChange.emit(C))}),p(),c(35,"div",18),v(36,Ai,6,16,"a",19),l(37,"async"),c(38,"div",20),v(39,Ri,3,8,"button",21),p()()()}t&2&&(s(5),g("ngModel",o.selectDate),s(2),g("ngIf",o.selectedLesson),s(),g("ngIf",o.selectedLesson),s(),g("ngIf",o.lessons.length>0),s(6),w(o.presentCount!==null?o.presentCount:"?"),s(5),w(o.absentCount!==null?o.absentCount:"?"),s(5),w(o.unapprovedCount!==null?o.unapprovedCount:"?"),s(5),w(o.absentPrecedingCount!==null?o.absentPrecedingCount:"?"),s(2),g("value",o.search)("disabled",!o.selectedLesson)("placeholder",m(33,14,"presence-control.header.search-by-name"))("label",m(34,16,"presence-control.header.search")),s(4),g("ngIf",m(37,18,o.selectedLesson&&o.state.groupsAvailability$)),s(3),g("ngForOf",o.viewModeOptions))},dependencies:[Gt,se,Ft,Vt,At,oe,Le,Wt,qt,R,Ht,cn,xn,Dt,Ge,re,Ce,F,j],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;padding:.75rem 0}.navigation[_ngcontent-%COMP%]{display:grid;grid-template-areas:". date time dropdown-caret" ". description description dropdown-caret";grid-template-columns:1fr auto auto 1fr;align-items:center}.lesson-date[_ngcontent-%COMP%]{grid-area:date;justify-self:end;display:flex;align-items:center;justify-content:flex-end}.lesson-date[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:0 .5ch 0 0}.lesson-date[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#000;position:relative}.lesson-date-input[_ngcontent-%COMP%]{font-weight:600;background:transparent;border:none;width:11ch}.lesson-time[_ngcontent-%COMP%]{grid-area:time;cursor:pointer}.lesson-description[_ngcontent-%COMP%]{grid-area:description;overflow:hidden;text-align:center;cursor:pointer}.dropdown-toggle[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-toggle[_ngcontent-%COMP%]:after{display:none}.dropdown-caret[_ngcontent-%COMP%]{grid-area:dropdown-caret;line-height:100%;text-align:left;color:#000}.dropdown-menu[_ngcontent-%COMP%]{width:50ch;padding:0;box-shadow:2px 2px 3px -1px #0003}@media (max-width: 800px){.dropdown-menu[_ngcontent-%COMP%]{width:100vw}}.dropdown-item[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6}.states[_ngcontent-%COMP%]{margin:.75rem 0;display:flex;justify-content:center}.state[_ngcontent-%COMP%]{margin-right:7%;display:flex}.state[_ngcontent-%COMP%]:last-child{margin-right:0}@media (min-width: 1000px){.state[_ngcontent-%COMP%]{margin-right:4rem}}.state.present[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#3d8608}.state.absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ea161f}.state.unapproved[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#ffa814}.state.previously-absent[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#00000080}.state[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{margin-left:.3em;margin-top:1px}.search-and-views[_ngcontent-%COMP%]{padding-top:.75rem;display:flex;justify-content:space-between;border-top:1px solid #dee2e6}.search[_ngcontent-%COMP%]{flex:auto;max-width:300px;margin-right:1rem}.views[_ngcontent-%COMP%]{display:flex}.view[_ngcontent-%COMP%]{color:#4e4e4ef2;background-color:#fff}.view.active[_ngcontent-%COMP%]{color:#fff;background-color:#4e4e4ef2;border:none}.group[_ngcontent-%COMP%], .view[_ngcontent-%COMP%]{text-decoration:none;padding-left:0;padding-right:0;aspect-ratio:1/1;width:calc(.75rem + 2 * var(--bs-border-width) + 1.625rem);border-radius:50%}.group.btn-link[_ngcontent-%COMP%]{color:#000}@media (max-width: 380px){[_nghost-%COMP%]{padding-left:.5rem;padding-right:.5rem}#search-addon[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem}}@media (max-width: 365px){.lesson-time[_ngcontent-%COMP%]{line-height:1}.lesson-time-to[_ngcontent-%COMP%]{display:block}.dropdown-caret[_ngcontent-%COMP%]{padding-left:0}}']});let n=i;return n})();function Gi(n,i){if(n&1){let r=M();c(0,"div",5)(1,"input",6),b("change",function(){let t=P(r).$implicit,o=u();return S(o.onSelectionChange(t))}),p(),c(2,"label",7),d(3),p()()}if(n&2){let r=i.$implicit,e=i.index,t=u();s(),J("id","incident-",e,""),g("checked",r.id===t.selected.id)("value",r.id),s(),J("for","incident-",e,""),s(),x(" ",r.label," ")}}var Qn=(()=>{let i=class i{constructor(e,t){this.activeModal=e,this.translate=t,this.incidentOptions=[]}ngOnInit(){let e=this.createIncidentOption();this.incidentOptions=this.incidentTypes.map(t=>this.createIncidentOption(t)),this.incidentOptions.unshift(e),this.selected=this.incidentOptions.find(t=>t.id===this.incident?.Id)||e}createIncidentOption(e){return{id:e?e.Id:null,label:e?e.Designation:this.translate.instant("presence-control.incident.no-incident")}}onSelectionChange(e){this.selected=e}getSelectedIncident(){return this.incidentTypes.find(e=>e.Id===this.selected?.id)||null}};i.\u0275fac=function(t){return new(t||i)(_(ce),_(Q))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-incident"]],inputs:{incident:"incident",incidentTypes:"incidentTypes"},standalone:!0,features:[E],decls:13,vars:10,consts:[[1,"modal-body"],["class","form-check",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-primary",3,"click"],[1,"form-check"],["type","radio","name","incident",1,"form-check-input",3,"change","id","checked","value"],[1,"form-check-label",3,"for"]],template:function(t,o){t&1&&(c(0,"div",0)(1,"p"),d(2),l(3,"translate"),p(),c(4,"form"),v(5,Gi,4,7,"div",1),p()(),c(6,"div",2)(7,"button",3),b("click",function(){return o.activeModal.dismiss()}),d(8),l(9,"translate"),p(),c(10,"button",4),b("click",function(){return o.activeModal.close(o.getSelectedIncident())}),d(11),l(12,"translate"),p()()),t&2&&(s(2),x(" ",m(3,4,"presence-control.incident.text")," "),s(3),g("ngForOf",o.incidentOptions),s(3),x(" ",m(9,6,"presence-control.incident.cancel")," "),s(3),x(" ",m(12,8,"presence-control.incident.save")," "))},dependencies:[se,ye,ve,be,R,F,j],styles:["form[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]:first-child{border-bottom:1px solid #dee2e6;padding-bottom:1rem;margin-bottom:1rem}"]});let n=i;return n})();var Ui=20,Hi=100,je=function(n){return n.AddUpdateAction="ADD",n.RemoveUpdateAction="REMOVE",n}(je||{}),et=(()=>{let i=class i{constructor(e,t,o,a,h){this.toastService=e,this.translate=t,this.restService=o,this.presenceTypesService=a,this.settings=h,this.destroy$=new $,this.action$=new $,this.pendingUpdates$=this.action$.pipe(Ct(this.reduceUpdates.bind(this),[]),vt()),this.revertUpdates$=new $,this.performUpdates$=this.pendingUpdates$.pipe(nt(Hi),$e(qe(ct)),_t(this.performUpdates.bind(this))),this.stateUpdates$=Y(this.pendingUpdates$,this.revertUpdates$).pipe(nt(Ui),$e(qe(ct))),this.performUpdates$.pipe(q(this.destroy$)).subscribe()}ngOnDestroy(){this.destroy$.next()}updatePresenceType(e,t=null){this.dispatchAddUpdate(e.lessonPresence,t)}performUpdates(e){let t=this.groupUpdates(e);return O(Object.keys(t).reduce((o,a)=>{let h=t[a];return Object.keys(h).forEach(C=>{let k=h[C];o.push(this.performUpdateForGroup(k))}),o},[])).pipe(f(()=>t))}performUpdateForGroup(e){return e.forEach(t=>this.dispatchRemoveUpdate(t.presence)),this.performLessonPresencesUpdatesByIds(e[0].presence.LessonRef.Id,e.map(t=>t.presence.StudentRef.Id),e[0].newPresenceTypeId).pipe(ht(t=>this.revertUpdatesAfterError(e,t)))}performLessonPresencesUpdatesByIds(e,t,o=null){return o?(o?this.presenceTypesService.getPresenceType(o):X(null)).pipe(T(h=>this.restService.editLessonPresences([e],t,h?.Id,We(h,this.settings)||void 0,{context:new ot().set(at,{disableErrorHandling:!0})}))):this.restService.removeLessonPresences([e],t,{context:new ot().set(at,{disableErrorHandling:!0})})}revertUpdatesAfterError(e,t){return console.error("Bulk-update of lesson presences failed"),console.error(t),this.toastService.error(this.translate.instant("shared.lesson-presences-update.error")),this.revertUpdates$.next(e.map(o=>ge(ue({},o),{newPresenceTypeId:o.presence.TypeRef.Id}))),X(void 0)}groupUpdates(e){return e.reduce((t,o)=>{let a=String(o.newPresenceTypeId&&o.newPresenceTypeId);return t[a]||(t[a]={}),Array.isArray(t[a][o.presence.LessonRef.Id])||(t[a][o.presence.LessonRef.Id]=[]),t[a][o.presence.LessonRef.Id].push(o),t},{})}reduceUpdates(e,t){switch(t.type){case je.AddUpdateAction:{let{presence:o,newPresenceTypeId:a}=t.payload,h=e.findIndex(Kn(o));return h===-1?[...e,{presence:o,newPresenceTypeId:a}]:[...e.slice(0,h),{presence:e[h].presence,newPresenceTypeId:a},...e.slice(h+1)]}case je.RemoveUpdateAction:return e.filter(qe(Kn(t.payload)));default:return e}}dispatchAddUpdate(e,t){this.action$.next({type:je.AddUpdateAction,payload:{presence:e,newPresenceTypeId:t}})}dispatchRemoveUpdate(e){this.action$.next({type:je.RemoveUpdateAction,payload:e})}};i.\u0275fac=function(t){return new(t||i)(y(Pe),y(Q),y(sn),y(Se),y(H))},i.\u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})();function Kn(n){return i=>i.presence.LessonRef.Id===n.LessonRef.Id&&i.presence.StudentRef.Id===n.StudentRef.Id}var qi=(n,i,r)=>({lesson:n,lessons:i,entries:r}),Wi=n=>({returnparams:n});function Qi(n,i){if(n&1){let r=M();c(0,"bkd-presence-control-entry",7),l(1,"async"),l(2,"async"),l(3,"async"),l(4,"async"),b("togglePresenceType",function(t){P(r);let o=u(5);return S(o.togglePresenceType(t))})("changeIncident",function(t){P(r);let o=u(5);return S(o.changeIncident(t))}),p()}if(n&2){let r,e=i.$implicit,t=u(5);g("entry",e)("hasUnconfirmedAbsences",m(1,5,t.state.hasUnconfirmedAbsences(e)))("viewMode",m(2,7,t.state.viewMode$))("showClassName",((r=m(3,9,t.state.studyClassCount$))!==null&&r!==void 0?r:0)>1)("profileReturnParams",ie(13,Wi,m(4,11,t.state.queryParamsString$)))}}function Ki(n,i){if(n&1&&(ee(0),c(1,"div"),l(2,"async"),v(3,Qi,5,15,"bkd-presence-control-entry",6),p(),te()),n&2){let r=u(3).bkdLet,e=u();s(),Ae("default-entries entries view-mode-",m(2,4,e.state.viewMode$),""),s(2),g("ngForOf",r.entries)}}function zi(n,i){n&1&&(c(0,"p",8),d(1),l(2,"translate"),p()),n&2&&(s(),x(" ",m(2,1,"presence-control.no-lesson-presences")," "))}function Ji(n,i){if(n&1&&(ee(0),v(1,Ki,4,6,"ng-container",4)(2,zi,3,3,"ng-template",null,2,_e),te()),n&2){let r=ne(3),e=u(2).bkdLet;s(),g("ngIf",(e.entries==null?null:e.entries.length)>0)("ngIfElse",r)}}function Xi(n,i){n&1&&(c(0,"p",8),d(1),l(2,"translate"),p()),n&2&&(s(),w(m(2,1,"presence-control.no-lessons")))}function Yi(n,i){if(n&1){let r=M();ee(0),c(1,"bkd-presence-control-header",5),l(2,"async"),l(3,"async"),l(4,"async"),l(5,"async"),l(6,"async"),l(7,"async"),l(8,"async"),b("searchChange",function(t){P(r);let o=u(2);return S(o.search$.next(t))})("viewModeChange",function(t){P(r);let o=u(2);return S(o.state.setViewMode(t))})("selectDateChange",function(t){P(r);let o=u(2);return S(o.state.setDate(t))})("selectLessonChange",function(t){P(r);let o=u(2);return S(o.state.setLessonId(t.id))}),p(),v(9,Ji,4,2,"ng-container",4)(10,Xi,3,3,"ng-template",null,1,_e),te()}if(n&2){let r=ne(11),e=u().bkdLet,t=u();s(),g("selectedLesson",e.lesson)("lessons",e.lessons)("presentCount",m(2,11,t.state.presentCount$))("absentCount",m(3,13,t.state.absentCount$))("unapprovedCount",m(4,15,t.state.unapprovedCount$))("absentPrecedingCount",m(5,17,t.state.absentPrecedingCount$))("viewMode",m(6,19,t.state.viewMode$))("selectDate",m(7,21,t.state.selectedDate$))("search",m(8,23,t.search$)),s(8),g("ngIf",e.lesson)("ngIfElse",r)}}function Zi(n,i){n&1&&W(0,"bkd-spinner")}function eo(n,i){if(n&1&&(ee(0),v(1,Yi,12,25,"ng-container",4),l(2,"async"),v(3,Zi,1,0,"ng-template",null,0,_e),te()),n&2){let r=ne(4),e=u();s(),g("ngIf",m(2,2,e.state.loading$)===!1)("ngIfElse",r)}}var Jn=(()=>{let i=class i{constructor(e,t,o,a,h,C,k){this.state=e,this.blockLessons=t,this.lessonPresencesUpdateService=o,this.presenceTypesService=a,this.modalService=h,this.scrollPosition=C,this.route=k,this.search$=new fe(""),this.entries$=O([this.state.presenceControlEntriesByGroup$,this.search$]).pipe(f(K(Pn)),B(1)),this.destroy$=new $}ngOnInit(){this.route.queryParams.pipe(q(this.destroy$)).subscribe(this.restoreStateFromParams.bind(this))}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}doTogglePresenceType(e){e.forEach(t=>this.state.getNextPresenceType(t).subscribe(o=>this.lessonPresencesUpdateService.updatePresenceType(t,o?o.Id:null)))}togglePresenceType(e){this.blockLessons.getBlockLessonPresenceControlEntries(e).pipe(D(1)).subscribe(t=>{if(t.length===1){let o=t[0];this.doTogglePresenceType([o])}else{let o=this.modalService.open(Un);o.componentInstance.entry=e,o.componentInstance.blockPresenceControlEntries=t,o.result.then(a=>{a&&this.doTogglePresenceType(a)},()=>{})}})}updateIncident(e,t){this.lessonPresencesUpdateService.updatePresenceType(e,t)}changeIncident(e){this.presenceTypesService.incidentTypes$.subscribe(t=>{let o=this.modalService.open(Qn);o.componentInstance.incident=t.find(a=>a.Id===e.presenceType?.Id)||null,o.componentInstance.incidentTypes=t,o.result.then(a=>{this.updateIncident(e,a?.Id||null)},()=>{})})}restoreStateFromParams(e){e.date&&this.state.setDate(jt(e.date));let t=String(e.lesson);t&&this.state.setLessonId(t),e.viewMode&&An.includes(e.viewMode)&&this.state.setViewMode(e.viewMode)}};i.\u0275fac=function(t){return new(t||i)(_(G),_(Ze),_(et),_(Se),_(Ie),_(In),_(Ne))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control-list"]],standalone:!0,features:[E],decls:7,vars:14,consts:[["loading",""],["noLessons",""],["noLessonPresences",""],[4,"bkdLet"],[4,"ngIf","ngIfElse"],[3,"searchChange","viewModeChange","selectDateChange","selectLessonChange","selectedLesson","lessons","presentCount","absentCount","unapprovedCount","absentPrecedingCount","viewMode","selectDate","search"],[3,"entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams","togglePresenceType","changeIncident",4,"ngFor","ngForOf"],[3,"togglePresenceType","changeIncident","entry","hasUnconfirmedAbsences","viewMode","showClassName","profileReturnParams"],[1,"mt-3"]],template:function(t,o){t&1&&(c(0,"h1"),d(1),l(2,"translate"),p(),v(3,eo,5,4,"ng-container",3),l(4,"async"),l(5,"async"),l(6,"async")),t&2&&(s(),w(m(2,2,"presence-control.title")),s(2),g("bkdLet",$t(10,qi,m(4,4,o.state.selectedLesson$),m(5,6,o.state.lessons$),m(6,8,o.entries$))))},dependencies:[ae,oe,Wn,R,qn,xe,re,F,j],styles:["bkd-presence-control-entry[_ngcontent-%COMP%]{border-bottom:1px solid #dee2e6}.entries.view-mode-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%}@media (min-width: 400px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:100%;border-right:1px solid #dee2e6}}@media (min-width: 800px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:50%;border-right:1px solid #dee2e6}}@media (min-width: 1200px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:33.3333333333%;border-right:1px solid #dee2e6}}@media (min-width: 1600px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:25%;border-right:1px solid #dee2e6}}@media (min-width: 2000px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:20%;border-right:1px solid #dee2e6}}@media (min-width: 2400px){.entries.view-mode-grid[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{width:16.6666666667%;border-right:1px solid #dee2e6}}[_nghost-%COMP%]{display:block;overflow:hidden;width:100%}.entries.view-mode-grid[_ngcontent-%COMP%]{width:calc(100% + 1px)}"],changeDetection:0});let n=i;return n})();var Xn=(()=>{let i=class i{constructor(e,t){this.state=e,this.lessonPresencesUpdateService=t,this.destroy$=new $}ngOnInit(){this.lessonPresencesUpdateService.stateUpdates$.pipe(q(this.destroy$)).subscribe(e=>this.state.updateLessonPresencesTypes(e))}ngOnDestroy(){this.destroy$.next()}};i.\u0275fac=function(t){return new(t||i)(_(G),_(et))},i.\u0275cmp=L({type:i,selectors:[["bkd-presence-control"]],standalone:!0,features:[he([G,Ze,de,on,{provide:Jt,useExisting:G}]),E],decls:1,vars:0,template:function(t,o){t&1&&W(0,"router-outlet")},dependencies:[Bt],changeDetection:0});let n=i;return n})();var Qs=[{path:"",component:Xn,children:[{path:"",component:Jn,data:{restoreScrollPositionFrom:["/presence-control/student/:id/addresses","/presence-control/student/:id/absences","/presence-control/student/:id/grades"]}},_n,{path:"groups/:id",component:Gn}]}];export{Qs as PRESENCE_CONTROL_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-2JTOMQIG.js b/public/apps/webapp-schulverwaltung/chunk-WMKWXTQE.js similarity index 97% rename from public/apps/webapp-schulverwaltung/chunk-2JTOMQIG.js rename to public/apps/webapp-schulverwaltung/chunk-WMKWXTQE.js index 3d5654c4..0db33969 100644 --- a/public/apps/webapp-schulverwaltung/chunk-2JTOMQIG.js +++ b/public/apps/webapp-schulverwaltung/chunk-WMKWXTQE.js @@ -1,2 +1,2 @@ -import{a as Di}from"./chunk-IA3IH2MK.js";import{a as Vi,b as Ni,c as ji}from"./chunk-V34B6ZOV.js";import{a as ki}from"./chunk-VTGXNMZL.js";import{a as $i}from"./chunk-VFMGCCGG.js";import{a as Ai}from"./chunk-RC3HL7KB.js";import"./chunk-KLXFX6SJ.js";import"./chunk-QHPTZGVN.js";import"./chunk-HHGALFFJ.js";import{a as hi,b as _i,e as Si}from"./chunk-2FIH3FGB.js";import{a as We}from"./chunk-MVTCHCDH.js";import"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{a as Ri}from"./chunk-QR6JUXUH.js";import{a as Li,b as Pi}from"./chunk-DXYHDL5D.js";import{a as Bi}from"./chunk-TK3HGFHH.js";import{a as Oi}from"./chunk-TNMAZX5O.js";import{a as Mi}from"./chunk-2IXEFCAH.js";import{b as xi,c as wi}from"./chunk-X2BR3YJG.js";import"./chunk-LO5XSJLW.js";import{a as Ii}from"./chunk-DMYOU5OM.js";import"./chunk-RWNJF4OZ.js";import{L as vi,M as pt,P as Ei,Q as mt,R as ht,S as qe,T as Ue,U as Ci,j as gi,v as bi,w as ut}from"./chunk-GI4AZI25.js";import{a as He,c as dt,e as yi}from"./chunk-Q5U6YZUT.js";import{b as Fi}from"./chunk-N6FFLIGM.js";import{a as Ge,c as Ti}from"./chunk-33NXTXD7.js";import{f as li,g as ci,j as di,w as we,y as fi}from"./chunk-FTRAQKUW.js";import{a as pi}from"./chunk-3AROKYRB.js";import{$ as j,$a as f,$c as xe,Ac as ot,Ad as ui,Ba as Pt,Bb as u,Bc as lt,C as It,Cb as m,Db as ie,E as ee,Ed as mi,Fa as Le,Fb as Z,Ga as b,Gc as zt,Gd as $e,Ha as q,Hd as de,I as xt,Ia as p,Ib as Mt,Id as ue,Ja as $,Jb as k,Kb as Ie,L as pe,Ma as Xe,Mb as Nt,Mc as ct,N as wt,Na as U,Nb as Rt,O as Se,Q as M,Qa as et,R as Ft,Ra as tt,Rb as jt,Sa as c,Sb as Ee,Ta as d,Tb as Me,Ua as D,V as At,Va as ge,Vb as at,W,Wa as be,Wb as Ce,Wc as ce,X as kt,Xa as it,Xb as $t,Xc as Qt,Y as Dt,Ya as V,Yc as Kt,Z as R,Zb as Ht,Zc as Yt,_a as x,a as _e,aa as Ot,ab as nt,ad as Re,b as ke,ba as H,bb as st,bd as Zt,cb as me,db as rt,e as se,eb as G,ec as Gt,ed as Jt,f as Ze,fb as he,fd as Xt,ga as Te,gb as O,h as Ct,ha as C,hb as B,hd as ei,i as yt,ia as y,ib as N,jb as h,jd as ti,k as St,kb as T,kd as ii,la as Bt,lb as E,ld as ni,m as S,ma as Je,mb as ve,md as si,n as De,nd as ri,pb as z,pc as Ne,qa as re,qb as Q,qc as Wt,ra as A,rb as K,rc as qt,rd as ai,s as ye,sb as le,sc as Ut,sd as je,tb as te,td as oi,ua as l,v as Oe,va as _,vb as Y,w as Be,wb as Vt,xa as I,xb as Pe,yb as Ve,z as Tt,za as Lt}from"./chunk-T7QWSMKM.js";var L=function(i){return i.Absent="absent",i.Dispensation="dispensation",i.HalfDay="half-day",i.Incident="incident",i.Present="present",i}(L||{}),Gi=(()=>{let t=class t{constructor(e,n){this.updateService=e,this.settings=n}update(e,n,r,a,o,g){let v=[];switch(r){case L.Present:v=this.createResetBulkRequests(e);break;case L.Absent:v=this.createAbsentEditBulkRequests(e,n,a,o);break;case L.Dispensation:v=this.createEditBulkRequests(e,null,this.settings.dispensationPresenceTypeId);break;case L.HalfDay:v=this.createEditBulkRequests(e,null,this.settings.halfDayPresenceTypeId);break;case L.Incident:v=this.createEditBulkRequests(e,null,g);break}return De(v).pipe(S(()=>{}))}createAbsentEditBulkRequests(e,n,r,a){return r===this.settings.excusedAbsenceStateId?this.createEditBulkRequests(e,r,a):r===this.settings.unexcusedAbsenceStateId?this.createEditBulkRequests(e,r,this.settings.absencePresenceTypeId):[...this.createEditBulkRequests(e.filter(Hi(n,this.settings)),r,this.settings.absencePresenceTypeId),...this.createEditBulkRequests(e.filter(we(Hi(n,this.settings))),r,null)]}createResetBulkRequests(e){return pt(e).map(({lessonIds:n,personIds:r})=>this.updateService.removeLessonPresences(n,r))}createEditBulkRequests(e,n,r){return pt(e).map(({lessonIds:a,personIds:o})=>this.updateService.editLessonPresences(a,o,r||void 0,n||void 0))}};t.\u0275fac=function(n){return new(n||t)(R(Ci),R(ce))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function Hi(i,t){return s=>{let e=i.find(n=>n.Id===s.TypeRef.Id);return!e||e.Id===t.dispensationPresenceTypeId||e.Id===t.halfDayPresenceTypeId||e.IsIncident}}var X=(()=>{let t=class t extends Pi{constructor(e,n,r,a,o,g,v){super(e,n,r,a,"/edit-absences"),this.lessonPresencesService=o,this.presenceTypesService=g,this.dropDownItemsService=v,this.presenceTypes$=this.loadPresenceTypes().pipe(pe(1)),this.absenceConfirmationStates$=this.loadAbsenceConfirmationStates().pipe(S(hi),pe(1)),this.presenceControlEntries$=De([this.entries$,this.presenceTypes$,this.absenceConfirmationStates$]).pipe(S(yi(Di)),pe(1)),this.selected=[],this.queryParamsString$.pipe(M(this.destroy$)).subscribe(F=>this.confirmBackLinkParams={returnparams:F})}resetSelection(){this.selected=[]}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,presenceTypes:null,confirmationStates:null,incidentTypes:null}}isValidFilter(e){return!!(e.student||e.educationalEvent||e.studyClass||e.teacher||e.dateFrom||e.dateTo||e.presenceTypes||e.confirmationStates||e.incidentTypes)}loadEntries(e,n,r){let a={sort:"StudentFullName.asc,LessonDateTimeFrom.asc"};return this.loadingService.load(this.lessonPresencesService.getFilteredList(e,r,a),Li)}buildParamsFromFilter(e){return Vi(e)}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.activePresenceTypes$)}loadAbsenceConfirmationStates(){return this.loadingService.load(this.dropDownItemsService.getAbsenceConfirmationStates())}};t.\u0275fac=function(n){return new(n||t)(R(Rt),R(Fi),R(Mi),R(ce),R(Si),R(Ue),R(We))},t.\u0275prov=W({token:t,factory:t.\u0275fac});let i=t;return i})();var _n=(i,t,s)=>({confirmationStates:i,categories:t,formGroup:s});function gn(i,t){if(i&1&&(c(0,"div",11),h(1),u(2,"translate"),d()),i&2){let s=t.$implicit;l(),E(" ",ie(2,1,"global.validation-errors."+s.error,s.params)," ")}}function bn(i,t){if(i&1&&(c(0,"option",23),h(1),d()),i&2){let s=t.$implicit;p("ngValue",s.Id),l(),E(" ",s.Designation," ")}}function vn(i,t){if(i&1&&(c(0,"select",22),u(1,"async"),c(2,"option",23),h(3),u(4,"translate"),d(),b(5,bn,2,2,"option",24),u(6,"async"),d()),i&2){let s,e=f(6);$("is-invalid",((s=m(1,5,e.absenceTypeIdErrors$))==null?null:s.length)||!1),l(2),p("ngValue",null),l(),E(" ",m(4,7,"edit-absences.edit.absence-type-placeholder")," "),l(2),p("ngForOf",m(6,9,e.absenceTypes$))}}function En(i,t){if(i&1&&(c(0,"div",25),h(1),u(2,"translate"),d()),i&2){let s=t.$implicit;l(),E(" ",ie(2,1,"global.validation-errors."+s.error,s.params)," ")}}function Cn(i,t){if(i&1&&(c(0,"div",18),D(1,"input",19),c(2,"label",14),h(3),d(),b(4,vn,7,11,"select",20)(5,En,3,4,"div",21),u(6,"async"),d()),i&2){let s=t.$implicit,e=f(5);l(),p("id","state-"+s.Key)("value",s.Key),l(),me("for","state-"+s.Key),l(),E(" ",s.Value," "),l(),p("ngIf",e.isExcused(s)),l(),p("ngForOf",m(6,6,e.absenceTypeIdErrors$))}}function yn(i,t){if(i&1&&(c(0,"div",16),b(1,Cn,7,8,"div",17),d()),i&2){let s=f(3).bkdLet;l(),p("ngForOf",s.confirmationStates)}}function Sn(i,t){if(i&1&&(c(0,"option",23),h(1),d()),i&2){let s=t.$implicit;p("ngValue",s.Id),l(),E(" ",s.Designation," ")}}function Tn(i,t){if(i&1&&(c(0,"div",25),h(1),u(2,"translate"),d()),i&2){let s=t.$implicit;l(),E(" ",ie(2,1,"global.validation-errors."+s.error,s.params)," ")}}function In(i,t){if(i&1&&(c(0,"div",16)(1,"select",26),u(2,"async"),c(3,"option",23),h(4),u(5,"translate"),d(),b(6,Sn,2,2,"option",24),u(7,"async"),d(),b(8,Tn,3,4,"div",21),u(9,"async"),d()),i&2){let s,e=f(4);l(),$("is-invalid",((s=m(2,6,e.incidentIdErrors$))==null?null:s.length)||!1),l(2),p("ngValue",null),l(),E(" ",m(5,8,"edit-absences.edit.incident-placeholder")," "),l(2),p("ngForOf",m(7,10,e.incidents$)),l(2),p("ngForOf",m(9,12,e.incidentIdErrors$))}}function xn(i,t){if(i&1&&(c(0,"div",12),D(1,"input",13),c(2,"label",14),h(3),u(4,"translate"),d(),b(5,yn,2,1,"div",15)(6,In,10,14,"div",15),d()),i&2){let s=t.$implicit,e=f(3);l(),p("id","category-"+s)("value",s),l(),me("for","category-"+s),l(),E(" ",m(4,6,"edit-absences.edit.categories."+s)," "),l(2),p("ngIf",e.isAbsent(s)),l(),p("ngIf",e.isIncident(s))}}function wn(i,t){i&1&&(c(0,"div",27)(1,"span",28),h(2,"Loading..."),d()())}function Fn(i,t){if(i&1){let s=V();c(0,"form",3),x("ngSubmit",function(){C(s);let n=f(2);return y(n.onSubmit())}),b(1,gn,3,4,"div",4),u(2,"async"),c(3,"div",5),b(4,xn,7,8,"div",6),d(),c(5,"div",7)(6,"button",8),u(7,"async"),x("click",function(){C(s);let n=f(2);return y(n.cancel())}),h(8),u(9,"translate"),d(),c(10,"button",9),u(11,"async"),h(12),u(13,"translate"),b(14,wn,3,0,"div",10),u(15,"async"),d()()()}if(i&2){let s=f().bkdLet,e=f();p("formGroup",s.formGroup),l(),p("ngForOf",m(2,8,e.formErrors$)),l(3),p("ngForOf",s.categories),l(2),p("disabled",m(7,10,e.saving$)),l(2),E(" ",m(9,12,"edit-absences.edit.cancel")," "),l(2),p("disabled",m(11,14,e.saving$)),l(2),E(" ",m(13,16,"edit-absences.edit.save")," "),l(2),p("ngIf",m(15,18,e.saving$))}}function An(i,t){if(i&1&&(c(0,"div",1),b(1,Fn,16,20,"form",2),d()),i&2){let s=t.bkdLet;l(),p("ngIf",s.formGroup&&s.confirmationStates)}}var Wi=(()=>{let t=class t{constructor(e,n,r,a,o,g,v,F,P,oe){this.fb=e,this.router=n,this.route=r,this.toastService=a,this.translate=o,this.state=g,this.dropDownItemsService=v,this.presenceTypesService=F,this.updateService=P,this.settings=oe,this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.incidents$=this.presenceTypesService.incidentTypes$,this.formGroup$=this.createFormGroup(),this.saving$=new Ze(!1),this.submitted$=new Ze(!1),this.formErrors$=He(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=He(this.formGroup$,this.submitted$,"absenceTypeId"),this.incidentIdErrors$=He(this.formGroup$,this.submitted$,"incidentId"),this.availableCategories=[L.Absent,L.Dispensation,L.HalfDay,L.Incident,L.Present],this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(S(this.sortAbsenceConfirmationStates.bind(this)),pe(1)),this.activeCategories$=this.presenceTypesService.halfDayActive$.pipe(S(J=>J?this.availableCategories:this.availableCategories.filter(fe=>fe!==L.HalfDay))),this.destroy$=new se}ngOnInit(){this.state.selected.length===0&&this.navigateBack(),dt(this.formGroup$,"category").pipe(M(this.destroy$)).subscribe(this.updateConfirmationValueDisabled.bind(this)),dt(this.formGroup$,"confirmationValue").pipe(M(this.destroy$)).subscribe(this.updateAbsenceTypeIdDisabled.bind(this))}ngOnDestroy(){this.destroy$.next()}isAbsent(e){return e===L.Absent}isExcused(e){return e.Key===this.settings.excusedAbsenceStateId}isIncident(e){return e===L.Incident}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(ee(1)).subscribe(e=>{e.valid&&this.save(e)})}cancel(){this.navigateBack()}createFormGroup(){return this.getInitialAbsenceTypeId().pipe(S(e=>this.fb.group({category:[L.Absent,xe.required],confirmationValue:[this.settings.excusedAbsenceStateId,xe.required],absenceTypeId:[e,xe.required],incidentId:[{value:null,disabled:!0},xe.required]})),pe(1))}getInitialAbsenceTypeId(){return this.absenceTypes$.pipe(ee(1),S(e=>{let n=e.map(a=>a.Id),r=ui(this.state.selected.map(a=>a.TypeRef.Id));return r.length===1&&r[0]!=null&&n.includes(r[0])?r[0]:null}))}updateConfirmationValueDisabled(){this.formGroup$.pipe(ee(1)).subscribe(e=>{let n=e.get("category"),r=e.get("confirmationValue"),a=e.get("absenceTypeId"),o=e.get("incidentId");n&&r&&a&&o&&(n.value===L.Absent?(r.enable(),this.updateAbsenceTypeIdDisabled()):(r.disable(),a.disable()),n.value===L.Incident?o.enable():o.disable())})}updateAbsenceTypeIdDisabled(){this.formGroup$.pipe(ee(1)).subscribe(e=>{let n=e.get("confirmationValue"),r=e.get("absenceTypeId");n&&r&&(n.value===this.settings.excusedAbsenceStateId?r.enable():r.disable())})}save(e){this.saving$.next(!0);let{category:n,confirmationValue:r,absenceTypeId:a,incidentId:o}=e.value;this.presenceTypesService.presenceTypes$.pipe(Se(g=>this.updateService.update(this.state.selected,g,n,r,a,o)),xt(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.state.resetSelection(),this.toastService.success(this.translate.instant("edit-absences.edit.save-success")),this.navigateBack(!0)}navigateBack(e){this.route.queryParams.pipe(ee(1)).subscribe(n=>{this.router.navigate(["/edit-absences"],{queryParams:ke(_e({},Ii(n.returnparams)),{reload:e})})})}sortAbsenceConfirmationStates(e){return e.slice().sort((n,r)=>n.Key===this.settings.excusedAbsenceStateId?-1:r.Key===this.settings.excusedAbsenceStateId?1:n.Value.localeCompare(r.Value))}};t.\u0275fac=function(n){return new(n||t)(_(ai),_(qt),_(Ne),_(pi),_($e),_(X),_(We),_(Ue),_(Gi),_(ce))},t.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-edit"]],standalone:!0,features:[te],decls:7,vars:14,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],["class","alert alert-danger",4,"ngFor","ngForOf"],[1,"form-group","pb-4"],["class","form-check mt-2 mb-3",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"alert","alert-danger"],[1,"form-check","mt-2","mb-3"],["type","radio","formControlName","category",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],["class","ms-5",4,"ngIf"],[1,"ms-5"],["class","form-check mt-2 mb-2",4,"ngFor","ngForOf"],[1,"form-check","mt-2","mb-2"],["type","radio","formControlName","confirmationValue",1,"form-check-input",3,"id","value"],["class","form-select mt-1","formControlName","absenceTypeId",3,"is-invalid",4,"ngIf"],["class","invalid-feedback",4,"ngFor","ngForOf"],["formControlName","absenceTypeId",1,"form-select","mt-1"],[3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"invalid-feedback"],["formControlName","incidentId",1,"form-select","mt-1"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,r){n&1&&(c(0,"h1"),h(1),u(2,"translate"),d(),b(3,An,2,1,"div",0),u(4,"async"),u(5,"async"),u(6,"async")),n&2&&(l(),T(m(2,2,"edit-absences.title")),l(2),p("bkdLet",Pe(10,_n,m(4,4,r.confirmationStates$),m(5,6,r.activeCategories$),m(6,8,r.formGroup$))))},dependencies:[Ge,Me,je,Xt,si,ri,Yt,ni,ei,Re,Zt,oi,ti,ii,Ee,Ce,ue,de],changeDetection:0});let i=t;return i})();var Qe=(()=>{let t=class t extends vi{};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(t)))(r||t)}})(),t.\u0275prov=W({token:t,factory:t.\u0275fac});let i=t;return i})();var Dn=["content"],On=["scroll"],Bn=["padding"],zi=["*"],Ae=i=>({searchTerm:i});function Ln(i,t){if(i&1&&(c(0,"div",3),it(1,6),d()),i&2){let s=f();l(),p("ngTemplateOutlet",s.headerTemplate)("ngTemplateOutletContext",Y(2,Ae,s.filterValue))}}function Pn(i,t){if(i&1&&(c(0,"div",5),it(1,6),d()),i&2){let s=f();l(),p("ngTemplateOutlet",s.footerTemplate)("ngTemplateOutletContext",Y(2,Ae,s.filterValue))}}var Vn=["searchInput"],Mn=["clearButton"],Nn=(i,t,s)=>({item:i,clear:t,label:s}),Rn=(i,t)=>({items:i,clear:t}),jn=(i,t,s,e)=>({item:i,item$:t,index:s,searchTerm:e});function $n(i,t){if(i&1){let s=V();c(0,"span",21),x("click",function(){C(s);let n=f().$implicit,r=f(2);return y(r.unselect(n))}),h(1,"\xD7"),d(),D(2,"span",22)}if(i&2){let s=f().$implicit,e=f(2);l(2),p("ngItemLabel",s.label)("escape",e.escapeHTML)}}function Hn(i,t){}function Gn(i,t){if(i&1&&(c(0,"div",20),b(1,$n,3,2,"ng-template",null,1,Z)(3,Hn,0,0,"ng-template",12),d()),i&2){let s=t.$implicit,e=N(2),n=f(2);$("ng-value-disabled",s.disabled),l(3),p("ngTemplateOutlet",n.labelTemplate||e)("ngTemplateOutletContext",Pe(4,Nn,s.value,n.clearItem,s.label))}}function Wn(i,t){if(i&1&&et(0,Gn,4,8,"div",19,Xe().trackByOption,!0),i&2){let s=f();tt(s.selectedItems)}}function qn(i,t){}function Un(i,t){if(i&1&&b(0,qn,0,0,"ng-template",12),i&2){let s=f();p("ngTemplateOutlet",s.multiLabelTemplate)("ngTemplateOutletContext",Vt(2,Rn,s.selectedValues,s.clearItem))}}function zn(i,t){i&1&&D(0,"div",24)}function Qn(i,t){}function Kn(i,t){if(i&1&&b(0,zn,1,0,"ng-template",null,2,Z)(2,Qn,0,0,"ng-template",23),i&2){let s=N(1),e=f();l(2),p("ngTemplateOutlet",e.loadingSpinnerTemplate||s)}}function Yn(i,t){if(i&1&&(c(0,"span",15,3)(2,"span",25),h(3,"\xD7"),d()()),i&2){let s=f();me("title",s.clearAllText)}}function Zn(i,t){if(i&1&&D(0,"span",30),i&2){let s=f().$implicit,e=f(2);p("ngItemLabel",s.label)("escape",e.escapeHTML)}}function Jn(i,t){}function Xn(i,t){if(i&1){let s=V();c(0,"div",29),x("click",function(){let n=C(s).$implicit,r=f(2);return y(r.toggleItem(n))})("mouseover",function(){let n=C(s).$implicit,r=f(2);return y(r.onItemHover(n))}),b(1,Zn,1,2,"ng-template",null,4,Z)(3,Jn,0,0,"ng-template",12),d()}if(i&2){let s=t.$implicit,e=N(2),n=f(2);$("ng-option-disabled",s.disabled)("ng-option-selected",s.selected)("ng-optgroup",s.children)("ng-option",!s.children)("ng-option-child",!!s.parent)("ng-option-marked",s===n.itemsList.markedItem),q("role",s.children?"group":"option")("aria-selected",s.selected)("id",s==null?null:s.htmlId),l(3),p("ngTemplateOutlet",s.children?n.optgroupTemplate||e:n.optionTemplate||e)("ngTemplateOutletContext",Ve(17,jn,s.value,s,s.index,n.searchTerm))}}function es(i,t){if(i&1&&(c(0,"span")(1,"span",32),h(2),d(),h(3),d()),i&2){let s=f(3);l(2),T(s.addTagText),l(),E('"',s.searchTerm,'"')}}function ts(i,t){}function is(i,t){if(i&1){let s=V();c(0,"div",31),x("mouseover",function(){C(s);let n=f(2);return y(n.itemsList.unmarkItem())})("click",function(){C(s);let n=f(2);return y(n.selectTag())}),b(1,es,4,2,"ng-template",null,5,Z)(3,ts,0,0,"ng-template",12),d()}if(i&2){let s=N(2),e=f(2);$("ng-option-marked",!e.itemsList.markedItem),l(3),p("ngTemplateOutlet",e.tagTemplate||s)("ngTemplateOutletContext",Y(4,Ae,e.searchTerm))}}function ns(i,t){if(i&1&&(c(0,"div",33),h(1),d()),i&2){let s=f(3);l(),T(s.notFoundText)}}function ss(i,t){}function rs(i,t){if(i&1&&b(0,ns,2,1,"ng-template",null,6,Z)(2,ss,0,0,"ng-template",12),i&2){let s=N(1),e=f(2);l(2),p("ngTemplateOutlet",e.notFoundTemplate||s)("ngTemplateOutletContext",Y(2,Ae,e.searchTerm))}}function as(i,t){if(i&1&&(c(0,"div",33),h(1),d()),i&2){let s=f(3);l(),T(s.typeToSearchText)}}function os(i,t){}function ls(i,t){if(i&1&&b(0,as,2,1,"ng-template",null,7,Z)(2,os,0,0,"ng-template",23),i&2){let s=N(1),e=f(2);l(2),p("ngTemplateOutlet",e.typeToSearchTemplate||s)}}function cs(i,t){if(i&1&&(c(0,"div",33),h(1),d()),i&2){let s=f(3);l(),T(s.loadingText)}}function ds(i,t){}function us(i,t){if(i&1&&b(0,cs,2,1,"ng-template",null,8,Z)(2,ds,0,0,"ng-template",12),i&2){let s=N(1),e=f(2);l(2),p("ngTemplateOutlet",e.loadingTextTemplate||s)("ngTemplateOutletContext",Y(2,Ae,e.searchTerm))}}function ps(i,t){if(i&1){let s=V();c(0,"ng-dropdown-panel",26),x("update",function(n){C(s);let r=f();return y(r.viewPortItems=n)})("scroll",function(n){C(s);let r=f();return y(r.scroll.emit(n))})("scrollToEnd",function(n){C(s);let r=f();return y(r.scrollToEnd.emit(n))})("outsideClick",function(){C(s);let n=f();return y(n.close())}),ge(1),et(2,Xn,4,22,"div",27,Xe().trackByOption,!0),b(4,is,4,6,"div",28),be(),b(5,rs,3,4)(6,ls,3,1)(7,us,3,4),d()}if(i&2){let s=f();$("ng-select-multiple",s.multiple),p("virtualScroll",s.virtualScroll)("bufferAmount",s.bufferAmount)("appendTo",s.appendTo)("position",s.dropdownPosition)("headerTemplate",s.headerTemplate)("footerTemplate",s.footerTemplate)("filterValue",s.searchTerm)("items",s.itemsList.filteredItems)("markedItem",s.itemsList.markedItem)("ngClass",s.appendTo?s.classes:null)("id",s.dropdownId),l(2),tt(s.viewPortItems),l(2),U(s.showAddTag?4:-1),l(),U(s.showNoItemsFound()?5:-1),l(),U(s.showTypeToSearch()?6:-1),l(),U(s.loading&&s.itemsList.filteredItems.length===0?7:-1)}}var Qi=/[&<>"']/g,ms=RegExp(Qi.source),hs={"&":"&","<":"<",">":">",'"':""","'":"'"};function fs(i){return i&&ms.test(i)?i.replace(Qi,t=>hs[t]):i}function w(i){return i!=null}function Fe(i){return typeof i=="object"&&w(i)}function _s(i){return i instanceof Promise}function Ye(i){return i instanceof Function}var gs=(()=>{let t=class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?fs(this.ngItemLabel):this.ngItemLabel}};t.\u0275fac=function(n){return new(n||t)(_(re))},t.\u0275dir=H({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[Te]});let i=t;return i})(),bt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-option-tmp",""]]});let i=t;return i})(),vt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-optgroup-tmp",""]]});let i=t;return i})(),bs=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-label-tmp",""]]});let i=t;return i})(),Et=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-multi-label-tmp",""]]});let i=t;return i})(),vs=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-header-tmp",""]]});let i=t;return i})(),Es=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-footer-tmp",""]]});let i=t;return i})(),Cs=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-notfound-tmp",""]]});let i=t;return i})(),ys=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-typetosearch-tmp",""]]});let i=t;return i})(),Ss=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-loadingtext-tmp",""]]});let i=t;return i})(),Ts=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-tag-tmp",""]]});let i=t;return i})(),Is=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-loadingspinner-tmp",""]]});let i=t;return i})();function Ki(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var xs={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function Ke(i){let t=s=>xs[s]||s;return i.replace(/[^\u0000-\u007E]/g,t)}var _t=class{constructor(t,s){this._ngSelect=t,this._selectionModel=s,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let t=this.selectedItems.length-1;for(;t>=0;t--){let s=this.selectedItems[t];if(!s.disabled)return s}return null}setItems(t){this._items=t.map((s,e)=>this.mapItem(s,e)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(t){if(t.selected||this.maxItemsSelected)return;let s=this._ngSelect.multiple;s||this.clearSelected(),this._selectionModel.select(t,s,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(t)}unselect(t){t.selected&&(this._selectionModel.unselect(t,this._ngSelect.multiple),this._ngSelect.hideSelected&&w(t.index)&&this._ngSelect.multiple&&this._showSelected(t))}findItem(t){let s;return this._ngSelect.compareWith?s=e=>this._ngSelect.compareWith(e.value,t):this._ngSelect.bindValue?s=e=>!e.children&&this.resolveNested(e.value,this._ngSelect.bindValue)===t:s=e=>e.value===t||!e.children&&e.label&&e.label===this.resolveNested(t,this._ngSelect.bindLabel),this._items.find(e=>s(e))}addItem(t){let s=this.mapItem(t,this._items.length);return this._items.push(s),this._filteredItems.push(s),s}clearSelected(t=!1){this._selectionModel.clear(t),this._items.forEach(s=>{s.selected=t&&s.selected&&s.disabled,s.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(t){return t=Ke(t).toLocaleLowerCase(),this.filteredItems.find(s=>Ke(s.label).toLocaleLowerCase().substr(0,t.length)===t)}filter(t){if(!t){this.resetFilteredItems();return}this._filteredItems=[],t=this._ngSelect.searchFn?t:Ke(t).toLocaleLowerCase();let s=this._ngSelect.searchFn||this._defaultSearchFn,e=this._ngSelect.hideSelected;for(let n of Array.from(this._groups.keys())){let r=[];for(let a of this._groups.get(n)){if(e&&(a.parent&&a.parent.selected||a.selected))continue;let o=this._ngSelect.searchFn?a.value:a;s(t,o)&&r.push(a)}if(r.length>0){let[a]=r.slice(-1);if(a.parent){let o=this._items.find(g=>g===a.parent);this._filteredItems.push(o)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(t=>!t.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(t){this._markedIndex=this._filteredItems.indexOf(t)}markSelectedOrDefault(t){if(this._filteredItems.length===0)return;let s=this._getLastMarkedIndex();s>-1?this._markedIndex=s:this._markedIndex=t?this.filteredItems.findIndex(e=>!e.disabled):-1}resolveNested(t,s){if(!Fe(t))return t;if(s.indexOf(".")===-1)return t[s];{let e=s.split("."),n=t;for(let r=0,a=e.length;rthis.selectedItems.indexOf(s)===-1))}_showSelected(t){if(this._filteredItems.push(t),t.parent){let s=t.parent;this._filteredItems.find(n=>n===s)||this._filteredItems.push(s)}else if(t.children)for(let s of t.children)s.selected=!1,this._filteredItems.push(s);this._filteredItems=[...this._filteredItems.sort((s,e)=>s.index-e.index)]}_hideSelected(t){this._filteredItems=this._filteredItems.filter(s=>s!==t),t.parent?t.parent.children.every(e=>e.selected)&&(this._filteredItems=this._filteredItems.filter(e=>e!==t.parent)):t.children&&(this._filteredItems=this.filteredItems.filter(s=>s.parent!==t))}_defaultSearchFn(t,s){return Ke(s.label).toLocaleLowerCase().indexOf(t)>-1}_getNextItemIndex(t){return t>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(t){this._filteredItems.length===0||this._filteredItems.every(s=>s.disabled)||(this._markedIndex=this._getNextItemIndex(t),this.markedItem.disabled&&this._stepToItem(t))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let t=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&t<0?-1:Math.max(this.markedIndex,t)}_groupBy(t,s){let e=new Map;if(t.length===0)return e;if(Array.isArray(t[0].value[s])){for(let a of t){let o=(a.value[s]||[]).map((g,v)=>this.mapItem(g,v));e.set(a,o)}return e}let n=Ye(this._ngSelect.groupBy),r=a=>{let o=n?s(a.value):a.value[s];return w(o)?o:void 0};for(let a of t){let o=r(a),g=e.get(o);g?g.push(a):e.set(o,[a])}return e}_flatten(t){let s=Ye(this._ngSelect.groupBy),e=[];for(let n of Array.from(t.keys())){let r=e.length;if(n===void 0){let P=t.get(void 0)||[];e.push(...P.map(oe=>(oe.index=r++,oe)));continue}let a=Fe(n),o={label:a?"":String(n),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:Ki()},g=s?this._ngSelect.bindLabel:this._ngSelect.groupBy,v=this._ngSelect.groupValue||(()=>a?n.value:{[g]:n}),F=t.get(n).map(P=>(P.parent=o,P.children=void 0,P.index=r++,P));o.children=F,o.value=v(n,F.map(P=>P.value)),e.push(o),e.push(...F)}return e}},ne=function(i){return i[i.Tab=9]="Tab",i[i.Enter=13]="Enter",i[i.Esc=27]="Esc",i[i.Space=32]="Space",i[i.ArrowUp=38]="ArrowUp",i[i.ArrowDown=40]="ArrowDown",i[i.Backspace=8]="Backspace",i}(ne||{}),Yi=(()=>{let t=class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,n,r){let a=this._dimensions,o=a.itemHeight*n,v=Math.max(0,e)/o*n,F=Math.min(n,Math.ceil(v)+(a.itemsPerViewport+1)),oe=Math.max(0,F-a.itemsPerViewport),J=Math.min(oe,Math.floor(v)),fe=a.itemHeight*Math.ceil(J)-a.itemHeight*Math.min(J,r);return fe=isNaN(fe)?0:fe,J=isNaN(J)?-1:J,F=isNaN(F)?-1:F,J-=r,J=Math.max(0,J),F+=r,F=Math.min(n,F),{topPadding:fe,scrollHeight:o,start:J,end:F}}setDimensions(e,n){let r=Math.max(1,Math.floor(n/e));this._dimensions={itemHeight:e,panelHeight:n,itemsPerViewport:r}}getScrollTo(e,n,r){let{panelHeight:a}=this.dimensions,o=e+n,g=r,v=g+a;return a>=o&&r===e?null:o>v?g+o-v:e<=g?e:null}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac});let i=t;return i})(),qi=["top","right","bottom","left"],ws=typeof requestAnimationFrame<"u"?yt:Ct,Ui=(()=>{let t=class t{constructor(e,n,r,a,o){this._renderer=e,this._zone=n,this._panelService=r,this._document=o,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new A,this.scroll=new A,this.scrollToEnd=new A,this.outsideClick=new A,this._destroy$=new se,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=a.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){let{itemHeight:e,panelHeight:n}=this._panelService.dimensions,r=this.markedItem.index*e;return n>r?0:r}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){let n=e.items;this._onItemsChange(n.currentValue,n.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,n=!1){if(!e)return;let r=this.items.indexOf(e);if(r<0||r>=this.itemsLength)return;let a;if(this.virtualScroll){let o=this._panelService.dimensions.itemHeight;a=this._panelService.getScrollTo(r*o,o,this._lastScrollPosition)}else{let o=this._dropdown.querySelector(`#${e.htmlId}`),g=n?o.offsetTop:this._lastScrollPosition;a=this._panelService.getScrollTo(o.offsetTop,o.clientHeight,g)}w(a)&&(this._scrollablePanel.scrollTop=a)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),qi.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){qi.forEach(r=>{let a=`ng-select-${r}`;this._renderer.removeClass(this._dropdown,a),this._renderer.removeClass(this._select,a)});let n=`ng-select-${e}`;this._renderer.addClass(this._dropdown,n),this._renderer.addClass(this._select,n)}_handleScroll(){this._zone.runOutsideAngular(()=>{ye(this.scrollElementRef.nativeElement,"scroll").pipe(M(this._destroy$),Tt(0,ws)).subscribe(e=>{let n=e.path||e.composedPath&&e.composedPath();if(!n||n.length===0&&!e.target)return;let r=!n||n.length===0?e.target.scrollTop:n[0].scrollTop;this._onContentScrolled(r)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Oe(ye(this._document,"touchstart",{capture:!0}),ye(this._document,"click",{capture:!0})).pipe(M(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let n=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&n&&n[0]&&this._select.contains(n[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,n){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(n):(this._setVirtualHeight(),this._updateItems(n))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let n=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,n),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;let n=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(n.scrollHeight),this._contentPanel.style.transform=`translateY(${n.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(n.start,n.end)),this.scroll.emit({start:n.start,end:n.end})}),w(e)&&this._lastScrollPosition===0&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{let r=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${r*this.itemsLength}px`;let a=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(r,a),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let n=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=n.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let n=this._select.getBoundingClientRect(),r=document.documentElement.scrollTop||document.body.scrollTop,a=n.top+window.pageYOffset,o=n.height,g=e.getBoundingClientRect().height;return a+o+g>r+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),n=this._parent.getBoundingClientRect(),r=e.left-n.left;this._dropdown.style.left=r+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),n=this._parent.getBoundingClientRect(),r=e.height;if(this._currentPosition==="top"){let a=n.bottom-e.bottom;this._dropdown.style.bottom=a+r+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let a=e.top-n.top;this._dropdown.style.top=a+r+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{ye(this._dropdown,"mousedown").pipe(M(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}};t.\u0275fac=function(n){return new(n||t)(_(Lt),_(Pt),_(Yi),_(re),_(Nt,8))},t.\u0275cmp=j({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(n,r){if(n&1&&(he(Dn,7,re),he(On,7,re),he(Bn,7,re)),n&2){let a;O(a=B())&&(r.contentElementRef=a.first),O(a=B())&&(r.scrollElementRef=a.first),O(a=B())&&(r.paddingElementRef=a.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",k],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Le,Te],ngContentSelectors:zi,decls:9,vars:6,consts:[["scroll",""],["padding",""],["content",""],[1,"ng-dropdown-header"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],[1,"ng-dropdown-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(nt(),b(0,Ln,2,4,"div",3),c(1,"div",4,0),D(3,"div",null,1),c(5,"div",null,2),st(7),d()(),b(8,Pn,2,4,"div",5)),n&2&&(U(r.headerTemplate?0:-1),l(3),$("total-padding",r.virtualScroll),l(2),$("scrollable-content",r.virtualScroll&&r.items.length),l(3),U(r.footerTemplate?8:-1))},dependencies:[at],encapsulation:2,changeDetection:0});let i=t;return i})(),Fs=(()=>{let t=class t{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new se}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this.disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this.disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}};t.\u0275fac=function(n){return new(n||t)(_(re))},t.\u0275cmp=j({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",k]},features:[Le,Te],ngContentSelectors:zi,decls:1,vars:0,template:function(n,r){n&1&&(nt(),st(0))},encapsulation:2,changeDetection:0});let i=t;return i})(),As=(()=>{let t=class t{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),ks=(()=>{let t=class t{warn(e){console.warn(e)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),Zi=new Dt("ng-select-selection-model"),Ji=(()=>{let t=class t{get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!Ye(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return w(this._clearSearchOnAdd)?this._clearSearchOnAdd:w(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return w(this._deselectOnClick)?this._deselectOnClick:w(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}constructor(e,n,r,a,o,g,v){this.classes=e,this.autoFocus=n,this.config=r,this._cd=g,this._console=v,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=F=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new A,this.focusEvent=new A,this.changeEvent=new A,this.openEvent=new A,this.closeEvent=new A,this.searchEvent=new A,this.clearEvent=new A,this.addEvent=new A,this.removeEvent=new A,this.scroll=new A,this.scrollToEnd=new A,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Ki(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new se,this._keyPress$=new se,this._onChange=F=>{},this._onTouched=()=>{},this.clearItem=F=>{let P=this.selectedItems.find(oe=>oe.value===F);this.unselect(P)},this.trackByOption=(F,P)=>this.trackByFn?this.trackByFn(P.value):P,this._mergeGlobalConfig(r),this.itemsList=new _t(this,a()),this.element=o.nativeElement}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=w(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),w(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(ne[e.which]){if(this.keyDownFn(e)===!1)return;this.handleKeyCode(e)}else e.key&&e.key.length===1&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){let n=e.target;this.clearButton&&this.clearButton.nativeElement===n?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case ne.ArrowDown:this._handleArrowDown(e);break;case ne.ArrowUp:this._handleArrowUp(e);break;case ne.Space:this._handleSpace(e);break;case ne.Enter:this._handleEnter(e);break;case ne.Tab:this._handleTab(e);break;case ne.Esc:this.close(),e.preventDefault();break;case ne.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case ne.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){let n=e.target;if(n.tagName!=="INPUT"&&e.preventDefault(),n.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(n.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}n.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value))}selectTag(){let e;Ye(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let n=r=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(r,null):this.itemsList.addItem(r);_s(e)?e.then(r=>this.select(n(r))).catch(()=>{}):e&&this.select(n(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(n=>n.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(n=>n.label.toLowerCase()===e))&&!this.loading}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||this.minTermLength===0)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(n=>n.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){let n=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=w(n)?!Fe(n):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&w(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=r=>{this.items=r.map(a=>({$ngOptionValue:a.value,$ngOptionLabel:a.elementRef.nativeElement.innerHTML,disabled:a.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},n=()=>{let r=Oe(this.ngOptions.changes,this._destroy$);Oe(...this.ngOptions.map(a=>a.stateChange$)).pipe(M(r)).subscribe(a=>{let o=this.itemsList.findItem(a.value);o.disabled=a.disabled,o.label=a.label||o.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(wt(this.ngOptions),M(this._destroy$)).subscribe(r=>{this.bindLabel=this._defaultLabel,e(r),n()})}_isValidWriteValue(e){if(!w(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let n=r=>!w(this.compareWith)&&Fe(r)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(r)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(r=>n(r)):(this._console.warn("Multiple select ngModel should be array."),!1):n(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let n=r=>{let a=this.itemsList.findItem(r);if(a)this.itemsList.select(a);else{let o=Fe(r),g=!o&&!this.bindValue;o||g?this.itemsList.select(this.itemsList.mapItem(r,null)):this.bindValue&&(a={[this.bindLabel]:null,[this.bindValue]:r},this.itemsList.select(this.itemsList.mapItem(a,null)))}};this.multiple?e.forEach(r=>n(r)):n(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(M(this._destroy$),Ft(e=>this._pressedKeys.push(e)),It(200),Be(()=>this._pressedKeys.length>0),S(()=>this._pressedKeys.join(""))).subscribe(e=>{let n=this.itemsList.findByLabel(e);n&&(this.isOpen?(this.itemsList.markItem(n),this._scrollToMarked(),this._cd.markForCheck()):this.select(n)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,n=_e({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let r of Object.keys(n))e.setAttribute(r,n[r])}_updateNgModel(){let e=[];for(let r of this.selectedItems)if(this.bindValue){let a=null;if(r.children){let o=this.groupValue?this.bindValue:this.groupBy;a=r.value[o||this.groupBy]}else a=this.itemsList.resolveNested(r.value,this.bindValue);e.push(a)}else e.push(r.value);let n=this.selectedItems.map(r=>r.value);this.multiple?(this._onChange(e),this.changeEvent.emit(n)):(this._onChange(w(e[0])?e[0]:null),this.changeEvent.emit(n[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(this.isOpen===!1){if(this.showClear()&&!e.shiftKey)this.focusOnClear(),e.preventDefault();else if(!this.addTag)return}this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(this.openOnEnter)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let n=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(n<0||n===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){let e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=w(this.virtualScroll)?this.virtualScroll:w(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=w(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}};t.\u0275fac=function(n){return new(n||t)(Je("class"),Je("autofocus"),_(As),_(Zi),_(re),_(Mt),_(ks))},t.\u0275cmp=j({type:t,selectors:[["ng-select"]],contentQueries:function(n,r,a){if(n&1&&(G(a,bt,5,I),G(a,vt,5,I),G(a,bs,5,I),G(a,Et,5,I),G(a,vs,5,I),G(a,Es,5,I),G(a,Cs,5,I),G(a,ys,5,I),G(a,Ss,5,I),G(a,Ts,5,I),G(a,Is,5,I),G(a,Fs,5)),n&2){let o;O(o=B())&&(r.optionTemplate=o.first),O(o=B())&&(r.optgroupTemplate=o.first),O(o=B())&&(r.labelTemplate=o.first),O(o=B())&&(r.multiLabelTemplate=o.first),O(o=B())&&(r.headerTemplate=o.first),O(o=B())&&(r.footerTemplate=o.first),O(o=B())&&(r.notFoundTemplate=o.first),O(o=B())&&(r.typeToSearchTemplate=o.first),O(o=B())&&(r.loadingTextTemplate=o.first),O(o=B())&&(r.tagTemplate=o.first),O(o=B())&&(r.loadingSpinnerTemplate=o.first),O(o=B())&&(r.ngOptions=o)}},viewQuery:function(n,r){if(n&1&&(he(Ui,5),he(Vn,7),he(Mn,5)),n&2){let a;O(a=B())&&(r.dropdownPanel=a.first),O(a=B())&&(r.searchInput=a.first),O(a=B())&&(r.clearButton=a.first)}},hostVars:20,hostBindings:function(n,r){n&1&&x("keydown",function(o){return r.handleKeyDown(o)}),n&2&&$("ng-select-typeahead",r.typeahead)("ng-select-multiple",r.multiple)("ng-select-taggable",r.addTag)("ng-select-searchable",r.searchable)("ng-select-clearable",r.clearable)("ng-select-opened",r.isOpen)("ng-select",r.useDefaultClass)("ng-select-disabled",r.disabled)("ng-select-filtered",r.filtered)("ng-select-single",r.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:[2,"markFirst","markFirst",k],placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",k],closeOnSelect:[2,"closeOnSelect","closeOnSelect",k],hideSelected:[2,"hideSelected","hideSelected",k],selectOnTab:[2,"selectOnTab","selectOnTab",k],openOnEnter:[2,"openOnEnter","openOnEnter",k],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",Ie],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",Ie],virtualScroll:[2,"virtualScroll","virtualScroll",k],selectableGroup:[2,"selectableGroup","selectableGroup",k],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",k],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",k],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",Ie],readonly:[2,"readonly","readonly",k],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",k],minTermLength:[2,"minTermLength","minTermLength",Ie],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",k],keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:[2,"multiple","multiple",k],addTag:"addTag",searchable:[2,"searchable","searchable",k],clearable:[2,"clearable","clearable",k],isOpen:[2,"isOpen","isOpen",k],items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[le([{provide:Qt,useExisting:At(()=>t),multi:!0},Yi]),Le,Te],decls:14,vars:19,consts:[["searchInput",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"input","compositionstart","compositionend","focus","blur","change","readOnly","disabled","value"],["tabindex","0",1,"ng-clear-wrapper",3,"title"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[1,"ng-value",3,"ng-value-disabled"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"update","scroll","scrollToEnd","outsideClick","virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id"],[1,"ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked"],["role","option",1,"ng-option",3,"ng-option-marked"],[1,"ng-option",3,"click","mouseover"],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],[1,"ng-tag-label"],[1,"ng-option","ng-option-disabled"]],template:function(n,r){if(n&1){let a=V();c(0,"div",9),x("mousedown",function(g){return C(a),y(r.handleMousedown(g))}),c(1,"div",10)(2,"div",11),h(3),d(),b(4,Wn,2,0)(5,Un,1,5,null,12),c(6,"div",13)(7,"input",14,0),x("input",function(){C(a);let g=N(8);return y(r.filter(g.value))})("compositionstart",function(){return C(a),y(r.onCompositionStart())})("compositionend",function(){C(a);let g=N(8);return y(r.onCompositionEnd(g.value))})("focus",function(g){return C(a),y(r.onInputFocus(g))})("blur",function(g){return C(a),y(r.onInputBlur(g))})("change",function(g){return C(a),y(g.stopPropagation())}),d()()(),b(9,Kn,3,1)(10,Yn,4,1,"span",15),c(11,"span",16),D(12,"span",17),d()(),b(13,ps,8,17,"ng-dropdown-panel",18)}n&2&&($("ng-appearance-outline",r.appearance==="outline")("ng-has-value",r.hasValue),l(3),T(r.placeholder),l(),U((!r.multiLabelTemplate||!r.multiple)&&r.selectedItems.length>0?4:-1),l(),U(r.multiple&&r.multiLabelTemplate&&r.selectedValues.length>0?5:-1),l(),q("aria-expanded",r.isOpen)("aria-owns",r.isOpen?r.dropdownId:null),l(),p("readOnly",!r.searchable||r.itemsList.maxItemsSelected)("disabled",r.disabled)("value",r.searchTerm?r.searchTerm:""),q("id",r.labelForId)("tabindex",r.tabIndex)("aria-activedescendant",r.isOpen?r.itemsList==null||r.itemsList.markedItem==null?null:r.itemsList.markedItem.htmlId:null)("aria-controls",r.isOpen?r.dropdownId:null),l(2),U(r.loading?9:-1),l(),U(r.showClear()?10:-1),l(3),U(r.isOpen?13:-1))},dependencies:[jt,at,Ui,gs],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0} +import{a as Di}from"./chunk-ZROJU7EX.js";import{a as Vi,b as Ni,c as ji}from"./chunk-SOH5T2AJ.js";import{a as ki}from"./chunk-NYTDIO5P.js";import{a as $i}from"./chunk-GD4YO4IV.js";import{a as Ai}from"./chunk-GXZYLK4L.js";import"./chunk-U4HODSW3.js";import"./chunk-7LCBKZQT.js";import"./chunk-PSXDSPKS.js";import{a as hi,b as _i,e as Si}from"./chunk-C7XT5XXE.js";import{a as We}from"./chunk-YMJC6QZX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{a as Ri}from"./chunk-DDSXVC6O.js";import{a as Li,b as Pi}from"./chunk-UP3NEN2H.js";import{a as Bi}from"./chunk-DZZC2YX2.js";import{a as Oi}from"./chunk-K3EEKOGY.js";import{a as Mi}from"./chunk-XLPJMZ3E.js";import{b as xi,c as wi}from"./chunk-24AFRN2G.js";import"./chunk-RFO4NYUO.js";import{a as Ii}from"./chunk-5RDJZAUT.js";import"./chunk-DB66EACG.js";import{L as vi,M as pt,P as Ei,Q as mt,R as ht,S as qe,T as Ue,U as Ci,j as gi,v as bi,w as ut}from"./chunk-ZK2MNT7Z.js";import{a as He,c as dt,e as yi}from"./chunk-AW7CSGKI.js";import{b as Fi}from"./chunk-FTDG26ID.js";import{a as Ge,c as Ti}from"./chunk-SOHFFTKU.js";import{f as li,g as ci,j as di,w as we,y as fi}from"./chunk-C56YGDXA.js";import{a as pi}from"./chunk-UX5TA32W.js";import{$ as j,$a as f,$c as Re,Ab as u,Ac as lt,Ba as Pt,Bb as m,C as It,Cb as ie,Dd as mi,E as ee,Eb as Z,Fa as Le,Fc as zt,Fd as $e,Ga as b,Gd as de,Ha as q,Hb as Mt,Hd as ue,I as xt,Ia as p,Ib as k,Ja as $,Jb as Ie,L as pe,Lb as Nt,Lc as ct,Ma as Xe,Mb as Rt,N as wt,Na as U,O as Se,Q as M,Qa as et,Qb as jt,R as Ft,Ra as tt,Rb as Ee,Sa as c,Sb as Me,Ta as d,Ua as D,Ub as at,V as At,Va as ge,Vb as Ce,Vc as ce,W,Wa as be,Wb as $t,Wc as Qt,X as kt,Xa as it,Xc as Kt,Y as Dt,Ya as V,Yb as Ht,Yc as Yt,Z as R,_a as x,_c as xe,a as _e,aa as Ot,ab as nt,ad as Zt,b as ke,ba as H,bb as st,cb as me,db as rt,dc as Gt,dd as Jt,e as se,eb as G,ed as Xt,f as Ze,fb as he,ga as Te,gb as O,gd as ei,h as Ct,ha as C,hb as B,i as yt,ia as y,ib as N,id as ti,jb as h,jd as ii,k as St,kb as T,kd as ni,la as Bt,lb as E,ld as si,m as S,ma as Je,mb as ve,md as ri,n as De,oc as Ne,pb as z,pc as Wt,qa as re,qb as Q,qc as qt,qd as ai,ra as A,rb as K,rc as Ut,rd as je,s as ye,sb as le,sd as oi,tb as te,ua as l,v as Oe,va as _,vb as Y,w as Be,wb as Vt,xa as I,xb as Pe,yb as Ve,z as Tt,za as Lt,zc as ot,zd as ui}from"./chunk-XTHSYQMN.js";var L=function(i){return i.Absent="absent",i.Dispensation="dispensation",i.HalfDay="half-day",i.Incident="incident",i.Present="present",i}(L||{}),Gi=(()=>{let t=class t{constructor(e,n){this.updateService=e,this.settings=n}update(e,n,r,a,o,g){let v=[];switch(r){case L.Present:v=this.createResetBulkRequests(e);break;case L.Absent:v=this.createAbsentEditBulkRequests(e,n,a,o);break;case L.Dispensation:v=this.createEditBulkRequests(e,null,this.settings.dispensationPresenceTypeId);break;case L.HalfDay:v=this.createEditBulkRequests(e,null,this.settings.halfDayPresenceTypeId);break;case L.Incident:v=this.createEditBulkRequests(e,null,g);break}return De(v).pipe(S(()=>{}))}createAbsentEditBulkRequests(e,n,r,a){return r===this.settings.excusedAbsenceStateId?this.createEditBulkRequests(e,r,a):r===this.settings.unexcusedAbsenceStateId?this.createEditBulkRequests(e,r,this.settings.absencePresenceTypeId):[...this.createEditBulkRequests(e.filter(Hi(n,this.settings)),r,this.settings.absencePresenceTypeId),...this.createEditBulkRequests(e.filter(we(Hi(n,this.settings))),r,null)]}createResetBulkRequests(e){return pt(e).map(({lessonIds:n,personIds:r})=>this.updateService.removeLessonPresences(n,r))}createEditBulkRequests(e,n,r){return pt(e).map(({lessonIds:a,personIds:o})=>this.updateService.editLessonPresences(a,o,r||void 0,n||void 0))}};t.\u0275fac=function(n){return new(n||t)(R(Ci),R(ce))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();function Hi(i,t){return s=>{let e=i.find(n=>n.Id===s.TypeRef.Id);return!e||e.Id===t.dispensationPresenceTypeId||e.Id===t.halfDayPresenceTypeId||e.IsIncident}}var X=(()=>{let t=class t extends Pi{constructor(e,n,r,a,o,g,v){super(e,n,r,a,"/edit-absences"),this.lessonPresencesService=o,this.presenceTypesService=g,this.dropDownItemsService=v,this.presenceTypes$=this.loadPresenceTypes().pipe(pe(1)),this.absenceConfirmationStates$=this.loadAbsenceConfirmationStates().pipe(S(hi),pe(1)),this.presenceControlEntries$=De([this.entries$,this.presenceTypes$,this.absenceConfirmationStates$]).pipe(S(yi(Di)),pe(1)),this.selected=[],this.queryParamsString$.pipe(M(this.destroy$)).subscribe(F=>this.confirmBackLinkParams={returnparams:F})}resetSelection(){this.selected=[]}updateAfterConfirm(){this.resetEntries()}getInitialFilter(){return{student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,presenceTypes:null,confirmationStates:null,incidentTypes:null}}isValidFilter(e){return!!(e.student||e.educationalEvent||e.studyClass||e.teacher||e.dateFrom||e.dateTo||e.presenceTypes||e.confirmationStates||e.incidentTypes)}loadEntries(e,n,r){let a={sort:"StudentFullName.asc,LessonDateTimeFrom.asc"};return this.loadingService.load(this.lessonPresencesService.getFilteredList(e,r,a),Li)}buildParamsFromFilter(e){return Vi(e)}loadPresenceTypes(){return this.loadingService.load(this.presenceTypesService.activePresenceTypes$)}loadAbsenceConfirmationStates(){return this.loadingService.load(this.dropDownItemsService.getAbsenceConfirmationStates())}};t.\u0275fac=function(n){return new(n||t)(R(Rt),R(Fi),R(Mi),R(ce),R(Si),R(Ue),R(We))},t.\u0275prov=W({token:t,factory:t.\u0275fac});let i=t;return i})();var _n=(i,t,s)=>({confirmationStates:i,categories:t,formGroup:s});function gn(i,t){if(i&1&&(c(0,"div",11),h(1),u(2,"translate"),d()),i&2){let s=t.$implicit;l(),E(" ",ie(2,1,"global.validation-errors."+s.error,s.params)," ")}}function bn(i,t){if(i&1&&(c(0,"option",23),h(1),d()),i&2){let s=t.$implicit;p("ngValue",s.Id),l(),E(" ",s.Designation," ")}}function vn(i,t){if(i&1&&(c(0,"select",22),u(1,"async"),c(2,"option",23),h(3),u(4,"translate"),d(),b(5,bn,2,2,"option",24),u(6,"async"),d()),i&2){let s,e=f(6);$("is-invalid",((s=m(1,5,e.absenceTypeIdErrors$))==null?null:s.length)||!1),l(2),p("ngValue",null),l(),E(" ",m(4,7,"edit-absences.edit.absence-type-placeholder")," "),l(2),p("ngForOf",m(6,9,e.absenceTypes$))}}function En(i,t){if(i&1&&(c(0,"div",25),h(1),u(2,"translate"),d()),i&2){let s=t.$implicit;l(),E(" ",ie(2,1,"global.validation-errors."+s.error,s.params)," ")}}function Cn(i,t){if(i&1&&(c(0,"div",18),D(1,"input",19),c(2,"label",14),h(3),d(),b(4,vn,7,11,"select",20)(5,En,3,4,"div",21),u(6,"async"),d()),i&2){let s=t.$implicit,e=f(5);l(),p("id","state-"+s.Key)("value",s.Key),l(),me("for","state-"+s.Key),l(),E(" ",s.Value," "),l(),p("ngIf",e.isExcused(s)),l(),p("ngForOf",m(6,6,e.absenceTypeIdErrors$))}}function yn(i,t){if(i&1&&(c(0,"div",16),b(1,Cn,7,8,"div",17),d()),i&2){let s=f(3).bkdLet;l(),p("ngForOf",s.confirmationStates)}}function Sn(i,t){if(i&1&&(c(0,"option",23),h(1),d()),i&2){let s=t.$implicit;p("ngValue",s.Id),l(),E(" ",s.Designation," ")}}function Tn(i,t){if(i&1&&(c(0,"div",25),h(1),u(2,"translate"),d()),i&2){let s=t.$implicit;l(),E(" ",ie(2,1,"global.validation-errors."+s.error,s.params)," ")}}function In(i,t){if(i&1&&(c(0,"div",16)(1,"select",26),u(2,"async"),c(3,"option",23),h(4),u(5,"translate"),d(),b(6,Sn,2,2,"option",24),u(7,"async"),d(),b(8,Tn,3,4,"div",21),u(9,"async"),d()),i&2){let s,e=f(4);l(),$("is-invalid",((s=m(2,6,e.incidentIdErrors$))==null?null:s.length)||!1),l(2),p("ngValue",null),l(),E(" ",m(5,8,"edit-absences.edit.incident-placeholder")," "),l(2),p("ngForOf",m(7,10,e.incidents$)),l(2),p("ngForOf",m(9,12,e.incidentIdErrors$))}}function xn(i,t){if(i&1&&(c(0,"div",12),D(1,"input",13),c(2,"label",14),h(3),u(4,"translate"),d(),b(5,yn,2,1,"div",15)(6,In,10,14,"div",15),d()),i&2){let s=t.$implicit,e=f(3);l(),p("id","category-"+s)("value",s),l(),me("for","category-"+s),l(),E(" ",m(4,6,"edit-absences.edit.categories."+s)," "),l(2),p("ngIf",e.isAbsent(s)),l(),p("ngIf",e.isIncident(s))}}function wn(i,t){i&1&&(c(0,"div",27)(1,"span",28),h(2,"Loading..."),d()())}function Fn(i,t){if(i&1){let s=V();c(0,"form",3),x("ngSubmit",function(){C(s);let n=f(2);return y(n.onSubmit())}),b(1,gn,3,4,"div",4),u(2,"async"),c(3,"div",5),b(4,xn,7,8,"div",6),d(),c(5,"div",7)(6,"button",8),u(7,"async"),x("click",function(){C(s);let n=f(2);return y(n.cancel())}),h(8),u(9,"translate"),d(),c(10,"button",9),u(11,"async"),h(12),u(13,"translate"),b(14,wn,3,0,"div",10),u(15,"async"),d()()()}if(i&2){let s=f().bkdLet,e=f();p("formGroup",s.formGroup),l(),p("ngForOf",m(2,8,e.formErrors$)),l(3),p("ngForOf",s.categories),l(2),p("disabled",m(7,10,e.saving$)),l(2),E(" ",m(9,12,"edit-absences.edit.cancel")," "),l(2),p("disabled",m(11,14,e.saving$)),l(2),E(" ",m(13,16,"edit-absences.edit.save")," "),l(2),p("ngIf",m(15,18,e.saving$))}}function An(i,t){if(i&1&&(c(0,"div",1),b(1,Fn,16,20,"form",2),d()),i&2){let s=t.bkdLet;l(),p("ngIf",s.formGroup&&s.confirmationStates)}}var Wi=(()=>{let t=class t{constructor(e,n,r,a,o,g,v,F,P,oe){this.fb=e,this.router=n,this.route=r,this.toastService=a,this.translate=o,this.state=g,this.dropDownItemsService=v,this.presenceTypesService=F,this.updateService=P,this.settings=oe,this.absenceTypes$=this.presenceTypesService.confirmationTypes$,this.incidents$=this.presenceTypesService.incidentTypes$,this.formGroup$=this.createFormGroup(),this.saving$=new Ze(!1),this.submitted$=new Ze(!1),this.formErrors$=He(this.formGroup$,this.submitted$),this.absenceTypeIdErrors$=He(this.formGroup$,this.submitted$,"absenceTypeId"),this.incidentIdErrors$=He(this.formGroup$,this.submitted$,"incidentId"),this.availableCategories=[L.Absent,L.Dispensation,L.HalfDay,L.Incident,L.Present],this.confirmationStates$=this.dropDownItemsService.getAbsenceConfirmationStates().pipe(S(this.sortAbsenceConfirmationStates.bind(this)),pe(1)),this.activeCategories$=this.presenceTypesService.halfDayActive$.pipe(S(J=>J?this.availableCategories:this.availableCategories.filter(fe=>fe!==L.HalfDay))),this.destroy$=new se}ngOnInit(){this.state.selected.length===0&&this.navigateBack(),dt(this.formGroup$,"category").pipe(M(this.destroy$)).subscribe(this.updateConfirmationValueDisabled.bind(this)),dt(this.formGroup$,"confirmationValue").pipe(M(this.destroy$)).subscribe(this.updateAbsenceTypeIdDisabled.bind(this))}ngOnDestroy(){this.destroy$.next()}isAbsent(e){return e===L.Absent}isExcused(e){return e.Key===this.settings.excusedAbsenceStateId}isIncident(e){return e===L.Incident}onSubmit(){this.submitted$.next(!0),this.formGroup$.pipe(ee(1)).subscribe(e=>{e.valid&&this.save(e)})}cancel(){this.navigateBack()}createFormGroup(){return this.getInitialAbsenceTypeId().pipe(S(e=>this.fb.group({category:[L.Absent,xe.required],confirmationValue:[this.settings.excusedAbsenceStateId,xe.required],absenceTypeId:[e,xe.required],incidentId:[{value:null,disabled:!0},xe.required]})),pe(1))}getInitialAbsenceTypeId(){return this.absenceTypes$.pipe(ee(1),S(e=>{let n=e.map(a=>a.Id),r=ui(this.state.selected.map(a=>a.TypeRef.Id));return r.length===1&&r[0]!=null&&n.includes(r[0])?r[0]:null}))}updateConfirmationValueDisabled(){this.formGroup$.pipe(ee(1)).subscribe(e=>{let n=e.get("category"),r=e.get("confirmationValue"),a=e.get("absenceTypeId"),o=e.get("incidentId");n&&r&&a&&o&&(n.value===L.Absent?(r.enable(),this.updateAbsenceTypeIdDisabled()):(r.disable(),a.disable()),n.value===L.Incident?o.enable():o.disable())})}updateAbsenceTypeIdDisabled(){this.formGroup$.pipe(ee(1)).subscribe(e=>{let n=e.get("confirmationValue"),r=e.get("absenceTypeId");n&&r&&(n.value===this.settings.excusedAbsenceStateId?r.enable():r.disable())})}save(e){this.saving$.next(!0);let{category:n,confirmationValue:r,absenceTypeId:a,incidentId:o}=e.value;this.presenceTypesService.presenceTypes$.pipe(Se(g=>this.updateService.update(this.state.selected,g,n,r,a,o)),xt(()=>this.saving$.next(!1))).subscribe(this.onSaveSuccess.bind(this))}onSaveSuccess(){this.state.resetSelection(),this.toastService.success(this.translate.instant("edit-absences.edit.save-success")),this.navigateBack(!0)}navigateBack(e){this.route.queryParams.pipe(ee(1)).subscribe(n=>{this.router.navigate(["/edit-absences"],{queryParams:ke(_e({},Ii(n.returnparams)),{reload:e})})})}sortAbsenceConfirmationStates(e){return e.slice().sort((n,r)=>n.Key===this.settings.excusedAbsenceStateId?-1:r.Key===this.settings.excusedAbsenceStateId?1:n.Value.localeCompare(r.Value))}};t.\u0275fac=function(n){return new(n||t)(_(ai),_(qt),_(Ne),_(pi),_($e),_(X),_(We),_(Ue),_(Gi),_(ce))},t.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-edit"]],standalone:!0,features:[te],decls:7,vars:14,consts:[["class","bkd-container bkd-container-limited",4,"bkdLet"],[1,"bkd-container","bkd-container-limited"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],["class","alert alert-danger",4,"ngFor","ngForOf"],[1,"form-group","pb-4"],["class","form-check mt-2 mb-3",4,"ngFor","ngForOf"],[1,"d-flex","justify-content-end"],["type","button",1,"btn","btn-outline-secondary",3,"click","disabled"],["type","submit",1,"btn","btn-primary","ms-2",3,"disabled"],["class","spinner-border spinner-border-sm align-middle","role","status",4,"ngIf"],[1,"alert","alert-danger"],[1,"form-check","mt-2","mb-3"],["type","radio","formControlName","category",1,"form-check-input",3,"id","value"],[1,"form-check-label",3,"for"],["class","ms-5",4,"ngIf"],[1,"ms-5"],["class","form-check mt-2 mb-2",4,"ngFor","ngForOf"],[1,"form-check","mt-2","mb-2"],["type","radio","formControlName","confirmationValue",1,"form-check-input",3,"id","value"],["class","form-select mt-1","formControlName","absenceTypeId",3,"is-invalid",4,"ngIf"],["class","invalid-feedback",4,"ngFor","ngForOf"],["formControlName","absenceTypeId",1,"form-select","mt-1"],[3,"ngValue"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"invalid-feedback"],["formControlName","incidentId",1,"form-select","mt-1"],["role","status",1,"spinner-border","spinner-border-sm","align-middle"],[1,"visually-hidden"]],template:function(n,r){n&1&&(c(0,"h1"),h(1),u(2,"translate"),d(),b(3,An,2,1,"div",0),u(4,"async"),u(5,"async"),u(6,"async")),n&2&&(l(),T(m(2,2,"edit-absences.title")),l(2),p("bkdLet",Pe(10,_n,m(4,4,r.confirmationStates$),m(5,6,r.activeCategories$),m(6,8,r.formGroup$))))},dependencies:[Ge,Me,je,Xt,si,ri,Yt,ni,ei,Re,Zt,oi,ti,ii,Ee,Ce,ue,de],changeDetection:0});let i=t;return i})();var Qe=(()=>{let t=class t extends vi{};t.\u0275fac=(()=>{let e;return function(r){return(e||(e=Bt(t)))(r||t)}})(),t.\u0275prov=W({token:t,factory:t.\u0275fac});let i=t;return i})();var Dn=["content"],On=["scroll"],Bn=["padding"],zi=["*"],Ae=i=>({searchTerm:i});function Ln(i,t){if(i&1&&(c(0,"div",3),it(1,6),d()),i&2){let s=f();l(),p("ngTemplateOutlet",s.headerTemplate)("ngTemplateOutletContext",Y(2,Ae,s.filterValue))}}function Pn(i,t){if(i&1&&(c(0,"div",5),it(1,6),d()),i&2){let s=f();l(),p("ngTemplateOutlet",s.footerTemplate)("ngTemplateOutletContext",Y(2,Ae,s.filterValue))}}var Vn=["searchInput"],Mn=["clearButton"],Nn=(i,t,s)=>({item:i,clear:t,label:s}),Rn=(i,t)=>({items:i,clear:t}),jn=(i,t,s,e)=>({item:i,item$:t,index:s,searchTerm:e});function $n(i,t){if(i&1){let s=V();c(0,"span",21),x("click",function(){C(s);let n=f().$implicit,r=f(2);return y(r.unselect(n))}),h(1,"\xD7"),d(),D(2,"span",22)}if(i&2){let s=f().$implicit,e=f(2);l(2),p("ngItemLabel",s.label)("escape",e.escapeHTML)}}function Hn(i,t){}function Gn(i,t){if(i&1&&(c(0,"div",20),b(1,$n,3,2,"ng-template",null,1,Z)(3,Hn,0,0,"ng-template",12),d()),i&2){let s=t.$implicit,e=N(2),n=f(2);$("ng-value-disabled",s.disabled),l(3),p("ngTemplateOutlet",n.labelTemplate||e)("ngTemplateOutletContext",Pe(4,Nn,s.value,n.clearItem,s.label))}}function Wn(i,t){if(i&1&&et(0,Gn,4,8,"div",19,Xe().trackByOption,!0),i&2){let s=f();tt(s.selectedItems)}}function qn(i,t){}function Un(i,t){if(i&1&&b(0,qn,0,0,"ng-template",12),i&2){let s=f();p("ngTemplateOutlet",s.multiLabelTemplate)("ngTemplateOutletContext",Vt(2,Rn,s.selectedValues,s.clearItem))}}function zn(i,t){i&1&&D(0,"div",24)}function Qn(i,t){}function Kn(i,t){if(i&1&&b(0,zn,1,0,"ng-template",null,2,Z)(2,Qn,0,0,"ng-template",23),i&2){let s=N(1),e=f();l(2),p("ngTemplateOutlet",e.loadingSpinnerTemplate||s)}}function Yn(i,t){if(i&1&&(c(0,"span",15,3)(2,"span",25),h(3,"\xD7"),d()()),i&2){let s=f();me("title",s.clearAllText)}}function Zn(i,t){if(i&1&&D(0,"span",30),i&2){let s=f().$implicit,e=f(2);p("ngItemLabel",s.label)("escape",e.escapeHTML)}}function Jn(i,t){}function Xn(i,t){if(i&1){let s=V();c(0,"div",29),x("click",function(){let n=C(s).$implicit,r=f(2);return y(r.toggleItem(n))})("mouseover",function(){let n=C(s).$implicit,r=f(2);return y(r.onItemHover(n))}),b(1,Zn,1,2,"ng-template",null,4,Z)(3,Jn,0,0,"ng-template",12),d()}if(i&2){let s=t.$implicit,e=N(2),n=f(2);$("ng-option-disabled",s.disabled)("ng-option-selected",s.selected)("ng-optgroup",s.children)("ng-option",!s.children)("ng-option-child",!!s.parent)("ng-option-marked",s===n.itemsList.markedItem),q("role",s.children?"group":"option")("aria-selected",s.selected)("id",s==null?null:s.htmlId),l(3),p("ngTemplateOutlet",s.children?n.optgroupTemplate||e:n.optionTemplate||e)("ngTemplateOutletContext",Ve(17,jn,s.value,s,s.index,n.searchTerm))}}function es(i,t){if(i&1&&(c(0,"span")(1,"span",32),h(2),d(),h(3),d()),i&2){let s=f(3);l(2),T(s.addTagText),l(),E('"',s.searchTerm,'"')}}function ts(i,t){}function is(i,t){if(i&1){let s=V();c(0,"div",31),x("mouseover",function(){C(s);let n=f(2);return y(n.itemsList.unmarkItem())})("click",function(){C(s);let n=f(2);return y(n.selectTag())}),b(1,es,4,2,"ng-template",null,5,Z)(3,ts,0,0,"ng-template",12),d()}if(i&2){let s=N(2),e=f(2);$("ng-option-marked",!e.itemsList.markedItem),l(3),p("ngTemplateOutlet",e.tagTemplate||s)("ngTemplateOutletContext",Y(4,Ae,e.searchTerm))}}function ns(i,t){if(i&1&&(c(0,"div",33),h(1),d()),i&2){let s=f(3);l(),T(s.notFoundText)}}function ss(i,t){}function rs(i,t){if(i&1&&b(0,ns,2,1,"ng-template",null,6,Z)(2,ss,0,0,"ng-template",12),i&2){let s=N(1),e=f(2);l(2),p("ngTemplateOutlet",e.notFoundTemplate||s)("ngTemplateOutletContext",Y(2,Ae,e.searchTerm))}}function as(i,t){if(i&1&&(c(0,"div",33),h(1),d()),i&2){let s=f(3);l(),T(s.typeToSearchText)}}function os(i,t){}function ls(i,t){if(i&1&&b(0,as,2,1,"ng-template",null,7,Z)(2,os,0,0,"ng-template",23),i&2){let s=N(1),e=f(2);l(2),p("ngTemplateOutlet",e.typeToSearchTemplate||s)}}function cs(i,t){if(i&1&&(c(0,"div",33),h(1),d()),i&2){let s=f(3);l(),T(s.loadingText)}}function ds(i,t){}function us(i,t){if(i&1&&b(0,cs,2,1,"ng-template",null,8,Z)(2,ds,0,0,"ng-template",12),i&2){let s=N(1),e=f(2);l(2),p("ngTemplateOutlet",e.loadingTextTemplate||s)("ngTemplateOutletContext",Y(2,Ae,e.searchTerm))}}function ps(i,t){if(i&1){let s=V();c(0,"ng-dropdown-panel",26),x("update",function(n){C(s);let r=f();return y(r.viewPortItems=n)})("scroll",function(n){C(s);let r=f();return y(r.scroll.emit(n))})("scrollToEnd",function(n){C(s);let r=f();return y(r.scrollToEnd.emit(n))})("outsideClick",function(){C(s);let n=f();return y(n.close())}),ge(1),et(2,Xn,4,22,"div",27,Xe().trackByOption,!0),b(4,is,4,6,"div",28),be(),b(5,rs,3,4)(6,ls,3,1)(7,us,3,4),d()}if(i&2){let s=f();$("ng-select-multiple",s.multiple),p("virtualScroll",s.virtualScroll)("bufferAmount",s.bufferAmount)("appendTo",s.appendTo)("position",s.dropdownPosition)("headerTemplate",s.headerTemplate)("footerTemplate",s.footerTemplate)("filterValue",s.searchTerm)("items",s.itemsList.filteredItems)("markedItem",s.itemsList.markedItem)("ngClass",s.appendTo?s.classes:null)("id",s.dropdownId),l(2),tt(s.viewPortItems),l(2),U(s.showAddTag?4:-1),l(),U(s.showNoItemsFound()?5:-1),l(),U(s.showTypeToSearch()?6:-1),l(),U(s.loading&&s.itemsList.filteredItems.length===0?7:-1)}}var Qi=/[&<>"']/g,ms=RegExp(Qi.source),hs={"&":"&","<":"<",">":">",'"':""","'":"'"};function fs(i){return i&&ms.test(i)?i.replace(Qi,t=>hs[t]):i}function w(i){return i!=null}function Fe(i){return typeof i=="object"&&w(i)}function _s(i){return i instanceof Promise}function Ye(i){return i instanceof Function}var gs=(()=>{let t=class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?fs(this.ngItemLabel):this.ngItemLabel}};t.\u0275fac=function(n){return new(n||t)(_(re))},t.\u0275dir=H({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[Te]});let i=t;return i})(),bt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-option-tmp",""]]});let i=t;return i})(),vt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-optgroup-tmp",""]]});let i=t;return i})(),bs=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-label-tmp",""]]});let i=t;return i})(),Et=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-multi-label-tmp",""]]});let i=t;return i})(),vs=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-header-tmp",""]]});let i=t;return i})(),Es=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-footer-tmp",""]]});let i=t;return i})(),Cs=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-notfound-tmp",""]]});let i=t;return i})(),ys=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-typetosearch-tmp",""]]});let i=t;return i})(),Ss=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-loadingtext-tmp",""]]});let i=t;return i})(),Ts=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-tag-tmp",""]]});let i=t;return i})(),Is=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(n){return new(n||t)(_(I))},t.\u0275dir=H({type:t,selectors:[["","ng-loadingspinner-tmp",""]]});let i=t;return i})();function Ki(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var xs={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function Ke(i){let t=s=>xs[s]||s;return i.replace(/[^\u0000-\u007E]/g,t)}var _t=class{constructor(t,s){this._ngSelect=t,this._selectionModel=s,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let t=this.selectedItems.length-1;for(;t>=0;t--){let s=this.selectedItems[t];if(!s.disabled)return s}return null}setItems(t){this._items=t.map((s,e)=>this.mapItem(s,e)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(t){if(t.selected||this.maxItemsSelected)return;let s=this._ngSelect.multiple;s||this.clearSelected(),this._selectionModel.select(t,s,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(t)}unselect(t){t.selected&&(this._selectionModel.unselect(t,this._ngSelect.multiple),this._ngSelect.hideSelected&&w(t.index)&&this._ngSelect.multiple&&this._showSelected(t))}findItem(t){let s;return this._ngSelect.compareWith?s=e=>this._ngSelect.compareWith(e.value,t):this._ngSelect.bindValue?s=e=>!e.children&&this.resolveNested(e.value,this._ngSelect.bindValue)===t:s=e=>e.value===t||!e.children&&e.label&&e.label===this.resolveNested(t,this._ngSelect.bindLabel),this._items.find(e=>s(e))}addItem(t){let s=this.mapItem(t,this._items.length);return this._items.push(s),this._filteredItems.push(s),s}clearSelected(t=!1){this._selectionModel.clear(t),this._items.forEach(s=>{s.selected=t&&s.selected&&s.disabled,s.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(t){return t=Ke(t).toLocaleLowerCase(),this.filteredItems.find(s=>Ke(s.label).toLocaleLowerCase().substr(0,t.length)===t)}filter(t){if(!t){this.resetFilteredItems();return}this._filteredItems=[],t=this._ngSelect.searchFn?t:Ke(t).toLocaleLowerCase();let s=this._ngSelect.searchFn||this._defaultSearchFn,e=this._ngSelect.hideSelected;for(let n of Array.from(this._groups.keys())){let r=[];for(let a of this._groups.get(n)){if(e&&(a.parent&&a.parent.selected||a.selected))continue;let o=this._ngSelect.searchFn?a.value:a;s(t,o)&&r.push(a)}if(r.length>0){let[a]=r.slice(-1);if(a.parent){let o=this._items.find(g=>g===a.parent);this._filteredItems.push(o)}this._filteredItems.push(...r)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(t=>!t.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(t){this._markedIndex=this._filteredItems.indexOf(t)}markSelectedOrDefault(t){if(this._filteredItems.length===0)return;let s=this._getLastMarkedIndex();s>-1?this._markedIndex=s:this._markedIndex=t?this.filteredItems.findIndex(e=>!e.disabled):-1}resolveNested(t,s){if(!Fe(t))return t;if(s.indexOf(".")===-1)return t[s];{let e=s.split("."),n=t;for(let r=0,a=e.length;rthis.selectedItems.indexOf(s)===-1))}_showSelected(t){if(this._filteredItems.push(t),t.parent){let s=t.parent;this._filteredItems.find(n=>n===s)||this._filteredItems.push(s)}else if(t.children)for(let s of t.children)s.selected=!1,this._filteredItems.push(s);this._filteredItems=[...this._filteredItems.sort((s,e)=>s.index-e.index)]}_hideSelected(t){this._filteredItems=this._filteredItems.filter(s=>s!==t),t.parent?t.parent.children.every(e=>e.selected)&&(this._filteredItems=this._filteredItems.filter(e=>e!==t.parent)):t.children&&(this._filteredItems=this.filteredItems.filter(s=>s.parent!==t))}_defaultSearchFn(t,s){return Ke(s.label).toLocaleLowerCase().indexOf(t)>-1}_getNextItemIndex(t){return t>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(t){this._filteredItems.length===0||this._filteredItems.every(s=>s.disabled)||(this._markedIndex=this._getNextItemIndex(t),this.markedItem.disabled&&this._stepToItem(t))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let t=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&t<0?-1:Math.max(this.markedIndex,t)}_groupBy(t,s){let e=new Map;if(t.length===0)return e;if(Array.isArray(t[0].value[s])){for(let a of t){let o=(a.value[s]||[]).map((g,v)=>this.mapItem(g,v));e.set(a,o)}return e}let n=Ye(this._ngSelect.groupBy),r=a=>{let o=n?s(a.value):a.value[s];return w(o)?o:void 0};for(let a of t){let o=r(a),g=e.get(o);g?g.push(a):e.set(o,[a])}return e}_flatten(t){let s=Ye(this._ngSelect.groupBy),e=[];for(let n of Array.from(t.keys())){let r=e.length;if(n===void 0){let P=t.get(void 0)||[];e.push(...P.map(oe=>(oe.index=r++,oe)));continue}let a=Fe(n),o={label:a?"":String(n),children:void 0,parent:null,index:r++,disabled:!this._ngSelect.selectableGroup,htmlId:Ki()},g=s?this._ngSelect.bindLabel:this._ngSelect.groupBy,v=this._ngSelect.groupValue||(()=>a?n.value:{[g]:n}),F=t.get(n).map(P=>(P.parent=o,P.children=void 0,P.index=r++,P));o.children=F,o.value=v(n,F.map(P=>P.value)),e.push(o),e.push(...F)}return e}},ne=function(i){return i[i.Tab=9]="Tab",i[i.Enter=13]="Enter",i[i.Esc=27]="Esc",i[i.Space=32]="Space",i[i.ArrowUp=38]="ArrowUp",i[i.ArrowDown=40]="ArrowDown",i[i.Backspace=8]="Backspace",i}(ne||{}),Yi=(()=>{let t=class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,n,r){let a=this._dimensions,o=a.itemHeight*n,v=Math.max(0,e)/o*n,F=Math.min(n,Math.ceil(v)+(a.itemsPerViewport+1)),oe=Math.max(0,F-a.itemsPerViewport),J=Math.min(oe,Math.floor(v)),fe=a.itemHeight*Math.ceil(J)-a.itemHeight*Math.min(J,r);return fe=isNaN(fe)?0:fe,J=isNaN(J)?-1:J,F=isNaN(F)?-1:F,J-=r,J=Math.max(0,J),F+=r,F=Math.min(n,F),{topPadding:fe,scrollHeight:o,start:J,end:F}}setDimensions(e,n){let r=Math.max(1,Math.floor(n/e));this._dimensions={itemHeight:e,panelHeight:n,itemsPerViewport:r}}getScrollTo(e,n,r){let{panelHeight:a}=this.dimensions,o=e+n,g=r,v=g+a;return a>=o&&r===e?null:o>v?g+o-v:e<=g?e:null}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac});let i=t;return i})(),qi=["top","right","bottom","left"],ws=typeof requestAnimationFrame<"u"?yt:Ct,Ui=(()=>{let t=class t{constructor(e,n,r,a,o){this._renderer=e,this._zone=n,this._panelService=r,this._document=o,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new A,this.scroll=new A,this.scrollToEnd=new A,this.outsideClick=new A,this._destroy$=new se,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=a.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){let{itemHeight:e,panelHeight:n}=this._panelService.dimensions,r=this.markedItem.index*e;return n>r?0:r}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){let n=e.items;this._onItemsChange(n.currentValue,n.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,n=!1){if(!e)return;let r=this.items.indexOf(e);if(r<0||r>=this.itemsLength)return;let a;if(this.virtualScroll){let o=this._panelService.dimensions.itemHeight;a=this._panelService.getScrollTo(r*o,o,this._lastScrollPosition)}else{let o=this._dropdown.querySelector(`#${e.htmlId}`),g=n?o.offsetTop:this._lastScrollPosition;a=this._panelService.getScrollTo(o.offsetTop,o.clientHeight,g)}w(a)&&(this._scrollablePanel.scrollTop=a)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),qi.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){qi.forEach(r=>{let a=`ng-select-${r}`;this._renderer.removeClass(this._dropdown,a),this._renderer.removeClass(this._select,a)});let n=`ng-select-${e}`;this._renderer.addClass(this._dropdown,n),this._renderer.addClass(this._select,n)}_handleScroll(){this._zone.runOutsideAngular(()=>{ye(this.scrollElementRef.nativeElement,"scroll").pipe(M(this._destroy$),Tt(0,ws)).subscribe(e=>{let n=e.path||e.composedPath&&e.composedPath();if(!n||n.length===0&&!e.target)return;let r=!n||n.length===0?e.target.scrollTop:n[0].scrollTop;this._onContentScrolled(r)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Oe(ye(this._document,"touchstart",{capture:!0}),ye(this._document,"click",{capture:!0})).pipe(M(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let n=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&n&&n[0]&&this._select.contains(n[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,n){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(n):(this._setVirtualHeight(),this._updateItems(n))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let n=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,n),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;let n=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(n.scrollHeight),this._contentPanel.style.transform=`translateY(${n.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(n.start,n.end)),this.scroll.emit({start:n.start,end:n.end})}),w(e)&&this._lastScrollPosition===0&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{let r=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${r*this.itemsLength}px`;let a=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(r,a),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let n=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=n.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let n=this._select.getBoundingClientRect(),r=document.documentElement.scrollTop||document.body.scrollTop,a=n.top+window.pageYOffset,o=n.height,g=e.getBoundingClientRect().height;return a+o+g>r+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),n=this._parent.getBoundingClientRect(),r=e.left-n.left;this._dropdown.style.left=r+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),n=this._parent.getBoundingClientRect(),r=e.height;if(this._currentPosition==="top"){let a=n.bottom-e.bottom;this._dropdown.style.bottom=a+r+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let a=e.top-n.top;this._dropdown.style.top=a+r+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{ye(this._dropdown,"mousedown").pipe(M(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}};t.\u0275fac=function(n){return new(n||t)(_(Lt),_(Pt),_(Yi),_(re),_(Nt,8))},t.\u0275cmp=j({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(n,r){if(n&1&&(he(Dn,7,re),he(On,7,re),he(Bn,7,re)),n&2){let a;O(a=B())&&(r.contentElementRef=a.first),O(a=B())&&(r.scrollElementRef=a.first),O(a=B())&&(r.paddingElementRef=a.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:[2,"virtualScroll","virtualScroll",k],headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[Le,Te],ngContentSelectors:zi,decls:9,vars:6,consts:[["scroll",""],["padding",""],["content",""],[1,"ng-dropdown-header"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],[1,"ng-dropdown-footer"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(n,r){n&1&&(nt(),b(0,Ln,2,4,"div",3),c(1,"div",4,0),D(3,"div",null,1),c(5,"div",null,2),st(7),d()(),b(8,Pn,2,4,"div",5)),n&2&&(U(r.headerTemplate?0:-1),l(3),$("total-padding",r.virtualScroll),l(2),$("scrollable-content",r.virtualScroll&&r.items.length),l(3),U(r.footerTemplate?8:-1))},dependencies:[at],encapsulation:2,changeDetection:0});let i=t;return i})(),Fs=(()=>{let t=class t{constructor(e){this.elementRef=e,this.disabled=!1,this.stateChange$=new se}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this.disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this.disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}};t.\u0275fac=function(n){return new(n||t)(_(re))},t.\u0275cmp=j({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:[2,"disabled","disabled",k]},features:[Le,Te],ngContentSelectors:zi,decls:1,vars:0,template:function(n,r){n&1&&(nt(),st(0))},encapsulation:2,changeDetection:0});let i=t;return i})(),As=(()=>{let t=class t{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),ks=(()=>{let t=class t{warn(e){console.warn(e)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})(),Zi=new Dt("ng-select-selection-model"),Ji=(()=>{let t=class t{get items(){return this._items}set items(e){this._itemsAreUsed=!0,this._items=e??[]}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!Ye(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return w(this._clearSearchOnAdd)?this._clearSearchOnAdd:w(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return w(this._deselectOnClick)?this._deselectOnClick:w(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}constructor(e,n,r,a,o,g,v){this.classes=e,this.autoFocus=n,this.config=r,this._cd=g,this._console=v,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=F=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new A,this.focusEvent=new A,this.changeEvent=new A,this.openEvent=new A,this.closeEvent=new A,this.searchEvent=new A,this.clearEvent=new A,this.addEvent=new A,this.removeEvent=new A,this.scroll=new A,this.scrollToEnd=new A,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Ki(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new se,this._keyPress$=new se,this._onChange=F=>{},this._onTouched=()=>{},this.clearItem=F=>{let P=this.selectedItems.find(oe=>oe.value===F);this.unselect(P)},this.trackByOption=(F,P)=>this.trackByFn?this.trackByFn(P.value):P,this._mergeGlobalConfig(r),this.itemsList=new _t(this,a()),this.element=o.nativeElement}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=w(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),w(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(ne[e.which]){if(this.keyDownFn(e)===!1)return;this.handleKeyCode(e)}else e.key&&e.key.length===1&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){let n=e.target;this.clearButton&&this.clearButton.nativeElement===n?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case ne.ArrowDown:this._handleArrowDown(e);break;case ne.ArrowUp:this._handleArrowUp(e);break;case ne.Space:this._handleSpace(e);break;case ne.Enter:this._handleEnter(e);break;case ne.Tab:this._handleTab(e);break;case ne.Esc:this.close(),e.preventDefault();break;case ne.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case ne.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){let n=e.target;if(n.tagName!=="INPUT"&&e.preventDefault(),n.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(n.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}n.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value))}selectTag(){let e;Ye(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let n=r=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(r,null):this.itemsList.addItem(r);_s(e)?e.then(r=>this.select(n(r))).catch(()=>{}):e&&this.select(n(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(n=>n.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(n=>n.label.toLowerCase()===e))&&!this.loading}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||this.minTermLength===0)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(n=>n.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){let n=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=w(n)?!Fe(n):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&w(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=r=>{this.items=r.map(a=>({$ngOptionValue:a.value,$ngOptionLabel:a.elementRef.nativeElement.innerHTML,disabled:a.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},n=()=>{let r=Oe(this.ngOptions.changes,this._destroy$);Oe(...this.ngOptions.map(a=>a.stateChange$)).pipe(M(r)).subscribe(a=>{let o=this.itemsList.findItem(a.value);o.disabled=a.disabled,o.label=a.label||o.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(wt(this.ngOptions),M(this._destroy$)).subscribe(r=>{this.bindLabel=this._defaultLabel,e(r),n()})}_isValidWriteValue(e){if(!w(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let n=r=>!w(this.compareWith)&&Fe(r)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(r)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(r=>n(r)):(this._console.warn("Multiple select ngModel should be array."),!1):n(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let n=r=>{let a=this.itemsList.findItem(r);if(a)this.itemsList.select(a);else{let o=Fe(r),g=!o&&!this.bindValue;o||g?this.itemsList.select(this.itemsList.mapItem(r,null)):this.bindValue&&(a={[this.bindLabel]:null,[this.bindValue]:r},this.itemsList.select(this.itemsList.mapItem(a,null)))}};this.multiple?e.forEach(r=>n(r)):n(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(M(this._destroy$),Ft(e=>this._pressedKeys.push(e)),It(200),Be(()=>this._pressedKeys.length>0),S(()=>this._pressedKeys.join(""))).subscribe(e=>{let n=this.itemsList.findByLabel(e);n&&(this.isOpen?(this.itemsList.markItem(n),this._scrollToMarked(),this._cd.markForCheck()):this.select(n)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,n=_e({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let r of Object.keys(n))e.setAttribute(r,n[r])}_updateNgModel(){let e=[];for(let r of this.selectedItems)if(this.bindValue){let a=null;if(r.children){let o=this.groupValue?this.bindValue:this.groupBy;a=r.value[o||this.groupBy]}else a=this.itemsList.resolveNested(r.value,this.bindValue);e.push(a)}else e.push(r.value);let n=this.selectedItems.map(r=>r.value);this.multiple?(this._onChange(e),this.changeEvent.emit(n)):(this._onChange(w(e[0])?e[0]:null),this.changeEvent.emit(n[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(this.isOpen===!1){if(this.showClear()&&!e.shiftKey)this.focusOnClear(),e.preventDefault();else if(!this.addTag)return}this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(this.openOnEnter)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let n=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(n<0||n===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){let e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=w(this.virtualScroll)?this.virtualScroll:w(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=w(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}};t.\u0275fac=function(n){return new(n||t)(Je("class"),Je("autofocus"),_(As),_(Zi),_(re),_(Mt),_(ks))},t.\u0275cmp=j({type:t,selectors:[["ng-select"]],contentQueries:function(n,r,a){if(n&1&&(G(a,bt,5,I),G(a,vt,5,I),G(a,bs,5,I),G(a,Et,5,I),G(a,vs,5,I),G(a,Es,5,I),G(a,Cs,5,I),G(a,ys,5,I),G(a,Ss,5,I),G(a,Ts,5,I),G(a,Is,5,I),G(a,Fs,5)),n&2){let o;O(o=B())&&(r.optionTemplate=o.first),O(o=B())&&(r.optgroupTemplate=o.first),O(o=B())&&(r.labelTemplate=o.first),O(o=B())&&(r.multiLabelTemplate=o.first),O(o=B())&&(r.headerTemplate=o.first),O(o=B())&&(r.footerTemplate=o.first),O(o=B())&&(r.notFoundTemplate=o.first),O(o=B())&&(r.typeToSearchTemplate=o.first),O(o=B())&&(r.loadingTextTemplate=o.first),O(o=B())&&(r.tagTemplate=o.first),O(o=B())&&(r.loadingSpinnerTemplate=o.first),O(o=B())&&(r.ngOptions=o)}},viewQuery:function(n,r){if(n&1&&(he(Ui,5),he(Vn,7),he(Mn,5)),n&2){let a;O(a=B())&&(r.dropdownPanel=a.first),O(a=B())&&(r.searchInput=a.first),O(a=B())&&(r.clearButton=a.first)}},hostVars:20,hostBindings:function(n,r){n&1&&x("keydown",function(o){return r.handleKeyDown(o)}),n&2&&$("ng-select-typeahead",r.typeahead)("ng-select-multiple",r.multiple)("ng-select-taggable",r.addTag)("ng-select-searchable",r.searchable)("ng-select-clearable",r.clearable)("ng-select-opened",r.isOpen)("ng-select",r.useDefaultClass)("ng-select-disabled",r.disabled)("ng-select-filtered",r.filtered)("ng-select-single",r.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:[2,"markFirst","markFirst",k],placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:[2,"loading","loading",k],closeOnSelect:[2,"closeOnSelect","closeOnSelect",k],hideSelected:[2,"hideSelected","hideSelected",k],selectOnTab:[2,"selectOnTab","selectOnTab",k],openOnEnter:[2,"openOnEnter","openOnEnter",k],maxSelectedItems:[2,"maxSelectedItems","maxSelectedItems",Ie],groupBy:"groupBy",groupValue:"groupValue",bufferAmount:[2,"bufferAmount","bufferAmount",Ie],virtualScroll:[2,"virtualScroll","virtualScroll",k],selectableGroup:[2,"selectableGroup","selectableGroup",k],selectableGroupAsModel:[2,"selectableGroupAsModel","selectableGroupAsModel",k],searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:[2,"clearOnBackspace","clearOnBackspace",k],labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:[2,"tabIndex","tabIndex",Ie],readonly:[2,"readonly","readonly",k],searchWhileComposing:[2,"searchWhileComposing","searchWhileComposing",k],minTermLength:[2,"minTermLength","minTermLength",Ie],editableSearchTerm:[2,"editableSearchTerm","editableSearchTerm",k],keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:[2,"multiple","multiple",k],addTag:"addTag",searchable:[2,"searchable","searchable",k],clearable:[2,"clearable","clearable",k],isOpen:[2,"isOpen","isOpen",k],items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[le([{provide:Qt,useExisting:At(()=>t),multi:!0},Yi]),Le,Te],decls:14,vars:19,consts:[["searchInput",""],["defaultLabelTemplate",""],["defaultLoadingSpinnerTemplate",""],["clearButton",""],["defaultOptionTemplate",""],["defaultTagTemplate",""],["defaultNotFoundTemplate",""],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""],[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"input","compositionstart","compositionend","focus","blur","change","readOnly","disabled","value"],["tabindex","0",1,"ng-clear-wrapper",3,"title"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id"],[1,"ng-value",3,"ng-value-disabled"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"update","scroll","scrollToEnd","outsideClick","virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id"],[1,"ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked"],["role","option",1,"ng-option",3,"ng-option-marked"],[1,"ng-option",3,"click","mouseover"],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],[1,"ng-tag-label"],[1,"ng-option","ng-option-disabled"]],template:function(n,r){if(n&1){let a=V();c(0,"div",9),x("mousedown",function(g){return C(a),y(r.handleMousedown(g))}),c(1,"div",10)(2,"div",11),h(3),d(),b(4,Wn,2,0)(5,Un,1,5,null,12),c(6,"div",13)(7,"input",14,0),x("input",function(){C(a);let g=N(8);return y(r.filter(g.value))})("compositionstart",function(){return C(a),y(r.onCompositionStart())})("compositionend",function(){C(a);let g=N(8);return y(r.onCompositionEnd(g.value))})("focus",function(g){return C(a),y(r.onInputFocus(g))})("blur",function(g){return C(a),y(r.onInputBlur(g))})("change",function(g){return C(a),y(g.stopPropagation())}),d()()(),b(9,Kn,3,1)(10,Yn,4,1,"span",15),c(11,"span",16),D(12,"span",17),d()(),b(13,ps,8,17,"ng-dropdown-panel",18)}n&2&&($("ng-appearance-outline",r.appearance==="outline")("ng-has-value",r.hasValue),l(3),T(r.placeholder),l(),U((!r.multiLabelTemplate||!r.multiple)&&r.selectedItems.length>0?4:-1),l(),U(r.multiple&&r.multiLabelTemplate&&r.selectedValues.length>0?5:-1),l(),q("aria-expanded",r.isOpen)("aria-owns",r.isOpen?r.dropdownId:null),l(),p("readOnly",!r.searchable||r.itemsList.maxItemsSelected)("disabled",r.disabled)("value",r.searchTerm?r.searchTerm:""),q("id",r.labelForId)("tabindex",r.tabIndex)("aria-activedescendant",r.isOpen?r.itemsList==null||r.itemsList.markedItem==null?null:r.itemsList.markedItem.htmlId:null)("aria-controls",r.isOpen?r.dropdownId:null),l(2),U(r.loading?9:-1),l(),U(r.showClear()?10:-1),l(3),U(r.isOpen?13:-1))},dependencies:[jt,at,Ui,gs],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0} `],encapsulation:2,changeDetection:0});let i=t;return i})();function Ds(){return new gt}var gt=class{constructor(){this._selected=[]}get value(){return this._selected}select(t,s,e){if(t.selected=!0,(!t.children||!s&&e)&&this._selected.push(t),s)if(t.parent){let n=t.parent.children.length,r=t.parent.children.filter(a=>a.selected).length;t.parent.selected=n===r}else t.children&&(this._setChildrenSelectedState(t.children,!0),this._removeChildren(t),e&&this._activeChildren(t)?this._selected=[...this._selected.filter(n=>n.parent!==t),t]:this._selected=[...this._selected,...t.children.filter(n=>!n.disabled)])}unselect(t,s){if(this._selected=this._selected.filter(e=>e!==t),t.selected=!1,s)if(t.parent&&t.parent.selected){let e=t.parent.children;this._removeParent(t.parent),this._removeChildren(t.parent),this._selected.push(...e.filter(n=>n!==t&&!n.disabled)),t.parent.selected=!1}else t.children&&(this._setChildrenSelectedState(t.children,!1),this._removeChildren(t))}clear(t){this._selected=t?this._selected.filter(s=>s.disabled):[]}_setChildrenSelectedState(t,s){for(let e of t)e.disabled||(e.selected=s)}_removeChildren(t){this._selected=[...this._selected.filter(s=>s.parent!==t),...t.children.filter(s=>s.parent===t&&s.disabled&&s.selected)]}_removeParent(t){this._selected=this._selected.filter(s=>s!==t)}_activeChildren(t){return t.children.every(s=>!s.disabled||s.selected)}},Xi=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=Ot({type:t}),t.\u0275inj=kt({providers:[{provide:Zi,useValue:Ds}],imports:[Ht]});let i=t;return i})();function Bs(i,t){if(i&1){let s=V();c(0,"div",5),h(1),c(2,"span",6),x("click",function(){let n=C(s).$implicit,r=f().clear;return y(r(n))}),h(3,"\xD7"),d()()}if(i&2){let s=t.$implicit;l(),E(" ",s.Value," ")}}function Ls(i,t){if(i&1&&b(0,Bs,4,1,"div",4),i&2){let s=t.items;p("ngForOf",s)}}function Ps(i,t){if(i&1&&(D(0,"input",7),h(1)),i&2){let s=t.item,e=t.item$,n=t.index;rt("id","item-",n,""),p("ngModel",e.selected),l(),E(" ",s.Group," ")}}function Vs(i,t){if(i&1&&(D(0,"input",7),h(1)),i&2){let s=t.item,e=t.item$,n=t.index;rt("id","item-",n,""),p("ngModel",e.selected),l(),E(" ",s.Value," ")}}var en=(()=>{let t=class t{constructor(){this.options=[],this.values=[],this.valuesChange=new A}itemsChanged(){this.valuesChange.emit(this.values)}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=j({type:t,selectors:[["bkd-multiselect"]],inputs:{options:"options",values:"values"},outputs:{valuesChange:"valuesChange"},standalone:!0,features:[te],decls:5,vars:10,consts:[["groupBy","Group","bindValue","Key","bindLabel","Value","dropdownPosition","bottom",1,"multiselect",3,"ngModelChange","click","clear","items","multiple","selectableGroup","selectableGroupAsModel","closeOnSelect","ngModel","placeholder","clearable"],["ng-multi-label-tmp",""],["ng-optgroup-tmp",""],["ng-option-tmp",""],["class","ng-value",4,"ngFor","ngForOf"],[1,"ng-value"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"],["type","checkbox",3,"id","ngModel"]],template:function(n,r){n&1&&(c(0,"ng-select",0),u(1,"translate"),K("ngModelChange",function(o){return Q(r.values,o)||(r.values=o),o}),x("click",function(){return r.itemsChanged()})("clear",function(){return r.itemsChanged()}),b(2,Ls,1,1,"ng-template",1)(3,Ps,2,4,"ng-template",2)(4,Vs,2,4,"ng-template",3),d()),n&2&&(me("placeholder",m(1,8,"shared.select.empty-option")),p("items",r.options)("multiple",!0)("selectableGroup",!0)("selectableGroupAsModel",!1)("closeOnSelect",!1),z("ngModel",r.values),p("clearable",!0))},dependencies:[Xi,Ji,vt,bt,Et,je,Kt,Re,Jt,Ee,ue,de]});let i=t;return i})();var tn=zt({HRef:ot,Id:lt,TeacherId:lt,FullName:ot});var nn=(()=>{let t=class t extends xi{constructor(e,n){super(e,n,tn,"TeacherResources","FullName","FullName")}getTypeaheadItemByKey(e){return this.http.get(`${this.baseUrl}/`,{params:{fields:[this.keyAttr,this.labelAttr].join(","),[`filter.${this.labelAttr}`]:`~*${e}*`}}).pipe(Se(mi(this.typeaheadCodec)),Se(n=>St({Key:n[0].FullName,Value:`${n[0].FullName}`})))}};t.\u0275fac=function(n){return new(n||t)(R(Gt),R(ce))},t.\u0275prov=W({token:t,factory:t.\u0275fac,providedIn:"root"});let i=t;return i})();var rn=(()=>{let t=class t{constructor(e,n,r,a,o,g){this.studentsService=e,this.educationalEventsService=n,this.studyClassService=r,this.teacherResourcesService=a,this.state=o,this.translate=g,this.filter={student:null,educationalEvent:null,studyClass:null,teacher:null,dateFrom:null,dateTo:null,presenceTypes:null,confirmationStates:null,incidentTypes:null},this.filterChange=new A,this.absenceConfirmationStatesGrouped$=this.state.absenceConfirmationStates$.pipe(S(v=>qe(v,this.translate.instant("shared.multiselect.all-option")))),this.presenceTypesGrouped$=this.state.presenceTypes$.pipe(S(v=>v.filter(we(bi)).filter(we(ut))),S(mt),S(ht),S(v=>qe(v,this.translate.instant("shared.multiselect.all-option")))),this.incidentTypesGrouped$=this.state.presenceTypes$.pipe(S(v=>v.filter(ut)),S(mt),S(ht),S(v=>qe(v,this.translate.instant("shared.multiselect.all-option")))),this.classesHttpFilter={params:{fields:"IsActive","filter.IsActive":"=true"}}}show(){this.filterChange.emit(ke(_e({},this.filter),{dateFrom:sn(this.filter.dateFrom),dateTo:sn(this.filter.dateTo)}))}};t.\u0275fac=function(n){return new(n||t)(_(wi),_(ji),_($i),_(nn),_(X),_($e))},t.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-header"]],inputs:{filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[le([{provide:li,useClass:di},{provide:ci,useClass:Oi}]),te],decls:54,vars:53,consts:[[1,"row","g-3","mb-5"],[1,"col-md-6","col-lg-3"],[1,"form-label"],[3,"valueChange","typeaheadService","value"],[3,"valueChange","typeaheadService","value","additionalHttpParams"],[3,"valueChange","value"],[1,"row","g-3","align-items-end"],[1,"col-sm-12","col-md"],[3,"valuesChange","options","values"],[1,"col-auto"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(n,r){n&1&&(c(0,"div",0)(1,"div",1)(2,"label",2),h(3),u(4,"translate"),d(),c(5,"bkd-typeahead",3),K("valueChange",function(o){return Q(r.filter.student,o)||(r.filter.student=o),o}),d()(),c(6,"div",1)(7,"label",2),h(8),u(9,"translate"),d(),c(10,"bkd-typeahead",3),K("valueChange",function(o){return Q(r.filter.educationalEvent,o)||(r.filter.educationalEvent=o),o}),d()(),c(11,"div",1)(12,"label",2),h(13),u(14,"translate"),d(),c(15,"bkd-typeahead",4),K("valueChange",function(o){return Q(r.filter.studyClass,o)||(r.filter.studyClass=o),o}),d()(),c(16,"div",1)(17,"label",2),h(18),u(19,"translate"),d(),c(20,"bkd-typeahead",3),K("valueChange",function(o){return Q(r.filter.teacher,o)||(r.filter.teacher=o),o}),d()(),c(21,"div",1)(22,"label",2),h(23),u(24,"translate"),d(),c(25,"bkd-date-select",5),K("valueChange",function(o){return Q(r.filter.dateFrom,o)||(r.filter.dateFrom=o),o}),d()(),c(26,"div",1)(27,"label",2),h(28),u(29,"translate"),d(),c(30,"bkd-date-select",5),K("valueChange",function(o){return Q(r.filter.dateTo,o)||(r.filter.dateTo=o),o}),d()()(),c(31,"div",6)(32,"div",7)(33,"label",2),h(34),u(35,"translate"),d(),c(36,"bkd-multiselect",8),u(37,"async"),K("valuesChange",function(o){return Q(r.filter.confirmationStates,o)||(r.filter.confirmationStates=o),o}),d()(),c(38,"div",7)(39,"label",2),h(40),u(41,"translate"),d(),c(42,"bkd-multiselect",8),u(43,"async"),K("valuesChange",function(o){return Q(r.filter.presenceTypes,o)||(r.filter.presenceTypes=o),o}),d()(),c(44,"div",7)(45,"label",2),h(46),u(47,"translate"),d(),c(48,"bkd-multiselect",8),u(49,"async"),K("valuesChange",function(o){return Q(r.filter.incidentTypes,o)||(r.filter.incidentTypes=o),o}),d()(),c(50,"div",9)(51,"button",10),x("click",function(){return r.show()}),h(52),u(53,"translate"),d()()()),n&2&&(l(3),T(m(4,27,"edit-absences.header.student")),l(2),p("typeaheadService",r.studentsService),z("value",r.filter.student),l(3),T(m(9,29,"edit-absences.header.module-instance")),l(2),p("typeaheadService",r.educationalEventsService),z("value",r.filter.educationalEvent),l(3),T(m(14,31,"edit-absences.header.study-class")),l(2),p("typeaheadService",r.studyClassService),z("value",r.filter.studyClass),p("additionalHttpParams",r.classesHttpFilter),l(3),T(m(19,33,"edit-absences.header.teacher")),l(2),p("typeaheadService",r.teacherResourcesService),z("value",r.filter.teacher),l(3),T(m(24,35,"edit-absences.header.date-from")),l(2),z("value",r.filter.dateFrom),l(3),T(m(29,37,"edit-absences.header.date-to")),l(2),z("value",r.filter.dateTo),l(4),T(m(35,39,"edit-absences.header.confirmation-state")),l(2),p("options",m(37,41,r.absenceConfirmationStatesGrouped$)),z("values",r.filter.confirmationStates),l(4),T(m(41,43,"edit-absences.header.presence-type")),l(2),p("options",m(43,45,r.presenceTypesGrouped$)),z("values",r.filter.presenceTypes),l(4),T(m(47,47,"edit-absences.header.incident")),l(2),p("options",m(49,49,r.incidentTypesGrouped$)),z("values",r.filter.incidentTypes),l(4),E(" ",m(53,51,"edit-absences.header.show")," "))},dependencies:[ki,Ri,en,Ce,ue,de],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:0 1rem 1rem 0;border-bottom:1px solid #dee2e6}"],changeDetection:0});let i=t;return i})();function sn(i){return i?gi(i):null}var Ns=(i,t,s,e)=>({selection:i,entries:t,hasMore:s,loadingPage:e}),an=i=>({count:i}),on=i=>({returnparams:i}),Rs=i=>["student",i,"absences"];function js(i,t){if(i&1&&(c(0,"div",13)(1,"div",14),h(2),u(3,"async"),u(4,"translate"),u(5,"translate"),d(),c(6,"a",15),u(7,"async"),c(8,"i",16),h(9,"edit"),d()()()),i&2){let s=f(4).bkdLet,e=f();l(2),ve(" ",ie(4,7,"edit-absences.list.total",Y(15,an,m(3,5,e.state.total$)||0)),", ",ie(5,10,"edit-absences.list.selected",Y(17,an,s.selection.length))," "),l(4),$("disabled",s.selection.length===0),p("queryParams",Y(19,on,m(7,13,e.state.queryParamsString$)))}}function $s(i,t){if(i&1){let s=V();c(0,"tr")(1,"td",21),x("click",function(n){C(s);let r=N(3),a=f(6);return y(a.onCheckboxCellClick(n,r))}),c(2,"input",18,3),u(4,"async"),x("change",function(){let n=C(s).$implicit,r=f(6);return y(r.selectionService.toggle(n.lessonPresence))}),d()(),c(5,"td",19),u(6,"translate"),c(7,"span",22)(8,"i",16),h(9),d()()(),c(10,"td"),u(11,"translate"),c(12,"a",23),u(13,"async"),h(14),d(),D(15,"br"),h(16),d(),c(17,"td"),u(18,"translate"),h(19),u(20,"date"),d(),c(21,"td"),u(22,"translate"),h(23),u(24,"date"),u(25,"date"),d(),c(26,"td"),u(27,"translate"),h(28),d(),c(29,"td",24),u(30,"translate"),h(31),d(),c(32,"td"),u(33,"translate"),h(34),d()()}if(i&2){let s=t.$implicit,e=f(6);l(2),p("checked",m(4,21,e.selectionService.isSelected$(s.lessonPresence))),l(3),q("data-label",m(6,23,"edit-absences.list.header.presence")),l(2),p("className",s.presenceCategory),l(2),T(s.presenceCategoryIcon),l(),q("data-label",m(11,25,"edit-absences.list.header.mobil-student-module-instance-study-class")),l(2),p("routerLink",Y(48,Rs,s.lessonPresence.StudentRef.Id))("queryParams",Y(50,on,m(13,27,e.profileReturnParams$))),l(2),E(" ",s.lessonPresence.StudentFullName," "),l(2),ve(" ",s.lessonPresence.EventDesignation,", ",s.lessonPresence.StudyClassNumber," "),l(),q("data-label",m(18,29,"edit-absences.list.header.date")),l(2),E(" ",ie(20,31,s.lessonPresence.LessonDateTimeFrom,"mediumDate")," "),l(2),q("data-label",m(22,34,"edit-absences.list.header.time")),l(2),ve(" ",ie(24,36,s.lessonPresence.LessonDateTimeFrom,"shortTime"),"\u2013",ie(25,39,s.lessonPresence.LessonDateTimeTo,"shortTime")," "),l(3),q("data-label",m(27,42,"edit-absences.list.header.confirmation-state")),l(2),E(" ",s.confirmationState==null?null:s.confirmationState.Value," "),l(),q("data-label",m(30,44,"edit-absences.list.header.mobil-presence-type-incident")),l(2),E(" ",s.presenceType==null?null:s.presenceType.Designation," "),l(),q("data-label",m(33,46,"edit-absences.list.header.teacher")),l(2),E(" ",s.lessonPresence.TeacherInformation," ")}}function Hs(i,t){if(i&1){let s=V();c(0,"table",17)(1,"thead")(2,"tr")(3,"th")(4,"input",18),x("change",function(n){C(s);let r=f(5);return y(r.toggleAll(n.currentTarget==null?null:n.currentTarget.checked))}),d()(),c(5,"th",19),h(6),u(7,"translate"),d(),c(8,"th"),h(9),u(10,"translate"),D(11,"br"),h(12),u(13,"translate"),u(14,"translate"),d(),c(15,"th"),h(16),u(17,"translate"),d(),c(18,"th"),h(19),u(20,"translate"),d(),c(21,"th"),h(22),u(23,"translate"),d(),c(24,"th"),h(25),u(26,"translate"),u(27,"translate"),d(),c(28,"th"),h(29),u(30,"translate"),d()()(),c(31,"tbody"),b(32,$s,35,52,"tr",20),d()()}if(i&2){let s=f(4).bkdLet;l(4),p("checked",s.selection.length===s.entries.length),l(2),E(" ",m(7,12,"edit-absences.list.header.presence")," "),l(3),E(" ",m(10,14,"edit-absences.list.header.student")," "),l(3),ve(" ",m(13,16,"edit-absences.list.header.module-instance"),", ",m(14,18,"edit-absences.list.header.study-class")," "),l(4),E(" ",m(17,20,"edit-absences.list.header.date")," "),l(3),T(m(20,22,"edit-absences.list.header.time")),l(3),E(" ",m(23,24,"edit-absences.list.header.confirmation-state")," "),l(3),ve(" ",m(26,26,"edit-absences.list.header.presence-type")," / ",m(27,28,"edit-absences.list.header.incident")," "),l(4),T(m(30,30,"edit-absences.list.header.teacher")),l(3),p("ngForOf",s.entries)}}function Gs(i,t){i&1&&D(0,"bkd-spinner",25)}function Ws(i,t){if(i&1){let s=V();c(0,"button",26),x("click",function(){C(s);let n=f(5);return y(n.state.nextPage())}),h(1),u(2,"translate"),d()}i&2&&(l(),E(" ",m(2,1,"global.pagination.load-more")," "))}function qs(i,t){if(i&1){let s=V();c(0,"div",8),x("scrolled",function(){C(s);let n=f(4);return y(n.onScroll())}),b(1,js,10,21,"div",9)(2,Hs,33,32,"table",10)(3,Gs,1,0,"bkd-spinner",11)(4,Ws,3,3,"button",12),d()}if(i&2){let s=f(3).bkdLet;l(),p("ngIf",s.entries&&s.entries.length>0),l(),p("ngIf",s.entries&&s.entries.length>0),l(),p("ngIf",s.loadingPage),l(),p("ngIf",s.hasMore&&!s.loadingPage)}}function Us(i,t){i&1&&(c(0,"p",27),h(1),u(2,"translate"),d()),i&2&&(l(),T(m(2,1,"edit-absences.no-entries")))}function zs(i,t){if(i&1&&(ge(0),b(1,qs,5,4,"div",7)(2,Us,3,3,"ng-template",null,2,Z),be()),i&2){let s=N(3),e=f(2).bkdLet;l(),p("ngIf",e.entries&&e.entries.length>0||e.loadingPage)("ngIfElse",s)}}function Qs(i,t){i&1&&D(0,"bkd-spinner")}function Ks(i,t){if(i&1&&(ge(0),b(1,zs,4,2,"ng-container",6),u(2,"async"),b(3,Qs,1,0,"ng-template",null,1,Z),be()),i&2){let s=N(4),e=f(2);l(),p("ngIf",m(2,2,e.state.loading$)===!1)("ngIfElse",s)}}function Ys(i,t){i&1&&(c(0,"p",27),h(1),u(2,"translate"),d()),i&2&&(l(),T(m(2,1,"edit-absences.no-filter")))}function Zs(i,t){if(i&1){let s=V();ge(0),c(1,"bkd-edit-absences-header",5),u(2,"async"),x("filterChange",function(n){C(s);let r=f();return y(r.state.setFilter(n))}),d(),b(3,Ks,5,4,"ng-container",6),u(4,"async"),b(5,Ys,3,3,"ng-template",null,0,Z),be()}if(i&2){let s=N(6),e=f();l(),p("filter",m(2,3,e.filterFromParams$)),l(2),p("ngIf",m(4,5,e.state.isFilterValid$))("ngIfElse",s)}}var ln=(()=>{let t=class t{constructor(e,n,r,a){this.state=e,this.selectionService=n,this.scrollPosition=r,this.route=a,this.filterFromParams$=this.route.queryParams.pipe(S(Js)),this.profileReturnParams$=this.state.queryParamsString$,this.destroy$=new se}ngOnInit(){this.filterFromParams$.pipe(ee(1)).subscribe(e=>this.state.setFilter(e)),this.state.validFilter$.pipe(M(this.destroy$)).subscribe(()=>this.selectionService.clear()),this.selectionService.selection$.pipe(M(this.destroy$)).subscribe(e=>this.state.selected=e),this.route.queryParams.pipe(ee(1),S(({reload:e})=>e),Be(fi)).subscribe(()=>this.state.resetEntries())}ngAfterViewInit(){this.scrollPosition.restore()}ngOnDestroy(){this.destroy$.next()}toggleAll(e){this.state.entries$.pipe(ee(1)).subscribe(n=>this.selectionService.clear(e?n:null))}onCheckboxCellClick(e,n){e.target!==n&&n.click()}onScroll(){this.state.nextPage()}};t.\u0275fac=function(n){return new(n||t)(_(X),_(Qe),_(Bi),_(Ne))},t.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences-list"]],standalone:!0,features:[le([Qe]),te],decls:8,vars:17,consts:[["noFilter",""],["loading",""],["noEntries",""],["checkbox",""],[4,"bkdLet"],[3,"filterChange","filter"],[4,"ngIf","ngIfElse"],["class","py-3","infiniteScroll","",3,"scrolled",4,"ngIf","ngIfElse"],["infiniteScroll","",1,"py-3",3,"scrolled"],["class","d-flex align-items-center justify-content-between",4,"ngIf"],["class","table table-striped",4,"ngIf"],["class","inline",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-sm d-block mx-auto",3,"click",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-between"],[1,"total"],["routerLink","/edit-absences/edit",1,"edit","btn","btn-primary","btn-icon","mt-1","mb-2",3,"queryParams"],[1,"material-icons"],[1,"table","table-striped"],["type","checkbox",3,"change","checked"],[1,"presence-category"],[4,"ngFor","ngForOf"],[1,"edit-absences-checkbox",3,"click"],[3,"className"],[1,"student",3,"routerLink","queryParams"],[1,"designation-incident"],[1,"inline"],["type","button",1,"btn","btn-outline-secondary","btn-sm","d-block","mx-auto",3,"click"],[1,"mt-3"]],template:function(n,r){n&1&&(c(0,"h1"),h(1),u(2,"translate"),d(),b(3,Zs,7,7,"ng-container",4),u(4,"async"),u(5,"async"),u(6,"async"),u(7,"async")),n&2&&(l(),T(m(2,2,"edit-absences.title")),l(2),p("bkdLet",Ve(12,Ns,m(4,4,r.selectionService.selection$),m(5,6,r.state.presenceControlEntries$),m(6,8,r.state.hasMore$),m(7,10,r.state.loadingPage$))))},dependencies:[Ge,rn,Me,Ni,Ut,Ee,Ti,Ce,$t,ue,de],styles:[".presence-category[_ngcontent-%COMP%]{text-align:center}.presence-category[_ngcontent-%COMP%] .absent[_ngcontent-%COMP%]{color:#ea161f}.presence-category[_ngcontent-%COMP%] .present[_ngcontent-%COMP%]{color:#3d8608}.presence-category[_ngcontent-%COMP%] .unapproved[_ngcontent-%COMP%]{color:#ffa814}.designation-incident[_ngcontent-%COMP%]{max-width:50ch}@media screen and (max-width: 820px){.edit-absences-checkbox[_ngcontent-%COMP%]{text-align:left}.presence-category[_ngcontent-%COMP%]{text-align:right}.designation-incident[_ngcontent-%COMP%]{max-width:initial}}"],changeDetection:0});let i=t;return i})();function Js(i){return{student:i.student?Number(i.student):null,educationalEvent:i.educationalEvent?Number(i.educationalEvent):null,studyClass:i.studyClass?Number(i.studyClass):null,teacher:i.teacher??null,dateFrom:i.dateFrom?ct(i.dateFrom):null,dateTo:i.dateTo?ct(i.dateTo):null,presenceTypes:i.presenceTypes?i.presenceTypes.split(",").map(Number):null,confirmationStates:i.confirmationStates?i.confirmationStates.split(",").map(Number):null,incidentTypes:i.incidentTypes?i.incidentTypes.split(",").map(Number):null}}var cn=(()=>{let t=class t{constructor(e){this.state=e}};t.\u0275fac=function(n){return new(n||t)(_(X))},t.\u0275cmp=j({type:t,selectors:[["bkd-edit-absences"]],standalone:!0,features:[le([X,{provide:_i,useExisting:X},Ei]),te],decls:1,vars:0,template:function(n,r){n&1&&D(0,"router-outlet")},dependencies:[Wt],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0});let i=t;return i})();var lo=[{path:"",component:cn,children:[{path:"",component:ln,data:{restoreScrollPositionFrom:["/edit-absences/edit","/edit-absences/student/:id/addresses","/edit-absences/student/:id/absences","/edit-absences/student/:id/grades"]}},{path:"edit",component:Wi},Ai]}];export{lo as EDIT_ABSENCES_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-WN7VWSJW.js b/public/apps/webapp-schulverwaltung/chunk-WN7VWSJW.js deleted file mode 100644 index af7b11cf..00000000 --- a/public/apps/webapp-schulverwaltung/chunk-WN7VWSJW.js +++ /dev/null @@ -1 +0,0 @@ -import{Ac as t,Bc as n,Gc as o,Ic as r}from"./chunk-T7QWSMKM.js";var i=o({Key:r([n,t]),Value:t});export{i as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-WGARCXGP.js b/public/apps/webapp-schulverwaltung/chunk-XHR5YBGK.js similarity index 94% rename from public/apps/webapp-schulverwaltung/chunk-WGARCXGP.js rename to public/apps/webapp-schulverwaltung/chunk-XHR5YBGK.js index 1382d164..381b24a2 100644 --- a/public/apps/webapp-schulverwaltung/chunk-WGARCXGP.js +++ b/public/apps/webapp-schulverwaltung/chunk-XHR5YBGK.js @@ -1,2 +1,2 @@ -import{c as Ue}from"./chunk-JX2LWS6H.js";import{b as J}from"./chunk-67IXHFR4.js";import{a as ze}from"./chunk-VTGXNMZL.js";import{a as Ne}from"./chunk-RC3HL7KB.js";import"./chunk-KLXFX6SJ.js";import{p as Fe}from"./chunk-QHPTZGVN.js";import"./chunk-HHGALFFJ.js";import{e as Y}from"./chunk-2FIH3FGB.js";import{b as we}from"./chunk-MVTCHCDH.js";import"./chunk-Y4QYVF5K.js";import"./chunk-WN7VWSJW.js";import{c as U,d as je}from"./chunk-X2BR3YJG.js";import"./chunk-LO5XSJLW.js";import"./chunk-DMYOU5OM.js";import"./chunk-RWNJF4OZ.js";import{P as Le,c as Re,j as re,t as Ae,u as Oe}from"./chunk-GI4AZI25.js";import"./chunk-Q5U6YZUT.js";import"./chunk-N6FFLIGM.js";import{a as W,b as Be,c as Z}from"./chunk-33NXTXD7.js";import{u as Ee}from"./chunk-FTRAQKUW.js";import"./chunk-3AROKYRB.js";import{$ as y,$a as b,Ac as ke,Bb as r,Bc as De,Cb as c,Db as O,Fb as L,Ga as m,Gc as $e,Ha as te,Hd as D,Ia as s,Id as $,Ja as he,Jd as Me,L as x,N as de,O as I,R as pe,Sa as l,Sb as ve,Ta as d,Tb as k,Ua as f,Va as ie,Vb as Se,W as V,Wa as ne,Wb as B,Wc as w,Xa as ae,Xb as K,Ya as be,Z as P,_a as z,ab as ue,bb as fe,ca as le,ec as Ce,f as ee,g as ce,ha as G,ia as q,ib as A,ja as me,jb as h,jc as xe,k as j,kb as T,lb as S,m as u,mb as oe,n as H,nb as ge,qc as Te,rc as Ie,sb as _e,sc as Pe,ta as F,tb as v,ua as o,ub as N,va as _,yb as ye}from"./chunk-T7QWSMKM.js";var at=["*"];function ot(e,t){e&1&&ae(0)}function rt(e,t){if(e&1&&(l(0,"a",4),m(1,ot,1,0,"ng-container",5),d()),e&2){let a=b(),i=A(3);s("routerLink",a.link)("queryParams",a.linkParams),o(),s("ngTemplateOutlet",i)}}function st(e,t){e&1&&ae(0)}function ct(e,t){if(e&1&&(l(0,"a",6),m(1,st,1,0,"ng-container",5),d()),e&2){let a=b(),i=A(3);s("href",a.externalLink,F),o(),s("ngTemplateOutlet",i)}}function dt(e,t){if(e&1&&(l(0,"span",9),h(1),d()),e&2){let a=b(2);o(),T(a.count)}}function pt(e,t){e&1&&(me(),l(0,"svg",10),f(1,"path",11),d())}function lt(e,t){if(e&1&&(l(0,"span",7),h(1),r(2,"translate"),d(),l(3,"div"),fe(4),m(5,dt,2,1,"span",8)(6,pt,2,0,"ng-template",null,1,L),d()),e&2){let a=A(7),i=b();o(),T(c(2,3,i.label)),o(4),s("ngIf",i.hasCount(i.count))("ngIfElse",a)}}var He=(()=>{let t=class t{constructor(){}hasCount(i){return typeof i=="number"&&i>=0}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-action"]],inputs:{label:"label",count:"count",link:"link",linkParams:"linkParams",externalLink:"externalLink"},standalone:!0,features:[v],ngContentSelectors:at,decls:4,vars:2,consts:[["actionContent",""],["icon",""],[3,"routerLink","queryParams",4,"ngIf"],[3,"href",4,"ngIf"],[3,"routerLink","queryParams"],[4,"ngTemplateOutlet"],[3,"href"],[1,"label"],["class","count",4,"ngIf","ngIfElse"],[1,"count"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none"],["fill","currentColor","d","m12 20-1.425-1.4 5.6-5.6H4v-2h12.175l-5.6-5.6L12 4l8 8-8 8Z"]],template:function(n,p){n&1&&(ue(),m(0,rt,2,3,"a",2)(1,ct,2,2,"a",3)(2,lt,8,5,"ng-template",null,0,L)),n&2&&(s("ngIf",!p.externalLink),o(),s("ngIf",p.externalLink))},dependencies:[k,Pe,Se,$,D],styles:["a[_ngcontent-%COMP%]{display:flex;gap:1rem;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#f7e9d2;text-decoration:none;line-height:1}a[_ngcontent-%COMP%]:hover{background:#f2e0c3}a[_ngcontent-%COMP%]:focus-visible{outline-width:2px;outline-offset:-2px}div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.label[_ngcontent-%COMP%]{font-weight:400}.count[_ngcontent-%COMP%]{font-size:1.5rem}"]});let e=t;return e})();var Ve=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-deadline"]],inputs:{count:"count"},standalone:!0,features:[v],decls:3,vars:8,template:function(n,p){n&1&&(h(0),r(1,"translate"),r(2,"addSpace")),n&2&&ge("",c(1,3,"dashboard.actions.deadline"),"",O(2,5,": ",":"),"",p.count,` +import{c as Ue}from"./chunk-673RVEOB.js";import{b as J}from"./chunk-KDAC4GJ5.js";import{a as ze}from"./chunk-NYTDIO5P.js";import{a as Ne}from"./chunk-GXZYLK4L.js";import"./chunk-U4HODSW3.js";import{p as Fe}from"./chunk-7LCBKZQT.js";import"./chunk-PSXDSPKS.js";import{e as Y}from"./chunk-C7XT5XXE.js";import{b as we}from"./chunk-YMJC6QZX.js";import"./chunk-Y4QYVF5K.js";import"./chunk-HII3S2DL.js";import{c as U,d as je}from"./chunk-24AFRN2G.js";import"./chunk-RFO4NYUO.js";import"./chunk-5RDJZAUT.js";import"./chunk-DB66EACG.js";import{P as Le,c as Re,j as re,t as Ae,u as Oe}from"./chunk-ZK2MNT7Z.js";import"./chunk-AW7CSGKI.js";import"./chunk-FTDG26ID.js";import{a as W,b as Be,c as Z}from"./chunk-SOHFFTKU.js";import{u as Ee}from"./chunk-C56YGDXA.js";import"./chunk-UX5TA32W.js";import{$ as y,$a as b,Ab as r,Ac as De,Bb as c,Cb as O,Eb as L,Fc as $e,Ga as m,Gd as D,Ha as te,Hd as $,Ia as s,Id as Me,Ja as he,L as x,N as de,O as I,R as pe,Rb as ve,Sa as l,Sb as k,Ta as d,Ua as f,Ub as Se,Va as ie,Vb as B,Vc as w,W as V,Wa as ne,Wb as K,Xa as ae,Ya as be,Z as P,_a as z,ab as ue,bb as fe,ca as le,dc as Ce,f as ee,g as ce,ha as G,ia as q,ib as A,ic as xe,ja as me,jb as h,k as j,kb as T,lb as S,m as u,mb as oe,n as H,nb as ge,pc as Te,qc as Ie,rc as Pe,sb as _e,ta as F,tb as v,ua as o,ub as N,va as _,yb as ye,zc as ke}from"./chunk-XTHSYQMN.js";var at=["*"];function ot(e,t){e&1&&ae(0)}function rt(e,t){if(e&1&&(l(0,"a",4),m(1,ot,1,0,"ng-container",5),d()),e&2){let a=b(),i=A(3);s("routerLink",a.link)("queryParams",a.linkParams),o(),s("ngTemplateOutlet",i)}}function st(e,t){e&1&&ae(0)}function ct(e,t){if(e&1&&(l(0,"a",6),m(1,st,1,0,"ng-container",5),d()),e&2){let a=b(),i=A(3);s("href",a.externalLink,F),o(),s("ngTemplateOutlet",i)}}function dt(e,t){if(e&1&&(l(0,"span",9),h(1),d()),e&2){let a=b(2);o(),T(a.count)}}function pt(e,t){e&1&&(me(),l(0,"svg",10),f(1,"path",11),d())}function lt(e,t){if(e&1&&(l(0,"span",7),h(1),r(2,"translate"),d(),l(3,"div"),fe(4),m(5,dt,2,1,"span",8)(6,pt,2,0,"ng-template",null,1,L),d()),e&2){let a=A(7),i=b();o(),T(c(2,3,i.label)),o(4),s("ngIf",i.hasCount(i.count))("ngIfElse",a)}}var He=(()=>{let t=class t{constructor(){}hasCount(i){return typeof i=="number"&&i>=0}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-action"]],inputs:{label:"label",count:"count",link:"link",linkParams:"linkParams",externalLink:"externalLink"},standalone:!0,features:[v],ngContentSelectors:at,decls:4,vars:2,consts:[["actionContent",""],["icon",""],[3,"routerLink","queryParams",4,"ngIf"],[3,"href",4,"ngIf"],[3,"routerLink","queryParams"],[4,"ngTemplateOutlet"],[3,"href"],[1,"label"],["class","count",4,"ngIf","ngIfElse"],[1,"count"],["xmlns","http://www.w3.org/2000/svg","width","24","height","24","fill","none"],["fill","currentColor","d","m12 20-1.425-1.4 5.6-5.6H4v-2h12.175l-5.6-5.6L12 4l8 8-8 8Z"]],template:function(n,p){n&1&&(ue(),m(0,rt,2,3,"a",2)(1,ct,2,2,"a",3)(2,lt,8,5,"ng-template",null,0,L)),n&2&&(s("ngIf",!p.externalLink),o(),s("ngIf",p.externalLink))},dependencies:[k,Pe,Se,$,D],styles:["a[_ngcontent-%COMP%]{display:flex;gap:1rem;justify-content:space-between;align-items:center;padding:1rem 1.5rem;background:#f7e9d2;text-decoration:none;line-height:1}a[_ngcontent-%COMP%]:hover{background:#f2e0c3}a[_ngcontent-%COMP%]:focus-visible{outline-width:2px;outline-offset:-2px}div[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.label[_ngcontent-%COMP%]{font-weight:400}.count[_ngcontent-%COMP%]{font-size:1.5rem}"]});let e=t;return e})();var Ve=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-deadline"]],inputs:{count:"count"},standalone:!0,features:[v],decls:3,vars:8,template:function(n,p){n&1&&(h(0),r(1,"translate"),r(2,"addSpace")),n&2&&ge("",c(1,3,"dashboard.actions.deadline"),"",O(2,5,": ",":"),"",p.count,` `)},dependencies:[$,D,je],styles:["[_nghost-%COMP%]{background:#ea161f;color:#fff;white-space:nowrap;font-weight:500;font-size:.875rem;min-height:1.5rem;display:flex;padding:.375rem .5rem;align-items:center;border-radius:2.5rem}"]});let e=t;return e})();var Ge=$e({Id:De,Holder:ke});var qe=(()=>{let t=class t extends Be{constructor(i,n){super(i,n,Ge,"TeacherSubstitutions")}getTeacherSubstitution(i){return this.getList({params:{"filter.Id":`=${i}`}}).pipe(u(n=>n[0]||null))}};t.\u0275fac=function(n){return new(n||t)(P(Ce),P(w))},t.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var ut=["LessonTeacherRole","ClassTeacherRole","TeacherRole","AbsenceAdministratorRole"],ft=["LessonTeacherRole","TeacherRole","StudentRole","SubstituteAdministratorRole"],gt=["LessonTeacherRole","StudentRole"],E=(()=>{let t=class t{constructor(i,n,p,C,R,tt,it,nt){this.settingsService=i,this.lessonPresencesService=n,this.studentsService=p,this.courseService=C,this.teacherSubstitutionService=R,this.personService=tt,this.storageService=it,this.settings=nt,this.rolesAndPermissions$=this.settingsService.getRolesAndPermissions(),this.studentId$=new ce(1),this.lessonAbsences$=this.studentId$.pipe(I(g=>this.studentsService.getLessonAbsences(g)),x(1)),this.lessonIncidents$=this.studentId$.pipe(I(g=>this.studentsService.getLessonIncidents(g)),x(1)),this.loading$=this.rolesAndPermissions$.pipe(u(g=>g==null)),this.hasSearch$=this.rolesAndPermissions$.pipe(u(this.hasRoles(ut))),this.hasActions$=this.rolesAndPermissions$.pipe(u(this.hasRoles(ft))),this.hasTimetable$=this.rolesAndPermissions$.pipe(u(this.hasRoles(gt))),this.hasLessonTeacherRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["LessonTeacherRole"])),x(1)),this.hasTeacherRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["TeacherRole"])),x(1)),this.hasStudentRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["StudentRole"])),x(1)),this.hasSubstituteAdministratorRole$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["SubstituteAdministratorRole"])),x(1)),this.editAbsencesCount$=this.hasLessonTeacherRole$.pipe(I(g=>g?this.lessonPresencesService.checkableAbsencesCount():j(!1)),x(1)),this.openAbsencesCount$=this.rolesAndPermissions$.pipe(u(this.hasRoles(["LessonTeacherRole","ClassTeacherRole"])),I(g=>g?this.lessonPresencesService.getListOfUnconfirmed():j([])),u(g=>g.length),x(1)),this.myAbsencesCount$=this.hasStudentRole$.pipe(I(g=>g?this.getMyAbsences():j([])),u(this.getMyAbsencesCount.bind(this)),x(1)),this.coursesToRateCount$=this.courseService.getNumberOfCoursesForRating().pipe(de(0),x(1)),this.hasPresenceControl$=this.hasLessonTeacherRole$.pipe(I(g=>g?this.lessonPresencesService.hasLessonsLessonTeacher():j(!1)),x(1)),this.hasOpenAbsences$=this.openAbsencesCount$.pipe(u(g=>g>0),x(1)),this.editAbsencesParams$=this.getFullName().pipe(u(g=>({confirmationStates:this.settings.checkableAbsenceStateId,teacher:g})),x(1));let se=this.storageService.getPayload()?.id_person;se&&this.studentId$.next(Number(se))}hasRoles(i){return n=>(n??[]).some(p=>i.includes(p))}getMyAbsences(){return H([this.studentId$,this.lessonAbsences$,this.lessonIncidents$]).pipe(I(([i,n,p])=>this.loadTimetableEntries(i,n,p).pipe(u(C=>[...n,...p].map(R=>this.withTimetableEntry(R,C)).filter(Ee)))))}getMyAbsencesCount(i){return i?.filter(n=>("ConfirmationStateId"in n?n.ConfirmationStateId:null)===this.settings.unconfirmedAbsenceStateId).length||0}getFullName(){let i=Number(this.storageService.getPayload()?.substitution_id)||null;return i?this.teacherSubstitutionService.getTeacherSubstitution(i).pipe(u(n=>n?.Holder)):this.personService.getMyself().pipe(u(n=>n.FullName))}withTimetableEntry(i,n){return n.find(p=>p.Id===i.LessonRef.Id)?i:null}loadTimetableEntries(i,n,p){return this.studentsService.getTimetableEntries(i,{"filter.Id":`;${[...n,...p].map(C=>C.LessonRef.Id).join(";")}`})}};t.\u0275fac=function(n){return new(n||t)(P(J),P(Y),P(U),P(Fe),P(qe),P(we),P(Me),P(w))},t.\u0275prov=V({token:t,factory:t.\u0275fac});let e=t;return e})();var _t=()=>["/presence-control"],yt=()=>["/edit-absences"],vt=()=>["/open-absences"],St=()=>["/events"],Ct=()=>["/my-absences","report"],xt=()=>["/my-absences"];function Tt(e,t){e&1&&f(0,"bkd-dashboard-action",4),e&2&&s("label","dashboard.actions.presence-control")("link",N(2,_t))}function It(e,t){if(e&1&&(f(0,"bkd-dashboard-action",5),r(1,"async"),r(2,"async")),e&2){let a=b();s("label","dashboard.actions.edit-absences")("link",N(8,yt))("linkParams",c(1,4,a.dashboardService.editAbsencesParams$))("count",c(2,6,a.dashboardService.editAbsencesCount$))}}function Pt(e,t){if(e&1&&(f(0,"bkd-dashboard-action",6),r(1,"async")),e&2){let a=b();s("label","dashboard.actions.open-absences")("link",N(5,vt))("count",c(1,3,a.dashboardService.openAbsencesCount$))}}function kt(e,t){if(e&1&&(f(0,"bkd-dashboard-deadline",8),r(1,"async")),e&2){let a=b(2);s("count",c(1,1,a.dashboardService.coursesToRateCount$))}}function Dt(e,t){if(e&1&&(l(0,"bkd-dashboard-action",4),m(1,kt,2,3,"bkd-dashboard-deadline",7),r(2,"async"),d()),e&2){let a,i=b();s("label","dashboard.actions.tests")("link",N(5,St)),o(),s("ngIf",(a=c(2,3,i.dashboardService.coursesToRateCount$))!==null&&a!==void 0?a:!1)}}function $t(e,t){e&1&&f(0,"bkd-dashboard-action",4),e&2&&s("label","dashboard.actions.my-absences-report")("link",N(2,Ct))}function Mt(e,t){if(e&1&&(f(0,"bkd-dashboard-action",6),r(1,"async")),e&2){let a=b();s("label","dashboard.actions.my-absences")("link",N(5,xt))("count",c(1,3,a.dashboardService.myAbsencesCount$))}}function Et(e,t){if(e&1&&f(0,"bkd-dashboard-action",9),e&2){let a=b();s("label","dashboard.actions.substitutions")("externalLink",a.substitutionsAdminLink)}}var We=(()=>{let t=class t{constructor(i,n){this.dashboardService=i,this.settings=n}get substitutionsAdminLink(){return this.settings.dashboard.substitutionsAdminLink}};t.\u0275fac=function(n){return new(n||t)(_(E),_(w))},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-actions"]],standalone:!0,features:[v],decls:15,vars:23,consts:[[3,"label","link",4,"ngIf"],[3,"label","link","linkParams","count",4,"ngIf"],[3,"label","link","count",4,"ngIf"],[3,"label","externalLink",4,"ngIf"],[3,"label","link"],[3,"label","link","linkParams","count"],[3,"label","link","count"],[3,"count",4,"ngIf"],[3,"count"],[3,"label","externalLink"]],template:function(n,p){n&1&&(m(0,Tt,1,3,"bkd-dashboard-action",0),r(1,"async"),m(2,It,3,9,"bkd-dashboard-action",1),r(3,"async"),r(4,"async"),m(5,Pt,2,6,"bkd-dashboard-action",2),r(6,"async"),m(7,Dt,3,6,"bkd-dashboard-action",0),r(8,"async"),m(9,$t,1,3,"bkd-dashboard-action",0),r(10,"async"),m(11,Mt,2,6,"bkd-dashboard-action",2),r(12,"async"),m(13,Et,1,2,"bkd-dashboard-action",3),r(14,"async")),n&2&&(s("ngIf",c(1,7,p.dashboardService.hasPresenceControl$)),o(2),s("ngIf",c(3,9,p.dashboardService.hasLessonTeacherRole$)&&c(4,11,p.dashboardService.editAbsencesParams$)),o(3),s("ngIf",c(6,13,p.dashboardService.hasOpenAbsences$)),o(2),s("ngIf",c(8,15,p.dashboardService.hasTeacherRole$)),o(2),s("ngIf",c(10,17,p.dashboardService.hasStudentRole$)),o(2),s("ngIf",c(12,19,p.dashboardService.hasStudentRole$)),o(2),s("ngIf",c(14,21,p.dashboardService.hasSubstituteAdministratorRole$)))},dependencies:[k,He,Ve,B],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}"]});let e=t;return e})();var Ye=(()=>{let t=class t{constructor(i,n){this.studentsRestService=i,this.router=n}navigateToDossier(i){let n=Number(i);this.router.navigate(["dashboard","student",n,"addresses"])}};t.\u0275fac=function(n){return new(n||t)(_(U),_(Ie))},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-search"]],standalone:!0,features:[v],decls:1,vars:2,consts:[[3,"valueChange","typeaheadService","placeholder"]],template:function(n,p){n&1&&(l(0,"bkd-typeahead",0),z("valueChange",function(R){return R&&p.navigateToDossier(R)}),d()),n&2&&s("typeaheadService",p.studentsRestService)("placeholder","dashboard.search.placeholder")},dependencies:[ze],styles:["[_nghost-%COMP%]{display:block;padding:.75rem;background:#f7e9d2}"]});let e=t;return e})();var Ze=(()=>{let t=class t{constructor(i){this.sanitizer=i}transform(i,n){switch(n){case"html":return this.sanitizer.bypassSecurityTrustHtml(i);case"style":return this.sanitizer.bypassSecurityTrustStyle(i);case"script":return this.sanitizer.bypassSecurityTrustScript(i);case"url":return this.sanitizer.bypassSecurityTrustUrl(i);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(i);default:throw new Error(`Invalid safe type specified: ${n}`)}}};t.\u0275fac=function(n){return new(n||t)(_(xe,16))},t.\u0275pipe=le({name:"safe",type:t,pure:!0,standalone:!0});let e=t;return e})();function Rt(e,t){e&1&&(l(0,"th"),h(1),r(2,"translate"),d()),e&2&&(o(),S(" ",c(2,1,"dashboard.timetable.table.teacher")," "))}function At(e,t){e&1&&(l(0,"th"),h(1),r(2,"translate"),d()),e&2&&(o(),S(" ",c(2,1,"dashboard.timetable.table.room")," "))}function Ot(e,t){if(e&1&&(l(0,"a",12),h(1),l(2,"span",13),h(3),d()()),e&2){let a=b().$implicit,i=b(2);s("href",i.buildLink(a.eventId),F),o(),S(" ",a.subject,""),o(2),S(", ",a.studyClass,"")}}function Lt(e,t){if(e&1&&h(0),e&2){let a=b().$implicit;S(" ",a.subject," ")}}function Bt(e,t){if(e&1&&(l(0,"td",14),h(1),r(2,"translate"),d()),e&2){let a=b().$implicit;o(),oe(" ",c(2,2,"dashboard.timetable.table.study-class"),": ",a.studyClass," ")}}function wt(e,t){if(e&1&&(l(0,"td",15),h(1),d()),e&2){let a=b().$implicit;o(),S(" ",a.teacher," ")}}function jt(e,t){e&1&&(l(0,"span",18),h(1),r(2,"translate"),d()),e&2&&(o(),T(c(2,1,"dashboard.timetable.table.room")))}function Ft(e,t){if(e&1&&(l(0,"td",16),m(1,jt,3,3,"span",17),h(2),d()),e&2){let a=b().$implicit;o(),s("ngIf",a.room),o(),S(" ",a.room," ")}}function Nt(e,t){if(e&1&&(l(0,"tr")(1,"td",6),h(2),r(3,"date"),r(4,"date"),d(),l(5,"td",7),m(6,Ot,4,3,"a",8),r(7,"async"),m(8,Lt,1,1,"ng-template",null,1,L),d(),m(10,Bt,3,4,"td",9),r(11,"async"),m(12,wt,2,1,"td",10),r(13,"async"),m(14,Ft,3,2,"td",11),r(15,"async"),d()),e&2){let a=t.$implicit,i=A(9),n=b(2);o(2),oe(" ",O(3,7,a.from,"HH:mm"),"\u2013",O(4,10,a.until,"HH:mm")," "),o(4),s("ngIf",c(7,13,n.isTeacher$))("ngIfElse",i),o(4),s("ngIf",c(11,15,n.isTeacher$)),o(2),s("ngIf",c(13,17,n.isStudent$)),o(2),s("ngIf",c(15,19,n.isStudent$))}}function zt(e,t){if(e&1&&(l(0,"table",3)(1,"thead")(2,"tr")(3,"th"),h(4),r(5,"translate"),d(),l(6,"th"),h(7),r(8,"translate"),d(),m(9,Rt,3,3,"th",4),r(10,"async"),m(11,At,3,3,"th",4),r(12,"async"),d()(),l(13,"tbody"),m(14,Nt,16,21,"tr",5),d()()),e&2){let a=b();o(4),T(c(5,5,"dashboard.timetable.table.time")),o(3),T(c(8,7,"dashboard.timetable.table.subject")),o(2),s("ngIf",c(10,9,a.isStudent$)),o(2),s("ngIf",c(12,11,a.isStudent$)),o(3),s("ngForOf",a.entries)}}function Ut(e,t){e&1&&(l(0,"p"),h(1),r(2,"translate"),d()),e&2&&(o(),T(c(2,1,"dashboard.timetable.no-entries")))}var Je=(()=>{let t=class t{constructor(i,n){this.dashboardService=i,this.settings=n,this.entries=[],this.isStudent$=this.dashboardService.hasStudentRole$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$}buildLink(i){return this.settings.eventlist.eventdetail.replace(":id",String(i))}};t.\u0275fac=function(n){return new(n||t)(_(E),_(w))},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-timetable-table"]],inputs:{entries:"entries"},standalone:!0,features:[v],decls:3,vars:2,consts:[["noEntries",""],["noLink",""],["class","table",4,"ngIf","ngIfElse"],[1,"table"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"time"],[1,"subject"],["target","_parent",3,"href",4,"ngIf","ngIfElse"],["class","study-class",4,"ngIf"],["class","teacher",4,"ngIf"],["class","room",4,"ngIf"],["target","_parent",3,"href"],[1,"subject-study-class"],[1,"study-class"],[1,"teacher"],[1,"room"],["class","room-label",4,"ngIf"],[1,"room-label"]],template:function(n,p){if(n&1&&m(0,zt,15,13,"table",2)(1,Ut,3,3,"ng-template",null,0,L),n&2){let C=A(2);s("ngIf",p.entries.length>0)("ngIfElse",C)}},dependencies:[k,ve,B,K,$,D],styles:['td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{padding:1rem 1.75rem}.room-label[_ngcontent-%COMP%], td.study-class[_ngcontent-%COMP%]{display:none}@media (max-width: 767.98px){table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{display:none}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{border-top:1px solid var(--bs-border-color)}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:"time room" "subject subject" "study-class study-class" "teacher teacher";gap:.5rem;padding:1rem;border-bottom:1px solid var(--bs-border-color)}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:0;padding:0}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.time[_ngcontent-%COMP%]{grid-area:time;font-size:.875rem;line-height:1.125rem;font-weight:300}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.subject[_ngcontent-%COMP%]{grid-area:subject;font-size:1rem;line-height:1.25rem;font-weight:400}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.teacher[_ngcontent-%COMP%]{grid-area:teacher;font-size:.8125rem;line-height:1.0625rem;font-weight:300}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.room[_ngcontent-%COMP%]{grid-area:room;text-align:right;font-size:.875rem;line-height:1.125rem;font-weight:300}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.study-class[_ngcontent-%COMP%]{grid-area:study-class;font-size:.8125rem;line-height:1.0625rem;font-weight:300}td.study-class[_ngcontent-%COMP%]{display:block}.subject-study-class[_ngcontent-%COMP%]{display:none}.room-label[_ngcontent-%COMP%]{display:inline}}']});let e=t;return e})();function Ht(e,t){if(e&1&&(l(0,"a",9),r(1,"safe"),h(2),r(3,"translate"),d()),e&2){let a=t.ngIf;s("href",O(1,2,a,"url"),F),o(2),S(" ",c(3,5,"dashboard.timetable.subscribe-calendar")," ")}}function Vt(e,t){if(e&1&&(l(0,"a",13),r(1,"safe"),h(2),r(3,"translate"),d()),e&2){let a=t.ngIf;s("href",O(1,2,a,"url"),F),o(2),S(" ",c(3,5,"dashboard.timetable.subscribe-calendar")," ")}}function Gt(e,t){if(e&1&&(ie(0),f(1,"bkd-dashboard-timetable-table",11),m(2,Vt,4,7,"a",12),r(3,"async"),ne()),e&2){let a=b().bkdLet,i=b();o(),s("entries",a),o(),s("ngIf",c(3,2,i.getSubscribeCalendarUrl()))}}function qt(e,t){if(e&1&&(ie(0),m(1,Gt,4,4,"ng-container",10),r(2,"async"),ne()),e&2){let a=b(),i=A(21);o(),s("ngIf",c(2,2,a.loading$)===!1)("ngIfElse",i)}}function Kt(e,t){e&1&&f(0,"bkd-spinner")}var Wt="cal",Qe=(()=>{let t=class t{constructor(i,n,p,C){this.studentsService=i,this.lessonPresencesService=n,this.userSettings=p,this.dashboardService=C,this.studentId$=this.dashboardService.studentId$,this.isTeacher$=this.dashboardService.hasLessonTeacherRole$,this.isStudent$=this.dashboardService.hasStudentRole$,this.date$=new ee(re(new Date)),this.loading$=new ee(!0),this.timetableEntries$=this.loadTimetableEntries()}gotoToday(){this.loading$.next(!0),this.date$.next(re(new Date))}gotoPreviousDay(){this.loading$.next(!0),this.date$.next(Oe(this.date$.getValue(),1))}gotoNextDay(){this.loading$.next(!0),this.date$.next(Re(this.date$.getValue(),1))}getSubscribeCalendarUrl(){return this.userSettings.getSetting(Wt)}loadTimetableEntries(){return H([this.isTeacher$,this.isStudent$]).pipe(I(([i,n])=>i?this.loadTeacherTimetableEntries():n?this.loadStudentTimetableEntries():j([])),pe(()=>this.loading$.next(!1)))}loadTeacherTimetableEntries(){return this.date$.pipe(I(i=>this.lessonPresencesService.getLessonsByDate(i)),u(Ue),u(i=>i.map(this.convertLesson.bind(this))))}loadStudentTimetableEntries(){return H([this.studentId$,this.date$]).pipe(I(([i,n])=>this.studentsService.getTimetableEntries(i,{"filter.From":`=${Ae(n,"yyyy-MM-dd")}`,sort:"From,To"})),u(i=>i.map(this.convertTimetableEntry.bind(this))))}convertLesson(i){return{id:i.LessonRef.Id,from:i.LessonDateTimeFrom,until:i.LessonDateTimeTo,eventId:i.EventRef.Id,subject:i.EventDesignation,studyClass:i.StudyClassNumber}}convertTimetableEntry(i){return{id:i.Id,from:i.From,until:i.To,eventId:i.EventId,subject:i.EventDesignation,room:i.EventLocation||void 0,teacher:i.EventManagerInformation||void 0}}};t.\u0275fac=function(n){return new(n||t)(_(U),_(Y),_(J),_(E))},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-timetable"]],standalone:!0,features:[v],decls:22,vars:21,consts:[["loading",""],[1,"header"],["type","button",1,"btn","btn-primary","today",3,"click"],["type","button",1,"btn","btn-secondary","previous-day",3,"click"],[1,"material-icons"],["type","button",1,"btn","btn-secondary","next-day",3,"click"],[1,"date"],["target","_parent","class","btn btn-secondary subscribe-calendar-header",3,"href",4,"ngIf"],[4,"bkdLet"],["target","_parent",1,"btn","btn-secondary","subscribe-calendar-header",3,"href"],[4,"ngIf","ngIfElse"],[3,"entries"],["target","_parent","class","btn btn-secondary subscribe-calendar-bottom",3,"href",4,"ngIf"],["target","_parent",1,"btn","btn-secondary","subscribe-calendar-bottom",3,"href"]],template:function(n,p){if(n&1){let C=be();l(0,"div",1)(1,"button",2),z("click",function(){return G(C),q(p.gotoToday())}),h(2),r(3,"translate"),d(),l(4,"button",3),r(5,"translate"),z("click",function(){return G(C),q(p.gotoPreviousDay())}),l(6,"span",4),h(7,"chevron_left"),d()(),l(8,"button",5),r(9,"translate"),z("click",function(){return G(C),q(p.gotoNextDay())}),l(10,"span",4),h(11,"chevron_right"),d()(),l(12,"div",6),h(13),r(14,"async"),r(15,"date"),d(),m(16,Ht,4,7,"a",7),r(17,"async"),d(),m(18,qt,3,4,"ng-container",8),r(19,"async"),m(20,Kt,1,0,"ng-template",null,0,L)}n&2&&(o(2),S(" ",c(3,6,"dashboard.timetable.today")," "),o(2),te("aria-label",c(5,8,"dashboard.timetable.previousDay")),o(4),te("aria-label",c(9,10,"dashboard.timetable.nextDay")),o(5),T(O(15,14,c(14,12,p.date$),"E, dd. MMMM yyyy")),o(3),s("ngIf",c(17,17,p.getSubscribeCalendarUrl())),o(2),s("bkdLet",c(19,19,p.timetableEntries$)))},dependencies:[k,W,Je,Z,B,K,$,D,Ze],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1rem}.header[_ngcontent-%COMP%]{margin-top:1rem;margin-bottom:2rem;display:flex;align-items:center;gap:1rem}.previous-day[_ngcontent-%COMP%], .next-day[_ngcontent-%COMP%]{padding-left:.375rem;padding-right:.375rem}.date[_ngcontent-%COMP%]{font-size:1.25rem;font-weight:600}.subscribe-calendar-header[_ngcontent-%COMP%]{margin-left:auto}.subscribe-calendar-bottom[_ngcontent-%COMP%]{display:none}a.btn[_ngcontent-%COMP%]{text-decoration:none}@media (max-width: 767.98px){.subscribe-calendar-header[_ngcontent-%COMP%]{display:none}.subscribe-calendar-bottom[_ngcontent-%COMP%]{display:block;margin-top:2rem}}@media (max-width: 767.98px) and (max-width: 575.98px){.header[_ngcontent-%COMP%]{flex-wrap:wrap-reverse}.header[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{width:100%}}"]});let e=t;return e})();var Yt=(e,t,a,i)=>({loading:e,hasSearch:t,hasActions:a,hasTimetable:i});function Zt(e,t){e&1&&f(0,"bkd-spinner")}function Jt(e,t){e&1&&(l(0,"p"),h(1),r(2,"translate"),d()),e&2&&(o(),S(" ",c(2,1,"dashboard.no-access")," "))}function Qt(e,t){e&1&&(l(0,"div")(1,"h2"),h(2),r(3,"translate"),d(),f(4,"bkd-dashboard-search"),d()),e&2&&(o(2),T(c(3,1,"dashboard.search.title")))}function Xt(e,t){e&1&&(l(0,"div")(1,"h2"),h(2),r(3,"translate"),d(),f(4,"bkd-dashboard-actions"),d()),e&2&&(o(2),T(c(3,1,"dashboard.actions.title")))}function ei(e,t){if(e&1&&(l(0,"div",5),m(1,Qt,5,3,"div",1)(2,Xt,5,3,"div",1),d()),e&2){let a=b().bkdLet;o(),s("ngIf",a.hasSearch),o(),s("ngIf",a.hasActions)}}function ti(e,t){e&1&&(l(0,"div",6)(1,"h2"),h(2),r(3,"translate"),d(),f(4,"bkd-dashboard-timetable"),d()),e&2&&(o(2),T(c(3,1,"dashboard.timetable.title")))}function ii(e,t){if(e&1&&(l(0,"div")(1,"h1"),h(2),r(3,"translate"),d(),m(4,Zt,1,0,"bkd-spinner",1)(5,Jt,3,3,"p",1),l(6,"div",2),m(7,ei,3,2,"div",3)(8,ti,5,3,"div",4),d()()),e&2){let a=t.bkdLet;o(),he("visually-hidden",a.loading||a.hasSearch||a.hasActions||a.hasTimetable),o(),S(" ",c(3,7,"dashboard.heading")," "),o(2),s("ngIf",a.loading),o(),s("ngIf",!a.loading&&!a.hasSearch&&!a.hasActions&&!a.hasTimetable),o(2),s("ngIf",a.hasSearch||a.hasActions),o(),s("ngIf",a.hasTimetable)}}var Xe=(()=>{let t=class t{constructor(i){this.dashboardService=i}};t.\u0275fac=function(n){return new(n||t)(_(E))},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard-layout"]],standalone:!0,features:[v],decls:5,vars:14,consts:[[4,"bkdLet"],[4,"ngIf"],[1,"columns"],["class","search-actions-column",4,"ngIf"],["class","timetable-column",4,"ngIf"],[1,"search-actions-column"],[1,"timetable-column"]],template:function(n,p){n&1&&(m(0,ii,9,9,"div",0),r(1,"async"),r(2,"async"),r(3,"async"),r(4,"async")),n&2&&s("bkdLet",ye(9,Yt,c(1,1,p.dashboardService.loading$),c(2,3,p.dashboardService.hasSearch$),c(3,5,p.dashboardService.hasActions$),c(4,7,p.dashboardService.hasTimetable$)))},dependencies:[W,k,Z,Ye,We,Qe,B,$,D],styles:[".columns[_ngcontent-%COMP%]{display:flex;flex-direction:column}.columns[_ngcontent-%COMP%], .search-actions-column[_ngcontent-%COMP%]{gap:3rem}.search-actions-column[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;max-width:40rem}.timetable-column[_ngcontent-%COMP%]{flex:2}@media (min-width: 992px){.columns[_ngcontent-%COMP%]{flex-direction:row;gap:1.5rem}.search-actions-column[_ngcontent-%COMP%]{max-width:33%}}"],changeDetection:0});let e=t;return e})();var et=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=y({type:t,selectors:[["bkd-dashboard"]],standalone:!0,features:[_e([E,Le]),v],decls:1,vars:0,template:function(n,p){n&1&&f(0,"router-outlet")},dependencies:[Te],changeDetection:0});let e=t;return e})();var dn=[{path:"",component:et,children:[{path:"",component:Xe},Ne]}];export{dn as DASHBOARD_ROUTES}; diff --git a/public/apps/webapp-schulverwaltung/chunk-2IXEFCAH.js b/public/apps/webapp-schulverwaltung/chunk-XLPJMZ3E.js similarity index 80% rename from public/apps/webapp-schulverwaltung/chunk-2IXEFCAH.js rename to public/apps/webapp-schulverwaltung/chunk-XLPJMZ3E.js index e17c6647..afd0ee6a 100644 --- a/public/apps/webapp-schulverwaltung/chunk-2IXEFCAH.js +++ b/public/apps/webapp-schulverwaltung/chunk-XLPJMZ3E.js @@ -1 +1 @@ -import{E as o,G as a,L as c,W as u,f as n,m as s,zd as p}from"./chunk-T7QWSMKM.js";var f=(()=>{let e=class e{getSortingChar$(i){return this.sorting$.pipe(s(t=>t&&i===t.key?t.ascending?"\u2193":"\u2191":""))}constructor(){this.sortingSubject$=new n(null),this.sorting$=this.sortingSubject$.asObservable().pipe(a(p),c(1))}setSorting(i){this.sortingSubject$.next(i)}toggleSorting(i){this.sorting$.pipe(o(1)).subscribe(t=>{let g=t&&t.key===i?!t.ascending:!0;this.sortingSubject$.next({key:i,ascending:g})})}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{f as a}; +import{E as o,G as a,L as c,W as u,f as n,m as s,yd as p}from"./chunk-XTHSYQMN.js";var f=(()=>{let e=class e{getSortingChar$(i){return this.sorting$.pipe(s(t=>t&&i===t.key?t.ascending?"\u2193":"\u2191":""))}constructor(){this.sortingSubject$=new n(null),this.sorting$=this.sortingSubject$.asObservable().pipe(a(p),c(1))}setSorting(i){this.sortingSubject$.next(i)}toggleSorting(i){this.sorting$.pipe(o(1)).subscribe(t=>{let g=t&&t.key===i?!t.ascending:!0;this.sortingSubject$.next({key:i,ascending:g})})}};e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=u({token:e,factory:e.\u0275fac,providedIn:"root"});let r=e;return r})();export{f as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-T7QWSMKM.js b/public/apps/webapp-schulverwaltung/chunk-XTHSYQMN.js similarity index 63% rename from public/apps/webapp-schulverwaltung/chunk-T7QWSMKM.js rename to public/apps/webapp-schulverwaltung/chunk-XTHSYQMN.js index c312470b..e9452417 100644 --- a/public/apps/webapp-schulverwaltung/chunk-T7QWSMKM.js +++ b/public/apps/webapp-schulverwaltung/chunk-XTHSYQMN.js @@ -1,9 +1,9 @@ -var mx=Object.defineProperty,vx=Object.defineProperties;var yx=Object.getOwnPropertyDescriptors;var Vs=Object.getOwnPropertySymbols;var Kp=Object.prototype.hasOwnProperty,Yp=Object.prototype.propertyIsEnumerable;var Zp=(t,e,r)=>e in t?mx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||={})Kp.call(e,r)&&Zp(t,r,e[r]);if(Vs)for(var r of Vs(e))Yp.call(e,r)&&Zp(t,r,e[r]);return t},$=(t,e)=>vx(t,yx(e));var Dx=(t,e)=>{var r={};for(var n in t)Kp.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Vs)for(var n of Vs(t))e.indexOf(n)<0&&Yp.call(t,n)&&(r[n]=t[n]);return r};var Us=(t,e,r)=>new Promise((n,o)=>{var i=u=>{try{a(r.next(u))}catch(c){o(c)}},s=u=>{try{a(r.throw(u))}catch(c){o(c)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,s);a((r=r.apply(t,e)).next())});var nl=null;var tl=1,rl=Symbol("SIGNAL");function V(t){let e=nl;return nl=t,e}function Qp(){return nl}var ol={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function wx(t){if(!(cl(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===tl)){if(!t.producerMustRecompute(t)&&!sl(t)){t.dirty=!1,t.lastCleanEpoch=tl;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=tl}}function il(t){return t&&(t.nextProducerIndex=0),V(t)}function Jp(t,e){if(V(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(cl(t))for(let r=t.nextProducerIndex;rt.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function sl(t){ll(t);for(let e=0;e0}function ll(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function bx(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function Cx(t){return t.producerNode!==void 0}function Ex(){throw new Error}var Ix=Ex;function Xp(t){Ix=t}function T(t){return typeof t=="function"}function Kr(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Bs=Kr(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription: +var mx=Object.defineProperty,vx=Object.defineProperties;var yx=Object.getOwnPropertyDescriptors;var Vs=Object.getOwnPropertySymbols;var Zp=Object.prototype.hasOwnProperty,Kp=Object.prototype.propertyIsEnumerable;var qp=(t,e,r)=>e in t?mx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,D=(t,e)=>{for(var r in e||={})Zp.call(e,r)&&qp(t,r,e[r]);if(Vs)for(var r of Vs(e))Kp.call(e,r)&&qp(t,r,e[r]);return t},$=(t,e)=>vx(t,yx(e));var Dx=(t,e)=>{var r={};for(var n in t)Zp.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&Vs)for(var n of Vs(t))e.indexOf(n)<0&&Kp.call(t,n)&&(r[n]=t[n]);return r};var Us=(t,e,r)=>new Promise((n,o)=>{var i=u=>{try{a(r.next(u))}catch(c){o(c)}},s=u=>{try{a(r.throw(u))}catch(c){o(c)}},a=u=>u.done?n(u.value):Promise.resolve(u.value).then(i,s);a((r=r.apply(t,e)).next())});var tl=null;var el=1,nl=Symbol("SIGNAL");function V(t){let e=tl;return tl=t,e}function Yp(){return tl}var rl={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function wx(t){if(!(ul(t)&&!t.dirty)&&!(!t.dirty&&t.lastCleanEpoch===el)){if(!t.producerMustRecompute(t)&&!il(t)){t.dirty=!1,t.lastCleanEpoch=el;return}t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=el}}function ol(t){return t&&(t.nextProducerIndex=0),V(t)}function Qp(t,e){if(V(e),!(!t||t.producerNode===void 0||t.producerIndexOfThis===void 0||t.producerLastReadVersion===void 0)){if(ul(t))for(let r=t.nextProducerIndex;rt.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}function il(t){cl(t);for(let e=0;e0}function cl(t){t.producerNode??=[],t.producerIndexOfThis??=[],t.producerLastReadVersion??=[]}function bx(t){t.liveConsumerNode??=[],t.liveConsumerIndexOfThis??=[]}function Cx(t){return t.producerNode!==void 0}function Ex(){throw new Error}var Ix=Ex;function Jp(t){Ix=t}function T(t){return typeof t=="function"}function Zr(t){let r=t(n=>{Error.call(n),n.stack=new Error().stack});return r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r}var Bs=Zr(t=>function(r){t(this),this.message=r?`${r.length} errors occurred during unsubscription: ${r.map((n,o)=>`${o+1}) ${n.toString()}`).join(` - `)}`:"",this.name="UnsubscriptionError",this.errors=r});function hr(t,e){if(t){let r=t.indexOf(e);0<=r&&t.splice(r,1)}}var ie=class t{constructor(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let e;if(!this.closed){this.closed=!0;let{_parentage:r}=this;if(r)if(this._parentage=null,Array.isArray(r))for(let i of r)i.remove(this);else r.remove(this);let{initialTeardown:n}=this;if(T(n))try{n()}catch(i){e=i instanceof Bs?i.errors:[i]}let{_finalizers:o}=this;if(o){this._finalizers=null;for(let i of o)try{eg(i)}catch(s){e=e??[],s instanceof Bs?e=[...e,...s.errors]:e.push(s)}}if(e)throw new Bs(e)}}add(e){var r;if(e&&e!==this)if(this.closed)eg(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(r=this._finalizers)!==null&&r!==void 0?r:[]).push(e)}}_hasParent(e){let{_parentage:r}=this;return r===e||Array.isArray(r)&&r.includes(e)}_addParent(e){let{_parentage:r}=this;this._parentage=Array.isArray(r)?(r.push(e),r):r?[r,e]:e}_removeParent(e){let{_parentage:r}=this;r===e?this._parentage=null:Array.isArray(r)&&hr(r,e)}remove(e){let{_finalizers:r}=this;r&&hr(r,e),e instanceof t&&e._removeParent(this)}};ie.EMPTY=(()=>{let t=new ie;return t.closed=!0,t})();var dl=ie.EMPTY;function $s(t){return t instanceof ie||t&&"closed"in t&&T(t.remove)&&T(t.add)&&T(t.unsubscribe)}function eg(t){T(t)?t():t.unsubscribe()}var Dt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Yr={setTimeout(t,e,...r){let{delegate:n}=Yr;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=Yr;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Hs(t){Yr.setTimeout(()=>{let{onUnhandledError:e}=Dt;if(e)e(t);else throw t})}function Yt(){}var tg=fl("C",void 0,void 0);function ng(t){return fl("E",void 0,t)}function rg(t){return fl("N",t,void 0)}function fl(t,e,r){return{kind:t,value:e,error:r}}var pr=null;function Qr(t){if(Dt.useDeprecatedSynchronousErrorHandling){let e=!pr;if(e&&(pr={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=pr;if(pr=null,r)throw n}}else t()}function og(t){Dt.useDeprecatedSynchronousErrorHandling&&pr&&(pr.errorThrown=!0,pr.error=t)}var gr=class extends ie{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,$s(e)&&e.add(this)):this.destination=Mx}static create(e,r,n){return new Qt(e,r,n)}next(e){this.isStopped?pl(rg(e),this):this._next(e)}error(e){this.isStopped?pl(ng(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?pl(tg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},xx=Function.prototype.bind;function hl(t,e){return xx.call(t,e)}var gl=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(n){zs(n)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(n){zs(n)}else zs(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){zs(r)}}},Qt=class extends gr{constructor(e,r,n){super();let o;if(T(e)||!e)o={next:e??void 0,error:r??void 0,complete:n??void 0};else{let i;this&&Dt.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),o={next:e.next&&hl(e.next,i),error:e.error&&hl(e.error,i),complete:e.complete&&hl(e.complete,i)}):o=e}this.destination=new gl(o)}};function zs(t){Dt.useDeprecatedSynchronousErrorHandling?og(t):Hs(t)}function _x(t){throw t}function pl(t,e){let{onStoppedNotification:r}=Dt;r&&Yr.setTimeout(()=>r(t,e))}var Mx={closed:!0,next:Yt,error:_x,complete:Yt};var Jr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function we(t){return t}function ml(...t){return vl(t)}function vl(t){return t.length===0?we:t.length===1?t[0]:function(r){return t.reduce((n,o)=>o(n),r)}}var P=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,o){let i=Sx(r)?r:new Qt(r,n,o);return Qr(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=ig(n),new n((o,i)=>{let s=new Qt({next:a=>{try{r(a)}catch(u){i(u),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[Jr](){return this}pipe(...r){return vl(r)(this)}toPromise(r){return r=ig(r),new r((n,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>n(i))})}}return t.create=e=>new t(e),t})();function ig(t){var e;return(e=t??Dt.Promise)!==null&&e!==void 0?e:Promise}function Tx(t){return t&&T(t.next)&&T(t.error)&&T(t.complete)}function Sx(t){return t&&t instanceof gr||Tx(t)&&$s(t)}function yl(t){return T(t?.lift)}function S(t){return e=>{if(yl(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(t,e,r,n,o){return new Dl(t,e,r,n,o)}var Dl=class extends gr{constructor(e,r,n,o,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=r?function(a){try{r(a)}catch(u){e.error(u)}}:super._next,this._error=o?function(a){try{o(a)}catch(u){e.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Xr(){return S((t,e)=>{let r=null;t._refCount++;let n=_(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){r=null;return}let o=t._connection,i=r;r=null,o&&(!i||o===i)&&o.unsubscribe(),e.unsubscribe()});t.subscribe(n),n.closed||(r=t.connect())})}var eo=class extends P{constructor(e,r){super(),this.source=e,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,yl(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new ie;let r=this.getSubject();e.add(this.source.subscribe(_(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=ie.EMPTY)}return e}refCount(){return Xr()(this)}};var to={schedule(t){let e=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=to;n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame);let o=e(i=>{r=void 0,t(i)});return new ie(()=>r?.(o))},requestAnimationFrame(...t){let{delegate:e}=to;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=to;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var sg=Kr(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var se=(()=>{class t extends P{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new Gs(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new sg}next(r){Qr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){Qr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){Qr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:o,observers:i}=this;return n||o?dl:(this.currentObservers=null,i.push(r),new ie(()=>{this.currentObservers=null,hr(i,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:o,isStopped:i}=this;n?r.error(o):i&&r.complete()}asObservable(){let r=new P;return r.source=this,r}}return t.create=(e,r)=>new Gs(e,r),t})(),Gs=class extends se{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,e)}error(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&n!==void 0?n:dl}};var Se=class extends se{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){let{hasError:e,thrownError:r,_value:n}=this;if(e)throw r;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var yi={now(){return(yi.delegate||Date).now()},delegate:void 0};var Di=class extends se{constructor(e=1/0,r=1/0,n=yi){super(),this._bufferSize=e,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,r)}next(e){let{isStopped:r,_buffer:n,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;r||(n.push(e),!o&&n.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:o}=this,i=o.slice();for(let s=0;sag(e)&&t()),e},clearImmediate(t){ag(t)}};var{setImmediate:Nx,clearImmediate:Ox}=ug,bi={setImmediate(...t){let{delegate:e}=bi;return(e?.setImmediate||Nx)(...t)},clearImmediate(t){let{delegate:e}=bi;return(e?.clearImmediate||Ox)(t)},delegate:void 0};var qs=class extends _n{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=bi.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,r,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:i}=e;r!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==r&&(bi.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))}};var no=class t{constructor(e,r=t.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};no.now=yi.now;var Mn=class extends no{constructor(e,r=no.now){super(e,r),this.actions=[],this._active=!1}flush(e){let{actions:r}=this;if(this._active){r.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,n){for(;e=r.shift();)e.unsubscribe();throw n}}};var Zs=class extends Mn{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,o;e=e||n.shift();do if(o=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,o){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw o}}};var Rx=new Zs(qs);var wt=new Mn(_n),cg=wt;var Ks=class extends _n{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=to.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,r,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:i}=e;r!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==r&&(to.cancelAnimationFrame(r),e._scheduled=void 0)}};var Ys=class extends Mn{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,o;e=e||n.shift();do if(o=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,o){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw o}}};var Px=new Ys(Ks);var Ae=new P(t=>t.complete());function Qs(t){return t&&T(t.schedule)}function Cl(t){return t[t.length-1]}function Tn(t){return T(Cl(t))?t.pop():void 0}function Lt(t){return Qs(Cl(t))?t.pop():void 0}function lg(t,e){return typeof Cl(t)=="number"?t.pop():e}function fg(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(l){try{c(n.next(l))}catch(d){s(d)}}function u(l){try{c(n.throw(l))}catch(d){s(d)}}function c(l){l.done?i(l.value):o(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})}function dg(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function mr(t){return this instanceof mr?(this.v=t,this):new mr(t)}function hg(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),o,i=[];return o={},a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(h){return function(p){return Promise.resolve(p).then(h,d)}}function a(h,p){n[h]&&(o[h]=function(g){return new Promise(function(m,v){i.push([h,g,m,v])>1||u(h,g)})},p&&(o[h]=p(o[h])))}function u(h,p){try{c(n[h](p))}catch(g){f(i[0][3],g)}}function c(h){h.value instanceof mr?Promise.resolve(h.value.v).then(l,d):f(i[0][2],h)}function l(h){u("next",h)}function d(h){u("throw",h)}function f(h,p){h(p),i.shift(),i.length&&u(i[0][0],i[0][1])}}function pg(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof dg=="function"?dg(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(s){return new Promise(function(a,u){s=t[i](s),o(a,u,s.done,s.value)})}}function o(i,s,a,u){Promise.resolve(u).then(function(c){i({value:c,done:a})},s)}}var ro=t=>t&&typeof t.length=="number"&&typeof t!="function";function Js(t){return T(t?.then)}function Xs(t){return T(t[Jr])}function ea(t){return Symbol.asyncIterator&&T(t?.[Symbol.asyncIterator])}function ta(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Fx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var na=Fx();function ra(t){return T(t?.[na])}function oa(t){return hg(this,arguments,function*(){let r=t.getReader();try{for(;;){let{value:n,done:o}=yield mr(r.read());if(o)return yield mr(void 0);yield yield mr(n)}}finally{r.releaseLock()}})}function ia(t){return T(t?.getReader)}function k(t){if(t instanceof P)return t;if(t!=null){if(Xs(t))return Lx(t);if(ro(t))return kx(t);if(Js(t))return jx(t);if(ea(t))return gg(t);if(ra(t))return Vx(t);if(ia(t))return Ux(t)}throw ta(t)}function Lx(t){return new P(e=>{let r=t[Jr]();if(T(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function kx(t){return new P(e=>{for(let r=0;r{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,Hs)})}function Vx(t){return new P(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function gg(t){return new P(e=>{Bx(t,e).catch(r=>e.error(r))})}function Ux(t){return gg(oa(t))}function Bx(t,e){var r,n,o,i;return fg(this,void 0,void 0,function*(){try{for(r=pg(t);n=yield r.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){o={error:s}}finally{try{n&&!n.done&&(i=r.return)&&(yield i.call(r))}finally{if(o)throw o.error}}e.complete()})}function qe(t,e,r,n=0,o=!1){let i=e.schedule(function(){r(),o?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(i),!o)return i}function sa(t,e=0){return S((r,n)=>{r.subscribe(_(n,o=>qe(n,t,()=>n.next(o),e),()=>qe(n,t,()=>n.complete(),e),o=>qe(n,t,()=>n.error(o),e)))})}function aa(t,e=0){return S((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function mg(t,e){return k(t).pipe(aa(e),sa(e))}function vg(t,e){return k(t).pipe(aa(e),sa(e))}function yg(t,e){return new P(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function Dg(t,e){return new P(r=>{let n;return qe(r,e,()=>{n=t[na](),qe(r,e,()=>{let o,i;try{({value:o,done:i}=n.next())}catch(s){r.error(s);return}i?r.complete():r.next(o)},0,!0)}),()=>T(n?.return)&&n.return()})}function ua(t,e){if(!t)throw new Error("Iterable cannot be null");return new P(r=>{qe(r,e,()=>{let n=t[Symbol.asyncIterator]();qe(r,e,()=>{n.next().then(o=>{o.done?r.complete():r.next(o.value)})},0,!0)})})}function wg(t,e){return ua(oa(t),e)}function bg(t,e){if(t!=null){if(Xs(t))return mg(t,e);if(ro(t))return yg(t,e);if(Js(t))return vg(t,e);if(ea(t))return ua(t,e);if(ra(t))return Dg(t,e);if(ia(t))return wg(t,e)}throw ta(t)}function te(t,e){return e?bg(t,e):k(t)}function I(...t){let e=Lt(t);return te(t,e)}function Sn(t,e){let r=T(t)?t:()=>t,n=o=>o.error(r());return new P(e?o=>e.schedule(n,0,o):n)}function bt(t){return!!t&&(t instanceof P||T(t.lift)&&T(t.subscribe))}var Jt=Kr(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function Cg(t){return t instanceof Date&&!isNaN(t)}function N(t,e){return S((r,n)=>{let o=0;r.subscribe(_(n,i=>{n.next(t.call(e,i,o++))}))})}var{isArray:$x}=Array;function Hx(t,e){return $x(e)?t(...e):t(e)}function oo(t){return N(e=>Hx(t,e))}var{isArray:zx}=Array,{getPrototypeOf:Gx,prototype:Wx,keys:qx}=Object;function ca(t){if(t.length===1){let e=t[0];if(zx(e))return{args:e,keys:null};if(Zx(e)){let r=qx(e);return{args:r.map(n=>e[n]),keys:r}}}return{args:t,keys:null}}function Zx(t){return t&&typeof t=="object"&&Gx(t)===Wx}function la(t,e){return t.reduce((r,n,o)=>(r[n]=e[o],r),{})}function da(...t){let e=Lt(t),r=Tn(t),{args:n,keys:o}=ca(t);if(n.length===0)return te([],e);let i=new P(Kx(n,e,o?s=>la(o,s):we));return r?i.pipe(oo(r)):i}function Kx(t,e,r=we){return n=>{Eg(e,()=>{let{length:o}=t,i=new Array(o),s=o,a=o;for(let u=0;u{let c=te(t[u],e),l=!1;c.subscribe(_(n,d=>{i[u]=d,l||(l=!0,a--),a||n.next(r(i.slice()))},()=>{--s||n.complete()}))},n)},n)}}function Eg(t,e,r){t?qe(r,t,e):e()}function Ig(t,e,r,n,o,i,s,a){let u=[],c=0,l=0,d=!1,f=()=>{d&&!u.length&&!c&&e.complete()},h=g=>c{i&&e.next(g),c++;let m=!1;k(r(g,l++)).subscribe(_(e,v=>{o?.(v),i?h(v):e.next(v)},()=>{m=!0},void 0,()=>{if(m)try{for(c--;u.length&&cp(v)):p(v)}f()}catch(v){e.error(v)}}))};return t.subscribe(_(e,h,()=>{d=!0,f()})),()=>{a?.()}}function le(t,e,r=1/0){return T(e)?le((n,o)=>N((i,s)=>e(n,i,o,s))(k(t(n,o))),r):(typeof e=="number"&&(r=e),S((n,o)=>Ig(n,o,t,r)))}function An(t=1/0){return le(we,t)}function xg(){return An(1)}function tt(...t){return xg()(te(t,Lt(t)))}function Xt(t){return new P(e=>{k(t()).subscribe(e)})}var Yx={connector:()=>new se,resetOnDisconnect:!0};function Qx(t,e=Yx){let r=null,{connector:n,resetOnDisconnect:o=!0}=e,i=n(),s=new P(a=>i.subscribe(a));return s.connect=()=>((!r||r.closed)&&(r=Xt(()=>t).subscribe(i),o&&r.add(()=>i=n())),r),s}function Ci(...t){let e=Tn(t),{args:r,keys:n}=ca(t),o=new P(i=>{let{length:s}=r;if(!s){i.complete();return}let a=new Array(s),u=s,c=s;for(let l=0;l{d||(d=!0,c--),a[l]=f},()=>u--,void 0,()=>{(!u||!d)&&(c||i.next(n?la(n,a):a),i.complete())}))}});return e?o.pipe(oo(e)):o}var Jx=["addListener","removeListener"],Xx=["addEventListener","removeEventListener"],e0=["on","off"];function El(t,e,r,n){if(T(r)&&(n=r,r=void 0),n)return El(t,e,r).pipe(oo(n));let[o,i]=r0(t)?Xx.map(s=>a=>t[s](e,a,r)):t0(t)?Jx.map(_g(t,e)):n0(t)?e0.map(_g(t,e)):[];if(!o&&ro(t))return le(s=>El(s,e,r))(k(t));if(!o)throw new TypeError("Invalid event target");return new P(s=>{let a=(...u)=>s.next(1i(a)})}function _g(t,e){return r=>n=>t[r](e,n)}function t0(t){return T(t.addListener)&&T(t.removeListener)}function n0(t){return T(t.on)&&T(t.off)}function r0(t){return T(t.addEventListener)&&T(t.removeEventListener)}function en(t=0,e,r=cg){let n=-1;return e!=null&&(Qs(e)?r=e:n=e),new P(o=>{let i=Cg(t)?+t-r.now():t;i<0&&(i=0);let s=0;return r.schedule(function(){o.closed||(o.next(s++),0<=n?this.schedule(void 0,n):o.complete())},i)})}function o0(t=0,e=wt){return t<0&&(t=0),en(t,t,e)}function i0(...t){let e=Lt(t),r=lg(t,1/0),n=t;return n.length?n.length===1?k(n[0]):An(r)(te(n,e)):Ae}var{isArray:s0}=Array;function fa(t){return t.length===1&&s0(t[0])?t[0]:t}function ke(t,e){return S((r,n)=>{let o=0;r.subscribe(_(n,i=>t.call(e,i,o++)&&n.next(i)))})}function a0(...t){return t=fa(t),t.length===1?k(t[0]):new P(u0(t))}function u0(t){return e=>{let r=[];for(let n=0;r&&!e.closed&&n{if(r){for(let i=0;i{let o=r.map(()=>[]),i=r.map(()=>!1);n.add(()=>{o=i=null});for(let s=0;!n.closed&&s{if(o[s].push(a),o.every(u=>u.length)){let u=o.map(c=>c.shift());n.next(e?e(...u):u),o.some((c,l)=>!c.length&&i[l])&&n.complete()}},()=>{i[s]=!0,!o[s].length&&n.complete()}));return()=>{o=i=null}}):Ae}function Mg(t){return S((e,r)=>{let n=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,n){n=!1;let c=o;o=null,r.next(c)}s&&r.complete()},u=()=>{i=null,s&&r.complete()};e.subscribe(_(r,c=>{n=!0,o=c,i||k(t(c)).subscribe(i=_(r,a,u))},()=>{s=!0,(!n||!i||i.closed)&&r.complete()}))})}function l0(t,e=wt){return Mg(()=>en(t,e))}function Nn(t){return S((e,r)=>{let n=null,o=!1,i;n=e.subscribe(_(r,void 0,void 0,s=>{i=k(t(s,Nn(t)(e))),n?(n.unsubscribe(),n=null,i.subscribe(r)):o=!0})),o&&(n.unsubscribe(),n=null,i.subscribe(r))})}function Tg(t,e,r,n,o){return(i,s)=>{let a=r,u=e,c=0;i.subscribe(_(s,l=>{let d=c++;u=a?t(u,l,d):(a=!0,l),n&&s.next(u)},o&&(()=>{a&&s.next(u),s.complete()})))}}function kt(t,e){return T(e)?le(t,e,1):le(t,1)}function Sg(t,e=wt){return S((r,n)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let c=i;i=null,n.next(c)}};function u(){let c=s+t,l=e.now();if(l{i=c,s=e.now(),o||(o=e.schedule(u,t),n.add(o))},()=>{a(),n.complete()},void 0,()=>{i=o=null}))})}function On(t){return S((e,r)=>{let n=!1;e.subscribe(_(r,o=>{n=!0,r.next(o)},()=>{n||r.next(t),r.complete()}))})}function xe(t){return t<=0?()=>Ae:S((e,r)=>{let n=0;e.subscribe(_(r,o=>{++n<=t&&(r.next(o),t<=n&&r.complete())}))})}function Ag(){return S((t,e)=>{t.subscribe(_(e,Yt))})}function Ei(t){return N(()=>t)}function Il(t,e){return e?r=>tt(e.pipe(xe(1),Ag()),r.pipe(Il(t))):le((r,n)=>k(t(r,n)).pipe(xe(1),Ei(r)))}function d0(t,e=wt){let r=en(t,e);return Il(()=>r)}function Ng(t,e=we){return t=t??f0,S((r,n)=>{let o,i=!0;r.subscribe(_(n,s=>{let a=e(s);(i||!t(o,a))&&(i=!1,o=a,n.next(s))}))})}function f0(t,e){return t===e}function ha(t=h0){return S((e,r)=>{let n=!1;e.subscribe(_(r,o=>{n=!0,r.next(o)},()=>n?r.complete():r.error(t())))})}function h0(){return new Jt}function p0(...t){return e=>tt(e,I(...t))}function Rn(t){return S((e,r)=>{try{e.subscribe(r)}finally{r.add(t)}})}function jt(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ke((o,i)=>t(o,i,n)):we,xe(1),r?On(e):ha(()=>new Jt))}function io(t){return t<=0?()=>Ae:S((e,r)=>{let n=[];e.subscribe(_(r,o=>{n.push(o),t{for(let o of n)r.next(o);r.complete()},void 0,()=>{n=null}))})}function xl(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ke((o,i)=>t(o,i,n)):we,io(1),r?On(e):ha(()=>new Jt))}function pa(t,e){return S(Tg(t,e,arguments.length>=2,!0))}function Ml(t={}){let{connector:e=()=>new se,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:o=!0}=t;return i=>{let s,a,u,c=0,l=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},h=()=>{f(),s=u=void 0,l=d=!1},p=()=>{let g=s;h(),g?.unsubscribe()};return S((g,m)=>{c++,!d&&!l&&f();let v=u=u??e();m.add(()=>{c--,c===0&&!d&&!l&&(a=_l(p,o))}),v.subscribe(m),!s&&c>0&&(s=new Qt({next:A=>v.next(A),error:A=>{d=!0,f(),a=_l(h,r,A),v.error(A)},complete:()=>{l=!0,f(),a=_l(h,n),v.complete()}}),k(g).subscribe(s))})(i)}}function _l(t,e,...r){if(e===!0){t();return}if(e===!1)return;let n=new Qt({next:()=>{n.unsubscribe(),t()}});return k(e(...r)).subscribe(n)}function Ii(t,e,r){let n,o=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:o=!1,scheduler:r}=t:n=t??1/0,Ml({connector:()=>new Di(n,e,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function g0(t){return ke((e,r)=>t<=r)}function ga(...t){let e=Lt(t);return S((r,n)=>{(e?tt(t,r,e):tt(t,r)).subscribe(n)})}function be(t,e){return S((r,n)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&n.complete();r.subscribe(_(n,u=>{o?.unsubscribe();let c=0,l=i++;k(t(u,l)).subscribe(o=_(n,d=>n.next(e?e(u,d,l,c++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function m0(){return be(we)}function ma(t){return S((e,r)=>{k(t).subscribe(_(r,()=>r.complete(),Yt)),!r.closed&&e.subscribe(r)})}function Ce(t,e,r){let n=T(t)||e||r?{next:t,error:e,complete:r}:t;return n?S((o,i)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;o.subscribe(_(i,u=>{var c;(c=n.next)===null||c===void 0||c.call(n,u),i.next(u)},()=>{var u;a=!1,(u=n.complete)===null||u===void 0||u.call(n),i.complete()},u=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,u),i.error(u)},()=>{var u,c;a&&((u=n.unsubscribe)===null||u===void 0||u.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):we}function Og(t,e){return S((r,n)=>{let{leading:o=!0,trailing:i=!1}=e??{},s=!1,a=null,u=null,c=!1,l=()=>{u?.unsubscribe(),u=null,i&&(h(),c&&n.complete())},d=()=>{u=null,c&&n.complete()},f=p=>u=k(t(p)).subscribe(_(n,l,d)),h=()=>{if(s){s=!1;let p=a;a=null,n.next(p),!c&&f(p)}};r.subscribe(_(n,p=>{s=!0,a=p,!(u&&!u.closed)&&(o?h():f(p))},()=>{c=!0,!(i&&s&&u&&!u.closed)&&n.complete()}))})}function v0(t,e=wt,r){let n=en(t,e);return Og(()=>n,r)}function y0(...t){let e=Tn(t);return S((r,n)=>{let o=t.length,i=new Array(o),s=t.map(()=>!1),a=!1;for(let u=0;u{i[u]=c,!a&&!s[u]&&(s[u]=!0,(a=s.every(we))&&(s=null))},Yt));r.subscribe(_(n,u=>{if(a){let c=[u,...i];n.next(e?e(...c):c)}}))})}var Em="https://g.co/ng/security#xss",C=class extends Error{constructor(e,r){super(Xa(e,r)),this.code=e}};function Xa(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function Li(t){return{toString:t}.toString()}var va="__parameters__";function D0(t){return function(...r){if(t){let n=t(...r);for(let o in n)this[o]=n[o]}}}function Im(t,e,r){return Li(()=>{let n=D0(e);function o(...i){if(this instanceof o)return n.apply(this,i),this;let s=new o(...i);return a.annotation=s,a;function a(u,c,l){let d=u.hasOwnProperty(va)?u[va]:Object.defineProperty(u,va,{value:[]})[va];for(;d.length<=l;)d.push(null);return(d[l]=d[l]||[]).push(s),u}}return r&&(o.prototype=Object.create(r.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var It=globalThis;function J(t){for(let e in t)if(t[e]===J)return e;throw Error("Could not find renamed property on target object.")}function w0(t,e){for(let r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Be(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(Be).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(` -`);return r===-1?e:e.substring(0,r)}function Hl(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var b0=J({__forward_ref__:J});function Re(t){return t.__forward_ref__=Re,t.toString=function(){return Be(this())},t}function Ne(t){return xm(t)?t():t}function xm(t){return typeof t=="function"&&t.hasOwnProperty(b0)&&t.__forward_ref__===Re}function b(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function _t(t){return{providers:t.providers||[],imports:t.imports||[]}}function eu(t){return Rg(t,Mm)||Rg(t,Tm)}function _m(t){return eu(t)!==null}function Rg(t,e){return t.hasOwnProperty(e)?t[e]:null}function C0(t){let e=t&&(t[Mm]||t[Tm]);return e||null}function Pg(t){return t&&(t.hasOwnProperty(Fg)||t.hasOwnProperty(E0))?t[Fg]:null}var Mm=J({\u0275prov:J}),Fg=J({\u0275inj:J}),Tm=J({ngInjectableDef:J}),E0=J({ngInjectorDef:J}),E=class{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=b({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Sm(t){return t&&!!t.\u0275providers}var I0=J({\u0275cmp:J}),x0=J({\u0275dir:J}),_0=J({\u0275pipe:J}),M0=J({\u0275mod:J}),Sa=J({\u0275fac:J}),xi=J({__NG_ELEMENT_ID__:J}),Lg=J({__NG_ENV_ID__:J});function Ke(t){return typeof t=="string"?t:t==null?"":String(t)}function T0(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Ke(t)}function S0(t,e){let r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new C(-200,t)}function Jd(t,e){throw new C(-201,!1)}var j=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(j||{}),zl;function Am(){return zl}function Ze(t){let e=zl;return zl=t,e}function Nm(t,e,r){let n=eu(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&j.Optional)return null;if(e!==void 0)return e;Jd(t,"Injector")}var A0={},Mi=A0,Gl="__NG_DI_FLAG__",Aa="ngTempTokenPath",N0="ngTokenPath",O0=/\n/gm,R0="\u0275",kg="__source",co;function P0(){return co}function Pn(t){let e=co;return co=t,e}function F0(t,e=j.Default){if(co===void 0)throw new C(-203,!1);return co===null?Nm(t,void 0,e):co.get(t,e&j.Optional?null:void 0,e)}function x(t,e=j.Default){return(Am()||F0)(Ne(t),e)}function y(t,e=j.Default){return x(t,tu(e))}function tu(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Wl(t){let e=[];for(let r=0;r{let t=new ie;return t.closed=!0,t})();var ll=ie.EMPTY;function $s(t){return t instanceof ie||t&&"closed"in t&&T(t.remove)&&T(t.add)&&T(t.unsubscribe)}function Xp(t){T(t)?t():t.unsubscribe()}var Dt={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Kr={setTimeout(t,e,...r){let{delegate:n}=Kr;return n?.setTimeout?n.setTimeout(t,e,...r):setTimeout(t,e,...r)},clearTimeout(t){let{delegate:e}=Kr;return(e?.clearTimeout||clearTimeout)(t)},delegate:void 0};function Hs(t){Kr.setTimeout(()=>{let{onUnhandledError:e}=Dt;if(e)e(t);else throw t})}function Kt(){}var eg=dl("C",void 0,void 0);function tg(t){return dl("E",void 0,t)}function ng(t){return dl("N",t,void 0)}function dl(t,e,r){return{kind:t,value:e,error:r}}var pr=null;function Yr(t){if(Dt.useDeprecatedSynchronousErrorHandling){let e=!pr;if(e&&(pr={errorThrown:!1,error:null}),t(),e){let{errorThrown:r,error:n}=pr;if(pr=null,r)throw n}}else t()}function rg(t){Dt.useDeprecatedSynchronousErrorHandling&&pr&&(pr.errorThrown=!0,pr.error=t)}var gr=class extends ie{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,$s(e)&&e.add(this)):this.destination=Mx}static create(e,r,n){return new Yt(e,r,n)}next(e){this.isStopped?hl(ng(e),this):this._next(e)}error(e){this.isStopped?hl(tg(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?hl(eg,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(e){this.destination.next(e)}_error(e){try{this.destination.error(e)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},xx=Function.prototype.bind;function fl(t,e){return xx.call(t,e)}var pl=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:r}=this;if(r.next)try{r.next(e)}catch(n){zs(n)}}error(e){let{partialObserver:r}=this;if(r.error)try{r.error(e)}catch(n){zs(n)}else zs(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(r){zs(r)}}},Yt=class extends gr{constructor(e,r,n){super();let o;if(T(e)||!e)o={next:e??void 0,error:r??void 0,complete:n??void 0};else{let i;this&&Dt.useDeprecatedNextContext?(i=Object.create(e),i.unsubscribe=()=>this.unsubscribe(),o={next:e.next&&fl(e.next,i),error:e.error&&fl(e.error,i),complete:e.complete&&fl(e.complete,i)}):o=e}this.destination=new pl(o)}};function zs(t){Dt.useDeprecatedSynchronousErrorHandling?rg(t):Hs(t)}function _x(t){throw t}function hl(t,e){let{onStoppedNotification:r}=Dt;r&&Kr.setTimeout(()=>r(t,e))}var Mx={closed:!0,next:Kt,error:_x,complete:Kt};var Qr=typeof Symbol=="function"&&Symbol.observable||"@@observable";function we(t){return t}function gl(...t){return ml(t)}function ml(t){return t.length===0?we:t.length===1?t[0]:function(r){return t.reduce((n,o)=>o(n),r)}}var P=(()=>{class t{constructor(r){r&&(this._subscribe=r)}lift(r){let n=new t;return n.source=this,n.operator=r,n}subscribe(r,n,o){let i=Sx(r)?r:new Yt(r,n,o);return Yr(()=>{let{operator:s,source:a}=this;i.add(s?s.call(i,a):a?this._subscribe(i):this._trySubscribe(i))}),i}_trySubscribe(r){try{return this._subscribe(r)}catch(n){r.error(n)}}forEach(r,n){return n=og(n),new n((o,i)=>{let s=new Yt({next:a=>{try{r(a)}catch(u){i(u),s.unsubscribe()}},error:i,complete:o});this.subscribe(s)})}_subscribe(r){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(r)}[Qr](){return this}pipe(...r){return ml(r)(this)}toPromise(r){return r=og(r),new r((n,o)=>{let i;this.subscribe(s=>i=s,s=>o(s),()=>n(i))})}}return t.create=e=>new t(e),t})();function og(t){var e;return(e=t??Dt.Promise)!==null&&e!==void 0?e:Promise}function Tx(t){return t&&T(t.next)&&T(t.error)&&T(t.complete)}function Sx(t){return t&&t instanceof gr||Tx(t)&&$s(t)}function vl(t){return T(t?.lift)}function S(t){return e=>{if(vl(e))return e.lift(function(r){try{return t(r,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(t,e,r,n,o){return new yl(t,e,r,n,o)}var yl=class extends gr{constructor(e,r,n,o,i,s){super(e),this.onFinalize=i,this.shouldUnsubscribe=s,this._next=r?function(a){try{r(a)}catch(u){e.error(u)}}:super._next,this._error=o?function(a){try{o(a)}catch(u){e.error(u)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){e.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:r}=this;super.unsubscribe(),!r&&((e=this.onFinalize)===null||e===void 0||e.call(this))}}};function Jr(){return S((t,e)=>{let r=null;t._refCount++;let n=_(e,void 0,void 0,void 0,()=>{if(!t||t._refCount<=0||0<--t._refCount){r=null;return}let o=t._connection,i=r;r=null,o&&(!i||o===i)&&o.unsubscribe(),e.unsubscribe()});t.subscribe(n),n.closed||(r=t.connect())})}var Xr=class extends P{constructor(e,r){super(),this.source=e,this.subjectFactory=r,this._subject=null,this._refCount=0,this._connection=null,vl(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new ie;let r=this.getSubject();e.add(this.source.subscribe(_(r,void 0,()=>{this._teardown(),r.complete()},n=>{this._teardown(),r.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=ie.EMPTY)}return e}refCount(){return Jr()(this)}};var eo={schedule(t){let e=requestAnimationFrame,r=cancelAnimationFrame,{delegate:n}=eo;n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame);let o=e(i=>{r=void 0,t(i)});return new ie(()=>r?.(o))},requestAnimationFrame(...t){let{delegate:e}=eo;return(e?.requestAnimationFrame||requestAnimationFrame)(...t)},cancelAnimationFrame(...t){let{delegate:e}=eo;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...t)},delegate:void 0};var ig=Zr(t=>function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var se=(()=>{class t extends P{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(r){let n=new Gs(this,this);return n.operator=r,n}_throwIfClosed(){if(this.closed)throw new ig}next(r){Yr(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(r)}})}error(r){Yr(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=r;let{observers:n}=this;for(;n.length;)n.shift().error(r)}})}complete(){Yr(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:r}=this;for(;r.length;)r.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var r;return((r=this.observers)===null||r===void 0?void 0:r.length)>0}_trySubscribe(r){return this._throwIfClosed(),super._trySubscribe(r)}_subscribe(r){return this._throwIfClosed(),this._checkFinalizedStatuses(r),this._innerSubscribe(r)}_innerSubscribe(r){let{hasError:n,isStopped:o,observers:i}=this;return n||o?ll:(this.currentObservers=null,i.push(r),new ie(()=>{this.currentObservers=null,hr(i,r)}))}_checkFinalizedStatuses(r){let{hasError:n,thrownError:o,isStopped:i}=this;n?r.error(o):i&&r.complete()}asObservable(){let r=new P;return r.source=this,r}}return t.create=(e,r)=>new Gs(e,r),t})(),Gs=class extends se{constructor(e,r){super(),this.destination=e,this.source=r}next(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.next)===null||n===void 0||n.call(r,e)}error(e){var r,n;(n=(r=this.destination)===null||r===void 0?void 0:r.error)===null||n===void 0||n.call(r,e)}complete(){var e,r;(r=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||r===void 0||r.call(e)}_subscribe(e){var r,n;return(n=(r=this.source)===null||r===void 0?void 0:r.subscribe(e))!==null&&n!==void 0?n:ll}};var Se=class extends se{constructor(e){super(),this._value=e}get value(){return this.getValue()}_subscribe(e){let r=super._subscribe(e);return!r.closed&&e.next(this._value),r}getValue(){let{hasError:e,thrownError:r,_value:n}=this;if(e)throw r;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var yi={now(){return(yi.delegate||Date).now()},delegate:void 0};var Di=class extends se{constructor(e=1/0,r=1/0,n=yi){super(),this._bufferSize=e,this._windowTime=r,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=r===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,r)}next(e){let{isStopped:r,_buffer:n,_infiniteTimeWindow:o,_timestampProvider:i,_windowTime:s}=this;r||(n.push(e),!o&&n.push(i.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let r=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:o}=this,i=o.slice();for(let s=0;ssg(e)&&t()),e},clearImmediate(t){sg(t)}};var{setImmediate:Nx,clearImmediate:Ox}=ag,bi={setImmediate(...t){let{delegate:e}=bi;return(e?.setImmediate||Nx)(...t)},clearImmediate(t){let{delegate:e}=bi;return(e?.clearImmediate||Ox)(t)},delegate:void 0};var qs=class extends _n{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=bi.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,r,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:i}=e;r!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==r&&(bi.clearImmediate(r),e._scheduled===r&&(e._scheduled=void 0))}};var to=class t{constructor(e,r=t.now){this.schedulerActionCtor=e,this.now=r}schedule(e,r=0,n){return new this.schedulerActionCtor(this,e).schedule(n,r)}};to.now=yi.now;var Mn=class extends to{constructor(e,r=to.now){super(e,r),this.actions=[],this._active=!1}flush(e){let{actions:r}=this;if(this._active){r.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=r.shift());if(this._active=!1,n){for(;e=r.shift();)e.unsubscribe();throw n}}};var Zs=class extends Mn{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,o;e=e||n.shift();do if(o=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,o){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw o}}};var Rx=new Zs(qs);var wt=new Mn(_n),ug=wt;var Ks=class extends _n{constructor(e,r){super(e,r),this.scheduler=e,this.work=r}requestAsyncId(e,r,n=0){return n!==null&&n>0?super.requestAsyncId(e,r,n):(e.actions.push(this),e._scheduled||(e._scheduled=eo.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,r,n=0){var o;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,r,n);let{actions:i}=e;r!=null&&((o=i[i.length-1])===null||o===void 0?void 0:o.id)!==r&&(eo.cancelAnimationFrame(r),e._scheduled=void 0)}};var Ys=class extends Mn{flush(e){this._active=!0;let r=this._scheduled;this._scheduled=void 0;let{actions:n}=this,o;e=e||n.shift();do if(o=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,o){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw o}}};var Px=new Ys(Ks);var Ae=new P(t=>t.complete());function Qs(t){return t&&T(t.schedule)}function bl(t){return t[t.length-1]}function Tn(t){return T(bl(t))?t.pop():void 0}function Lt(t){return Qs(bl(t))?t.pop():void 0}function cg(t,e){return typeof bl(t)=="number"?t.pop():e}function dg(t,e,r,n){function o(i){return i instanceof r?i:new r(function(s){s(i)})}return new(r||(r=Promise))(function(i,s){function a(l){try{c(n.next(l))}catch(d){s(d)}}function u(l){try{c(n.throw(l))}catch(d){s(d)}}function c(l){l.done?i(l.value):o(l.value).then(a,u)}c((n=n.apply(t,e||[])).next())})}function lg(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function mr(t){return this instanceof mr?(this.v=t,this):new mr(t)}function fg(t,e,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(t,e||[]),o,i=[];return o={},a("next"),a("throw"),a("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(h){return function(p){return Promise.resolve(p).then(h,d)}}function a(h,p){n[h]&&(o[h]=function(g){return new Promise(function(m,v){i.push([h,g,m,v])>1||u(h,g)})},p&&(o[h]=p(o[h])))}function u(h,p){try{c(n[h](p))}catch(g){f(i[0][3],g)}}function c(h){h.value instanceof mr?Promise.resolve(h.value.v).then(l,d):f(i[0][2],h)}function l(h){u("next",h)}function d(h){u("throw",h)}function f(h,p){h(p),i.shift(),i.length&&u(i[0][0],i[0][1])}}function hg(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=t[Symbol.asyncIterator],r;return e?e.call(t):(t=typeof lg=="function"?lg(t):t[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(i){r[i]=t[i]&&function(s){return new Promise(function(a,u){s=t[i](s),o(a,u,s.done,s.value)})}}function o(i,s,a,u){Promise.resolve(u).then(function(c){i({value:c,done:a})},s)}}var no=t=>t&&typeof t.length=="number"&&typeof t!="function";function Js(t){return T(t?.then)}function Xs(t){return T(t[Qr])}function ea(t){return Symbol.asyncIterator&&T(t?.[Symbol.asyncIterator])}function ta(t){return new TypeError(`You provided ${t!==null&&typeof t=="object"?"an invalid object":`'${t}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function Fx(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var na=Fx();function ra(t){return T(t?.[na])}function oa(t){return fg(this,arguments,function*(){let r=t.getReader();try{for(;;){let{value:n,done:o}=yield mr(r.read());if(o)return yield mr(void 0);yield yield mr(n)}}finally{r.releaseLock()}})}function ia(t){return T(t?.getReader)}function k(t){if(t instanceof P)return t;if(t!=null){if(Xs(t))return Lx(t);if(no(t))return kx(t);if(Js(t))return jx(t);if(ea(t))return pg(t);if(ra(t))return Vx(t);if(ia(t))return Ux(t)}throw ta(t)}function Lx(t){return new P(e=>{let r=t[Qr]();if(T(r.subscribe))return r.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function kx(t){return new P(e=>{for(let r=0;r{t.then(r=>{e.closed||(e.next(r),e.complete())},r=>e.error(r)).then(null,Hs)})}function Vx(t){return new P(e=>{for(let r of t)if(e.next(r),e.closed)return;e.complete()})}function pg(t){return new P(e=>{Bx(t,e).catch(r=>e.error(r))})}function Ux(t){return pg(oa(t))}function Bx(t,e){var r,n,o,i;return dg(this,void 0,void 0,function*(){try{for(r=hg(t);n=yield r.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){o={error:s}}finally{try{n&&!n.done&&(i=r.return)&&(yield i.call(r))}finally{if(o)throw o.error}}e.complete()})}function We(t,e,r,n=0,o=!1){let i=e.schedule(function(){r(),o?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(i),!o)return i}function sa(t,e=0){return S((r,n)=>{r.subscribe(_(n,o=>We(n,t,()=>n.next(o),e),()=>We(n,t,()=>n.complete(),e),o=>We(n,t,()=>n.error(o),e)))})}function aa(t,e=0){return S((r,n)=>{n.add(t.schedule(()=>r.subscribe(n),e))})}function gg(t,e){return k(t).pipe(aa(e),sa(e))}function mg(t,e){return k(t).pipe(aa(e),sa(e))}function vg(t,e){return new P(r=>{let n=0;return e.schedule(function(){n===t.length?r.complete():(r.next(t[n++]),r.closed||this.schedule())})})}function yg(t,e){return new P(r=>{let n;return We(r,e,()=>{n=t[na](),We(r,e,()=>{let o,i;try{({value:o,done:i}=n.next())}catch(s){r.error(s);return}i?r.complete():r.next(o)},0,!0)}),()=>T(n?.return)&&n.return()})}function ua(t,e){if(!t)throw new Error("Iterable cannot be null");return new P(r=>{We(r,e,()=>{let n=t[Symbol.asyncIterator]();We(r,e,()=>{n.next().then(o=>{o.done?r.complete():r.next(o.value)})},0,!0)})})}function Dg(t,e){return ua(oa(t),e)}function wg(t,e){if(t!=null){if(Xs(t))return gg(t,e);if(no(t))return vg(t,e);if(Js(t))return mg(t,e);if(ea(t))return ua(t,e);if(ra(t))return yg(t,e);if(ia(t))return Dg(t,e)}throw ta(t)}function te(t,e){return e?wg(t,e):k(t)}function I(...t){let e=Lt(t);return te(t,e)}function Sn(t,e){let r=T(t)?t:()=>t,n=o=>o.error(r());return new P(e?o=>e.schedule(n,0,o):n)}function bt(t){return!!t&&(t instanceof P||T(t.lift)&&T(t.subscribe))}var Qt=Zr(t=>function(){t(this),this.name="EmptyError",this.message="no elements in sequence"});function bg(t){return t instanceof Date&&!isNaN(t)}function N(t,e){return S((r,n)=>{let o=0;r.subscribe(_(n,i=>{n.next(t.call(e,i,o++))}))})}var{isArray:$x}=Array;function Hx(t,e){return $x(e)?t(...e):t(e)}function ro(t){return N(e=>Hx(t,e))}var{isArray:zx}=Array,{getPrototypeOf:Gx,prototype:Wx,keys:qx}=Object;function ca(t){if(t.length===1){let e=t[0];if(zx(e))return{args:e,keys:null};if(Zx(e)){let r=qx(e);return{args:r.map(n=>e[n]),keys:r}}}return{args:t,keys:null}}function Zx(t){return t&&typeof t=="object"&&Gx(t)===Wx}function la(t,e){return t.reduce((r,n,o)=>(r[n]=e[o],r),{})}function da(...t){let e=Lt(t),r=Tn(t),{args:n,keys:o}=ca(t);if(n.length===0)return te([],e);let i=new P(Kx(n,e,o?s=>la(o,s):we));return r?i.pipe(ro(r)):i}function Kx(t,e,r=we){return n=>{Cg(e,()=>{let{length:o}=t,i=new Array(o),s=o,a=o;for(let u=0;u{let c=te(t[u],e),l=!1;c.subscribe(_(n,d=>{i[u]=d,l||(l=!0,a--),a||n.next(r(i.slice()))},()=>{--s||n.complete()}))},n)},n)}}function Cg(t,e,r){t?We(r,t,e):e()}function Eg(t,e,r,n,o,i,s,a){let u=[],c=0,l=0,d=!1,f=()=>{d&&!u.length&&!c&&e.complete()},h=g=>c{i&&e.next(g),c++;let m=!1;k(r(g,l++)).subscribe(_(e,v=>{o?.(v),i?h(v):e.next(v)},()=>{m=!0},void 0,()=>{if(m)try{for(c--;u.length&&cp(v)):p(v)}f()}catch(v){e.error(v)}}))};return t.subscribe(_(e,h,()=>{d=!0,f()})),()=>{a?.()}}function le(t,e,r=1/0){return T(e)?le((n,o)=>N((i,s)=>e(n,i,o,s))(k(t(n,o))),r):(typeof e=="number"&&(r=e),S((n,o)=>Eg(n,o,t,r)))}function An(t=1/0){return le(we,t)}function Ig(){return An(1)}function tt(...t){return Ig()(te(t,Lt(t)))}function Jt(t){return new P(e=>{k(t()).subscribe(e)})}var Yx={connector:()=>new se,resetOnDisconnect:!0};function Qx(t,e=Yx){let r=null,{connector:n,resetOnDisconnect:o=!0}=e,i=n(),s=new P(a=>i.subscribe(a));return s.connect=()=>((!r||r.closed)&&(r=Jt(()=>t).subscribe(i),o&&r.add(()=>i=n())),r),s}function Ci(...t){let e=Tn(t),{args:r,keys:n}=ca(t),o=new P(i=>{let{length:s}=r;if(!s){i.complete();return}let a=new Array(s),u=s,c=s;for(let l=0;l{d||(d=!0,c--),a[l]=f},()=>u--,void 0,()=>{(!u||!d)&&(c||i.next(n?la(n,a):a),i.complete())}))}});return e?o.pipe(ro(e)):o}var Jx=["addListener","removeListener"],Xx=["addEventListener","removeEventListener"],e0=["on","off"];function Cl(t,e,r,n){if(T(r)&&(n=r,r=void 0),n)return Cl(t,e,r).pipe(ro(n));let[o,i]=r0(t)?Xx.map(s=>a=>t[s](e,a,r)):t0(t)?Jx.map(xg(t,e)):n0(t)?e0.map(xg(t,e)):[];if(!o&&no(t))return le(s=>Cl(s,e,r))(k(t));if(!o)throw new TypeError("Invalid event target");return new P(s=>{let a=(...u)=>s.next(1i(a)})}function xg(t,e){return r=>n=>t[r](e,n)}function t0(t){return T(t.addListener)&&T(t.removeListener)}function n0(t){return T(t.on)&&T(t.off)}function r0(t){return T(t.addEventListener)&&T(t.removeEventListener)}function Xt(t=0,e,r=ug){let n=-1;return e!=null&&(Qs(e)?r=e:n=e),new P(o=>{let i=bg(t)?+t-r.now():t;i<0&&(i=0);let s=0;return r.schedule(function(){o.closed||(o.next(s++),0<=n?this.schedule(void 0,n):o.complete())},i)})}function o0(t=0,e=wt){return t<0&&(t=0),Xt(t,t,e)}function i0(...t){let e=Lt(t),r=cg(t,1/0),n=t;return n.length?n.length===1?k(n[0]):An(r)(te(n,e)):Ae}var{isArray:s0}=Array;function fa(t){return t.length===1&&s0(t[0])?t[0]:t}function ke(t,e){return S((r,n)=>{let o=0;r.subscribe(_(n,i=>t.call(e,i,o++)&&n.next(i)))})}function a0(...t){return t=fa(t),t.length===1?k(t[0]):new P(u0(t))}function u0(t){return e=>{let r=[];for(let n=0;r&&!e.closed&&n{if(r){for(let i=0;i{let o=r.map(()=>[]),i=r.map(()=>!1);n.add(()=>{o=i=null});for(let s=0;!n.closed&&s{if(o[s].push(a),o.every(u=>u.length)){let u=o.map(c=>c.shift());n.next(e?e(...u):u),o.some((c,l)=>!c.length&&i[l])&&n.complete()}},()=>{i[s]=!0,!o[s].length&&n.complete()}));return()=>{o=i=null}}):Ae}function _g(t){return S((e,r)=>{let n=!1,o=null,i=null,s=!1,a=()=>{if(i?.unsubscribe(),i=null,n){n=!1;let c=o;o=null,r.next(c)}s&&r.complete()},u=()=>{i=null,s&&r.complete()};e.subscribe(_(r,c=>{n=!0,o=c,i||k(t(c)).subscribe(i=_(r,a,u))},()=>{s=!0,(!n||!i||i.closed)&&r.complete()}))})}function l0(t,e=wt){return _g(()=>Xt(t,e))}function Nn(t){return S((e,r)=>{let n=null,o=!1,i;n=e.subscribe(_(r,void 0,void 0,s=>{i=k(t(s,Nn(t)(e))),n?(n.unsubscribe(),n=null,i.subscribe(r)):o=!0})),o&&(n.unsubscribe(),n=null,i.subscribe(r))})}function Mg(t,e,r,n,o){return(i,s)=>{let a=r,u=e,c=0;i.subscribe(_(s,l=>{let d=c++;u=a?t(u,l,d):(a=!0,l),n&&s.next(u)},o&&(()=>{a&&s.next(u),s.complete()})))}}function kt(t,e){return T(e)?le(t,e,1):le(t,1)}function Tg(t,e=wt){return S((r,n)=>{let o=null,i=null,s=null,a=()=>{if(o){o.unsubscribe(),o=null;let c=i;i=null,n.next(c)}};function u(){let c=s+t,l=e.now();if(l{i=c,s=e.now(),o||(o=e.schedule(u,t),n.add(o))},()=>{a(),n.complete()},void 0,()=>{i=o=null}))})}function On(t){return S((e,r)=>{let n=!1;e.subscribe(_(r,o=>{n=!0,r.next(o)},()=>{n||r.next(t),r.complete()}))})}function xe(t){return t<=0?()=>Ae:S((e,r)=>{let n=0;e.subscribe(_(r,o=>{++n<=t&&(r.next(o),t<=n&&r.complete())}))})}function Sg(){return S((t,e)=>{t.subscribe(_(e,Kt))})}function Ei(t){return N(()=>t)}function El(t,e){return e?r=>tt(e.pipe(xe(1),Sg()),r.pipe(El(t))):le((r,n)=>k(t(r,n)).pipe(xe(1),Ei(r)))}function d0(t,e=wt){let r=Xt(t,e);return El(()=>r)}function Ag(t,e=we){return t=t??f0,S((r,n)=>{let o,i=!0;r.subscribe(_(n,s=>{let a=e(s);(i||!t(o,a))&&(i=!1,o=a,n.next(s))}))})}function f0(t,e){return t===e}function ha(t=h0){return S((e,r)=>{let n=!1;e.subscribe(_(r,o=>{n=!0,r.next(o)},()=>n?r.complete():r.error(t())))})}function h0(){return new Qt}function p0(...t){return e=>tt(e,I(...t))}function Rn(t){return S((e,r)=>{try{e.subscribe(r)}finally{r.add(t)}})}function jt(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ke((o,i)=>t(o,i,n)):we,xe(1),r?On(e):ha(()=>new Qt))}function oo(t){return t<=0?()=>Ae:S((e,r)=>{let n=[];e.subscribe(_(r,o=>{n.push(o),t{for(let o of n)r.next(o);r.complete()},void 0,()=>{n=null}))})}function Il(t,e){let r=arguments.length>=2;return n=>n.pipe(t?ke((o,i)=>t(o,i,n)):we,oo(1),r?On(e):ha(()=>new Qt))}function pa(t,e){return S(Mg(t,e,arguments.length>=2,!0))}function _l(t={}){let{connector:e=()=>new se,resetOnError:r=!0,resetOnComplete:n=!0,resetOnRefCountZero:o=!0}=t;return i=>{let s,a,u,c=0,l=!1,d=!1,f=()=>{a?.unsubscribe(),a=void 0},h=()=>{f(),s=u=void 0,l=d=!1},p=()=>{let g=s;h(),g?.unsubscribe()};return S((g,m)=>{c++,!d&&!l&&f();let v=u=u??e();m.add(()=>{c--,c===0&&!d&&!l&&(a=xl(p,o))}),v.subscribe(m),!s&&c>0&&(s=new Yt({next:A=>v.next(A),error:A=>{d=!0,f(),a=xl(h,r,A),v.error(A)},complete:()=>{l=!0,f(),a=xl(h,n),v.complete()}}),k(g).subscribe(s))})(i)}}function xl(t,e,...r){if(e===!0){t();return}if(e===!1)return;let n=new Yt({next:()=>{n.unsubscribe(),t()}});return k(e(...r)).subscribe(n)}function Ii(t,e,r){let n,o=!1;return t&&typeof t=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:o=!1,scheduler:r}=t:n=t??1/0,_l({connector:()=>new Di(n,e,r),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:o})}function g0(t){return ke((e,r)=>t<=r)}function ga(...t){let e=Lt(t);return S((r,n)=>{(e?tt(t,r,e):tt(t,r)).subscribe(n)})}function be(t,e){return S((r,n)=>{let o=null,i=0,s=!1,a=()=>s&&!o&&n.complete();r.subscribe(_(n,u=>{o?.unsubscribe();let c=0,l=i++;k(t(u,l)).subscribe(o=_(n,d=>n.next(e?e(u,d,l,c++):d),()=>{o=null,a()}))},()=>{s=!0,a()}))})}function m0(){return be(we)}function ma(t){return S((e,r)=>{k(t).subscribe(_(r,()=>r.complete(),Kt)),!r.closed&&e.subscribe(r)})}function Ce(t,e,r){let n=T(t)||e||r?{next:t,error:e,complete:r}:t;return n?S((o,i)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;o.subscribe(_(i,u=>{var c;(c=n.next)===null||c===void 0||c.call(n,u),i.next(u)},()=>{var u;a=!1,(u=n.complete)===null||u===void 0||u.call(n),i.complete()},u=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,u),i.error(u)},()=>{var u,c;a&&((u=n.unsubscribe)===null||u===void 0||u.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):we}function Ng(t,e){return S((r,n)=>{let{leading:o=!0,trailing:i=!1}=e??{},s=!1,a=null,u=null,c=!1,l=()=>{u?.unsubscribe(),u=null,i&&(h(),c&&n.complete())},d=()=>{u=null,c&&n.complete()},f=p=>u=k(t(p)).subscribe(_(n,l,d)),h=()=>{if(s){s=!1;let p=a;a=null,n.next(p),!c&&f(p)}};r.subscribe(_(n,p=>{s=!0,a=p,!(u&&!u.closed)&&(o?h():f(p))},()=>{c=!0,!(i&&s&&u&&!u.closed)&&n.complete()}))})}function v0(t,e=wt,r){let n=Xt(t,e);return Ng(()=>n,r)}function y0(...t){let e=Tn(t);return S((r,n)=>{let o=t.length,i=new Array(o),s=t.map(()=>!1),a=!1;for(let u=0;u{i[u]=c,!a&&!s[u]&&(s[u]=!0,(a=s.every(we))&&(s=null))},Kt));r.subscribe(_(n,u=>{if(a){let c=[u,...i];n.next(e?e(...c):c)}}))})}var Cm="https://g.co/ng/security#xss",C=class extends Error{constructor(e,r){super(Xa(e,r)),this.code=e}};function Xa(t,e){return`${`NG0${Math.abs(t)}`}${e?": "+e:""}`}function Li(t){return{toString:t}.toString()}var va="__parameters__";function D0(t){return function(...r){if(t){let n=t(...r);for(let o in n)this[o]=n[o]}}}function Em(t,e,r){return Li(()=>{let n=D0(e);function o(...i){if(this instanceof o)return n.apply(this,i),this;let s=new o(...i);return a.annotation=s,a;function a(u,c,l){let d=u.hasOwnProperty(va)?u[va]:Object.defineProperty(u,va,{value:[]})[va];for(;d.length<=l;)d.push(null);return(d[l]=d[l]||[]).push(s),u}}return r&&(o.prototype=Object.create(r.prototype)),o.prototype.ngMetadataName=t,o.annotationCls=o,o})}var It=globalThis;function J(t){for(let e in t)if(t[e]===J)return e;throw Error("Could not find renamed property on target object.")}function w0(t,e){for(let r in e)e.hasOwnProperty(r)&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Be(t){if(typeof t=="string")return t;if(Array.isArray(t))return"["+t.map(Be).join(", ")+"]";if(t==null)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;let e=t.toString();if(e==null)return""+e;let r=e.indexOf(` +`);return r===-1?e:e.substring(0,r)}function $l(t,e){return t==null||t===""?e===null?"":e:e==null||e===""?t:t+" "+e}var b0=J({__forward_ref__:J});function Re(t){return t.__forward_ref__=Re,t.toString=function(){return Be(this())},t}function Ne(t){return Im(t)?t():t}function Im(t){return typeof t=="function"&&t.hasOwnProperty(b0)&&t.__forward_ref__===Re}function b(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function _t(t){return{providers:t.providers||[],imports:t.imports||[]}}function eu(t){return Og(t,_m)||Og(t,Mm)}function xm(t){return eu(t)!==null}function Og(t,e){return t.hasOwnProperty(e)?t[e]:null}function C0(t){let e=t&&(t[_m]||t[Mm]);return e||null}function Rg(t){return t&&(t.hasOwnProperty(Pg)||t.hasOwnProperty(E0))?t[Pg]:null}var _m=J({\u0275prov:J}),Pg=J({\u0275inj:J}),Mm=J({ngInjectableDef:J}),E0=J({ngInjectorDef:J}),E=class{constructor(e,r){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof r=="number"?this.__NG_ELEMENT_ID__=r:r!==void 0&&(this.\u0275prov=b({token:this,providedIn:r.providedIn||"root",factory:r.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function Tm(t){return t&&!!t.\u0275providers}var I0=J({\u0275cmp:J}),x0=J({\u0275dir:J}),_0=J({\u0275pipe:J}),M0=J({\u0275mod:J}),Sa=J({\u0275fac:J}),xi=J({__NG_ELEMENT_ID__:J}),Fg=J({__NG_ENV_ID__:J});function Ze(t){return typeof t=="string"?t:t==null?"":String(t)}function T0(t){return typeof t=="function"?t.name||t.toString():typeof t=="object"&&t!=null&&typeof t.type=="function"?t.type.name||t.type.toString():Ze(t)}function S0(t,e){let r=e?`. Dependency path: ${e.join(" > ")} > ${t}`:"";throw new C(-200,t)}function Qd(t,e){throw new C(-201,!1)}var j=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}(j||{}),Hl;function Sm(){return Hl}function qe(t){let e=Hl;return Hl=t,e}function Am(t,e,r){let n=eu(t);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(r&j.Optional)return null;if(e!==void 0)return e;Qd(t,"Injector")}var A0={},Mi=A0,zl="__NG_DI_FLAG__",Aa="ngTempTokenPath",N0="ngTokenPath",O0=/\n/gm,R0="\u0275",Lg="__source",uo;function P0(){return uo}function Pn(t){let e=uo;return uo=t,e}function F0(t,e=j.Default){if(uo===void 0)throw new C(-203,!1);return uo===null?Am(t,void 0,e):uo.get(t,e&j.Optional?null:void 0,e)}function x(t,e=j.Default){return(Sm()||F0)(Ne(t),e)}function y(t,e=j.Default){return x(t,tu(e))}function tu(t){return typeof t>"u"||typeof t=="number"?t:0|(t.optional&&8)|(t.host&&1)|(t.self&&2)|(t.skipSelf&&4)}function Gl(t){let e=[];for(let r=0;r ");else if(typeof e=="object"){let i=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];i.push(s+":"+(typeof a=="string"?JSON.stringify(a):Be(a)))}o=`{${i.join(", ")}}`}return`${r}${n?"("+n+")":""}[${o}]: ${t.replace(O0,` - `)}`}var nu=Om(Im("Optional"),8);var Xd=Om(Im("SkipSelf"),4);function wr(t,e){let r=t.hasOwnProperty(Sa);return r?t[Sa]:null}function V0(t,e,r){if(t.length!==e.length)return!1;for(let n=0;nArray.isArray(r)?ef(r,e):e(r))}function Rm(t,e,r){e>=t.length?t.push(r):t.splice(e,0,r)}function Na(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function B0(t,e){let r=[];for(let n=0;ne;){let i=o-2;t[o]=t[i],o--}t[e]=r,t[e+1]=n}}function ru(t,e,r){let n=ki(t,e);return n>=0?t[n|1]=r:(n=~n,$0(t,n,e,r)),n}function Tl(t,e){let r=ki(t,e);if(r>=0)return t[r|1]}function ki(t,e){return H0(t,e,1)}function H0(t,e,r){let n=0,o=t.length>>r;for(;o!==n;){let i=n+(o-n>>1),s=t[i<e?o=i:n=i+1}return~(o<e){s=i-1;break}}}for(;i-1){let i;for(;++oi?d="":d=o[l+1].toLowerCase(),n&2&&c!==d){if(Ct(n))return!1;s=!0}}}}return Ct(n)||s}function Ct(t){return(t&1)===0}function K0(t,e,r,n){if(e===null)return-1;let o=0;if(n||!r){let i=!1;for(;o-1)for(r++;r0?'="'+a+'"':"")+"]"}else n&8?o+="."+s:n&4&&(o+=" "+s);else o!==""&&!Ct(s)&&(e+=Vg(i,o),o=""),n=s,i=i||!Ct(n);r++}return o!==""&&(e+=Vg(i,o)),e}function t_(t){return t.map(e_).join(",")}function n_(t){let e=[],r=[],n=1,o=2;for(;n{let e=zm(t),r=$(D({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Lm.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Bt.Emulated,styles:t.styles||Ye,_:null,schemas:t.schemas||null,tView:null,id:""});Gm(r);let n=t.dependencies;return r.directiveDefs=Bg(n,!1),r.pipeDefs=Bg(n,!0),r.id=i_(r),r})}function r_(t){return kn(t)||nf(t)}function o_(t){return t!==null}function Mt(t){return Li(()=>({type:t.type,bootstrap:t.bootstrap||Ye,declarations:t.declarations||Ye,imports:t.imports||Ye,exports:t.exports||Ye,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function Ug(t,e){if(t==null)return tn;let r={};for(let n in t)if(t.hasOwnProperty(n)){let o=t[n],i,s,a=ho.None;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i):(i=o,s=o),e?(r[i]=a!==ho.None?[n,a]:n,e[i]=s):r[i]=n}return r}function H(t){return Li(()=>{let e=zm(t);return Gm(e),e})}function xo(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone===!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function kn(t){return t[I0]||null}function nf(t){return t[x0]||null}function Bm(t){return t[_0]||null}function $m(t){let e=kn(t)||nf(t)||Bm(t);return e!==null?e.standalone:!1}function Hm(t,e){let r=t[M0]||null;if(!r&&e===!0)throw new Error(`Type ${Be(t)} does not have '\u0275mod' property.`);return r}function zm(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||tn,exportAs:t.exportAs||null,standalone:t.standalone===!0,signals:t.signals===!0,selectors:t.selectors||Ye,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Ug(t.inputs,e),outputs:Ug(t.outputs),debugInfo:null}}function Gm(t){t.features?.forEach(e=>e(t))}function Bg(t,e){if(!t)return null;let r=e?Bm:r_;return()=>(typeof t=="function"?t():t).map(n=>r(n)).filter(o_)}function i_(t){let e=0,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(let o of r)e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function ji(t){return{\u0275providers:t}}function s_(...t){return{\u0275providers:Wm(!0,t),\u0275fromNgModule:!0}}function Wm(t,...e){let r=[],n=new Set,o,i=s=>{r.push(s)};return ef(e,s=>{let a=s;Zl(a,i,[],n)&&(o||=[],o.push(a))}),o!==void 0&&qm(o,i),r}function qm(t,e){for(let r=0;r{e(i,n)})}}function Zl(t,e,r,n){if(t=Ne(t),!t)return!1;let o=null,i=Pg(t),s=!i&&kn(t);if(!i&&!s){let u=t.ngModule;if(i=Pg(u),i)o=u;else return!1}else{if(s&&!s.standalone)return!1;o=t}let a=n.has(o);if(s){if(a)return!1;if(n.add(o),s.dependencies){let u=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of u)Zl(c,e,r,n)}}else if(i){if(i.imports!=null&&!a){n.add(o);let c;try{ef(i.imports,l=>{Zl(l,e,r,n)&&(c||=[],c.push(l))})}finally{}c!==void 0&&qm(c,e)}if(!a){let c=wr(o)||(()=>new o);e({provide:o,useFactory:c,deps:Ye},o),e({provide:Fm,useValue:o,multi:!0},o),e({provide:fo,useValue:()=>x(o),multi:!0},o)}let u=i.providers;if(u!=null&&!a){let c=t;rf(u,l=>{e(l,c)})}}else return!1;return o!==t&&t.providers!==void 0}function rf(t,e){for(let r of t)Sm(r)&&(r=r.\u0275providers),Array.isArray(r)?rf(r,e):e(r)}var a_=J({provide:String,useValue:J});function Zm(t){return t!==null&&typeof t=="object"&&a_ in t}function u_(t){return!!(t&&t.useExisting)}function c_(t){return!!(t&&t.useFactory)}function po(t){return typeof t=="function"}function l_(t){return!!t.useClass}var ou=new E(""),Ea={},d_={},Sl;function iu(){return Sl===void 0&&(Sl=new Oa),Sl}var Qe=class{},Si=class extends Qe{get destroyed(){return this._destroyed}constructor(e,r,n,o){super(),this.parent=r,this.source=n,this.scopes=o,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Yl(e,s=>this.processProvider(s)),this.records.set(Pm,so(void 0,this)),o.has("environment")&&this.records.set(Qe,so(void 0,this));let i=this.records.get(ou);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Fm,Ye,j.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=V(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let r=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of r)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),V(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let r=Pn(this),n=Ze(void 0),o;try{return e()}finally{Pn(r),Ze(n)}}get(e,r=Mi,n=j.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(Lg))return e[Lg](this);n=tu(n);let o,i=Pn(this),s=Ze(void 0);try{if(!(n&j.SkipSelf)){let u=this.records.get(e);if(u===void 0){let c=m_(e)&&eu(e);c&&this.injectableDefInScope(c)?u=so(Kl(e),Ea):u=null,this.records.set(e,u)}if(u!=null)return this.hydrate(e,u)}let a=n&j.Self?iu():this.parent;return r=n&j.Optional&&r===Mi?null:r,a.get(e,r)}catch(a){if(a.name==="NullInjectorError"){if((a[Aa]=a[Aa]||[]).unshift(Be(e)),i)throw a;return k0(a,e,"R3InjectorError",this.source)}else throw a}finally{Ze(s),Pn(i)}}resolveInjectorInitializers(){let e=V(null),r=Pn(this),n=Ze(void 0),o;try{let i=this.get(fo,Ye,j.Self);for(let s of i)s()}finally{Pn(r),Ze(n),V(e)}}toString(){let e=[],r=this.records;for(let n of r.keys())e.push(Be(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new C(205,!1)}processProvider(e){e=Ne(e);let r=po(e)?e:Ne(e&&e.provide),n=h_(e);if(!po(e)&&e.multi===!0){let o=this.records.get(r);o||(o=so(void 0,Ea,!0),o.factory=()=>Wl(o.multi),this.records.set(r,o)),r=e,o.multi.push(e)}this.records.set(r,n)}hydrate(e,r){let n=V(null);try{return r.value===Ea&&(r.value=d_,r.value=r.factory()),typeof r.value=="object"&&r.value&&g_(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}finally{V(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let r=Ne(e.providedIn);return typeof r=="string"?r==="any"||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(e){let r=this._onDestroyHooks.indexOf(e);r!==-1&&this._onDestroyHooks.splice(r,1)}};function Kl(t){let e=eu(t),r=e!==null?e.factory:wr(t);if(r!==null)return r;if(t instanceof E)throw new C(204,!1);if(t instanceof Function)return f_(t);throw new C(204,!1)}function f_(t){if(t.length>0)throw new C(204,!1);let r=C0(t);return r!==null?()=>r.factory(t):()=>new t}function h_(t){if(Zm(t))return so(void 0,t.useValue);{let e=Km(t);return so(e,Ea)}}function Km(t,e,r){let n;if(po(t)){let o=Ne(t);return wr(o)||Kl(o)}else if(Zm(t))n=()=>Ne(t.useValue);else if(c_(t))n=()=>t.useFactory(...Wl(t.deps||[]));else if(u_(t))n=()=>x(Ne(t.useExisting));else{let o=Ne(t&&(t.useClass||t.provide));if(p_(t))n=()=>new o(...Wl(t.deps));else return wr(o)||Kl(o)}return n}function so(t,e,r=!1){return{factory:t,value:e,multi:r?[]:void 0}}function p_(t){return!!t.deps}function g_(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function m_(t){return typeof t=="function"||typeof t=="object"&&t instanceof E}function Yl(t,e){for(let r of t)Array.isArray(r)?Yl(r,e):r&&Sm(r)?Yl(r.\u0275providers,e):e(r)}function Tt(t,e){t instanceof Si&&t.assertNotDestroyed();let r,n=Pn(t),o=Ze(void 0);try{return e()}finally{Pn(n),Ze(o)}}function Ym(){return Am()!==void 0||P0()!=null}function K6(t){if(!Ym())throw new C(-203,!1)}function v_(t){return typeof t=="function"}var an=0,R=1,O=2,Ve=3,xt=4,Xe=5,go=6,Ra=7,Oe=8,mo=9,$t=10,ae=11,Ai=12,$g=13,_o=14,Je=15,br=16,ao=17,nn=18,su=19,Qm=20,Fn=21,Al=22,dt=23,Ee=25,Jm=1;var Cr=7,Pa=8,vo=9,je=10,Fa=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(Fa||{});function Ln(t){return Array.isArray(t)&&typeof t[Jm]=="object"}function un(t){return Array.isArray(t)&&t[Jm]===!0}function of(t){return(t.flags&4)!==0}function au(t){return t.componentOffset>-1}function uu(t){return(t.flags&1)===1}function jn(t){return!!t.template}function Ql(t){return(t[O]&512)!==0}var Jl=class{constructor(e,r,n){this.previousValue=e,this.currentValue=r,this.firstChange=n}isFirstChange(){return this.firstChange}};function Xm(t,e,r,n){e!==null?e.applyValueToInputSignal(e,n):t[r]=n}function nt(){return ev}function ev(t){return t.type.prototype.ngOnChanges&&(t.setInput=D_),y_}nt.ngInherit=!0;function y_(){let t=nv(this),e=t?.current;if(e){let r=t.previous;if(r===tn)t.previous=e;else for(let n in e)r[n]=e[n];t.current=null,this.ngOnChanges(e)}}function D_(t,e,r,n,o){let i=this.declaredInputs[n],s=nv(t)||w_(t,{previous:tn,current:null}),a=s.current||(s.current={}),u=s.previous,c=u[i];a[i]=new Jl(c&&c.currentValue,r,u===tn),Xm(t,e,o,r)}var tv="__ngSimpleChanges__";function nv(t){return t[tv]||null}function w_(t,e){return t[tv]=e}var Hg=null;var Vt=function(t,e,r){Hg?.(t,e,r)},rv="svg",ov="math";function Ht(t){for(;Array.isArray(t);)t=t[an];return t}function iv(t,e){return Ht(e[t])}function ft(t,e){return Ht(e[t.index])}function sf(t,e){return t.data[e]}function cu(t,e){return t[e]}function $n(t,e){let r=e[t];return Ln(r)?r:r[an]}function b_(t){return(t[O]&4)===4}function af(t){return(t[O]&128)===128}function C_(t){return un(t[Ve])}function Vn(t,e){return e==null?null:t[e]}function sv(t){t[ao]=0}function av(t){t[O]&1024||(t[O]|=1024,af(t)&&lu(t))}function E_(t,e){for(;t>0;)e=e[_o],t--;return e}function Ni(t){return!!(t[O]&9216||t[dt]?.dirty)}function Xl(t){t[$t].changeDetectionScheduler?.notify(7),t[O]&64&&(t[O]|=1024),Ni(t)&&lu(t)}function lu(t){t[$t].changeDetectionScheduler?.notify(0);let e=Er(t);for(;e!==null&&!(e[O]&8192||(e[O]|=8192,!af(e)));)e=Er(e)}function uv(t,e){if((t[O]&256)===256)throw new C(911,!1);t[Fn]===null&&(t[Fn]=[]),t[Fn].push(e)}function I_(t,e){if(t[Fn]===null)return;let r=t[Fn].indexOf(e);r!==-1&&t[Fn].splice(r,1)}function Er(t){let e=t[Ve];return un(e)?e[Ve]:e}var F={lFrame:vv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var cv=!1;function x_(){return F.lFrame.elementDepthCount}function __(){F.lFrame.elementDepthCount++}function M_(){F.lFrame.elementDepthCount--}function lv(){return F.bindingsEnabled}function dv(){return F.skipHydrationRootTNode!==null}function T_(t){return F.skipHydrationRootTNode===t}function S_(){F.skipHydrationRootTNode=null}function M(){return F.lFrame.lView}function ce(){return F.lFrame.tView}function Y6(t){return F.lFrame.contextLView=t,t[Oe]}function Q6(t){return F.lFrame.contextLView=null,t}function Pe(){let t=fv();for(;t!==null&&t.type===64;)t=t.parent;return t}function fv(){return F.lFrame.currentTNode}function A_(){let t=F.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function Ar(t,e){let r=F.lFrame;r.currentTNode=t,r.isParent=e}function uf(){return F.lFrame.isParent}function cf(){F.lFrame.isParent=!1}function N_(){return F.lFrame.contextLView}function hv(){return cv}function zg(t){cv=t}function Gt(){let t=F.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function lf(){return F.lFrame.bindingIndex}function O_(t){return F.lFrame.bindingIndex=t}function Nr(){return F.lFrame.bindingIndex++}function Vi(t){let e=F.lFrame,r=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,r}function R_(){return F.lFrame.inI18n}function P_(t,e){let r=F.lFrame;r.bindingIndex=r.bindingRootIndex=t,ed(e)}function F_(){return F.lFrame.currentDirectiveIndex}function ed(t){F.lFrame.currentDirectiveIndex=t}function L_(t){let e=F.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function pv(){return F.lFrame.currentQueryIndex}function df(t){F.lFrame.currentQueryIndex=t}function k_(t){let e=t[R];return e.type===2?e.declTNode:e.type===1?t[Xe]:null}function gv(t,e,r){if(r&j.SkipSelf){let o=e,i=t;for(;o=o.parent,o===null&&!(r&j.Host);)if(o=k_(i),o===null||(i=i[_o],o.type&10))break;if(o===null)return!1;e=o,t=i}let n=F.lFrame=mv();return n.currentTNode=e,n.lView=t,!0}function ff(t){let e=mv(),r=t[R];F.lFrame=e,e.currentTNode=r.firstChild,e.lView=t,e.tView=r,e.contextLView=t,e.bindingIndex=r.bindingStartIndex,e.inI18n=!1}function mv(){let t=F.lFrame,e=t===null?null:t.child;return e===null?vv(t):e}function vv(t){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function yv(){let t=F.lFrame;return F.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var Dv=yv;function hf(){let t=yv();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function j_(t){return(F.lFrame.contextLView=E_(t,F.lFrame.contextLView))[Oe]}function St(){return F.lFrame.selectedIndex}function Ir(t){F.lFrame.selectedIndex=t}function Ui(){let t=F.lFrame;return sf(t.tView,t.selectedIndex)}function J6(){F.lFrame.currentNamespace=rv}function X6(){F.lFrame.currentNamespace=ov}function V_(){return F.lFrame.currentNamespace}var wv=!0;function du(){return wv}function fu(t){wv=t}function U_(t,e,r){let{ngOnChanges:n,ngOnInit:o,ngDoCheck:i}=e.type.prototype;if(n){let s=ev(e);(r.preOrderHooks??=[]).push(t,s),(r.preOrderCheckHooks??=[]).push(t,s)}o&&(r.preOrderHooks??=[]).push(0-t,o),i&&((r.preOrderHooks??=[]).push(t,i),(r.preOrderCheckHooks??=[]).push(t,i))}function hu(t,e){for(let r=e.directiveStart,n=e.directiveEnd;r=n)break}else e[u]<0&&(t[ao]+=65536),(a>14>16&&(t[O]&3)===e&&(t[O]+=16384,Gg(a,i)):Gg(a,i)}var lo=-1,xr=class{constructor(e,r,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=n}};function $_(t){return t instanceof xr}function H_(t){return(t.flags&8)!==0}function z_(t){return(t.flags&16)!==0}function Cv(t){return t!==lo}function La(t){return t&32767}function G_(t){return t>>16}function ka(t,e){let r=G_(t),n=e;for(;r>0;)n=n[_o],r--;return n}var td=!0;function ja(t){let e=td;return td=t,e}var W_=256,Ev=W_-1,Iv=5,q_=0,Ut={};function Z_(t,e,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(xi)&&(n=r[xi]),n==null&&(n=r[xi]=q_++);let o=n&Ev,i=1<>Iv)]|=i}function Va(t,e){let r=xv(t,e);if(r!==-1)return r;let n=e[R];n.firstCreatePass&&(t.injectorIndex=e.length,Ol(n.data,t),Ol(e,null),Ol(n.blueprint,null));let o=pf(t,e),i=t.injectorIndex;if(Cv(o)){let s=La(o),a=ka(o,e),u=a[R].data;for(let c=0;c<8;c++)e[i+c]=a[s+c]|u[s+c]}return e[i+8]=o,i}function Ol(t,e){t.push(0,0,0,0,0,0,0,0,e)}function xv(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function pf(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let r=0,n=null,o=e;for(;o!==null;){if(n=Av(o),n===null)return lo;if(r++,o=o[_o],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return lo}function nd(t,e,r){Z_(t,e,r)}function K_(t,e){if(e==="class")return t.classes;if(e==="style")return t.styles;let r=t.attrs;if(r){let n=r.length,o=0;for(;o>20,d=n?a:a+l,f=o?a+l:c;for(let h=d;h=u&&p.type===r)return h}if(o){let h=s[u];if(h&&jn(h)&&h.type===r)return u}return null}function _r(t,e,r,n){let o=t[r],i=e.data;if($_(o)){let s=o;s.resolving&&S0(T0(i[r]));let a=ja(s.canSeeViewProviders);s.resolving=!0;let u,c=s.injectImpl?Ze(s.injectImpl):null,l=gv(t,n,j.Default);try{o=t[r]=s.factory(void 0,i,t,n),e.firstCreatePass&&r>=n.directiveStart&&U_(r,i[r],e)}finally{c!==null&&Ze(c),ja(a),s.resolving=!1,Dv()}}return o}function Q_(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(xi)?t[xi]:void 0;return typeof e=="number"?e>=0?e&Ev:J_:e}function Wg(t,e,r){let n=1<>Iv)]&n)}function qg(t,e){return!(t&j.Self)&&!(t&j.Host&&e)}var Dr=class{constructor(e,r){this._tNode=e,this._lView=r}get(e,r,n){return Tv(this._tNode,this._lView,e,tu(n),r)}};function J_(){return new Dr(Pe(),M())}function Fe(t){return Li(()=>{let e=t.prototype.constructor,r=e[Sa]||rd(e),n=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==n;){let i=o[Sa]||rd(o);if(i&&i!==r)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function rd(t){return xm(t)?()=>{let e=rd(Ne(t));return e&&e()}:wr(t)}function X_(t,e,r,n,o){let i=t,s=e;for(;i!==null&&s!==null&&s[O]&2048&&!(s[O]&512);){let a=Sv(i,s,r,n|j.Self,Ut);if(a!==Ut)return a;let u=i.parent;if(!u){let c=s[Qm];if(c){let l=c.get(r,Ut,n);if(l!==Ut)return l}u=Av(s),s=s[_o]}i=u}return o}function Av(t){let e=t[R],r=e.type;return r===2?e.declTNode:r===1?t[Xe]:null}function gf(t){return K_(Pe(),t)}function Zg(t,e=null,r=null,n){let o=Nv(t,e,r,n);return o.resolveInjectorInitializers(),o}function Nv(t,e=null,r=null,n,o=new Set){let i=[r||Ye,s_(t)];return n=n||(typeof t=="object"?void 0:Be(t)),new Si(i,e||iu(),n||null,o)}var yr=class yr{static create(e,r){if(Array.isArray(e))return Zg({name:""},r,e,"");{let n=e.name??"";return Zg({name:n},e.parent,e.providers,n)}}};yr.THROW_IF_NOT_FOUND=Mi,yr.NULL=new Oa,yr.\u0275prov=b({token:yr,providedIn:"any",factory:()=>x(Pm)}),yr.__NG_ELEMENT_ID__=-1;var rn=yr;var eM=new E("");eM.__NG_ELEMENT_ID__=t=>{let e=Pe();if(e===null)throw new C(204,!1);if(e.type&2)return e.value;if(t&j.Optional)return null;throw new C(204,!1)};var tM="ngOriginalError";function Rl(t){return t[tM]}var on=class{constructor(){this._console=console}handleError(e){let r=this._findOriginalError(e);this._console.error("ERROR",e),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(e){let r=e&&Rl(e);for(;r&&Rl(r);)r=Rl(r);return r||null}},Ov=new E("",{providedIn:"root",factory:()=>y(on).handleError.bind(void 0)}),Rv=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=nM,e.__NG_ENV_ID__=n=>n;let t=e;return t})(),od=class extends Rv{constructor(e){super(),this._lView=e}onDestroy(e){return uv(this._lView,e),()=>I_(this._lView,e)}};function nM(){return new od(M())}function rM(){return Mo(Pe(),M())}function Mo(t,e){return new _e(ft(t,e))}var _e=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=rM;let t=e;return t})();function oM(t){return t instanceof _e?t.nativeElement:t}var Hn=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Se(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();var id=class extends se{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,Ym()&&(this.destroyRef=y(Rv,{optional:!0})??void 0,this.pendingTasks=y(Hn,{optional:!0})??void 0)}emit(e){let r=V(null);try{super.next(e)}finally{V(r)}}subscribe(e,r,n){let o=e,i=r||(()=>null),s=n;if(e&&typeof e=="object"){let u=e;o=u.next?.bind(u),i=u.error?.bind(u),s=u.complete?.bind(u)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return e instanceof ie&&e.add(a),a}wrapInTimeout(e){return r=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(r),n!==void 0&&this.pendingTasks?.remove(n)})}}},G=id;function iM(){return this._results[Symbol.iterator]()}var sd=class t{get changes(){return this._changes??=new G}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let r=t.prototype;r[Symbol.iterator]||(r[Symbol.iterator]=iM)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,r){return this._results.reduce(e,r)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,r){this.dirty=!1;let n=U0(e);(this._changesDetected=!V0(this._results,n,r))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function Pv(t){return(t.flags&128)===128}var Fv=new Map,sM=0;function aM(){return sM++}function uM(t){Fv.set(t[su],t)}function cM(t){Fv.delete(t[su])}var Kg="__ngContext__";function Un(t,e){Ln(e)?(t[Kg]=e[su],uM(e)):t[Kg]=e}function Lv(t){return jv(t[Ai])}function kv(t){return jv(t[xt])}function jv(t){for(;t!==null&&!un(t);)t=t[xt];return t}var ad;function Vv(t){ad=t}function lM(){if(ad!==void 0)return ad;if(typeof document<"u")return document;throw new C(210,!1)}var mf=new E("",{providedIn:"root",factory:()=>dM}),dM="ng",vf=new E(""),cn=new E("",{providedIn:"platform",factory:()=>"unknown"});var e5=new E(""),yf=new E("",{providedIn:"root",factory:()=>lM().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var fM="h",hM="b";var pM=()=>null;function Df(t,e,r=!1){return pM(t,e,r)}var Uv=!1,gM=new E("",{providedIn:"root",factory:()=>Uv});var ya;function mM(){if(ya===void 0&&(ya=null,It.trustedTypes))try{ya=It.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return ya}function pu(t){return mM()?.createHTML(t)||t}var Da;function vM(){if(Da===void 0&&(Da=null,It.trustedTypes))try{Da=It.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Da}function Yg(t){return vM()?.createScriptURL(t)||t}var sn=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Em})`}},ud=class extends sn{getTypeName(){return"HTML"}},cd=class extends sn{getTypeName(){return"Style"}},ld=class extends sn{getTypeName(){return"Script"}},dd=class extends sn{getTypeName(){return"URL"}},fd=class extends sn{getTypeName(){return"ResourceURL"}};function At(t){return t instanceof sn?t.changingThisBreaksApplicationSecurity:t}function zn(t,e){let r=yM(t);if(r!=null&&r!==e){if(r==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${r} (see ${Em})`)}return r===e}function yM(t){return t instanceof sn&&t.getTypeName()||null}function Bv(t){return new ud(t)}function $v(t){return new cd(t)}function Hv(t){return new ld(t)}function zv(t){return new dd(t)}function Gv(t){return new fd(t)}function DM(t){let e=new pd(t);return wM()?new hd(e):e}var hd=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let r=new window.DOMParser().parseFromString(pu(e),"text/html").body;return r===null?this.inertDocumentHelper.getInertBodyElement(e):(r.removeChild(r.firstChild),r)}catch{return null}}},pd=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let r=this.inertDocument.createElement("template");return r.innerHTML=pu(e),r}};function wM(){try{return!!new window.DOMParser().parseFromString(pu(""),"text/html")}catch{return!1}}var bM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function gu(t){return t=String(t),t.match(bM)?t:"unsafe:"+t}function ln(t){let e={};for(let r of t.split(","))e[r]=!0;return e}function Bi(...t){let e={};for(let r of t)for(let n in r)r.hasOwnProperty(n)&&(e[n]=!0);return e}var Wv=ln("area,br,col,hr,img,wbr"),qv=ln("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Zv=ln("rp,rt"),CM=Bi(Zv,qv),EM=Bi(qv,ln("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),IM=Bi(Zv,ln("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Qg=Bi(Wv,EM,IM,CM),Kv=ln("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),xM=ln("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),_M=ln("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),MM=Bi(Kv,xM,_M),TM=ln("script,style,template"),gd=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let r=e.firstChild,n=!0,o=[];for(;r;){if(r.nodeType===Node.ELEMENT_NODE?n=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,n&&r.firstChild){o.push(r),r=NM(r);continue}for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let i=AM(r);if(i){r=i;break}r=o.pop()}}return this.buf.join("")}startElement(e){let r=Jg(e).toLowerCase();if(!Qg.hasOwnProperty(r))return this.sanitizedSomething=!0,!TM.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);let n=e.attributes;for(let o=0;o"),!0}endElement(e){let r=Jg(e).toLowerCase();Qg.hasOwnProperty(r)&&!Wv.hasOwnProperty(r)&&(this.buf.push(""))}chars(e){this.buf.push(Xg(e))}};function SM(t,e){return(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function AM(t){let e=t.nextSibling;if(e&&t!==e.previousSibling)throw Yv(e);return e}function NM(t){let e=t.firstChild;if(e&&SM(t,e))throw Yv(e);return e}function Jg(t){let e=t.nodeName;return typeof e=="string"?e:"FORM"}function Yv(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var OM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,RM=/([^\#-~ |!])/g;function Xg(t){return t.replace(/&/g,"&").replace(OM,function(e){let r=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(RM,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var wa;function Qv(t,e){let r=null;try{wa=wa||DM(t);let n=e?String(e):"";r=wa.getInertBodyElement(n);let o=5,i=n;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,n=i,i=r.innerHTML,r=wa.getInertBodyElement(n)}while(n!==i);let a=new gd().sanitizeChildren(em(r)||r);return pu(a)}finally{if(r){let n=em(r)||r;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function em(t){return"content"in t&&PM(t)?t.content:null}function PM(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var Wt=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(Wt||{});function FM(t){let e=Xv();return e?e.sanitize(Wt.URL,t)||"":zn(t,"URL")?At(t):gu(Ke(t))}function LM(t){let e=Xv();if(e)return Yg(e.sanitize(Wt.RESOURCE_URL,t)||"");if(zn(t,"ResourceURL"))return Yg(At(t));throw new C(904,!1)}function kM(t,e){return e==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||e==="href"&&(t==="base"||t==="link")?LM:FM}function Jv(t,e,r){return kM(e,r)(t)}function Xv(){let t=M();return t&&t[$t].sanitizer}var jM=/^>|^->||--!>|)/g,UM="\u200B$1\u200B";function BM(t){return t.replace(jM,e=>e.replace(VM,UM))}function ey(t){return t instanceof Function?t():t}var zt=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(zt||{}),$M;function wf(t,e){return $M(t,e)}function uo(t,e,r,n,o){if(n!=null){let i,s=!1;un(n)?i=n:Ln(n)&&(s=!0,n=n[an]);let a=Ht(n);t===0&&r!==null?o==null?iy(e,r,a):Ua(e,r,a,o||null,!0):t===1&&r!==null?Ua(e,r,a,o||null,!0):t===2?rT(e,a,s):t===3&&e.destroyNode(a),i!=null&&iT(e,t,i,r,o)}}function HM(t,e){return t.createText(e)}function zM(t,e,r){t.setValue(e,r)}function GM(t,e){return t.createComment(BM(e))}function ty(t,e,r){return t.createElement(e,r)}function WM(t,e){ny(t,e),e[an]=null,e[Xe]=null}function qM(t,e,r,n,o,i){n[an]=o,n[Xe]=e,yu(t,n,r,1,o,i)}function ny(t,e){e[$t].changeDetectionScheduler?.notify(8),yu(t,e,e[ae],2,null,null)}function ZM(t){let e=t[Ai];if(!e)return Pl(t[R],t);for(;e;){let r=null;if(Ln(e))r=e[Ai];else{let n=e[je];n&&(r=n)}if(!r){for(;e&&!e[xt]&&e!==t;)Ln(e)&&Pl(e[R],e),e=e[Ve];e===null&&(e=t),Ln(e)&&Pl(e[R],e),r=e&&e[xt]}e=r}}function KM(t,e,r,n){let o=je+n,i=r.length;n>0&&(r[o-1][xt]=e),n0&&(t[r-1][xt]=n[xt]);let i=Na(t,je+e);WM(n[R],n);let s=i[nn];s!==null&&s.detachView(i[R]),n[Ve]=null,n[xt]=null,n[O]&=-129}return n}function mu(t,e){if(!(e[O]&256)){let r=e[ae];r.destroyNode&&yu(t,e,r,3,null,null),ZM(e)}}function Pl(t,e){if(e[O]&256)return;let r=V(null);try{e[O]&=-129,e[O]|=256,e[dt]&&al(e[dt]),QM(t,e),YM(t,e),e[R].type===1&&e[ae].destroy();let n=e[br];if(n!==null&&un(e[Ve])){n!==e[Ve]&&bf(n,e);let o=e[nn];o!==null&&o.detachView(t)}cM(e)}finally{V(r)}}function YM(t,e){let r=t.cleanup,n=e[Ra];if(r!==null)for(let i=0;i=0?n[s]():n[-s].unsubscribe(),i+=2}else{let s=n[r[i+1]];r[i].call(s)}n!==null&&(e[Ra]=null);let o=e[Fn];if(o!==null){e[Fn]=null;for(let i=0;i-1){let{encapsulation:i}=t.data[n.directiveStart+o];if(i===Bt.None||i===Bt.Emulated)return null}return ft(n,r)}}function Ua(t,e,r,n,o){t.insertBefore(e,r,n,o)}function iy(t,e,r){t.appendChild(e,r)}function tm(t,e,r,n,o){n!==null?Ua(t,e,r,n,o):iy(t,e,r)}function XM(t,e,r,n){t.removeChild(e,r,n)}function Cf(t,e){return t.parentNode(e)}function eT(t,e){return t.nextSibling(e)}function sy(t,e,r){return nT(t,e,r)}function tT(t,e,r){return t.type&40?ft(t,r):null}var nT=tT,nm;function vu(t,e,r,n){let o=oy(t,n,e),i=e[ae],s=n.parent||e[Xe],a=sy(s,n,e);if(o!=null)if(Array.isArray(r))for(let u=0;uEe&&dy(t,e,Ee,!1),Vt(s?2:0,o),r(n,o)}finally{Ir(i),Vt(s?3:1,o)}}function If(t,e,r){if(of(e)){let n=V(null);try{let o=e.directiveStart,i=e.directiveEnd;for(let s=o;snull;function gT(t,e,r,n){let o=wy(e);o.push(r),t.firstCreatePass&&by(t).push(n,o.length-1)}function mT(t,e,r,n,o,i){let s=e?e.injectorIndex:-1,a=0;return dv()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,attrs:i,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function rm(t,e,r,n,o){for(let i in e){if(!e.hasOwnProperty(i))continue;let s=e[i];if(s===void 0)continue;n??={};let a,u=ho.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let c=i;if(o!==null){if(!o.hasOwnProperty(i))continue;c=o[i]}t===0?om(n,r,c,a,u):om(n,r,c,a)}return n}function om(t,e,r,n,o){let i;t.hasOwnProperty(r)?(i=t[r]).push(e,n):i=t[r]=[e,n],o!==void 0&&i.push(o)}function vT(t,e,r){let n=e.directiveStart,o=e.directiveEnd,i=t.data,s=e.attrs,a=[],u=null,c=null;for(let l=n;l0;){let r=t[--e];if(typeof r=="number"&&r<0)return r}return 0}function CT(t,e,r,n){let o=r.directiveStart,i=r.directiveEnd;au(r)&&ST(e,r,t.data[o+r.componentOffset]),t.firstCreatePass||Va(r,e),Un(n,e);let s=r.initialInputs;for(let a=o;a{lu(t.lView)},consumerOnSignalRead(){this.lView[dt]=this}});function $T(t){let e=t[dt]??Object.create(HT);return e.lView=t,e}var HT=$(D({},ol),{consumerIsAlwaysLive:!0,consumerMarkedDirty:t=>{let e=Er(t.lView);for(;e&&!_y(e[R]);)e=Er(e);e&&av(e)},consumerOnSignalRead(){this.lView[dt]=this}});function _y(t){return t.type!==2}var zT=100;function My(t,e=!0,r=0){let n=t[$t],o=n.rendererFactory,i=!1;i||o.begin?.();try{GT(t,r)}catch(s){throw e&&Cy(t,s),s}finally{i||(o.end?.(),n.inlineEffectRunner?.flush())}}function GT(t,e){let r=hv();try{zg(!0),Dd(t,e);let n=0;for(;Ni(t);){if(n===zT)throw new C(103,!1);n++,Dd(t,1)}}finally{zg(r)}}function WT(t,e,r,n){let o=e[O];if((o&256)===256)return;let i=!1,s=!1;!i&&e[$t].inlineEffectRunner?.flush(),ff(e);let a=!0,u=null,c=null;i||(_y(t)?(c=jT(e),u=il(c)):Qp()===null?(a=!1,c=$T(e),u=il(c)):e[dt]&&(al(e[dt]),e[dt]=null));try{sv(e),O_(t.bindingStartIndex),r!==null&&py(t,e,r,2,n);let l=(o&3)===3;if(!i)if(l){let h=t.preOrderCheckHooks;h!==null&&Ia(e,h,null)}else{let h=t.preOrderHooks;h!==null&&xa(e,h,0,null),Nl(e,0)}if(s||qT(e),Ty(e,0),t.contentQueries!==null&&Dy(t,e),!i)if(l){let h=t.contentCheckHooks;h!==null&&Ia(e,h)}else{let h=t.contentHooks;h!==null&&xa(e,h,1),Nl(e,1)}cT(t,e);let d=t.components;d!==null&&Ay(e,d,0);let f=t.viewQuery;if(f!==null&&yd(2,f,n),!i)if(l){let h=t.viewCheckHooks;h!==null&&Ia(e,h)}else{let h=t.viewHooks;h!==null&&xa(e,h,2),Nl(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[Al]){for(let h of e[Al])h();e[Al]=null}i||(e[O]&=-73)}catch(l){throw i||lu(e),l}finally{c!==null&&(Jp(c,u),a&&UT(c)),hf()}}function Ty(t,e){for(let r=Lv(t);r!==null;r=kv(r))for(let n=je;n-1&&(Oi(e,n),Na(r,n))}this._attachedToViewContainer=!1}mu(this._lView[R],this._lView)}onDestroy(e){uv(this._lView,e)}markForCheck(){Nf(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[O]&=-129}reattach(){Xl(this._lView),this._lView[O]|=128}detectChanges(){this._lView[O]|=1024,My(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new C(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Ql(this._lView),r=this._lView[br];r!==null&&!e&&bf(r,this._lView),ny(this._lView[R],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new C(902,!1);this._appRef=e;let r=Ql(this._lView),n=this._lView[br];n!==null&&!r&&ry(n,this._lView),Xl(this._lView)}},Tr=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=QT;let t=e;return t})(),KT=Tr,YT=class extends KT{constructor(e,r,n){super(),this._declarationLView=e,this._declarationTContainer=r,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,n){let o=$i(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:r,dehydratedView:n});return new Mr(o)}};function QT(){return Eu(Pe(),M())}function Eu(t,e){return t.type&4?new YT(e,t,Mo(t,e)):null}var r5=new RegExp(`^(\\d+)*(${hM}|${fM})*(.*)`);var JT=()=>null;function Do(t,e){return JT(t,e)}var Ri=class{},Ny=new E("",{providedIn:"root",factory:()=>!1});var Oy=new E(""),wd=class{},$a=class{};function XT(t){let e=Error(`No component factory found for ${Be(t)}.`);return e[eS]=t,e}var eS="ngComponent";var bd=class{resolveComponentFactory(e){throw XT(e)}},Wf=class Wf{};Wf.NULL=new bd;var wo=Wf,bo=class{},rt=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>tS();let t=e;return t})();function tS(){let t=M(),e=Pe(),r=$n(e.index,t);return(Ln(r)?r:t)[ae]}var nS=(()=>{let e=class e{};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>null});let t=e;return t})(),Fl={};var im=new Set;function zi(t){im.has(t)||(im.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}function Ry(t){let e=!0;return setTimeout(()=>{e&&(e=!1,t())}),typeof It.requestAnimationFrame=="function"&&It.requestAnimationFrame(()=>{e&&(e=!1,t())}),()=>{e=!1}}function sm(t){let e=!0;return queueMicrotask(()=>{e&&t()}),()=>{e=!1}}function am(...t){}var pe=class t{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new G(!1),this.onMicrotaskEmpty=new G(!1),this.onStable=new G(!1),this.onError=new G(!1),typeof Zone>"u")throw new C(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!n&&r,o.shouldCoalesceRunChangeDetection=n,o.callbackScheduled=!1,iS(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new C(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new C(909,!1)}run(e,r,n){return this._inner.run(e,r,n)}runTask(e,r,n,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,e,rS,am,am);try{return i.runTask(s,r,n)}finally{i.cancelTask(s)}}runGuarded(e,r,n){return this._inner.runGuarded(e,r,n)}runOutsideAngular(e){return this._outer.run(e)}},rS={};function Of(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function oS(t){t.isCheckStableRunning||t.callbackScheduled||(t.callbackScheduled=!0,Zone.root.run(()=>{Ry(()=>{t.callbackScheduled=!1,Cd(t),t.isCheckStableRunning=!0,Of(t),t.isCheckStableRunning=!1})}),Cd(t))}function iS(t){let e=()=>{oS(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,n,o,i,s,a)=>{if(sS(a))return r.invokeTask(o,i,s,a);try{return um(t),r.invokeTask(o,i,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&i.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),cm(t)}},onInvoke:(r,n,o,i,s,a,u)=>{try{return um(t),r.invoke(o,i,s,a,u)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!aS(a)&&e(),cm(t)}},onHasTask:(r,n,o,i)=>{r.hasTask(o,i),n===o&&(i.change=="microTask"?(t._hasPendingMicrotasks=i.microTask,Cd(t),Of(t)):i.change=="macroTask"&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:(r,n,o,i)=>(r.handleError(o,i),t.runOutsideAngular(()=>t.onError.emit(i)),!1)})}function Cd(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function um(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function cm(t){t._nesting--,Of(t)}var Ed=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new G,this.onMicrotaskEmpty=new G,this.onStable=new G,this.onError=new G}run(e,r,n){return e.apply(r,n)}runGuarded(e,r,n){return e.apply(r,n)}runOutsideAngular(e){return e()}runTask(e,r,n,o){return e.apply(r,n)}};function sS(t){return Py(t,"__ignore_ng_zone__")}function aS(t){return Py(t,"__scheduler_tick__")}function Py(t,e){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[e]===!0}var Fy=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let o of n)o()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();function Ha(t,e,r){let n=r?t.styles:null,o=r?t.classes:null,i=0;if(e!==null)for(let s=0;s0&&cy(t,r,i.join(" "))}}function pS(t,e,r){let n=t.projection=[];for(let o=0;o{let e=class e{};e.__NG_ELEMENT_ID__=mS;let t=e;return t})();function mS(){let t=Pe();return ky(t,M())}var vS=dn,Ly=class extends vS{constructor(e,r,n){super(),this._lContainer=e,this._hostTNode=r,this._hostLView=n}get element(){return Mo(this._hostTNode,this._hostLView)}get injector(){return new Dr(this._hostTNode,this._hostLView)}get parentInjector(){let e=pf(this._hostTNode,this._hostLView);if(Cv(e)){let r=ka(e,this._hostLView),n=La(e),o=r[R].data[n+8];return new Dr(o,r)}else return new Dr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let r=dm(this._lContainer);return r!==null&&r[e]||null}get length(){return this._lContainer.length-je}createEmbeddedView(e,r,n){let o,i;typeof n=="number"?o=n:n!=null&&(o=n.index,i=n.injector);let s=Do(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(r||{},i,s);return this.insertImpl(a,o,yo(this._hostTNode,s)),a}createComponent(e,r,n,o,i){let s=e&&!v_(e),a;if(s)a=r;else{let p=r||{};a=p.index,n=p.injector,o=p.projectableNodes,i=p.environmentInjector||p.ngModuleRef}let u=s?e:new Co(kn(e)),c=n||this.parentInjector;if(!i&&u.ngModule==null){let g=(s?c:this.parentInjector).get(Qe,null);g&&(i=g)}let l=kn(u.componentType??{}),d=Do(this._lContainer,l?.id??null),f=d?.firstChild??null,h=u.create(c,o,f,i);return this.insertImpl(h.hostView,a,yo(this._hostTNode,d)),h}insert(e,r){return this.insertImpl(e,r,!0)}insertImpl(e,r,n){let o=e._lView;if(C_(o)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let u=o[Ve],c=new Ly(u,u[Xe],u[Ve]);c.detach(c.indexOf(e))}}let i=this._adjustIndex(r),s=this._lContainer;return Hi(s,o,i,n),e.attachToViewContainerRef(),Rm(Ll(s),i,e),e}move(e,r){return this.insert(e,r)}indexOf(e){let r=dm(this._lContainer);return r!==null?r.indexOf(e):-1}remove(e){let r=this._adjustIndex(e,-1),n=Oi(this._lContainer,r);n&&(Na(Ll(this._lContainer),r),mu(n[R],n))}detach(e){let r=this._adjustIndex(e,-1),n=Oi(this._lContainer,r);return n&&Na(Ll(this._lContainer),r)!=null?new Mr(n):null}_adjustIndex(e,r=0){return e??this.length+r}};function dm(t){return t[Pa]}function Ll(t){return t[Pa]||(t[Pa]=[])}function ky(t,e){let r,n=e[t.index];return un(n)?r=n:(r=yy(n,e,null,t),e[t.index]=r,bu(e,r)),DS(r,e,t,n),new Ly(r,t,e)}function yS(t,e){let r=t[ae],n=r.createComment(""),o=ft(e,t),i=Cf(r,o);return Ua(r,i,n,eT(r,o),!1),n}var DS=CS,wS=()=>!1;function bS(t,e,r){return wS(t,e,r)}function CS(t,e,r,n){if(t[Cr])return;let o;r.type&8?o=Ht(n):o=yS(e,r),t[Cr]=o}var _d=class t{constructor(e){this.queryList=e,this.matches=null}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},Md=class t{constructor(e=[]){this.queries=e}createEmbeddedView(e){let r=e.queries;if(r!==null){let n=e.contentQueries!==null?e.contentQueries[0]:r.length,o=[];for(let i=0;i0)n.push(s[a/2]);else{let c=i[a+1],l=e[-u];for(let d=je;de.trim())}function Uy(t,e,r){t.queries===null&&(t.queries=new Td),t.queries.track(new Sd(e,r))}function NS(t,e){let r=t.contentQueries||(t.contentQueries=[]),n=r.length?r[r.length-1]:-1;e!==n&&r.push(t.queries.length-1,e)}function Rf(t,e){return t.queries.getByIndex(e)}function OS(t,e){let r=t[R],n=Rf(r,e);return n.crossesNgTemplate?Ad(r,t,e,[]):jy(r,t,n,e)}function RS(t){return typeof t=="function"&&t[rl]!==void 0}function By(t){return RS(t)&&typeof t.set=="function"}function PS(t){return Object.getPrototypeOf(t.prototype).constructor}function Ie(t){let e=PS(t.type),r=!0,n=[t];for(;e;){let o;if(jn(t))o=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new C(903,!1);o=e.\u0275dir}if(o){if(r){n.push(o);let s=t;s.inputs=ba(t.inputs),s.inputTransforms=ba(t.inputTransforms),s.declaredInputs=ba(t.declaredInputs),s.outputs=ba(t.outputs);let a=o.hostBindings;a&&VS(t,a);let u=o.viewQuery,c=o.contentQueries;if(u&&kS(t,u),c&&jS(t,c),FS(t,o),w0(t.outputs,o.outputs),jn(o)&&o.data.animation){let l=t.data;l.animation=(l.animation||[]).concat(o.data.animation)}}let i=o.features;if(i)for(let s=0;s=0;n--){let o=t[n];o.hostVars=e+=o.hostVars,o.hostAttrs=Ti(o.hostAttrs,r=Ti(r,o.hostAttrs))}}function ba(t){return t===tn?{}:t===Ye?[]:t}function kS(t,e){let r=t.viewQuery;r?t.viewQuery=(n,o)=>{e(n,o),r(n,o)}:t.viewQuery=e}function jS(t,e){let r=t.contentQueries;r?t.contentQueries=(n,o,i)=>{e(n,o,i),r(n,o,i)}:t.contentQueries=e}function VS(t,e){let r=t.hostBindings;r?t.hostBindings=(n,o)=>{e(n,o),r(n,o)}:t.hostBindings=e}function i5(t){let e=r=>{let n=(Array.isArray(t)?t:t()).map(o=>typeof o=="function"?{directive:Ne(o),inputs:tn,outputs:tn}:{directive:Ne(o.directive),inputs:fm(o.inputs),outputs:fm(o.outputs)});r.hostDirectives===null?(r.findHostDirectiveDefs=$y,r.hostDirectives=n):r.hostDirectives.unshift(...n)};return e.ngInherit=!0,e}function $y(t,e,r){if(t.hostDirectives!==null)for(let n of t.hostDirectives){let o=nf(n.directive);US(o.declaredInputs,n.inputs),$y(o,e,r),r.set(o,n),e.push(o)}}function fm(t){if(t===void 0||t.length===0)return tn;let e={};for(let r=0;rr()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},Od=class extends Pi{constructor(e){super(),this.moduleType=e}create(e){return new Nd(this.moduleType,e,[])}};var Wa=class extends Bn{constructor(e){super(),this.componentFactoryResolver=new za(this),this.instance=null;let r=new Si([...e.providers,{provide:Bn,useValue:this},{provide:wo,useValue:this.componentFactoryResolver}],e.parent||iu(),e.debugName,new Set(["environment"]));this.injector=r,e.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Ff(t,e,r=null){return new Wa({providers:t,parent:e,debugName:r,runEnvironmentInitializers:!0}).injector}function Hy(t){return Lf(t)?Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t:!1}function BS(t,e){if(Array.isArray(t))for(let r=0;r>17&32767}function YS(t){return(t&2)==2}function QS(t,e){return t&131071|e<<17}function Rd(t){return t|2}function Io(t){return(t&131068)>>2}function kl(t,e){return t&-131069|e<<2}function JS(t){return(t&1)===1}function Pd(t){return t|1}function XS(t,e,r,n,o,i){let s=i?e.classBindings:e.styleBindings,a=Sr(s),u=Io(s);t[n]=r;let c=!1,l;if(Array.isArray(r)){let d=r;l=d[1],(l===null||ki(d,l)>0)&&(c=!0)}else l=r;if(o)if(u!==0){let f=Sr(t[a+1]);t[n+1]=Ca(f,a),f!==0&&(t[f+1]=kl(t[f+1],n)),t[a+1]=QS(t[a+1],n)}else t[n+1]=Ca(a,0),a!==0&&(t[a+1]=kl(t[a+1],n)),a=n;else t[n+1]=Ca(u,0),a===0?a=n:t[u+1]=kl(t[u+1],n),u=n;c&&(t[n+1]=Rd(t[n+1])),hm(t,l,n,!0),hm(t,l,n,!1),eA(e,l,t,n,i),s=Ca(a,u),i?e.classBindings=s:e.styleBindings=s}function eA(t,e,r,n,o){let i=o?t.residualClasses:t.residualStyles;i!=null&&typeof e=="string"&&ki(i,e)>=0&&(r[n+1]=Pd(r[n+1]))}function hm(t,e,r,n){let o=t[r+1],i=e===null,s=n?Sr(o):Io(o),a=!1;for(;s!==0&&(a===!1||i);){let u=t[s],c=t[s+1];tA(u,e)&&(a=!0,t[s+1]=n?Pd(c):Rd(c)),s=n?Sr(c):Io(c)}a&&(t[r+1]=n?Rd(o):Pd(o))}function tA(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?ki(t,e)>=0:!1}var Et={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function nA(t){return t.substring(Et.key,Et.keyEnd)}function rA(t){return oA(t),Gy(t,Wy(t,0,Et.textEnd))}function Gy(t,e){let r=Et.textEnd;return r===e?-1:(e=Et.keyEnd=iA(t,Et.key=e,r),Wy(t,e,r))}function oA(t){Et.key=0,Et.keyEnd=0,Et.value=0,Et.valueEnd=0,Et.textEnd=t.length}function Wy(t,e,r){for(;e32;)e++;return e}function sA(t,e,r){let n=M(),o=Nr();if($e(n,o,e)){let i=ce(),s=Ui();wu(i,s,n,t,e,n[ae],r,!1)}return sA}function Fd(t,e,r,n,o){let i=e.inputs,s=o?"class":"style";Sf(t,r,i[s],s,n)}function xu(t,e){return aA(t,e,null,!0),xu}function s5(t){Zy(hA,qy,t,!0)}function qy(t,e){for(let r=rA(e);r>=0;r=Gy(e,r))ru(t,nA(e),!0)}function aA(t,e,r,n){let o=M(),i=ce(),s=Vi(2);if(i.firstUpdatePass&&Yy(i,t,s,n),e!==Me&&$e(o,s,e)){let a=i.data[St()];Qy(i,a,o,o[ae],t,o[s+1]=gA(e,r),n,s)}}function Zy(t,e,r,n){let o=ce(),i=Vi(2);o.firstUpdatePass&&Yy(o,null,i,n);let s=M();if(r!==Me&&$e(s,i,r)){let a=o.data[St()];if(Jy(a,n)&&!Ky(o,i)){let u=n?a.classesWithoutHost:a.stylesWithoutHost;u!==null&&(r=Hl(u,r||"")),Fd(o,a,s,r,n)}else pA(o,a,s,s[ae],s[i+1],s[i+1]=fA(t,e,r),n,i)}}function Ky(t,e){return e>=t.expandoStartIndex}function Yy(t,e,r,n){let o=t.data;if(o[r+1]===null){let i=o[St()],s=Ky(t,r);Jy(i,n)&&e===null&&!s&&(e=!1),e=uA(o,i,e,n),XS(o,i,e,r,s,n)}}function uA(t,e,r,n){let o=L_(t),i=n?e.residualClasses:e.residualStyles;if(o===null)(n?e.classBindings:e.styleBindings)===0&&(r=jl(null,t,e,r,n),r=Fi(r,e.attrs,n),i=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==o)if(r=jl(o,t,e,r,n),i===null){let u=cA(t,e,n);u!==void 0&&Array.isArray(u)&&(u=jl(null,t,e,u[1],n),u=Fi(u,e.attrs,n),lA(t,e,n,u))}else i=dA(t,e,n)}return i!==void 0&&(n?e.residualClasses=i:e.residualStyles=i),r}function cA(t,e,r){let n=r?e.classBindings:e.styleBindings;if(Io(n)!==0)return t[Sr(n)]}function lA(t,e,r,n){let o=r?e.classBindings:e.styleBindings;t[Sr(o)]=n}function dA(t,e,r){let n,o=e.directiveEnd;for(let i=1+e.directiveStylingLast;i0;){let u=t[o],c=Array.isArray(u),l=c?u[1]:u,d=l===null,f=r[o+1];f===Me&&(f=d?Ye:void 0);let h=d?Tl(f,n):l===n?f:void 0;if(c&&!Za(h)&&(h=Tl(u,n)),Za(h)&&(a=h,s))return a;let p=t[o+1];o=s?Sr(p):Io(p)}if(e!==null){let u=i?e.residualClasses:e.residualStyles;u!=null&&(a=Tl(u,n))}return a}function Za(t){return t!==void 0}function gA(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=Be(At(t)))),t}function Jy(t,e){return(t.flags&(e?8:16))!==0}function a5(t,e,r){let n=M(),o=jf(n,t,e,r);Zy(ru,qy,o,!0)}function u5(){return M()[Je][Oe]}var Ld=class{destroy(e){}updateValue(e,r){}swap(e,r){let n=Math.min(e,r),o=Math.max(e,r),i=this.detach(o);if(o-n>1){let s=this.detach(n);this.attach(n,i),this.attach(o,s)}else this.attach(n,i)}move(e,r){this.attach(r,this.detach(e))}};function Vl(t,e,r,n,o){return t===r&&Object.is(e,n)?1:Object.is(o(t,e),o(r,n))?-1:0}function mA(t,e,r){let n,o,i=0,s=t.length-1,a=void 0;if(Array.isArray(e)){let u=e.length-1;for(;i<=s&&i<=u;){let c=t.at(i),l=e[i],d=Vl(i,c,i,l,r);if(d!==0){d<0&&t.updateValue(i,l),i++;continue}let f=t.at(s),h=e[u],p=Vl(s,f,u,h,r);if(p!==0){p<0&&t.updateValue(s,h),s--,u--;continue}let g=r(i,c),m=r(s,f),v=r(i,l);if(Object.is(v,m)){let A=r(u,h);Object.is(A,g)?(t.swap(i,s),t.updateValue(s,h),u--,s--):t.move(s,i),t.updateValue(i,l),i++;continue}if(n??=new Ka,o??=mm(t,i,s,r),kd(t,n,i,v))t.updateValue(i,l),i++,s++;else if(o.has(v))n.set(g,t.detach(i)),s--;else{let A=t.create(i,e[i]);t.attach(i,A),i++,s++}}for(;i<=u;)gm(t,n,r,i,e[i]),i++}else if(e!=null){let u=e[Symbol.iterator](),c=u.next();for(;!c.done&&i<=s;){let l=t.at(i),d=c.value,f=Vl(i,l,i,d,r);if(f!==0)f<0&&t.updateValue(i,d),i++,c=u.next();else{n??=new Ka,o??=mm(t,i,s,r);let h=r(i,d);if(kd(t,n,i,h))t.updateValue(i,d),i++,s++,c=u.next();else if(!o.has(h))t.attach(i,t.create(i,d)),i++,s++,c=u.next();else{let p=r(i,l);n.set(p,t.detach(i)),s--}}}for(;!c.done;)gm(t,n,r,t.length,c.value),c=u.next()}for(;i<=s;)t.destroy(t.detach(s--));n?.forEach(u=>{t.destroy(u)})}function kd(t,e,r,n){return e!==void 0&&e.has(n)?(t.attach(r,e.get(n)),e.delete(n),!0):!1}function gm(t,e,r,n,o){if(kd(t,e,n,r(n,o)))t.updateValue(n,o);else{let i=t.create(n,o);t.attach(n,i)}}function mm(t,e,r,n){let o=new Set;for(let i=e;i<=r;i++)o.add(n(i,t.at(i)));return o}var Ka=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let r=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(r)?(this.kvMap.set(e,this._vMap.get(r)),this._vMap.delete(r)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,r){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(n);)n=o.get(n);o.set(n,r)}else this.kvMap.set(e,r)}forEach(e){for(let[r,n]of this.kvMap)if(e(n,r),this._vMap!==void 0){let o=this._vMap;for(;o.has(n);)n=o.get(n),e(n,r)}}};function c5(t,e){zi("NgControlFlow");let r=M(),n=Nr(),o=r[n]!==Me?r[n]:-1,i=o!==-1?Ya(r,Ee+o):void 0,s=0;if($e(r,n,t)){let a=V(null);try{if(i!==void 0&&Iy(i,s),t!==-1){let u=Ee+t,c=Ya(r,u),l=Bd(r[R],u),d=Do(c,l.tView.ssrId),f=$i(r,l,e,{dehydratedView:d});Hi(c,f,s,yo(l,d))}}finally{V(a)}}else if(i!==void 0){let a=Ey(i,s);a!==void 0&&(a[Oe]=e)}}var jd=class{constructor(e,r,n){this.lContainer=e,this.$implicit=r,this.$index=n}get $count(){return this.lContainer.length-je}};function l5(t){return t}function d5(t,e){return e}var Vd=class{constructor(e,r,n){this.hasEmptyBlock=e,this.trackByFn=r,this.liveCollection=n}};function f5(t,e,r,n,o,i,s,a,u,c,l,d,f){zi("NgControlFlow");let h=M(),p=ce(),g=u!==void 0,m=M(),v=a?s.bind(m[Je][Oe]):s,A=new Vd(g,v);m[Ee+t]=A,qa(h,p,t+1,e,r,n,o,Vn(p.consts,i)),g&&qa(h,p,t+2,u,c,l,d,Vn(p.consts,f))}var Ud=class extends Ld{constructor(e,r,n){super(),this.lContainer=e,this.hostLView=r,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-je}at(e){return this.getLView(e)[Oe].$implicit}attach(e,r){let n=r[go];this.needsIndexUpdate||=e!==this.length,Hi(this.lContainer,r,e,yo(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,vA(this.lContainer,e)}create(e,r){let n=Do(this.lContainer,this.templateTNode.tView.ssrId),o=$i(this.hostLView,this.templateTNode,new jd(this.lContainer,r,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),o}destroy(e){mu(e[R],e),this.operationsCounter?.recordDestroy()}updateValue(e,r){this.getLView(e)[Oe].$implicit=r}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(fu(!0),ty(n,o,V_()));function bA(t,e,r,n,o){let i=e.consts,s=Vn(i,n),a=To(e,t,8,"ng-container",s);s!==null&&Ha(a,s,!0);let u=Vn(i,o);return Tf(e,r,a,u),e.queries!==null&&e.queries.elementStart(e,a),a}function tD(t,e,r){let n=M(),o=ce(),i=t+Ee,s=o.firstCreatePass?bA(i,o,n,e,r):o.data[i];Ar(s,!0);let a=EA(o,n,s,t);return n[i]=a,du()&&vu(o,n,a,s),Un(a,n),uu(s)&&(xf(o,n,s),If(o,s,n)),r!=null&&_f(n,s),tD}function nD(){let t=Pe(),e=ce();return uf()?cf():(t=t.parent,Ar(t,!1)),e.firstCreatePass&&(hu(e,t),of(t)&&e.queries.elementEnd(t)),nD}function CA(t,e,r){return tD(t,e,r),nD(),CA}var EA=(t,e,r,n)=>(fu(!0),GM(e[ae],""));function p5(){return M()}function IA(t,e,r){let n=M(),o=Nr();if($e(n,o,e)){let i=ce(),s=Ui();wu(i,s,n,t,e,n[ae],r,!0)}return IA}var vr=void 0;function xA(t){let e=t,r=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return r===1&&n===0?1:5}var _A=["en",[["a","p"],["AM","PM"],vr],[["AM","PM"],vr,vr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],vr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],vr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",vr,"{1} 'at' {0}",vr],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",xA],_i={};function rD(t,e,r){typeof e!="string"&&(r=e,e=t[ue.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),_i[e]=t,r&&(_i[e][ue.ExtraData]=r)}function ot(t){let e=MA(t),r=vm(e);if(r)return r;let n=e.split("-")[0];if(r=vm(n),r)return r;if(n==="en")return _A;throw new C(701,!1)}function vm(t){return t in _i||(_i[t]=It.ng&&It.ng.common&&It.ng.common.locales&&It.ng.common.locales[t]),_i[t]}var ue=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(ue||{});function MA(t){return t.toLowerCase().replace(/_/g,"-")}var Qa="en-US";var TA=Qa;function SA(t){typeof t=="string"&&(TA=t.toLowerCase().replace(/_/g,"-"))}var AA=(t,e,r)=>{};function ht(t,e,r,n){let o=M(),i=ce(),s=Pe();return oD(i,o,o[ae],s,t,e,n),ht}function NA(t,e,r,n){let o=t.cleanup;if(o!=null)for(let i=0;iu?a[u]:null}typeof s=="string"&&(i+=2)}return null}function oD(t,e,r,n,o,i,s){let a=uu(n),c=t.firstCreatePass&&by(t),l=e[Oe],d=wy(e),f=!0;if(n.type&3||s){let g=ft(n,e),m=s?s(g):g,v=d.length,A=s?U=>s(Ht(U[n.index])):n.index,z=null;if(!s&&a&&(z=NA(t,e,o,n.index)),z!==null){let U=z.__ngLastListenerFn__||z;U.__ngNextListenerFn__=i,z.__ngLastListenerFn__=i,f=!1}else{i=Dm(n,e,l,i),AA(g,o,i);let U=r.listen(m,o,i);d.push(i,U),c&&c.push(o,A,v,v+1)}}else i=Dm(n,e,l,i);let h=n.outputs,p;if(f&&h!==null&&(p=h[o])){let g=p.length;if(g)for(let m=0;m-1?$n(t.index,e):e;Nf(s,5);let a=ym(e,r,n,i),u=o.__ngNextListenerFn__;for(;u;)a=ym(e,r,u,i)&&a,u=u.__ngNextListenerFn__;return a}}function g5(t=1){return j_(t)}function OA(t,e){let r=null,n=Y0(t);for(let o=0;o=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=n}function D5(t){let e=N_();return cu(e,Ee+t)}function w5(t,e=""){let r=M(),n=ce(),o=t+Ee,i=n.firstCreatePass?To(n,o,1,e,null):n.data[o],s=LA(n,r,i,e,t);r[o]=s,du()&&vu(n,r,s,i),Ar(i,!1)}var LA=(t,e,r,n,o)=>(fu(!0),HM(e[ae],n));function kA(t){return cD("",t,""),kA}function cD(t,e,r){let n=M(),o=jf(n,t,e,r);return o!==Me&&Cu(n,St(),o),cD}function jA(t,e,r,n,o){let i=M(),s=qS(i,t,e,r,n,o);return s!==Me&&Cu(i,St(),s),jA}function VA(t,e,r,n,o,i,s){let a=M(),u=ZS(a,t,e,r,n,o,i,s);return u!==Me&&Cu(a,St(),u),VA}function UA(t,e,r,n,o,i,s,a,u,c,l){let d=M(),f=KS(d,t,e,r,n,o,i,s,a,u,c,l);return f!==Me&&Cu(d,St(),f),UA}function BA(t,e,r){By(e)&&(e=e());let n=M(),o=Nr();if($e(n,o,e)){let i=ce(),s=Ui();wu(i,s,n,t,e,n[ae],r,!1)}return BA}function b5(t,e){let r=By(t);return r&&t.set(e),r}function $A(t,e){let r=M(),n=ce(),o=Pe();return oD(n,r,r[ae],o,t,e),$A}function HA(t,e,r){let n=ce();if(n.firstCreatePass){let o=jn(t);$d(r,n.data,n.blueprint,o,!0),$d(e,n.data,n.blueprint,o,!1)}}function $d(t,e,r,n,o){if(t=Ne(t),Array.isArray(t))for(let i=0;i>20;if(po(t)||!t.multi){let h=new xr(c,o,w),p=Bl(u,e,o?l:l+f,d);p===-1?(nd(Va(a,s),i,u),Ul(i,t,e.length),e.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),r.push(h),s.push(h)):(r[p]=h,s[p]=h)}else{let h=Bl(u,e,l+f,d),p=Bl(u,e,l,l+f),g=h>=0&&r[h],m=p>=0&&r[p];if(o&&!m||!o&&!g){nd(Va(a,s),i,u);let v=WA(o?GA:zA,r.length,o,n,c);!o&&m&&(r[p].providerFactory=v),Ul(i,t,e.length,0),e.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),r.push(v),s.push(v)}else{let v=lD(r[o?p:h],c,!o&&n);Ul(i,t,h>-1?h:p,v)}!o&&n&&m&&r[p].componentProviders++}}}function Ul(t,e,r,n){let o=po(e),i=l_(e);if(o||i){let u=(i?Ne(e.useClass):e).prototype.ngOnDestroy;if(u){let c=t.destroyHooks||(t.destroyHooks=[]);if(!o&&e.multi){let l=c.indexOf(r);l===-1?c.push(r,[n,u]):c[l+1].push(n,u)}else c.push(r,u)}}}function lD(t,e,r){return r&&t.componentProviders++,t.multi.push(e)-1}function Bl(t,e,r,n){for(let o=r;o{r.providersResolver=(n,o)=>HA(n,o?o(t):t,e)}}var qA=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let o=Wm(!1,n.type),i=o.length>0?Ff([o],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=b({token:e,providedIn:"environment",factory:()=>new e(x(Qe))});let t=e;return t})();function dD(t){zi("NgStandalone"),t.getStandaloneInjector=e=>e.get(qA).getOrCreateStandaloneInjector(t)}function C5(t,e,r){let n=Gt()+t,o=M();return o[n]===Me?Or(o,n,r?e.call(r):e()):kf(o,n)}function E5(t,e,r,n){return fD(M(),Gt(),t,e,r,n)}function I5(t,e,r,n,o){return hD(M(),Gt(),t,e,r,n,o)}function x5(t,e,r,n,o,i){return ZA(M(),Gt(),t,e,r,n,o,i)}function _5(t,e,r,n,o,i,s){return pD(M(),Gt(),t,e,r,n,o,i,s)}function M5(t,e,r,n,o,i,s,a){let u=Gt()+t,c=M(),l=Iu(c,u,r,n,o,i);return $e(c,u+4,s)||l?Or(c,u+5,a?e.call(a,r,n,o,i,s):e(r,n,o,i,s)):kf(c,u+5)}function T5(t,e,r,n,o,i,s,a,u){let c=Gt()+t,l=M(),d=Iu(l,c,r,n,o,i);return Eo(l,c+4,s,a)||d?Or(l,c+6,u?e.call(u,r,n,o,i,s,a):e(r,n,o,i,s,a)):kf(l,c+6)}function _u(t,e){let r=t[e];return r===Me?void 0:r}function fD(t,e,r,n,o,i){let s=e+r;return $e(t,s,o)?Or(t,s+1,i?n.call(i,o):n(o)):_u(t,s+1)}function hD(t,e,r,n,o,i,s){let a=e+r;return Eo(t,a,o,i)?Or(t,a+2,s?n.call(s,o,i):n(o,i)):_u(t,a+2)}function ZA(t,e,r,n,o,i,s,a){let u=e+r;return zy(t,u,o,i,s)?Or(t,u+3,a?n.call(a,o,i,s):n(o,i,s)):_u(t,u+3)}function pD(t,e,r,n,o,i,s,a,u){let c=e+r;return Iu(t,c,o,i,s,a)?Or(t,c+4,u?n.call(u,o,i,s,a):n(o,i,s,a)):_u(t,c+4)}function S5(t,e){let r=ce(),n,o=t+Ee;r.firstCreatePass?(n=KA(e,r.pipeRegistry),r.data[o]=n,n.onDestroy&&(r.destroyHooks??=[]).push(o,n.onDestroy)):n=r.data[o];let i=n.factory||(n.factory=wr(n.type,!0)),s,a=Ze(w);try{let u=ja(!1),c=i();return ja(u),FA(r,M(),o,c),c}finally{Ze(a)}}function KA(t,e){if(e)for(let r=e.length-1;r>=0;r--){let n=e[r];if(t===n.name)return n}}function A5(t,e,r){let n=t+Ee,o=M(),i=cu(o,n);return Uf(o,n)?fD(o,Gt(),e,i.transform,r,i):i.transform(r)}function N5(t,e,r,n){let o=t+Ee,i=M(),s=cu(i,o);return Uf(i,o)?hD(i,Gt(),e,s.transform,r,n,s):s.transform(r,n)}function O5(t,e,r,n,o,i){let s=t+Ee,a=M(),u=cu(a,s);return Uf(a,s)?pD(a,Gt(),e,u.transform,r,n,o,i,u):u.transform(r,n,o,i)}function Uf(t,e){return t[R].data[e].pure}function R5(t,e){return Eu(t,e)}var Mu=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"platform"});let t=e;return t})();var gD=new E("");function Gn(t){return!!t&&typeof t.then=="function"}function Bf(t){return!!t&&typeof t.subscribe=="function"}var mD=new E(""),vD=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,o)=>{this.resolve=n,this.reject=o}),this.appInits=y(mD,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=i();if(Gn(s))n.push(s);else if(Bf(s)){let a=new Promise((u,c)=>{s.subscribe({complete:u,error:c})});n.push(a)}}let o=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{o()}).catch(i=>{this.reject(i)}),n.length===0&&o(),this.initialized=!0}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Tu=new E("");function YA(){Xp(()=>{throw new C(600,!1)})}function QA(t){return t.isBoundToModule}var JA=10;function XA(t,e,r){try{let n=r();return Gn(n)?n.catch(o=>{throw e.runOutsideAngular(()=>t.handleError(o)),o}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}var Pr=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=y(Ov),this.afterRenderEffectManager=y(Fy),this.zonelessEnabled=y(Ny),this.externalTestViews=new Set,this.beforeRender=new se,this.afterTick=new se,this.componentTypes=[],this.components=[],this.isStable=y(Hn).hasPendingTasks.pipe(N(n=>!n)),this._injector=y(Qe)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,o){let i=n instanceof $a;if(!this._injector.get(vD).done){let h=!i&&$m(n),p=!1;throw new C(405,p)}let a;i?a=n:a=this._injector.get(wo).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let u=QA(a)?void 0:this._injector.get(Bn),c=o||a.selector,l=a.create(rn.NULL,[],c,u),d=l.location.nativeElement,f=l.injector.get(gD,null);return f?.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),$l(this.components,l),f?.unregisterApplication(d)}),this._loadComponent(l),l}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new C(101,!1);let o=V(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,V(o),this.afterTick.next()}}detectChangesInAttachedViews(n){let o=null;this._injector.destroyed||(o=this._injector.get(bo,null,{optional:!0}));let i=0,s=this.afterRenderEffectManager;for(;iNi(u))&&(s.execute(),!this.allViews.some(({_lView:u})=>Ni(u))))break}}attachView(n){let o=n;this._views.push(o),o.attachToAppRef(this)}detachView(n){let o=n;$l(this._views,o),o.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let o=this._injector.get(Tu,[]);[...this._bootstrapListeners,...o].forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>$l(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new C(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function $l(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function eN(t,e,r,n){if(!r&&!Ni(t))return;My(t,e,r&&!n?0:1)}var zd=class{constructor(e,r){this.ngModuleFactory=e,this.componentFactories=r}},$f=(()=>{let e=class e{compileModuleSync(n){return new Od(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let o=this.compileModuleSync(n),i=Hm(n),s=ey(i.declarations).reduce((a,u)=>{let c=kn(u);return c&&a.push(new Co(c)),a},[]);return new zd(o,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var tN=(()=>{let e=class e{constructor(){this.zone=y(pe),this.changeDetectionScheduler=y(Ri),this.applicationRef=y(Pr)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function nN({ngZoneFactory:t,ignoreChangesOutsideZone:e}){return t??=()=>new pe(oN()),[{provide:pe,useFactory:t},{provide:fo,multi:!0,useFactory:()=>{let r=y(tN,{optional:!0});return()=>r.initialize()}},{provide:fo,multi:!0,useFactory:()=>{let r=y(iN);return()=>{r.initialize()}}},{provide:Ov,useFactory:rN},e===!0?{provide:Oy,useValue:!0}:[]]}function rN(){let t=y(pe),e=y(on);return r=>t.runOutsideAngular(()=>e.handleError(r))}function oN(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var iN=(()=>{let e=class e{constructor(){this.subscription=new ie,this.initialized=!1,this.zone=y(pe),this.pendingTasks=y(Hn)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{pe.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{pe.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var sN=(()=>{let e=class e{constructor(){this.appRef=y(Pr),this.taskService=y(Hn),this.ngZone=y(pe),this.zonelessEnabled=y(Ny),this.disableScheduling=y(Oy,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new ie,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Ed||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 3:case 2:case 0:case 4:case 5:case 1:{this.shouldRefreshViews=!0;break}case 8:case 7:case 6:case 9:default:}if(!this.shouldScheduleTick())return;let o=this.useMicrotaskScheduler?sm:Ry;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=o(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=o(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&pe.isInAngularZone())}tick(n){if(this.runningTick||this.appRef.destroyed)return;let o=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(n)},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(o),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,sm(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(o)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function aN(){return typeof $localize<"u"&&$localize.locale||Qa}var Gi=new E("",{providedIn:"root",factory:()=>y(Gi,j.Optional|j.SkipSelf)||aN()});var yD=new E("");var Ta=null;function uN(t=[],e){return rn.create({name:e,providers:[{provide:ou,useValue:"platform"},{provide:yD,useValue:new Set([()=>Ta=null])},...t]})}function cN(t=[]){if(Ta)return Ta;let e=uN(t);return Ta=e,YA(),lN(e),e}function lN(t){t.get(vf,null)?.forEach(r=>r())}var Nt=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=dN;let t=e;return t})();function dN(t){return fN(Pe(),M(),(t&16)===16)}function fN(t,e,r){if(au(t)&&!r){let n=$n(t.index,e);return new Mr(n,n)}else if(t.type&47){let n=e[Je];return new Mr(n,e)}return null}var Gd=class{constructor(){}supports(e){return Hy(e)}create(e){return new Wd(e)}},hN=(t,e)=>e,Wd=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||hN}forEachItem(e){let r;for(r=this._itHead;r!==null;r=r._next)e(r)}forEachOperation(e){let r=this._itHead,n=this._removalsHead,o=0,i=null;for(;r||n;){let s=!n||r&&r.currentIndex{s=this._trackByFn(o,a),r===null||!Object.is(r.trackById,s)?(r=this._mismatch(r,a,s,o),n=!0):(n&&(r=this._verifyReinsertion(r,a,s,o)),Object.is(r.item,a)||this._addIdentityChange(r,a)),r=r._next,o++}),this.length=o;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,r,n,o){let i;return e===null?i=this._itTail:(i=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._reinsertAfter(e,i,o)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,o),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._moveAfter(e,i,o)):e=this._addAfter(new qd(r,n),i,o)),e}_verifyReinsertion(e,r,n,o){let i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return i!==null?e=this._reinsertAfter(i,e._prev,o):e.currentIndex!=o&&(e.currentIndex=o,this._addToMoves(e,o)),e}_truncate(e){for(;e!==null;){let r=e._next;this._addToRemovals(this._unlink(e)),e=r}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,r,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let o=e._prevRemoved,i=e._nextRemoved;return o===null?this._removalsHead=i:o._nextRemoved=i,i===null?this._removalsTail=o:i._prevRemoved=o,this._insertAfter(e,r,n),this._addToMoves(e,n),e}_moveAfter(e,r,n){return this._unlink(e),this._insertAfter(e,r,n),this._addToMoves(e,n),e}_addAfter(e,r,n){return this._insertAfter(e,r,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,r,n){let o=r===null?this._itHead:r._next;return e._next=o,e._prev=r,o===null?this._itTail=e:o._prev=e,r===null?this._itHead=e:r._next=e,this._linkedRecords===null&&(this._linkedRecords=new Ja),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let r=e._prev,n=e._next;return r===null?this._itHead=n:r._next=n,n===null?this._itTail=r:n._prev=r,e}_addToMoves(e,r){return e.previousIndex===r||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Ja),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,r){return e.item=r,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},qd=class{constructor(e,r){this.item=e,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},Zd=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,r){let n;for(n=this._head;n!==null;n=n._nextDup)if((r===null||r<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let r=e._prevDup,n=e._nextDup;return r===null?this._head=n:r._nextDup=n,n===null?this._tail=r:n._prevDup=r,this._head===null}},Ja=class{constructor(){this.map=new Map}put(e){let r=e.trackById,n=this.map.get(r);n||(n=new Zd,this.map.set(r,n)),n.add(e)}get(e,r){let n=e,o=this.map.get(n);return o?o.get(e,r):null}remove(e){let r=e.trackById;return this.map.get(r).remove(e)&&this.map.delete(r),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function wm(t,e,r){let n=t.previousIndex;if(n===null)return n;let o=0;return r&&n{if(r&&r.key===o)this._maybeAddToChanges(r,n),this._appendAfter=r,r=r._next;else{let i=this._getOrCreateRecordForKey(o,n);r=this._insertBeforeOrAppend(r,i)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let n=r;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,r){if(e){let n=e._prev;return r._next=e,r._prev=n,e._prev=r,n&&(n._next=r),e===this._mapHead&&(this._mapHead=r),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(e,r){if(this._records.has(e)){let o=this._records.get(e);this._maybeAddToChanges(o,r);let i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}let n=new Qd(e);return this._records.set(e,n),n.currentValue=r,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,r){Object.is(r,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=r,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,r){e instanceof Map?e.forEach(r):Object.keys(e).forEach(n=>r(e[n],n))}},Qd=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function bm(){return new Hf([new Gd])}var Hf=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,o){if(o!=null){let i=o.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:o=>e.create(n,o||bm()),deps:[[e,new Xd,new nu]]}}find(n){let o=this.factories.find(i=>i.supports(n));if(o!=null)return o;throw new C(901,!1)}};e.\u0275prov=b({token:e,providedIn:"root",factory:bm});let t=e;return t})();function Cm(){return new zf([new Kd])}var zf=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,o){if(o){let i=o.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:o=>e.create(n,o||Cm()),deps:[[e,new Xd,new nu]]}}find(n){let o=this.factories.find(i=>i.supports(n));if(o)return o;throw new C(901,!1)}};e.\u0275prov=b({token:e,providedIn:"root",factory:Cm});let t=e;return t})();function DD(t){try{let{rootComponent:e,appProviders:r,platformProviders:n}=t,o=cN(n),i=[nN({}),{provide:Ri,useExisting:sN},...r||[]],a=new Wa({providers:i,parent:o,debugName:"",runEnvironmentInitializers:!1}).injector,u=a.get(pe);return u.run(()=>{a.resolveInjectorInitializers();let c=a.get(on,null),l;u.runOutsideAngular(()=>{l=u.onError.subscribe({next:h=>{c.handleError(h)}})});let d=()=>a.destroy(),f=o.get(yD);return f.add(d),a.onDestroy(()=>{l.unsubscribe(),f.delete(d)}),XA(c,u,()=>{let h=a.get(vD);return h.runInitializers(),h.donePromise.then(()=>{let p=a.get(Gi,Qa);SA(p||Qa);let g=a.get(Pr);return e!==void 0&&g.bootstrap(e),g})})})}catch(e){return Promise.reject(e)}}function Wn(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function pN(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function Gf(t){let e=V(null);try{return t()}finally{V(e)}}function P5(t,e){let r=kn(t),n=e.elementInjector||iu();return new Co(r).create(n,e.projectableNodes,e.hostElement,e.environmentInjector)}var MD=null;function mn(){return MD}function TD(t){MD??=t}var ku=class{};var Ue=new E(""),sh=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(gN),providedIn:"platform"});let t=e;return t})();var gN=(()=>{let e=class e extends sh{constructor(){super(),this._doc=y(Ue),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return mn().getBaseHref(this._doc)}onPopState(n){let o=mn().getGlobalEventTarget(this._doc,"window");return o.addEventListener("popstate",n,!1),()=>o.removeEventListener("popstate",n)}onHashChange(n){let o=mn().getGlobalEventTarget(this._doc,"window");return o.addEventListener("hashchange",n,!1),()=>o.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,o,i){this._history.pushState(n,o,i)}replaceState(n,o,i){this._history.replaceState(n,o,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>new e,providedIn:"platform"});let t=e;return t})();function ah(t,e){if(t.length==0)return e;if(e.length==0)return t;let r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,r==2?t+e.substring(1):r==1?t+e:t+"/"+e}function wD(t){let e=t.match(/#|\?|$/),r=e&&e.index||t.length,n=r-(t[r-1]==="/"?1:0);return t.slice(0,n)+t.slice(r)}function hn(t){return t&&t[0]!=="?"?"?"+t:t}var qn=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(AD),providedIn:"root"});let t=e;return t})(),SD=new E(""),AD=(()=>{let e=class e extends qn{constructor(n,o){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=o??this._platformLocation.getBaseHrefFromDOM()??y(Ue).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return ah(this._baseHref,n)}path(n=!1){let o=this._platformLocation.pathname+hn(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${o}${i}`:o}pushState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));this._platformLocation.pushState(n,o,a)}replaceState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));this._platformLocation.replaceState(n,o,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(o){return new(o||e)(x(sh),x(SD,8))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ND=(()=>{let e=class e extends qn{constructor(n,o){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],o!=null&&(this._baseHref=o)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let o=this._platformLocation.hash??"#";return o.length>0?o.substring(1):o}prepareExternalUrl(n){let o=ah(this._baseHref,n);return o.length>0?"#"+o:o}pushState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.pushState(n,o,a)}replaceState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(n,o,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(o){return new(o||e)(x(sh),x(SD,8))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),qi=(()=>{let e=class e{constructor(n){this._subject=new G,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let o=this._locationStrategy.getBaseHref();this._basePath=yN(wD(bD(o))),this._locationStrategy.onPopState(i=>{this._subject.emit({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,o=""){return this.path()==this.normalize(n+hn(o))}normalize(n){return e.stripTrailingSlash(vN(this._basePath,bD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,o="",i=null){this._locationStrategy.pushState(i,"",n,o),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(o)),i)}replaceState(n,o="",i=null){this._locationStrategy.replaceState(i,"",n,o),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(o)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(o=>{this._notifyUrlChangeListeners(o.url,o.state)}),()=>{let o=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(o,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",o){this._urlChangeListeners.forEach(i=>i(n,o))}subscribe(n,o,i){return this._subject.subscribe({next:n,error:o,complete:i})}};e.normalizeQueryParams=hn,e.joinWithSlash=ah,e.stripTrailingSlash=wD,e.\u0275fac=function(o){return new(o||e)(x(qn))},e.\u0275prov=b({token:e,factory:()=>mN(),providedIn:"root"});let t=e;return t})();function mN(){return new qi(x(qn))}function vN(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function bD(t){return t.replace(/\/index.html$/,"")}function yN(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}var OD=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}(OD||{});var ze=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(ze||{}),X=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(X||{}),it=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(it||{}),st={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function DN(t){return ot(t)[ue.LocaleId]}function wN(t,e,r){let n=ot(t),o=[n[ue.DayPeriodsFormat],n[ue.DayPeriodsStandalone]],i=pt(o,e);return pt(i,r)}function bN(t,e,r){let n=ot(t),o=[n[ue.DaysFormat],n[ue.DaysStandalone]],i=pt(o,e);return pt(i,r)}function CN(t,e,r){let n=ot(t),o=[n[ue.MonthsFormat],n[ue.MonthsStandalone]],i=pt(o,e);return pt(i,r)}function EN(t,e){let n=ot(t)[ue.Eras];return pt(n,e)}function Su(t,e){let r=ot(t);return pt(r[ue.DateFormat],e)}function Au(t,e){let r=ot(t);return pt(r[ue.TimeFormat],e)}function Nu(t,e){let n=ot(t)[ue.DateTimeFormat];return pt(n,e)}function pn(t,e){let r=ot(t),n=r[ue.NumberSymbols][e];if(typeof n>"u"){if(e===st.CurrencyDecimal)return r[ue.NumberSymbols][st.Decimal];if(e===st.CurrencyGroup)return r[ue.NumberSymbols][st.Group]}return n}function IN(t,e){return ot(t)[ue.NumberFormats][e]}function RD(t){if(!t[ue.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[ue.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function xN(t){let e=ot(t);return RD(e),(e[ue.ExtraData][2]||[]).map(n=>typeof n=="string"?qf(n):[qf(n[0]),qf(n[1])])}function _N(t,e,r){let n=ot(t);RD(n);let o=[n[ue.ExtraData][0],n[ue.ExtraData][1]],i=pt(o,e)||[];return pt(i,r)||[]}function pt(t,e){for(let r=e;r>-1;r--)if(typeof t[r]<"u")return t[r];throw new Error("Locale data API: locale data undefined")}function qf(t){let[e,r]=t.split(":");return{hours:+e,minutes:+r}}var MN=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Ou={},TN=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,gn=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}(gn||{}),q=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}(q||{}),W=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}(W||{});function SN(t,e,r,n){let o=jN(t);e=fn(r,e)||e;let s=[],a;for(;e;)if(a=TN.exec(e),a){s=s.concat(a.slice(1));let l=s.pop();if(!l)break;e=l}else{s.push(e);break}let u=o.getTimezoneOffset();n&&(u=FD(n,u),o=kN(o,n,!0));let c="";return s.forEach(l=>{let d=FN(l);c+=d?d(o,r,u):l==="''"?"'":l.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function ju(t,e,r){let n=new Date(0);return n.setFullYear(t,e,r),n.setHours(0,0,0),n}function fn(t,e){let r=DN(t);if(Ou[r]??={},Ou[r][e])return Ou[r][e];let n="";switch(e){case"shortDate":n=Su(t,it.Short);break;case"mediumDate":n=Su(t,it.Medium);break;case"longDate":n=Su(t,it.Long);break;case"fullDate":n=Su(t,it.Full);break;case"shortTime":n=Au(t,it.Short);break;case"mediumTime":n=Au(t,it.Medium);break;case"longTime":n=Au(t,it.Long);break;case"fullTime":n=Au(t,it.Full);break;case"short":let o=fn(t,"shortTime"),i=fn(t,"shortDate");n=Ru(Nu(t,it.Short),[o,i]);break;case"medium":let s=fn(t,"mediumTime"),a=fn(t,"mediumDate");n=Ru(Nu(t,it.Medium),[s,a]);break;case"long":let u=fn(t,"longTime"),c=fn(t,"longDate");n=Ru(Nu(t,it.Long),[u,c]);break;case"full":let l=fn(t,"fullTime"),d=fn(t,"fullDate");n=Ru(Nu(t,it.Full),[l,d]);break}return n&&(Ou[r][e]=n),n}function Ru(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(r,n){return e!=null&&n in e?e[n]:r})),t}function Ot(t,e,r="-",n,o){let i="";(t<0||o&&t<=0)&&(o?t=-t+1:(t=-t,i=r));let s=String(t);for(;s.length0||a>-r)&&(a+=r),t===q.Hours)a===0&&r===-12&&(a=12);else if(t===q.FractionalSeconds)return AN(a,e);let u=pn(s,st.MinusSign);return Ot(a,e,u,n,o)}}function NN(t,e){switch(t){case q.FullYear:return e.getFullYear();case q.Month:return e.getMonth();case q.Date:return e.getDate();case q.Hours:return e.getHours();case q.Minutes:return e.getMinutes();case q.Seconds:return e.getSeconds();case q.FractionalSeconds:return e.getMilliseconds();case q.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function ne(t,e,r=ze.Format,n=!1){return function(o,i){return ON(o,i,t,e,r,n)}}function ON(t,e,r,n,o,i){switch(r){case W.Months:return CN(e,o,n)[t.getMonth()];case W.Days:return bN(e,o,n)[t.getDay()];case W.DayPeriods:let s=t.getHours(),a=t.getMinutes();if(i){let c=xN(e),l=_N(e,o,n),d=c.findIndex(f=>{if(Array.isArray(f)){let[h,p]=f,g=s>=h.hours&&a>=h.minutes,m=s0?Math.floor(o/60):Math.ceil(o/60);switch(t){case gn.Short:return(o>=0?"+":"")+Ot(s,2,i)+Ot(Math.abs(o%60),2,i);case gn.ShortGMT:return"GMT"+(o>=0?"+":"")+Ot(s,1,i);case gn.Long:return"GMT"+(o>=0?"+":"")+Ot(s,2,i)+":"+Ot(Math.abs(o%60),2,i);case gn.Extended:return n===0?"Z":(o>=0?"+":"")+Ot(s,2,i)+":"+Ot(Math.abs(o%60),2,i);default:throw new Error(`Unknown zone width "${t}"`)}}}var RN=0,Lu=4;function PN(t){let e=ju(t,RN,1).getDay();return ju(t,0,1+(e<=Lu?Lu:Lu+7)-e)}function PD(t){let e=t.getDay(),r=e===0?-3:Lu-e;return ju(t.getFullYear(),t.getMonth(),t.getDate()+r)}function Zf(t,e=!1){return function(r,n){let o;if(e){let i=new Date(r.getFullYear(),r.getMonth(),1).getDay()-1,s=r.getDate();o=1+Math.floor((s+i)/7)}else{let i=PD(r),s=PN(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return Ot(o,t,pn(n,st.MinusSign))}}function Fu(t,e=!1){return function(r,n){let i=PD(r).getFullYear();return Ot(i,t,pn(n,st.MinusSign),e)}}var Kf={};function FN(t){if(Kf[t])return Kf[t];let e;switch(t){case"G":case"GG":case"GGG":e=ne(W.Eras,X.Abbreviated);break;case"GGGG":e=ne(W.Eras,X.Wide);break;case"GGGGG":e=ne(W.Eras,X.Narrow);break;case"y":e=ve(q.FullYear,1,0,!1,!0);break;case"yy":e=ve(q.FullYear,2,0,!0,!0);break;case"yyy":e=ve(q.FullYear,3,0,!1,!0);break;case"yyyy":e=ve(q.FullYear,4,0,!1,!0);break;case"Y":e=Fu(1);break;case"YY":e=Fu(2,!0);break;case"YYY":e=Fu(3);break;case"YYYY":e=Fu(4);break;case"M":case"L":e=ve(q.Month,1,1);break;case"MM":case"LL":e=ve(q.Month,2,1);break;case"MMM":e=ne(W.Months,X.Abbreviated);break;case"MMMM":e=ne(W.Months,X.Wide);break;case"MMMMM":e=ne(W.Months,X.Narrow);break;case"LLL":e=ne(W.Months,X.Abbreviated,ze.Standalone);break;case"LLLL":e=ne(W.Months,X.Wide,ze.Standalone);break;case"LLLLL":e=ne(W.Months,X.Narrow,ze.Standalone);break;case"w":e=Zf(1);break;case"ww":e=Zf(2);break;case"W":e=Zf(1,!0);break;case"d":e=ve(q.Date,1);break;case"dd":e=ve(q.Date,2);break;case"c":case"cc":e=ve(q.Day,1);break;case"ccc":e=ne(W.Days,X.Abbreviated,ze.Standalone);break;case"cccc":e=ne(W.Days,X.Wide,ze.Standalone);break;case"ccccc":e=ne(W.Days,X.Narrow,ze.Standalone);break;case"cccccc":e=ne(W.Days,X.Short,ze.Standalone);break;case"E":case"EE":case"EEE":e=ne(W.Days,X.Abbreviated);break;case"EEEE":e=ne(W.Days,X.Wide);break;case"EEEEE":e=ne(W.Days,X.Narrow);break;case"EEEEEE":e=ne(W.Days,X.Short);break;case"a":case"aa":case"aaa":e=ne(W.DayPeriods,X.Abbreviated);break;case"aaaa":e=ne(W.DayPeriods,X.Wide);break;case"aaaaa":e=ne(W.DayPeriods,X.Narrow);break;case"b":case"bb":case"bbb":e=ne(W.DayPeriods,X.Abbreviated,ze.Standalone,!0);break;case"bbbb":e=ne(W.DayPeriods,X.Wide,ze.Standalone,!0);break;case"bbbbb":e=ne(W.DayPeriods,X.Narrow,ze.Standalone,!0);break;case"B":case"BB":case"BBB":e=ne(W.DayPeriods,X.Abbreviated,ze.Format,!0);break;case"BBBB":e=ne(W.DayPeriods,X.Wide,ze.Format,!0);break;case"BBBBB":e=ne(W.DayPeriods,X.Narrow,ze.Format,!0);break;case"h":e=ve(q.Hours,1,-12);break;case"hh":e=ve(q.Hours,2,-12);break;case"H":e=ve(q.Hours,1);break;case"HH":e=ve(q.Hours,2);break;case"m":e=ve(q.Minutes,1);break;case"mm":e=ve(q.Minutes,2);break;case"s":e=ve(q.Seconds,1);break;case"ss":e=ve(q.Seconds,2);break;case"S":e=ve(q.FractionalSeconds,1);break;case"SS":e=ve(q.FractionalSeconds,2);break;case"SSS":e=ve(q.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Pu(gn.Short);break;case"ZZZZZ":e=Pu(gn.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Pu(gn.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Pu(gn.Long);break;default:return null}return Kf[t]=e,e}function FD(t,e){t=t.replace(/:/g,"");let r=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(r)?e:r}function LN(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}function kN(t,e,r){let n=r?-1:1,o=t.getTimezoneOffset(),i=FD(e,o);return LN(t,n*(i-o))}function jN(t){if(CD(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[o,i=1,s=1]=t.split("-").map(a=>+a);return ju(o,i-1,s)}let r=parseFloat(t);if(!isNaN(t-r))return new Date(r);let n;if(n=t.match(MN))return VN(n)}let e=new Date(t);if(!CD(e))throw new Error(`Unable to convert "${t}" into a date`);return e}function VN(t){let e=new Date(0),r=0,n=0,o=t[8]?e.setUTCFullYear:e.setFullYear,i=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=Number(t[9]+t[10]),n=Number(t[9]+t[11])),o.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-r,a=Number(t[5]||0)-n,u=Number(t[6]||0),c=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return i.call(e,s,a,u,c),e}function CD(t){return t instanceof Date&&!isNaN(t.valueOf())}var UN=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ED=22,Vu=".",Wi="0",BN=";",$N=",",Yf="#";function HN(t,e,r,n,o,i,s=!1){let a="",u=!1;if(!isFinite(t))a=pn(r,st.Infinity);else{let c=qN(t);s&&(c=WN(c));let l=e.minInt,d=e.minFrac,f=e.maxFrac;if(i){let A=i.match(UN);if(A===null)throw new Error(`${i} is not a valid digit info`);let z=A[1],U=A[3],me=A[5];z!=null&&(l=Qf(z)),U!=null&&(d=Qf(U)),me!=null?f=Qf(me):U!=null&&d>f&&(f=d)}ZN(c,d,f);let h=c.digits,p=c.integerLen,g=c.exponent,m=[];for(u=h.every(A=>!A);p0?m=h.splice(p,h.length):(m=h,h=[0]);let v=[];for(h.length>=e.lgSize&&v.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)v.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&v.unshift(h.join("")),a=v.join(pn(r,n)),m.length&&(a+=pn(r,o)+m.join("")),g&&(a+=pn(r,st.Exponential)+"+"+g)}return t<0&&!u?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function zN(t,e,r){let n=IN(e,OD.Decimal),o=GN(n,pn(e,st.MinusSign));return HN(t,o,e,st.Group,st.Decimal,r)}function GN(t,e="-"){let r={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(BN),o=n[0],i=n[1],s=o.indexOf(Vu)!==-1?o.split(Vu):[o.substring(0,o.lastIndexOf(Wi)+1),o.substring(o.lastIndexOf(Wi)+1)],a=s[0],u=s[1]||"";r.posPre=a.substring(0,a.indexOf(Yf));for(let l=0;l-1&&(e=e.replace(Vu,"")),(i=e.search(/e/i))>0?(o<0&&(o=i),o+=+e.slice(i+1),e=e.substring(0,i)):o<0&&(o=e.length),i=0;e.charAt(i)===Wi;i++);if(i===(a=e.length))n=[0],o=1;else{for(a--;e.charAt(a)===Wi;)a--;for(o-=i,n=[],s=0;i<=a;i++,s++)n[s]=Number(e.charAt(i))}return o>ED&&(n=n.splice(0,ED-1),r=o-1,o=1),{digits:n,exponent:r,integerLen:o}}function ZN(t,e,r){if(e>r)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${r}).`);let n=t.digits,o=n.length-t.integerLen,i=Math.min(Math.max(e,o),r),s=i+t.integerLen,a=n[s];if(s>0){n.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[s-1]++;for(;o=c?p.pop():u=!1),f>=10?1:0},0);l&&(n.unshift(l),t.integerLen++)}function Qf(t){let e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}function X5(t,e,r){return rD(t,e,r)}function Uu(t,e){e=encodeURIComponent(e);for(let r of t.split(";")){let n=r.indexOf("="),[o,i]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(o.trim()===e)return decodeURIComponent(i)}return null}var Jf=/\s+/,ID=[],e9=(()=>{let e=class e{constructor(n,o){this._ngEl=n,this._renderer=o,this.initialClasses=ID,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(Jf):ID}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Jf):n}ngDoCheck(){for(let o of this.initialClasses)this._updateState(o,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let o of n)this._updateState(o,!0);else if(n!=null)for(let o of Object.keys(n))this._updateState(o,!!n[o]);this._applyStateDiff()}_updateState(n,o){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==o&&(i.changed=!0,i.enabled=o),i.touched=!0):this.stateMap.set(n,{enabled:o,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let o=n[0],i=n[1];i.changed?(this._toggleClass(o,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(o,!1),this.stateMap.delete(o)),i.touched=!1}}_toggleClass(n,o){n=n.trim(),n.length>0&&n.split(Jf).forEach(i=>{o?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(rt))},e.\u0275dir=H({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let t=e;return t})();var Xf=class{constructor(e,r,n,o){this.$implicit=e,this.ngForOf=r,this.index=n,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},t9=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,o,i){this._viewContainer=n,this._template=o,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let o=this._viewContainer;n.forEachOperation((i,s,a)=>{if(i.previousIndex==null)o.createEmbeddedView(this._template,new Xf(i.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)o.remove(s===null?void 0:s);else if(s!==null){let u=o.get(s);o.move(u,a),xD(u,i)}});for(let i=0,s=o.length;i{let s=o.get(i.currentIndex);xD(s,i)})}static ngTemplateContextGuard(n,o){return!0}};e.\u0275fac=function(o){return new(o||e)(w(dn),w(Tr),w(Hf))},e.\u0275dir=H({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let t=e;return t})();function xD(t,e){t.context.$implicit=e.item}var n9=(()=>{let e=class e{constructor(n,o){this._viewContainer=n,this._context=new eh,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=o}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){_D("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){_D("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,o){return!0}};e.\u0275fac=function(o){return new(o||e)(w(dn),w(Tr))},e.\u0275dir=H({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let t=e;return t})(),eh=class{constructor(){this.$implicit=null,this.ngIf=null}};function _D(t,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${Be(e)}'.`)}var r9=(()=>{let e=class e{constructor(n,o,i){this._ngEl=n,this._differs=o,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,o){let[i,s]=n.split("."),a=i.indexOf("-")===-1?void 0:zt.DashCase;o!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${o}${s}`:o,a):this._renderer.removeStyle(this._ngEl.nativeElement,i,a)}_applyChanges(n){n.forEachRemovedItem(o=>this._setStyle(o.key,null)),n.forEachAddedItem(o=>this._setStyle(o.key,o.currentValue)),n.forEachChangedItem(o=>this._setStyle(o.key,o.currentValue))}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(zf),w(rt))},e.\u0275dir=H({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let t=e;return t})(),o9=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let o=this._viewContainerRef;if(this._viewRef&&o.remove(o.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=o.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,o,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,o,i):!1,get:(n,o,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,o,i)}})}};e.\u0275fac=function(o){return new(o||e)(w(dn))},e.\u0275dir=H({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[nt]});let t=e;return t})();function uh(t,e){return new C(2100,!1)}var th=class{createSubscription(e,r){return Gf(()=>e.subscribe({next:r,error:n=>{throw n}}))}dispose(e){Gf(()=>e.unsubscribe())}},nh=class{createSubscription(e,r){return e.then(r,n=>{throw n})}dispose(e){}},KN=new nh,YN=new th,i9=(()=>{let e=class e{constructor(n){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){if(!this._obj){if(n)try{this.markForCheckOnValueUpdate=!1,this._subscribe(n)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,o=>this._updateLatestValue(n,o))}_selectStrategy(n){if(Gn(n))return KN;if(Bf(n))return YN;throw uh(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,o){n===this._obj&&(this._latestValue=o,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}};e.\u0275fac=function(o){return new(o||e)(w(Nt,16))},e.\u0275pipe=xo({name:"async",type:e,pure:!1,standalone:!0});let t=e;return t})();var QN="mediumDate",JN=new E(""),XN=new E(""),s9=(()=>{let e=class e{constructor(n,o,i){this.locale=n,this.defaultTimezone=o,this.defaultOptions=i}transform(n,o,i,s){if(n==null||n===""||n!==n)return null;try{let a=o??this.defaultOptions?.dateFormat??QN,u=i??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return SN(n,a,s||this.locale,u)}catch(a){throw uh(e,a.message)}}};e.\u0275fac=function(o){return new(o||e)(w(Gi,16),w(JN,24),w(XN,24))},e.\u0275pipe=xo({name:"date",type:e,pure:!0,standalone:!0});let t=e;return t})();var a9=(()=>{let e=class e{constructor(n){this._locale=n}transform(n,o,i){if(!eO(n))return null;i||=this._locale;try{let s=tO(n);return zN(s,i,o)}catch(s){throw uh(e,s.message)}}};e.\u0275fac=function(o){return new(o||e)(w(Gi,16))},e.\u0275pipe=xo({name:"number",type:e,pure:!0,standalone:!0});let t=e;return t})();function eO(t){return!(t==null||t===""||t!==t)}function tO(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new Error(`${t} is not a number`);return t}var nO=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({});let t=e;return t})(),ch="browser",rO="server";function oO(t){return t===ch}function Bu(t){return t===rO}var iO=(()=>{let e=class e{};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>oO(y(cn))?new rh(y(Ue),window):new oh});let t=e;return t})(),rh=class{constructor(e,r){this.document=e,this.window=r,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let r=sO(this.document,e);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let r=e.getBoundingClientRect(),n=r.left+this.window.pageXOffset,o=r.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(n-i[0],o-i[1])}};function sO(t,e){let r=t.getElementById(e)||t.getElementsByName(e)[0];if(r)return r;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),o=n.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(e)||i.querySelector(`[name="${e}"]`);if(s)return s}o=n.nextNode()}}return null}var oh=class{setOffset(e){}getScrollPosition(){return[0,0]}scrollToPosition(e){}scrollToAnchor(e){}setHistoryScrollRestoration(e){}},So=class{};var Ki=class{},Hu=class{},vn=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` -`).forEach(r=>{let n=r.indexOf(":");if(n>0){let o=r.slice(0,n),i=o.toLowerCase(),s=r.slice(n+1).trim();this.maybeSetNormalizedName(o,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((r,n)=>{this.setHeaderEntries(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let r=this.headers.get(e.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,r){return this.clone({name:e,value:r,op:"a"})}set(e,r){return this.clone({name:e,value:r,op:"s"})}delete(e,r){return this.clone({name:e,value:r,op:"d"})}maybeSetNormalizedName(e,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(r=>{this.headers.set(r,e.headers.get(r)),this.normalizedNames.set(r,e.normalizedNames.get(r))})}clone(e){let r=new t;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([e]),r}applyUpdate(e){let r=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,r);let o=(e.op==="a"?this.headers.get(r):void 0)||[];o.push(...n),this.headers.set(r,o);break;case"d":let i=e.value;if(!i)this.headers.delete(r),this.normalizedNames.delete(r);else{let s=this.headers.get(r);if(!s)return;s=s.filter(a=>i.indexOf(a)===-1),s.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,s)}break}}setHeaderEntries(e,r){let n=(Array.isArray(r)?r:[r]).map(i=>i.toString()),o=e.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>e(this.normalizedNames.get(r),this.headers.get(r)))}};var dh=class{encodeKey(e){return kD(e)}encodeValue(e){return kD(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function aO(t,e){let r=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,i)),e.decodeValue(o.slice(i+1))],u=r.get(s)||[];u.push(a),r.set(s,u)}),r}var uO=/%(\d[a-f0-9])/gi,cO={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function kD(t){return encodeURIComponent(t).replace(uO,(e,r)=>cO[r]??e)}function $u(t){return`${t}`}var Kn=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new dh,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=aO(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(r=>{let n=e.fromObject[r],o=Array.isArray(n)?n.map($u):[$u(n)];this.map.set(r,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let r=this.map.get(e);return r?r[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,r){return this.clone({param:e,value:r,op:"a"})}appendAll(e){let r=[];return Object.keys(e).forEach(n=>{let o=e[n];Array.isArray(o)?o.forEach(i=>{r.push({param:n,value:i,op:"a"})}):r.push({param:n,value:o,op:"a"})}),this.clone(r)}set(e,r){return this.clone({param:e,value:r,op:"s"})}delete(e,r){return this.clone({param:e,value:r,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let r=this.encoder.encodeKey(e);return this.map.get(e).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let r=new t({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(e),r}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let r=(e.op==="a"?this.map.get(e.param):void 0)||[];r.push($u(e.value)),this.map.set(e.param,r);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],o=n.indexOf($u(e.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}},jD=class{constructor(e){this.defaultValue=e}},fh=class{constructor(){this.map=new Map}set(e,r){return this.map.set(e,r),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function lO(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function VD(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function UD(t){return typeof Blob<"u"&&t instanceof Blob}function BD(t){return typeof FormData<"u"&&t instanceof FormData}function dO(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Zi=class t{constructor(e,r,n,o){this.url=r,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let i;if(lO(this.method)||o?(this.body=n!==void 0?n:null,i=o):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),this.transferCache=i.transferCache),this.headers??=new vn,this.context??=new fh,!this.params)this.params=new Kn,this.urlWithParams=r;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=r;else{let a=r.indexOf("?"),u=a===-1?"?":af.set(h,e.setHeaders[h]),c)),e.setParams&&(l=Object.keys(e.setParams).reduce((f,h)=>f.set(h,e.setParams[h]),l)),new t(r,n,s,{params:l,headers:c,context:d,reportProgress:u,responseType:o,withCredentials:a,transferCache:i})}},Yn=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(Yn||{}),Yi=class{constructor(e,r=200,n="OK"){this.headers=e.headers||new vn,this.status=e.status!==void 0?e.status:r,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},zu=class t extends Yi{constructor(e={}){super(e),this.type=Yn.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Qi=class t extends Yi{constructor(e={}){super(e),this.type=Yn.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Zn=class extends Yi{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},GD=200,fO=204;function lh(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var hO=(()=>{let e=class e{constructor(n){this.handler=n}request(n,o,i={}){let s;if(n instanceof Zi)s=n;else{let c;i.headers instanceof vn?c=i.headers:c=new vn(i.headers);let l;i.params&&(i.params instanceof Kn?l=i.params:l=new Kn({fromObject:i.params})),s=new Zi(n,o,i.body!==void 0?i.body:null,{headers:c,context:i.context,params:l,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache})}let a=I(s).pipe(kt(c=>this.handler.handle(c)));if(n instanceof Zi||i.observe==="events")return a;let u=a.pipe(ke(c=>c instanceof Qi));switch(i.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return u.pipe(N(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return u.pipe(N(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return u.pipe(N(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return u.pipe(N(c=>c.body))}case"response":return u;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(n,o={}){return this.request("DELETE",n,o)}get(n,o={}){return this.request("GET",n,o)}head(n,o={}){return this.request("HEAD",n,o)}jsonp(n,o){return this.request("JSONP",n,{params:new Kn().append(o,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,o={}){return this.request("OPTIONS",n,o)}patch(n,o,i={}){return this.request("PATCH",n,lh(i,o))}post(n,o,i={}){return this.request("POST",n,lh(i,o))}put(n,o,i={}){return this.request("PUT",n,lh(i,o))}};e.\u0275fac=function(o){return new(o||e)(x(Ki))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),pO=/^\)\]\}',?\n/,gO="X-Request-URL";function $D(t){if(t.url)return t.url;let e=gO.toLocaleLowerCase();return t.headers.get(e)}var mO=(()=>{let e=class e{constructor(){this.fetchImpl=y(hh,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=y(pe)}handle(n){return new P(o=>{let i=new AbortController;return this.doRequest(n,i.signal,o).then(ph,s=>o.error(new Zn({error:s}))),()=>i.abort()})}doRequest(n,o,i){return Us(this,null,function*(){let s=this.createRequestInit(n),a;try{let p=this.fetchImpl(n.urlWithParams,D({signal:o},s));vO(p),i.next({type:Yn.Sent}),a=yield p}catch(p){i.error(new Zn({error:p,status:p.status??0,statusText:p.statusText,url:n.urlWithParams,headers:p.headers}));return}let u=new vn(a.headers),c=a.statusText,l=$D(a)??n.urlWithParams,d=a.status,f=null;if(n.reportProgress&&i.next(new zu({headers:u,status:d,statusText:c,url:l})),a.body){let p=a.headers.get("content-length"),g=[],m=a.body.getReader(),v=0,A,z,U=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>Us(this,null,function*(){for(;;){let{done:De,value:lt}=yield m.read();if(De)break;if(g.push(lt),v+=lt.length,n.reportProgress){z=n.responseType==="text"?(z??"")+(A??=new TextDecoder).decode(lt,{stream:!0}):void 0;let Zr=()=>i.next({type:Yn.DownloadProgress,total:p?+p:void 0,loaded:v,partialText:z});U?U.run(Zr):Zr()}}}));let me=this.concatChunks(g,v);try{let De=a.headers.get("Content-Type")??"";f=this.parseBody(n,me,De)}catch(De){i.error(new Zn({error:De,headers:new vn(a.headers),status:a.status,statusText:a.statusText,url:$D(a)??n.urlWithParams}));return}}d===0&&(d=f?GD:0),d>=200&&d<300?(i.next(new Qi({body:f,headers:u,status:d,statusText:c,url:l})),i.complete()):i.error(new Zn({error:f,headers:u,status:d,statusText:c,url:l}))})}parseBody(n,o,i){switch(n.responseType){case"json":let s=new TextDecoder().decode(o).replace(pO,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(o);case"blob":return new Blob([o],{type:i});case"arraybuffer":return o.buffer}}createRequestInit(n){let o={},i=n.withCredentials?"include":void 0;if(n.headers.forEach((s,a)=>o[s]=a.join(",")),o.Accept??="application/json, text/plain, */*",!o["Content-Type"]){let s=n.detectContentTypeHeader();s!==null&&(o["Content-Type"]=s)}return{body:n.serializeBody(),method:n.method,headers:o,credentials:i}}concatChunks(n,o){let i=new Uint8Array(o),s=0;for(let a of n)i.set(a,s),s+=a.length;return i}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),hh=class{};function ph(){}function vO(t){t.then(ph,ph)}function yO(t,e){return e(t)}function DO(t,e,r){return(n,o)=>Tt(r,()=>e(n,i=>t(i,o)))}var gh=new E(""),wO=new E(""),bO=new E("",{providedIn:"root",factory:()=>!0});var HD=(()=>{let e=class e extends Ki{constructor(n,o){super(),this.backend=n,this.injector=o,this.chain=null,this.pendingTasks=y(Hn),this.contributeToStability=y(bO)}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(gh),...this.injector.get(wO,[])]));this.chain=o.reduceRight((i,s)=>DO(i,s,this.injector),yO)}if(this.contributeToStability){let o=this.pendingTasks.add();return this.chain(n,i=>this.backend.handle(i)).pipe(Rn(()=>this.pendingTasks.remove(o)))}else return this.chain(n,o=>this.backend.handle(o))}};e.\u0275fac=function(o){return new(o||e)(x(Hu),x(Qe))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})();var CO=/^\)\]\}',?\n/;function EO(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var zD=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new C(-2800,!1);let o=this.xhrFactory;return(o.\u0275loadImpl?te(o.\u0275loadImpl()):I(null)).pipe(be(()=>new P(s=>{let a=o.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((m,v)=>a.setRequestHeader(m,v.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let m=n.detectContentTypeHeader();m!==null&&a.setRequestHeader("Content-Type",m)}if(n.responseType){let m=n.responseType.toLowerCase();a.responseType=m!=="json"?m:"text"}let u=n.serializeBody(),c=null,l=()=>{if(c!==null)return c;let m=a.statusText||"OK",v=new vn(a.getAllResponseHeaders()),A=EO(a)||n.url;return c=new zu({headers:v,status:a.status,statusText:m,url:A}),c},d=()=>{let{headers:m,status:v,statusText:A,url:z}=l(),U=null;v!==fO&&(U=typeof a.response>"u"?a.responseText:a.response),v===0&&(v=U?GD:0);let me=v>=200&&v<300;if(n.responseType==="json"&&typeof U=="string"){let De=U;U=U.replace(CO,"");try{U=U!==""?JSON.parse(U):null}catch(lt){U=De,me&&(me=!1,U={error:lt,text:U})}}me?(s.next(new Qi({body:U,headers:m,status:v,statusText:A,url:z||void 0})),s.complete()):s.error(new Zn({error:U,headers:m,status:v,statusText:A,url:z||void 0}))},f=m=>{let{url:v}=l(),A=new Zn({error:m,status:a.status||0,statusText:a.statusText||"Unknown Error",url:v||void 0});s.error(A)},h=!1,p=m=>{h||(s.next(l()),h=!0);let v={type:Yn.DownloadProgress,loaded:m.loaded};m.lengthComputable&&(v.total=m.total),n.responseType==="text"&&a.responseText&&(v.partialText=a.responseText),s.next(v)},g=m=>{let v={type:Yn.UploadProgress,loaded:m.loaded};m.lengthComputable&&(v.total=m.total),s.next(v)};return a.addEventListener("load",d),a.addEventListener("error",f),a.addEventListener("timeout",f),a.addEventListener("abort",f),n.reportProgress&&(a.addEventListener("progress",p),u!==null&&a.upload&&a.upload.addEventListener("progress",g)),a.send(u),s.next({type:Yn.Sent}),()=>{a.removeEventListener("error",f),a.removeEventListener("abort",f),a.removeEventListener("load",d),a.removeEventListener("timeout",f),n.reportProgress&&(a.removeEventListener("progress",p),u!==null&&a.upload&&a.upload.removeEventListener("progress",g)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(o){return new(o||e)(x(So))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),WD=new E(""),IO="XSRF-TOKEN",xO=new E("",{providedIn:"root",factory:()=>IO}),_O="X-XSRF-TOKEN",MO=new E("",{providedIn:"root",factory:()=>_O}),Gu=class{},TO=(()=>{let e=class e{constructor(n,o,i){this.doc=n,this.platform=o,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Uu(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(o){return new(o||e)(x(Ue),x(cn),x(xO))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})();function SO(t,e){let r=t.url.toLowerCase();if(!y(WD)||t.method==="GET"||t.method==="HEAD"||r.startsWith("http://")||r.startsWith("https://"))return e(t);let n=y(Gu).getToken(),o=y(MO);return n!=null&&!t.headers.has(o)&&(t=t.clone({headers:t.headers.set(o,n)})),e(t)}var qD=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(qD||{});function AO(t,e){return{\u0275kind:t,\u0275providers:e}}function b9(...t){let e=[hO,zD,HD,{provide:Ki,useExisting:HD},{provide:Hu,useFactory:()=>y(mO,{optional:!0})??y(zD)},{provide:gh,useValue:SO,multi:!0},{provide:WD,useValue:!0},{provide:Gu,useClass:TO}];for(let r of t)e.push(...r.\u0275providers);return ji(e)}function C9(t){return AO(qD.Interceptors,t.map(e=>({provide:gh,useValue:e,multi:!0})))}var yh=class extends ku{constructor(){super(...arguments),this.supportsDOMEvents=!0}},Dh=class t extends yh{static makeCurrent(){TD(new t)}onAndCancel(e,r,n){return e.addEventListener(r,n),()=>{e.removeEventListener(r,n)}}dispatchEvent(e,r){e.dispatchEvent(r)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,r){return r=r||this.getDefaultDocument(),r.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,r){return r==="window"?window:r==="document"?e:r==="body"?e.body:null}getBaseHref(e){let r=NO();return r==null?null:OO(r)}resetBaseElement(){Ji=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Uu(document.cookie,e)}},Ji=null;function NO(){return Ji=Ji||document.querySelector("base"),Ji?Ji.getAttribute("href"):null}function OO(t){return new URL(t,document.baseURI).pathname}var RO=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),wh=new E(""),QD=(()=>{let e=class e{constructor(n,o){this._zone=o,this._eventNameToPlugin=new Map,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,o,i){return this._findPluginFor(o).addEventListener(n,o,i)}getZone(){return this._zone}_findPluginFor(n){let o=this._eventNameToPlugin.get(n);if(o)return o;if(o=this._plugins.find(s=>s.supports(n)),!o)throw new C(5101,!1);return this._eventNameToPlugin.set(n,o),o}};e.\u0275fac=function(o){return new(o||e)(x(wh),x(pe))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),Wu=class{constructor(e){this._doc=e}},mh="ng-app-id",JD=(()=>{let e=class e{constructor(n,o,i,s={}){this.doc=n,this.appId=o,this.nonce=i,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Bu(s),this.resetHostNodes()}addStyles(n){for(let o of n)this.changeUsageCount(o,1)===1&&this.onStyleAdded(o)}removeStyles(n){for(let o of n)this.changeUsageCount(o,-1)<=0&&this.onStyleRemoved(o)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(o=>o.remove()),n.clear());for(let o of this.getAllStyles())this.onStyleRemoved(o);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let o of this.getAllStyles())this.addStyleToHost(n,o)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let o of this.hostNodes)this.addStyleToHost(o,n)}onStyleRemoved(n){let o=this.styleRef;o.get(n)?.elements?.forEach(i=>i.remove()),o.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${mh}="${this.appId}"]`);if(n?.length){let o=new Map;return n.forEach(i=>{i.textContent!=null&&o.set(i.textContent,i)}),o}return null}changeUsageCount(n,o){let i=this.styleRef;if(i.has(n)){let s=i.get(n);return s.usage+=o,s.usage}return i.set(n,{usage:o,elements:[]}),o}getStyleElement(n,o){let i=this.styleNodesInDOM,s=i?.get(o);if(s?.parentNode===n)return i.delete(o),s.removeAttribute(mh),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=o,this.platformIsServer&&a.setAttribute(mh,this.appId),n.appendChild(a),a}}addStyleToHost(n,o){let i=this.getStyleElement(n,o),s=this.styleRef,a=s.get(o)?.elements;a?a.push(i):s.set(o,{elements:[i],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(o){return new(o||e)(x(Ue),x(mf),x(yf,8),x(cn))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),vh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},Ch=/%COMP%/g,XD="%COMP%",PO=`_nghost-${XD}`,FO=`_ngcontent-${XD}`,LO=!0,kO=new E("",{providedIn:"root",factory:()=>LO});function jO(t){return FO.replace(Ch,t)}function VO(t){return PO.replace(Ch,t)}function ew(t,e){return e.map(r=>r.replace(Ch,t))}var ZD=(()=>{let e=class e{constructor(n,o,i,s,a,u,c,l=null){this.eventManager=n,this.sharedStylesHost=o,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=u,this.ngZone=c,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=Bu(u),this.defaultRenderer=new Xi(n,a,c,this.platformIsServer)}createRenderer(n,o){if(!n||!o)return this.defaultRenderer;this.platformIsServer&&o.encapsulation===Bt.ShadowDom&&(o=$(D({},o),{encapsulation:Bt.Emulated}));let i=this.getOrCreateRenderer(n,o);return i instanceof qu?i.applyToHost(n):i instanceof es&&i.applyStyles(),i}getOrCreateRenderer(n,o){let i=this.rendererByCompId,s=i.get(o.id);if(!s){let a=this.doc,u=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer;switch(o.encapsulation){case Bt.Emulated:s=new qu(c,l,o,this.appId,d,a,u,f);break;case Bt.ShadowDom:return new bh(c,l,n,o,a,u,this.nonce,f);default:s=new es(c,l,o,d,a,u,f);break}i.set(o.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(o){return new(o||e)(x(QD),x(JD),x(mf),x(kO),x(Ue),x(cn),x(pe),x(yf))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),Xi=class{constructor(e,r,n,o){this.eventManager=e,this.doc=r,this.ngZone=n,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,r){return r?this.doc.createElementNS(vh[r]||r,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,r){(KD(e)?e.content:e).appendChild(r)}insertBefore(e,r,n){e&&(KD(e)?e.content:e).insertBefore(r,n)}removeChild(e,r){e&&e.removeChild(r)}selectRootElement(e,r){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new C(-5104,!1);return r||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,r,n,o){if(o){r=o+":"+r;let i=vh[o];i?e.setAttributeNS(i,r,n):e.setAttribute(r,n)}else e.setAttribute(r,n)}removeAttribute(e,r,n){if(n){let o=vh[n];o?e.removeAttributeNS(o,r):e.removeAttribute(`${n}:${r}`)}else e.removeAttribute(r)}addClass(e,r){e.classList.add(r)}removeClass(e,r){e.classList.remove(r)}setStyle(e,r,n,o){o&(zt.DashCase|zt.Important)?e.style.setProperty(r,n,o&zt.Important?"important":""):e.style[r]=n}removeStyle(e,r,n){n&zt.DashCase?e.style.removeProperty(r):e.style[r]=""}setProperty(e,r,n){e!=null&&(e[r]=n)}setValue(e,r){e.nodeValue=r}listen(e,r,n){if(typeof e=="string"&&(e=mn().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${r}`);return this.eventManager.addEventListener(e,r,this.decoratePreventDefault(n))}decoratePreventDefault(e){return r=>{if(r==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(r)):e(r))===!1&&r.preventDefault()}}};function KD(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var bh=class extends Xi{constructor(e,r,n,o,i,s,a,u){super(e,i,s,u),this.sharedStylesHost=r,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=ew(o.id,o.styles);for(let l of c){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=l,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,r){return super.appendChild(this.nodeOrShadowRoot(e),r)}insertBefore(e,r,n){return super.insertBefore(this.nodeOrShadowRoot(e),r,n)}removeChild(e,r){return super.removeChild(this.nodeOrShadowRoot(e),r)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},es=class extends Xi{constructor(e,r,n,o,i,s,a,u){super(e,i,s,a),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=o,this.styles=u?ew(u,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},qu=class extends es{constructor(e,r,n,o,i,s,a,u){let c=o+"-"+n.id;super(e,r,n,i,s,a,u,c),this.contentAttr=jO(c),this.hostAttr=VO(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,r){let n=super.createElement(e,r);return super.setAttribute(n,this.contentAttr,""),n}},UO=(()=>{let e=class e extends Wu{constructor(n){super(n)}supports(n){return!0}addEventListener(n,o,i){return n.addEventListener(o,i,!1),()=>this.removeEventListener(n,o,i)}removeEventListener(n,o,i){return n.removeEventListener(o,i)}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),YD=["alt","control","meta","shift"],BO={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},$O={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},HO=(()=>{let e=class e extends Wu{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,o,i){let s=e.parseEventName(o),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>mn().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let o=n.toLowerCase().split("."),i=o.shift();if(o.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(o.pop()),a="",u=o.indexOf("code");if(u>-1&&(o.splice(u,1),a="code."),YD.forEach(l=>{let d=o.indexOf(l);d>-1&&(o.splice(d,1),a+=l+".")}),a+=s,o.length!=0||s.length===0)return null;let c={};return c.domEventName=i,c.fullKey=a,c}static matchEventFullKeyCode(n,o){let i=BO[n.key]||n.key,s="";return o.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),YD.forEach(a=>{if(a!==i){let u=$O[a];u(n)&&(s+=a+".")}}),s+=i,s===o)}static eventCallback(n,o,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>o(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})();function $9(t,e){return DD(D({rootComponent:t},zO(e)))}function zO(t){return{appProviders:[...KO,...t?.providers??[]],platformProviders:ZO}}function GO(){Dh.makeCurrent()}function WO(){return new on}function qO(){return Vv(document),document}var ZO=[{provide:cn,useValue:ch},{provide:vf,useValue:GO,multi:!0},{provide:Ue,useFactory:qO,deps:[]}];var KO=[{provide:ou,useValue:"root"},{provide:on,useFactory:WO,deps:[]},{provide:wh,useClass:UO,multi:!0,deps:[Ue,pe,cn]},{provide:wh,useClass:HO,multi:!0,deps:[Ue]},ZD,JD,QD,{provide:bo,useExisting:ZD},{provide:So,useClass:RO,deps:[]},[]];var tw=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var YO=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:function(o){let i=null;return o?i=new(o||e):i=x(QO),i},providedIn:"root"});let t=e;return t})(),QO=(()=>{let e=class e extends YO{constructor(n){super(),this._doc=n}sanitize(n,o){if(o==null)return null;switch(n){case Wt.NONE:return o;case Wt.HTML:return zn(o,"HTML")?At(o):Qv(this._doc,String(o)).toString();case Wt.STYLE:return zn(o,"Style")?At(o):o;case Wt.SCRIPT:if(zn(o,"Script"))return At(o);throw new C(5200,!1);case Wt.URL:return zn(o,"URL")?At(o):gu(String(o));case Wt.RESOURCE_URL:if(zn(o,"ResourceURL"))return At(o);throw new C(5201,!1);default:throw new C(5202,!1)}}bypassSecurityTrustHtml(n){return Bv(n)}bypassSecurityTrustStyle(n){return $v(n)}bypassSecurityTrustScript(n){return Hv(n)}bypassSecurityTrustUrl(n){return zv(n)}bypassSecurityTrustResourceUrl(n){return Gv(n)}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var L="primary",vs=Symbol("RouteTitle"),Mh=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r[0]:r}return null}getAll(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function Fo(t){return new Mh(t)}function XO(t,e,r){let n=r.path.split("/");if(n.length>t.length||r.pathMatch==="full"&&(e.hasChildren()||n.lengthn[i]===o)}else return t===e}function dw(t){return t.length>0?t[t.length-1]:null}function Jn(t){return bt(t)?t:Gn(t)?te(Promise.resolve(t)):I(t)}var tR={exact:hw,subset:pw},fw={exact:nR,subset:rR,ignored:()=>!0};function nw(t,e,r){return tR[r.paths](t.root,e.root,r.matrixParams)&&fw[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function nR(t,e){return qt(t,e)}function hw(t,e,r){if(!kr(t.segments,e.segments)||!Yu(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!hw(t.children[n],e.children[n],r))return!1;return!0}function rR(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>lw(t[r],e[r]))}function pw(t,e,r){return gw(t,e,e.segments,r)}function gw(t,e,r,n){if(t.segments.length>r.length){let o=t.segments.slice(0,r.length);return!(!kr(o,r)||e.hasChildren()||!Yu(o,r,n))}else if(t.segments.length===r.length){if(!kr(t.segments,r)||!Yu(t.segments,r,n))return!1;for(let o in e.children)if(!t.children[o]||!pw(t.children[o],e.children[o],n))return!1;return!0}else{let o=r.slice(0,t.segments.length),i=r.slice(t.segments.length);return!kr(t.segments,o)||!Yu(t.segments,o,n)||!t.children[L]?!1:gw(t.children[L],e,i,n)}}function Yu(t,e,r){return e.every((n,o)=>fw[r](t[o].parameters,n.parameters))}var Qn=class{constructor(e=new K([],{}),r={},n=null){this.root=e,this.queryParams=r,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Fo(this.queryParams),this._queryParamMap}toString(){return sR.serialize(this)}},K=class{constructor(e,r){this.segments=e,this.children=r,this.parent=null,Object.values(r).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Qu(this)}},Lr=class{constructor(e,r){this.path=e,this.parameters=r}get parameterMap(){return this._parameterMap??=Fo(this.parameters),this._parameterMap}toString(){return vw(this)}};function oR(t,e){return kr(t,e)&&t.every((r,n)=>qt(r.parameters,e[n].parameters))}function kr(t,e){return t.length!==e.length?!1:t.every((r,n)=>r.path===e[n].path)}function iR(t,e){let r=[];return Object.entries(t.children).forEach(([n,o])=>{n===L&&(r=r.concat(e(o,n)))}),Object.entries(t.children).forEach(([n,o])=>{n!==L&&(r=r.concat(e(o,n)))}),r}var ep=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>new as,providedIn:"root"});let t=e;return t})(),as=class{parse(e){let r=new Ah(e);return new Qn(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${ts(e.root,!0)}`,n=cR(e.queryParams),o=typeof e.fragment=="string"?`#${aR(e.fragment)}`:"";return`${r}${n}${o}`}},sR=new as;function Qu(t){return t.segments.map(e=>vw(e)).join("/")}function ts(t,e){if(!t.hasChildren())return Qu(t);if(e){let r=t.children[L]?ts(t.children[L],!1):"",n=[];return Object.entries(t.children).forEach(([o,i])=>{o!==L&&n.push(`${o}:${ts(i,!1)}`)}),n.length>0?`${r}(${n.join("//")})`:r}else{let r=iR(t,(n,o)=>o===L?[ts(t.children[L],!1)]:[`${o}:${ts(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[L]!=null?`${Qu(t)}/${r[0]}`:`${Qu(t)}/(${r.join("//")})`}}function mw(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function Zu(t){return mw(t).replace(/%3B/gi,";")}function aR(t){return encodeURI(t)}function Sh(t){return mw(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Ju(t){return decodeURIComponent(t)}function rw(t){return Ju(t.replace(/\+/g,"%20"))}function vw(t){return`${Sh(t.path)}${uR(t.parameters)}`}function uR(t){return Object.entries(t).map(([e,r])=>`;${Sh(e)}=${Sh(r)}`).join("")}function cR(t){let e=Object.entries(t).map(([r,n])=>Array.isArray(n)?n.map(o=>`${Zu(r)}=${Zu(o)}`).join("&"):`${Zu(r)}=${Zu(n)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var lR=/^[^\/()?;#]+/;function Eh(t){let e=t.match(lR);return e?e[0]:""}var dR=/^[^\/()?;=#]+/;function fR(t){let e=t.match(dR);return e?e[0]:""}var hR=/^[^=?&#]+/;function pR(t){let e=t.match(hR);return e?e[0]:""}var gR=/^[^&#]+/;function mR(t){let e=t.match(gR);return e?e[0]:""}var Ah=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new K([],{}):new K([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(r).length>0)&&(n[L]=new K(e,r)),n}parseSegment(){let e=Eh(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new C(4009,!1);return this.capture(e),new Lr(Ju(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=fR(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let o=Eh(this.remaining);o&&(n=o,this.capture(n))}e[Ju(r)]=Ju(n)}parseQueryParam(e){let r=pR(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let s=mR(this.remaining);s&&(n=s,this.capture(n))}let o=rw(r),i=rw(n);if(e.hasOwnProperty(o)){let s=e[o];Array.isArray(s)||(s=[s],e[o]=s),s.push(i)}else e[o]=i}parseParens(e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=Eh(this.remaining),o=this.remaining[n.length];if(o!=="/"&&o!==")"&&o!==";")throw new C(4010,!1);let i;n.indexOf(":")>-1?(i=n.slice(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i=L);let s=this.parseChildren();r[i]=Object.keys(s).length===1?s[L]:new K([],s),this.consumeOptional("//")}return r}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new C(4011,!1)}};function yw(t){return t.segments.length>0?new K([],{[L]:t}):t}function Dw(t){let e={};for(let[n,o]of Object.entries(t.children)){let i=Dw(o);if(n===L&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))e[s]=a;else(i.segments.length>0||i.hasChildren())&&(e[n]=i)}let r=new K(t.segments,e);return vR(r)}function vR(t){if(t.numberOfChildren===1&&t.children[L]){let e=t.children[L];return new K(t.segments.concat(e.segments),e.children)}return t}function us(t){return t instanceof Qn}function yR(t,e,r=null,n=null){let o=ww(t);return bw(o,e,r,n)}function ww(t){let e;function r(i){let s={};for(let u of i.children){let c=r(u);s[u.outlet]=c}let a=new K(i.url,s);return i===t&&(e=a),a}let n=r(t.root),o=yw(n);return e??o}function bw(t,e,r,n){let o=t;for(;o.parent;)o=o.parent;if(e.length===0)return Ih(o,o,o,r,n);let i=DR(e);if(i.toRoot())return Ih(o,o,new K([],{}),r,n);let s=wR(i,o,t),a=s.processChildren?os(s.segmentGroup,s.index,i.commands):Ew(s.segmentGroup,s.index,i.commands);return Ih(o,s.segmentGroup,a,r,n)}function Xu(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function cs(t){return typeof t=="object"&&t!=null&&t.outlets}function Ih(t,e,r,n,o){let i={};n&&Object.entries(n).forEach(([u,c])=>{i[u]=Array.isArray(c)?c.map(l=>`${l}`):`${c}`});let s;t===e?s=r:s=Cw(t,e,r);let a=yw(Dw(s));return new Qn(a,i,o)}function Cw(t,e,r){let n={};return Object.entries(t.children).forEach(([o,i])=>{i===e?n[o]=r:n[o]=Cw(i,e,r)}),new K(t.segments,n)}var ec=class{constructor(e,r,n){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=n,e&&n.length>0&&Xu(n[0]))throw new C(4003,!1);let o=n.find(cs);if(o&&o!==dw(n))throw new C(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function DR(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new ec(!0,0,t);let e=0,r=!1,n=t.reduce((o,i,s)=>{if(typeof i=="object"&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...o,{outlets:a}]}if(i.segmentPath)return[...o,i.segmentPath]}return typeof i!="string"?[...o,i]:s===0?(i.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?r=!0:a===".."?e++:a!=""&&o.push(a))}),o):[...o,i]},[]);return new ec(r,e,n)}var Oo=class{constructor(e,r,n){this.segmentGroup=e,this.processChildren=r,this.index=n}};function wR(t,e,r){if(t.isAbsolute)return new Oo(e,!0,0);if(!r)return new Oo(e,!1,NaN);if(r.parent===null)return new Oo(r,!0,0);let n=Xu(t.commands[0])?0:1,o=r.segments.length-1+n;return bR(r,o,t.numberOfDoubleDots)}function bR(t,e,r){let n=t,o=e,i=r;for(;i>o;){if(i-=o,n=n.parent,!n)throw new C(4005,!1);o=n.segments.length}return new Oo(n,!1,o-i)}function CR(t){return cs(t[0])?t[0].outlets:{[L]:t}}function Ew(t,e,r){if(t??=new K([],{}),t.segments.length===0&&t.hasChildren())return os(t,e,r);let n=ER(t,e,r),o=r.slice(n.commandIndex);if(n.match&&n.pathIndexi!==L)&&t.children[L]&&t.numberOfChildren===1&&t.children[L].segments.length===0){let i=os(t.children[L],e,r);return new K(t.segments,i.children)}return Object.entries(n).forEach(([i,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[i]=Ew(t.children[i],e,s))}),Object.entries(t.children).forEach(([i,s])=>{n[i]===void 0&&(o[i]=s)}),new K(t.segments,o)}}function ER(t,e,r){let n=0,o=e,i={match:!1,pathIndex:0,commandIndex:0};for(;o=r.length)return i;let s=t.segments[o],a=r[n];if(cs(a))break;let u=`${a}`,c=n0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!iw(u,c,s))return i;n+=2}else{if(!iw(u,{},s))return i;n++}o++}return{match:!0,pathIndex:o,commandIndex:n}}function Nh(t,e,r){let n=t.segments.slice(0,e),o=0;for(;o{typeof n=="string"&&(n=[n]),n!==null&&(e[r]=Nh(new K([],{}),0,n))}),e}function ow(t){let e={};return Object.entries(t).forEach(([r,n])=>e[r]=`${n}`),e}function iw(t,e,r){return t==r.path&&qt(e,r.parameters)}var is="imperative",Le=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(Le||{}),gt=class{constructor(e,r){this.id=e,this.url=r}},ls=class extends gt{constructor(e,r,n="imperative",o=null){super(e,r),this.type=Le.NavigationStart,this.navigationTrigger=n,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Dn=class extends gt{constructor(e,r,n){super(e,r),this.urlAfterRedirects=n,this.type=Le.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ut=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(ut||{}),Oh=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Oh||{}),yn=class extends gt{constructor(e,r,n,o){super(e,r),this.reason=n,this.code=o,this.type=Le.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},jr=class extends gt{constructor(e,r,n,o){super(e,r),this.reason=n,this.code=o,this.type=Le.NavigationSkipped}},ds=class extends gt{constructor(e,r,n,o){super(e,r),this.error=n,this.target=o,this.type=Le.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},tc=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Rh=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Ph=class extends gt{constructor(e,r,n,o,i){super(e,r),this.urlAfterRedirects=n,this.state=o,this.shouldActivate=i,this.type=Le.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Fh=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Lh=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},kh=class{constructor(e){this.route=e,this.type=Le.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},jh=class{constructor(e){this.route=e,this.type=Le.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},Vh=class{constructor(e){this.snapshot=e,this.type=Le.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Uh=class{constructor(e){this.snapshot=e,this.type=Le.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Bh=class{constructor(e){this.snapshot=e,this.type=Le.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},$h=class{constructor(e){this.snapshot=e,this.type=Le.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var fs=class{},Lo=class{constructor(e,r){this.url=e,this.navigationBehaviorOptions=r}};var Hh=class{constructor(e){this.injector=e,this.outlet=null,this.route=null,this.children=new uc(this.injector),this.attachRef=null}},uc=(()=>{let e=class e{constructor(n){this.parentInjector=n,this.contexts=new Map}onChildOutletCreated(n,o){let i=this.getOrCreateContext(n);i.outlet=o,this.contexts.set(n,i)}onChildOutletDestroyed(n){let o=this.getContext(n);o&&(o.outlet=null,o.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let o=this.getContext(n);return o||(o=new Hh(this.parentInjector),this.contexts.set(n,o)),o}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(o){return new(o||e)(x(Qe))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),nc=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let r=this.pathFromRoot(e);return r.length>1?r[r.length-2]:null}children(e){let r=zh(e,this._root);return r?r.children.map(n=>n.value):[]}firstChild(e){let r=zh(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=Gh(e,this._root);return r.length<2?[]:r[r.length-2].children.map(o=>o.value).filter(o=>o!==e)}pathFromRoot(e){return Gh(e,this._root).map(r=>r.value)}};function zh(t,e){if(t===e.value)return e;for(let r of e.children){let n=zh(t,r);if(n)return n}return null}function Gh(t,e){if(t===e.value)return[e];for(let r of e.children){let n=Gh(t,r);if(n.length)return n.unshift(e),n}return[]}var at=class{constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function No(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var rc=class extends nc{constructor(e,r){super(e),this.snapshot=r,tp(this,e)}toString(){return this.snapshot.toString()}};function Iw(t){let e=xR(t),r=new Se([new Lr("",{})]),n=new Se({}),o=new Se({}),i=new Se({}),s=new Se(""),a=new Vr(r,n,i,s,o,L,t,e.root);return a.snapshot=e.root,new rc(new at(a,[]),e)}function xR(t){let e={},r={},n={},o="",i=new Ro([],e,n,o,r,L,t,null,{});return new ic("",new at(i,[]))}var Vr=class{constructor(e,r,n,o,i,s,a,u){this.urlSubject=e,this.paramsSubject=r,this.queryParamsSubject=n,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(N(c=>c[vs]))??I(void 0),this.url=e,this.params=r,this.queryParams=n,this.fragment=o,this.data=i}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(N(e=>Fo(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(N(e=>Fo(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function oc(t,e,r="emptyOnly"){let n,{routeConfig:o}=t;return e!==null&&(r==="always"||o?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:D(D({},e.params),t.params),data:D(D({},e.data),t.data),resolve:D(D(D(D({},t.data),e.data),o?.data),t._resolvedData)}:n={params:D({},t.params),data:D({},t.data),resolve:D(D({},t.data),t._resolvedData??{})},o&&_w(o)&&(n.resolve[vs]=o.title),n}var Ro=class{get title(){return this.data?.[vs]}constructor(e,r,n,o,i,s,a,u,c){this.url=e,this.params=r,this.queryParams=n,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Fo(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Fo(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${r}')`}},ic=class extends nc{constructor(e,r){super(r),this.url=e,tp(this,r)}toString(){return xw(this._root)}};function tp(t,e){e.value._routerState=t,e.children.forEach(r=>tp(t,r))}function xw(t){let e=t.children.length>0?` { ${t.children.map(xw).join(", ")} } `:"";return`${t.value}${e}`}function xh(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,qt(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),qt(e.params,r.params)||t.paramsSubject.next(r.params),eR(e.url,r.url)||t.urlSubject.next(r.url),qt(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Wh(t,e){let r=qt(t.params,e.params)&&oR(t.url,e.url),n=!t.parent!=!e.parent;return r&&!n&&(!t.parent||Wh(t.parent,e.parent))}function _w(t){return typeof t.title=="string"||t.title===null}var _R=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=L,this.activateEvents=new G,this.deactivateEvents=new G,this.attachEvents=new G,this.detachEvents=new G,this.parentContexts=y(uc),this.location=y(dn),this.changeDetector=y(Nt),this.inputBinder=y(np,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:o,previousValue:i}=n.name;if(o)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new C(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new C(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new C(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,o){this.activated=n,this._activatedRoute=o,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,o){if(this.isActivated)throw new C(4013,!1);this._activatedRoute=n;let i=this.location,a=n.snapshot.component,u=this.parentContexts.getOrCreateContext(this.name).children,c=new qh(n,u,i.injector);this.activated=i.createComponent(a,{index:i.length,injector:c,environmentInjector:o}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=H({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[nt]});let t=e;return t})(),qh=class t{__ngOutletInjector(e){return new t(this.route,this.childContexts,e)}constructor(e,r,n){this.route=e,this.childContexts=r,this.parent=n}get(e,r){return e===Vr?this.route:e===uc?this.childContexts:this.parent.get(e,r)}},np=new E("");function MR(t,e,r){let n=hs(t,e._root,r?r._root:void 0);return new rc(n,e)}function hs(t,e,r){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let o=TR(t,e,r);return new at(n,o)}else{if(t.shouldAttach(e.value)){let i=t.retrieve(e.value);if(i!==null){let s=i.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>hs(t,a)),s}}let n=SR(e.value),o=e.children.map(i=>hs(t,i));return new at(n,o)}}function TR(t,e,r){return e.children.map(n=>{for(let o of r.children)if(t.shouldReuseRoute(n.value,o.value.snapshot))return hs(t,n,o);return hs(t,n)})}function SR(t){return new Vr(new Se(t.url),new Se(t.params),new Se(t.queryParams),new Se(t.fragment),new Se(t.data),t.outlet,t.component,t)}var ps=class{constructor(e,r){this.redirectTo=e,this.navigationBehaviorOptions=r}},Mw="ngNavigationCancelingError";function sc(t,e){let{redirectTo:r,navigationBehaviorOptions:n}=us(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,o=Tw(!1,ut.Redirect);return o.url=r,o.navigationBehaviorOptions=n,o}function Tw(t,e){let r=new Error(`NavigationCancelingError: ${t||""}`);return r[Mw]=!0,r.cancellationCode=e,r}function AR(t){return Sw(t)&&us(t.url)}function Sw(t){return!!t&&t[Mw]}var NR=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=Um({type:e,selectors:[["ng-component"]],standalone:!0,features:[dD],decls:1,vars:0,template:function(o,i){o&1&&Vf(0,"router-outlet")},dependencies:[_R],encapsulation:2});let t=e;return t})();function OR(t,e){return t.providers&&!t._injector&&(t._injector=Ff(t.providers,e,`Route: ${t.path}`)),t._injector??e}function rp(t){let e=t.children&&t.children.map(rp),r=e?$(D({},t),{children:e}):D({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==L&&(r.component=NR),r}function Rt(t){return t.outlet||L}function RR(t,e){let r=t.filter(n=>Rt(n)===e);return r.push(...t.filter(n=>Rt(n)!==e)),r}function ys(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let r=e.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}var PR=(t,e,r,n)=>N(o=>(new Zh(e,o.targetRouterState,o.currentRouterState,r,n).activate(t),o)),Zh=class{constructor(e,r,n,o,i){this.routeReuseStrategy=e,this.futureState=r,this.currState=n,this.forwardEvent=o,this.inputBindingEnabled=i}activate(e){let r=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,n,e),xh(this.futureState.root),this.activateChildRoutes(r,n,e)}deactivateChildRoutes(e,r,n){let o=No(r);e.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],n),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,n)})}deactivateRoutes(e,r,n){let o=e.value,i=r?r.value:null;if(o===i)if(o.component){let s=n.getContext(o.outlet);s&&this.deactivateChildRoutes(e,r,s.children)}else this.deactivateChildRoutes(e,r,n);else i&&this.deactivateRouteAndItsChildren(r,n)}deactivateRouteAndItsChildren(e,r){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,r):this.deactivateRouteAndOutlet(e,r)}detachAndStoreRouteSubtree(e,r){let n=r.getContext(e.value.outlet),o=n&&e.value.component?n.children:r,i=No(e);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,r){let n=r.getContext(e.value.outlet),o=n&&e.value.component?n.children:r,i=No(e);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,r,n){let o=No(r);e.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],n),this.forwardEvent(new $h(i.value.snapshot))}),e.children.length&&this.forwardEvent(new Uh(e.value.snapshot))}activateRoutes(e,r,n){let o=e.value,i=r?r.value:null;if(xh(o),o===i)if(o.component){let s=n.getOrCreateContext(o.outlet);this.activateChildRoutes(e,r,s.children)}else this.activateChildRoutes(e,r,n);else if(o.component){let s=n.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let a=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),xh(a.route.value),this.activateChildRoutes(e,null,s.children)}else{let a=ys(o.snapshot);s.attachRef=null,s.route=o,s.injector=a??s.injector,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,n)}},ac=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},Po=class{constructor(e,r){this.component=e,this.route=r}};function FR(t,e,r){let n=t._root,o=e?e._root:null;return ns(n,o,r,[n.value])}function LR(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function jo(t,e){let r=Symbol(),n=e.get(t,r);return n===r?typeof t=="function"&&!_m(t)?t:e.get(t):n}function ns(t,e,r,n,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=No(e);return t.children.forEach(s=>{kR(s,i[s.value.outlet],r,n.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>ss(a,r.getContext(s),o)),o}function kR(t,e,r,n,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=t.value,s=e?e.value:null,a=r?r.getContext(t.value.outlet):null;if(s&&i.routeConfig===s.routeConfig){let u=jR(s,i,i.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new ac(n)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?ns(t,e,a?a.children:null,n,o):ns(t,e,r,n,o),u&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new Po(a.outlet.component,s))}else s&&ss(e,a,o),o.canActivateChecks.push(new ac(n)),i.component?ns(t,null,a?a.children:null,n,o):ns(t,null,r,n,o);return o}function jR(t,e,r){if(typeof r=="function")return r(t,e);switch(r){case"pathParamsChange":return!kr(t.url,e.url);case"pathParamsOrQueryParamsChange":return!kr(t.url,e.url)||!qt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Wh(t,e)||!qt(t.queryParams,e.queryParams);case"paramsChange":default:return!Wh(t,e)}}function ss(t,e,r){let n=No(t),o=t.value;Object.entries(n).forEach(([i,s])=>{o.component?e?ss(s,e.children.getContext(i),r):ss(s,null,r):ss(s,e,r)}),o.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new Po(e.outlet.component,o)):r.canDeactivateChecks.push(new Po(null,o)):r.canDeactivateChecks.push(new Po(null,o))}function Ds(t){return typeof t=="function"}function VR(t){return typeof t=="boolean"}function UR(t){return t&&Ds(t.canLoad)}function BR(t){return t&&Ds(t.canActivate)}function $R(t){return t&&Ds(t.canActivateChild)}function HR(t){return t&&Ds(t.canDeactivate)}function zR(t){return t&&Ds(t.canMatch)}function Aw(t){return t instanceof Jt||t?.name==="EmptyError"}var Ku=Symbol("INITIAL_VALUE");function ko(){return be(t=>da(t.map(e=>e.pipe(xe(1),ga(Ku)))).pipe(N(e=>{for(let r of e)if(r!==!0){if(r===Ku)return Ku;if(r===!1||GR(r))return r}return!0}),ke(e=>e!==Ku),xe(1)))}function GR(t){return us(t)||t instanceof ps}function WR(t,e){return le(r=>{let{targetSnapshot:n,currentSnapshot:o,guards:{canActivateChecks:i,canDeactivateChecks:s}}=r;return s.length===0&&i.length===0?I($(D({},r),{guardsResult:!0})):qR(s,n,o,t).pipe(le(a=>a&&VR(a)?ZR(n,i,t,e):I(a)),N(a=>$(D({},r),{guardsResult:a})))})}function qR(t,e,r,n){return te(t).pipe(le(o=>XR(o.component,o.route,r,e,n)),jt(o=>o!==!0,!0))}function ZR(t,e,r,n){return te(e).pipe(kt(o=>tt(YR(o.route.parent,n),KR(o.route,n),JR(t,o.path,r),QR(t,o.route,r))),jt(o=>o!==!0,!0))}function KR(t,e){return t!==null&&e&&e(new Bh(t)),I(!0)}function YR(t,e){return t!==null&&e&&e(new Vh(t)),I(!0)}function QR(t,e,r){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return I(!0);let o=n.map(i=>Xt(()=>{let s=ys(e)??r,a=jo(i,s),u=BR(a)?a.canActivate(e,t):Tt(s,()=>a(e,t));return Jn(u).pipe(jt())}));return I(o).pipe(ko())}function JR(t,e,r){let n=e[e.length-1],i=e.slice(0,e.length-1).reverse().map(s=>LR(s)).filter(s=>s!==null).map(s=>Xt(()=>{let a=s.guards.map(u=>{let c=ys(s.node)??r,l=jo(u,c),d=$R(l)?l.canActivateChild(n,t):Tt(c,()=>l(n,t));return Jn(d).pipe(jt())});return I(a).pipe(ko())}));return I(i).pipe(ko())}function XR(t,e,r,n,o){let i=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!i||i.length===0)return I(!0);let s=i.map(a=>{let u=ys(e)??o,c=jo(a,u),l=HR(c)?c.canDeactivate(t,e,r,n):Tt(u,()=>c(t,e,r,n));return Jn(l).pipe(jt())});return I(s).pipe(ko())}function eP(t,e,r,n){let o=e.canLoad;if(o===void 0||o.length===0)return I(!0);let i=o.map(s=>{let a=jo(s,t),u=UR(a)?a.canLoad(e,r):Tt(t,()=>a(e,r));return Jn(u)});return I(i).pipe(ko(),Nw(n))}function Nw(t){return ml(Ce(e=>{if(typeof e!="boolean")throw sc(t,e)}),N(e=>e===!0))}function tP(t,e,r,n){let o=e.canMatch;if(!o||o.length===0)return I(!0);let i=o.map(s=>{let a=jo(s,t),u=zR(a)?a.canMatch(e,r):Tt(t,()=>a(e,r));return Jn(u)});return I(i).pipe(ko(),Nw(n))}var gs=class{constructor(e){this.segmentGroup=e||null}},ms=class extends Error{constructor(e){super(),this.urlTree=e}};function Ao(t){return Sn(new gs(t))}function nP(t){return Sn(new C(4e3,!1))}function rP(t){return Sn(Tw(!1,ut.GuardRejected))}var Kh=class{constructor(e,r){this.urlSerializer=e,this.urlTree=r}lineralizeSegments(e,r){let n=[],o=r.root;for(;;){if(n=n.concat(o.segments),o.numberOfChildren===0)return I(n);if(o.numberOfChildren>1||!o.children[L])return nP(`${e.redirectTo}`);o=o.children[L]}}applyRedirectCommands(e,r,n,o,i){if(typeof r!="string"){let a=r,{queryParams:u,fragment:c,routeConfig:l,url:d,outlet:f,params:h,data:p,title:g}=o,m=Tt(i,()=>a({params:h,data:p,queryParams:u,fragment:c,routeConfig:l,url:d,outlet:f,title:g}));if(m instanceof Qn)throw new ms(m);r=m}let s=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),e,n);if(r[0]==="/")throw new ms(s);return s}applyRedirectCreateUrlTree(e,r,n,o){let i=this.createSegmentGroup(e,r.root,n,o);return new Qn(i,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(e,r){let n={};return Object.entries(e).forEach(([o,i])=>{if(typeof i=="string"&&i[0]===":"){let a=i.substring(1);n[o]=r[a]}else n[o]=i}),n}createSegmentGroup(e,r,n,o){let i=this.createSegments(e,r.segments,n,o),s={};return Object.entries(r.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(e,u,n,o)}),new K(i,s)}createSegments(e,r,n,o){return r.map(i=>i.path[0]===":"?this.findPosParam(e,i,o):this.findOrReturn(i,n))}findPosParam(e,r,n){let o=n[r.path.substring(1)];if(!o)throw new C(4001,!1);return o}findOrReturn(e,r){let n=0;for(let o of r){if(o.path===e.path)return r.splice(n),o;n++}return e}},Yh={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function oP(t,e,r,n,o){let i=op(t,e,r);return i.matched?(n=OR(e,n),tP(n,e,r,o).pipe(N(s=>s===!0?i:D({},Yh)))):I(i)}function op(t,e,r){if(e.path==="**")return iP(r);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?D({},Yh):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let o=(e.matcher||XO)(r,t,e);if(!o)return D({},Yh);let i={};Object.entries(o.posParams??{}).forEach(([a,u])=>{i[a]=u.path});let s=o.consumed.length>0?D(D({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:r.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function iP(t){return{matched:!0,parameters:t.length>0?dw(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function sw(t,e,r,n){return r.length>0&&uP(t,r,n)?{segmentGroup:new K(e,aP(n,new K(r,t.children))),slicedSegments:[]}:r.length===0&&cP(t,r,n)?{segmentGroup:new K(t.segments,sP(t,r,n,t.children)),slicedSegments:r}:{segmentGroup:new K(t.segments,t.children),slicedSegments:r}}function sP(t,e,r,n){let o={};for(let i of r)if(cc(t,e,i)&&!n[Rt(i)]){let s=new K([],{});o[Rt(i)]=s}return D(D({},n),o)}function aP(t,e){let r={};r[L]=e;for(let n of t)if(n.path===""&&Rt(n)!==L){let o=new K([],{});r[Rt(n)]=o}return r}function uP(t,e,r){return r.some(n=>cc(t,e,n)&&Rt(n)!==L)}function cP(t,e,r){return r.some(n=>cc(t,e,n))}function cc(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function lP(t,e,r,n){return Rt(t)!==n&&(n===L||!cc(e,r,t))?!1:op(e,t,r).matched}function dP(t,e,r){return e.length===0&&!t.children[r]}var Qh=class{};function fP(t,e,r,n,o,i,s="emptyOnly"){return new Jh(t,e,r,n,o,s,i).recognize()}var hP=31,Jh=class{constructor(e,r,n,o,i,s,a){this.injector=e,this.configLoader=r,this.rootComponentType=n,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Kh(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new C(4002,`'${e.segmentGroup}'`)}recognize(){let e=sw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(N(({children:r,rootSnapshot:n})=>{let o=new at(n,r),i=new ic("",o),s=yR(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}}))}match(e){let r=new Ro([],Object.freeze({}),Object.freeze(D({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),L,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,L,r).pipe(N(n=>({children:n,rootSnapshot:r})),Nn(n=>{if(n instanceof ms)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof gs?this.noMatchError(n):n}))}processSegmentGroup(e,r,n,o,i){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,r,n,i):this.processSegment(e,r,n,n.segments,o,!0,i).pipe(N(s=>s instanceof at?[s]:[]))}processChildren(e,r,n,o){let i=[];for(let s of Object.keys(n.children))s==="primary"?i.unshift(s):i.push(s);return te(i).pipe(kt(s=>{let a=n.children[s],u=RR(r,s);return this.processSegmentGroup(e,u,a,s,o)}),pa((s,a)=>(s.push(...a),s)),On(null),xl(),le(s=>{if(s===null)return Ao(n);let a=Ow(s);return pP(a),I(a)}))}processSegment(e,r,n,o,i,s,a){return te(r).pipe(kt(u=>this.processSegmentAgainstRoute(u._injector??e,r,u,n,o,i,s,a).pipe(Nn(c=>{if(c instanceof gs)return I(null);throw c}))),jt(u=>!!u),Nn(u=>{if(Aw(u))return dP(n,o,i)?I(new Qh):Ao(n);throw u}))}processSegmentAgainstRoute(e,r,n,o,i,s,a,u){return lP(n,o,i,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,o,n,i,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,o,r,n,i,s,u):Ao(o):Ao(o)}expandSegmentAgainstRouteUsingRedirect(e,r,n,o,i,s,a){let{matched:u,parameters:c,consumedSegments:l,positionalParamSegments:d,remainingSegments:f}=op(r,o,i);if(!u)return Ao(r);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>hP&&(this.allowRedirects=!1));let h=new Ro(i,c,Object.freeze(D({},this.urlTree.queryParams)),this.urlTree.fragment,aw(o),Rt(o),o.component??o._loadedComponent??null,o,uw(o)),p=oc(h,a,this.paramsInheritanceStrategy);h.params=Object.freeze(p.params),h.data=Object.freeze(p.data);let g=this.applyRedirects.applyRedirectCommands(l,o.redirectTo,d,h,e);return this.applyRedirects.lineralizeSegments(o,g).pipe(le(m=>this.processSegment(e,n,r,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(e,r,n,o,i,s){let a=oP(r,n,o,e,this.urlSerializer);return n.path==="**"&&(r.children={}),a.pipe(be(u=>u.matched?(e=n._injector??e,this.getChildConfig(e,n,o).pipe(be(({routes:c})=>{let l=n._loadedInjector??e,{parameters:d,consumedSegments:f,remainingSegments:h}=u,p=new Ro(f,d,Object.freeze(D({},this.urlTree.queryParams)),this.urlTree.fragment,aw(n),Rt(n),n.component??n._loadedComponent??null,n,uw(n)),g=oc(p,s,this.paramsInheritanceStrategy);p.params=Object.freeze(g.params),p.data=Object.freeze(g.data);let{segmentGroup:m,slicedSegments:v}=sw(r,f,h,c);if(v.length===0&&m.hasChildren())return this.processChildren(l,c,m,p).pipe(N(z=>new at(p,z)));if(c.length===0&&v.length===0)return I(new at(p,[]));let A=Rt(n)===i;return this.processSegment(l,c,m,v,A?L:i,!0,p).pipe(N(z=>new at(p,z instanceof at?[z]:[])))}))):Ao(r)))}getChildConfig(e,r,n){return r.children?I({routes:r.children,injector:e}):r.loadChildren?r._loadedRoutes!==void 0?I({routes:r._loadedRoutes,injector:r._loadedInjector}):eP(e,r,n,this.urlSerializer).pipe(le(o=>o?this.configLoader.loadChildren(e,r).pipe(Ce(i=>{r._loadedRoutes=i.routes,r._loadedInjector=i.injector})):rP(r))):I({routes:[],injector:e})}};function pP(t){t.sort((e,r)=>e.value.outlet===L?-1:r.value.outlet===L?1:e.value.outlet.localeCompare(r.value.outlet))}function gP(t){let e=t.value.routeConfig;return e&&e.path===""}function Ow(t){let e=[],r=new Set;for(let n of t){if(!gP(n)){e.push(n);continue}let o=e.find(i=>n.value.routeConfig===i.value.routeConfig);o!==void 0?(o.children.push(...n.children),r.add(o)):e.push(n)}for(let n of r){let o=Ow(n.children);e.push(new at(n.value,o))}return e.filter(n=>!r.has(n))}function aw(t){return t.data||{}}function uw(t){return t.resolve||{}}function mP(t,e,r,n,o,i){return le(s=>fP(t,e,r,n,s.extractedUrl,o,i).pipe(N(({state:a,tree:u})=>$(D({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function vP(t,e){return le(r=>{let{targetSnapshot:n,guards:{canActivateChecks:o}}=r;if(!o.length)return I(r);let i=new Set(o.map(u=>u.route)),s=new Set;for(let u of i)if(!s.has(u))for(let c of Rw(u))s.add(c);let a=0;return te(s).pipe(kt(u=>i.has(u)?yP(u,n,t,e):(u.data=oc(u,u.parent,t).resolve,I(void 0))),Ce(()=>a++),io(1),le(u=>a===s.size?I(r):Ae))})}function Rw(t){let e=t.children.map(r=>Rw(r)).flat();return[t,...e]}function yP(t,e,r,n){let o=t.routeConfig,i=t._resolve;return o?.title!==void 0&&!_w(o)&&(i[vs]=o.title),DP(i,t,e,n).pipe(N(s=>(t._resolvedData=s,t.data=oc(t,t.parent,r).resolve,null)))}function DP(t,e,r,n){let o=Th(t);if(o.length===0)return I({});let i={};return te(o).pipe(le(s=>wP(t[s],e,r,n).pipe(jt(),Ce(a=>{if(a instanceof ps)throw sc(new as,a);i[s]=a}))),io(1),Ei(i),Nn(s=>Aw(s)?Ae:Sn(s)))}function wP(t,e,r,n){let o=ys(e)??n,i=jo(t,o),s=i.resolve?i.resolve(e,r):Tt(o,()=>i(e,r));return Jn(s)}function _h(t){return be(e=>{let r=t(e);return r?te(r).pipe(N(()=>e)):I(e)})}var Pw=(()=>{let e=class e{buildTitle(n){let o,i=n.root;for(;i!==void 0;)o=this.getResolvedTitleForRoute(i)??o,i=i.children.find(s=>s.outlet===L);return o}getResolvedTitleForRoute(n){return n.data[vs]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(bP),providedIn:"root"});let t=e;return t})(),bP=(()=>{let e=class e extends Pw{constructor(n){super(),this.title=n}updateTitle(n){let o=this.buildTitle(n);o!==void 0&&this.title.setTitle(o)}};e.\u0275fac=function(o){return new(o||e)(x(tw))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ip=new E("",{providedIn:"root",factory:()=>({})}),sp=new E(""),CP=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=y($f)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return I(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let o=Jn(n.loadComponent()).pipe(N(Fw),Ce(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),Rn(()=>{this.componentLoaders.delete(n)})),i=new eo(o,()=>new se).pipe(Xr());return this.componentLoaders.set(n,i),i}loadChildren(n,o){if(this.childrenLoaders.get(o))return this.childrenLoaders.get(o);if(o._loadedRoutes)return I({routes:o._loadedRoutes,injector:o._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(o);let s=EP(o,this.compiler,n,this.onLoadEndListener).pipe(Rn(()=>{this.childrenLoaders.delete(o)})),a=new eo(s,()=>new se).pipe(Xr());return this.childrenLoaders.set(o,a),a}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function EP(t,e,r,n){return Jn(t.loadChildren()).pipe(N(Fw),le(o=>o instanceof Pi||Array.isArray(o)?I(o):te(e.compileModuleAsync(o))),N(o=>{n&&n(t);let i,s,a=!1;return Array.isArray(o)?(s=o,a=!0):(i=o.create(r).injector,s=i.get(sp,[],{optional:!0,self:!0}).flat()),{routes:s.map(rp),injector:i}}))}function IP(t){return t&&typeof t=="object"&&"default"in t}function Fw(t){return IP(t)?t.default:t}var ap=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(xP),providedIn:"root"});let t=e;return t})(),xP=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,o){return n}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),_P=new E("");var MP=new E(""),TP=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new se,this.transitionAbortSubject=new se,this.configLoader=y(CP),this.environmentInjector=y(Qe),this.urlSerializer=y(ep),this.rootContexts=y(uc),this.location=y(qi),this.inputBindingEnabled=y(np,{optional:!0})!==null,this.titleStrategy=y(Pw),this.options=y(ip,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=y(ap),this.createViewTransition=y(_P,{optional:!0}),this.navigationErrorHandler=y(MP,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>I(void 0),this.rootComponentType=null;let n=i=>this.events.next(new kh(i)),o=i=>this.events.next(new jh(i));this.configLoader.onLoadEndListener=o,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let o=++this.navigationId;this.transitions?.next($(D(D({},this.transitions.value),n),{id:o}))}setupNavigations(n,o,i){return this.transitions=new Se({id:0,currentUrlTree:o,currentRawUrl:o,extractedUrl:this.urlHandlingStrategy.extract(o),urlAfterRedirects:this.urlHandlingStrategy.extract(o),rawUrl:o,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:is,restoredState:null,currentSnapshot:i.snapshot,targetSnapshot:null,currentRouterState:i,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ke(s=>s.id!==0),N(s=>$(D({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),be(s=>{let a=!1,u=!1;return I(s).pipe(be(c=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",ut.SupersededByNewNavigation),Ae;this.currentTransition=s,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?$(D({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=c.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&d!=="reload"){let f="";return this.events.next(new jr(c.id,this.urlSerializer.serialize(c.rawUrl),f,Oh.IgnoredSameUrlNavigation)),c.resolve(!1),Ae}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return I(c).pipe(be(f=>{let h=this.transitions?.getValue();return this.events.next(new ls(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),h!==this.transitions?.getValue()?Ae:Promise.resolve(f)}),mP(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Ce(f=>{s.targetSnapshot=f.targetSnapshot,s.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation=$(D({},this.currentNavigation),{finalUrl:f.urlAfterRedirects});let h=new tc(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(h)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=c,v=new ls(f,this.urlSerializer.serialize(h),p,g);this.events.next(v);let A=Iw(this.rootComponentType).snapshot;return this.currentTransition=s=$(D({},c),{targetSnapshot:A,urlAfterRedirects:h,extras:$(D({},m),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=h,I(s)}else{let f="";return this.events.next(new jr(c.id,this.urlSerializer.serialize(c.extractedUrl),f,Oh.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ae}}),Ce(c=>{let l=new Rh(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(l)}),N(c=>(this.currentTransition=s=$(D({},c),{guards:FR(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),s)),WR(this.environmentInjector,c=>this.events.next(c)),Ce(c=>{if(s.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw sc(this.urlSerializer,c.guardsResult);let l=new Ph(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(l)}),ke(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",ut.GuardRejected),!1)),_h(c=>{if(c.guards.canActivateChecks.length)return I(c).pipe(Ce(l=>{let d=new Fh(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}),be(l=>{let d=!1;return I(l).pipe(vP(this.paramsInheritanceStrategy,this.environmentInjector),Ce({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(l,"",ut.NoDataFromResolver)}}))}),Ce(l=>{let d=new Lh(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}))}),_h(c=>{let l=d=>{let f=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(d.routeConfig).pipe(Ce(h=>{d.component=h}),N(()=>{})));for(let h of d.children)f.push(...l(h));return f};return da(l(c.targetSnapshot.root)).pipe(On(null),xe(1))}),_h(()=>this.afterPreactivation()),be(()=>{let{currentSnapshot:c,targetSnapshot:l}=s,d=this.createViewTransition?.(this.environmentInjector,c.root,l.root);return d?te(d).pipe(N(()=>s)):I(s)}),N(c=>{let l=MR(n.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=s=$(D({},c),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,s}),Ce(()=>{this.events.next(new fs)}),PR(this.rootContexts,n.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),xe(1),Ce({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Dn(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),ma(this.transitionAbortSubject.pipe(Ce(c=>{throw c}))),Rn(()=>{!a&&!u&&this.cancelNavigationTransition(s,"",ut.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Nn(c=>{if(u=!0,Sw(c))this.events.next(new yn(s.id,this.urlSerializer.serialize(s.extractedUrl),c.message,c.cancellationCode)),AR(c)?this.events.next(new Lo(c.url,c.navigationBehaviorOptions)):s.resolve(!1);else{let l=new ds(s.id,this.urlSerializer.serialize(s.extractedUrl),c,s.targetSnapshot??void 0);try{let d=Tt(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(d instanceof ps){let{message:f,cancellationCode:h}=sc(this.urlSerializer,d);this.events.next(new yn(s.id,this.urlSerializer.serialize(s.extractedUrl),f,h)),this.events.next(new Lo(d.redirectTo,d.navigationBehaviorOptions))}else{this.events.next(l);let f=n.errorHandler(c);s.resolve(!!f)}}catch(d){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(d)}}return Ae}))}))}cancelNavigationTransition(n,o,i){let s=new yn(n.id,this.urlSerializer.serialize(n.extractedUrl),o,i);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function SP(t){return t!==is}var AP=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(NP),providedIn:"root"});let t=e;return t})(),Xh=class{shouldDetach(e){return!1}store(e,r){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,r){return e.routeConfig===r.routeConfig}},NP=(()=>{let e=class e extends Xh{};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Lw=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(OP),providedIn:"root"});let t=e;return t})(),OP=(()=>{let e=class e extends Lw{constructor(){super(...arguments),this.location=y(qi),this.urlSerializer=y(ep),this.options=y(ip,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=y(ap),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Qn,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Iw(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(o=>{o.type==="popstate"&&n(o.url,o.state)})}handleRouterEvent(n,o){if(n instanceof ls)this.stateMemento=this.createStateMemento();else if(n instanceof jr)this.rawUrlTree=o.initialUrl;else if(n instanceof tc){if(this.urlUpdateStrategy==="eager"&&!o.extras.skipLocationChange){let i=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl);this.setBrowserUrl(i,o)}}else n instanceof fs?(this.currentUrlTree=o.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl),this.routerState=o.targetRouterState,this.urlUpdateStrategy==="deferred"&&(o.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,o))):n instanceof yn&&(n.code===ut.GuardRejected||n.code===ut.NoDataFromResolver)?this.restoreHistory(o):n instanceof ds?this.restoreHistory(o,!0):n instanceof Dn&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,o){let i=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(i)||o.extras.replaceUrl){let s=this.browserPageId,a=D(D({},o.extras.state),this.generateNgRouterState(o.id,s));this.location.replaceState(i,"",a)}else{let s=D(D({},o.extras.state),this.generateNgRouterState(o.id,this.browserPageId+1));this.location.go(i,"",s)}}restoreHistory(n,o=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,s=this.currentPageId-i;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(o&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,o){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:o}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),rs=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(rs||{});function RP(t,e){t.events.pipe(ke(r=>r instanceof Dn||r instanceof yn||r instanceof ds||r instanceof jr),N(r=>r instanceof Dn||r instanceof jr?rs.COMPLETE:(r instanceof yn?r.code===ut.Redirect||r.code===ut.SupersededByNewNavigation:!1)?rs.REDIRECTING:rs.FAILED),ke(r=>r!==rs.REDIRECTING),xe(1)).subscribe(()=>{e()})}function PP(t){throw t}var FP={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},LP={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},lc=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=y(Mu),this.stateManager=y(Lw),this.options=y(ip,{optional:!0})||{},this.pendingTasks=y(Hn),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=y(TP),this.urlSerializer=y(ep),this.location=y(qi),this.urlHandlingStrategy=y(ap),this._events=new se,this.errorHandler=this.options.errorHandler||PP,this.navigated=!1,this.routeReuseStrategy=y(AP),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=y(sp,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!y(np,{optional:!0}),this.eventsSubscription=new ie,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(o=>{try{let i=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(i!==null&&s!==null){if(this.stateManager.handleRouterEvent(o,s),o instanceof yn&&o.code!==ut.Redirect&&o.code!==ut.SupersededByNewNavigation)this.navigated=!0;else if(o instanceof Dn)this.navigated=!0;else if(o instanceof Lo){let a=o.navigationBehaviorOptions,u=this.urlHandlingStrategy.merge(o.url,i.currentRawUrl),c=D({info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||SP(i.source)},a);this.scheduleNavigation(u,is,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}jP(o)&&this._events.next(o)}catch(i){this.navigationTransitions.transitionAbortSubject.next(i)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),is,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,o)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",o)},0)})}navigateToSyncWithBrowser(n,o,i){let s={replaceUrl:!0},a=i?.navigationId?i:null;if(i){let c=D({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(s.state=c)}let u=this.parseUrl(n);this.scheduleNavigation(u,o,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(rp),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,o={}){let{relativeTo:i,queryParams:s,fragment:a,queryParamsHandling:u,preserveFragment:c}=o,l=c?this.currentUrlTree.fragment:a,d=null;switch(u){case"merge":d=D(D({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let f;try{let h=i?i.snapshot:this.routerState.snapshot.root;f=ww(h)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),f=this.currentUrlTree.root}return bw(f,n,d,l??null)}navigateByUrl(n,o={skipLocationChange:!1}){let i=us(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(s,is,null,o)}navigate(n,o={skipLocationChange:!1}){return kP(n),this.navigateByUrl(this.createUrlTree(n,o),o)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,o){let i;if(o===!0?i=D({},FP):o===!1?i=D({},LP):i=o,us(n))return nw(this.currentUrlTree,n,i);let s=this.parseUrl(n);return nw(this.currentUrlTree,s,i)}removeEmptyProps(n){return Object.entries(n).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{})}scheduleNavigation(n,o,i,s,a){if(this.disposed)return Promise.resolve(!1);let u,c,l;a?(u=a.resolve,c=a.reject,l=a.promise):l=new Promise((f,h)=>{u=f,c=h});let d=this.pendingTasks.add();return RP(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:o,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:u,reject:c,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(f=>Promise.reject(f))}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function kP(t){for(let e=0;e{let e=class e{constructor(n,o,i,s,a,u){this.router=n,this.route=o,this.tabIndexAttribute=i,this.renderer=s,this.el=a,this.locationStrategy=u,this.href=null,this.commands=null,this.onChanges=new se,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let c=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area",this.isAnchorElement?this.subscription=n.events.subscribe(l=>{l instanceof Dn&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,o,i,s,a){let u=this.urlTree;if(u===null||this.isAnchorElement&&(n!==0||o||i||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(u,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let n=this.urlTree;this.href=n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;let o=this.href===null?null:Jv(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",o)}applyAttributeValue(n,o){let i=this.renderer,s=this.el.nativeElement;o!==null?i.setAttribute(s,n,o):i.removeAttribute(s,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};e.\u0275fac=function(o){return new(o||e)(w(lc),w(Vr),gf("tabindex"),w(rt),w(_e),w(qn))},e.\u0275dir=H({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(o,i){o&1&&ht("click",function(a){return i.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),o&2&&Rr("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Wn],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Wn],replaceUrl:[2,"replaceUrl","replaceUrl",Wn],routerLink:"routerLink"},standalone:!0,features:[Pf,nt]});let t=e;return t})(),c7=(()=>{let e=class e{get isActive(){return this._isActive}constructor(n,o,i,s,a){this.router=n,this.element=o,this.renderer=i,this.cdr=s,this.link=a,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new G,this.routerEventsSubscription=n.events.subscribe(u=>{u instanceof Dn&&this.update()})}ngAfterContentInit(){I(this.links.changes,I(null)).pipe(An()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(o=>!!o).map(o=>o.onChanges);this.linkInputChangesSubscription=te(n).pipe(An()).subscribe(o=>{this._isActive!==this.isLinkActive(this.router)(o)&&this.update()})}set routerLinkActive(n){let o=Array.isArray(n)?n:n.split(" ");this.classes=o.filter(i=>!!i)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let n=this.hasActiveLinks();this.classes.forEach(o=>{n?this.renderer.addClass(this.element.nativeElement,o):this.renderer.removeClass(this.element.nativeElement,o)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.isActiveChange.emit(n))})}isLinkActive(n){let o=VP(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let s=i.urlTree;return s?n.isActive(s,o):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}};e.\u0275fac=function(o){return new(o||e)(w(lc),w(_e),w(rt),w(Nt),w(cw,8))},e.\u0275dir=H({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(o,i,s){if(o&1&&sD(s,cw,5),o&2){let a;aD(a=uD())&&(i.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[nt]});let t=e;return t})();function VP(t){return!!t.paths}var UP=new E("");function l7(t,...e){return ji([{provide:sp,multi:!0,useValue:t},[],{provide:Vr,useFactory:BP,deps:[lc]},{provide:Tu,multi:!0,useFactory:HP},e.map(r=>r.\u0275providers)])}function BP(t){return t.routerState.root}function $P(t,e){return{\u0275kind:t,\u0275providers:e}}function HP(){let t=y(rn);return e=>{let r=t.get(Pr);if(e!==r.components[0])return;let n=t.get(lc),o=t.get(zP);t.get(GP)===1&&n.initialNavigation(),t.get(WP,null,j.Optional)?.setUpPreloading(),t.get(UP,null,j.Optional)?.init(),n.resetRootComponentType(r.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var zP=new E("",{factory:()=>new se}),GP=new E("",{providedIn:"root",factory:()=>1});var WP=new E("");function d7(){return $P(6,[{provide:qn,useClass:ND}])}function kw(t){let e=t.split(/\D/).map(r=>Number(r));return new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5])}function jw(t){let e=t.split(/\D/).map(r=>Number(r));return new Date(e[0],e[1]-1,e[2])}function Vw(t){return up(t)+`T${ws(t.getHours())}:${ws(t.getMinutes())}:${ws(t.getSeconds())}`}function up(t){return`${t.getFullYear()}-${ws(t.getMonth()+1)}-${ws(t.getDate())}`}function ws(t){return("0"+t).slice(-2)}var qP=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n=t}:t;return function(){var n=Array.from(arguments);return r(arguments)?e.apply(this,n):function(o){return e.apply(void 0,qP([o],n,!1))}}};var Bw=function(t){return t._tag==="Left"};var $w=function(t){return{_tag:"Left",left:t}},Hw=function(t){return{_tag:"Right",right:t}};function cp(t){return function(e,r){return t.map(e,function(){return r})}}function zw(t){var e=cp(t);return function(r){return e(r,void 0)}}function Gw(t){return function(e,r){return t.chain(e,function(n){return t.map(r(n),function(){return n})})}}var fc=$w,bs=Hw,Ww=dc(2,function(t,e){return he(t)?t:e(t.right)}),qw=function(t,e){return Xn(t,QP(e))},YP=function(t,e){return Xn(t,XP(e))};var lp="Either";var QP=function(t){return function(e){return he(e)?e:bs(t(e.right))}},Zw={URI:lp,map:qw},R7=dc(2,cp(Zw)),P7=zw(Zw);var JP=function(t){return function(e){return he(e)?e:he(t)?t:bs(e.right(t.right))}},XP=JP;var eF={URI:lp,map:qw,ap:YP,chain:Ww};var tF={URI:lp,fromEither:Uw};var he=Bw;var nF=function(t,e){return function(r){return he(r)?t(r.left):e(r.right)}};var rF=nF,hc=rF;var F7=dc(2,Gw(eF));var L7={fromEither:tF.fromEither};var oF=function(t){return function(e){return he(e)?t(e.left):e}},k7=oF;var dp=Ww;var Q=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vo=function(){return Vo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r")}function er(t,e,r,n){for(var o=t.length,i=Array(o+1),s=0;s")}function sF(t,e,r,n){n===void 0&&(n="{ [K in ".concat(e.name,"]: ").concat(r.name," }"));for(var o=t.length,i={},s=0;s0?$r(s):Y(c?i:n)}return Jw(e)&&Array.isArray(n)?Y(n):de(n,o)},t.encode===Z&&e.encode===Z?function(n){return Kw(n,t)}:function(n){for(var o={},i=Object.keys(Kw(n,t)),s=i.length,a=0;a")}function lF(t){return t.length>0}var ct={};function rb(t,e){for(var r=[],n=0,o=t;n")),new FF(e,function(r){return Xw.is(r)&&r.every(t.is)},function(r,n){var o=Xw.validate(r,n);if(he(o))return o;for(var i=o.right,s=i.length,a=i,u=[],c=0;c0?$r(u):Y(a)},t.encode===Z?Z:function(r){return r.map(t.encode)},t)}var LF=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.props=s,a._tag="InterfaceType",a}return e}(B);function mt(t,e){e===void 0&&(e=eb(t));var r=Object.keys(t),n=r.map(function(i){return t[i]}),o=r.length;return new LF(e,function(i){if(Pt.is(i)){for(var s=0;s0?$r(l):Y(c)},pc(n)?Z:function(i){for(var s=Vo({},i),a=0;a0?$r(l):Y(c)},pc(n)?Z:function(i){for(var s=Vo({},i),a=0;a0){var n=r[0],o=r[1],i=o.length,s=function(a){for(var u=0;u0?$r(s):Y(Yw(n,i))},t.length===0?Z:function(n){return Yw(n,t.map(function(o){return o.encode(n)}))},t)}var Z7=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.types=s,a._tag="TupleType",a}return e}(B);var VF=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.type=s,a._tag="ReadonlyType",a}return e}(B);function K7(t,e){return e===void 0&&(e="Readonly<".concat(t.name,">")),new VF(e,t.is,t.validate,t.encode,t)}var UF=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.type=s,a._tag="ReadonlyArrayType",a}return e}(B);function db(t,e){e===void 0&&(e="ReadonlyArray<".concat(t.name,">"));var r=Ge(t);return new UF(e,r.is,r.validate,r.encode,t)}var BF=function(t,e){return HF(mt(t),e)},$F=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.type=s,a._tag="ExactType",a}return e}(B);function HF(t,e){e===void 0&&(e=cF(t));var r=pp(t);return new $F(e,t.is,function(n,o){var i=Pt.validate(n,o);if(he(i))return i;var s=t.validate(n,o);return he(s)?s:bs(Qw(s.right,r))},function(n){return t.encode(Qw(n,r))},t)}var zF=function(t){Q(e,t);function e(){var r=t.call(this,"Function",function(n){return typeof n=="function"},function(n,o){return r.is(n)?Y(n):de(n,o)},Z)||this;return r._tag="FunctionType",r}return e}(B);var Y7=new zF,GF=function(t){Q(e,t);function e(){var r=t.call(this,"never",function(n){return!1},function(n,o){return de(n,o)},function(){throw new Error("cannot encode never")})||this;return r._tag="NeverType",r}return e}(B);var Q7=new GF,WF=function(t){Q(e,t);function e(){var r=t.call(this,"any",function(n){return!0},Y,Z)||this;return r._tag="AnyType",r}return e}(B);var J7=new WF;function fb(t,e,r){return r===void 0&&(r="(".concat(t.name," | ").concat(gp(e),")")),new RF(r,function(n){return t.is(n)&&e(n)},function(n,o){var i=t.validate(n,o);if(he(i))return i;var s=i.right;return e(s)?Y(s):de(s,o)},t.encode,t,e)}var X7=fb(ge,Number.isInteger,"Integer"),qF=function(t){Q(e,t);function e(r,n,o,i,s,a){var u=t.call(this,r,n,o,i,s)||this;return u.tag=a,u}return e}(lb);var eZ=function(t){return[{key:"",type:t}]};var ZF=function(t){Q(e,t);function e(){var r=t.call(this,"object",function(n){return n!==null&&typeof n=="object"},function(n,o){return r.is(n)?Y(n):de(n,o)},Z)||this;return r._tag="ObjectType",r}return e}(B);var tZ=new ZF;var nZ=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.props=s,a._tag="StrictType",a}return e}(B);var KF=mp("JsonArray",function(){return db(vp)}),YF=mp("JsonRecord",function(){return Bo(ee,vp)}),vp=Is([ab,ge,ee,Es,KF,YF],"Json"),hb=new B("JsonFromString",vp.is,function(t,e){try{return Y(JSON.parse(t))}catch{return de(t,e)}},function(t){return JSON.stringify(t)});function _s(t){return Is([Es,t])}function uZ(t){return Is([Es,Cs,t])}var cZ=mt({Id:ge,HRef:_s(ee)});var lZ=mt({Id:_s(ge),HRef:_s(ee)});var dZ=ee.pipe(hb,"JsonFromUnknown"),fZ=new B("LocalDateTimeFromString",t=>t instanceof Date,(t,e)=>Xn(ee.validate(t,e),dp(r=>{let n=kw(r);return isNaN(n.getTime())?de(t,e):Y(n)})),t=>Vw(t)),hZ=new B("LocalDateTimeFromString",t=>t instanceof Date,(t,e)=>Xn(ee.validate(t,e),dp(r=>{let n=jw(r);return isNaN(n.getTime())?de(t,e):Y(n)})),t=>up(t));function gZ(t,e){return e.reduce((r,n)=>$(D({},r),{[n]:t[n]}),{})}function pb(t,e){let r=n=>Object.values(e).includes(n);return new B(t,r,(n,o)=>r(n)?Y(n):de(n,o),Z)}var gb=function(t){return t.Crystal="crystal",t.Excel="excel",t}(gb||{}),Hr=mt({type:pb("ReportType",gb),id:ge});var QF=mt({de:mt({label:ee,description:ee}),fr:mt({label:ee,description:ee})}),JF=Bo(ee,QF),XF=mt({roles:Ge(ee),types:Ge(ee)}),e1=mt({substitutionsAdminLink:ee}),bZ=mt({apiUrl:ee,scriptsAndAssetsPath:ee,paginationLimit:ge,absencePresenceTypeId:ge,latePresenceTypeId:ge,dispensationPresenceTypeId:ge,halfDayPresenceTypeId:ge,unconfirmedAbsenceStateId:ge,unexcusedAbsenceStateId:ge,excusedAbsenceStateId:ge,checkableAbsenceStateId:ge,lessonPresencesRefreshTime:ge,unconfirmedAbsencesRefreshTime:_s(ge),personMasterDataReports:Ge(Hr),studentConfirmationReports:Ge(Hr),evaluateAbsencesReports:Ge(Hr),myAbsencesReports:Ge(Hr),testsByCourseReports:Ge(Hr),testsBySubscriptionStudentReports:Ge(Hr),testsBySubscriptionTeacherReports:Ge(Hr),subscriptionDetailGroupId:ge,headerRoleRestriction:Bo(ee,ee),notificationTypes:JF,notificationTypesAssignments:Ge(XF),eventlist:Bo(ee,ee),dashboard:e1,preventStudentAbsenceAfterLessonStart:Ge(ee)});var CZ=new E("Application Settings",{providedIn:"root",factory:()=>window.schulverwaltung.settings});var xb=(()=>{let e=class e{constructor(n,o){this._renderer=n,this._elementRef=o,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(n,o){this._renderer.setProperty(this._elementRef.nativeElement,n,o)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(o){return new(o||e)(w(rt),w(_e))},e.\u0275dir=H({type:e});let t=e;return t})(),qo=(()=>{let e=class e extends xb{};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,features:[Ie]});let t=e;return t})(),bn=new E(""),t1={provide:bn,useExisting:Re(()=>n1),multi:!0},n1=(()=>{let e=class e extends qo{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(o,i){o&1&&ht("change",function(a){return i.onChange(a.target.checked)})("blur",function(){return i.onTouched()})},features:[He([t1]),Ie]});let t=e;return t})(),r1={provide:bn,useExisting:Re(()=>_b),multi:!0};function o1(){let t=mn()?mn().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var i1=new E(""),_b=(()=>{let e=class e extends xb{constructor(n,o,i){super(n,o),this._compositionMode=i,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!o1())}writeValue(n){let o=n??"";this.setProperty("value",o)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(o){return new(o||e)(w(rt),w(_e),w(i1,8))},e.\u0275dir=H({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(o,i){o&1&&ht("input",function(a){return i._handleInput(a.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(a){return i._compositionEnd(a.target.value)})},features:[He([r1]),Ie]});let t=e;return t})();function tr(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}function Mb(t){return t!=null&&typeof t.length=="number"}var rr=new E(""),Rs=new E(""),s1=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mb=class{static min(e){return Tb(e)}static max(e){return Sb(e)}static required(e){return Ab(e)}static requiredTrue(e){return a1(e)}static email(e){return u1(e)}static minLength(e){return c1(e)}static maxLength(e){return l1(e)}static pattern(e){return d1(e)}static nullValidator(e){return mc(e)}static compose(e){return Lb(e)}static composeAsync(e){return kb(e)}};function Tb(t){return e=>{if(tr(e.value)||tr(t))return null;let r=parseFloat(e.value);return!isNaN(r)&&r{if(tr(e.value)||tr(t))return null;let r=parseFloat(e.value);return!isNaN(r)&&r>t?{max:{max:t,actual:e.value}}:null}}function Ab(t){return tr(t.value)?{required:!0}:null}function a1(t){return t.value===!0?null:{required:!0}}function u1(t){return tr(t.value)||s1.test(t.value)?null:{email:!0}}function c1(t){return e=>tr(e.value)||!Mb(e.value)?null:e.value.lengthMb(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function d1(t){if(!t)return mc;let e,r;return typeof t=="string"?(r="",t.charAt(0)!=="^"&&(r+="^"),r+=t,t.charAt(t.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=t.toString(),e=t),n=>{if(tr(n.value))return null;let o=n.value;return e.test(o)?null:{pattern:{requiredPattern:r,actualValue:o}}}}function mc(t){return null}function Nb(t){return t!=null}function Ob(t){return Gn(t)?te(t):t}function Rb(t){let e={};return t.forEach(r=>{e=r!=null?D(D({},e),r):e}),Object.keys(e).length===0?null:e}function Pb(t,e){return e.map(r=>r(t))}function f1(t){return!t.validate}function Fb(t){return t.map(e=>f1(e)?e:r=>e.validate(r))}function Lb(t){if(!t)return null;let e=t.filter(Nb);return e.length==0?null:function(r){return Rb(Pb(r,e))}}function Ep(t){return t!=null?Lb(Fb(t)):null}function kb(t){if(!t)return null;let e=t.filter(Nb);return e.length==0?null:function(r){let n=Pb(r,e).map(Ob);return Ci(n).pipe(N(Rb))}}function Ip(t){return t!=null?kb(Fb(t)):null}function vb(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function jb(t){return t._rawValidators}function Vb(t){return t._rawAsyncValidators}function yp(t){return t?Array.isArray(t)?t:[t]:[]}function vc(t,e){return Array.isArray(t)?t.includes(e):t===e}function yb(t,e){let r=yp(e);return yp(t).forEach(o=>{vc(r,o)||r.push(o)}),r}function Db(t,e){return yp(e).filter(r=>!vc(t,r))}var yc=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Ep(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Ip(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},wn=class extends yc{get formDirective(){return null}get path(){return null}},Zt=class extends yc{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},Dc=class{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},h1={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},VZ=$(D({},h1),{"[class.ng-submitted]":"isSubmitted"}),UZ=(()=>{let e=class e extends Dc{constructor(n){super(n)}};e.\u0275fac=function(o){return new(o||e)(w(Zt,2))},e.\u0275dir=H({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(o,i){o&2&&xu("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Ie]});let t=e;return t})(),BZ=(()=>{let e=class e extends Dc{constructor(n){super(n)}};e.\u0275fac=function(o){return new(o||e)(w(wn,10))},e.\u0275dir=H({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(o,i){o&2&&xu("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Ie]});let t=e;return t})();var Ms="VALID",gc="INVALID",$o="PENDING",Ts="DISABLED",nr=class{},wc=class extends nr{constructor(e,r){super(),this.value=e,this.source=r}},As=class extends nr{constructor(e,r){super(),this.pristine=e,this.source=r}},Ns=class extends nr{constructor(e,r){super(),this.touched=e,this.source=r}},Ho=class extends nr{constructor(e,r){super(),this.status=e,this.source=r}},Dp=class extends nr{constructor(e){super(),this.source=e}},wp=class extends nr{constructor(e){super(),this.source=e}};function xp(t){return(Ic(t)?t.validators:t)||null}function p1(t){return Array.isArray(t)?Ep(t):t||null}function _p(t,e){return(Ic(e)?e.asyncValidators:t)||null}function g1(t){return Array.isArray(t)?Ip(t):t||null}function Ic(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function Ub(t,e,r){let n=t.controls;if(!(e?Object.keys(n):n).length)throw new C(1e3,"");if(!n[r])throw new C(1001,"")}function Bb(t,e,r){t._forEachChild((n,o)=>{if(r[o]===void 0)throw new C(1002,"")})}var Go=class{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._events=new se,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Ms}get invalid(){return this.status===gc}get pending(){return this.status==$o}get disabled(){return this.status===Ts}get enabled(){return this.status!==Ts}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(yb(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(yb(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Db(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Db(e,this._rawAsyncValidators))}hasValidator(e){return vc(this._rawValidators,e)}hasAsyncValidator(e){return vc(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let r=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched($(D({},e),{sourceControl:n})),r&&e.emitEvent!==!1&&this._events.next(new Ns(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(r=>r.markAllAsTouched(e))}markAsUntouched(e={}){let r=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),r&&e.emitEvent!==!1&&this._events.next(new Ns(!1,n))}markAsDirty(e={}){let r=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty($(D({},e),{sourceControl:n})),r&&e.emitEvent!==!1&&this._events.next(new As(!1,n))}markAsPristine(e={}){let r=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),r&&e.emitEvent!==!1&&this._events.next(new As(!0,n))}markAsPending(e={}){this.status=$o;let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ho(this.status,r)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending($(D({},e),{sourceControl:r}))}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Ts,this.errors=null,this._forEachChild(o=>{o.disable($(D({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new wc(this.value,n)),this._events.next(new Ho(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors($(D({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Ms,this._forEachChild(n=>{n.enable($(D({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors($(D({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,r){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},r),this._parent._updateTouched({},r))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ms||this.status===$o)&&this._runAsyncValidator(n,e.emitEvent)}let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new wc(this.value,r)),this._events.next(new Ho(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity($(D({},e),{sourceControl:r}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ts:Ms}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,r){if(this.asyncValidator){this.status=$o,this._hasOwnPendingAsyncValidator={emitEvent:r!==!1};let n=Ob(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:r,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1,this,r.shouldHaveEmitted)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((n,o)=>n&&n._find(o),this)}getError(e,r){let n=r?this.get(r):this;return n&&n.errors?n.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,r,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Ho(this.status,r)),this._parent&&this._parent._updateControlsErrors(e,r,n)}_initObservables(){this.valueChanges=new G,this.statusChanges=new G}_calculateStatus(){return this._allControlsDisabled()?Ts:this.errors?gc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus($o)?$o:this._anyControlsHaveStatus(gc)?gc:Ms}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,r){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,r),o&&this._events.next(new As(this.pristine,r))}_updateTouched(e={},r){this.touched=this._anyControlsTouched(),this._events.next(new Ns(this.touched,r)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,r)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ic(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=p1(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=g1(this._rawAsyncValidators)}},Wo=class extends Go{constructor(e,r,n){super(xp(r),_p(n,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,n={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){Bb(this,!0,e),Object.keys(e).forEach(n=>{Ub(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(Object.keys(e).forEach(n=>{let o=this.controls[n];o&&o.patchValue(e[n],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((n,o)=>{n.reset(e?e[o]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r,this),this._updateTouched(r,this),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,n)=>(e[n]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,n)=>n._syncPendingControls()?!0:r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{let n=this.controls[r];n&&e(n,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[r,n]of Object.entries(this.controls))if(this.contains(r)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(r,n,o)=>((n.enabled||this.disabled)&&(r[o]=n.value),r))}_reduceChildren(e,r){let n=e;return this._forEachChild((o,i)=>{n=r(n,o,i)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var bp=class extends Wo{};var zr=new E("CallSetDisabledState",{providedIn:"root",factory:()=>Ps}),Ps="always";function $b(t,e){return[...e.path,t]}function Os(t,e,r=Ps){Mp(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),v1(t,e),D1(t,e),y1(t,e),m1(t,e)}function bc(t,e,r=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),Ec(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function Cc(t,e){t.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function m1(t,e){if(e.valueAccessor.setDisabledState){let r=n=>{e.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(r),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(r)})}}function Mp(t,e){let r=jb(t);e.validator!==null?t.setValidators(vb(r,e.validator)):typeof r=="function"&&t.setValidators([r]);let n=Vb(t);e.asyncValidator!==null?t.setAsyncValidators(vb(n,e.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let o=()=>t.updateValueAndValidity();Cc(e._rawValidators,o),Cc(e._rawAsyncValidators,o)}function Ec(t,e){let r=!1;if(t!==null){if(e.validator!==null){let o=jb(t);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==e.validator);i.length!==o.length&&(r=!0,t.setValidators(i))}}if(e.asyncValidator!==null){let o=Vb(t);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==e.asyncValidator);i.length!==o.length&&(r=!0,t.setAsyncValidators(i))}}}let n=()=>{};return Cc(e._rawValidators,n),Cc(e._rawAsyncValidators,n),r}function v1(t,e){e.valueAccessor.registerOnChange(r=>{t._pendingValue=r,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&Hb(t,e)})}function y1(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&Hb(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function Hb(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function D1(t,e){let r=(n,o)=>{e.valueAccessor.writeValue(n),o&&e.viewToModelUpdate(n)};t.registerOnChange(r),e._registerOnDestroy(()=>{t._unregisterOnChange(r)})}function zb(t,e){t==null,Mp(t,e)}function w1(t,e){return Ec(t,e)}function Tp(t,e){if(!t.hasOwnProperty("model"))return!1;let r=t.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function b1(t){return Object.getPrototypeOf(t.constructor)===qo}function Gb(t,e){t._syncPendingControls(),e.forEach(r=>{let n=r.control;n.updateOn==="submit"&&n._pendingChange&&(r.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Sp(t,e){if(!e)return null;Array.isArray(e);let r,n,o;return e.forEach(i=>{i.constructor===_b?r=i:b1(i)?n=i:o=i}),o||n||r||null}function C1(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var E1={provide:wn,useExisting:Re(()=>I1)},Ss=Promise.resolve(),I1=(()=>{let e=class e extends wn{constructor(n,o,i){super(),this.callSetDisabledState=i,this.submitted=!1,this._directives=new Set,this.ngSubmit=new G,this.form=new Wo({},Ep(n),Ip(o))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Ss.then(()=>{let o=this._findContainer(n.path);n.control=o.registerControl(n.name,n.control),Os(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Ss.then(()=>{let o=this._findContainer(n.path);o&&o.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Ss.then(()=>{let o=this._findContainer(n.path),i=new Wo({});zb(i,n),o.registerControl(n.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Ss.then(()=>{let o=this._findContainer(n.path);o&&o.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,o){Ss.then(()=>{this.form.get(n.path).setValue(o)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submitted=!0,Gb(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}};e.\u0275fac=function(o){return new(o||e)(w(rr,10),w(Rs,10),w(zr,8))},e.\u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(o,i){o&1&&ht("submit",function(a){return i.onSubmit(a)})("reset",function(){return i.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[He([E1]),Ie]});let t=e;return t})();function wb(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function bb(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var zo=class extends Go{constructor(e=null,r,n){super(xp(r),_p(n,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ic(r)&&(r.nonNullable||r.initialValueIsDefault)&&(bb(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){wb(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){wb(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){bb(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},HZ=zo,x1=t=>t instanceof zo;var _1={provide:Zt,useExisting:Re(()=>M1)},Cb=Promise.resolve(),M1=(()=>{let e=class e extends Zt{constructor(n,o,i,s,a,u){super(),this._changeDetectorRef=a,this.callSetDisabledState=u,this.control=new zo,this._registered=!1,this.name="",this.update=new G,this._parent=n,this._setValidators(o),this._setAsyncValidators(i),this.valueAccessor=Sp(this,s)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let o=n.name.previousValue;this.formDirective.removeControl({name:o,path:this._getPath(o)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),Tp(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Os(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){Cb.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let o=n.isDisabled.currentValue,i=o!==0&&Wn(o);Cb.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?$b(n,this._parent):[n]}};e.\u0275fac=function(o){return new(o||e)(w(wn,9),w(rr,10),w(Rs,10),w(bn,10),w(Nt,8),w(zr,8))},e.\u0275dir=H({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[He([_1]),Ie,nt]});let t=e;return t})(),zZ=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let t=e;return t})(),T1={provide:bn,useExisting:Re(()=>S1),multi:!0},S1=(()=>{let e=class e extends qo{writeValue(n){let o=n??"";this.setProperty("value",o)}registerOnChange(n){this.onChange=o=>{n(o==""?null:parseFloat(o))}}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(o,i){o&1&&ht("input",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},features:[He([T1]),Ie]});let t=e;return t})(),A1={provide:bn,useExisting:Re(()=>O1),multi:!0};var N1=(()=>{let e=class e{constructor(){this._accessors=[]}add(n,o){this._accessors.push([n,o])}remove(n){for(let o=this._accessors.length-1;o>=0;--o)if(this._accessors[o][1]===n){this._accessors.splice(o,1);return}}select(n){this._accessors.forEach(o=>{this._isSameGroup(o,n)&&o[1]!==n&&o[1].fireUncheck(n.value)})}_isSameGroup(n,o){return n[0].control?n[0]._parent===o._control._parent&&n[1].name===o.name:!1}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),O1=(()=>{let e=class e extends qo{constructor(n,o,i,s){super(n,o),this._registry=i,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=y(zr,{optional:!0})??Ps}ngOnInit(){this._control=this._injector.get(Zt),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(n){this._state=n===this.value,this.setProperty("checked",this._state)}registerOnChange(n){this._fn=n,this.onChange=()=>{n(this.value),this._registry.select(this)}}setDisabledState(n){(this.setDisabledStateFired||n||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",n),this.setDisabledStateFired=!0}fireUncheck(n){this.writeValue(n)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}};e.\u0275fac=function(o){return new(o||e)(w(rt),w(_e),w(N1),w(rn))},e.\u0275dir=H({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(o,i){o&1&&ht("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[He([A1]),Ie]});let t=e;return t})();var Ap=new E(""),R1={provide:Zt,useExisting:Re(()=>P1)},P1=(()=>{let e=class e extends Zt{set isDisabled(n){}constructor(n,o,i,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new G,this._ngModelWarningSent=!1,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=Sp(this,i)}ngOnChanges(n){if(this._isControlChanged(n)){let o=n.form.previousValue;o&&bc(o,this,!1),Os(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Tp(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&bc(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_isControlChanged(n){return n.hasOwnProperty("form")}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(o){return new(o||e)(w(rr,10),w(Rs,10),w(bn,10),w(Ap,8),w(zr,8))},e.\u0275dir=H({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[He([R1]),Ie,nt]});let t=e;return t})(),F1={provide:wn,useExisting:Re(()=>L1)},L1=(()=>{let e=class e extends wn{constructor(n,o,i){super(),this.callSetDisabledState=i,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new G,this._setValidators(n),this._setAsyncValidators(o)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Ec(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let o=this.form.get(n.path);return Os(o,n,this.callSetDisabledState),o.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),o}getControl(n){return this.form.get(n.path)}removeControl(n){bc(n.control||null,n,!1),C1(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,o){this.form.get(n.path).setValue(o)}onSubmit(n){return this.submitted=!0,Gb(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new Dp(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1,this.form._events.next(new wp(this.form))}_updateDomValue(){this.directives.forEach(n=>{let o=n.control,i=this.form.get(n.path);o!==i&&(bc(o||null,n),x1(i)&&(Os(i,n,this.callSetDisabledState),n.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let o=this.form.get(n.path);zb(o,n),o.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let o=this.form.get(n.path);o&&w1(o,n)&&o.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Mp(this.form,this),this._oldForm&&Ec(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(o){return new(o||e)(w(rr,10),w(Rs,10),w(zr,8))},e.\u0275dir=H({type:e,selectors:[["","formGroup",""]],hostBindings:function(o,i){o&1&&ht("submit",function(a){return i.onSubmit(a)})("reset",function(){return i.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[He([F1]),Ie,nt]});let t=e;return t})();var k1={provide:Zt,useExisting:Re(()=>j1)},j1=(()=>{let e=class e extends Zt{set isDisabled(n){}constructor(n,o,i,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new G,this._ngModelWarningSent=!1,this._parent=n,this._setValidators(o),this._setAsyncValidators(i),this.valueAccessor=Sp(this,s)}ngOnChanges(n){this._added||this._setUpControl(),Tp(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return $b(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(o){return new(o||e)(w(wn,13),w(rr,10),w(Rs,10),w(bn,10),w(Ap,8))},e.\u0275dir=H({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[He([k1]),Ie,nt]});let t=e;return t})(),V1={provide:bn,useExisting:Re(()=>qb),multi:!0};function Wb(t,e){return t==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${t}: ${e}`.slice(0,50))}function U1(t){return t.split(":")[0]}var qb=(()=>{let e=class e extends qo{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;let o=this._getOptionId(n),i=Wb(o,n);this.setProperty("value",i)}registerOnChange(n){this.onChange=o=>{this.value=this._getOptionValue(o),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(let o of this._optionMap.keys())if(this._compareWith(this._optionMap.get(o),n))return o;return null}_getOptionValue(n){let o=U1(n);return this._optionMap.has(o)?this._optionMap.get(o):n}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(o,i){o&1&&ht("change",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[He([V1]),Ie]});let t=e;return t})(),GZ=(()=>{let e=class e{constructor(n,o,i){this._element=n,this._renderer=o,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(n){this._select!=null&&(this._select._optionMap.set(this.id,n),this._setElementValue(Wb(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._setElementValue(n),this._select&&this._select.writeValue(this._select.value)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(rt),w(qb,9))},e.\u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let t=e;return t})(),B1={provide:bn,useExisting:Re(()=>Zb),multi:!0};function Eb(t,e){return t==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${t}: ${e}`.slice(0,50))}function $1(t){return t.split(":")[0]}var Zb=(()=>{let e=class e extends qo{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;let o;if(Array.isArray(n)){let i=n.map(s=>this._getOptionId(s));o=(s,a)=>{s._setSelected(i.indexOf(a.toString())>-1)}}else o=(i,s)=>{i._setSelected(!1)};this._optionMap.forEach(o)}registerOnChange(n){this.onChange=o=>{let i=[],s=o.selectedOptions;if(s!==void 0){let a=s;for(let u=0;u{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(o,i){o&1&&ht("change",function(a){return i.onChange(a.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[He([B1]),Ie]});let t=e;return t})(),WZ=(()=>{let e=class e{constructor(n,o,i){this._element=n,this._renderer=o,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){this._select!=null&&(this._value=n,this._setElementValue(Eb(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(Eb(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(rt),w(Zb,9))},e.\u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let t=e;return t})();function Kb(t){return typeof t=="number"?t:parseFloat(t)}var Np=(()=>{let e=class e{constructor(){this._validator=mc}ngOnChanges(n){if(this.inputName in n){let o=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(o),this._validator=this._enabled?this.createValidator(o):mc,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=H({type:e,features:[nt]});let t=e;return t})(),H1={provide:rr,useExisting:Re(()=>z1),multi:!0},z1=(()=>{let e=class e extends Np{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=n=>Kb(n),this.createValidator=n=>Sb(n)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(o,i){o&2&&Rr("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[He([H1]),Ie]});let t=e;return t})(),G1={provide:rr,useExisting:Re(()=>W1),multi:!0},W1=(()=>{let e=class e extends Np{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=n=>Kb(n),this.createValidator=n=>Tb(n)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(o,i){o&2&&Rr("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[He([G1]),Ie]});let t=e;return t})(),q1={provide:rr,useExisting:Re(()=>Z1),multi:!0};var Z1=(()=>{let e=class e extends Np{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Wn,this.createValidator=n=>Ab}enabled(n){return n}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(o,i){o&2&&Rr("required",i._enabled?"":null)},inputs:{required:"required"},features:[He([q1]),Ie]});let t=e;return t})();var Yb=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({});let t=e;return t})(),Cp=class extends Go{constructor(e,r,n){super(xp(r),_p(n,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,r={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}insert(e,r,n={}){this.controls.splice(e,0,r),this._registerControl(r),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,r={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:r.emitEvent})}setControl(e,r,n={}){let o=this._adjustIndex(e);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),r&&(this.controls.splice(o,0,r),this._registerControl(r)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,r={}){Bb(this,!1,e),e.forEach((n,o)=>{Ub(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(e.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e=[],r={}){this._forEachChild((n,o)=>{n.reset(e[o],{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r,this),this._updateTouched(r,this),this.updateValueAndValidity(r)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(r=>r._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((r,n)=>n._syncPendingControls()?!0:r,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((r,n)=>{e(r,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(r=>r.enabled&&e(r))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function Ib(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var K1=(()=>{let e=class e{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,o=null){let i=this._reduceControls(n),s={};return Ib(o)?s=o:o!==null&&(s.validators=o.validator,s.asyncValidators=o.asyncValidator),new Wo(i,s)}record(n,o=null){let i=this._reduceControls(n);return new bp(i,o)}control(n,o,i){let s={};return this.useNonNullable?(Ib(o)?s=o:(s.validators=o,s.asyncValidators=i),new zo(n,$(D({},s),{nonNullable:!0}))):new zo(n,o,i)}array(n,o,i){let s=n.map(a=>this._createControl(a));return new Cp(s,o,i)}_reduceControls(n){let o={};return Object.keys(n).forEach(i=>{o[i]=this._createControl(n[i])}),o}_createControl(n){if(n instanceof zo)return n;if(n instanceof Go)return n;if(Array.isArray(n)){let o=n[0],i=n.length>1?n[1]:null,s=n.length>2?n[2]:null;return this.control(o,i,s)}else return this.control(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var qZ=(()=>{let e=class e extends K1{group(n,o=null){return super.group(n,o)}control(n,o,i){return super.control(n,o,i)}array(n,o,i){return super.array(n,o,i)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var ZZ=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:zr,useValue:n.callSetDisabledState??Ps}]}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({imports:[Yb]});let t=e;return t})(),KZ=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:Ap,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:zr,useValue:n.callSetDisabledState??Ps}]}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({imports:[Yb]});let t=e;return t})();function Y1(t,e){for(var r=-1,n=e.length,o=t.length;++r0&&r(a)?e>1?oC(a,e-1,r,n,o):Zo(o,a):n||(o[o.length]=a)}return o}var iC=oC;function yL(t){var e=t==null?0:t.length;return e?iC(t,1):[]}var DL=yL;function wL(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var vt=wL;var bL="[object AsyncFunction]",CL="[object Function]",EL="[object GeneratorFunction]",IL="[object Proxy]";function xL(t){if(!vt(t))return!1;var e=Ft(t);return e==CL||e==EL||e==bL||e==IL}var _c=xL;var _L=ye["__core-js_shared__"],Mc=_L;var sC=function(){var t=/[^.]+$/.exec(Mc&&Mc.keys&&Mc.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ML(t){return!!sC&&sC in t}var aC=ML;var TL=Function.prototype,SL=TL.toString;function AL(t){if(t!=null){try{return SL.call(t)}catch{}try{return t+""}catch{}}return""}var Cn=AL;var NL=/[\\^$.*+?()[\]{}|]/g,OL=/^\[object .+?Constructor\]$/,RL=Function.prototype,PL=Object.prototype,FL=RL.toString,LL=PL.hasOwnProperty,kL=RegExp("^"+FL.call(LL).replace(NL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jL(t){if(!vt(t)||aC(t))return!1;var e=_c(t)?kL:OL;return e.test(Cn(t))}var uC=jL;function VL(t,e){return t?.[e]}var cC=VL;function UL(t,e){var r=cC(t,e);return uC(r)?r:void 0}var et=UL;var BL=et(Object,"create"),En=BL;function $L(){this.__data__=En?En(null):{},this.size=0}var lC=$L;function HL(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var dC=HL;var zL="__lodash_hash_undefined__",GL=Object.prototype,WL=GL.hasOwnProperty;function qL(t){var e=this.__data__;if(En){var r=e[t];return r===zL?void 0:r}return WL.call(e,t)?e[t]:void 0}var fC=qL;var ZL=Object.prototype,KL=ZL.hasOwnProperty;function YL(t){var e=this.__data__;return En?e[t]!==void 0:KL.call(e,t)}var hC=YL;var QL="__lodash_hash_undefined__";function JL(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=En&&e===void 0?QL:e,this}var pC=JL;function Yo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var yC=sk;function ak(t,e){var r=this.__data__,n=or(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var DC=ak;function Jo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var OC=Ek;function Ik(t,e,r){for(var n=-1,o=t==null?0:t.length;++n=Nk){var c=e?null:FC(t);if(c)return ei(c);s=!1,o=Ac,u=new Sc}else u=e?[]:a;e:for(;++n-1&&t%1==0&&t-1&&t%1==0&&t<=Xk}var ri=ej;function tj(t){return t!=null&&ri(t.length)&&!_c(t)}var oi=tj;var nj=Object.prototype;function rj(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||nj;return t===r}var ii=rj;function oj(t,e){for(var r=-1,n=Array(t);++ro?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n=n?t:uE(t,e,r)}var cE=gV;var mV="\\ud800-\\udfff",vV="\\u0300-\\u036f",yV="\\ufe20-\\ufe2f",DV="\\u20d0-\\u20ff",wV=vV+yV+DV,bV="\\ufe0e\\ufe0f",CV="\\u200d",EV=RegExp("["+CV+mV+wV+bV+"]");function IV(t){return EV.test(t)}var Bc=IV;function xV(t){return t.split("")}var lE=xV;var dE="\\ud800-\\udfff",_V="\\u0300-\\u036f",MV="\\ufe20-\\ufe2f",TV="\\u20d0-\\u20ff",SV=_V+MV+TV,AV="\\ufe0e\\ufe0f",NV="["+dE+"]",kp="["+SV+"]",jp="\\ud83c[\\udffb-\\udfff]",OV="(?:"+kp+"|"+jp+")",fE="[^"+dE+"]",hE="(?:\\ud83c[\\udde6-\\uddff]){2}",pE="[\\ud800-\\udbff][\\udc00-\\udfff]",RV="\\u200d",gE=OV+"?",mE="["+AV+"]?",PV="(?:"+RV+"(?:"+[fE,hE,pE].join("|")+")"+mE+gE+")*",FV=mE+gE+PV,LV="(?:"+[fE+kp+"?",kp,hE,pE,NV].join("|")+")",kV=RegExp(jp+"(?="+jp+")|"+LV+FV,"g");function jV(t){return t.match(kV)||[]}var vE=jV;function VV(t){return Bc(t)?vE(t):lE(t)}var yE=VV;function UV(t){return function(e){e=yt(e);var r=Bc(e)?yE(e):void 0,n=r?r[0]:e.charAt(0),o=r?cE(r,1).join(""):e.slice(1);return n[t]()+o}}var DE=UV;var BV=DE("toUpperCase"),wE=BV;function $V(t){return wE(yt(t).toLowerCase())}var bE=$V;function HV(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++oa))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var d=-1,f=!0,h=r&x2?new Sc:void 0;for(i.set(t,e),i.set(e,t);++d0?"Infinity":"-Infinity":JSON.stringify(t)}function O$(t){return t.map(function(e){var r=e.key,n=e.type;return"".concat(r,": ").concat(n.name)}).join("/")}function R$(t){return t.message!==void 0?t.message:"Invalid value ".concat(N$(t.value)," supplied to ").concat(O$(t.context))}function P$(t){return t.map(R$)}function F$(){return["No errors!"]}var ux={report:hc(P$,F$)};var Bp=class extends Error{constructor(){super(...arguments),this.name="DecodeError"}};function L$(t){return e=>Xn(t.decode(e),hc(r=>Sn(()=>new Bp(ux.report(fc(r)).join(` -`))),r=>I(r)))}function Boe(t){return L$(Ge(t))}var gi=class{},cx=(()=>{class t extends gi{getTranslation(r){return I({})}static \u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),js=class{},lx=(()=>{class t{handle(r){return r.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();function Xc(t,e){if(t===e)return!0;if(t===null||e===null)return!1;if(t!==t&&e!==e)return!0;let r=typeof t,n=typeof e,o,i,s;if(r==n&&r=="object")if(Array.isArray(t)){if(!Array.isArray(e))return!1;if((o=t.length)==e.length){for(i=0;i{$p(e[n])?n in t?r[n]=hx(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}var mi=class{},dx=(()=>{class t extends mi{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(r,n){let o;return typeof r=="string"?o=this.interpolateString(r,n):typeof r=="function"?o=this.interpolateFunction(r,n):o=r,o}getValue(r,n){let o=typeof n=="string"?n.split("."):[n];n="";do n+=o.shift(),fr(r)&&fr(r[n])&&(typeof r[n]=="object"||!o.length)?(r=r[n],n=""):o.length?n+=".":r=void 0;while(o.length);return r}interpolateFunction(r,n){return r(n)}interpolateString(r,n){return n?r.replace(this.templateMatcher,(o,i)=>{let s=this.getValue(n,i);return fr(s)?s:o}):r}static \u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),vi=class{},fx=(()=>{class t extends vi{compile(r,n){return r}compileTranslations(r,n){return r}static \u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),el=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new G;onLangChange=new G;onDefaultLangChange=new G},Hp=new E("USE_STORE"),zp=new E("USE_DEFAULT_LANG"),Gp=new E("DEFAULT_LANGUAGE"),Wp=new E("USE_EXTEND"),qp=(()=>{class t{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new G;_onLangChange=new G;_onDefaultLangChange=new G;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(r){this.isolate?this._defaultLang=r:this.store.defaultLang=r}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(r){this.isolate?this._currentLang=r:this.store.currentLang=r}get langs(){return this.isolate?this._langs:this.store.langs}set langs(r){this.isolate?this._langs=r:this.store.langs=r}get translations(){return this.isolate?this._translations:this.store.translations}set translations(r){this.isolate?this._translations=r:this.store.translations=r}constructor(r,n,o,i,s,a=!0,u=!1,c=!1,l){this.store=r,this.currentLoader=n,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.isolate=u,this.extend=c,l&&this.setDefaultLang(l)}setDefaultLang(r){if(r===this.defaultLang)return;let n=this.retrieveTranslations(r);typeof n<"u"?(this.defaultLang==null&&(this.defaultLang=r),n.pipe(xe(1)).subscribe(o=>{this.changeDefaultLang(r)})):this.changeDefaultLang(r)}getDefaultLang(){return this.defaultLang}use(r){if(r===this.currentLang)return I(this.translations[r]);let n=this.retrieveTranslations(r);return typeof n<"u"?(this.currentLang||(this.currentLang=r),n.pipe(xe(1)).subscribe(o=>{this.changeLang(r)}),n):(this.changeLang(r),I(this.translations[r]))}retrieveTranslations(r){let n;return(typeof this.translations[r]>"u"||this.extend)&&(this._translationRequests[r]=this._translationRequests[r]||this.getTranslation(r),n=this._translationRequests[r]),n}getTranslation(r){this.pending=!0;let n=this.currentLoader.getTranslation(r).pipe(Ii(1),xe(1));return this.loadingTranslations=n.pipe(N(o=>this.compiler.compileTranslations(o,r)),Ii(1),xe(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[r]=this.extend&&this.translations[r]?D(D({},o),this.translations[r]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),n}setTranslation(r,n,o=!1){n=this.compiler.compileTranslations(n,r),(o||this.extend)&&this.translations[r]?this.translations[r]=hx(this.translations[r],n):this.translations[r]=n,this.updateLangs(),this.onTranslationChange.emit({lang:r,translations:this.translations[r]})}getLangs(){return this.langs}addLangs(r){r.forEach(n=>{this.langs.indexOf(n)===-1&&this.langs.push(n)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(r,n,o){let i;if(n instanceof Array){let s={},a=!1;for(let u of n)s[u]=this.getParsedResult(r,u,o),bt(s[u])&&(a=!0);if(a){let u=n.map(c=>bt(s[c])?s[c]:I(s[c]));return Ci(u).pipe(N(c=>{let l={};return c.forEach((d,f)=>{l[n[f]]=d}),l}))}return s}if(r&&(i=this.parser.interpolate(this.parser.getValue(r,n),o)),typeof i>"u"&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],n),o)),typeof i>"u"){let s={key:n,translateService:this};typeof o<"u"&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return typeof i<"u"?i:n}get(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(kt(o=>(o=this.getParsedResult(o,r,n),bt(o)?o:I(o))));{let o=this.getParsedResult(this.translations[this.currentLang],r,n);return bt(o)?o:I(o)}}getStreamOnTranslationChange(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');return tt(Xt(()=>this.get(r,n)),this.onTranslationChange.pipe(be(o=>{let i=this.getParsedResult(o.translations,r,n);return typeof i.subscribe=="function"?i:I(i)})))}stream(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');return tt(Xt(()=>this.get(r,n)),this.onLangChange.pipe(be(o=>{let i=this.getParsedResult(o.translations,r,n);return bt(i)?i:I(i)})))}instant(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');let o=this.getParsedResult(this.translations[this.currentLang],r,n);if(bt(o)){if(r instanceof Array){let i={};return r.forEach((s,a)=>{i[r[a]]=r[a]}),i}return r}else return o}set(r,n,o=this.currentLang){this.translations[o][r]=this.compiler.compile(n,o),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeLang(r){this.currentLang=r,this.onLangChange.emit({lang:r,translations:this.translations[r]}),this.defaultLang==null&&this.changeDefaultLang(r)}changeDefaultLang(r){this.defaultLang=r,this.onDefaultLangChange.emit({lang:r,translations:this.translations[r]})}reloadLang(r){return this.resetLang(r),this.getTranslation(r)}resetLang(r){this._translationRequests[r]=void 0,this.translations[r]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let r=window.navigator.languages?window.navigator.languages[0]:null;if(r=r||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,!(typeof r>"u"))return r.indexOf("-")!==-1&&(r=r.split("-")[0]),r.indexOf("_")!==-1&&(r=r.split("_")[0]),r}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let r=window.navigator.languages?window.navigator.languages[0]:null;return r=r||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,r}static \u0275fac=function(n){return new(n||t)(x(el),x(gi),x(vi),x(mi),x(js),x(zp),x(Hp),x(Wp),x(Gp))};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();var Joe=(()=>{class t{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(r,n){this.translate=r,this._ref=n}updateValue(r,n,o){let i=s=>{this.value=s!==void 0?s:r,this.lastKey=r,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,r,n);bt(s.subscribe)?s.subscribe(i):i(s)}this.translate.get(r,n).subscribe(i)}transform(r,...n){if(!r||!r.length)return r;if(Xc(r,this.lastKey)&&Xc(n,this.lastParams))return this.value;let o;if(fr(n[0])&&n.length)if(typeof n[0]=="string"&&n[0].length){let i=n[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{o=JSON.parse(i)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else typeof n[0]=="object"&&!Array.isArray(n[0])&&(o=n[0]);return this.lastKey=r,this.lastParams=n,this.updateValue(r,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(r,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(r,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(r,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)(w(qp,16),w(Nt,16))};static \u0275pipe=xo({name:"translate",type:t,pure:!1});static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),Xoe=(()=>{class t{static forRoot(r={}){return{ngModule:t,providers:[r.loader||{provide:gi,useClass:cx},r.compiler||{provide:vi,useClass:fx},r.parser||{provide:mi,useClass:dx},r.missingTranslationHandler||{provide:js,useClass:lx},el,{provide:Hp,useValue:r.isolate},{provide:zp,useValue:r.useDefaultLang},{provide:Wp,useValue:r.extend},{provide:Gp,useValue:r.defaultLanguage},qp]}}static forChild(r={}){return{ngModule:t,providers:[r.loader||{provide:gi,useClass:cx},r.compiler||{provide:vi,useClass:fx},r.parser||{provide:mi,useClass:dx},r.missingTranslationHandler||{provide:js,useClass:lx},{provide:Hp,useValue:r.isolate},{provide:zp,useValue:r.useDefaultLang},{provide:Wp,useValue:r.extend},{provide:Gp,useValue:r.defaultLanguage},qp]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=_t({})}return t})();var k$="uiCulture",j$="CLX.LoginToken",V$="CLX.RefreshToken",U$="CLX.TokenExpire",nie=(()=>{let e=class e{getLanguage(){return this.getValue(k$)}getAccessToken(){let n=this.getValue(j$);return n?n.replace(/^"+|"+$/g,""):null}getRefreshToken(){return this.getValue(V$)}getTokenExpire(){return this.getValue(U$)}getPayload(){let n=this.getAccessToken(),o=n?n.split(".")[1]:null,i=o?o.replace("-","+").replace("_","/"):null,s=JSON.parse(window.atob(i||""));return s.roles="holder_roles"in s?s.holder_roles:s.roles,s}getValue(n){return sessionStorage.getItem(n)||localStorage.getItem(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{D as a,$ as b,Dx as c,P as d,se as e,Se as f,Di as g,Rx as h,Px as i,Ae as j,I as k,Sn as l,N as m,da as n,le as o,Xt as p,Qx as q,Ci as r,El as s,en as t,o0 as u,i0 as v,ke as w,a0 as x,c0 as y,l0 as z,Nn as A,kt as B,Sg as C,On as D,xe as E,d0 as F,Ng as G,p0 as H,Rn as I,pa as J,Ml as K,Ii as L,g0 as M,ga as N,be as O,m0 as P,ma as Q,Ce as R,v0 as S,y0 as T,C as U,Re as V,b as W,_t as X,E as Y,x as Z,y as _,Um as $,Mt as aa,H as ba,xo as ca,s_ as da,Qe as ea,K6 as fa,nt as ga,Y6 as ha,Q6 as ia,J6 as ja,X6 as ka,Fe as la,gf as ma,rn as na,on as oa,Rv as pa,_e as qa,G as ra,e5 as sa,FM as ta,t5 as ua,w as va,uT as wa,Tr as xa,bo as ya,rt as za,zi as Aa,pe as Ba,dn as Ca,Ie as Da,i5 as Ea,Pf as Fa,zS as Ga,Rr as Ha,sA as Ia,xu as Ja,s5 as Ka,a5 as La,u5 as Ma,c5 as Na,l5 as Oa,d5 as Pa,f5 as Qa,h5 as Ra,Xy as Sa,eD as Ta,Vf as Ua,tD as Va,nD as Wa,CA as Xa,p5 as Ya,IA as Za,ht as _a,g5 as $a,m5 as ab,v5 as bb,PA as cb,iD as db,sD as eb,y5 as fb,aD as gb,uD as hb,D5 as ib,w5 as jb,kA as kb,cD as lb,jA as mb,VA as nb,UA as ob,BA as pb,b5 as qb,$A as rb,He as sb,dD as tb,C5 as ub,E5 as vb,I5 as wb,x5 as xb,_5 as yb,M5 as zb,T5 as Ab,S5 as Bb,A5 as Cb,N5 as Db,O5 as Eb,R5 as Fb,Pr as Gb,Gi as Hb,Nt as Ib,Wn as Jb,pN as Kb,P5 as Lb,Ue as Mb,qi as Nb,SN as Ob,zN as Pb,X5 as Qb,e9 as Rb,t9 as Sb,n9 as Tb,r9 as Ub,o9 as Vb,i9 as Wb,s9 as Xb,a9 as Yb,nO as Zb,iO as _b,vn as $b,Kn as ac,jD as bc,fh as cc,Zn as dc,hO as ec,b9 as fc,C9 as gc,ZD as hc,$9 as ic,YO as jc,L as kc,as as lc,ls as mc,Dn as nc,$h as oc,Vr as pc,_R as qc,lc as rc,cw as sc,c7 as tc,l7 as uc,d7 as vc,k7 as wc,de as xc,Y as yc,B as zc,ee as Ac,ge as Bc,ab as Cc,H7 as Dc,z7 as Ec,Ge as Fc,mt as Gc,W7 as Hc,Is as Ic,q7 as Jc,K7 as Kc,eZ as Lc,jw as Mc,_s as Nc,uZ as Oc,cZ as Pc,lZ as Qc,dZ as Rc,fZ as Sc,hZ as Tc,gZ as Uc,bZ as Vc,CZ as Wc,bn as Xc,n1 as Yc,_b as Zc,rr as _c,mb as $c,UZ as ad,BZ as bd,I1 as cd,HZ as dd,M1 as ed,zZ as fd,S1 as gd,O1 as hd,P1 as id,L1 as jd,j1 as kd,qb as ld,GZ as md,WZ as nd,z1 as od,W1 as pd,Z1 as qd,qZ as rd,ZZ as sd,KZ as td,DL as ud,Vp as vd,RU as wd,C2 as xd,E$ as yd,x$ as zd,Pk as Ad,M$ as Bd,A$ as Cd,L$ as Dd,Boe as Ed,gi as Fd,qp as Gd,Joe as Hd,Xoe as Id,nie as Jd}; + `)}`}var nu=Nm(Em("Optional"),8);var Jd=Nm(Em("SkipSelf"),4);function wr(t,e){let r=t.hasOwnProperty(Sa);return r?t[Sa]:null}function V0(t,e,r){if(t.length!==e.length)return!1;for(let n=0;nArray.isArray(r)?Xd(r,e):e(r))}function Om(t,e,r){e>=t.length?t.push(r):t.splice(e,0,r)}function Na(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function B0(t,e){let r=[];for(let n=0;ne;){let i=o-2;t[o]=t[i],o--}t[e]=r,t[e+1]=n}}function ru(t,e,r){let n=ki(t,e);return n>=0?t[n|1]=r:(n=~n,$0(t,n,e,r)),n}function Ml(t,e){let r=ki(t,e);if(r>=0)return t[r|1]}function ki(t,e){return H0(t,e,1)}function H0(t,e,r){let n=0,o=t.length>>r;for(;o!==n;){let i=n+(o-n>>1),s=t[i<e?o=i:n=i+1}return~(o<e){s=i-1;break}}}for(;i-1){let i;for(;++oi?d="":d=o[l+1].toLowerCase(),n&2&&c!==d){if(Ct(n))return!1;s=!0}}}}return Ct(n)||s}function Ct(t){return(t&1)===0}function K0(t,e,r,n){if(e===null)return-1;let o=0;if(n||!r){let i=!1;for(;o-1)for(r++;r0?'="'+a+'"':"")+"]"}else n&8?o+="."+s:n&4&&(o+=" "+s);else o!==""&&!Ct(s)&&(e+=jg(i,o),o=""),n=s,i=i||!Ct(n);r++}return o!==""&&(e+=jg(i,o)),e}function t_(t){return t.map(e_).join(",")}function n_(t){let e=[],r=[],n=1,o=2;for(;n{let e=Hm(t),r=$(D({},e),{decls:t.decls,vars:t.vars,template:t.template,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,onPush:t.changeDetection===Fm.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&t.dependencies||null,getStandaloneInjector:null,signals:t.signals??!1,data:t.data||{},encapsulation:t.encapsulation||Bt.Emulated,styles:t.styles||Ke,_:null,schemas:t.schemas||null,tView:null,id:""});zm(r);let n=t.dependencies;return r.directiveDefs=Ug(n,!1),r.pipeDefs=Ug(n,!0),r.id=i_(r),r})}function r_(t){return kn(t)||tf(t)}function o_(t){return t!==null}function Mt(t){return Li(()=>({type:t.type,bootstrap:t.bootstrap||Ke,declarations:t.declarations||Ke,imports:t.imports||Ke,exports:t.exports||Ke,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null}))}function Vg(t,e){if(t==null)return en;let r={};for(let n in t)if(t.hasOwnProperty(n)){let o=t[n],i,s,a=fo.None;Array.isArray(o)?(a=o[0],i=o[1],s=o[2]??i):(i=o,s=o),e?(r[i]=a!==fo.None?[n,a]:n,e[i]=s):r[i]=n}return r}function H(t){return Li(()=>{let e=Hm(t);return zm(e),e})}function Io(t){return{type:t.type,name:t.name,factory:null,pure:t.pure!==!1,standalone:t.standalone===!0,onDestroy:t.type.prototype.ngOnDestroy||null}}function kn(t){return t[I0]||null}function tf(t){return t[x0]||null}function Um(t){return t[_0]||null}function Bm(t){let e=kn(t)||tf(t)||Um(t);return e!==null?e.standalone:!1}function $m(t,e){let r=t[M0]||null;if(!r&&e===!0)throw new Error(`Type ${Be(t)} does not have '\u0275mod' property.`);return r}function Hm(t){let e={};return{type:t.type,providersResolver:null,factory:null,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:t.inputs||en,exportAs:t.exportAs||null,standalone:t.standalone===!0,signals:t.signals===!0,selectors:t.selectors||Ke,viewQuery:t.viewQuery||null,features:t.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Vg(t.inputs,e),outputs:Vg(t.outputs),debugInfo:null}}function zm(t){t.features?.forEach(e=>e(t))}function Ug(t,e){if(!t)return null;let r=e?Um:r_;return()=>(typeof t=="function"?t():t).map(n=>r(n)).filter(o_)}function i_(t){let e=0,r=[t.selectors,t.ngContentSelectors,t.hostVars,t.hostAttrs,t.consts,t.vars,t.decls,t.encapsulation,t.standalone,t.signals,t.exportAs,JSON.stringify(t.inputs),JSON.stringify(t.outputs),Object.getOwnPropertyNames(t.type.prototype),!!t.contentQueries,!!t.viewQuery].join("|");for(let o of r)e=Math.imul(31,e)+o.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function ji(t){return{\u0275providers:t}}function s_(...t){return{\u0275providers:Gm(!0,t),\u0275fromNgModule:!0}}function Gm(t,...e){let r=[],n=new Set,o,i=s=>{r.push(s)};return Xd(e,s=>{let a=s;ql(a,i,[],n)&&(o||=[],o.push(a))}),o!==void 0&&Wm(o,i),r}function Wm(t,e){for(let r=0;r{e(i,n)})}}function ql(t,e,r,n){if(t=Ne(t),!t)return!1;let o=null,i=Rg(t),s=!i&&kn(t);if(!i&&!s){let u=t.ngModule;if(i=Rg(u),i)o=u;else return!1}else{if(s&&!s.standalone)return!1;o=t}let a=n.has(o);if(s){if(a)return!1;if(n.add(o),s.dependencies){let u=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of u)ql(c,e,r,n)}}else if(i){if(i.imports!=null&&!a){n.add(o);let c;try{Xd(i.imports,l=>{ql(l,e,r,n)&&(c||=[],c.push(l))})}finally{}c!==void 0&&Wm(c,e)}if(!a){let c=wr(o)||(()=>new o);e({provide:o,useFactory:c,deps:Ke},o),e({provide:Pm,useValue:o,multi:!0},o),e({provide:lo,useValue:()=>x(o),multi:!0},o)}let u=i.providers;if(u!=null&&!a){let c=t;nf(u,l=>{e(l,c)})}}else return!1;return o!==t&&t.providers!==void 0}function nf(t,e){for(let r of t)Tm(r)&&(r=r.\u0275providers),Array.isArray(r)?nf(r,e):e(r)}var a_=J({provide:String,useValue:J});function qm(t){return t!==null&&typeof t=="object"&&a_ in t}function u_(t){return!!(t&&t.useExisting)}function c_(t){return!!(t&&t.useFactory)}function ho(t){return typeof t=="function"}function l_(t){return!!t.useClass}var ou=new E(""),Ea={},d_={},Tl;function iu(){return Tl===void 0&&(Tl=new Oa),Tl}var Ye=class{},Si=class extends Ye{get destroyed(){return this._destroyed}constructor(e,r,n,o){super(),this.parent=r,this.source=n,this.scopes=o,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,Kl(e,s=>this.processProvider(s)),this.records.set(Rm,io(void 0,this)),o.has("environment")&&this.records.set(Ye,io(void 0,this));let i=this.records.get(ou);i!=null&&typeof i.value=="string"&&this.scopes.add(i.value),this.injectorDefTypes=new Set(this.get(Pm,Ke,j.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=V(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let r=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of r)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),V(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let r=Pn(this),n=qe(void 0),o;try{return e()}finally{Pn(r),qe(n)}}get(e,r=Mi,n=j.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(Fg))return e[Fg](this);n=tu(n);let o,i=Pn(this),s=qe(void 0);try{if(!(n&j.SkipSelf)){let u=this.records.get(e);if(u===void 0){let c=m_(e)&&eu(e);c&&this.injectableDefInScope(c)?u=io(Zl(e),Ea):u=null,this.records.set(e,u)}if(u!=null)return this.hydrate(e,u)}let a=n&j.Self?iu():this.parent;return r=n&j.Optional&&r===Mi?null:r,a.get(e,r)}catch(a){if(a.name==="NullInjectorError"){if((a[Aa]=a[Aa]||[]).unshift(Be(e)),i)throw a;return k0(a,e,"R3InjectorError",this.source)}else throw a}finally{qe(s),Pn(i)}}resolveInjectorInitializers(){let e=V(null),r=Pn(this),n=qe(void 0),o;try{let i=this.get(lo,Ke,j.Self);for(let s of i)s()}finally{Pn(r),qe(n),V(e)}}toString(){let e=[],r=this.records;for(let n of r.keys())e.push(Be(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new C(205,!1)}processProvider(e){e=Ne(e);let r=ho(e)?e:Ne(e&&e.provide),n=h_(e);if(!ho(e)&&e.multi===!0){let o=this.records.get(r);o||(o=io(void 0,Ea,!0),o.factory=()=>Gl(o.multi),this.records.set(r,o)),r=e,o.multi.push(e)}this.records.set(r,n)}hydrate(e,r){let n=V(null);try{return r.value===Ea&&(r.value=d_,r.value=r.factory()),typeof r.value=="object"&&r.value&&g_(r.value)&&this._ngOnDestroyHooks.add(r.value),r.value}finally{V(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let r=Ne(e.providedIn);return typeof r=="string"?r==="any"||this.scopes.has(r):this.injectorDefTypes.has(r)}removeOnDestroy(e){let r=this._onDestroyHooks.indexOf(e);r!==-1&&this._onDestroyHooks.splice(r,1)}};function Zl(t){let e=eu(t),r=e!==null?e.factory:wr(t);if(r!==null)return r;if(t instanceof E)throw new C(204,!1);if(t instanceof Function)return f_(t);throw new C(204,!1)}function f_(t){if(t.length>0)throw new C(204,!1);let r=C0(t);return r!==null?()=>r.factory(t):()=>new t}function h_(t){if(qm(t))return io(void 0,t.useValue);{let e=Zm(t);return io(e,Ea)}}function Zm(t,e,r){let n;if(ho(t)){let o=Ne(t);return wr(o)||Zl(o)}else if(qm(t))n=()=>Ne(t.useValue);else if(c_(t))n=()=>t.useFactory(...Gl(t.deps||[]));else if(u_(t))n=()=>x(Ne(t.useExisting));else{let o=Ne(t&&(t.useClass||t.provide));if(p_(t))n=()=>new o(...Gl(t.deps));else return wr(o)||Zl(o)}return n}function io(t,e,r=!1){return{factory:t,value:e,multi:r?[]:void 0}}function p_(t){return!!t.deps}function g_(t){return t!==null&&typeof t=="object"&&typeof t.ngOnDestroy=="function"}function m_(t){return typeof t=="function"||typeof t=="object"&&t instanceof E}function Kl(t,e){for(let r of t)Array.isArray(r)?Kl(r,e):r&&Tm(r)?Kl(r.\u0275providers,e):e(r)}function Tt(t,e){t instanceof Si&&t.assertNotDestroyed();let r,n=Pn(t),o=qe(void 0);try{return e()}finally{Pn(n),qe(o)}}function Km(){return Sm()!==void 0||P0()!=null}function K6(t){if(!Km())throw new C(-203,!1)}function v_(t){return typeof t=="function"}var sn=0,R=1,O=2,Ve=3,xt=4,Xe=5,po=6,Ra=7,Oe=8,go=9,$t=10,ae=11,Ai=12,Bg=13,xo=14,Qe=15,br=16,so=17,tn=18,su=19,Ym=20,Fn=21,Sl=22,dt=23,Ee=25,Qm=1;var Cr=7,Pa=8,mo=9,je=10,Fa=function(t){return t[t.None=0]="None",t[t.HasTransplantedViews=2]="HasTransplantedViews",t}(Fa||{});function Ln(t){return Array.isArray(t)&&typeof t[Qm]=="object"}function an(t){return Array.isArray(t)&&t[Qm]===!0}function rf(t){return(t.flags&4)!==0}function au(t){return t.componentOffset>-1}function uu(t){return(t.flags&1)===1}function jn(t){return!!t.template}function Yl(t){return(t[O]&512)!==0}var Ql=class{constructor(e,r,n){this.previousValue=e,this.currentValue=r,this.firstChange=n}isFirstChange(){return this.firstChange}};function Jm(t,e,r,n){e!==null?e.applyValueToInputSignal(e,n):t[r]=n}function nt(){return Xm}function Xm(t){return t.type.prototype.ngOnChanges&&(t.setInput=D_),y_}nt.ngInherit=!0;function y_(){let t=tv(this),e=t?.current;if(e){let r=t.previous;if(r===en)t.previous=e;else for(let n in e)r[n]=e[n];t.current=null,this.ngOnChanges(e)}}function D_(t,e,r,n,o){let i=this.declaredInputs[n],s=tv(t)||w_(t,{previous:en,current:null}),a=s.current||(s.current={}),u=s.previous,c=u[i];a[i]=new Ql(c&&c.currentValue,r,u===en),Jm(t,e,o,r)}var ev="__ngSimpleChanges__";function tv(t){return t[ev]||null}function w_(t,e){return t[ev]=e}var $g=null;var Vt=function(t,e,r){$g?.(t,e,r)},nv="svg",rv="math";function Ht(t){for(;Array.isArray(t);)t=t[sn];return t}function ov(t,e){return Ht(e[t])}function ft(t,e){return Ht(e[t.index])}function of(t,e){return t.data[e]}function cu(t,e){return t[e]}function $n(t,e){let r=e[t];return Ln(r)?r:r[sn]}function b_(t){return(t[O]&4)===4}function sf(t){return(t[O]&128)===128}function C_(t){return an(t[Ve])}function Vn(t,e){return e==null?null:t[e]}function iv(t){t[so]=0}function sv(t){t[O]&1024||(t[O]|=1024,sf(t)&&lu(t))}function E_(t,e){for(;t>0;)e=e[xo],t--;return e}function Ni(t){return!!(t[O]&9216||t[dt]?.dirty)}function Jl(t){t[$t].changeDetectionScheduler?.notify(7),t[O]&64&&(t[O]|=1024),Ni(t)&&lu(t)}function lu(t){t[$t].changeDetectionScheduler?.notify(0);let e=Er(t);for(;e!==null&&!(e[O]&8192||(e[O]|=8192,!sf(e)));)e=Er(e)}function av(t,e){if((t[O]&256)===256)throw new C(911,!1);t[Fn]===null&&(t[Fn]=[]),t[Fn].push(e)}function I_(t,e){if(t[Fn]===null)return;let r=t[Fn].indexOf(e);r!==-1&&t[Fn].splice(r,1)}function Er(t){let e=t[Ve];return an(e)?e[Ve]:e}var F={lFrame:mv(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var uv=!1;function x_(){return F.lFrame.elementDepthCount}function __(){F.lFrame.elementDepthCount++}function M_(){F.lFrame.elementDepthCount--}function cv(){return F.bindingsEnabled}function lv(){return F.skipHydrationRootTNode!==null}function T_(t){return F.skipHydrationRootTNode===t}function S_(){F.skipHydrationRootTNode=null}function M(){return F.lFrame.lView}function ce(){return F.lFrame.tView}function Y6(t){return F.lFrame.contextLView=t,t[Oe]}function Q6(t){return F.lFrame.contextLView=null,t}function Pe(){let t=dv();for(;t!==null&&t.type===64;)t=t.parent;return t}function dv(){return F.lFrame.currentTNode}function A_(){let t=F.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function Ar(t,e){let r=F.lFrame;r.currentTNode=t,r.isParent=e}function af(){return F.lFrame.isParent}function uf(){F.lFrame.isParent=!1}function N_(){return F.lFrame.contextLView}function fv(){return uv}function Hg(t){uv=t}function un(){let t=F.lFrame,e=t.bindingRootIndex;return e===-1&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function cf(){return F.lFrame.bindingIndex}function O_(t){return F.lFrame.bindingIndex=t}function Nr(){return F.lFrame.bindingIndex++}function Vi(t){let e=F.lFrame,r=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,r}function R_(){return F.lFrame.inI18n}function P_(t,e){let r=F.lFrame;r.bindingIndex=r.bindingRootIndex=t,Xl(e)}function F_(){return F.lFrame.currentDirectiveIndex}function Xl(t){F.lFrame.currentDirectiveIndex=t}function L_(t){let e=F.lFrame.currentDirectiveIndex;return e===-1?null:t[e]}function hv(){return F.lFrame.currentQueryIndex}function lf(t){F.lFrame.currentQueryIndex=t}function k_(t){let e=t[R];return e.type===2?e.declTNode:e.type===1?t[Xe]:null}function pv(t,e,r){if(r&j.SkipSelf){let o=e,i=t;for(;o=o.parent,o===null&&!(r&j.Host);)if(o=k_(i),o===null||(i=i[xo],o.type&10))break;if(o===null)return!1;e=o,t=i}let n=F.lFrame=gv();return n.currentTNode=e,n.lView=t,!0}function df(t){let e=gv(),r=t[R];F.lFrame=e,e.currentTNode=r.firstChild,e.lView=t,e.tView=r,e.contextLView=t,e.bindingIndex=r.bindingStartIndex,e.inI18n=!1}function gv(){let t=F.lFrame,e=t===null?null:t.child;return e===null?mv(t):e}function mv(t){let e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return t!==null&&(t.child=e),e}function vv(){let t=F.lFrame;return F.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}var yv=vv;function ff(){let t=vv();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function j_(t){return(F.lFrame.contextLView=E_(t,F.lFrame.contextLView))[Oe]}function St(){return F.lFrame.selectedIndex}function Ir(t){F.lFrame.selectedIndex=t}function Ui(){let t=F.lFrame;return of(t.tView,t.selectedIndex)}function J6(){F.lFrame.currentNamespace=nv}function X6(){F.lFrame.currentNamespace=rv}function V_(){return F.lFrame.currentNamespace}var Dv=!0;function du(){return Dv}function fu(t){Dv=t}function U_(t,e,r){let{ngOnChanges:n,ngOnInit:o,ngDoCheck:i}=e.type.prototype;if(n){let s=Xm(e);(r.preOrderHooks??=[]).push(t,s),(r.preOrderCheckHooks??=[]).push(t,s)}o&&(r.preOrderHooks??=[]).push(0-t,o),i&&((r.preOrderHooks??=[]).push(t,i),(r.preOrderCheckHooks??=[]).push(t,i))}function hu(t,e){for(let r=e.directiveStart,n=e.directiveEnd;r=n)break}else e[u]<0&&(t[so]+=65536),(a>14>16&&(t[O]&3)===e&&(t[O]+=16384,zg(a,i)):zg(a,i)}var co=-1,xr=class{constructor(e,r,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=r,this.injectImpl=n}};function $_(t){return t instanceof xr}function H_(t){return(t.flags&8)!==0}function z_(t){return(t.flags&16)!==0}function bv(t){return t!==co}function La(t){return t&32767}function G_(t){return t>>16}function ka(t,e){let r=G_(t),n=e;for(;r>0;)n=n[xo],r--;return n}var ed=!0;function ja(t){let e=ed;return ed=t,e}var W_=256,Cv=W_-1,Ev=5,q_=0,Ut={};function Z_(t,e,r){let n;typeof r=="string"?n=r.charCodeAt(0)||0:r.hasOwnProperty(xi)&&(n=r[xi]),n==null&&(n=r[xi]=q_++);let o=n&Cv,i=1<>Ev)]|=i}function Va(t,e){let r=Iv(t,e);if(r!==-1)return r;let n=e[R];n.firstCreatePass&&(t.injectorIndex=e.length,Nl(n.data,t),Nl(e,null),Nl(n.blueprint,null));let o=hf(t,e),i=t.injectorIndex;if(bv(o)){let s=La(o),a=ka(o,e),u=a[R].data;for(let c=0;c<8;c++)e[i+c]=a[s+c]|u[s+c]}return e[i+8]=o,i}function Nl(t,e){t.push(0,0,0,0,0,0,0,0,e)}function Iv(t,e){return t.injectorIndex===-1||t.parent&&t.parent.injectorIndex===t.injectorIndex||e[t.injectorIndex+8]===null?-1:t.injectorIndex}function hf(t,e){if(t.parent&&t.parent.injectorIndex!==-1)return t.parent.injectorIndex;let r=0,n=null,o=e;for(;o!==null;){if(n=Sv(o),n===null)return co;if(r++,o=o[xo],n.injectorIndex!==-1)return n.injectorIndex|r<<16}return co}function td(t,e,r){Z_(t,e,r)}function K_(t,e){if(e==="class")return t.classes;if(e==="style")return t.styles;let r=t.attrs;if(r){let n=r.length,o=0;for(;o>20,d=n?a:a+l,f=o?a+l:c;for(let h=d;h=u&&p.type===r)return h}if(o){let h=s[u];if(h&&jn(h)&&h.type===r)return u}return null}function _r(t,e,r,n){let o=t[r],i=e.data;if($_(o)){let s=o;s.resolving&&S0(T0(i[r]));let a=ja(s.canSeeViewProviders);s.resolving=!0;let u,c=s.injectImpl?qe(s.injectImpl):null,l=pv(t,n,j.Default);try{o=t[r]=s.factory(void 0,i,t,n),e.firstCreatePass&&r>=n.directiveStart&&U_(r,i[r],e)}finally{c!==null&&qe(c),ja(a),s.resolving=!1,yv()}}return o}function Q_(t){if(typeof t=="string")return t.charCodeAt(0)||0;let e=t.hasOwnProperty(xi)?t[xi]:void 0;return typeof e=="number"?e>=0?e&Cv:J_:e}function Gg(t,e,r){let n=1<>Ev)]&n)}function Wg(t,e){return!(t&j.Self)&&!(t&j.Host&&e)}var Dr=class{constructor(e,r){this._tNode=e,this._lView=r}get(e,r,n){return Mv(this._tNode,this._lView,e,tu(n),r)}};function J_(){return new Dr(Pe(),M())}function Fe(t){return Li(()=>{let e=t.prototype.constructor,r=e[Sa]||nd(e),n=Object.prototype,o=Object.getPrototypeOf(t.prototype).constructor;for(;o&&o!==n;){let i=o[Sa]||nd(o);if(i&&i!==r)return i;o=Object.getPrototypeOf(o)}return i=>new i})}function nd(t){return Im(t)?()=>{let e=nd(Ne(t));return e&&e()}:wr(t)}function X_(t,e,r,n,o){let i=t,s=e;for(;i!==null&&s!==null&&s[O]&2048&&!(s[O]&512);){let a=Tv(i,s,r,n|j.Self,Ut);if(a!==Ut)return a;let u=i.parent;if(!u){let c=s[Ym];if(c){let l=c.get(r,Ut,n);if(l!==Ut)return l}u=Sv(s),s=s[xo]}i=u}return o}function Sv(t){let e=t[R],r=e.type;return r===2?e.declTNode:r===1?t[Xe]:null}function pf(t){return K_(Pe(),t)}function qg(t,e=null,r=null,n){let o=Av(t,e,r,n);return o.resolveInjectorInitializers(),o}function Av(t,e=null,r=null,n,o=new Set){let i=[r||Ke,s_(t)];return n=n||(typeof t=="object"?void 0:Be(t)),new Si(i,e||iu(),n||null,o)}var yr=class yr{static create(e,r){if(Array.isArray(e))return qg({name:""},r,e,"");{let n=e.name??"";return qg({name:n},e.parent,e.providers,n)}}};yr.THROW_IF_NOT_FOUND=Mi,yr.NULL=new Oa,yr.\u0275prov=b({token:yr,providedIn:"any",factory:()=>x(Rm)}),yr.__NG_ELEMENT_ID__=-1;var nn=yr;var eM=new E("");eM.__NG_ELEMENT_ID__=t=>{let e=Pe();if(e===null)throw new C(204,!1);if(e.type&2)return e.value;if(t&j.Optional)return null;throw new C(204,!1)};var tM="ngOriginalError";function Ol(t){return t[tM]}var rn=class{constructor(){this._console=console}handleError(e){let r=this._findOriginalError(e);this._console.error("ERROR",e),r&&this._console.error("ORIGINAL ERROR",r)}_findOriginalError(e){let r=e&&Ol(e);for(;r&&Ol(r);)r=Ol(r);return r||null}},Nv=new E("",{providedIn:"root",factory:()=>y(rn).handleError.bind(void 0)}),Ov=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=nM,e.__NG_ENV_ID__=n=>n;let t=e;return t})(),rd=class extends Ov{constructor(e){super(),this._lView=e}onDestroy(e){return av(this._lView,e),()=>I_(this._lView,e)}};function nM(){return new rd(M())}function rM(){return _o(Pe(),M())}function _o(t,e){return new _e(ft(t,e))}var _e=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=rM;let t=e;return t})();function oM(t){return t instanceof _e?t.nativeElement:t}var Hn=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new Se(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();var od=class extends se{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,Km()&&(this.destroyRef=y(Ov,{optional:!0})??void 0,this.pendingTasks=y(Hn,{optional:!0})??void 0)}emit(e){let r=V(null);try{super.next(e)}finally{V(r)}}subscribe(e,r,n){let o=e,i=r||(()=>null),s=n;if(e&&typeof e=="object"){let u=e;o=u.next?.bind(u),i=u.error?.bind(u),s=u.complete?.bind(u)}this.__isAsync&&(i=this.wrapInTimeout(i),o&&(o=this.wrapInTimeout(o)),s&&(s=this.wrapInTimeout(s)));let a=super.subscribe({next:o,error:i,complete:s});return e instanceof ie&&e.add(a),a}wrapInTimeout(e){return r=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(r),n!==void 0&&this.pendingTasks?.remove(n)})}}},G=od;function iM(){return this._results[Symbol.iterator]()}var id=class t{get changes(){return this._changes??=new G}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let r=t.prototype;r[Symbol.iterator]||(r[Symbol.iterator]=iM)}get(e){return this._results[e]}map(e){return this._results.map(e)}filter(e){return this._results.filter(e)}find(e){return this._results.find(e)}reduce(e,r){return this._results.reduce(e,r)}forEach(e){this._results.forEach(e)}some(e){return this._results.some(e)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(e,r){this.dirty=!1;let n=U0(e);(this._changesDetected=!V0(this._results,n,r))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function Rv(t){return(t.flags&128)===128}var Pv=new Map,sM=0;function aM(){return sM++}function uM(t){Pv.set(t[su],t)}function cM(t){Pv.delete(t[su])}var Zg="__ngContext__";function Un(t,e){Ln(e)?(t[Zg]=e[su],uM(e)):t[Zg]=e}function Fv(t){return kv(t[Ai])}function Lv(t){return kv(t[xt])}function kv(t){for(;t!==null&&!an(t);)t=t[xt];return t}var sd;function jv(t){sd=t}function lM(){if(sd!==void 0)return sd;if(typeof document<"u")return document;throw new C(210,!1)}var gf=new E("",{providedIn:"root",factory:()=>dM}),dM="ng",mf=new E(""),cn=new E("",{providedIn:"platform",factory:()=>"unknown"});var e5=new E(""),vf=new E("",{providedIn:"root",factory:()=>lM().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var fM="h",hM="b";var pM=()=>null;function yf(t,e,r=!1){return pM(t,e,r)}var Vv=!1,gM=new E("",{providedIn:"root",factory:()=>Vv});var ya;function mM(){if(ya===void 0&&(ya=null,It.trustedTypes))try{ya=It.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return ya}function pu(t){return mM()?.createHTML(t)||t}var Da;function vM(){if(Da===void 0&&(Da=null,It.trustedTypes))try{Da=It.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch{}return Da}function Kg(t){return vM()?.createScriptURL(t)||t}var on=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${Cm})`}},ad=class extends on{getTypeName(){return"HTML"}},ud=class extends on{getTypeName(){return"Style"}},cd=class extends on{getTypeName(){return"Script"}},ld=class extends on{getTypeName(){return"URL"}},dd=class extends on{getTypeName(){return"ResourceURL"}};function At(t){return t instanceof on?t.changingThisBreaksApplicationSecurity:t}function zn(t,e){let r=yM(t);if(r!=null&&r!==e){if(r==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${r} (see ${Cm})`)}return r===e}function yM(t){return t instanceof on&&t.getTypeName()||null}function Uv(t){return new ad(t)}function Bv(t){return new ud(t)}function $v(t){return new cd(t)}function Hv(t){return new ld(t)}function zv(t){return new dd(t)}function DM(t){let e=new hd(t);return wM()?new fd(e):e}var fd=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let r=new window.DOMParser().parseFromString(pu(e),"text/html").body;return r===null?this.inertDocumentHelper.getInertBodyElement(e):(r.removeChild(r.firstChild),r)}catch{return null}}},hd=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let r=this.inertDocument.createElement("template");return r.innerHTML=pu(e),r}};function wM(){try{return!!new window.DOMParser().parseFromString(pu(""),"text/html")}catch{return!1}}var bM=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function gu(t){return t=String(t),t.match(bM)?t:"unsafe:"+t}function ln(t){let e={};for(let r of t.split(","))e[r]=!0;return e}function Bi(...t){let e={};for(let r of t)for(let n in r)r.hasOwnProperty(n)&&(e[n]=!0);return e}var Gv=ln("area,br,col,hr,img,wbr"),Wv=ln("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),qv=ln("rp,rt"),CM=Bi(qv,Wv),EM=Bi(Wv,ln("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),IM=Bi(qv,ln("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),Yg=Bi(Gv,EM,IM,CM),Zv=ln("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),xM=ln("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),_M=ln("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),MM=Bi(Zv,xM,_M),TM=ln("script,style,template"),pd=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let r=e.firstChild,n=!0,o=[];for(;r;){if(r.nodeType===Node.ELEMENT_NODE?n=this.startElement(r):r.nodeType===Node.TEXT_NODE?this.chars(r.nodeValue):this.sanitizedSomething=!0,n&&r.firstChild){o.push(r),r=NM(r);continue}for(;r;){r.nodeType===Node.ELEMENT_NODE&&this.endElement(r);let i=AM(r);if(i){r=i;break}r=o.pop()}}return this.buf.join("")}startElement(e){let r=Qg(e).toLowerCase();if(!Yg.hasOwnProperty(r))return this.sanitizedSomething=!0,!TM.hasOwnProperty(r);this.buf.push("<"),this.buf.push(r);let n=e.attributes;for(let o=0;o"),!0}endElement(e){let r=Qg(e).toLowerCase();Yg.hasOwnProperty(r)&&!Gv.hasOwnProperty(r)&&(this.buf.push(""))}chars(e){this.buf.push(Jg(e))}};function SM(t,e){return(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function AM(t){let e=t.nextSibling;if(e&&t!==e.previousSibling)throw Kv(e);return e}function NM(t){let e=t.firstChild;if(e&&SM(t,e))throw Kv(e);return e}function Qg(t){let e=t.nodeName;return typeof e=="string"?e:"FORM"}function Kv(t){return new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`)}var OM=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,RM=/([^\#-~ |!])/g;function Jg(t){return t.replace(/&/g,"&").replace(OM,function(e){let r=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((r-55296)*1024+(n-56320)+65536)+";"}).replace(RM,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var wa;function Yv(t,e){let r=null;try{wa=wa||DM(t);let n=e?String(e):"";r=wa.getInertBodyElement(n);let o=5,i=n;do{if(o===0)throw new Error("Failed to sanitize html because the input is unstable");o--,n=i,i=r.innerHTML,r=wa.getInertBodyElement(n)}while(n!==i);let a=new pd().sanitizeChildren(Xg(r)||r);return pu(a)}finally{if(r){let n=Xg(r)||r;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function Xg(t){return"content"in t&&PM(t)?t.content:null}function PM(t){return t.nodeType===Node.ELEMENT_NODE&&t.nodeName==="TEMPLATE"}var Gt=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}(Gt||{});function FM(t){let e=Jv();return e?e.sanitize(Gt.URL,t)||"":zn(t,"URL")?At(t):gu(Ze(t))}function LM(t){let e=Jv();if(e)return Kg(e.sanitize(Gt.RESOURCE_URL,t)||"");if(zn(t,"ResourceURL"))return Kg(At(t));throw new C(904,!1)}function kM(t,e){return e==="src"&&(t==="embed"||t==="frame"||t==="iframe"||t==="media"||t==="script")||e==="href"&&(t==="base"||t==="link")?LM:FM}function Qv(t,e,r){return kM(e,r)(t)}function Jv(){let t=M();return t&&t[$t].sanitizer}var jM=/^>|^->||--!>|)/g,UM="\u200B$1\u200B";function BM(t){return t.replace(jM,e=>e.replace(VM,UM))}function Xv(t){return t instanceof Function?t():t}var zt=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}(zt||{}),$M;function Df(t,e){return $M(t,e)}function ao(t,e,r,n,o){if(n!=null){let i,s=!1;an(n)?i=n:Ln(n)&&(s=!0,n=n[sn]);let a=Ht(n);t===0&&r!==null?o==null?oy(e,r,a):Ua(e,r,a,o||null,!0):t===1&&r!==null?Ua(e,r,a,o||null,!0):t===2?rT(e,a,s):t===3&&e.destroyNode(a),i!=null&&iT(e,t,i,r,o)}}function HM(t,e){return t.createText(e)}function zM(t,e,r){t.setValue(e,r)}function GM(t,e){return t.createComment(BM(e))}function ey(t,e,r){return t.createElement(e,r)}function WM(t,e){ty(t,e),e[sn]=null,e[Xe]=null}function qM(t,e,r,n,o,i){n[sn]=o,n[Xe]=e,yu(t,n,r,1,o,i)}function ty(t,e){e[$t].changeDetectionScheduler?.notify(8),yu(t,e,e[ae],2,null,null)}function ZM(t){let e=t[Ai];if(!e)return Rl(t[R],t);for(;e;){let r=null;if(Ln(e))r=e[Ai];else{let n=e[je];n&&(r=n)}if(!r){for(;e&&!e[xt]&&e!==t;)Ln(e)&&Rl(e[R],e),e=e[Ve];e===null&&(e=t),Ln(e)&&Rl(e[R],e),r=e&&e[xt]}e=r}}function KM(t,e,r,n){let o=je+n,i=r.length;n>0&&(r[o-1][xt]=e),n0&&(t[r-1][xt]=n[xt]);let i=Na(t,je+e);WM(n[R],n);let s=i[tn];s!==null&&s.detachView(i[R]),n[Ve]=null,n[xt]=null,n[O]&=-129}return n}function mu(t,e){if(!(e[O]&256)){let r=e[ae];r.destroyNode&&yu(t,e,r,3,null,null),ZM(e)}}function Rl(t,e){if(e[O]&256)return;let r=V(null);try{e[O]&=-129,e[O]|=256,e[dt]&&sl(e[dt]),QM(t,e),YM(t,e),e[R].type===1&&e[ae].destroy();let n=e[br];if(n!==null&&an(e[Ve])){n!==e[Ve]&&wf(n,e);let o=e[tn];o!==null&&o.detachView(t)}cM(e)}finally{V(r)}}function YM(t,e){let r=t.cleanup,n=e[Ra];if(r!==null)for(let i=0;i=0?n[s]():n[-s].unsubscribe(),i+=2}else{let s=n[r[i+1]];r[i].call(s)}n!==null&&(e[Ra]=null);let o=e[Fn];if(o!==null){e[Fn]=null;for(let i=0;i-1){let{encapsulation:i}=t.data[n.directiveStart+o];if(i===Bt.None||i===Bt.Emulated)return null}return ft(n,r)}}function Ua(t,e,r,n,o){t.insertBefore(e,r,n,o)}function oy(t,e,r){t.appendChild(e,r)}function em(t,e,r,n,o){n!==null?Ua(t,e,r,n,o):oy(t,e,r)}function XM(t,e,r,n){t.removeChild(e,r,n)}function bf(t,e){return t.parentNode(e)}function eT(t,e){return t.nextSibling(e)}function iy(t,e,r){return nT(t,e,r)}function tT(t,e,r){return t.type&40?ft(t,r):null}var nT=tT,tm;function vu(t,e,r,n){let o=ry(t,n,e),i=e[ae],s=n.parent||e[Xe],a=iy(s,n,e);if(o!=null)if(Array.isArray(r))for(let u=0;uEe&&ly(t,e,Ee,!1),Vt(s?2:0,o),r(n,o)}finally{Ir(i),Vt(s?3:1,o)}}function Ef(t,e,r){if(rf(e)){let n=V(null);try{let o=e.directiveStart,i=e.directiveEnd;for(let s=o;snull;function gT(t,e,r,n){let o=Dy(e);o.push(r),t.firstCreatePass&&wy(t).push(n,o.length-1)}function mT(t,e,r,n,o,i){let s=e?e.injectorIndex:-1,a=0;return lv()&&(a|=128),{type:r,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:o,attrs:i,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:e,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function nm(t,e,r,n,o){for(let i in e){if(!e.hasOwnProperty(i))continue;let s=e[i];if(s===void 0)continue;n??={};let a,u=fo.None;Array.isArray(s)?(a=s[0],u=s[1]):a=s;let c=i;if(o!==null){if(!o.hasOwnProperty(i))continue;c=o[i]}t===0?rm(n,r,c,a,u):rm(n,r,c,a)}return n}function rm(t,e,r,n,o){let i;t.hasOwnProperty(r)?(i=t[r]).push(e,n):i=t[r]=[e,n],o!==void 0&&i.push(o)}function vT(t,e,r){let n=e.directiveStart,o=e.directiveEnd,i=t.data,s=e.attrs,a=[],u=null,c=null;for(let l=n;l0;){let r=t[--e];if(typeof r=="number"&&r<0)return r}return 0}function CT(t,e,r,n){let o=r.directiveStart,i=r.directiveEnd;au(r)&&ST(e,r,t.data[o+r.componentOffset]),t.firstCreatePass||Va(r,e),Un(n,e);let s=r.initialInputs;for(let a=o;a{lu(t.lView)},consumerOnSignalRead(){this.lView[dt]=this}});function $T(t){let e=t[dt]??Object.create(HT);return e.lView=t,e}var HT=$(D({},rl),{consumerIsAlwaysLive:!0,consumerMarkedDirty:t=>{let e=Er(t.lView);for(;e&&!xy(e[R]);)e=Er(e);e&&sv(e)},consumerOnSignalRead(){this.lView[dt]=this}});function xy(t){return t.type!==2}var zT=100;function _y(t,e=!0,r=0){let n=t[$t],o=n.rendererFactory,i=!1;i||o.begin?.();try{GT(t,r)}catch(s){throw e&&by(t,s),s}finally{i||(o.end?.(),n.inlineEffectRunner?.flush())}}function GT(t,e){let r=fv();try{Hg(!0),yd(t,e);let n=0;for(;Ni(t);){if(n===zT)throw new C(103,!1);n++,yd(t,1)}}finally{Hg(r)}}function WT(t,e,r,n){let o=e[O];if((o&256)===256)return;let i=!1,s=!1;!i&&e[$t].inlineEffectRunner?.flush(),df(e);let a=!0,u=null,c=null;i||(xy(t)?(c=jT(e),u=ol(c)):Yp()===null?(a=!1,c=$T(e),u=ol(c)):e[dt]&&(sl(e[dt]),e[dt]=null));try{iv(e),O_(t.bindingStartIndex),r!==null&&hy(t,e,r,2,n);let l=(o&3)===3;if(!i)if(l){let h=t.preOrderCheckHooks;h!==null&&Ia(e,h,null)}else{let h=t.preOrderHooks;h!==null&&xa(e,h,0,null),Al(e,0)}if(s||qT(e),My(e,0),t.contentQueries!==null&&yy(t,e),!i)if(l){let h=t.contentCheckHooks;h!==null&&Ia(e,h)}else{let h=t.contentHooks;h!==null&&xa(e,h,1),Al(e,1)}cT(t,e);let d=t.components;d!==null&&Sy(e,d,0);let f=t.viewQuery;if(f!==null&&vd(2,f,n),!i)if(l){let h=t.viewCheckHooks;h!==null&&Ia(e,h)}else{let h=t.viewHooks;h!==null&&xa(e,h,2),Al(e,2)}if(t.firstUpdatePass===!0&&(t.firstUpdatePass=!1),e[Sl]){for(let h of e[Sl])h();e[Sl]=null}i||(e[O]&=-73)}catch(l){throw i||lu(e),l}finally{c!==null&&(Qp(c,u),a&&UT(c)),ff()}}function My(t,e){for(let r=Fv(t);r!==null;r=Lv(r))for(let n=je;n-1&&(Oi(e,n),Na(r,n))}this._attachedToViewContainer=!1}mu(this._lView[R],this._lView)}onDestroy(e){av(this._lView,e)}markForCheck(){Af(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[O]&=-129}reattach(){Jl(this._lView),this._lView[O]|=128}detectChanges(){this._lView[O]|=1024,_y(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new C(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=Yl(this._lView),r=this._lView[br];r!==null&&!e&&wf(r,this._lView),ty(this._lView[R],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new C(902,!1);this._appRef=e;let r=Yl(this._lView),n=this._lView[br];n!==null&&!r&&ny(n,this._lView),Jl(this._lView)}},Tr=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=QT;let t=e;return t})(),KT=Tr,YT=class extends KT{constructor(e,r,n){super(),this._declarationLView=e,this._declarationTContainer=r,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,r){return this.createEmbeddedViewImpl(e,r)}createEmbeddedViewImpl(e,r,n){let o=$i(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:r,dehydratedView:n});return new Mr(o)}};function QT(){return Eu(Pe(),M())}function Eu(t,e){return t.type&4?new YT(e,t,_o(t,e)):null}var r5=new RegExp(`^(\\d+)*(${hM}|${fM})*(.*)`);var JT=()=>null;function yo(t,e){return JT(t,e)}var Ri=class{},Ay=new E("",{providedIn:"root",factory:()=>!1});var Ny=new E(""),Dd=class{},$a=class{};function XT(t){let e=Error(`No component factory found for ${Be(t)}.`);return e[eS]=t,e}var eS="ngComponent";var wd=class{resolveComponentFactory(e){throw XT(e)}},Gf=class Gf{};Gf.NULL=new wd;var Do=Gf,wo=class{},rt=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>tS();let t=e;return t})();function tS(){let t=M(),e=Pe(),r=$n(e.index,t);return(Ln(r)?r:t)[ae]}var nS=(()=>{let e=class e{};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>null});let t=e;return t})(),Pl={};var om=new Set;function zi(t){om.has(t)||(om.add(t),performance?.mark?.("mark_feature_usage",{detail:{feature:t}}))}function Oy(t){let e=!0;return setTimeout(()=>{e&&(e=!1,t())}),typeof It.requestAnimationFrame=="function"&&It.requestAnimationFrame(()=>{e&&(e=!1,t())}),()=>{e=!1}}function im(t){let e=!0;return queueMicrotask(()=>{e&&t()}),()=>{e=!1}}function sm(...t){}var pe=class t{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:r=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new G(!1),this.onMicrotaskEmpty=new G(!1),this.onStable=new G(!1),this.onError=new G(!1),typeof Zone>"u")throw new C(908,!1);Zone.assertZonePatched();let o=this;o._nesting=0,o._outer=o._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(o._inner=o._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(o._inner=o._inner.fork(Zone.longStackTraceZoneSpec)),o.shouldCoalesceEventChangeDetection=!n&&r,o.shouldCoalesceRunChangeDetection=n,o.callbackScheduled=!1,iS(o)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!t.isInAngularZone())throw new C(909,!1)}static assertNotInAngularZone(){if(t.isInAngularZone())throw new C(909,!1)}run(e,r,n){return this._inner.run(e,r,n)}runTask(e,r,n,o){let i=this._inner,s=i.scheduleEventTask("NgZoneEvent: "+o,e,rS,sm,sm);try{return i.runTask(s,r,n)}finally{i.cancelTask(s)}}runGuarded(e,r,n){return this._inner.runGuarded(e,r,n)}runOutsideAngular(e){return this._outer.run(e)}},rS={};function Nf(t){if(t._nesting==0&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function oS(t){t.isCheckStableRunning||t.callbackScheduled||(t.callbackScheduled=!0,Zone.root.run(()=>{Oy(()=>{t.callbackScheduled=!1,bd(t),t.isCheckStableRunning=!0,Nf(t),t.isCheckStableRunning=!1})}),bd(t))}function iS(t){let e=()=>{oS(t)};t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(r,n,o,i,s,a)=>{if(sS(a))return r.invokeTask(o,i,s,a);try{return am(t),r.invokeTask(o,i,s,a)}finally{(t.shouldCoalesceEventChangeDetection&&i.type==="eventTask"||t.shouldCoalesceRunChangeDetection)&&e(),um(t)}},onInvoke:(r,n,o,i,s,a,u)=>{try{return am(t),r.invoke(o,i,s,a,u)}finally{t.shouldCoalesceRunChangeDetection&&!t.callbackScheduled&&!aS(a)&&e(),um(t)}},onHasTask:(r,n,o,i)=>{r.hasTask(o,i),n===o&&(i.change=="microTask"?(t._hasPendingMicrotasks=i.microTask,bd(t),Nf(t)):i.change=="macroTask"&&(t.hasPendingMacrotasks=i.macroTask))},onHandleError:(r,n,o,i)=>(r.handleError(o,i),t.runOutsideAngular(()=>t.onError.emit(i)),!1)})}function bd(t){t._hasPendingMicrotasks||(t.shouldCoalesceEventChangeDetection||t.shouldCoalesceRunChangeDetection)&&t.callbackScheduled===!0?t.hasPendingMicrotasks=!0:t.hasPendingMicrotasks=!1}function am(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function um(t){t._nesting--,Nf(t)}var Cd=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new G,this.onMicrotaskEmpty=new G,this.onStable=new G,this.onError=new G}run(e,r,n){return e.apply(r,n)}runGuarded(e,r,n){return e.apply(r,n)}runOutsideAngular(e){return e()}runTask(e,r,n,o){return e.apply(r,n)}};function sS(t){return Ry(t,"__ignore_ng_zone__")}function aS(t){return Ry(t,"__scheduler_tick__")}function Ry(t,e){return!Array.isArray(t)||t.length!==1?!1:t[0]?.data?.[e]===!0}var Py=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let o of n)o()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>new e});let t=e;return t})();function Ha(t,e,r){let n=r?t.styles:null,o=r?t.classes:null,i=0;if(e!==null)for(let s=0;s0&&uy(t,r,i.join(" "))}}function pS(t,e,r){let n=t.projection=[];for(let o=0;o{let e=class e{};e.__NG_ELEMENT_ID__=mS;let t=e;return t})();function mS(){let t=Pe();return Ly(t,M())}var vS=dn,Fy=class extends vS{constructor(e,r,n){super(),this._lContainer=e,this._hostTNode=r,this._hostLView=n}get element(){return _o(this._hostTNode,this._hostLView)}get injector(){return new Dr(this._hostTNode,this._hostLView)}get parentInjector(){let e=hf(this._hostTNode,this._hostLView);if(bv(e)){let r=ka(e,this._hostLView),n=La(e),o=r[R].data[n+8];return new Dr(o,r)}else return new Dr(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let r=lm(this._lContainer);return r!==null&&r[e]||null}get length(){return this._lContainer.length-je}createEmbeddedView(e,r,n){let o,i;typeof n=="number"?o=n:n!=null&&(o=n.index,i=n.injector);let s=yo(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(r||{},i,s);return this.insertImpl(a,o,vo(this._hostTNode,s)),a}createComponent(e,r,n,o,i){let s=e&&!v_(e),a;if(s)a=r;else{let p=r||{};a=p.index,n=p.injector,o=p.projectableNodes,i=p.environmentInjector||p.ngModuleRef}let u=s?e:new bo(kn(e)),c=n||this.parentInjector;if(!i&&u.ngModule==null){let g=(s?c:this.parentInjector).get(Ye,null);g&&(i=g)}let l=kn(u.componentType??{}),d=yo(this._lContainer,l?.id??null),f=d?.firstChild??null,h=u.create(c,o,f,i);return this.insertImpl(h.hostView,a,vo(this._hostTNode,d)),h}insert(e,r){return this.insertImpl(e,r,!0)}insertImpl(e,r,n){let o=e._lView;if(C_(o)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let u=o[Ve],c=new Fy(u,u[Xe],u[Ve]);c.detach(c.indexOf(e))}}let i=this._adjustIndex(r),s=this._lContainer;return Hi(s,o,i,n),e.attachToViewContainerRef(),Om(Fl(s),i,e),e}move(e,r){return this.insert(e,r)}indexOf(e){let r=lm(this._lContainer);return r!==null?r.indexOf(e):-1}remove(e){let r=this._adjustIndex(e,-1),n=Oi(this._lContainer,r);n&&(Na(Fl(this._lContainer),r),mu(n[R],n))}detach(e){let r=this._adjustIndex(e,-1),n=Oi(this._lContainer,r);return n&&Na(Fl(this._lContainer),r)!=null?new Mr(n):null}_adjustIndex(e,r=0){return e??this.length+r}};function lm(t){return t[Pa]}function Fl(t){return t[Pa]||(t[Pa]=[])}function Ly(t,e){let r,n=e[t.index];return an(n)?r=n:(r=vy(n,e,null,t),e[t.index]=r,bu(e,r)),DS(r,e,t,n),new Fy(r,t,e)}function yS(t,e){let r=t[ae],n=r.createComment(""),o=ft(e,t),i=bf(r,o);return Ua(r,i,n,eT(r,o),!1),n}var DS=CS,wS=()=>!1;function bS(t,e,r){return wS(t,e,r)}function CS(t,e,r,n){if(t[Cr])return;let o;r.type&8?o=Ht(n):o=yS(e,r),t[Cr]=o}var xd=class t{constructor(e){this.queryList=e,this.matches=null}clone(){return new t(this.queryList)}setDirty(){this.queryList.setDirty()}},_d=class t{constructor(e=[]){this.queries=e}createEmbeddedView(e){let r=e.queries;if(r!==null){let n=e.contentQueries!==null?e.contentQueries[0]:r.length,o=[];for(let i=0;i0)n.push(s[a/2]);else{let c=i[a+1],l=e[-u];for(let d=je;de.trim())}function Vy(t,e,r){t.queries===null&&(t.queries=new Md),t.queries.track(new Td(e,r))}function NS(t,e){let r=t.contentQueries||(t.contentQueries=[]),n=r.length?r[r.length-1]:-1;e!==n&&r.push(t.queries.length-1,e)}function Of(t,e){return t.queries.getByIndex(e)}function OS(t,e){let r=t[R],n=Of(r,e);return n.crossesNgTemplate?Sd(r,t,e,[]):ky(r,t,n,e)}function RS(t){return typeof t=="function"&&t[nl]!==void 0}function Uy(t){return RS(t)&&typeof t.set=="function"}function PS(t){return Object.getPrototypeOf(t.prototype).constructor}function Ie(t){let e=PS(t.type),r=!0,n=[t];for(;e;){let o;if(jn(t))o=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new C(903,!1);o=e.\u0275dir}if(o){if(r){n.push(o);let s=t;s.inputs=ba(t.inputs),s.inputTransforms=ba(t.inputTransforms),s.declaredInputs=ba(t.declaredInputs),s.outputs=ba(t.outputs);let a=o.hostBindings;a&&VS(t,a);let u=o.viewQuery,c=o.contentQueries;if(u&&kS(t,u),c&&jS(t,c),FS(t,o),w0(t.outputs,o.outputs),jn(o)&&o.data.animation){let l=t.data;l.animation=(l.animation||[]).concat(o.data.animation)}}let i=o.features;if(i)for(let s=0;s=0;n--){let o=t[n];o.hostVars=e+=o.hostVars,o.hostAttrs=Ti(o.hostAttrs,r=Ti(r,o.hostAttrs))}}function ba(t){return t===en?{}:t===Ke?[]:t}function kS(t,e){let r=t.viewQuery;r?t.viewQuery=(n,o)=>{e(n,o),r(n,o)}:t.viewQuery=e}function jS(t,e){let r=t.contentQueries;r?t.contentQueries=(n,o,i)=>{e(n,o,i),r(n,o,i)}:t.contentQueries=e}function VS(t,e){let r=t.hostBindings;r?t.hostBindings=(n,o)=>{e(n,o),r(n,o)}:t.hostBindings=e}function i5(t){let e=r=>{let n=(Array.isArray(t)?t:t()).map(o=>typeof o=="function"?{directive:Ne(o),inputs:en,outputs:en}:{directive:Ne(o.directive),inputs:dm(o.inputs),outputs:dm(o.outputs)});r.hostDirectives===null?(r.findHostDirectiveDefs=By,r.hostDirectives=n):r.hostDirectives.unshift(...n)};return e.ngInherit=!0,e}function By(t,e,r){if(t.hostDirectives!==null)for(let n of t.hostDirectives){let o=tf(n.directive);US(o.declaredInputs,n.inputs),By(o,e,r),r.set(o,n),e.push(o)}}function dm(t){if(t===void 0||t.length===0)return en;let e={};for(let r=0;rr()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},Nd=class extends Pi{constructor(e){super(),this.moduleType=e}create(e){return new Ad(this.moduleType,e,[])}};var Wa=class extends Bn{constructor(e){super(),this.componentFactoryResolver=new za(this),this.instance=null;let r=new Si([...e.providers,{provide:Bn,useValue:this},{provide:Do,useValue:this.componentFactoryResolver}],e.parent||iu(),e.debugName,new Set(["environment"]));this.injector=r,e.runEnvironmentInitializers&&r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function Pf(t,e,r=null){return new Wa({providers:t,parent:e,debugName:r,runEnvironmentInitializers:!0}).injector}function $y(t){return Ff(t)?Array.isArray(t)||!(t instanceof Map)&&Symbol.iterator in t:!1}function BS(t,e){if(Array.isArray(t))for(let r=0;r>17&32767}function YS(t){return(t&2)==2}function QS(t,e){return t&131071|e<<17}function Od(t){return t|2}function Eo(t){return(t&131068)>>2}function Ll(t,e){return t&-131069|e<<2}function JS(t){return(t&1)===1}function Rd(t){return t|1}function XS(t,e,r,n,o,i){let s=i?e.classBindings:e.styleBindings,a=Sr(s),u=Eo(s);t[n]=r;let c=!1,l;if(Array.isArray(r)){let d=r;l=d[1],(l===null||ki(d,l)>0)&&(c=!0)}else l=r;if(o)if(u!==0){let f=Sr(t[a+1]);t[n+1]=Ca(f,a),f!==0&&(t[f+1]=Ll(t[f+1],n)),t[a+1]=QS(t[a+1],n)}else t[n+1]=Ca(a,0),a!==0&&(t[a+1]=Ll(t[a+1],n)),a=n;else t[n+1]=Ca(u,0),a===0?a=n:t[u+1]=Ll(t[u+1],n),u=n;c&&(t[n+1]=Od(t[n+1])),fm(t,l,n,!0),fm(t,l,n,!1),eA(e,l,t,n,i),s=Ca(a,u),i?e.classBindings=s:e.styleBindings=s}function eA(t,e,r,n,o){let i=o?t.residualClasses:t.residualStyles;i!=null&&typeof e=="string"&&ki(i,e)>=0&&(r[n+1]=Rd(r[n+1]))}function fm(t,e,r,n){let o=t[r+1],i=e===null,s=n?Sr(o):Eo(o),a=!1;for(;s!==0&&(a===!1||i);){let u=t[s],c=t[s+1];tA(u,e)&&(a=!0,t[s+1]=n?Rd(c):Od(c)),s=n?Sr(c):Eo(c)}a&&(t[r+1]=n?Od(o):Rd(o))}function tA(t,e){return t===null||e==null||(Array.isArray(t)?t[1]:t)===e?!0:Array.isArray(t)&&typeof e=="string"?ki(t,e)>=0:!1}var Et={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function nA(t){return t.substring(Et.key,Et.keyEnd)}function rA(t){return oA(t),Gy(t,Wy(t,0,Et.textEnd))}function Gy(t,e){let r=Et.textEnd;return r===e?-1:(e=Et.keyEnd=iA(t,Et.key=e,r),Wy(t,e,r))}function oA(t){Et.key=0,Et.keyEnd=0,Et.value=0,Et.valueEnd=0,Et.textEnd=t.length}function Wy(t,e,r){for(;e32;)e++;return e}function sA(t,e,r){let n=M(),o=Nr();if(Je(n,o,e)){let i=ce(),s=Ui();wu(i,s,n,t,e,n[ae],r,!1)}return sA}function Pd(t,e,r,n,o){let i=e.inputs,s=o?"class":"style";Tf(t,r,i[s],s,n)}function Iu(t,e){return aA(t,e,null,!0),Iu}function s5(t){Zy(hA,qy,t,!0)}function qy(t,e){for(let r=rA(e);r>=0;r=Gy(e,r))ru(t,nA(e),!0)}function aA(t,e,r,n){let o=M(),i=ce(),s=Vi(2);if(i.firstUpdatePass&&Yy(i,t,s,n),e!==Me&&Je(o,s,e)){let a=i.data[St()];Qy(i,a,o,o[ae],t,o[s+1]=gA(e,r),n,s)}}function Zy(t,e,r,n){let o=ce(),i=Vi(2);o.firstUpdatePass&&Yy(o,null,i,n);let s=M();if(r!==Me&&Je(s,i,r)){let a=o.data[St()];if(Jy(a,n)&&!Ky(o,i)){let u=n?a.classesWithoutHost:a.stylesWithoutHost;u!==null&&(r=$l(u,r||"")),Pd(o,a,s,r,n)}else pA(o,a,s,s[ae],s[i+1],s[i+1]=fA(t,e,r),n,i)}}function Ky(t,e){return e>=t.expandoStartIndex}function Yy(t,e,r,n){let o=t.data;if(o[r+1]===null){let i=o[St()],s=Ky(t,r);Jy(i,n)&&e===null&&!s&&(e=!1),e=uA(o,i,e,n),XS(o,i,e,r,s,n)}}function uA(t,e,r,n){let o=L_(t),i=n?e.residualClasses:e.residualStyles;if(o===null)(n?e.classBindings:e.styleBindings)===0&&(r=kl(null,t,e,r,n),r=Fi(r,e.attrs,n),i=null);else{let s=e.directiveStylingLast;if(s===-1||t[s]!==o)if(r=kl(o,t,e,r,n),i===null){let u=cA(t,e,n);u!==void 0&&Array.isArray(u)&&(u=kl(null,t,e,u[1],n),u=Fi(u,e.attrs,n),lA(t,e,n,u))}else i=dA(t,e,n)}return i!==void 0&&(n?e.residualClasses=i:e.residualStyles=i),r}function cA(t,e,r){let n=r?e.classBindings:e.styleBindings;if(Eo(n)!==0)return t[Sr(n)]}function lA(t,e,r,n){let o=r?e.classBindings:e.styleBindings;t[Sr(o)]=n}function dA(t,e,r){let n,o=e.directiveEnd;for(let i=1+e.directiveStylingLast;i0;){let u=t[o],c=Array.isArray(u),l=c?u[1]:u,d=l===null,f=r[o+1];f===Me&&(f=d?Ke:void 0);let h=d?Ml(f,n):l===n?f:void 0;if(c&&!Za(h)&&(h=Ml(u,n)),Za(h)&&(a=h,s))return a;let p=t[o+1];o=s?Sr(p):Eo(p)}if(e!==null){let u=i?e.residualClasses:e.residualStyles;u!=null&&(a=Ml(u,n))}return a}function Za(t){return t!==void 0}function gA(t,e){return t==null||t===""||(typeof e=="string"?t=t+e:typeof t=="object"&&(t=Be(At(t)))),t}function Jy(t,e){return(t.flags&(e?8:16))!==0}function a5(t,e,r){let n=M(),o=kf(n,t,e,r);Zy(ru,qy,o,!0)}function u5(){return M()[Qe][Oe]}var Fd=class{destroy(e){}updateValue(e,r){}swap(e,r){let n=Math.min(e,r),o=Math.max(e,r),i=this.detach(o);if(o-n>1){let s=this.detach(n);this.attach(n,i),this.attach(o,s)}else this.attach(n,i)}move(e,r){this.attach(r,this.detach(e))}};function jl(t,e,r,n,o){return t===r&&Object.is(e,n)?1:Object.is(o(t,e),o(r,n))?-1:0}function mA(t,e,r){let n,o,i=0,s=t.length-1,a=void 0;if(Array.isArray(e)){let u=e.length-1;for(;i<=s&&i<=u;){let c=t.at(i),l=e[i],d=jl(i,c,i,l,r);if(d!==0){d<0&&t.updateValue(i,l),i++;continue}let f=t.at(s),h=e[u],p=jl(s,f,u,h,r);if(p!==0){p<0&&t.updateValue(s,h),s--,u--;continue}let g=r(i,c),m=r(s,f),v=r(i,l);if(Object.is(v,m)){let A=r(u,h);Object.is(A,g)?(t.swap(i,s),t.updateValue(s,h),u--,s--):t.move(s,i),t.updateValue(i,l),i++;continue}if(n??=new Ka,o??=gm(t,i,s,r),Ld(t,n,i,v))t.updateValue(i,l),i++,s++;else if(o.has(v))n.set(g,t.detach(i)),s--;else{let A=t.create(i,e[i]);t.attach(i,A),i++,s++}}for(;i<=u;)pm(t,n,r,i,e[i]),i++}else if(e!=null){let u=e[Symbol.iterator](),c=u.next();for(;!c.done&&i<=s;){let l=t.at(i),d=c.value,f=jl(i,l,i,d,r);if(f!==0)f<0&&t.updateValue(i,d),i++,c=u.next();else{n??=new Ka,o??=gm(t,i,s,r);let h=r(i,d);if(Ld(t,n,i,h))t.updateValue(i,d),i++,s++,c=u.next();else if(!o.has(h))t.attach(i,t.create(i,d)),i++,s++,c=u.next();else{let p=r(i,l);n.set(p,t.detach(i)),s--}}}for(;!c.done;)pm(t,n,r,t.length,c.value),c=u.next()}for(;i<=s;)t.destroy(t.detach(s--));n?.forEach(u=>{t.destroy(u)})}function Ld(t,e,r,n){return e!==void 0&&e.has(n)?(t.attach(r,e.get(n)),e.delete(n),!0):!1}function pm(t,e,r,n,o){if(Ld(t,e,n,r(n,o)))t.updateValue(n,o);else{let i=t.create(n,o);t.attach(n,i)}}function gm(t,e,r,n){let o=new Set;for(let i=e;i<=r;i++)o.add(n(i,t.at(i)));return o}var Ka=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(e){return this.kvMap.has(e)}delete(e){if(!this.has(e))return!1;let r=this.kvMap.get(e);return this._vMap!==void 0&&this._vMap.has(r)?(this.kvMap.set(e,this._vMap.get(r)),this._vMap.delete(r)):this.kvMap.delete(e),!0}get(e){return this.kvMap.get(e)}set(e,r){if(this.kvMap.has(e)){let n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let o=this._vMap;for(;o.has(n);)n=o.get(n);o.set(n,r)}else this.kvMap.set(e,r)}forEach(e){for(let[r,n]of this.kvMap)if(e(n,r),this._vMap!==void 0){let o=this._vMap;for(;o.has(n);)n=o.get(n),e(n,r)}}};function c5(t,e){zi("NgControlFlow");let r=M(),n=Nr(),o=r[n]!==Me?r[n]:-1,i=o!==-1?Ya(r,Ee+o):void 0,s=0;if(Je(r,n,t)){let a=V(null);try{if(i!==void 0&&Ey(i,s),t!==-1){let u=Ee+t,c=Ya(r,u),l=Ud(r[R],u),d=yo(c,l.tView.ssrId),f=$i(r,l,e,{dehydratedView:d});Hi(c,f,s,vo(l,d))}}finally{V(a)}}else if(i!==void 0){let a=Cy(i,s);a!==void 0&&(a[Oe]=e)}}var kd=class{constructor(e,r,n){this.lContainer=e,this.$implicit=r,this.$index=n}get $count(){return this.lContainer.length-je}};function l5(t){return t}function d5(t,e){return e}var jd=class{constructor(e,r,n){this.hasEmptyBlock=e,this.trackByFn=r,this.liveCollection=n}};function f5(t,e,r,n,o,i,s,a,u,c,l,d,f){zi("NgControlFlow");let h=M(),p=ce(),g=u!==void 0,m=M(),v=a?s.bind(m[Qe][Oe]):s,A=new jd(g,v);m[Ee+t]=A,qa(h,p,t+1,e,r,n,o,Vn(p.consts,i)),g&&qa(h,p,t+2,u,c,l,d,Vn(p.consts,f))}var Vd=class extends Fd{constructor(e,r,n){super(),this.lContainer=e,this.hostLView=r,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-je}at(e){return this.getLView(e)[Oe].$implicit}attach(e,r){let n=r[po];this.needsIndexUpdate||=e!==this.length,Hi(this.lContainer,r,e,vo(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,vA(this.lContainer,e)}create(e,r){let n=yo(this.lContainer,this.templateTNode.tView.ssrId),o=$i(this.hostLView,this.templateTNode,new kd(this.lContainer,r,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),o}destroy(e){mu(e[R],e),this.operationsCounter?.recordDestroy()}updateValue(e,r){this.getLView(e)[Oe].$implicit=r}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(fu(!0),ey(n,o,V_()));function bA(t,e,r,n,o){let i=e.consts,s=Vn(i,n),a=Mo(e,t,8,"ng-container",s);s!==null&&Ha(a,s,!0);let u=Vn(i,o);return Mf(e,r,a,u),e.queries!==null&&e.queries.elementStart(e,a),a}function tD(t,e,r){let n=M(),o=ce(),i=t+Ee,s=o.firstCreatePass?bA(i,o,n,e,r):o.data[i];Ar(s,!0);let a=EA(o,n,s,t);return n[i]=a,du()&&vu(o,n,a,s),Un(a,n),uu(s)&&(If(o,n,s),Ef(o,s,n)),r!=null&&xf(n,s),tD}function nD(){let t=Pe(),e=ce();return af()?uf():(t=t.parent,Ar(t,!1)),e.firstCreatePass&&(hu(e,t),rf(t)&&e.queries.elementEnd(t)),nD}function CA(t,e,r){return tD(t,e,r),nD(),CA}var EA=(t,e,r,n)=>(fu(!0),GM(e[ae],""));function p5(){return M()}function IA(t,e,r){let n=M(),o=Nr();if(Je(n,o,e)){let i=ce(),s=Ui();wu(i,s,n,t,e,n[ae],r,!0)}return IA}var vr=void 0;function xA(t){let e=t,r=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return r===1&&n===0?1:5}var _A=["en",[["a","p"],["AM","PM"],vr],[["AM","PM"],vr,vr],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],vr,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],vr,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",vr,"{1} 'at' {0}",vr],[".",",",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",xA],_i={};function rD(t,e,r){typeof e!="string"&&(r=e,e=t[ue.LocaleId]),e=e.toLowerCase().replace(/_/g,"-"),_i[e]=t,r&&(_i[e][ue.ExtraData]=r)}function ot(t){let e=MA(t),r=mm(e);if(r)return r;let n=e.split("-")[0];if(r=mm(n),r)return r;if(n==="en")return _A;throw new C(701,!1)}function mm(t){return t in _i||(_i[t]=It.ng&&It.ng.common&&It.ng.common.locales&&It.ng.common.locales[t]),_i[t]}var ue=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}(ue||{});function MA(t){return t.toLowerCase().replace(/_/g,"-")}var Qa="en-US";var TA=Qa;function SA(t){typeof t=="string"&&(TA=t.toLowerCase().replace(/_/g,"-"))}var AA=(t,e,r)=>{};function ht(t,e,r,n){let o=M(),i=ce(),s=Pe();return oD(i,o,o[ae],s,t,e,n),ht}function NA(t,e,r,n){let o=t.cleanup;if(o!=null)for(let i=0;iu?a[u]:null}typeof s=="string"&&(i+=2)}return null}function oD(t,e,r,n,o,i,s){let a=uu(n),c=t.firstCreatePass&&wy(t),l=e[Oe],d=Dy(e),f=!0;if(n.type&3||s){let g=ft(n,e),m=s?s(g):g,v=d.length,A=s?U=>s(Ht(U[n.index])):n.index,z=null;if(!s&&a&&(z=NA(t,e,o,n.index)),z!==null){let U=z.__ngLastListenerFn__||z;U.__ngNextListenerFn__=i,z.__ngLastListenerFn__=i,f=!1}else{i=ym(n,e,l,i),AA(g,o,i);let U=r.listen(m,o,i);d.push(i,U),c&&c.push(o,A,v,v+1)}}else i=ym(n,e,l,i);let h=n.outputs,p;if(f&&h!==null&&(p=h[o])){let g=p.length;if(g)for(let m=0;m-1?$n(t.index,e):e;Af(s,5);let a=vm(e,r,n,i),u=o.__ngNextListenerFn__;for(;u;)a=vm(e,r,u,i)&&a,u=u.__ngNextListenerFn__;return a}}function g5(t=1){return j_(t)}function OA(t,e){let r=null,n=Y0(t);for(let o=0;o=t.data.length&&(t.data[r]=null,t.blueprint[r]=null),e[r]=n}function D5(t){let e=N_();return cu(e,Ee+t)}function w5(t,e=""){let r=M(),n=ce(),o=t+Ee,i=n.firstCreatePass?Mo(n,o,1,e,null):n.data[o],s=LA(n,r,i,e,t);r[o]=s,du()&&vu(n,r,s,i),Ar(i,!1)}var LA=(t,e,r,n,o)=>(fu(!0),HM(e[ae],n));function kA(t){return cD("",t,""),kA}function cD(t,e,r){let n=M(),o=kf(n,t,e,r);return o!==Me&&Cu(n,St(),o),cD}function jA(t,e,r,n,o){let i=M(),s=qS(i,t,e,r,n,o);return s!==Me&&Cu(i,St(),s),jA}function VA(t,e,r,n,o,i,s){let a=M(),u=ZS(a,t,e,r,n,o,i,s);return u!==Me&&Cu(a,St(),u),VA}function UA(t,e,r,n,o,i,s,a,u,c,l){let d=M(),f=KS(d,t,e,r,n,o,i,s,a,u,c,l);return f!==Me&&Cu(d,St(),f),UA}function BA(t,e,r){Uy(e)&&(e=e());let n=M(),o=Nr();if(Je(n,o,e)){let i=ce(),s=Ui();wu(i,s,n,t,e,n[ae],r,!1)}return BA}function b5(t,e){let r=Uy(t);return r&&t.set(e),r}function $A(t,e){let r=M(),n=ce(),o=Pe();return oD(n,r,r[ae],o,t,e),$A}function HA(t,e,r){let n=ce();if(n.firstCreatePass){let o=jn(t);Bd(r,n.data,n.blueprint,o,!0),Bd(e,n.data,n.blueprint,o,!1)}}function Bd(t,e,r,n,o){if(t=Ne(t),Array.isArray(t))for(let i=0;i>20;if(ho(t)||!t.multi){let h=new xr(c,o,w),p=Ul(u,e,o?l:l+f,d);p===-1?(td(Va(a,s),i,u),Vl(i,t,e.length),e.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),r.push(h),s.push(h)):(r[p]=h,s[p]=h)}else{let h=Ul(u,e,l+f,d),p=Ul(u,e,l,l+f),g=h>=0&&r[h],m=p>=0&&r[p];if(o&&!m||!o&&!g){td(Va(a,s),i,u);let v=WA(o?GA:zA,r.length,o,n,c);!o&&m&&(r[p].providerFactory=v),Vl(i,t,e.length,0),e.push(u),a.directiveStart++,a.directiveEnd++,o&&(a.providerIndexes+=1048576),r.push(v),s.push(v)}else{let v=lD(r[o?p:h],c,!o&&n);Vl(i,t,h>-1?h:p,v)}!o&&n&&m&&r[p].componentProviders++}}}function Vl(t,e,r,n){let o=ho(e),i=l_(e);if(o||i){let u=(i?Ne(e.useClass):e).prototype.ngOnDestroy;if(u){let c=t.destroyHooks||(t.destroyHooks=[]);if(!o&&e.multi){let l=c.indexOf(r);l===-1?c.push(r,[n,u]):c[l+1].push(n,u)}else c.push(r,u)}}}function lD(t,e,r){return r&&t.componentProviders++,t.multi.push(e)-1}function Ul(t,e,r,n){for(let o=r;o{r.providersResolver=(n,o)=>HA(n,o?o(t):t,e)}}var qA=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let o=Gm(!1,n.type),i=o.length>0?Pf([o],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,i)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=b({token:e,providedIn:"environment",factory:()=>new e(x(Ye))});let t=e;return t})();function dD(t){zi("NgStandalone"),t.getStandaloneInjector=e=>e.get(qA).getOrCreateStandaloneInjector(t)}function C5(t,e,r){let n=un()+t,o=M();return o[n]===Me?To(o,n,r?e.call(r):e()):Hy(o,n)}function E5(t,e,r,n){return fD(M(),un(),t,e,r,n)}function I5(t,e,r,n,o){return hD(M(),un(),t,e,r,n,o)}function x5(t,e,r,n,o,i){return ZA(M(),un(),t,e,r,n,o,i)}function _5(t,e,r,n,o,i,s){return pD(M(),un(),t,e,r,n,o,i,s)}function M5(t,e,r,n,o,i,s,a,u){let c=un()+t,l=M(),d=Lf(l,c,r,n,o,i);return Co(l,c+4,s,a)||d?To(l,c+6,u?e.call(u,r,n,o,i,s,a):e(r,n,o,i,s,a)):Hy(l,c+6)}function xu(t,e){let r=t[e];return r===Me?void 0:r}function fD(t,e,r,n,o,i){let s=e+r;return Je(t,s,o)?To(t,s+1,i?n.call(i,o):n(o)):xu(t,s+1)}function hD(t,e,r,n,o,i,s){let a=e+r;return Co(t,a,o,i)?To(t,a+2,s?n.call(s,o,i):n(o,i)):xu(t,a+2)}function ZA(t,e,r,n,o,i,s,a){let u=e+r;return zy(t,u,o,i,s)?To(t,u+3,a?n.call(a,o,i,s):n(o,i,s)):xu(t,u+3)}function pD(t,e,r,n,o,i,s,a,u){let c=e+r;return Lf(t,c,o,i,s,a)?To(t,c+4,u?n.call(u,o,i,s,a):n(o,i,s,a)):xu(t,c+4)}function T5(t,e){let r=ce(),n,o=t+Ee;r.firstCreatePass?(n=KA(e,r.pipeRegistry),r.data[o]=n,n.onDestroy&&(r.destroyHooks??=[]).push(o,n.onDestroy)):n=r.data[o];let i=n.factory||(n.factory=wr(n.type,!0)),s,a=qe(w);try{let u=ja(!1),c=i();return ja(u),FA(r,M(),o,c),c}finally{qe(a)}}function KA(t,e){if(e)for(let r=e.length-1;r>=0;r--){let n=e[r];if(t===n.name)return n}}function S5(t,e,r){let n=t+Ee,o=M(),i=cu(o,n);return Vf(o,n)?fD(o,un(),e,i.transform,r,i):i.transform(r)}function A5(t,e,r,n){let o=t+Ee,i=M(),s=cu(i,o);return Vf(i,o)?hD(i,un(),e,s.transform,r,n,s):s.transform(r,n)}function N5(t,e,r,n,o,i){let s=t+Ee,a=M(),u=cu(a,s);return Vf(a,s)?pD(a,un(),e,u.transform,r,n,o,i,u):u.transform(r,n,o,i)}function Vf(t,e){return t[R].data[e].pure}function O5(t,e){return Eu(t,e)}var _u=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"platform"});let t=e;return t})();var gD=new E("");function Gn(t){return!!t&&typeof t.then=="function"}function Uf(t){return!!t&&typeof t.subscribe=="function"}var mD=new E(""),vD=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,o)=>{this.resolve=n,this.reject=o}),this.appInits=y(mD,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let i of this.appInits){let s=i();if(Gn(s))n.push(s);else if(Uf(s)){let a=new Promise((u,c)=>{s.subscribe({complete:u,error:c})});n.push(a)}}let o=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{o()}).catch(i=>{this.reject(i)}),n.length===0&&o(),this.initialized=!0}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Mu=new E("");function YA(){Jp(()=>{throw new C(600,!1)})}function QA(t){return t.isBoundToModule}var JA=10;function XA(t,e,r){try{let n=r();return Gn(n)?n.catch(o=>{throw e.runOutsideAngular(()=>t.handleError(o)),o}):n}catch(n){throw e.runOutsideAngular(()=>t.handleError(n)),n}}var Rr=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=y(Nv),this.afterRenderEffectManager=y(Py),this.zonelessEnabled=y(Ay),this.externalTestViews=new Set,this.beforeRender=new se,this.afterTick=new se,this.componentTypes=[],this.components=[],this.isStable=y(Hn).hasPendingTasks.pipe(N(n=>!n)),this._injector=y(Ye)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,o){let i=n instanceof $a;if(!this._injector.get(vD).done){let h=!i&&Bm(n),p=!1;throw new C(405,p)}let a;i?a=n:a=this._injector.get(Do).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let u=QA(a)?void 0:this._injector.get(Bn),c=o||a.selector,l=a.create(nn.NULL,[],c,u),d=l.location.nativeElement,f=l.injector.get(gD,null);return f?.registerApplication(d),l.onDestroy(()=>{this.detachView(l.hostView),Bl(this.components,l),f?.unregisterApplication(d)}),this._loadComponent(l),l}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new C(101,!1);let o=V(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,V(o),this.afterTick.next()}}detectChangesInAttachedViews(n){let o=null;this._injector.destroyed||(o=this._injector.get(wo,null,{optional:!0}));let i=0,s=this.afterRenderEffectManager;for(;iNi(u))&&(s.execute(),!this.allViews.some(({_lView:u})=>Ni(u))))break}}attachView(n){let o=n;this._views.push(o),o.attachToAppRef(this)}detachView(n){let o=n;Bl(this._views,o),o.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let o=this._injector.get(Mu,[]);[...this._bootstrapListeners,...o].forEach(i=>i(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>Bl(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new C(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function Bl(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function eN(t,e,r,n){if(!r&&!Ni(t))return;_y(t,e,r&&!n?0:1)}var Hd=class{constructor(e,r){this.ngModuleFactory=e,this.componentFactories=r}},Bf=(()=>{let e=class e{compileModuleSync(n){return new Nd(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let o=this.compileModuleSync(n),i=$m(n),s=Xv(i.declarations).reduce((a,u)=>{let c=kn(u);return c&&a.push(new bo(c)),a},[]);return new Hd(o,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var tN=(()=>{let e=class e{constructor(){this.zone=y(pe),this.changeDetectionScheduler=y(Ri),this.applicationRef=y(Rr)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function nN({ngZoneFactory:t,ignoreChangesOutsideZone:e}){return t??=()=>new pe(oN()),[{provide:pe,useFactory:t},{provide:lo,multi:!0,useFactory:()=>{let r=y(tN,{optional:!0});return()=>r.initialize()}},{provide:lo,multi:!0,useFactory:()=>{let r=y(iN);return()=>{r.initialize()}}},{provide:Nv,useFactory:rN},e===!0?{provide:Ny,useValue:!0}:[]]}function rN(){let t=y(pe),e=y(rn);return r=>t.runOutsideAngular(()=>e.handleError(r))}function oN(t){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:t?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:t?.runCoalescing??!1}}var iN=(()=>{let e=class e{constructor(){this.subscription=new ie,this.initialized=!1,this.zone=y(pe),this.pendingTasks=y(Hn)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{pe.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{pe.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var sN=(()=>{let e=class e{constructor(){this.appRef=y(Rr),this.taskService=y(Hn),this.ngZone=y(pe),this.zonelessEnabled=y(Ay),this.disableScheduling=y(Ny,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new ie,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof Cd||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 3:case 2:case 0:case 4:case 5:case 1:{this.shouldRefreshViews=!0;break}case 8:case 7:case 6:case 9:default:}if(!this.shouldScheduleTick())return;let o=this.useMicrotaskScheduler?im:Oy;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=o(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=o(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&pe.isInAngularZone())}tick(n){if(this.runningTick||this.appRef.destroyed)return;let o=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(n)},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(o),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,im(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(o)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function aN(){return typeof $localize<"u"&&$localize.locale||Qa}var Gi=new E("",{providedIn:"root",factory:()=>y(Gi,j.Optional|j.SkipSelf)||aN()});var yD=new E("");var Ta=null;function uN(t=[],e){return nn.create({name:e,providers:[{provide:ou,useValue:"platform"},{provide:yD,useValue:new Set([()=>Ta=null])},...t]})}function cN(t=[]){if(Ta)return Ta;let e=uN(t);return Ta=e,YA(),lN(e),e}function lN(t){t.get(mf,null)?.forEach(r=>r())}var Nt=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=dN;let t=e;return t})();function dN(t){return fN(Pe(),M(),(t&16)===16)}function fN(t,e,r){if(au(t)&&!r){let n=$n(t.index,e);return new Mr(n,n)}else if(t.type&47){let n=e[Qe];return new Mr(n,e)}return null}var zd=class{constructor(){}supports(e){return $y(e)}create(e){return new Gd(e)}},hN=(t,e)=>e,Gd=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||hN}forEachItem(e){let r;for(r=this._itHead;r!==null;r=r._next)e(r)}forEachOperation(e){let r=this._itHead,n=this._removalsHead,o=0,i=null;for(;r||n;){let s=!n||r&&r.currentIndex{s=this._trackByFn(o,a),r===null||!Object.is(r.trackById,s)?(r=this._mismatch(r,a,s,o),n=!0):(n&&(r=this._verifyReinsertion(r,a,s,o)),Object.is(r.item,a)||this._addIdentityChange(r,a)),r=r._next,o++}),this.length=o;return this._truncate(r),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,r,n,o){let i;return e===null?i=this._itTail:(i=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._reinsertAfter(e,i,o)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,o),e!==null?(Object.is(e.item,r)||this._addIdentityChange(e,r),this._moveAfter(e,i,o)):e=this._addAfter(new Wd(r,n),i,o)),e}_verifyReinsertion(e,r,n,o){let i=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return i!==null?e=this._reinsertAfter(i,e._prev,o):e.currentIndex!=o&&(e.currentIndex=o,this._addToMoves(e,o)),e}_truncate(e){for(;e!==null;){let r=e._next;this._addToRemovals(this._unlink(e)),e=r}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,r,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let o=e._prevRemoved,i=e._nextRemoved;return o===null?this._removalsHead=i:o._nextRemoved=i,i===null?this._removalsTail=o:i._prevRemoved=o,this._insertAfter(e,r,n),this._addToMoves(e,n),e}_moveAfter(e,r,n){return this._unlink(e),this._insertAfter(e,r,n),this._addToMoves(e,n),e}_addAfter(e,r,n){return this._insertAfter(e,r,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,r,n){let o=r===null?this._itHead:r._next;return e._next=o,e._prev=r,o===null?this._itTail=e:o._prev=e,r===null?this._itHead=e:r._next=e,this._linkedRecords===null&&(this._linkedRecords=new Ja),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let r=e._prev,n=e._next;return r===null?this._itHead=n:r._next=n,n===null?this._itTail=r:n._prev=r,e}_addToMoves(e,r){return e.previousIndex===r||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Ja),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,r){return e.item=r,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},Wd=class{constructor(e,r){this.item=e,this.trackById=r,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},qd=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,r){let n;for(n=this._head;n!==null;n=n._nextDup)if((r===null||r<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let r=e._prevDup,n=e._nextDup;return r===null?this._head=n:r._nextDup=n,n===null?this._tail=r:n._prevDup=r,this._head===null}},Ja=class{constructor(){this.map=new Map}put(e){let r=e.trackById,n=this.map.get(r);n||(n=new qd,this.map.set(r,n)),n.add(e)}get(e,r){let n=e,o=this.map.get(n);return o?o.get(e,r):null}remove(e){let r=e.trackById;return this.map.get(r).remove(e)&&this.map.delete(r),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function Dm(t,e,r){let n=t.previousIndex;if(n===null)return n;let o=0;return r&&n{if(r&&r.key===o)this._maybeAddToChanges(r,n),this._appendAfter=r,r=r._next;else{let i=this._getOrCreateRecordForKey(o,n);r=this._insertBeforeOrAppend(r,i)}}),r){r._prev&&(r._prev._next=null),this._removalsHead=r;for(let n=r;n!==null;n=n._nextRemoved)n===this._mapHead&&(this._mapHead=null),this._records.delete(n.key),n._nextRemoved=n._next,n.previousValue=n.currentValue,n.currentValue=null,n._prev=null,n._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(e,r){if(e){let n=e._prev;return r._next=e,r._prev=n,e._prev=r,n&&(n._next=r),e===this._mapHead&&(this._mapHead=r),this._appendAfter=e,e}return this._appendAfter?(this._appendAfter._next=r,r._prev=this._appendAfter):this._mapHead=r,this._appendAfter=r,null}_getOrCreateRecordForKey(e,r){if(this._records.has(e)){let o=this._records.get(e);this._maybeAddToChanges(o,r);let i=o._prev,s=o._next;return i&&(i._next=s),s&&(s._prev=i),o._next=null,o._prev=null,o}let n=new Yd(e);return this._records.set(e,n),n.currentValue=r,this._addToAdditions(n),n}_reset(){if(this.isDirty){let e;for(this._previousMapHead=this._mapHead,e=this._previousMapHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;e!==null;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;e!=null;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(e,r){Object.is(r,e.currentValue)||(e.previousValue=e.currentValue,e.currentValue=r,this._addToChanges(e))}_addToAdditions(e){this._additionsHead===null?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)}_addToChanges(e){this._changesHead===null?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)}_forEach(e,r){e instanceof Map?e.forEach(r):Object.keys(e).forEach(n=>r(e[n],n))}},Yd=class{constructor(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function wm(){return new $f([new zd])}var $f=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,o){if(o!=null){let i=o.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:o=>e.create(n,o||wm()),deps:[[e,new Jd,new nu]]}}find(n){let o=this.factories.find(i=>i.supports(n));if(o!=null)return o;throw new C(901,!1)}};e.\u0275prov=b({token:e,providedIn:"root",factory:wm});let t=e;return t})();function bm(){return new Hf([new Zd])}var Hf=(()=>{let e=class e{constructor(n){this.factories=n}static create(n,o){if(o){let i=o.factories.slice();n=n.concat(i)}return new e(n)}static extend(n){return{provide:e,useFactory:o=>e.create(n,o||bm()),deps:[[e,new Jd,new nu]]}}find(n){let o=this.factories.find(i=>i.supports(n));if(o)return o;throw new C(901,!1)}};e.\u0275prov=b({token:e,providedIn:"root",factory:bm});let t=e;return t})();function DD(t){try{let{rootComponent:e,appProviders:r,platformProviders:n}=t,o=cN(n),i=[nN({}),{provide:Ri,useExisting:sN},...r||[]],a=new Wa({providers:i,parent:o,debugName:"",runEnvironmentInitializers:!1}).injector,u=a.get(pe);return u.run(()=>{a.resolveInjectorInitializers();let c=a.get(rn,null),l;u.runOutsideAngular(()=>{l=u.onError.subscribe({next:h=>{c.handleError(h)}})});let d=()=>a.destroy(),f=o.get(yD);return f.add(d),a.onDestroy(()=>{l.unsubscribe(),f.delete(d)}),XA(c,u,()=>{let h=a.get(vD);return h.runInitializers(),h.donePromise.then(()=>{let p=a.get(Gi,Qa);SA(p||Qa);let g=a.get(Rr);return e!==void 0&&g.bootstrap(e),g})})})}catch(e){return Promise.reject(e)}}function Wn(t){return typeof t=="boolean"?t:t!=null&&t!=="false"}function pN(t,e=NaN){return!isNaN(parseFloat(t))&&!isNaN(Number(t))?Number(t):e}function zf(t){let e=V(null);try{return t()}finally{V(e)}}function R5(t,e){let r=kn(t),n=e.elementInjector||iu();return new bo(r).create(n,e.projectableNodes,e.hostElement,e.environmentInjector)}var MD=null;function mn(){return MD}function TD(t){MD??=t}var Lu=class{};var Ue=new E(""),ih=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(gN),providedIn:"platform"});let t=e;return t})();var gN=(()=>{let e=class e extends ih{constructor(){super(),this._doc=y(Ue),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return mn().getBaseHref(this._doc)}onPopState(n){let o=mn().getGlobalEventTarget(this._doc,"window");return o.addEventListener("popstate",n,!1),()=>o.removeEventListener("popstate",n)}onHashChange(n){let o=mn().getGlobalEventTarget(this._doc,"window");return o.addEventListener("hashchange",n,!1),()=>o.removeEventListener("hashchange",n)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(n){this._location.pathname=n}pushState(n,o,i){this._history.pushState(n,o,i)}replaceState(n,o,i){this._history.replaceState(n,o,i)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>new e,providedIn:"platform"});let t=e;return t})();function sh(t,e){if(t.length==0)return e;if(e.length==0)return t;let r=0;return t.endsWith("/")&&r++,e.startsWith("/")&&r++,r==2?t+e.substring(1):r==1?t+e:t+"/"+e}function wD(t){let e=t.match(/#|\?|$/),r=e&&e.index||t.length,n=r-(t[r-1]==="/"?1:0);return t.slice(0,n)+t.slice(r)}function hn(t){return t&&t[0]!=="?"?"?"+t:t}var qn=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(AD),providedIn:"root"});let t=e;return t})(),SD=new E(""),AD=(()=>{let e=class e extends qn{constructor(n,o){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=o??this._platformLocation.getBaseHrefFromDOM()??y(Ue).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return sh(this._baseHref,n)}path(n=!1){let o=this._platformLocation.pathname+hn(this._platformLocation.search),i=this._platformLocation.hash;return i&&n?`${o}${i}`:o}pushState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));this._platformLocation.pushState(n,o,a)}replaceState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));this._platformLocation.replaceState(n,o,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(o){return new(o||e)(x(ih),x(SD,8))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),ND=(()=>{let e=class e extends qn{constructor(n,o){super(),this._platformLocation=n,this._baseHref="",this._removeListenerFns=[],o!=null&&(this._baseHref=o)}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}path(n=!1){let o=this._platformLocation.hash??"#";return o.length>0?o.substring(1):o}prepareExternalUrl(n){let o=sh(this._baseHref,n);return o.length>0?"#"+o:o}pushState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.pushState(n,o,a)}replaceState(n,o,i,s){let a=this.prepareExternalUrl(i+hn(s));a.length==0&&(a=this._platformLocation.pathname),this._platformLocation.replaceState(n,o,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(o){return new(o||e)(x(ih),x(SD,8))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),qi=(()=>{let e=class e{constructor(n){this._subject=new G,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let o=this._locationStrategy.getBaseHref();this._basePath=yN(wD(bD(o))),this._locationStrategy.onPopState(i=>{this._subject.emit({url:this.path(!0),pop:!0,state:i.state,type:i.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,o=""){return this.path()==this.normalize(n+hn(o))}normalize(n){return e.stripTrailingSlash(vN(this._basePath,bD(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,o="",i=null){this._locationStrategy.pushState(i,"",n,o),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(o)),i)}replaceState(n,o="",i=null){this._locationStrategy.replaceState(i,"",n,o),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+hn(o)),i)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(o=>{this._notifyUrlChangeListeners(o.url,o.state)}),()=>{let o=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(o,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",o){this._urlChangeListeners.forEach(i=>i(n,o))}subscribe(n,o,i){return this._subject.subscribe({next:n,error:o,complete:i})}};e.normalizeQueryParams=hn,e.joinWithSlash=sh,e.stripTrailingSlash=wD,e.\u0275fac=function(o){return new(o||e)(x(qn))},e.\u0275prov=b({token:e,factory:()=>mN(),providedIn:"root"});let t=e;return t})();function mN(){return new qi(x(qn))}function vN(t,e){if(!t||!e.startsWith(t))return e;let r=e.substring(t.length);return r===""||["/",";","?","#"].includes(r[0])?r:e}function bD(t){return t.replace(/\/index.html$/,"")}function yN(t){if(new RegExp("^(https?:)?//").test(t)){let[,r]=t.split(/\/\/[^\/]+/);return r}return t}var OD=function(t){return t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency",t[t.Scientific=3]="Scientific",t}(OD||{});var He=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}(He||{}),X=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}(X||{}),it=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}(it||{}),st={Decimal:0,Group:1,List:2,PercentSign:3,PlusSign:4,MinusSign:5,Exponential:6,SuperscriptingExponent:7,PerMille:8,Infinity:9,NaN:10,TimeSeparator:11,CurrencyDecimal:12,CurrencyGroup:13};function DN(t){return ot(t)[ue.LocaleId]}function wN(t,e,r){let n=ot(t),o=[n[ue.DayPeriodsFormat],n[ue.DayPeriodsStandalone]],i=pt(o,e);return pt(i,r)}function bN(t,e,r){let n=ot(t),o=[n[ue.DaysFormat],n[ue.DaysStandalone]],i=pt(o,e);return pt(i,r)}function CN(t,e,r){let n=ot(t),o=[n[ue.MonthsFormat],n[ue.MonthsStandalone]],i=pt(o,e);return pt(i,r)}function EN(t,e){let n=ot(t)[ue.Eras];return pt(n,e)}function Tu(t,e){let r=ot(t);return pt(r[ue.DateFormat],e)}function Su(t,e){let r=ot(t);return pt(r[ue.TimeFormat],e)}function Au(t,e){let n=ot(t)[ue.DateTimeFormat];return pt(n,e)}function pn(t,e){let r=ot(t),n=r[ue.NumberSymbols][e];if(typeof n>"u"){if(e===st.CurrencyDecimal)return r[ue.NumberSymbols][st.Decimal];if(e===st.CurrencyGroup)return r[ue.NumberSymbols][st.Group]}return n}function IN(t,e){return ot(t)[ue.NumberFormats][e]}function RD(t){if(!t[ue.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[ue.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function xN(t){let e=ot(t);return RD(e),(e[ue.ExtraData][2]||[]).map(n=>typeof n=="string"?Wf(n):[Wf(n[0]),Wf(n[1])])}function _N(t,e,r){let n=ot(t);RD(n);let o=[n[ue.ExtraData][0],n[ue.ExtraData][1]],i=pt(o,e)||[];return pt(i,r)||[]}function pt(t,e){for(let r=e;r>-1;r--)if(typeof t[r]<"u")return t[r];throw new Error("Locale data API: locale data undefined")}function Wf(t){let[e,r]=t.split(":");return{hours:+e,minutes:+r}}var MN=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Nu={},TN=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/,gn=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}(gn||{}),q=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}(q||{}),W=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}(W||{});function SN(t,e,r,n){let o=jN(t);e=fn(r,e)||e;let s=[],a;for(;e;)if(a=TN.exec(e),a){s=s.concat(a.slice(1));let l=s.pop();if(!l)break;e=l}else{s.push(e);break}let u=o.getTimezoneOffset();n&&(u=FD(n,u),o=kN(o,n,!0));let c="";return s.forEach(l=>{let d=FN(l);c+=d?d(o,r,u):l==="''"?"'":l.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function ku(t,e,r){let n=new Date(0);return n.setFullYear(t,e,r),n.setHours(0,0,0),n}function fn(t,e){let r=DN(t);if(Nu[r]??={},Nu[r][e])return Nu[r][e];let n="";switch(e){case"shortDate":n=Tu(t,it.Short);break;case"mediumDate":n=Tu(t,it.Medium);break;case"longDate":n=Tu(t,it.Long);break;case"fullDate":n=Tu(t,it.Full);break;case"shortTime":n=Su(t,it.Short);break;case"mediumTime":n=Su(t,it.Medium);break;case"longTime":n=Su(t,it.Long);break;case"fullTime":n=Su(t,it.Full);break;case"short":let o=fn(t,"shortTime"),i=fn(t,"shortDate");n=Ou(Au(t,it.Short),[o,i]);break;case"medium":let s=fn(t,"mediumTime"),a=fn(t,"mediumDate");n=Ou(Au(t,it.Medium),[s,a]);break;case"long":let u=fn(t,"longTime"),c=fn(t,"longDate");n=Ou(Au(t,it.Long),[u,c]);break;case"full":let l=fn(t,"fullTime"),d=fn(t,"fullDate");n=Ou(Au(t,it.Full),[l,d]);break}return n&&(Nu[r][e]=n),n}function Ou(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(r,n){return e!=null&&n in e?e[n]:r})),t}function Ot(t,e,r="-",n,o){let i="";(t<0||o&&t<=0)&&(o?t=-t+1:(t=-t,i=r));let s=String(t);for(;s.length0||a>-r)&&(a+=r),t===q.Hours)a===0&&r===-12&&(a=12);else if(t===q.FractionalSeconds)return AN(a,e);let u=pn(s,st.MinusSign);return Ot(a,e,u,n,o)}}function NN(t,e){switch(t){case q.FullYear:return e.getFullYear();case q.Month:return e.getMonth();case q.Date:return e.getDate();case q.Hours:return e.getHours();case q.Minutes:return e.getMinutes();case q.Seconds:return e.getSeconds();case q.FractionalSeconds:return e.getMilliseconds();case q.Day:return e.getDay();default:throw new Error(`Unknown DateType value "${t}".`)}}function ne(t,e,r=He.Format,n=!1){return function(o,i){return ON(o,i,t,e,r,n)}}function ON(t,e,r,n,o,i){switch(r){case W.Months:return CN(e,o,n)[t.getMonth()];case W.Days:return bN(e,o,n)[t.getDay()];case W.DayPeriods:let s=t.getHours(),a=t.getMinutes();if(i){let c=xN(e),l=_N(e,o,n),d=c.findIndex(f=>{if(Array.isArray(f)){let[h,p]=f,g=s>=h.hours&&a>=h.minutes,m=s0?Math.floor(o/60):Math.ceil(o/60);switch(t){case gn.Short:return(o>=0?"+":"")+Ot(s,2,i)+Ot(Math.abs(o%60),2,i);case gn.ShortGMT:return"GMT"+(o>=0?"+":"")+Ot(s,1,i);case gn.Long:return"GMT"+(o>=0?"+":"")+Ot(s,2,i)+":"+Ot(Math.abs(o%60),2,i);case gn.Extended:return n===0?"Z":(o>=0?"+":"")+Ot(s,2,i)+":"+Ot(Math.abs(o%60),2,i);default:throw new Error(`Unknown zone width "${t}"`)}}}var RN=0,Fu=4;function PN(t){let e=ku(t,RN,1).getDay();return ku(t,0,1+(e<=Fu?Fu:Fu+7)-e)}function PD(t){let e=t.getDay(),r=e===0?-3:Fu-e;return ku(t.getFullYear(),t.getMonth(),t.getDate()+r)}function qf(t,e=!1){return function(r,n){let o;if(e){let i=new Date(r.getFullYear(),r.getMonth(),1).getDay()-1,s=r.getDate();o=1+Math.floor((s+i)/7)}else{let i=PD(r),s=PN(i.getFullYear()),a=i.getTime()-s.getTime();o=1+Math.round(a/6048e5)}return Ot(o,t,pn(n,st.MinusSign))}}function Pu(t,e=!1){return function(r,n){let i=PD(r).getFullYear();return Ot(i,t,pn(n,st.MinusSign),e)}}var Zf={};function FN(t){if(Zf[t])return Zf[t];let e;switch(t){case"G":case"GG":case"GGG":e=ne(W.Eras,X.Abbreviated);break;case"GGGG":e=ne(W.Eras,X.Wide);break;case"GGGGG":e=ne(W.Eras,X.Narrow);break;case"y":e=ve(q.FullYear,1,0,!1,!0);break;case"yy":e=ve(q.FullYear,2,0,!0,!0);break;case"yyy":e=ve(q.FullYear,3,0,!1,!0);break;case"yyyy":e=ve(q.FullYear,4,0,!1,!0);break;case"Y":e=Pu(1);break;case"YY":e=Pu(2,!0);break;case"YYY":e=Pu(3);break;case"YYYY":e=Pu(4);break;case"M":case"L":e=ve(q.Month,1,1);break;case"MM":case"LL":e=ve(q.Month,2,1);break;case"MMM":e=ne(W.Months,X.Abbreviated);break;case"MMMM":e=ne(W.Months,X.Wide);break;case"MMMMM":e=ne(W.Months,X.Narrow);break;case"LLL":e=ne(W.Months,X.Abbreviated,He.Standalone);break;case"LLLL":e=ne(W.Months,X.Wide,He.Standalone);break;case"LLLLL":e=ne(W.Months,X.Narrow,He.Standalone);break;case"w":e=qf(1);break;case"ww":e=qf(2);break;case"W":e=qf(1,!0);break;case"d":e=ve(q.Date,1);break;case"dd":e=ve(q.Date,2);break;case"c":case"cc":e=ve(q.Day,1);break;case"ccc":e=ne(W.Days,X.Abbreviated,He.Standalone);break;case"cccc":e=ne(W.Days,X.Wide,He.Standalone);break;case"ccccc":e=ne(W.Days,X.Narrow,He.Standalone);break;case"cccccc":e=ne(W.Days,X.Short,He.Standalone);break;case"E":case"EE":case"EEE":e=ne(W.Days,X.Abbreviated);break;case"EEEE":e=ne(W.Days,X.Wide);break;case"EEEEE":e=ne(W.Days,X.Narrow);break;case"EEEEEE":e=ne(W.Days,X.Short);break;case"a":case"aa":case"aaa":e=ne(W.DayPeriods,X.Abbreviated);break;case"aaaa":e=ne(W.DayPeriods,X.Wide);break;case"aaaaa":e=ne(W.DayPeriods,X.Narrow);break;case"b":case"bb":case"bbb":e=ne(W.DayPeriods,X.Abbreviated,He.Standalone,!0);break;case"bbbb":e=ne(W.DayPeriods,X.Wide,He.Standalone,!0);break;case"bbbbb":e=ne(W.DayPeriods,X.Narrow,He.Standalone,!0);break;case"B":case"BB":case"BBB":e=ne(W.DayPeriods,X.Abbreviated,He.Format,!0);break;case"BBBB":e=ne(W.DayPeriods,X.Wide,He.Format,!0);break;case"BBBBB":e=ne(W.DayPeriods,X.Narrow,He.Format,!0);break;case"h":e=ve(q.Hours,1,-12);break;case"hh":e=ve(q.Hours,2,-12);break;case"H":e=ve(q.Hours,1);break;case"HH":e=ve(q.Hours,2);break;case"m":e=ve(q.Minutes,1);break;case"mm":e=ve(q.Minutes,2);break;case"s":e=ve(q.Seconds,1);break;case"ss":e=ve(q.Seconds,2);break;case"S":e=ve(q.FractionalSeconds,1);break;case"SS":e=ve(q.FractionalSeconds,2);break;case"SSS":e=ve(q.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=Ru(gn.Short);break;case"ZZZZZ":e=Ru(gn.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=Ru(gn.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=Ru(gn.Long);break;default:return null}return Zf[t]=e,e}function FD(t,e){t=t.replace(/:/g,"");let r=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(r)?e:r}function LN(t,e){return t=new Date(t.getTime()),t.setMinutes(t.getMinutes()+e),t}function kN(t,e,r){let n=r?-1:1,o=t.getTimezoneOffset(),i=FD(e,o);return LN(t,n*(i-o))}function jN(t){if(CD(t))return t;if(typeof t=="number"&&!isNaN(t))return new Date(t);if(typeof t=="string"){if(t=t.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(t)){let[o,i=1,s=1]=t.split("-").map(a=>+a);return ku(o,i-1,s)}let r=parseFloat(t);if(!isNaN(t-r))return new Date(r);let n;if(n=t.match(MN))return VN(n)}let e=new Date(t);if(!CD(e))throw new Error(`Unable to convert "${t}" into a date`);return e}function VN(t){let e=new Date(0),r=0,n=0,o=t[8]?e.setUTCFullYear:e.setFullYear,i=t[8]?e.setUTCHours:e.setHours;t[9]&&(r=Number(t[9]+t[10]),n=Number(t[9]+t[11])),o.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));let s=Number(t[4]||0)-r,a=Number(t[5]||0)-n,u=Number(t[6]||0),c=Math.floor(parseFloat("0."+(t[7]||0))*1e3);return i.call(e,s,a,u,c),e}function CD(t){return t instanceof Date&&!isNaN(t.valueOf())}var UN=/^(\d+)?\.((\d+)(-(\d+))?)?$/,ED=22,ju=".",Wi="0",BN=";",$N=",",Kf="#";function HN(t,e,r,n,o,i,s=!1){let a="",u=!1;if(!isFinite(t))a=pn(r,st.Infinity);else{let c=qN(t);s&&(c=WN(c));let l=e.minInt,d=e.minFrac,f=e.maxFrac;if(i){let A=i.match(UN);if(A===null)throw new Error(`${i} is not a valid digit info`);let z=A[1],U=A[3],me=A[5];z!=null&&(l=Yf(z)),U!=null&&(d=Yf(U)),me!=null?f=Yf(me):U!=null&&d>f&&(f=d)}ZN(c,d,f);let h=c.digits,p=c.integerLen,g=c.exponent,m=[];for(u=h.every(A=>!A);p0?m=h.splice(p,h.length):(m=h,h=[0]);let v=[];for(h.length>=e.lgSize&&v.unshift(h.splice(-e.lgSize,h.length).join(""));h.length>e.gSize;)v.unshift(h.splice(-e.gSize,h.length).join(""));h.length&&v.unshift(h.join("")),a=v.join(pn(r,n)),m.length&&(a+=pn(r,o)+m.join("")),g&&(a+=pn(r,st.Exponential)+"+"+g)}return t<0&&!u?a=e.negPre+a+e.negSuf:a=e.posPre+a+e.posSuf,a}function zN(t,e,r){let n=IN(e,OD.Decimal),o=GN(n,pn(e,st.MinusSign));return HN(t,o,e,st.Group,st.Decimal,r)}function GN(t,e="-"){let r={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},n=t.split(BN),o=n[0],i=n[1],s=o.indexOf(ju)!==-1?o.split(ju):[o.substring(0,o.lastIndexOf(Wi)+1),o.substring(o.lastIndexOf(Wi)+1)],a=s[0],u=s[1]||"";r.posPre=a.substring(0,a.indexOf(Kf));for(let l=0;l-1&&(e=e.replace(ju,"")),(i=e.search(/e/i))>0?(o<0&&(o=i),o+=+e.slice(i+1),e=e.substring(0,i)):o<0&&(o=e.length),i=0;e.charAt(i)===Wi;i++);if(i===(a=e.length))n=[0],o=1;else{for(a--;e.charAt(a)===Wi;)a--;for(o-=i,n=[],s=0;i<=a;i++,s++)n[s]=Number(e.charAt(i))}return o>ED&&(n=n.splice(0,ED-1),r=o-1,o=1),{digits:n,exponent:r,integerLen:o}}function ZN(t,e,r){if(e>r)throw new Error(`The minimum number of digits after fraction (${e}) is higher than the maximum (${r}).`);let n=t.digits,o=n.length-t.integerLen,i=Math.min(Math.max(e,o),r),s=i+t.integerLen,a=n[s];if(s>0){n.splice(Math.max(t.integerLen,s));for(let d=s;d=5)if(s-1<0){for(let d=0;d>s;d--)n.unshift(0),t.integerLen++;n.unshift(1),t.integerLen++}else n[s-1]++;for(;o=c?p.pop():u=!1),f>=10?1:0},0);l&&(n.unshift(l),t.integerLen++)}function Yf(t){let e=parseInt(t);if(isNaN(e))throw new Error("Invalid integer literal when parsing "+t);return e}function J5(t,e,r){return rD(t,e,r)}function Vu(t,e){e=encodeURIComponent(e);for(let r of t.split(";")){let n=r.indexOf("="),[o,i]=n==-1?[r,""]:[r.slice(0,n),r.slice(n+1)];if(o.trim()===e)return decodeURIComponent(i)}return null}var Qf=/\s+/,ID=[],X5=(()=>{let e=class e{constructor(n,o){this._ngEl=n,this._renderer=o,this.initialClasses=ID,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(Qf):ID}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(Qf):n}ngDoCheck(){for(let o of this.initialClasses)this._updateState(o,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let o of n)this._updateState(o,!0);else if(n!=null)for(let o of Object.keys(n))this._updateState(o,!!n[o]);this._applyStateDiff()}_updateState(n,o){let i=this.stateMap.get(n);i!==void 0?(i.enabled!==o&&(i.changed=!0,i.enabled=o),i.touched=!0):this.stateMap.set(n,{enabled:o,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let o=n[0],i=n[1];i.changed?(this._toggleClass(o,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(o,!1),this.stateMap.delete(o)),i.touched=!1}}_toggleClass(n,o){n=n.trim(),n.length>0&&n.split(Qf).forEach(i=>{o?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(rt))},e.\u0275dir=H({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let t=e;return t})();var Jf=class{constructor(e,r,n,o){this.$implicit=e,this.ngForOf=r,this.index=n,this.count=o}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},e9=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,o,i){this._viewContainer=n,this._template=o,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let o=this._viewContainer;n.forEachOperation((i,s,a)=>{if(i.previousIndex==null)o.createEmbeddedView(this._template,new Jf(i.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)o.remove(s===null?void 0:s);else if(s!==null){let u=o.get(s);o.move(u,a),xD(u,i)}});for(let i=0,s=o.length;i{let s=o.get(i.currentIndex);xD(s,i)})}static ngTemplateContextGuard(n,o){return!0}};e.\u0275fac=function(o){return new(o||e)(w(dn),w(Tr),w($f))},e.\u0275dir=H({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let t=e;return t})();function xD(t,e){t.context.$implicit=e.item}var t9=(()=>{let e=class e{constructor(n,o){this._viewContainer=n,this._context=new Xf,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=o}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){_D("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){_D("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,o){return!0}};e.\u0275fac=function(o){return new(o||e)(w(dn),w(Tr))},e.\u0275dir=H({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let t=e;return t})(),Xf=class{constructor(){this.$implicit=null,this.ngIf=null}};function _D(t,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${t} must be a TemplateRef, but received '${Be(e)}'.`)}var n9=(()=>{let e=class e{constructor(n,o,i){this._ngEl=n,this._differs=o,this._renderer=i,this._ngStyle=null,this._differ=null}set ngStyle(n){this._ngStyle=n,!this._differ&&n&&(this._differ=this._differs.find(n).create())}ngDoCheck(){if(this._differ){let n=this._differ.diff(this._ngStyle);n&&this._applyChanges(n)}}_setStyle(n,o){let[i,s]=n.split("."),a=i.indexOf("-")===-1?void 0:zt.DashCase;o!=null?this._renderer.setStyle(this._ngEl.nativeElement,i,s?`${o}${s}`:o,a):this._renderer.removeStyle(this._ngEl.nativeElement,i,a)}_applyChanges(n){n.forEachRemovedItem(o=>this._setStyle(o.key,null)),n.forEachAddedItem(o=>this._setStyle(o.key,o.currentValue)),n.forEachChangedItem(o=>this._setStyle(o.key,o.currentValue))}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(Hf),w(rt))},e.\u0275dir=H({type:e,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0});let t=e;return t})(),r9=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let o=this._viewContainerRef;if(this._viewRef&&o.remove(o.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let i=this._createContextForwardProxy();this._viewRef=o.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,o,i)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,o,i):!1,get:(n,o,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,o,i)}})}};e.\u0275fac=function(o){return new(o||e)(w(dn))},e.\u0275dir=H({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[nt]});let t=e;return t})();function ah(t,e){return new C(2100,!1)}var eh=class{createSubscription(e,r){return zf(()=>e.subscribe({next:r,error:n=>{throw n}}))}dispose(e){zf(()=>e.unsubscribe())}},th=class{createSubscription(e,r){return e.then(r,n=>{throw n})}dispose(e){}},KN=new th,YN=new eh,o9=(()=>{let e=class e{constructor(n){this._latestValue=null,this.markForCheckOnValueUpdate=!0,this._subscription=null,this._obj=null,this._strategy=null,this._ref=n}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(n){if(!this._obj){if(n)try{this.markForCheckOnValueUpdate=!1,this._subscribe(n)}finally{this.markForCheckOnValueUpdate=!0}return this._latestValue}return n!==this._obj?(this._dispose(),this.transform(n)):this._latestValue}_subscribe(n){this._obj=n,this._strategy=this._selectStrategy(n),this._subscription=this._strategy.createSubscription(n,o=>this._updateLatestValue(n,o))}_selectStrategy(n){if(Gn(n))return KN;if(Uf(n))return YN;throw ah(e,n)}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(n,o){n===this._obj&&(this._latestValue=o,this.markForCheckOnValueUpdate&&this._ref?.markForCheck())}};e.\u0275fac=function(o){return new(o||e)(w(Nt,16))},e.\u0275pipe=Io({name:"async",type:e,pure:!1,standalone:!0});let t=e;return t})();var QN="mediumDate",JN=new E(""),XN=new E(""),i9=(()=>{let e=class e{constructor(n,o,i){this.locale=n,this.defaultTimezone=o,this.defaultOptions=i}transform(n,o,i,s){if(n==null||n===""||n!==n)return null;try{let a=o??this.defaultOptions?.dateFormat??QN,u=i??this.defaultOptions?.timezone??this.defaultTimezone??void 0;return SN(n,a,s||this.locale,u)}catch(a){throw ah(e,a.message)}}};e.\u0275fac=function(o){return new(o||e)(w(Gi,16),w(JN,24),w(XN,24))},e.\u0275pipe=Io({name:"date",type:e,pure:!0,standalone:!0});let t=e;return t})();var s9=(()=>{let e=class e{constructor(n){this._locale=n}transform(n,o,i){if(!eO(n))return null;i||=this._locale;try{let s=tO(n);return zN(s,i,o)}catch(s){throw ah(e,s.message)}}};e.\u0275fac=function(o){return new(o||e)(w(Gi,16))},e.\u0275pipe=Io({name:"number",type:e,pure:!0,standalone:!0});let t=e;return t})();function eO(t){return!(t==null||t===""||t!==t)}function tO(t){if(typeof t=="string"&&!isNaN(Number(t)-parseFloat(t)))return Number(t);if(typeof t!="number")throw new Error(`${t} is not a number`);return t}var nO=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({});let t=e;return t})(),uh="browser",rO="server";function oO(t){return t===uh}function Uu(t){return t===rO}var iO=(()=>{let e=class e{};e.\u0275prov=b({token:e,providedIn:"root",factory:()=>oO(y(cn))?new nh(y(Ue),window):new rh});let t=e;return t})(),nh=class{constructor(e,r){this.document=e,this.window=r,this.offset=()=>[0,0]}setOffset(e){Array.isArray(e)?this.offset=()=>e:this.offset=e}getScrollPosition(){return[this.window.scrollX,this.window.scrollY]}scrollToPosition(e){this.window.scrollTo(e[0],e[1])}scrollToAnchor(e){let r=sO(this.document,e);r&&(this.scrollToElement(r),r.focus())}setHistoryScrollRestoration(e){this.window.history.scrollRestoration=e}scrollToElement(e){let r=e.getBoundingClientRect(),n=r.left+this.window.pageXOffset,o=r.top+this.window.pageYOffset,i=this.offset();this.window.scrollTo(n-i[0],o-i[1])}};function sO(t,e){let r=t.getElementById(e)||t.getElementsByName(e)[0];if(r)return r;if(typeof t.createTreeWalker=="function"&&t.body&&typeof t.body.attachShadow=="function"){let n=t.createTreeWalker(t.body,NodeFilter.SHOW_ELEMENT),o=n.currentNode;for(;o;){let i=o.shadowRoot;if(i){let s=i.getElementById(e)||i.querySelector(`[name="${e}"]`);if(s)return s}o=n.nextNode()}}return null}var rh=class{setOffset(e){}getScrollPosition(){return[0,0]}scrollToPosition(e){}scrollToAnchor(e){}setHistoryScrollRestoration(e){}},So=class{};var Ki=class{},$u=class{},vn=class t{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` +`).forEach(r=>{let n=r.indexOf(":");if(n>0){let o=r.slice(0,n),i=o.toLowerCase(),s=r.slice(n+1).trim();this.maybeSetNormalizedName(o,i),this.headers.has(i)?this.headers.get(i).push(s):this.headers.set(i,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((r,n)=>{this.setHeaderEntries(n,r)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([r,n])=>{this.setHeaderEntries(r,n)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let r=this.headers.get(e.toLowerCase());return r&&r.length>0?r[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,r){return this.clone({name:e,value:r,op:"a"})}set(e,r){return this.clone({name:e,value:r,op:"s"})}delete(e,r){return this.clone({name:e,value:r,op:"d"})}maybeSetNormalizedName(e,r){this.normalizedNames.has(r)||this.normalizedNames.set(r,e)}init(){this.lazyInit&&(this.lazyInit instanceof t?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(r=>{this.headers.set(r,e.headers.get(r)),this.normalizedNames.set(r,e.normalizedNames.get(r))})}clone(e){let r=new t;return r.lazyInit=this.lazyInit&&this.lazyInit instanceof t?this.lazyInit:this,r.lazyUpdate=(this.lazyUpdate||[]).concat([e]),r}applyUpdate(e){let r=e.name.toLowerCase();switch(e.op){case"a":case"s":let n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,r);let o=(e.op==="a"?this.headers.get(r):void 0)||[];o.push(...n),this.headers.set(r,o);break;case"d":let i=e.value;if(!i)this.headers.delete(r),this.normalizedNames.delete(r);else{let s=this.headers.get(r);if(!s)return;s=s.filter(a=>i.indexOf(a)===-1),s.length===0?(this.headers.delete(r),this.normalizedNames.delete(r)):this.headers.set(r,s)}break}}setHeaderEntries(e,r){let n=(Array.isArray(r)?r:[r]).map(i=>i.toString()),o=e.toLowerCase();this.headers.set(o,n),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(r=>e(this.normalizedNames.get(r),this.headers.get(r)))}};var lh=class{encodeKey(e){return kD(e)}encodeValue(e){return kD(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function aO(t,e){let r=new Map;return t.length>0&&t.replace(/^\?/,"").split("&").forEach(o=>{let i=o.indexOf("="),[s,a]=i==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,i)),e.decodeValue(o.slice(i+1))],u=r.get(s)||[];u.push(a),r.set(s,u)}),r}var uO=/%(\d[a-f0-9])/gi,cO={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function kD(t){return encodeURIComponent(t).replace(uO,(e,r)=>cO[r]??e)}function Bu(t){return`${t}`}var Kn=class t{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new lh,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=aO(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(r=>{let n=e.fromObject[r],o=Array.isArray(n)?n.map(Bu):[Bu(n)];this.map.set(r,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let r=this.map.get(e);return r?r[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,r){return this.clone({param:e,value:r,op:"a"})}appendAll(e){let r=[];return Object.keys(e).forEach(n=>{let o=e[n];Array.isArray(o)?o.forEach(i=>{r.push({param:n,value:i,op:"a"})}):r.push({param:n,value:o,op:"a"})}),this.clone(r)}set(e,r){return this.clone({param:e,value:r,op:"s"})}delete(e,r){return this.clone({param:e,value:r,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let r=this.encoder.encodeKey(e);return this.map.get(e).map(n=>r+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let r=new t({encoder:this.encoder});return r.cloneFrom=this.cloneFrom||this,r.updates=(this.updates||[]).concat(e),r}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let r=(e.op==="a"?this.map.get(e.param):void 0)||[];r.push(Bu(e.value)),this.map.set(e.param,r);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],o=n.indexOf(Bu(e.value));o!==-1&&n.splice(o,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}},jD=class{constructor(e){this.defaultValue=e}},dh=class{constructor(){this.map=new Map}set(e,r){return this.map.set(e,r),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function lO(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function VD(t){return typeof ArrayBuffer<"u"&&t instanceof ArrayBuffer}function UD(t){return typeof Blob<"u"&&t instanceof Blob}function BD(t){return typeof FormData<"u"&&t instanceof FormData}function dO(t){return typeof URLSearchParams<"u"&&t instanceof URLSearchParams}var Zi=class t{constructor(e,r,n,o){this.url=r,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let i;if(lO(this.method)||o?(this.body=n!==void 0?n:null,i=o):i=n,i&&(this.reportProgress=!!i.reportProgress,this.withCredentials=!!i.withCredentials,i.responseType&&(this.responseType=i.responseType),i.headers&&(this.headers=i.headers),i.context&&(this.context=i.context),i.params&&(this.params=i.params),this.transferCache=i.transferCache),this.headers??=new vn,this.context??=new dh,!this.params)this.params=new Kn,this.urlWithParams=r;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=r;else{let a=r.indexOf("?"),u=a===-1?"?":af.set(h,e.setHeaders[h]),c)),e.setParams&&(l=Object.keys(e.setParams).reduce((f,h)=>f.set(h,e.setParams[h]),l)),new t(r,n,s,{params:l,headers:c,context:d,reportProgress:u,responseType:o,withCredentials:a,transferCache:i})}},Yn=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}(Yn||{}),Yi=class{constructor(e,r=200,n="OK"){this.headers=e.headers||new vn,this.status=e.status!==void 0?e.status:r,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}},Hu=class t extends Yi{constructor(e={}){super(e),this.type=Yn.ResponseHeader}clone(e={}){return new t({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Qi=class t extends Yi{constructor(e={}){super(e),this.type=Yn.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new t({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},Zn=class extends Yi{constructor(e){super(e,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},GD=200,fO=204;function ch(t,e){return{body:e,headers:t.headers,context:t.context,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials,transferCache:t.transferCache}}var hO=(()=>{let e=class e{constructor(n){this.handler=n}request(n,o,i={}){let s;if(n instanceof Zi)s=n;else{let c;i.headers instanceof vn?c=i.headers:c=new vn(i.headers);let l;i.params&&(i.params instanceof Kn?l=i.params:l=new Kn({fromObject:i.params})),s=new Zi(n,o,i.body!==void 0?i.body:null,{headers:c,context:i.context,params:l,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache})}let a=I(s).pipe(kt(c=>this.handler.handle(c)));if(n instanceof Zi||i.observe==="events")return a;let u=a.pipe(ke(c=>c instanceof Qi));switch(i.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return u.pipe(N(c=>{if(c.body!==null&&!(c.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return c.body}));case"blob":return u.pipe(N(c=>{if(c.body!==null&&!(c.body instanceof Blob))throw new Error("Response is not a Blob.");return c.body}));case"text":return u.pipe(N(c=>{if(c.body!==null&&typeof c.body!="string")throw new Error("Response is not a string.");return c.body}));case"json":default:return u.pipe(N(c=>c.body))}case"response":return u;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(n,o={}){return this.request("DELETE",n,o)}get(n,o={}){return this.request("GET",n,o)}head(n,o={}){return this.request("HEAD",n,o)}jsonp(n,o){return this.request("JSONP",n,{params:new Kn().append(o,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,o={}){return this.request("OPTIONS",n,o)}patch(n,o,i={}){return this.request("PATCH",n,ch(i,o))}post(n,o,i={}){return this.request("POST",n,ch(i,o))}put(n,o,i={}){return this.request("PUT",n,ch(i,o))}};e.\u0275fac=function(o){return new(o||e)(x(Ki))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),pO=/^\)\]\}',?\n/,gO="X-Request-URL";function $D(t){if(t.url)return t.url;let e=gO.toLocaleLowerCase();return t.headers.get(e)}var mO=(()=>{let e=class e{constructor(){this.fetchImpl=y(fh,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=y(pe)}handle(n){return new P(o=>{let i=new AbortController;return this.doRequest(n,i.signal,o).then(hh,s=>o.error(new Zn({error:s}))),()=>i.abort()})}doRequest(n,o,i){return Us(this,null,function*(){let s=this.createRequestInit(n),a;try{let p=this.fetchImpl(n.urlWithParams,D({signal:o},s));vO(p),i.next({type:Yn.Sent}),a=yield p}catch(p){i.error(new Zn({error:p,status:p.status??0,statusText:p.statusText,url:n.urlWithParams,headers:p.headers}));return}let u=new vn(a.headers),c=a.statusText,l=$D(a)??n.urlWithParams,d=a.status,f=null;if(n.reportProgress&&i.next(new Hu({headers:u,status:d,statusText:c,url:l})),a.body){let p=a.headers.get("content-length"),g=[],m=a.body.getReader(),v=0,A,z,U=typeof Zone<"u"&&Zone.current;yield this.ngZone.runOutsideAngular(()=>Us(this,null,function*(){for(;;){let{done:De,value:lt}=yield m.read();if(De)break;if(g.push(lt),v+=lt.length,n.reportProgress){z=n.responseType==="text"?(z??"")+(A??=new TextDecoder).decode(lt,{stream:!0}):void 0;let qr=()=>i.next({type:Yn.DownloadProgress,total:p?+p:void 0,loaded:v,partialText:z});U?U.run(qr):qr()}}}));let me=this.concatChunks(g,v);try{let De=a.headers.get("Content-Type")??"";f=this.parseBody(n,me,De)}catch(De){i.error(new Zn({error:De,headers:new vn(a.headers),status:a.status,statusText:a.statusText,url:$D(a)??n.urlWithParams}));return}}d===0&&(d=f?GD:0),d>=200&&d<300?(i.next(new Qi({body:f,headers:u,status:d,statusText:c,url:l})),i.complete()):i.error(new Zn({error:f,headers:u,status:d,statusText:c,url:l}))})}parseBody(n,o,i){switch(n.responseType){case"json":let s=new TextDecoder().decode(o).replace(pO,"");return s===""?null:JSON.parse(s);case"text":return new TextDecoder().decode(o);case"blob":return new Blob([o],{type:i});case"arraybuffer":return o.buffer}}createRequestInit(n){let o={},i=n.withCredentials?"include":void 0;if(n.headers.forEach((s,a)=>o[s]=a.join(",")),o.Accept??="application/json, text/plain, */*",!o["Content-Type"]){let s=n.detectContentTypeHeader();s!==null&&(o["Content-Type"]=s)}return{body:n.serializeBody(),method:n.method,headers:o,credentials:i}}concatChunks(n,o){let i=new Uint8Array(o),s=0;for(let a of n)i.set(a,s),s+=a.length;return i}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),fh=class{};function hh(){}function vO(t){t.then(hh,hh)}function yO(t,e){return e(t)}function DO(t,e,r){return(n,o)=>Tt(r,()=>e(n,i=>t(i,o)))}var ph=new E(""),wO=new E(""),bO=new E("",{providedIn:"root",factory:()=>!0});var HD=(()=>{let e=class e extends Ki{constructor(n,o){super(),this.backend=n,this.injector=o,this.chain=null,this.pendingTasks=y(Hn),this.contributeToStability=y(bO)}handle(n){if(this.chain===null){let o=Array.from(new Set([...this.injector.get(ph),...this.injector.get(wO,[])]));this.chain=o.reduceRight((i,s)=>DO(i,s,this.injector),yO)}if(this.contributeToStability){let o=this.pendingTasks.add();return this.chain(n,i=>this.backend.handle(i)).pipe(Rn(()=>this.pendingTasks.remove(o)))}else return this.chain(n,o=>this.backend.handle(o))}};e.\u0275fac=function(o){return new(o||e)(x($u),x(Ye))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})();var CO=/^\)\]\}',?\n/;function EO(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}var zD=(()=>{let e=class e{constructor(n){this.xhrFactory=n}handle(n){if(n.method==="JSONP")throw new C(-2800,!1);let o=this.xhrFactory;return(o.\u0275loadImpl?te(o.\u0275loadImpl()):I(null)).pipe(be(()=>new P(s=>{let a=o.build();if(a.open(n.method,n.urlWithParams),n.withCredentials&&(a.withCredentials=!0),n.headers.forEach((m,v)=>a.setRequestHeader(m,v.join(","))),n.headers.has("Accept")||a.setRequestHeader("Accept","application/json, text/plain, */*"),!n.headers.has("Content-Type")){let m=n.detectContentTypeHeader();m!==null&&a.setRequestHeader("Content-Type",m)}if(n.responseType){let m=n.responseType.toLowerCase();a.responseType=m!=="json"?m:"text"}let u=n.serializeBody(),c=null,l=()=>{if(c!==null)return c;let m=a.statusText||"OK",v=new vn(a.getAllResponseHeaders()),A=EO(a)||n.url;return c=new Hu({headers:v,status:a.status,statusText:m,url:A}),c},d=()=>{let{headers:m,status:v,statusText:A,url:z}=l(),U=null;v!==fO&&(U=typeof a.response>"u"?a.responseText:a.response),v===0&&(v=U?GD:0);let me=v>=200&&v<300;if(n.responseType==="json"&&typeof U=="string"){let De=U;U=U.replace(CO,"");try{U=U!==""?JSON.parse(U):null}catch(lt){U=De,me&&(me=!1,U={error:lt,text:U})}}me?(s.next(new Qi({body:U,headers:m,status:v,statusText:A,url:z||void 0})),s.complete()):s.error(new Zn({error:U,headers:m,status:v,statusText:A,url:z||void 0}))},f=m=>{let{url:v}=l(),A=new Zn({error:m,status:a.status||0,statusText:a.statusText||"Unknown Error",url:v||void 0});s.error(A)},h=!1,p=m=>{h||(s.next(l()),h=!0);let v={type:Yn.DownloadProgress,loaded:m.loaded};m.lengthComputable&&(v.total=m.total),n.responseType==="text"&&a.responseText&&(v.partialText=a.responseText),s.next(v)},g=m=>{let v={type:Yn.UploadProgress,loaded:m.loaded};m.lengthComputable&&(v.total=m.total),s.next(v)};return a.addEventListener("load",d),a.addEventListener("error",f),a.addEventListener("timeout",f),a.addEventListener("abort",f),n.reportProgress&&(a.addEventListener("progress",p),u!==null&&a.upload&&a.upload.addEventListener("progress",g)),a.send(u),s.next({type:Yn.Sent}),()=>{a.removeEventListener("error",f),a.removeEventListener("abort",f),a.removeEventListener("load",d),a.removeEventListener("timeout",f),n.reportProgress&&(a.removeEventListener("progress",p),u!==null&&a.upload&&a.upload.removeEventListener("progress",g)),a.readyState!==a.DONE&&a.abort()}})))}};e.\u0275fac=function(o){return new(o||e)(x(So))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),WD=new E(""),IO="XSRF-TOKEN",xO=new E("",{providedIn:"root",factory:()=>IO}),_O="X-XSRF-TOKEN",MO=new E("",{providedIn:"root",factory:()=>_O}),zu=class{},TO=(()=>{let e=class e{constructor(n,o,i){this.doc=n,this.platform=o,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if(this.platform==="server")return null;let n=this.doc.cookie||"";return n!==this.lastCookieString&&(this.parseCount++,this.lastToken=Vu(n,this.cookieName),this.lastCookieString=n),this.lastToken}};e.\u0275fac=function(o){return new(o||e)(x(Ue),x(cn),x(xO))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})();function SO(t,e){let r=t.url.toLowerCase();if(!y(WD)||t.method==="GET"||t.method==="HEAD"||r.startsWith("http://")||r.startsWith("https://"))return e(t);let n=y(zu).getToken(),o=y(MO);return n!=null&&!t.headers.has(o)&&(t=t.clone({headers:t.headers.set(o,n)})),e(t)}var qD=function(t){return t[t.Interceptors=0]="Interceptors",t[t.LegacyInterceptors=1]="LegacyInterceptors",t[t.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",t[t.NoXsrfProtection=3]="NoXsrfProtection",t[t.JsonpSupport=4]="JsonpSupport",t[t.RequestsMadeViaParent=5]="RequestsMadeViaParent",t[t.Fetch=6]="Fetch",t}(qD||{});function AO(t,e){return{\u0275kind:t,\u0275providers:e}}function w9(...t){let e=[hO,zD,HD,{provide:Ki,useExisting:HD},{provide:$u,useFactory:()=>y(mO,{optional:!0})??y(zD)},{provide:ph,useValue:SO,multi:!0},{provide:WD,useValue:!0},{provide:zu,useClass:TO}];for(let r of t)e.push(...r.\u0275providers);return ji(e)}function b9(t){return AO(qD.Interceptors,t.map(e=>({provide:ph,useValue:e,multi:!0})))}var vh=class extends Lu{constructor(){super(...arguments),this.supportsDOMEvents=!0}},yh=class t extends vh{static makeCurrent(){TD(new t)}onAndCancel(e,r,n){return e.addEventListener(r,n),()=>{e.removeEventListener(r,n)}}dispatchEvent(e,r){e.dispatchEvent(r)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}createElement(e,r){return r=r||this.getDefaultDocument(),r.createElement(e)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(e){return e.nodeType===Node.ELEMENT_NODE}isShadowRoot(e){return e instanceof DocumentFragment}getGlobalEventTarget(e,r){return r==="window"?window:r==="document"?e:r==="body"?e.body:null}getBaseHref(e){let r=NO();return r==null?null:OO(r)}resetBaseElement(){Ji=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return Vu(document.cookie,e)}},Ji=null;function NO(){return Ji=Ji||document.querySelector("base"),Ji?Ji.getAttribute("href"):null}function OO(t){return new URL(t,document.baseURI).pathname}var RO=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),Dh=new E(""),QD=(()=>{let e=class e{constructor(n,o){this._zone=o,this._eventNameToPlugin=new Map,n.forEach(i=>{i.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,o,i){return this._findPluginFor(o).addEventListener(n,o,i)}getZone(){return this._zone}_findPluginFor(n){let o=this._eventNameToPlugin.get(n);if(o)return o;if(o=this._plugins.find(s=>s.supports(n)),!o)throw new C(5101,!1);return this._eventNameToPlugin.set(n,o),o}};e.\u0275fac=function(o){return new(o||e)(x(Dh),x(pe))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),Gu=class{constructor(e){this._doc=e}},gh="ng-app-id",JD=(()=>{let e=class e{constructor(n,o,i,s={}){this.doc=n,this.appId=o,this.nonce=i,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=Uu(s),this.resetHostNodes()}addStyles(n){for(let o of n)this.changeUsageCount(o,1)===1&&this.onStyleAdded(o)}removeStyles(n){for(let o of n)this.changeUsageCount(o,-1)<=0&&this.onStyleRemoved(o)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(o=>o.remove()),n.clear());for(let o of this.getAllStyles())this.onStyleRemoved(o);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let o of this.getAllStyles())this.addStyleToHost(n,o)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let o of this.hostNodes)this.addStyleToHost(o,n)}onStyleRemoved(n){let o=this.styleRef;o.get(n)?.elements?.forEach(i=>i.remove()),o.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${gh}="${this.appId}"]`);if(n?.length){let o=new Map;return n.forEach(i=>{i.textContent!=null&&o.set(i.textContent,i)}),o}return null}changeUsageCount(n,o){let i=this.styleRef;if(i.has(n)){let s=i.get(n);return s.usage+=o,s.usage}return i.set(n,{usage:o,elements:[]}),o}getStyleElement(n,o){let i=this.styleNodesInDOM,s=i?.get(o);if(s?.parentNode===n)return i.delete(o),s.removeAttribute(gh),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=o,this.platformIsServer&&a.setAttribute(gh,this.appId),n.appendChild(a),a}}addStyleToHost(n,o){let i=this.getStyleElement(n,o),s=this.styleRef,a=s.get(o)?.elements;a?a.push(i):s.set(o,{elements:[i],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(o){return new(o||e)(x(Ue),x(gf),x(vf,8),x(cn))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),mh={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},bh=/%COMP%/g,XD="%COMP%",PO=`_nghost-${XD}`,FO=`_ngcontent-${XD}`,LO=!0,kO=new E("",{providedIn:"root",factory:()=>LO});function jO(t){return FO.replace(bh,t)}function VO(t){return PO.replace(bh,t)}function ew(t,e){return e.map(r=>r.replace(bh,t))}var ZD=(()=>{let e=class e{constructor(n,o,i,s,a,u,c,l=null){this.eventManager=n,this.sharedStylesHost=o,this.appId=i,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=u,this.ngZone=c,this.nonce=l,this.rendererByCompId=new Map,this.platformIsServer=Uu(u),this.defaultRenderer=new Xi(n,a,c,this.platformIsServer)}createRenderer(n,o){if(!n||!o)return this.defaultRenderer;this.platformIsServer&&o.encapsulation===Bt.ShadowDom&&(o=$(D({},o),{encapsulation:Bt.Emulated}));let i=this.getOrCreateRenderer(n,o);return i instanceof Wu?i.applyToHost(n):i instanceof es&&i.applyStyles(),i}getOrCreateRenderer(n,o){let i=this.rendererByCompId,s=i.get(o.id);if(!s){let a=this.doc,u=this.ngZone,c=this.eventManager,l=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,f=this.platformIsServer;switch(o.encapsulation){case Bt.Emulated:s=new Wu(c,l,o,this.appId,d,a,u,f);break;case Bt.ShadowDom:return new wh(c,l,n,o,a,u,this.nonce,f);default:s=new es(c,l,o,d,a,u,f);break}i.set(o.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(o){return new(o||e)(x(QD),x(JD),x(gf),x(kO),x(Ue),x(cn),x(pe),x(vf))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),Xi=class{constructor(e,r,n,o){this.eventManager=e,this.doc=r,this.ngZone=n,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,r){return r?this.doc.createElementNS(mh[r]||r,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,r){(KD(e)?e.content:e).appendChild(r)}insertBefore(e,r,n){e&&(KD(e)?e.content:e).insertBefore(r,n)}removeChild(e,r){e&&e.removeChild(r)}selectRootElement(e,r){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new C(-5104,!1);return r||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,r,n,o){if(o){r=o+":"+r;let i=mh[o];i?e.setAttributeNS(i,r,n):e.setAttribute(r,n)}else e.setAttribute(r,n)}removeAttribute(e,r,n){if(n){let o=mh[n];o?e.removeAttributeNS(o,r):e.removeAttribute(`${n}:${r}`)}else e.removeAttribute(r)}addClass(e,r){e.classList.add(r)}removeClass(e,r){e.classList.remove(r)}setStyle(e,r,n,o){o&(zt.DashCase|zt.Important)?e.style.setProperty(r,n,o&zt.Important?"important":""):e.style[r]=n}removeStyle(e,r,n){n&zt.DashCase?e.style.removeProperty(r):e.style[r]=""}setProperty(e,r,n){e!=null&&(e[r]=n)}setValue(e,r){e.nodeValue=r}listen(e,r,n){if(typeof e=="string"&&(e=mn().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${r}`);return this.eventManager.addEventListener(e,r,this.decoratePreventDefault(n))}decoratePreventDefault(e){return r=>{if(r==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(r)):e(r))===!1&&r.preventDefault()}}};function KD(t){return t.tagName==="TEMPLATE"&&t.content!==void 0}var wh=class extends Xi{constructor(e,r,n,o,i,s,a,u){super(e,i,s,u),this.sharedStylesHost=r,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=ew(o.id,o.styles);for(let l of c){let d=document.createElement("style");a&&d.setAttribute("nonce",a),d.textContent=l,this.shadowRoot.appendChild(d)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,r){return super.appendChild(this.nodeOrShadowRoot(e),r)}insertBefore(e,r,n){return super.insertBefore(this.nodeOrShadowRoot(e),r,n)}removeChild(e,r){return super.removeChild(this.nodeOrShadowRoot(e),r)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},es=class extends Xi{constructor(e,r,n,o,i,s,a,u){super(e,i,s,a),this.sharedStylesHost=r,this.removeStylesOnCompDestroy=o,this.styles=u?ew(u,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},Wu=class extends es{constructor(e,r,n,o,i,s,a,u){let c=o+"-"+n.id;super(e,r,n,i,s,a,u,c),this.contentAttr=jO(c),this.hostAttr=VO(c)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,r){let n=super.createElement(e,r);return super.setAttribute(n,this.contentAttr,""),n}},UO=(()=>{let e=class e extends Gu{constructor(n){super(n)}supports(n){return!0}addEventListener(n,o,i){return n.addEventListener(o,i,!1),()=>this.removeEventListener(n,o,i)}removeEventListener(n,o,i){return n.removeEventListener(o,i)}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})(),YD=["alt","control","meta","shift"],BO={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},$O={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey},HO=(()=>{let e=class e extends Gu{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,o,i){let s=e.parseEventName(o),a=e.eventCallback(s.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>mn().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let o=n.toLowerCase().split("."),i=o.shift();if(o.length===0||!(i==="keydown"||i==="keyup"))return null;let s=e._normalizeKey(o.pop()),a="",u=o.indexOf("code");if(u>-1&&(o.splice(u,1),a="code."),YD.forEach(l=>{let d=o.indexOf(l);d>-1&&(o.splice(d,1),a+=l+".")}),a+=s,o.length!=0||s.length===0)return null;let c={};return c.domEventName=i,c.fullKey=a,c}static matchEventFullKeyCode(n,o){let i=BO[n.key]||n.key,s="";return o.indexOf("code.")>-1&&(i=n.code,s="code."),i==null||!i?!1:(i=i.toLowerCase(),i===" "?i="space":i==="."&&(i="dot"),YD.forEach(a=>{if(a!==i){let u=$O[a];u(n)&&(s+=a+".")}}),s+=i,s===o)}static eventCallback(n,o,i){return s=>{e.matchEventFullKeyCode(s,n)&&i.runGuarded(()=>o(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac});let t=e;return t})();function B9(t,e){return DD(D({rootComponent:t},zO(e)))}function zO(t){return{appProviders:[...KO,...t?.providers??[]],platformProviders:ZO}}function GO(){yh.makeCurrent()}function WO(){return new rn}function qO(){return jv(document),document}var ZO=[{provide:cn,useValue:uh},{provide:mf,useValue:GO,multi:!0},{provide:Ue,useFactory:qO,deps:[]}];var KO=[{provide:ou,useValue:"root"},{provide:rn,useFactory:WO,deps:[]},{provide:Dh,useClass:UO,multi:!0,deps:[Ue,pe,cn]},{provide:Dh,useClass:HO,multi:!0,deps:[Ue]},ZD,JD,QD,{provide:wo,useExisting:ZD},{provide:So,useClass:RO,deps:[]},[]];var tw=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var YO=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:function(o){let i=null;return o?i=new(o||e):i=x(QO),i},providedIn:"root"});let t=e;return t})(),QO=(()=>{let e=class e extends YO{constructor(n){super(),this._doc=n}sanitize(n,o){if(o==null)return null;switch(n){case Gt.NONE:return o;case Gt.HTML:return zn(o,"HTML")?At(o):Yv(this._doc,String(o)).toString();case Gt.STYLE:return zn(o,"Style")?At(o):o;case Gt.SCRIPT:if(zn(o,"Script"))return At(o);throw new C(5200,!1);case Gt.URL:return zn(o,"URL")?At(o):gu(String(o));case Gt.RESOURCE_URL:if(zn(o,"ResourceURL"))return At(o);throw new C(5201,!1);default:throw new C(5202,!1)}}bypassSecurityTrustHtml(n){return Uv(n)}bypassSecurityTrustStyle(n){return Bv(n)}bypassSecurityTrustScript(n){return $v(n)}bypassSecurityTrustUrl(n){return Hv(n)}bypassSecurityTrustResourceUrl(n){return zv(n)}};e.\u0275fac=function(o){return new(o||e)(x(Ue))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var L="primary",vs=Symbol("RouteTitle"),_h=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r[0]:r}return null}getAll(e){if(this.has(e)){let r=this.params[e];return Array.isArray(r)?r:[r]}return[]}get keys(){return Object.keys(this.params)}};function Fo(t){return new _h(t)}function XO(t,e,r){let n=r.path.split("/");if(n.length>t.length||r.pathMatch==="full"&&(e.hasChildren()||n.lengthn[i]===o)}else return t===e}function dw(t){return t.length>0?t[t.length-1]:null}function Jn(t){return bt(t)?t:Gn(t)?te(Promise.resolve(t)):I(t)}var tR={exact:hw,subset:pw},fw={exact:nR,subset:rR,ignored:()=>!0};function nw(t,e,r){return tR[r.paths](t.root,e.root,r.matrixParams)&&fw[r.queryParams](t.queryParams,e.queryParams)&&!(r.fragment==="exact"&&t.fragment!==e.fragment)}function nR(t,e){return Wt(t,e)}function hw(t,e,r){if(!Lr(t.segments,e.segments)||!Ku(t.segments,e.segments,r)||t.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!t.children[n]||!hw(t.children[n],e.children[n],r))return!1;return!0}function rR(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(r=>lw(t[r],e[r]))}function pw(t,e,r){return gw(t,e,e.segments,r)}function gw(t,e,r,n){if(t.segments.length>r.length){let o=t.segments.slice(0,r.length);return!(!Lr(o,r)||e.hasChildren()||!Ku(o,r,n))}else if(t.segments.length===r.length){if(!Lr(t.segments,r)||!Ku(t.segments,r,n))return!1;for(let o in e.children)if(!t.children[o]||!pw(t.children[o],e.children[o],n))return!1;return!0}else{let o=r.slice(0,t.segments.length),i=r.slice(t.segments.length);return!Lr(t.segments,o)||!Ku(t.segments,o,n)||!t.children[L]?!1:gw(t.children[L],e,i,n)}}function Ku(t,e,r){return e.every((n,o)=>fw[r](t[o].parameters,n.parameters))}var Qn=class{constructor(e=new K([],{}),r={},n=null){this.root=e,this.queryParams=r,this.fragment=n}get queryParamMap(){return this._queryParamMap??=Fo(this.queryParams),this._queryParamMap}toString(){return sR.serialize(this)}},K=class{constructor(e,r){this.segments=e,this.children=r,this.parent=null,Object.values(r).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Yu(this)}},Fr=class{constructor(e,r){this.path=e,this.parameters=r}get parameterMap(){return this._parameterMap??=Fo(this.parameters),this._parameterMap}toString(){return vw(this)}};function oR(t,e){return Lr(t,e)&&t.every((r,n)=>Wt(r.parameters,e[n].parameters))}function Lr(t,e){return t.length!==e.length?!1:t.every((r,n)=>r.path===e[n].path)}function iR(t,e){let r=[];return Object.entries(t.children).forEach(([n,o])=>{n===L&&(r=r.concat(e(o,n)))}),Object.entries(t.children).forEach(([n,o])=>{n!==L&&(r=r.concat(e(o,n)))}),r}var Xh=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>new as,providedIn:"root"});let t=e;return t})(),as=class{parse(e){let r=new Sh(e);return new Qn(r.parseRootSegment(),r.parseQueryParams(),r.parseFragment())}serialize(e){let r=`/${ts(e.root,!0)}`,n=cR(e.queryParams),o=typeof e.fragment=="string"?`#${aR(e.fragment)}`:"";return`${r}${n}${o}`}},sR=new as;function Yu(t){return t.segments.map(e=>vw(e)).join("/")}function ts(t,e){if(!t.hasChildren())return Yu(t);if(e){let r=t.children[L]?ts(t.children[L],!1):"",n=[];return Object.entries(t.children).forEach(([o,i])=>{o!==L&&n.push(`${o}:${ts(i,!1)}`)}),n.length>0?`${r}(${n.join("//")})`:r}else{let r=iR(t,(n,o)=>o===L?[ts(t.children[L],!1)]:[`${o}:${ts(n,!1)}`]);return Object.keys(t.children).length===1&&t.children[L]!=null?`${Yu(t)}/${r[0]}`:`${Yu(t)}/(${r.join("//")})`}}function mw(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function qu(t){return mw(t).replace(/%3B/gi,";")}function aR(t){return encodeURI(t)}function Th(t){return mw(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Qu(t){return decodeURIComponent(t)}function rw(t){return Qu(t.replace(/\+/g,"%20"))}function vw(t){return`${Th(t.path)}${uR(t.parameters)}`}function uR(t){return Object.entries(t).map(([e,r])=>`;${Th(e)}=${Th(r)}`).join("")}function cR(t){let e=Object.entries(t).map(([r,n])=>Array.isArray(n)?n.map(o=>`${qu(r)}=${qu(o)}`).join("&"):`${qu(r)}=${qu(n)}`).filter(r=>r);return e.length?`?${e.join("&")}`:""}var lR=/^[^\/()?;#]+/;function Ch(t){let e=t.match(lR);return e?e[0]:""}var dR=/^[^\/()?;=#]+/;function fR(t){let e=t.match(dR);return e?e[0]:""}var hR=/^[^=?&#]+/;function pR(t){let e=t.match(hR);return e?e[0]:""}var gR=/^[^&#]+/;function mR(t){let e=t.match(gR);return e?e[0]:""}var Sh=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new K([],{}):new K([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let r={};this.peekStartsWith("/(")&&(this.capture("/"),r=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(r).length>0)&&(n[L]=new K(e,r)),n}parseSegment(){let e=Ch(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new C(4009,!1);return this.capture(e),new Fr(Qu(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let r=fR(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let o=Ch(this.remaining);o&&(n=o,this.capture(n))}e[Qu(r)]=Qu(n)}parseQueryParam(e){let r=pR(this.remaining);if(!r)return;this.capture(r);let n="";if(this.consumeOptional("=")){let s=mR(this.remaining);s&&(n=s,this.capture(n))}let o=rw(r),i=rw(n);if(e.hasOwnProperty(o)){let s=e[o];Array.isArray(s)||(s=[s],e[o]=s),s.push(i)}else e[o]=i}parseParens(e){let r={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=Ch(this.remaining),o=this.remaining[n.length];if(o!=="/"&&o!==")"&&o!==";")throw new C(4010,!1);let i;n.indexOf(":")>-1?(i=n.slice(0,n.indexOf(":")),this.capture(i),this.capture(":")):e&&(i=L);let s=this.parseChildren();r[i]=Object.keys(s).length===1?s[L]:new K([],s),this.consumeOptional("//")}return r}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new C(4011,!1)}};function yw(t){return t.segments.length>0?new K([],{[L]:t}):t}function Dw(t){let e={};for(let[n,o]of Object.entries(t.children)){let i=Dw(o);if(n===L&&i.segments.length===0&&i.hasChildren())for(let[s,a]of Object.entries(i.children))e[s]=a;else(i.segments.length>0||i.hasChildren())&&(e[n]=i)}let r=new K(t.segments,e);return vR(r)}function vR(t){if(t.numberOfChildren===1&&t.children[L]){let e=t.children[L];return new K(t.segments.concat(e.segments),e.children)}return t}function us(t){return t instanceof Qn}function yR(t,e,r=null,n=null){let o=ww(t);return bw(o,e,r,n)}function ww(t){let e;function r(i){let s={};for(let u of i.children){let c=r(u);s[u.outlet]=c}let a=new K(i.url,s);return i===t&&(e=a),a}let n=r(t.root),o=yw(n);return e??o}function bw(t,e,r,n){let o=t;for(;o.parent;)o=o.parent;if(e.length===0)return Eh(o,o,o,r,n);let i=DR(e);if(i.toRoot())return Eh(o,o,new K([],{}),r,n);let s=wR(i,o,t),a=s.processChildren?os(s.segmentGroup,s.index,i.commands):Ew(s.segmentGroup,s.index,i.commands);return Eh(o,s.segmentGroup,a,r,n)}function Ju(t){return typeof t=="object"&&t!=null&&!t.outlets&&!t.segmentPath}function cs(t){return typeof t=="object"&&t!=null&&t.outlets}function Eh(t,e,r,n,o){let i={};n&&Object.entries(n).forEach(([u,c])=>{i[u]=Array.isArray(c)?c.map(l=>`${l}`):`${c}`});let s;t===e?s=r:s=Cw(t,e,r);let a=yw(Dw(s));return new Qn(a,i,o)}function Cw(t,e,r){let n={};return Object.entries(t.children).forEach(([o,i])=>{i===e?n[o]=r:n[o]=Cw(i,e,r)}),new K(t.segments,n)}var Xu=class{constructor(e,r,n){if(this.isAbsolute=e,this.numberOfDoubleDots=r,this.commands=n,e&&n.length>0&&Ju(n[0]))throw new C(4003,!1);let o=n.find(cs);if(o&&o!==dw(n))throw new C(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function DR(t){if(typeof t[0]=="string"&&t.length===1&&t[0]==="/")return new Xu(!0,0,t);let e=0,r=!1,n=t.reduce((o,i,s)=>{if(typeof i=="object"&&i!=null){if(i.outlets){let a={};return Object.entries(i.outlets).forEach(([u,c])=>{a[u]=typeof c=="string"?c.split("/"):c}),[...o,{outlets:a}]}if(i.segmentPath)return[...o,i.segmentPath]}return typeof i!="string"?[...o,i]:s===0?(i.split("/").forEach((a,u)=>{u==0&&a==="."||(u==0&&a===""?r=!0:a===".."?e++:a!=""&&o.push(a))}),o):[...o,i]},[]);return new Xu(r,e,n)}var Oo=class{constructor(e,r,n){this.segmentGroup=e,this.processChildren=r,this.index=n}};function wR(t,e,r){if(t.isAbsolute)return new Oo(e,!0,0);if(!r)return new Oo(e,!1,NaN);if(r.parent===null)return new Oo(r,!0,0);let n=Ju(t.commands[0])?0:1,o=r.segments.length-1+n;return bR(r,o,t.numberOfDoubleDots)}function bR(t,e,r){let n=t,o=e,i=r;for(;i>o;){if(i-=o,n=n.parent,!n)throw new C(4005,!1);o=n.segments.length}return new Oo(n,!1,o-i)}function CR(t){return cs(t[0])?t[0].outlets:{[L]:t}}function Ew(t,e,r){if(t??=new K([],{}),t.segments.length===0&&t.hasChildren())return os(t,e,r);let n=ER(t,e,r),o=r.slice(n.commandIndex);if(n.match&&n.pathIndexi!==L)&&t.children[L]&&t.numberOfChildren===1&&t.children[L].segments.length===0){let i=os(t.children[L],e,r);return new K(t.segments,i.children)}return Object.entries(n).forEach(([i,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(o[i]=Ew(t.children[i],e,s))}),Object.entries(t.children).forEach(([i,s])=>{n[i]===void 0&&(o[i]=s)}),new K(t.segments,o)}}function ER(t,e,r){let n=0,o=e,i={match:!1,pathIndex:0,commandIndex:0};for(;o=r.length)return i;let s=t.segments[o],a=r[n];if(cs(a))break;let u=`${a}`,c=n0&&u===void 0)break;if(u&&c&&typeof c=="object"&&c.outlets===void 0){if(!iw(u,c,s))return i;n+=2}else{if(!iw(u,{},s))return i;n++}o++}return{match:!0,pathIndex:o,commandIndex:n}}function Ah(t,e,r){let n=t.segments.slice(0,e),o=0;for(;o{typeof n=="string"&&(n=[n]),n!==null&&(e[r]=Ah(new K([],{}),0,n))}),e}function ow(t){let e={};return Object.entries(t).forEach(([r,n])=>e[r]=`${n}`),e}function iw(t,e,r){return t==r.path&&Wt(e,r.parameters)}var is="imperative",Le=function(t){return t[t.NavigationStart=0]="NavigationStart",t[t.NavigationEnd=1]="NavigationEnd",t[t.NavigationCancel=2]="NavigationCancel",t[t.NavigationError=3]="NavigationError",t[t.RoutesRecognized=4]="RoutesRecognized",t[t.ResolveStart=5]="ResolveStart",t[t.ResolveEnd=6]="ResolveEnd",t[t.GuardsCheckStart=7]="GuardsCheckStart",t[t.GuardsCheckEnd=8]="GuardsCheckEnd",t[t.RouteConfigLoadStart=9]="RouteConfigLoadStart",t[t.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",t[t.ChildActivationStart=11]="ChildActivationStart",t[t.ChildActivationEnd=12]="ChildActivationEnd",t[t.ActivationStart=13]="ActivationStart",t[t.ActivationEnd=14]="ActivationEnd",t[t.Scroll=15]="Scroll",t[t.NavigationSkipped=16]="NavigationSkipped",t}(Le||{}),gt=class{constructor(e,r){this.id=e,this.url=r}},ls=class extends gt{constructor(e,r,n="imperative",o=null){super(e,r),this.type=Le.NavigationStart,this.navigationTrigger=n,this.restoredState=o}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},Dn=class extends gt{constructor(e,r,n){super(e,r),this.urlAfterRedirects=n,this.type=Le.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},ut=function(t){return t[t.Redirect=0]="Redirect",t[t.SupersededByNewNavigation=1]="SupersededByNewNavigation",t[t.NoDataFromResolver=2]="NoDataFromResolver",t[t.GuardRejected=3]="GuardRejected",t}(ut||{}),Nh=function(t){return t[t.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",t[t.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",t}(Nh||{}),yn=class extends gt{constructor(e,r,n,o){super(e,r),this.reason=n,this.code=o,this.type=Le.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},kr=class extends gt{constructor(e,r,n,o){super(e,r),this.reason=n,this.code=o,this.type=Le.NavigationSkipped}},ds=class extends gt{constructor(e,r,n,o){super(e,r),this.error=n,this.target=o,this.type=Le.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},ec=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Oh=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Rh=class extends gt{constructor(e,r,n,o,i){super(e,r),this.urlAfterRedirects=n,this.state=o,this.shouldActivate=i,this.type=Le.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},Ph=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Fh=class extends gt{constructor(e,r,n,o){super(e,r),this.urlAfterRedirects=n,this.state=o,this.type=Le.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},Lh=class{constructor(e){this.route=e,this.type=Le.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},kh=class{constructor(e){this.route=e,this.type=Le.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},jh=class{constructor(e){this.snapshot=e,this.type=Le.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Vh=class{constructor(e){this.snapshot=e,this.type=Le.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Uh=class{constructor(e){this.snapshot=e,this.type=Le.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},Bh=class{constructor(e){this.snapshot=e,this.type=Le.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var fs=class{},Lo=class{constructor(e,r){this.url=e,this.navigationBehaviorOptions=r}};var $h=class{constructor(e){this.injector=e,this.outlet=null,this.route=null,this.children=new ac(this.injector),this.attachRef=null}},ac=(()=>{let e=class e{constructor(n){this.parentInjector=n,this.contexts=new Map}onChildOutletCreated(n,o){let i=this.getOrCreateContext(n);i.outlet=o,this.contexts.set(n,i)}onChildOutletDestroyed(n){let o=this.getContext(n);o&&(o.outlet=null,o.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let o=this.getContext(n);return o||(o=new $h(this.parentInjector),this.contexts.set(n,o)),o}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(o){return new(o||e)(x(Ye))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),tc=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let r=this.pathFromRoot(e);return r.length>1?r[r.length-2]:null}children(e){let r=Hh(e,this._root);return r?r.children.map(n=>n.value):[]}firstChild(e){let r=Hh(e,this._root);return r&&r.children.length>0?r.children[0].value:null}siblings(e){let r=zh(e,this._root);return r.length<2?[]:r[r.length-2].children.map(o=>o.value).filter(o=>o!==e)}pathFromRoot(e){return zh(e,this._root).map(r=>r.value)}};function Hh(t,e){if(t===e.value)return e;for(let r of e.children){let n=Hh(t,r);if(n)return n}return null}function zh(t,e){if(t===e.value)return[e];for(let r of e.children){let n=zh(t,r);if(n.length)return n.unshift(e),n}return[]}var at=class{constructor(e,r){this.value=e,this.children=r}toString(){return`TreeNode(${this.value})`}};function No(t){let e={};return t&&t.children.forEach(r=>e[r.value.outlet]=r),e}var nc=class extends tc{constructor(e,r){super(e),this.snapshot=r,ep(this,e)}toString(){return this.snapshot.toString()}};function Iw(t){let e=xR(t),r=new Se([new Fr("",{})]),n=new Se({}),o=new Se({}),i=new Se({}),s=new Se(""),a=new jr(r,n,i,s,o,L,t,e.root);return a.snapshot=e.root,new nc(new at(a,[]),e)}function xR(t){let e={},r={},n={},o="",i=new Ro([],e,n,o,r,L,t,null,{});return new oc("",new at(i,[]))}var jr=class{constructor(e,r,n,o,i,s,a,u){this.urlSubject=e,this.paramsSubject=r,this.queryParamsSubject=n,this.fragmentSubject=o,this.dataSubject=i,this.outlet=s,this.component=a,this._futureSnapshot=u,this.title=this.dataSubject?.pipe(N(c=>c[vs]))??I(void 0),this.url=e,this.params=r,this.queryParams=n,this.fragment=o,this.data=i}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(N(e=>Fo(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(N(e=>Fo(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function rc(t,e,r="emptyOnly"){let n,{routeConfig:o}=t;return e!==null&&(r==="always"||o?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:D(D({},e.params),t.params),data:D(D({},e.data),t.data),resolve:D(D(D(D({},t.data),e.data),o?.data),t._resolvedData)}:n={params:D({},t.params),data:D({},t.data),resolve:D(D({},t.data),t._resolvedData??{})},o&&_w(o)&&(n.resolve[vs]=o.title),n}var Ro=class{get title(){return this.data?.[vs]}constructor(e,r,n,o,i,s,a,u,c){this.url=e,this.params=r,this.queryParams=n,this.fragment=o,this.data=i,this.outlet=s,this.component=a,this.routeConfig=u,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=Fo(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=Fo(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),r=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${r}')`}},oc=class extends tc{constructor(e,r){super(r),this.url=e,ep(this,r)}toString(){return xw(this._root)}};function ep(t,e){e.value._routerState=t,e.children.forEach(r=>ep(t,r))}function xw(t){let e=t.children.length>0?` { ${t.children.map(xw).join(", ")} } `:"";return`${t.value}${e}`}function Ih(t){if(t.snapshot){let e=t.snapshot,r=t._futureSnapshot;t.snapshot=r,Wt(e.queryParams,r.queryParams)||t.queryParamsSubject.next(r.queryParams),e.fragment!==r.fragment&&t.fragmentSubject.next(r.fragment),Wt(e.params,r.params)||t.paramsSubject.next(r.params),eR(e.url,r.url)||t.urlSubject.next(r.url),Wt(e.data,r.data)||t.dataSubject.next(r.data)}else t.snapshot=t._futureSnapshot,t.dataSubject.next(t._futureSnapshot.data)}function Gh(t,e){let r=Wt(t.params,e.params)&&oR(t.url,e.url),n=!t.parent!=!e.parent;return r&&!n&&(!t.parent||Gh(t.parent,e.parent))}function _w(t){return typeof t.title=="string"||t.title===null}var _R=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=L,this.activateEvents=new G,this.deactivateEvents=new G,this.attachEvents=new G,this.detachEvents=new G,this.parentContexts=y(ac),this.location=y(dn),this.changeDetector=y(Nt),this.inputBinder=y(tp,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:o,previousValue:i}=n.name;if(o)return;this.isTrackedInParentContexts(i)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(i)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new C(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new C(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new C(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,o){this.activated=n,this._activatedRoute=o,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,o){if(this.isActivated)throw new C(4013,!1);this._activatedRoute=n;let i=this.location,a=n.snapshot.component,u=this.parentContexts.getOrCreateContext(this.name).children,c=new Wh(n,u,i.injector);this.activated=i.createComponent(a,{index:i.length,injector:c,environmentInjector:o}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=H({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[nt]});let t=e;return t})(),Wh=class t{__ngOutletInjector(e){return new t(this.route,this.childContexts,e)}constructor(e,r,n){this.route=e,this.childContexts=r,this.parent=n}get(e,r){return e===jr?this.route:e===ac?this.childContexts:this.parent.get(e,r)}},tp=new E("");function MR(t,e,r){let n=hs(t,e._root,r?r._root:void 0);return new nc(n,e)}function hs(t,e,r){if(r&&t.shouldReuseRoute(e.value,r.value.snapshot)){let n=r.value;n._futureSnapshot=e.value;let o=TR(t,e,r);return new at(n,o)}else{if(t.shouldAttach(e.value)){let i=t.retrieve(e.value);if(i!==null){let s=i.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>hs(t,a)),s}}let n=SR(e.value),o=e.children.map(i=>hs(t,i));return new at(n,o)}}function TR(t,e,r){return e.children.map(n=>{for(let o of r.children)if(t.shouldReuseRoute(n.value,o.value.snapshot))return hs(t,n,o);return hs(t,n)})}function SR(t){return new jr(new Se(t.url),new Se(t.params),new Se(t.queryParams),new Se(t.fragment),new Se(t.data),t.outlet,t.component,t)}var ps=class{constructor(e,r){this.redirectTo=e,this.navigationBehaviorOptions=r}},Mw="ngNavigationCancelingError";function ic(t,e){let{redirectTo:r,navigationBehaviorOptions:n}=us(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,o=Tw(!1,ut.Redirect);return o.url=r,o.navigationBehaviorOptions=n,o}function Tw(t,e){let r=new Error(`NavigationCancelingError: ${t||""}`);return r[Mw]=!0,r.cancellationCode=e,r}function AR(t){return Sw(t)&&us(t.url)}function Sw(t){return!!t&&t[Mw]}var NR=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=Vm({type:e,selectors:[["ng-component"]],standalone:!0,features:[dD],decls:1,vars:0,template:function(o,i){o&1&&jf(0,"router-outlet")},dependencies:[_R],encapsulation:2});let t=e;return t})();function OR(t,e){return t.providers&&!t._injector&&(t._injector=Pf(t.providers,e,`Route: ${t.path}`)),t._injector??e}function np(t){let e=t.children&&t.children.map(np),r=e?$(D({},t),{children:e}):D({},t);return!r.component&&!r.loadComponent&&(e||r.loadChildren)&&r.outlet&&r.outlet!==L&&(r.component=NR),r}function Rt(t){return t.outlet||L}function RR(t,e){let r=t.filter(n=>Rt(n)===e);return r.push(...t.filter(n=>Rt(n)!==e)),r}function ys(t){if(!t)return null;if(t.routeConfig?._injector)return t.routeConfig._injector;for(let e=t.parent;e;e=e.parent){let r=e.routeConfig;if(r?._loadedInjector)return r._loadedInjector;if(r?._injector)return r._injector}return null}var PR=(t,e,r,n)=>N(o=>(new qh(e,o.targetRouterState,o.currentRouterState,r,n).activate(t),o)),qh=class{constructor(e,r,n,o,i){this.routeReuseStrategy=e,this.futureState=r,this.currState=n,this.forwardEvent=o,this.inputBindingEnabled=i}activate(e){let r=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(r,n,e),Ih(this.futureState.root),this.activateChildRoutes(r,n,e)}deactivateChildRoutes(e,r,n){let o=No(r);e.children.forEach(i=>{let s=i.value.outlet;this.deactivateRoutes(i,o[s],n),delete o[s]}),Object.values(o).forEach(i=>{this.deactivateRouteAndItsChildren(i,n)})}deactivateRoutes(e,r,n){let o=e.value,i=r?r.value:null;if(o===i)if(o.component){let s=n.getContext(o.outlet);s&&this.deactivateChildRoutes(e,r,s.children)}else this.deactivateChildRoutes(e,r,n);else i&&this.deactivateRouteAndItsChildren(r,n)}deactivateRouteAndItsChildren(e,r){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,r):this.deactivateRouteAndOutlet(e,r)}detachAndStoreRouteSubtree(e,r){let n=r.getContext(e.value.outlet),o=n&&e.value.component?n.children:r,i=No(e);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,r){let n=r.getContext(e.value.outlet),o=n&&e.value.component?n.children:r,i=No(e);for(let s of Object.values(i))this.deactivateRouteAndItsChildren(s,o);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,r,n){let o=No(r);e.children.forEach(i=>{this.activateRoutes(i,o[i.value.outlet],n),this.forwardEvent(new Bh(i.value.snapshot))}),e.children.length&&this.forwardEvent(new Vh(e.value.snapshot))}activateRoutes(e,r,n){let o=e.value,i=r?r.value:null;if(Ih(o),o===i)if(o.component){let s=n.getOrCreateContext(o.outlet);this.activateChildRoutes(e,r,s.children)}else this.activateChildRoutes(e,r,n);else if(o.component){let s=n.getOrCreateContext(o.outlet);if(this.routeReuseStrategy.shouldAttach(o.snapshot)){let a=this.routeReuseStrategy.retrieve(o.snapshot);this.routeReuseStrategy.store(o.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),Ih(a.route.value),this.activateChildRoutes(e,null,s.children)}else{let a=ys(o.snapshot);s.attachRef=null,s.route=o,s.injector=a??s.injector,s.outlet&&s.outlet.activateWith(o,s.injector),this.activateChildRoutes(e,null,s.children)}}else this.activateChildRoutes(e,null,n)}},sc=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},Po=class{constructor(e,r){this.component=e,this.route=r}};function FR(t,e,r){let n=t._root,o=e?e._root:null;return ns(n,o,r,[n.value])}function LR(t){let e=t.routeConfig?t.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:t,guards:e}}function jo(t,e){let r=Symbol(),n=e.get(t,r);return n===r?typeof t=="function"&&!xm(t)?t:e.get(t):n}function ns(t,e,r,n,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=No(e);return t.children.forEach(s=>{kR(s,i[s.value.outlet],r,n.concat([s.value]),o),delete i[s.value.outlet]}),Object.entries(i).forEach(([s,a])=>ss(a,r.getContext(s),o)),o}function kR(t,e,r,n,o={canDeactivateChecks:[],canActivateChecks:[]}){let i=t.value,s=e?e.value:null,a=r?r.getContext(t.value.outlet):null;if(s&&i.routeConfig===s.routeConfig){let u=jR(s,i,i.routeConfig.runGuardsAndResolvers);u?o.canActivateChecks.push(new sc(n)):(i.data=s.data,i._resolvedData=s._resolvedData),i.component?ns(t,e,a?a.children:null,n,o):ns(t,e,r,n,o),u&&a&&a.outlet&&a.outlet.isActivated&&o.canDeactivateChecks.push(new Po(a.outlet.component,s))}else s&&ss(e,a,o),o.canActivateChecks.push(new sc(n)),i.component?ns(t,null,a?a.children:null,n,o):ns(t,null,r,n,o);return o}function jR(t,e,r){if(typeof r=="function")return r(t,e);switch(r){case"pathParamsChange":return!Lr(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Lr(t.url,e.url)||!Wt(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!Gh(t,e)||!Wt(t.queryParams,e.queryParams);case"paramsChange":default:return!Gh(t,e)}}function ss(t,e,r){let n=No(t),o=t.value;Object.entries(n).forEach(([i,s])=>{o.component?e?ss(s,e.children.getContext(i),r):ss(s,null,r):ss(s,e,r)}),o.component?e&&e.outlet&&e.outlet.isActivated?r.canDeactivateChecks.push(new Po(e.outlet.component,o)):r.canDeactivateChecks.push(new Po(null,o)):r.canDeactivateChecks.push(new Po(null,o))}function Ds(t){return typeof t=="function"}function VR(t){return typeof t=="boolean"}function UR(t){return t&&Ds(t.canLoad)}function BR(t){return t&&Ds(t.canActivate)}function $R(t){return t&&Ds(t.canActivateChild)}function HR(t){return t&&Ds(t.canDeactivate)}function zR(t){return t&&Ds(t.canMatch)}function Aw(t){return t instanceof Qt||t?.name==="EmptyError"}var Zu=Symbol("INITIAL_VALUE");function ko(){return be(t=>da(t.map(e=>e.pipe(xe(1),ga(Zu)))).pipe(N(e=>{for(let r of e)if(r!==!0){if(r===Zu)return Zu;if(r===!1||GR(r))return r}return!0}),ke(e=>e!==Zu),xe(1)))}function GR(t){return us(t)||t instanceof ps}function WR(t,e){return le(r=>{let{targetSnapshot:n,currentSnapshot:o,guards:{canActivateChecks:i,canDeactivateChecks:s}}=r;return s.length===0&&i.length===0?I($(D({},r),{guardsResult:!0})):qR(s,n,o,t).pipe(le(a=>a&&VR(a)?ZR(n,i,t,e):I(a)),N(a=>$(D({},r),{guardsResult:a})))})}function qR(t,e,r,n){return te(t).pipe(le(o=>XR(o.component,o.route,r,e,n)),jt(o=>o!==!0,!0))}function ZR(t,e,r,n){return te(e).pipe(kt(o=>tt(YR(o.route.parent,n),KR(o.route,n),JR(t,o.path,r),QR(t,o.route,r))),jt(o=>o!==!0,!0))}function KR(t,e){return t!==null&&e&&e(new Uh(t)),I(!0)}function YR(t,e){return t!==null&&e&&e(new jh(t)),I(!0)}function QR(t,e,r){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return I(!0);let o=n.map(i=>Jt(()=>{let s=ys(e)??r,a=jo(i,s),u=BR(a)?a.canActivate(e,t):Tt(s,()=>a(e,t));return Jn(u).pipe(jt())}));return I(o).pipe(ko())}function JR(t,e,r){let n=e[e.length-1],i=e.slice(0,e.length-1).reverse().map(s=>LR(s)).filter(s=>s!==null).map(s=>Jt(()=>{let a=s.guards.map(u=>{let c=ys(s.node)??r,l=jo(u,c),d=$R(l)?l.canActivateChild(n,t):Tt(c,()=>l(n,t));return Jn(d).pipe(jt())});return I(a).pipe(ko())}));return I(i).pipe(ko())}function XR(t,e,r,n,o){let i=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!i||i.length===0)return I(!0);let s=i.map(a=>{let u=ys(e)??o,c=jo(a,u),l=HR(c)?c.canDeactivate(t,e,r,n):Tt(u,()=>c(t,e,r,n));return Jn(l).pipe(jt())});return I(s).pipe(ko())}function eP(t,e,r,n){let o=e.canLoad;if(o===void 0||o.length===0)return I(!0);let i=o.map(s=>{let a=jo(s,t),u=UR(a)?a.canLoad(e,r):Tt(t,()=>a(e,r));return Jn(u)});return I(i).pipe(ko(),Nw(n))}function Nw(t){return gl(Ce(e=>{if(typeof e!="boolean")throw ic(t,e)}),N(e=>e===!0))}function tP(t,e,r,n){let o=e.canMatch;if(!o||o.length===0)return I(!0);let i=o.map(s=>{let a=jo(s,t),u=zR(a)?a.canMatch(e,r):Tt(t,()=>a(e,r));return Jn(u)});return I(i).pipe(ko(),Nw(n))}var gs=class{constructor(e){this.segmentGroup=e||null}},ms=class extends Error{constructor(e){super(),this.urlTree=e}};function Ao(t){return Sn(new gs(t))}function nP(t){return Sn(new C(4e3,!1))}function rP(t){return Sn(Tw(!1,ut.GuardRejected))}var Zh=class{constructor(e,r){this.urlSerializer=e,this.urlTree=r}lineralizeSegments(e,r){let n=[],o=r.root;for(;;){if(n=n.concat(o.segments),o.numberOfChildren===0)return I(n);if(o.numberOfChildren>1||!o.children[L])return nP(`${e.redirectTo}`);o=o.children[L]}}applyRedirectCommands(e,r,n,o,i){if(typeof r!="string"){let a=r,{queryParams:u,fragment:c,routeConfig:l,url:d,outlet:f,params:h,data:p,title:g}=o,m=Tt(i,()=>a({params:h,data:p,queryParams:u,fragment:c,routeConfig:l,url:d,outlet:f,title:g}));if(m instanceof Qn)throw new ms(m);r=m}let s=this.applyRedirectCreateUrlTree(r,this.urlSerializer.parse(r),e,n);if(r[0]==="/")throw new ms(s);return s}applyRedirectCreateUrlTree(e,r,n,o){let i=this.createSegmentGroup(e,r.root,n,o);return new Qn(i,this.createQueryParams(r.queryParams,this.urlTree.queryParams),r.fragment)}createQueryParams(e,r){let n={};return Object.entries(e).forEach(([o,i])=>{if(typeof i=="string"&&i[0]===":"){let a=i.substring(1);n[o]=r[a]}else n[o]=i}),n}createSegmentGroup(e,r,n,o){let i=this.createSegments(e,r.segments,n,o),s={};return Object.entries(r.children).forEach(([a,u])=>{s[a]=this.createSegmentGroup(e,u,n,o)}),new K(i,s)}createSegments(e,r,n,o){return r.map(i=>i.path[0]===":"?this.findPosParam(e,i,o):this.findOrReturn(i,n))}findPosParam(e,r,n){let o=n[r.path.substring(1)];if(!o)throw new C(4001,!1);return o}findOrReturn(e,r){let n=0;for(let o of r){if(o.path===e.path)return r.splice(n),o;n++}return e}},Kh={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function oP(t,e,r,n,o){let i=rp(t,e,r);return i.matched?(n=OR(e,n),tP(n,e,r,o).pipe(N(s=>s===!0?i:D({},Kh)))):I(i)}function rp(t,e,r){if(e.path==="**")return iP(r);if(e.path==="")return e.pathMatch==="full"&&(t.hasChildren()||r.length>0)?D({},Kh):{matched:!0,consumedSegments:[],remainingSegments:r,parameters:{},positionalParamSegments:{}};let o=(e.matcher||XO)(r,t,e);if(!o)return D({},Kh);let i={};Object.entries(o.posParams??{}).forEach(([a,u])=>{i[a]=u.path});let s=o.consumed.length>0?D(D({},i),o.consumed[o.consumed.length-1].parameters):i;return{matched:!0,consumedSegments:o.consumed,remainingSegments:r.slice(o.consumed.length),parameters:s,positionalParamSegments:o.posParams??{}}}function iP(t){return{matched:!0,parameters:t.length>0?dw(t).parameters:{},consumedSegments:t,remainingSegments:[],positionalParamSegments:{}}}function sw(t,e,r,n){return r.length>0&&uP(t,r,n)?{segmentGroup:new K(e,aP(n,new K(r,t.children))),slicedSegments:[]}:r.length===0&&cP(t,r,n)?{segmentGroup:new K(t.segments,sP(t,r,n,t.children)),slicedSegments:r}:{segmentGroup:new K(t.segments,t.children),slicedSegments:r}}function sP(t,e,r,n){let o={};for(let i of r)if(uc(t,e,i)&&!n[Rt(i)]){let s=new K([],{});o[Rt(i)]=s}return D(D({},n),o)}function aP(t,e){let r={};r[L]=e;for(let n of t)if(n.path===""&&Rt(n)!==L){let o=new K([],{});r[Rt(n)]=o}return r}function uP(t,e,r){return r.some(n=>uc(t,e,n)&&Rt(n)!==L)}function cP(t,e,r){return r.some(n=>uc(t,e,n))}function uc(t,e,r){return(t.hasChildren()||e.length>0)&&r.pathMatch==="full"?!1:r.path===""}function lP(t,e,r,n){return Rt(t)!==n&&(n===L||!uc(e,r,t))?!1:rp(e,t,r).matched}function dP(t,e,r){return e.length===0&&!t.children[r]}var Yh=class{};function fP(t,e,r,n,o,i,s="emptyOnly"){return new Qh(t,e,r,n,o,s,i).recognize()}var hP=31,Qh=class{constructor(e,r,n,o,i,s,a){this.injector=e,this.configLoader=r,this.rootComponentType=n,this.config=o,this.urlTree=i,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new Zh(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new C(4002,`'${e.segmentGroup}'`)}recognize(){let e=sw(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(N(({children:r,rootSnapshot:n})=>{let o=new at(n,r),i=new oc("",o),s=yR(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,i.url=this.urlSerializer.serialize(s),{state:i,tree:s}}))}match(e){let r=new Ro([],Object.freeze({}),Object.freeze(D({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),L,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,L,r).pipe(N(n=>({children:n,rootSnapshot:r})),Nn(n=>{if(n instanceof ms)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof gs?this.noMatchError(n):n}))}processSegmentGroup(e,r,n,o,i){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,r,n,i):this.processSegment(e,r,n,n.segments,o,!0,i).pipe(N(s=>s instanceof at?[s]:[]))}processChildren(e,r,n,o){let i=[];for(let s of Object.keys(n.children))s==="primary"?i.unshift(s):i.push(s);return te(i).pipe(kt(s=>{let a=n.children[s],u=RR(r,s);return this.processSegmentGroup(e,u,a,s,o)}),pa((s,a)=>(s.push(...a),s)),On(null),Il(),le(s=>{if(s===null)return Ao(n);let a=Ow(s);return pP(a),I(a)}))}processSegment(e,r,n,o,i,s,a){return te(r).pipe(kt(u=>this.processSegmentAgainstRoute(u._injector??e,r,u,n,o,i,s,a).pipe(Nn(c=>{if(c instanceof gs)return I(null);throw c}))),jt(u=>!!u),Nn(u=>{if(Aw(u))return dP(n,o,i)?I(new Yh):Ao(n);throw u}))}processSegmentAgainstRoute(e,r,n,o,i,s,a,u){return lP(n,o,i,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,o,n,i,s,u):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,o,r,n,i,s,u):Ao(o):Ao(o)}expandSegmentAgainstRouteUsingRedirect(e,r,n,o,i,s,a){let{matched:u,parameters:c,consumedSegments:l,positionalParamSegments:d,remainingSegments:f}=rp(r,o,i);if(!u)return Ao(r);typeof o.redirectTo=="string"&&o.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>hP&&(this.allowRedirects=!1));let h=new Ro(i,c,Object.freeze(D({},this.urlTree.queryParams)),this.urlTree.fragment,aw(o),Rt(o),o.component??o._loadedComponent??null,o,uw(o)),p=rc(h,a,this.paramsInheritanceStrategy);h.params=Object.freeze(p.params),h.data=Object.freeze(p.data);let g=this.applyRedirects.applyRedirectCommands(l,o.redirectTo,d,h,e);return this.applyRedirects.lineralizeSegments(o,g).pipe(le(m=>this.processSegment(e,n,r,m.concat(f),s,!1,a)))}matchSegmentAgainstRoute(e,r,n,o,i,s){let a=oP(r,n,o,e,this.urlSerializer);return n.path==="**"&&(r.children={}),a.pipe(be(u=>u.matched?(e=n._injector??e,this.getChildConfig(e,n,o).pipe(be(({routes:c})=>{let l=n._loadedInjector??e,{parameters:d,consumedSegments:f,remainingSegments:h}=u,p=new Ro(f,d,Object.freeze(D({},this.urlTree.queryParams)),this.urlTree.fragment,aw(n),Rt(n),n.component??n._loadedComponent??null,n,uw(n)),g=rc(p,s,this.paramsInheritanceStrategy);p.params=Object.freeze(g.params),p.data=Object.freeze(g.data);let{segmentGroup:m,slicedSegments:v}=sw(r,f,h,c);if(v.length===0&&m.hasChildren())return this.processChildren(l,c,m,p).pipe(N(z=>new at(p,z)));if(c.length===0&&v.length===0)return I(new at(p,[]));let A=Rt(n)===i;return this.processSegment(l,c,m,v,A?L:i,!0,p).pipe(N(z=>new at(p,z instanceof at?[z]:[])))}))):Ao(r)))}getChildConfig(e,r,n){return r.children?I({routes:r.children,injector:e}):r.loadChildren?r._loadedRoutes!==void 0?I({routes:r._loadedRoutes,injector:r._loadedInjector}):eP(e,r,n,this.urlSerializer).pipe(le(o=>o?this.configLoader.loadChildren(e,r).pipe(Ce(i=>{r._loadedRoutes=i.routes,r._loadedInjector=i.injector})):rP(r))):I({routes:[],injector:e})}};function pP(t){t.sort((e,r)=>e.value.outlet===L?-1:r.value.outlet===L?1:e.value.outlet.localeCompare(r.value.outlet))}function gP(t){let e=t.value.routeConfig;return e&&e.path===""}function Ow(t){let e=[],r=new Set;for(let n of t){if(!gP(n)){e.push(n);continue}let o=e.find(i=>n.value.routeConfig===i.value.routeConfig);o!==void 0?(o.children.push(...n.children),r.add(o)):e.push(n)}for(let n of r){let o=Ow(n.children);e.push(new at(n.value,o))}return e.filter(n=>!r.has(n))}function aw(t){return t.data||{}}function uw(t){return t.resolve||{}}function mP(t,e,r,n,o,i){return le(s=>fP(t,e,r,n,s.extractedUrl,o,i).pipe(N(({state:a,tree:u})=>$(D({},s),{targetSnapshot:a,urlAfterRedirects:u}))))}function vP(t,e){return le(r=>{let{targetSnapshot:n,guards:{canActivateChecks:o}}=r;if(!o.length)return I(r);let i=new Set(o.map(u=>u.route)),s=new Set;for(let u of i)if(!s.has(u))for(let c of Rw(u))s.add(c);let a=0;return te(s).pipe(kt(u=>i.has(u)?yP(u,n,t,e):(u.data=rc(u,u.parent,t).resolve,I(void 0))),Ce(()=>a++),oo(1),le(u=>a===s.size?I(r):Ae))})}function Rw(t){let e=t.children.map(r=>Rw(r)).flat();return[t,...e]}function yP(t,e,r,n){let o=t.routeConfig,i=t._resolve;return o?.title!==void 0&&!_w(o)&&(i[vs]=o.title),DP(i,t,e,n).pipe(N(s=>(t._resolvedData=s,t.data=rc(t,t.parent,r).resolve,null)))}function DP(t,e,r,n){let o=Mh(t);if(o.length===0)return I({});let i={};return te(o).pipe(le(s=>wP(t[s],e,r,n).pipe(jt(),Ce(a=>{if(a instanceof ps)throw ic(new as,a);i[s]=a}))),oo(1),Ei(i),Nn(s=>Aw(s)?Ae:Sn(s)))}function wP(t,e,r,n){let o=ys(e)??n,i=jo(t,o),s=i.resolve?i.resolve(e,r):Tt(o,()=>i(e,r));return Jn(s)}function xh(t){return be(e=>{let r=t(e);return r?te(r).pipe(N(()=>e)):I(e)})}var Pw=(()=>{let e=class e{buildTitle(n){let o,i=n.root;for(;i!==void 0;)o=this.getResolvedTitleForRoute(i)??o,i=i.children.find(s=>s.outlet===L);return o}getResolvedTitleForRoute(n){return n.data[vs]}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(bP),providedIn:"root"});let t=e;return t})(),bP=(()=>{let e=class e extends Pw{constructor(n){super(),this.title=n}updateTitle(n){let o=this.buildTitle(n);o!==void 0&&this.title.setTitle(o)}};e.\u0275fac=function(o){return new(o||e)(x(tw))},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),op=new E("",{providedIn:"root",factory:()=>({})}),ip=new E(""),CP=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=y(Bf)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return I(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let o=Jn(n.loadComponent()).pipe(N(Fw),Ce(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),Rn(()=>{this.componentLoaders.delete(n)})),i=new Xr(o,()=>new se).pipe(Jr());return this.componentLoaders.set(n,i),i}loadChildren(n,o){if(this.childrenLoaders.get(o))return this.childrenLoaders.get(o);if(o._loadedRoutes)return I({routes:o._loadedRoutes,injector:o._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(o);let s=EP(o,this.compiler,n,this.onLoadEndListener).pipe(Rn(()=>{this.childrenLoaders.delete(o)})),a=new Xr(s,()=>new se).pipe(Jr());return this.childrenLoaders.set(o,a),a}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function EP(t,e,r,n){return Jn(t.loadChildren()).pipe(N(Fw),le(o=>o instanceof Pi||Array.isArray(o)?I(o):te(e.compileModuleAsync(o))),N(o=>{n&&n(t);let i,s,a=!1;return Array.isArray(o)?(s=o,a=!0):(i=o.create(r).injector,s=i.get(ip,[],{optional:!0,self:!0}).flat()),{routes:s.map(np),injector:i}}))}function IP(t){return t&&typeof t=="object"&&"default"in t}function Fw(t){return IP(t)?t.default:t}var sp=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(xP),providedIn:"root"});let t=e;return t})(),xP=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,o){return n}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),_P=new E("");var MP=new E(""),TP=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new se,this.transitionAbortSubject=new se,this.configLoader=y(CP),this.environmentInjector=y(Ye),this.urlSerializer=y(Xh),this.rootContexts=y(ac),this.location=y(qi),this.inputBindingEnabled=y(tp,{optional:!0})!==null,this.titleStrategy=y(Pw),this.options=y(op,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=y(sp),this.createViewTransition=y(_P,{optional:!0}),this.navigationErrorHandler=y(MP,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>I(void 0),this.rootComponentType=null;let n=i=>this.events.next(new Lh(i)),o=i=>this.events.next(new kh(i));this.configLoader.onLoadEndListener=o,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let o=++this.navigationId;this.transitions?.next($(D(D({},this.transitions.value),n),{id:o}))}setupNavigations(n,o,i){return this.transitions=new Se({id:0,currentUrlTree:o,currentRawUrl:o,extractedUrl:this.urlHandlingStrategy.extract(o),urlAfterRedirects:this.urlHandlingStrategy.extract(o),rawUrl:o,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:is,restoredState:null,currentSnapshot:i.snapshot,targetSnapshot:null,currentRouterState:i,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(ke(s=>s.id!==0),N(s=>$(D({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),be(s=>{let a=!1,u=!1;return I(s).pipe(be(c=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",ut.SupersededByNewNavigation),Ae;this.currentTransition=s,this.currentNavigation={id:c.id,initialUrl:c.rawUrl,extractedUrl:c.extractedUrl,trigger:c.source,extras:c.extras,previousNavigation:this.lastSuccessfulNavigation?$(D({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let l=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=c.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!l&&d!=="reload"){let f="";return this.events.next(new kr(c.id,this.urlSerializer.serialize(c.rawUrl),f,Nh.IgnoredSameUrlNavigation)),c.resolve(!1),Ae}if(this.urlHandlingStrategy.shouldProcessUrl(c.rawUrl))return I(c).pipe(be(f=>{let h=this.transitions?.getValue();return this.events.next(new ls(f.id,this.urlSerializer.serialize(f.extractedUrl),f.source,f.restoredState)),h!==this.transitions?.getValue()?Ae:Promise.resolve(f)}),mP(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),Ce(f=>{s.targetSnapshot=f.targetSnapshot,s.urlAfterRedirects=f.urlAfterRedirects,this.currentNavigation=$(D({},this.currentNavigation),{finalUrl:f.urlAfterRedirects});let h=new ec(f.id,this.urlSerializer.serialize(f.extractedUrl),this.urlSerializer.serialize(f.urlAfterRedirects),f.targetSnapshot);this.events.next(h)}));if(l&&this.urlHandlingStrategy.shouldProcessUrl(c.currentRawUrl)){let{id:f,extractedUrl:h,source:p,restoredState:g,extras:m}=c,v=new ls(f,this.urlSerializer.serialize(h),p,g);this.events.next(v);let A=Iw(this.rootComponentType).snapshot;return this.currentTransition=s=$(D({},c),{targetSnapshot:A,urlAfterRedirects:h,extras:$(D({},m),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=h,I(s)}else{let f="";return this.events.next(new kr(c.id,this.urlSerializer.serialize(c.extractedUrl),f,Nh.IgnoredByUrlHandlingStrategy)),c.resolve(!1),Ae}}),Ce(c=>{let l=new Oh(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(l)}),N(c=>(this.currentTransition=s=$(D({},c),{guards:FR(c.targetSnapshot,c.currentSnapshot,this.rootContexts)}),s)),WR(this.environmentInjector,c=>this.events.next(c)),Ce(c=>{if(s.guardsResult=c.guardsResult,c.guardsResult&&typeof c.guardsResult!="boolean")throw ic(this.urlSerializer,c.guardsResult);let l=new Rh(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot,!!c.guardsResult);this.events.next(l)}),ke(c=>c.guardsResult?!0:(this.cancelNavigationTransition(c,"",ut.GuardRejected),!1)),xh(c=>{if(c.guards.canActivateChecks.length)return I(c).pipe(Ce(l=>{let d=new Ph(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}),be(l=>{let d=!1;return I(l).pipe(vP(this.paramsInheritanceStrategy,this.environmentInjector),Ce({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(l,"",ut.NoDataFromResolver)}}))}),Ce(l=>{let d=new Fh(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}))}),xh(c=>{let l=d=>{let f=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&f.push(this.configLoader.loadComponent(d.routeConfig).pipe(Ce(h=>{d.component=h}),N(()=>{})));for(let h of d.children)f.push(...l(h));return f};return da(l(c.targetSnapshot.root)).pipe(On(null),xe(1))}),xh(()=>this.afterPreactivation()),be(()=>{let{currentSnapshot:c,targetSnapshot:l}=s,d=this.createViewTransition?.(this.environmentInjector,c.root,l.root);return d?te(d).pipe(N(()=>s)):I(s)}),N(c=>{let l=MR(n.routeReuseStrategy,c.targetSnapshot,c.currentRouterState);return this.currentTransition=s=$(D({},c),{targetRouterState:l}),this.currentNavigation.targetRouterState=l,s}),Ce(()=>{this.events.next(new fs)}),PR(this.rootContexts,n.routeReuseStrategy,c=>this.events.next(c),this.inputBindingEnabled),xe(1),Ce({next:c=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new Dn(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects))),this.titleStrategy?.updateTitle(c.targetRouterState.snapshot),c.resolve(!0)},complete:()=>{a=!0}}),ma(this.transitionAbortSubject.pipe(Ce(c=>{throw c}))),Rn(()=>{!a&&!u&&this.cancelNavigationTransition(s,"",ut.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Nn(c=>{if(u=!0,Sw(c))this.events.next(new yn(s.id,this.urlSerializer.serialize(s.extractedUrl),c.message,c.cancellationCode)),AR(c)?this.events.next(new Lo(c.url,c.navigationBehaviorOptions)):s.resolve(!1);else{let l=new ds(s.id,this.urlSerializer.serialize(s.extractedUrl),c,s.targetSnapshot??void 0);try{let d=Tt(this.environmentInjector,()=>this.navigationErrorHandler?.(l));if(d instanceof ps){let{message:f,cancellationCode:h}=ic(this.urlSerializer,d);this.events.next(new yn(s.id,this.urlSerializer.serialize(s.extractedUrl),f,h)),this.events.next(new Lo(d.redirectTo,d.navigationBehaviorOptions))}else{this.events.next(l);let f=n.errorHandler(c);s.resolve(!!f)}}catch(d){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(d)}}return Ae}))}))}cancelNavigationTransition(n,o,i){let s=new yn(n.id,this.urlSerializer.serialize(n.extractedUrl),o,i);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){return this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))).toString()!==this.currentTransition?.extractedUrl.toString()&&!this.currentTransition?.extras.skipLocationChange}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function SP(t){return t!==is}var AP=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(NP),providedIn:"root"});let t=e;return t})(),Jh=class{shouldDetach(e){return!1}store(e,r){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,r){return e.routeConfig===r.routeConfig}},NP=(()=>{let e=class e extends Jh{};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Lw=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:()=>y(OP),providedIn:"root"});let t=e;return t})(),OP=(()=>{let e=class e extends Lw{constructor(){super(...arguments),this.location=y(qi),this.urlSerializer=y(Xh),this.options=y(op,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=y(sp),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Qn,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=Iw(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(o=>{o.type==="popstate"&&n(o.url,o.state)})}handleRouterEvent(n,o){if(n instanceof ls)this.stateMemento=this.createStateMemento();else if(n instanceof kr)this.rawUrlTree=o.initialUrl;else if(n instanceof ec){if(this.urlUpdateStrategy==="eager"&&!o.extras.skipLocationChange){let i=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl);this.setBrowserUrl(i,o)}}else n instanceof fs?(this.currentUrlTree=o.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(o.finalUrl,o.initialUrl),this.routerState=o.targetRouterState,this.urlUpdateStrategy==="deferred"&&(o.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,o))):n instanceof yn&&(n.code===ut.GuardRejected||n.code===ut.NoDataFromResolver)?this.restoreHistory(o):n instanceof ds?this.restoreHistory(o,!0):n instanceof Dn&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,o){let i=this.urlSerializer.serialize(n);if(this.location.isCurrentPathEqualTo(i)||o.extras.replaceUrl){let s=this.browserPageId,a=D(D({},o.extras.state),this.generateNgRouterState(o.id,s));this.location.replaceState(i,"",a)}else{let s=D(D({},o.extras.state),this.generateNgRouterState(o.id,this.browserPageId+1));this.location.go(i,"",s)}}restoreHistory(n,o=!1){if(this.canceledNavigationResolution==="computed"){let i=this.browserPageId,s=this.currentPageId-i;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(o&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,o){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:o}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),rs=function(t){return t[t.COMPLETE=0]="COMPLETE",t[t.FAILED=1]="FAILED",t[t.REDIRECTING=2]="REDIRECTING",t}(rs||{});function RP(t,e){t.events.pipe(ke(r=>r instanceof Dn||r instanceof yn||r instanceof ds||r instanceof kr),N(r=>r instanceof Dn||r instanceof kr?rs.COMPLETE:(r instanceof yn?r.code===ut.Redirect||r.code===ut.SupersededByNewNavigation:!1)?rs.REDIRECTING:rs.FAILED),ke(r=>r!==rs.REDIRECTING),xe(1)).subscribe(()=>{e()})}function PP(t){throw t}var FP={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},LP={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},cc=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=y(_u),this.stateManager=y(Lw),this.options=y(op,{optional:!0})||{},this.pendingTasks=y(Hn),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=y(TP),this.urlSerializer=y(Xh),this.location=y(qi),this.urlHandlingStrategy=y(sp),this._events=new se,this.errorHandler=this.options.errorHandler||PP,this.navigated=!1,this.routeReuseStrategy=y(AP),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=y(ip,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!y(tp,{optional:!0}),this.eventsSubscription=new ie,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(o=>{try{let i=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(i!==null&&s!==null){if(this.stateManager.handleRouterEvent(o,s),o instanceof yn&&o.code!==ut.Redirect&&o.code!==ut.SupersededByNewNavigation)this.navigated=!0;else if(o instanceof Dn)this.navigated=!0;else if(o instanceof Lo){let a=o.navigationBehaviorOptions,u=this.urlHandlingStrategy.merge(o.url,i.currentRawUrl),c=D({info:i.extras.info,skipLocationChange:i.extras.skipLocationChange,replaceUrl:i.extras.replaceUrl||this.urlUpdateStrategy==="eager"||SP(i.source)},a);this.scheduleNavigation(u,is,null,c,{resolve:i.resolve,reject:i.reject,promise:i.promise})}}jP(o)&&this._events.next(o)}catch(i){this.navigationTransitions.transitionAbortSubject.next(i)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),is,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,o)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",o)},0)})}navigateToSyncWithBrowser(n,o,i){let s={replaceUrl:!0},a=i?.navigationId?i:null;if(i){let c=D({},i);delete c.navigationId,delete c.\u0275routerPageId,Object.keys(c).length!==0&&(s.state=c)}let u=this.parseUrl(n);this.scheduleNavigation(u,o,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(np),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,o={}){let{relativeTo:i,queryParams:s,fragment:a,queryParamsHandling:u,preserveFragment:c}=o,l=c?this.currentUrlTree.fragment:a,d=null;switch(u){case"merge":d=D(D({},this.currentUrlTree.queryParams),s);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=s||null}d!==null&&(d=this.removeEmptyProps(d));let f;try{let h=i?i.snapshot:this.routerState.snapshot.root;f=ww(h)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),f=this.currentUrlTree.root}return bw(f,n,d,l??null)}navigateByUrl(n,o={skipLocationChange:!1}){let i=us(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(i,this.rawUrlTree);return this.scheduleNavigation(s,is,null,o)}navigate(n,o={skipLocationChange:!1}){return kP(n),this.navigateByUrl(this.createUrlTree(n,o),o)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,o){let i;if(o===!0?i=D({},FP):o===!1?i=D({},LP):i=o,us(n))return nw(this.currentUrlTree,n,i);let s=this.parseUrl(n);return nw(this.currentUrlTree,s,i)}removeEmptyProps(n){return Object.entries(n).reduce((o,[i,s])=>(s!=null&&(o[i]=s),o),{})}scheduleNavigation(n,o,i,s,a){if(this.disposed)return Promise.resolve(!1);let u,c,l;a?(u=a.resolve,c=a.reject,l=a.promise):l=new Promise((f,h)=>{u=f,c=h});let d=this.pendingTasks.add();return RP(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:o,restoredState:i,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:u,reject:c,promise:l,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),l.catch(f=>Promise.reject(f))}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();function kP(t){for(let e=0;e{let e=class e{constructor(n,o,i,s,a,u){this.router=n,this.route=o,this.tabIndexAttribute=i,this.renderer=s,this.el=a,this.locationStrategy=u,this.href=null,this.commands=null,this.onChanges=new se,this.preserveFragment=!1,this.skipLocationChange=!1,this.replaceUrl=!1;let c=a.nativeElement.tagName?.toLowerCase();this.isAnchorElement=c==="a"||c==="area",this.isAnchorElement?this.subscription=n.events.subscribe(l=>{l instanceof Dn&&this.updateHref()}):this.setTabIndexIfNotOnNativeEl("0")}setTabIndexIfNotOnNativeEl(n){this.tabIndexAttribute!=null||this.isAnchorElement||this.applyAttributeValue("tabindex",n)}ngOnChanges(n){this.isAnchorElement&&this.updateHref(),this.onChanges.next(this)}set routerLink(n){n!=null?(this.commands=Array.isArray(n)?n:[n],this.setTabIndexIfNotOnNativeEl("0")):(this.commands=null,this.setTabIndexIfNotOnNativeEl(null))}onClick(n,o,i,s,a){let u=this.urlTree;if(u===null||this.isAnchorElement&&(n!==0||o||i||s||a||typeof this.target=="string"&&this.target!="_self"))return!0;let c={skipLocationChange:this.skipLocationChange,replaceUrl:this.replaceUrl,state:this.state,info:this.info};return this.router.navigateByUrl(u,c),!this.isAnchorElement}ngOnDestroy(){this.subscription?.unsubscribe()}updateHref(){let n=this.urlTree;this.href=n!==null&&this.locationStrategy?this.locationStrategy?.prepareExternalUrl(this.router.serializeUrl(n)):null;let o=this.href===null?null:Qv(this.href,this.el.nativeElement.tagName.toLowerCase(),"href");this.applyAttributeValue("href",o)}applyAttributeValue(n,o){let i=this.renderer,s=this.el.nativeElement;o!==null?i.setAttribute(s,n,o):i.removeAttribute(s,n)}get urlTree(){return this.commands===null?null:this.router.createUrlTree(this.commands,{relativeTo:this.relativeTo!==void 0?this.relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:this.preserveFragment})}};e.\u0275fac=function(o){return new(o||e)(w(cc),w(jr),pf("tabindex"),w(rt),w(_e),w(qn))},e.\u0275dir=H({type:e,selectors:[["","routerLink",""]],hostVars:1,hostBindings:function(o,i){o&1&&ht("click",function(a){return i.onClick(a.button,a.ctrlKey,a.shiftKey,a.altKey,a.metaKey)}),o&2&&Or("target",i.target)},inputs:{target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",state:"state",info:"info",relativeTo:"relativeTo",preserveFragment:[2,"preserveFragment","preserveFragment",Wn],skipLocationChange:[2,"skipLocationChange","skipLocationChange",Wn],replaceUrl:[2,"replaceUrl","replaceUrl",Wn],routerLink:"routerLink"},standalone:!0,features:[Rf,nt]});let t=e;return t})(),u7=(()=>{let e=class e{get isActive(){return this._isActive}constructor(n,o,i,s,a){this.router=n,this.element=o,this.renderer=i,this.cdr=s,this.link=a,this.classes=[],this._isActive=!1,this.routerLinkActiveOptions={exact:!1},this.isActiveChange=new G,this.routerEventsSubscription=n.events.subscribe(u=>{u instanceof Dn&&this.update()})}ngAfterContentInit(){I(this.links.changes,I(null)).pipe(An()).subscribe(n=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){this.linkInputChangesSubscription?.unsubscribe();let n=[...this.links.toArray(),this.link].filter(o=>!!o).map(o=>o.onChanges);this.linkInputChangesSubscription=te(n).pipe(An()).subscribe(o=>{this._isActive!==this.isLinkActive(this.router)(o)&&this.update()})}set routerLinkActive(n){let o=Array.isArray(n)?n:n.split(" ");this.classes=o.filter(i=>!!i)}ngOnChanges(n){this.update()}ngOnDestroy(){this.routerEventsSubscription.unsubscribe(),this.linkInputChangesSubscription?.unsubscribe()}update(){!this.links||!this.router.navigated||queueMicrotask(()=>{let n=this.hasActiveLinks();this.classes.forEach(o=>{n?this.renderer.addClass(this.element.nativeElement,o):this.renderer.removeClass(this.element.nativeElement,o)}),n&&this.ariaCurrentWhenActive!==void 0?this.renderer.setAttribute(this.element.nativeElement,"aria-current",this.ariaCurrentWhenActive.toString()):this.renderer.removeAttribute(this.element.nativeElement,"aria-current"),this._isActive!==n&&(this._isActive=n,this.cdr.markForCheck(),this.isActiveChange.emit(n))})}isLinkActive(n){let o=VP(this.routerLinkActiveOptions)?this.routerLinkActiveOptions:this.routerLinkActiveOptions.exact||!1;return i=>{let s=i.urlTree;return s?n.isActive(s,o):!1}}hasActiveLinks(){let n=this.isLinkActive(this.router);return this.link&&n(this.link)||this.links.some(n)}};e.\u0275fac=function(o){return new(o||e)(w(cc),w(_e),w(rt),w(Nt),w(cw,8))},e.\u0275dir=H({type:e,selectors:[["","routerLinkActive",""]],contentQueries:function(o,i,s){if(o&1&&sD(s,cw,5),o&2){let a;aD(a=uD())&&(i.links=a)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",ariaCurrentWhenActive:"ariaCurrentWhenActive",routerLinkActive:"routerLinkActive"},outputs:{isActiveChange:"isActiveChange"},exportAs:["routerLinkActive"],standalone:!0,features:[nt]});let t=e;return t})();function VP(t){return!!t.paths}var UP=new E("");function c7(t,...e){return ji([{provide:ip,multi:!0,useValue:t},[],{provide:jr,useFactory:BP,deps:[cc]},{provide:Mu,multi:!0,useFactory:HP},e.map(r=>r.\u0275providers)])}function BP(t){return t.routerState.root}function $P(t,e){return{\u0275kind:t,\u0275providers:e}}function HP(){let t=y(nn);return e=>{let r=t.get(Rr);if(e!==r.components[0])return;let n=t.get(cc),o=t.get(zP);t.get(GP)===1&&n.initialNavigation(),t.get(WP,null,j.Optional)?.setUpPreloading(),t.get(UP,null,j.Optional)?.init(),n.resetRootComponentType(r.componentTypes[0]),o.closed||(o.next(),o.complete(),o.unsubscribe())}}var zP=new E("",{factory:()=>new se}),GP=new E("",{providedIn:"root",factory:()=>1});var WP=new E("");function l7(){return $P(6,[{provide:qn,useClass:ND}])}function kw(t){let e=t.split(/\D/).map(r=>Number(r));return new Date(e[0],e[1]-1,e[2],e[3],e[4],e[5])}function jw(t){let e=t.split(/\D/).map(r=>Number(r));return new Date(e[0],e[1]-1,e[2])}function Vw(t){return ap(t)+`T${ws(t.getHours())}:${ws(t.getMinutes())}:${ws(t.getSeconds())}`}function ap(t){return`${t.getFullYear()}-${ws(t.getMonth()+1)}-${ws(t.getDate())}`}function ws(t){return("0"+t).slice(-2)}var qP=function(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n=t}:t;return function(){var n=Array.from(arguments);return r(arguments)?e.apply(this,n):function(o){return e.apply(void 0,qP([o],n,!1))}}};var Bw=function(t){return t._tag==="Left"};var $w=function(t){return{_tag:"Left",left:t}},Hw=function(t){return{_tag:"Right",right:t}};function up(t){return function(e,r){return t.map(e,function(){return r})}}function zw(t){var e=up(t);return function(r){return e(r,void 0)}}function Gw(t){return function(e,r){return t.chain(e,function(n){return t.map(r(n),function(){return n})})}}var dc=$w,bs=Hw,Ww=lc(2,function(t,e){return he(t)?t:e(t.right)}),qw=function(t,e){return Xn(t,QP(e))},YP=function(t,e){return Xn(t,XP(e))};var cp="Either";var QP=function(t){return function(e){return he(e)?e:bs(t(e.right))}},Zw={URI:cp,map:qw},O7=lc(2,up(Zw)),R7=zw(Zw);var JP=function(t){return function(e){return he(e)?e:he(t)?t:bs(e.right(t.right))}},XP=JP;var eF={URI:cp,map:qw,ap:YP,chain:Ww};var tF={URI:cp,fromEither:Uw};var he=Bw;var nF=function(t,e){return function(r){return he(r)?t(r.left):e(r.right)}};var rF=nF,fc=rF;var P7=lc(2,Gw(eF));var F7={fromEither:tF.fromEither};var oF=function(t){return function(e){return he(e)?t(e.left):e}},L7=oF;var lp=Ww;var Q=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Vo=function(){return Vo=Object.assign||function(t){for(var e,r=1,n=arguments.length;r")}function er(t,e,r,n){for(var o=t.length,i=Array(o+1),s=0;s")}function sF(t,e,r,n){n===void 0&&(n="{ [K in ".concat(e.name,"]: ").concat(r.name," }"));for(var o=t.length,i={},s=0;s0?Br(s):Y(c?i:n)}return Jw(e)&&Array.isArray(n)?Y(n):de(n,o)},t.encode===Z&&e.encode===Z?function(n){return Kw(n,t)}:function(n){for(var o={},i=Object.keys(Kw(n,t)),s=i.length,a=0;a")}function lF(t){return t.length>0}var ct={};function rb(t,e){for(var r=[],n=0,o=t;n")),new FF(e,function(r){return Xw.is(r)&&r.every(t.is)},function(r,n){var o=Xw.validate(r,n);if(he(o))return o;for(var i=o.right,s=i.length,a=i,u=[],c=0;c0?Br(u):Y(a)},t.encode===Z?Z:function(r){return r.map(t.encode)},t)}var LF=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.props=s,a._tag="InterfaceType",a}return e}(B);function mt(t,e){e===void 0&&(e=eb(t));var r=Object.keys(t),n=r.map(function(i){return t[i]}),o=r.length;return new LF(e,function(i){if(Pt.is(i)){for(var s=0;s0?Br(l):Y(c)},hc(n)?Z:function(i){for(var s=Vo({},i),a=0;a0?Br(l):Y(c)},hc(n)?Z:function(i){for(var s=Vo({},i),a=0;a0){var n=r[0],o=r[1],i=o.length,s=function(a){for(var u=0;u0?Br(s):Y(Yw(n,i))},t.length===0?Z:function(n){return Yw(n,t.map(function(o){return o.encode(n)}))},t)}var q7=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.types=s,a._tag="TupleType",a}return e}(B);var VF=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.type=s,a._tag="ReadonlyType",a}return e}(B);function Z7(t,e){return e===void 0&&(e="Readonly<".concat(t.name,">")),new VF(e,t.is,t.validate,t.encode,t)}var UF=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.type=s,a._tag="ReadonlyArrayType",a}return e}(B);function db(t,e){e===void 0&&(e="ReadonlyArray<".concat(t.name,">"));var r=ze(t);return new UF(e,r.is,r.validate,r.encode,t)}var BF=function(t,e){return HF(mt(t),e)},$F=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.type=s,a._tag="ExactType",a}return e}(B);function HF(t,e){e===void 0&&(e=cF(t));var r=hp(t);return new $F(e,t.is,function(n,o){var i=Pt.validate(n,o);if(he(i))return i;var s=t.validate(n,o);return he(s)?s:bs(Qw(s.right,r))},function(n){return t.encode(Qw(n,r))},t)}var zF=function(t){Q(e,t);function e(){var r=t.call(this,"Function",function(n){return typeof n=="function"},function(n,o){return r.is(n)?Y(n):de(n,o)},Z)||this;return r._tag="FunctionType",r}return e}(B);var K7=new zF,GF=function(t){Q(e,t);function e(){var r=t.call(this,"never",function(n){return!1},function(n,o){return de(n,o)},function(){throw new Error("cannot encode never")})||this;return r._tag="NeverType",r}return e}(B);var Y7=new GF,WF=function(t){Q(e,t);function e(){var r=t.call(this,"any",function(n){return!0},Y,Z)||this;return r._tag="AnyType",r}return e}(B);var Q7=new WF;function fb(t,e,r){return r===void 0&&(r="(".concat(t.name," | ").concat(pp(e),")")),new RF(r,function(n){return t.is(n)&&e(n)},function(n,o){var i=t.validate(n,o);if(he(i))return i;var s=i.right;return e(s)?Y(s):de(s,o)},t.encode,t,e)}var J7=fb(ge,Number.isInteger,"Integer"),qF=function(t){Q(e,t);function e(r,n,o,i,s,a){var u=t.call(this,r,n,o,i,s)||this;return u.tag=a,u}return e}(lb);var X7=function(t){return[{key:"",type:t}]};var ZF=function(t){Q(e,t);function e(){var r=t.call(this,"object",function(n){return n!==null&&typeof n=="object"},function(n,o){return r.is(n)?Y(n):de(n,o)},Z)||this;return r._tag="ObjectType",r}return e}(B);var eZ=new ZF;var tZ=function(t){Q(e,t);function e(r,n,o,i,s){var a=t.call(this,r,n,o,i)||this;return a.props=s,a._tag="StrictType",a}return e}(B);var KF=gp("JsonArray",function(){return db(mp)}),YF=gp("JsonRecord",function(){return Bo(ee,mp)}),mp=Is([ab,ge,ee,Es,KF,YF],"Json"),hb=new B("JsonFromString",mp.is,function(t,e){try{return Y(JSON.parse(t))}catch{return de(t,e)}},function(t){return JSON.stringify(t)});function _s(t){return Is([Es,t])}function aZ(t){return Is([Es,Cs,t])}var uZ=mt({Id:ge,HRef:_s(ee)});var cZ=mt({Id:_s(ge),HRef:_s(ee)});var lZ=ee.pipe(hb,"JsonFromUnknown"),dZ=new B("LocalDateTimeFromString",t=>t instanceof Date,(t,e)=>Xn(ee.validate(t,e),lp(r=>{let n=kw(r);return isNaN(n.getTime())?de(t,e):Y(n)})),t=>Vw(t)),fZ=new B("LocalDateTimeFromString",t=>t instanceof Date,(t,e)=>Xn(ee.validate(t,e),lp(r=>{let n=jw(r);return isNaN(n.getTime())?de(t,e):Y(n)})),t=>ap(t));function pZ(t,e){return e.reduce((r,n)=>$(D({},r),{[n]:t[n]}),{})}function pb(t,e){let r=n=>Object.values(e).includes(n);return new B(t,r,(n,o)=>r(n)?Y(n):de(n,o),Z)}var gb=function(t){return t.Crystal="crystal",t.Excel="excel",t}(gb||{}),$r=mt({type:pb("ReportType",gb),id:ge});var QF=mt({de:mt({label:ee,description:ee}),fr:mt({label:ee,description:ee})}),JF=Bo(ee,QF),XF=mt({roles:ze(ee),types:ze(ee)}),e1=mt({substitutionsAdminLink:ee}),wZ=mt({apiUrl:ee,scriptsAndAssetsPath:ee,paginationLimit:ge,absencePresenceTypeId:ge,latePresenceTypeId:ge,dispensationPresenceTypeId:ge,halfDayPresenceTypeId:ge,unconfirmedAbsenceStateId:ge,unexcusedAbsenceStateId:ge,excusedAbsenceStateId:ge,checkableAbsenceStateId:ge,lessonPresencesRefreshTime:ge,unconfirmedAbsencesRefreshTime:_s(ge),personMasterDataReports:ze($r),studentConfirmationReports:ze($r),evaluateAbsencesReports:ze($r),myAbsencesReports:ze($r),testsByCourseReports:ze($r),testsBySubscriptionStudentReports:ze($r),testsBySubscriptionTeacherReports:ze($r),subscriptionDetailGroupId:ge,headerRoleRestriction:Bo(ee,ee),notificationTypes:JF,notificationTypesAssignments:ze(XF),eventlist:Bo(ee,ee),dashboard:e1,preventStudentAbsenceAfterLessonStart:ze(ee)});var bZ=new E("Application Settings",{providedIn:"root",factory:()=>window.schulverwaltung.settings});var xb=(()=>{let e=class e{constructor(n,o){this._renderer=n,this._elementRef=o,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(n,o){this._renderer.setProperty(this._elementRef.nativeElement,n,o)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(o){return new(o||e)(w(rt),w(_e))},e.\u0275dir=H({type:e});let t=e;return t})(),qo=(()=>{let e=class e extends xb{};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,features:[Ie]});let t=e;return t})(),bn=new E(""),t1={provide:bn,useExisting:Re(()=>n1),multi:!0},n1=(()=>{let e=class e extends qo{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(o,i){o&1&&ht("change",function(a){return i.onChange(a.target.checked)})("blur",function(){return i.onTouched()})},features:[$e([t1]),Ie]});let t=e;return t})(),r1={provide:bn,useExisting:Re(()=>_b),multi:!0};function o1(){let t=mn()?mn().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}var i1=new E(""),_b=(()=>{let e=class e extends xb{constructor(n,o,i){super(n,o),this._compositionMode=i,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!o1())}writeValue(n){let o=n??"";this.setProperty("value",o)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(o){return new(o||e)(w(rt),w(_e),w(i1,8))},e.\u0275dir=H({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(o,i){o&1&&ht("input",function(a){return i._handleInput(a.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(a){return i._compositionEnd(a.target.value)})},features:[$e([r1]),Ie]});let t=e;return t})();function tr(t){return t==null||(typeof t=="string"||Array.isArray(t))&&t.length===0}function Mb(t){return t!=null&&typeof t.length=="number"}var rr=new E(""),Rs=new E(""),s1=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mb=class{static min(e){return Tb(e)}static max(e){return Sb(e)}static required(e){return Ab(e)}static requiredTrue(e){return a1(e)}static email(e){return u1(e)}static minLength(e){return c1(e)}static maxLength(e){return l1(e)}static pattern(e){return d1(e)}static nullValidator(e){return gc(e)}static compose(e){return Lb(e)}static composeAsync(e){return kb(e)}};function Tb(t){return e=>{if(tr(e.value)||tr(t))return null;let r=parseFloat(e.value);return!isNaN(r)&&r{if(tr(e.value)||tr(t))return null;let r=parseFloat(e.value);return!isNaN(r)&&r>t?{max:{max:t,actual:e.value}}:null}}function Ab(t){return tr(t.value)?{required:!0}:null}function a1(t){return t.value===!0?null:{required:!0}}function u1(t){return tr(t.value)||s1.test(t.value)?null:{email:!0}}function c1(t){return e=>tr(e.value)||!Mb(e.value)?null:e.value.lengthMb(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}function d1(t){if(!t)return gc;let e,r;return typeof t=="string"?(r="",t.charAt(0)!=="^"&&(r+="^"),r+=t,t.charAt(t.length-1)!=="$"&&(r+="$"),e=new RegExp(r)):(r=t.toString(),e=t),n=>{if(tr(n.value))return null;let o=n.value;return e.test(o)?null:{pattern:{requiredPattern:r,actualValue:o}}}}function gc(t){return null}function Nb(t){return t!=null}function Ob(t){return Gn(t)?te(t):t}function Rb(t){let e={};return t.forEach(r=>{e=r!=null?D(D({},e),r):e}),Object.keys(e).length===0?null:e}function Pb(t,e){return e.map(r=>r(t))}function f1(t){return!t.validate}function Fb(t){return t.map(e=>f1(e)?e:r=>e.validate(r))}function Lb(t){if(!t)return null;let e=t.filter(Nb);return e.length==0?null:function(r){return Rb(Pb(r,e))}}function Cp(t){return t!=null?Lb(Fb(t)):null}function kb(t){if(!t)return null;let e=t.filter(Nb);return e.length==0?null:function(r){let n=Pb(r,e).map(Ob);return Ci(n).pipe(N(Rb))}}function Ep(t){return t!=null?kb(Fb(t)):null}function vb(t,e){return t===null?[e]:Array.isArray(t)?[...t,e]:[t,e]}function jb(t){return t._rawValidators}function Vb(t){return t._rawAsyncValidators}function vp(t){return t?Array.isArray(t)?t:[t]:[]}function mc(t,e){return Array.isArray(t)?t.includes(e):t===e}function yb(t,e){let r=vp(e);return vp(t).forEach(o=>{mc(r,o)||r.push(o)}),r}function Db(t,e){return vp(e).filter(r=>!mc(t,r))}var vc=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Cp(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=Ep(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,r){return this.control?this.control.hasError(e,r):!1}getError(e,r){return this.control?this.control.getError(e,r):null}},wn=class extends vc{get formDirective(){return null}get path(){return null}},qt=class extends vc{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},yc=class{constructor(e){this._cd=e}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},h1={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},jZ=$(D({},h1),{"[class.ng-submitted]":"isSubmitted"}),VZ=(()=>{let e=class e extends yc{constructor(n){super(n)}};e.\u0275fac=function(o){return new(o||e)(w(qt,2))},e.\u0275dir=H({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(o,i){o&2&&Iu("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Ie]});let t=e;return t})(),UZ=(()=>{let e=class e extends yc{constructor(n){super(n)}};e.\u0275fac=function(o){return new(o||e)(w(wn,10))},e.\u0275dir=H({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(o,i){o&2&&Iu("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Ie]});let t=e;return t})();var Ms="VALID",pc="INVALID",$o="PENDING",Ts="DISABLED",nr=class{},Dc=class extends nr{constructor(e,r){super(),this.value=e,this.source=r}},As=class extends nr{constructor(e,r){super(),this.pristine=e,this.source=r}},Ns=class extends nr{constructor(e,r){super(),this.touched=e,this.source=r}},Ho=class extends nr{constructor(e,r){super(),this.status=e,this.source=r}},yp=class extends nr{constructor(e){super(),this.source=e}},Dp=class extends nr{constructor(e){super(),this.source=e}};function Ip(t){return(Ec(t)?t.validators:t)||null}function p1(t){return Array.isArray(t)?Cp(t):t||null}function xp(t,e){return(Ec(e)?e.asyncValidators:t)||null}function g1(t){return Array.isArray(t)?Ep(t):t||null}function Ec(t){return t!=null&&!Array.isArray(t)&&typeof t=="object"}function Ub(t,e,r){let n=t.controls;if(!(e?Object.keys(n):n).length)throw new C(1e3,"");if(!n[r])throw new C(1001,"")}function Bb(t,e,r){t._forEachChild((n,o)=>{if(r[o]===void 0)throw new C(1002,"")})}var Go=class{constructor(e,r){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._events=new se,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(e),this._assignAsyncValidators(r)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get valid(){return this.status===Ms}get invalid(){return this.status===pc}get pending(){return this.status==$o}get disabled(){return this.status===Ts}get enabled(){return this.status!==Ts}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(yb(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(yb(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(Db(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(Db(e,this._rawAsyncValidators))}hasValidator(e){return mc(this._rawValidators,e)}hasAsyncValidator(e){return mc(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let r=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched($(D({},e),{sourceControl:n})),r&&e.emitEvent!==!1&&this._events.next(new Ns(!0,n))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(r=>r.markAllAsTouched(e))}markAsUntouched(e={}){let r=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),r&&e.emitEvent!==!1&&this._events.next(new Ns(!1,n))}markAsDirty(e={}){let r=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty($(D({},e),{sourceControl:n})),r&&e.emitEvent!==!1&&this._events.next(new As(!1,n))}markAsPristine(e={}){let r=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),r&&e.emitEvent!==!1&&this._events.next(new As(!0,n))}markAsPending(e={}){this.status=$o;let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ho(this.status,r)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending($(D({},e),{sourceControl:r}))}disable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Ts,this.errors=null,this._forEachChild(o=>{o.disable($(D({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Dc(this.value,n)),this._events.next(new Ho(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors($(D({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(e={}){let r=this._parentMarkedDirty(e.onlySelf);this.status=Ms,this._forEachChild(n=>{n.enable($(D({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors($(D({},e),{skipPristineCheck:r}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,r){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},r),this._parent._updateTouched({},r))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Ms||this.status===$o)&&this._runAsyncValidator(n,e.emitEvent)}let r=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Dc(this.value,r)),this._events.next(new Ho(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity($(D({},e),{sourceControl:r}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(r=>r._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Ts:Ms}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,r){if(this.asyncValidator){this.status=$o,this._hasOwnPendingAsyncValidator={emitEvent:r!==!1};let n=Ob(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:r,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,r={}){this.errors=e,this._updateControlsErrors(r.emitEvent!==!1,this,r.shouldHaveEmitted)}get(e){let r=e;return r==null||(Array.isArray(r)||(r=r.split(".")),r.length===0)?null:r.reduce((n,o)=>n&&n._find(o),this)}getError(e,r){let n=r?this.get(r):this;return n&&n.errors?n.errors[e]:null}hasError(e,r){return!!this.getError(e,r)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,r,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Ho(this.status,r)),this._parent&&this._parent._updateControlsErrors(e,r,n)}_initObservables(){this.valueChanges=new G,this.statusChanges=new G}_calculateStatus(){return this._allControlsDisabled()?Ts:this.errors?pc:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus($o)?$o:this._anyControlsHaveStatus(pc)?pc:Ms}_anyControlsHaveStatus(e){return this._anyControls(r=>r.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,r){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,r),o&&this._events.next(new As(this.pristine,r))}_updateTouched(e={},r){this.touched=this._anyControlsTouched(),this._events.next(new Ns(this.touched,r)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,r)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ec(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let r=this._parent&&this._parent.dirty;return!e&&!!r&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=p1(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=g1(this._rawAsyncValidators)}},Wo=class extends Go{constructor(e,r,n){super(Ip(r),xp(n,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,r){return this.controls[e]?this.controls[e]:(this.controls[e]=r,r.setParent(this),r._registerOnCollectionChange(this._onCollectionChange),r)}addControl(e,r,n={}){this.registerControl(e,r),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,r={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}setControl(e,r,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],r&&this.registerControl(e,r),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,r={}){Bb(this,!0,e),Object.keys(e).forEach(n=>{Ub(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(Object.keys(e).forEach(n=>{let o=this.controls[n];o&&o.patchValue(e[n],{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e={},r={}){this._forEachChild((n,o)=>{n.reset(e?e[o]:null,{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r,this),this._updateTouched(r,this),this.updateValueAndValidity(r)}getRawValue(){return this._reduceChildren({},(e,r,n)=>(e[n]=r.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(r,n)=>n._syncPendingControls()?!0:r);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(r=>{let n=this.controls[r];n&&e(n,r)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[r,n]of Object.entries(this.controls))if(this.contains(r)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(r,n,o)=>((n.enabled||this.disabled)&&(r[o]=n.value),r))}_reduceChildren(e,r){let n=e;return this._forEachChild((o,i)=>{n=r(n,o,i)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var wp=class extends Wo{};var Hr=new E("CallSetDisabledState",{providedIn:"root",factory:()=>Ps}),Ps="always";function $b(t,e){return[...e.path,t]}function Os(t,e,r=Ps){_p(t,e),e.valueAccessor.writeValue(t.value),(t.disabled||r==="always")&&e.valueAccessor.setDisabledState?.(t.disabled),v1(t,e),D1(t,e),y1(t,e),m1(t,e)}function wc(t,e,r=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),Cc(t,e),t&&(e._invokeOnDestroyCallbacks(),t._registerOnCollectionChange(()=>{}))}function bc(t,e){t.forEach(r=>{r.registerOnValidatorChange&&r.registerOnValidatorChange(e)})}function m1(t,e){if(e.valueAccessor.setDisabledState){let r=n=>{e.valueAccessor.setDisabledState(n)};t.registerOnDisabledChange(r),e._registerOnDestroy(()=>{t._unregisterOnDisabledChange(r)})}}function _p(t,e){let r=jb(t);e.validator!==null?t.setValidators(vb(r,e.validator)):typeof r=="function"&&t.setValidators([r]);let n=Vb(t);e.asyncValidator!==null?t.setAsyncValidators(vb(n,e.asyncValidator)):typeof n=="function"&&t.setAsyncValidators([n]);let o=()=>t.updateValueAndValidity();bc(e._rawValidators,o),bc(e._rawAsyncValidators,o)}function Cc(t,e){let r=!1;if(t!==null){if(e.validator!==null){let o=jb(t);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==e.validator);i.length!==o.length&&(r=!0,t.setValidators(i))}}if(e.asyncValidator!==null){let o=Vb(t);if(Array.isArray(o)&&o.length>0){let i=o.filter(s=>s!==e.asyncValidator);i.length!==o.length&&(r=!0,t.setAsyncValidators(i))}}}let n=()=>{};return bc(e._rawValidators,n),bc(e._rawAsyncValidators,n),r}function v1(t,e){e.valueAccessor.registerOnChange(r=>{t._pendingValue=r,t._pendingChange=!0,t._pendingDirty=!0,t.updateOn==="change"&&Hb(t,e)})}function y1(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,t.updateOn==="blur"&&t._pendingChange&&Hb(t,e),t.updateOn!=="submit"&&t.markAsTouched()})}function Hb(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function D1(t,e){let r=(n,o)=>{e.valueAccessor.writeValue(n),o&&e.viewToModelUpdate(n)};t.registerOnChange(r),e._registerOnDestroy(()=>{t._unregisterOnChange(r)})}function zb(t,e){t==null,_p(t,e)}function w1(t,e){return Cc(t,e)}function Mp(t,e){if(!t.hasOwnProperty("model"))return!1;let r=t.model;return r.isFirstChange()?!0:!Object.is(e,r.currentValue)}function b1(t){return Object.getPrototypeOf(t.constructor)===qo}function Gb(t,e){t._syncPendingControls(),e.forEach(r=>{let n=r.control;n.updateOn==="submit"&&n._pendingChange&&(r.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function Tp(t,e){if(!e)return null;Array.isArray(e);let r,n,o;return e.forEach(i=>{i.constructor===_b?r=i:b1(i)?n=i:o=i}),o||n||r||null}function C1(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}var E1={provide:wn,useExisting:Re(()=>I1)},Ss=Promise.resolve(),I1=(()=>{let e=class e extends wn{constructor(n,o,i){super(),this.callSetDisabledState=i,this.submitted=!1,this._directives=new Set,this.ngSubmit=new G,this.form=new Wo({},Cp(n),Ep(o))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Ss.then(()=>{let o=this._findContainer(n.path);n.control=o.registerControl(n.name,n.control),Os(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Ss.then(()=>{let o=this._findContainer(n.path);o&&o.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Ss.then(()=>{let o=this._findContainer(n.path),i=new Wo({});zb(i,n),o.registerControl(n.name,i),i.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Ss.then(()=>{let o=this._findContainer(n.path);o&&o.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,o){Ss.then(()=>{this.form.get(n.path).setValue(o)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submitted=!0,Gb(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}};e.\u0275fac=function(o){return new(o||e)(w(rr,10),w(Rs,10),w(Hr,8))},e.\u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(o,i){o&1&&ht("submit",function(a){return i.onSubmit(a)})("reset",function(){return i.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[$e([E1]),Ie]});let t=e;return t})();function wb(t,e){let r=t.indexOf(e);r>-1&&t.splice(r,1)}function bb(t){return typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"value"in t&&"disabled"in t}var zo=class extends Go{constructor(e=null,r,n){super(Ip(r),xp(n,r)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(r),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ec(r)&&(r.nonNullable||r.initialValueIsDefault)&&(bb(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,r={}){this.value=this._pendingValue=e,this._onChange.length&&r.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,r.emitViewToModelChange!==!1)),this.updateValueAndValidity(r)}patchValue(e,r={}){this.setValue(e,r)}reset(e=this.defaultValue,r={}){this._applyFormState(e),this.markAsPristine(r),this.markAsUntouched(r),this.setValue(this.value,r),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){wb(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){wb(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){bb(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}},$Z=zo,x1=t=>t instanceof zo;var _1={provide:qt,useExisting:Re(()=>M1)},Cb=Promise.resolve(),M1=(()=>{let e=class e extends qt{constructor(n,o,i,s,a,u){super(),this._changeDetectorRef=a,this.callSetDisabledState=u,this.control=new zo,this._registered=!1,this.name="",this.update=new G,this._parent=n,this._setValidators(o),this._setAsyncValidators(i),this.valueAccessor=Tp(this,s)}ngOnChanges(n){if(this._checkForErrors(),!this._registered||"name"in n){if(this._registered&&(this._checkName(),this.formDirective)){let o=n.name.previousValue;this.formDirective.removeControl({name:o,path:this._getPath(o)})}this._setUpControl()}"isDisabled"in n&&this._updateDisabled(n),Mp(n,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){Os(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(n){Cb.then(()=>{this.control.setValue(n,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(n){let o=n.isDisabled.currentValue,i=o!==0&&Wn(o);Cb.then(()=>{i&&!this.control.disabled?this.control.disable():!i&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(n){return this._parent?$b(n,this._parent):[n]}};e.\u0275fac=function(o){return new(o||e)(w(wn,9),w(rr,10),w(Rs,10),w(bn,10),w(Nt,8),w(Hr,8))},e.\u0275dir=H({type:e,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[$e([_1]),Ie,nt]});let t=e;return t})(),HZ=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=H({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]});let t=e;return t})(),T1={provide:bn,useExisting:Re(()=>S1),multi:!0},S1=(()=>{let e=class e extends qo{writeValue(n){let o=n??"";this.setProperty("value",o)}registerOnChange(n){this.onChange=o=>{n(o==""?null:parseFloat(o))}}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(o,i){o&1&&ht("input",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},features:[$e([T1]),Ie]});let t=e;return t})(),A1={provide:bn,useExisting:Re(()=>O1),multi:!0};var N1=(()=>{let e=class e{constructor(){this._accessors=[]}add(n,o){this._accessors.push([n,o])}remove(n){for(let o=this._accessors.length-1;o>=0;--o)if(this._accessors[o][1]===n){this._accessors.splice(o,1);return}}select(n){this._accessors.forEach(o=>{this._isSameGroup(o,n)&&o[1]!==n&&o[1].fireUncheck(n.value)})}_isSameGroup(n,o){return n[0].control?n[0]._parent===o._control._parent&&n[1].name===o.name:!1}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),O1=(()=>{let e=class e extends qo{constructor(n,o,i,s){super(n,o),this._registry=i,this._injector=s,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=y(Hr,{optional:!0})??Ps}ngOnInit(){this._control=this._injector.get(qt),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(n){this._state=n===this.value,this.setProperty("checked",this._state)}registerOnChange(n){this._fn=n,this.onChange=()=>{n(this.value),this._registry.select(this)}}setDisabledState(n){(this.setDisabledStateFired||n||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",n),this.setDisabledStateFired=!0}fireUncheck(n){this.writeValue(n)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}};e.\u0275fac=function(o){return new(o||e)(w(rt),w(_e),w(N1),w(nn))},e.\u0275dir=H({type:e,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(o,i){o&1&&ht("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[$e([A1]),Ie]});let t=e;return t})();var Sp=new E(""),R1={provide:qt,useExisting:Re(()=>P1)},P1=(()=>{let e=class e extends qt{set isDisabled(n){}constructor(n,o,i,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new G,this._ngModelWarningSent=!1,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=Tp(this,i)}ngOnChanges(n){if(this._isControlChanged(n)){let o=n.form.previousValue;o&&wc(o,this,!1),Os(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}Mp(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&wc(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_isControlChanged(n){return n.hasOwnProperty("form")}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(o){return new(o||e)(w(rr,10),w(Rs,10),w(bn,10),w(Sp,8),w(Hr,8))},e.\u0275dir=H({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[$e([R1]),Ie,nt]});let t=e;return t})(),F1={provide:wn,useExisting:Re(()=>L1)},L1=(()=>{let e=class e extends wn{constructor(n,o,i){super(),this.callSetDisabledState=i,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new G,this._setValidators(n),this._setAsyncValidators(o)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(Cc(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let o=this.form.get(n.path);return Os(o,n,this.callSetDisabledState),o.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),o}getControl(n){return this.form.get(n.path)}removeControl(n){wc(n.control||null,n,!1),C1(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,o){this.form.get(n.path).setValue(o)}onSubmit(n){return this.submitted=!0,Gb(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new yp(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submitted=!1,this.form._events.next(new Dp(this.form))}_updateDomValue(){this.directives.forEach(n=>{let o=n.control,i=this.form.get(n.path);o!==i&&(wc(o||null,n),x1(i)&&(Os(i,n,this.callSetDisabledState),n.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let o=this.form.get(n.path);zb(o,n),o.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let o=this.form.get(n.path);o&&w1(o,n)&&o.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){_p(this.form,this),this._oldForm&&Cc(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(o){return new(o||e)(w(rr,10),w(Rs,10),w(Hr,8))},e.\u0275dir=H({type:e,selectors:[["","formGroup",""]],hostBindings:function(o,i){o&1&&ht("submit",function(a){return i.onSubmit(a)})("reset",function(){return i.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[$e([F1]),Ie,nt]});let t=e;return t})();var k1={provide:qt,useExisting:Re(()=>j1)},j1=(()=>{let e=class e extends qt{set isDisabled(n){}constructor(n,o,i,s,a){super(),this._ngModelWarningConfig=a,this._added=!1,this.name=null,this.update=new G,this._ngModelWarningSent=!1,this._parent=n,this._setValidators(o),this._setAsyncValidators(i),this.valueAccessor=Tp(this,s)}ngOnChanges(n){this._added||this._setUpControl(),Mp(n,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}get path(){return $b(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(o){return new(o||e)(w(wn,13),w(rr,10),w(Rs,10),w(bn,10),w(Sp,8))},e.\u0275dir=H({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[$e([k1]),Ie,nt]});let t=e;return t})(),V1={provide:bn,useExisting:Re(()=>qb),multi:!0};function Wb(t,e){return t==null?`${e}`:(e&&typeof e=="object"&&(e="Object"),`${t}: ${e}`.slice(0,50))}function U1(t){return t.split(":")[0]}var qb=(()=>{let e=class e extends qo{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;let o=this._getOptionId(n),i=Wb(o,n);this.setProperty("value",i)}registerOnChange(n){this.onChange=o=>{this.value=this._getOptionValue(o),n(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(n){for(let o of this._optionMap.keys())if(this._compareWith(this._optionMap.get(o),n))return o;return null}_getOptionValue(n){let o=U1(n);return this._optionMap.has(o)?this._optionMap.get(o):n}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(o,i){o&1&&ht("change",function(a){return i.onChange(a.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[$e([V1]),Ie]});let t=e;return t})(),zZ=(()=>{let e=class e{constructor(n,o,i){this._element=n,this._renderer=o,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(n){this._select!=null&&(this._select._optionMap.set(this.id,n),this._setElementValue(Wb(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._setElementValue(n),this._select&&this._select.writeValue(this._select.value)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(rt),w(qb,9))},e.\u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let t=e;return t})(),B1={provide:bn,useExisting:Re(()=>Zb),multi:!0};function Eb(t,e){return t==null?`${e}`:(typeof e=="string"&&(e=`'${e}'`),e&&typeof e=="object"&&(e="Object"),`${t}: ${e}`.slice(0,50))}function $1(t){return t.split(":")[0]}var Zb=(()=>{let e=class e extends qo{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(n){this._compareWith=n}writeValue(n){this.value=n;let o;if(Array.isArray(n)){let i=n.map(s=>this._getOptionId(s));o=(s,a)=>{s._setSelected(i.indexOf(a.toString())>-1)}}else o=(i,s)=>{i._setSelected(!1)};this._optionMap.forEach(o)}registerOnChange(n){this.onChange=o=>{let i=[],s=o.selectedOptions;if(s!==void 0){let a=s;for(let u=0;u{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(o,i){o&1&&ht("change",function(a){return i.onChange(a.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[$e([B1]),Ie]});let t=e;return t})(),GZ=(()=>{let e=class e{constructor(n,o,i){this._element=n,this._renderer=o,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(n){this._select!=null&&(this._value=n,this._setElementValue(Eb(this.id,n)),this._select.writeValue(this._select.value))}set value(n){this._select?(this._value=n,this._setElementValue(Eb(this.id,n)),this._select.writeValue(this._select.value)):this._setElementValue(n)}_setElementValue(n){this._renderer.setProperty(this._element.nativeElement,"value",n)}_setSelected(n){this._renderer.setProperty(this._element.nativeElement,"selected",n)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}};e.\u0275fac=function(o){return new(o||e)(w(_e),w(rt),w(Zb,9))},e.\u0275dir=H({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}});let t=e;return t})();function Kb(t){return typeof t=="number"?t:parseFloat(t)}var Ap=(()=>{let e=class e{constructor(){this._validator=gc}ngOnChanges(n){if(this.inputName in n){let o=this.normalizeInput(n[this.inputName].currentValue);this._enabled=this.enabled(o),this._validator=this._enabled?this.createValidator(o):gc,this._onChange&&this._onChange()}}validate(n){return this._validator(n)}registerOnValidatorChange(n){this._onChange=n}enabled(n){return n!=null}};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=H({type:e,features:[nt]});let t=e;return t})(),H1={provide:rr,useExisting:Re(()=>z1),multi:!0},z1=(()=>{let e=class e extends Ap{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=n=>Kb(n),this.createValidator=n=>Sb(n)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(o,i){o&2&&Or("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[$e([H1]),Ie]});let t=e;return t})(),G1={provide:rr,useExisting:Re(()=>W1),multi:!0},W1=(()=>{let e=class e extends Ap{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=n=>Kb(n),this.createValidator=n=>Tb(n)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(o,i){o&2&&Or("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[$e([G1]),Ie]});let t=e;return t})(),q1={provide:rr,useExisting:Re(()=>Z1),multi:!0};var Z1=(()=>{let e=class e extends Ap{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=Wn,this.createValidator=n=>Ab}enabled(n){return n}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275dir=H({type:e,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(o,i){o&2&&Or("required",i._enabled?"":null)},inputs:{required:"required"},features:[$e([q1]),Ie]});let t=e;return t})();var Yb=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({});let t=e;return t})(),bp=class extends Go{constructor(e,r,n){super(Ip(r),xp(n,r)),this.controls=e,this._initObservables(),this._setUpdateStrategy(r),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(e){return this.controls[this._adjustIndex(e)]}push(e,r={}){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}insert(e,r,n={}){this.controls.splice(e,0,r),this._registerControl(r),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,r={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:r.emitEvent})}setControl(e,r,n={}){let o=this._adjustIndex(e);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),r&&(this.controls.splice(o,0,r),this._registerControl(r)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,r={}){Bb(this,!1,e),e.forEach((n,o)=>{Ub(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r)}patchValue(e,r={}){e!=null&&(e.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:r.emitEvent})}),this.updateValueAndValidity(r))}reset(e=[],r={}){this._forEachChild((n,o)=>{n.reset(e[o],{onlySelf:!0,emitEvent:r.emitEvent})}),this._updatePristine(r,this),this._updateTouched(r,this),this.updateValueAndValidity(r)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(r=>r._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((r,n)=>n._syncPendingControls()?!0:r,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((r,n)=>{e(r,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(r=>r.enabled&&e(r))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function Ib(t){return!!t&&(t.asyncValidators!==void 0||t.validators!==void 0||t.updateOn!==void 0)}var K1=(()=>{let e=class e{constructor(){this.useNonNullable=!1}get nonNullable(){let n=new e;return n.useNonNullable=!0,n}group(n,o=null){let i=this._reduceControls(n),s={};return Ib(o)?s=o:o!==null&&(s.validators=o.validator,s.asyncValidators=o.asyncValidator),new Wo(i,s)}record(n,o=null){let i=this._reduceControls(n);return new wp(i,o)}control(n,o,i){let s={};return this.useNonNullable?(Ib(o)?s=o:(s.validators=o,s.asyncValidators=i),new zo(n,$(D({},s),{nonNullable:!0}))):new zo(n,o,i)}array(n,o,i){let s=n.map(a=>this._createControl(a));return new bp(s,o,i)}_reduceControls(n){let o={};return Object.keys(n).forEach(i=>{o[i]=this._createControl(n[i])}),o}_createControl(n){if(n instanceof zo)return n;if(n instanceof Go)return n;if(Array.isArray(n)){let o=n[0],i=n.length>1?n[1]:null,s=n.length>2?n[2]:null;return this.control(o,i,s)}else return this.control(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var WZ=(()=>{let e=class e extends K1{group(n,o=null){return super.group(n,o)}control(n,o,i){return super.control(n,o,i)}array(n,o,i){return super.array(n,o,i)}};e.\u0275fac=(()=>{let n;return function(i){return(n||(n=Fe(e)))(i||e)}})(),e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();var qZ=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:Hr,useValue:n.callSetDisabledState??Ps}]}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({imports:[Yb]});let t=e;return t})(),ZZ=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:Sp,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:Hr,useValue:n.callSetDisabledState??Ps}]}}};e.\u0275fac=function(o){return new(o||e)},e.\u0275mod=Mt({type:e}),e.\u0275inj=_t({imports:[Yb]});let t=e;return t})();function Y1(t,e){for(var r=-1,n=e.length,o=t.length;++r0&&r(a)?e>1?oC(a,e-1,r,n,o):Zo(o,a):n||(o[o.length]=a)}return o}var iC=oC;function yL(t){var e=t==null?0:t.length;return e?iC(t,1):[]}var DL=yL;function wL(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var vt=wL;var bL="[object AsyncFunction]",CL="[object Function]",EL="[object GeneratorFunction]",IL="[object Proxy]";function xL(t){if(!vt(t))return!1;var e=Ft(t);return e==CL||e==EL||e==bL||e==IL}var xc=xL;var _L=ye["__core-js_shared__"],_c=_L;var sC=function(){var t=/[^.]+$/.exec(_c&&_c.keys&&_c.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function ML(t){return!!sC&&sC in t}var aC=ML;var TL=Function.prototype,SL=TL.toString;function AL(t){if(t!=null){try{return SL.call(t)}catch{}try{return t+""}catch{}}return""}var Cn=AL;var NL=/[\\^$.*+?()[\]{}|]/g,OL=/^\[object .+?Constructor\]$/,RL=Function.prototype,PL=Object.prototype,FL=RL.toString,LL=PL.hasOwnProperty,kL=RegExp("^"+FL.call(LL).replace(NL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jL(t){if(!vt(t)||aC(t))return!1;var e=xc(t)?kL:OL;return e.test(Cn(t))}var uC=jL;function VL(t,e){return t?.[e]}var cC=VL;function UL(t,e){var r=cC(t,e);return uC(r)?r:void 0}var et=UL;var BL=et(Object,"create"),En=BL;function $L(){this.__data__=En?En(null):{},this.size=0}var lC=$L;function HL(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var dC=HL;var zL="__lodash_hash_undefined__",GL=Object.prototype,WL=GL.hasOwnProperty;function qL(t){var e=this.__data__;if(En){var r=e[t];return r===zL?void 0:r}return WL.call(e,t)?e[t]:void 0}var fC=qL;var ZL=Object.prototype,KL=ZL.hasOwnProperty;function YL(t){var e=this.__data__;return En?e[t]!==void 0:KL.call(e,t)}var hC=YL;var QL="__lodash_hash_undefined__";function JL(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=En&&e===void 0?QL:e,this}var pC=JL;function Yo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var yC=sk;function ak(t,e){var r=this.__data__,n=or(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var DC=ak;function Jo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e-1}var OC=Ek;function Ik(t,e,r){for(var n=-1,o=t==null?0:t.length;++n=Nk){var c=e?null:FC(t);if(c)return ei(c);s=!1,o=Sc,u=new Tc}else u=e?[]:a;e:for(;++n-1&&t%1==0&&t-1&&t%1==0&&t<=Xk}var ri=ej;function tj(t){return t!=null&&ri(t.length)&&!xc(t)}var oi=tj;var nj=Object.prototype;function rj(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||nj;return t===r}var ii=rj;function oj(t,e){for(var r=-1,n=Array(t);++ro?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n=n?t:uE(t,e,r)}var cE=gV;var mV="\\ud800-\\udfff",vV="\\u0300-\\u036f",yV="\\ufe20-\\ufe2f",DV="\\u20d0-\\u20ff",wV=vV+yV+DV,bV="\\ufe0e\\ufe0f",CV="\\u200d",EV=RegExp("["+CV+mV+wV+bV+"]");function IV(t){return EV.test(t)}var Uc=IV;function xV(t){return t.split("")}var lE=xV;var dE="\\ud800-\\udfff",_V="\\u0300-\\u036f",MV="\\ufe20-\\ufe2f",TV="\\u20d0-\\u20ff",SV=_V+MV+TV,AV="\\ufe0e\\ufe0f",NV="["+dE+"]",Lp="["+SV+"]",kp="\\ud83c[\\udffb-\\udfff]",OV="(?:"+Lp+"|"+kp+")",fE="[^"+dE+"]",hE="(?:\\ud83c[\\udde6-\\uddff]){2}",pE="[\\ud800-\\udbff][\\udc00-\\udfff]",RV="\\u200d",gE=OV+"?",mE="["+AV+"]?",PV="(?:"+RV+"(?:"+[fE,hE,pE].join("|")+")"+mE+gE+")*",FV=mE+gE+PV,LV="(?:"+[fE+Lp+"?",Lp,hE,pE,NV].join("|")+")",kV=RegExp(kp+"(?="+kp+")|"+LV+FV,"g");function jV(t){return t.match(kV)||[]}var vE=jV;function VV(t){return Uc(t)?vE(t):lE(t)}var yE=VV;function UV(t){return function(e){e=yt(e);var r=Uc(e)?yE(e):void 0,n=r?r[0]:e.charAt(0),o=r?cE(r,1).join(""):e.slice(1);return n[t]()+o}}var DE=UV;var BV=DE("toUpperCase"),wE=BV;function $V(t){return wE(yt(t).toLowerCase())}var bE=$V;function HV(t,e,r,n){var o=-1,i=t==null?0:t.length;for(n&&i&&(r=t[++o]);++oa))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var d=-1,f=!0,h=r&x2?new Tc:void 0;for(i.set(t,e),i.set(e,t);++d0?"Infinity":"-Infinity":JSON.stringify(t)}function O$(t){return t.map(function(e){var r=e.key,n=e.type;return"".concat(r,": ").concat(n.name)}).join("/")}function R$(t){return t.message!==void 0?t.message:"Invalid value ".concat(N$(t.value)," supplied to ").concat(O$(t.context))}function P$(t){return t.map(R$)}function F$(){return["No errors!"]}var ux={report:fc(P$,F$)};var Up=class extends Error{constructor(){super(...arguments),this.name="DecodeError"}};function L$(t){return e=>Xn(t.decode(e),fc(r=>Sn(()=>new Up(ux.report(dc(r)).join(` +`))),r=>I(r)))}function Uoe(t){return L$(ze(t))}var gi=class{},cx=(()=>{class t extends gi{getTranslation(r){return I({})}static \u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),js=class{},lx=(()=>{class t{handle(r){return r.key}static \u0275fac=function(n){return new(n||t)};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();function Jc(t,e){if(t===e)return!0;if(t===null||e===null)return!1;if(t!==t&&e!==e)return!0;let r=typeof t,n=typeof e,o,i,s;if(r==n&&r=="object")if(Array.isArray(t)){if(!Array.isArray(e))return!1;if((o=t.length)==e.length){for(i=0;i{Bp(e[n])?n in t?r[n]=hx(t[n],e[n]):Object.assign(r,{[n]:e[n]}):Object.assign(r,{[n]:e[n]})}),r}var mi=class{},dx=(()=>{class t extends mi{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(r,n){let o;return typeof r=="string"?o=this.interpolateString(r,n):typeof r=="function"?o=this.interpolateFunction(r,n):o=r,o}getValue(r,n){let o=typeof n=="string"?n.split("."):[n];n="";do n+=o.shift(),fr(r)&&fr(r[n])&&(typeof r[n]=="object"||!o.length)?(r=r[n],n=""):o.length?n+=".":r=void 0;while(o.length);return r}interpolateFunction(r,n){return r(n)}interpolateString(r,n){return n?r.replace(this.templateMatcher,(o,i)=>{let s=this.getValue(n,i);return fr(s)?s:o}):r}static \u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),vi=class{},fx=(()=>{class t extends vi{compile(r,n){return r}compileTranslations(r,n){return r}static \u0275fac=(()=>{let r;return function(o){return(r||(r=Fe(t)))(o||t)}})();static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),Xc=class{defaultLang;currentLang=this.defaultLang;translations={};langs=[];onTranslationChange=new G;onLangChange=new G;onDefaultLangChange=new G},$p=new E("USE_STORE"),Hp=new E("USE_DEFAULT_LANG"),zp=new E("DEFAULT_LANGUAGE"),Gp=new E("USE_EXTEND"),Wp=(()=>{class t{store;currentLoader;compiler;parser;missingTranslationHandler;useDefaultLang;isolate;extend;loadingTranslations;pending=!1;_onTranslationChange=new G;_onLangChange=new G;_onDefaultLangChange=new G;_defaultLang;_currentLang;_langs=[];_translations={};_translationRequests={};get onTranslationChange(){return this.isolate?this._onTranslationChange:this.store.onTranslationChange}get onLangChange(){return this.isolate?this._onLangChange:this.store.onLangChange}get onDefaultLangChange(){return this.isolate?this._onDefaultLangChange:this.store.onDefaultLangChange}get defaultLang(){return this.isolate?this._defaultLang:this.store.defaultLang}set defaultLang(r){this.isolate?this._defaultLang=r:this.store.defaultLang=r}get currentLang(){return this.isolate?this._currentLang:this.store.currentLang}set currentLang(r){this.isolate?this._currentLang=r:this.store.currentLang=r}get langs(){return this.isolate?this._langs:this.store.langs}set langs(r){this.isolate?this._langs=r:this.store.langs=r}get translations(){return this.isolate?this._translations:this.store.translations}set translations(r){this.isolate?this._translations=r:this.store.translations=r}constructor(r,n,o,i,s,a=!0,u=!1,c=!1,l){this.store=r,this.currentLoader=n,this.compiler=o,this.parser=i,this.missingTranslationHandler=s,this.useDefaultLang=a,this.isolate=u,this.extend=c,l&&this.setDefaultLang(l)}setDefaultLang(r){if(r===this.defaultLang)return;let n=this.retrieveTranslations(r);typeof n<"u"?(this.defaultLang==null&&(this.defaultLang=r),n.pipe(xe(1)).subscribe(o=>{this.changeDefaultLang(r)})):this.changeDefaultLang(r)}getDefaultLang(){return this.defaultLang}use(r){if(r===this.currentLang)return I(this.translations[r]);let n=this.retrieveTranslations(r);return typeof n<"u"?(this.currentLang||(this.currentLang=r),n.pipe(xe(1)).subscribe(o=>{this.changeLang(r)}),n):(this.changeLang(r),I(this.translations[r]))}retrieveTranslations(r){let n;return(typeof this.translations[r]>"u"||this.extend)&&(this._translationRequests[r]=this._translationRequests[r]||this.getTranslation(r),n=this._translationRequests[r]),n}getTranslation(r){this.pending=!0;let n=this.currentLoader.getTranslation(r).pipe(Ii(1),xe(1));return this.loadingTranslations=n.pipe(N(o=>this.compiler.compileTranslations(o,r)),Ii(1),xe(1)),this.loadingTranslations.subscribe({next:o=>{this.translations[r]=this.extend&&this.translations[r]?D(D({},o),this.translations[r]):o,this.updateLangs(),this.pending=!1},error:o=>{this.pending=!1}}),n}setTranslation(r,n,o=!1){n=this.compiler.compileTranslations(n,r),(o||this.extend)&&this.translations[r]?this.translations[r]=hx(this.translations[r],n):this.translations[r]=n,this.updateLangs(),this.onTranslationChange.emit({lang:r,translations:this.translations[r]})}getLangs(){return this.langs}addLangs(r){r.forEach(n=>{this.langs.indexOf(n)===-1&&this.langs.push(n)})}updateLangs(){this.addLangs(Object.keys(this.translations))}getParsedResult(r,n,o){let i;if(n instanceof Array){let s={},a=!1;for(let u of n)s[u]=this.getParsedResult(r,u,o),bt(s[u])&&(a=!0);if(a){let u=n.map(c=>bt(s[c])?s[c]:I(s[c]));return Ci(u).pipe(N(c=>{let l={};return c.forEach((d,f)=>{l[n[f]]=d}),l}))}return s}if(r&&(i=this.parser.interpolate(this.parser.getValue(r,n),o)),typeof i>"u"&&this.defaultLang!=null&&this.defaultLang!==this.currentLang&&this.useDefaultLang&&(i=this.parser.interpolate(this.parser.getValue(this.translations[this.defaultLang],n),o)),typeof i>"u"){let s={key:n,translateService:this};typeof o<"u"&&(s.interpolateParams=o),i=this.missingTranslationHandler.handle(s)}return typeof i<"u"?i:n}get(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');if(this.pending)return this.loadingTranslations.pipe(kt(o=>(o=this.getParsedResult(o,r,n),bt(o)?o:I(o))));{let o=this.getParsedResult(this.translations[this.currentLang],r,n);return bt(o)?o:I(o)}}getStreamOnTranslationChange(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');return tt(Jt(()=>this.get(r,n)),this.onTranslationChange.pipe(be(o=>{let i=this.getParsedResult(o.translations,r,n);return typeof i.subscribe=="function"?i:I(i)})))}stream(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');return tt(Jt(()=>this.get(r,n)),this.onLangChange.pipe(be(o=>{let i=this.getParsedResult(o.translations,r,n);return bt(i)?i:I(i)})))}instant(r,n){if(!fr(r)||!r.length)throw new Error('Parameter "key" required');let o=this.getParsedResult(this.translations[this.currentLang],r,n);if(bt(o)){if(r instanceof Array){let i={};return r.forEach((s,a)=>{i[r[a]]=r[a]}),i}return r}else return o}set(r,n,o=this.currentLang){this.translations[o][r]=this.compiler.compile(n,o),this.updateLangs(),this.onTranslationChange.emit({lang:o,translations:this.translations[o]})}changeLang(r){this.currentLang=r,this.onLangChange.emit({lang:r,translations:this.translations[r]}),this.defaultLang==null&&this.changeDefaultLang(r)}changeDefaultLang(r){this.defaultLang=r,this.onDefaultLangChange.emit({lang:r,translations:this.translations[r]})}reloadLang(r){return this.resetLang(r),this.getTranslation(r)}resetLang(r){this._translationRequests[r]=void 0,this.translations[r]=void 0}getBrowserLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let r=window.navigator.languages?window.navigator.languages[0]:null;if(r=r||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,!(typeof r>"u"))return r.indexOf("-")!==-1&&(r=r.split("-")[0]),r.indexOf("_")!==-1&&(r=r.split("_")[0]),r}getBrowserCultureLang(){if(typeof window>"u"||typeof window.navigator>"u")return;let r=window.navigator.languages?window.navigator.languages[0]:null;return r=r||window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage,r}static \u0275fac=function(n){return new(n||t)(x(Xc),x(gi),x(vi),x(mi),x(js),x(Hp),x($p),x(Gp),x(zp))};static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})();var Qoe=(()=>{class t{translate;_ref;value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onDefaultLangChange;constructor(r,n){this.translate=r,this._ref=n}updateValue(r,n,o){let i=s=>{this.value=s!==void 0?s:r,this.lastKey=r,this._ref.markForCheck()};if(o){let s=this.translate.getParsedResult(o,r,n);bt(s.subscribe)?s.subscribe(i):i(s)}this.translate.get(r,n).subscribe(i)}transform(r,...n){if(!r||!r.length)return r;if(Jc(r,this.lastKey)&&Jc(n,this.lastParams))return this.value;let o;if(fr(n[0])&&n.length)if(typeof n[0]=="string"&&n[0].length){let i=n[0].replace(/(\')?([a-zA-Z0-9_]+)(\')?(\s)?:/g,'"$2":').replace(/:(\s)?(\')(.*?)(\')/g,':"$3"');try{o=JSON.parse(i)}catch{throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${n[0]}`)}}else typeof n[0]=="object"&&!Array.isArray(n[0])&&(o=n[0]);return this.lastKey=r,this.lastParams=n,this.updateValue(r,o),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(i=>{this.lastKey&&i.lang===this.translate.currentLang&&(this.lastKey=null,this.updateValue(r,o,i.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(i=>{this.lastKey&&(this.lastKey=null,this.updateValue(r,o,i.translations))})),this.onDefaultLangChange||(this.onDefaultLangChange=this.translate.onDefaultLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(r,o))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onDefaultLangChange<"u"&&(this.onDefaultLangChange.unsubscribe(),this.onDefaultLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(n){return new(n||t)(w(Wp,16),w(Nt,16))};static \u0275pipe=Io({name:"translate",type:t,pure:!1});static \u0275prov=b({token:t,factory:t.\u0275fac})}return t})(),Joe=(()=>{class t{static forRoot(r={}){return{ngModule:t,providers:[r.loader||{provide:gi,useClass:cx},r.compiler||{provide:vi,useClass:fx},r.parser||{provide:mi,useClass:dx},r.missingTranslationHandler||{provide:js,useClass:lx},Xc,{provide:$p,useValue:r.isolate},{provide:Hp,useValue:r.useDefaultLang},{provide:Gp,useValue:r.extend},{provide:zp,useValue:r.defaultLanguage},Wp]}}static forChild(r={}){return{ngModule:t,providers:[r.loader||{provide:gi,useClass:cx},r.compiler||{provide:vi,useClass:fx},r.parser||{provide:mi,useClass:dx},r.missingTranslationHandler||{provide:js,useClass:lx},{provide:$p,useValue:r.isolate},{provide:Hp,useValue:r.useDefaultLang},{provide:Gp,useValue:r.extend},{provide:zp,useValue:r.defaultLanguage},Wp]}}static \u0275fac=function(n){return new(n||t)};static \u0275mod=Mt({type:t});static \u0275inj=_t({})}return t})();var k$="uiCulture",j$="CLX.LoginToken",V$="CLX.RefreshToken",U$="CLX.TokenExpire",tie=(()=>{let e=class e{getLanguage(){return this.getValue(k$)}getAccessToken(){let n=this.getValue(j$);return n?n.replace(/^"+|"+$/g,""):null}getRefreshToken(){return this.getValue(V$)}getTokenExpire(){return this.getValue(U$)}getPayload(){let n=this.getAccessToken(),o=n?n.split(".")[1]:null,i=o?o.replace("-","+").replace("_","/"):null,s=JSON.parse(window.atob(i||""));return s.roles="holder_roles"in s?s.holder_roles:s.roles,s}getValue(n){return sessionStorage.getItem(n)||localStorage.getItem(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=b({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})();export{D as a,$ as b,Dx as c,P as d,se as e,Se as f,Di as g,Rx as h,Px as i,Ae as j,I as k,Sn as l,N as m,da as n,le as o,Jt as p,Qx as q,Ci as r,Cl as s,Xt as t,o0 as u,i0 as v,ke as w,a0 as x,c0 as y,l0 as z,Nn as A,kt as B,Tg as C,On as D,xe as E,d0 as F,Ag as G,p0 as H,Rn as I,pa as J,_l as K,Ii as L,g0 as M,ga as N,be as O,m0 as P,ma as Q,Ce as R,v0 as S,y0 as T,C as U,Re as V,b as W,_t as X,E as Y,x as Z,y as _,Vm as $,Mt as aa,H as ba,Io as ca,s_ as da,Ye as ea,K6 as fa,nt as ga,Y6 as ha,Q6 as ia,J6 as ja,X6 as ka,Fe as la,pf as ma,nn as na,rn as oa,Ov as pa,_e as qa,G as ra,e5 as sa,FM as ta,t5 as ua,w as va,uT as wa,Tr as xa,wo as ya,rt as za,zi as Aa,pe as Ba,dn as Ca,Ie as Da,i5 as Ea,Rf as Fa,zS as Ga,Or as Ha,sA as Ia,Iu as Ja,s5 as Ka,a5 as La,u5 as Ma,c5 as Na,l5 as Oa,d5 as Pa,f5 as Qa,h5 as Ra,Xy as Sa,eD as Ta,jf as Ua,tD as Va,nD as Wa,CA as Xa,p5 as Ya,IA as Za,ht as _a,g5 as $a,m5 as ab,v5 as bb,PA as cb,iD as db,sD as eb,y5 as fb,aD as gb,uD as hb,D5 as ib,w5 as jb,kA as kb,cD as lb,jA as mb,VA as nb,UA as ob,BA as pb,b5 as qb,$A as rb,$e as sb,dD as tb,C5 as ub,E5 as vb,I5 as wb,x5 as xb,_5 as yb,M5 as zb,T5 as Ab,S5 as Bb,A5 as Cb,N5 as Db,O5 as Eb,Rr as Fb,Gi as Gb,Nt as Hb,Wn as Ib,pN as Jb,R5 as Kb,Ue as Lb,qi as Mb,SN as Nb,zN as Ob,J5 as Pb,X5 as Qb,e9 as Rb,t9 as Sb,n9 as Tb,r9 as Ub,o9 as Vb,i9 as Wb,s9 as Xb,nO as Yb,iO as Zb,vn as _b,Kn as $b,jD as ac,dh as bc,Zn as cc,hO as dc,w9 as ec,b9 as fc,ZD as gc,B9 as hc,YO as ic,L as jc,as as kc,ls as lc,Dn as mc,Bh as nc,jr as oc,_R as pc,cc as qc,cw as rc,u7 as sc,c7 as tc,l7 as uc,L7 as vc,de as wc,Y as xc,B as yc,ee as zc,ge as Ac,ab as Bc,$7 as Cc,H7 as Dc,ze as Ec,mt as Fc,G7 as Gc,Is as Hc,W7 as Ic,Z7 as Jc,X7 as Kc,jw as Lc,_s as Mc,aZ as Nc,uZ as Oc,cZ as Pc,lZ as Qc,dZ as Rc,fZ as Sc,pZ as Tc,wZ as Uc,bZ as Vc,bn as Wc,n1 as Xc,_b as Yc,rr as Zc,mb as _c,VZ as $c,UZ as ad,I1 as bd,$Z as cd,M1 as dd,HZ as ed,S1 as fd,O1 as gd,P1 as hd,L1 as id,j1 as jd,qb as kd,zZ as ld,GZ as md,z1 as nd,W1 as od,Z1 as pd,WZ as qd,qZ as rd,ZZ as sd,DL as td,jp as ud,RU as vd,C2 as wd,E$ as xd,x$ as yd,Pk as zd,M$ as Ad,A$ as Bd,L$ as Cd,Uoe as Dd,gi as Ed,Wp as Fd,Qoe as Gd,Joe as Hd,tie as Id}; diff --git a/public/apps/webapp-schulverwaltung/chunk-3V5HHMRH.js b/public/apps/webapp-schulverwaltung/chunk-XYF73IOS.js similarity index 71% rename from public/apps/webapp-schulverwaltung/chunk-3V5HHMRH.js rename to public/apps/webapp-schulverwaltung/chunk-XYF73IOS.js index 5c818a7f..1d6c18bd 100644 --- a/public/apps/webapp-schulverwaltung/chunk-3V5HHMRH.js +++ b/public/apps/webapp-schulverwaltung/chunk-XYF73IOS.js @@ -1 +1 @@ -import{q as b}from"./chunk-QHPTZGVN.js";import{b as l}from"./chunk-33NXTXD7.js";import{Ac as c,Bc as n,Ed as d,Gc as f,O as s,W as p,Wc as u,Z as o,ac as m,ec as a}from"./chunk-T7QWSMKM.js";var h=f({Id:n,Designation:c,StudentCount:n});var T=(()=>{let t=class t extends l{constructor(r,i){super(r,i,h,"Events")}getStudyCourseEvents(){let r=new m().set("filter.EventTypeId=","1");return this.getList({params:r})}getSubscriptionDetailsDefinitions(r){return this.http.get(`${this.baseUrl}/${r}/SubscriptionDetails`).pipe(s(d(b)))}};t.\u0275fac=function(i){return new(i||t)(o(a),o(u))},t.\u0275prov=p({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();export{T as a}; +import{q as b}from"./chunk-7LCBKZQT.js";import{b as l}from"./chunk-SOHFFTKU.js";import{$b as m,Ac as n,Dd as d,Fc as f,O as s,Vc as u,W as p,Z as o,dc as a,zc as c}from"./chunk-XTHSYQMN.js";var h=f({Id:n,Designation:c,StudentCount:n});var T=(()=>{let t=class t extends l{constructor(r,i){super(r,i,h,"Events")}getStudyCourseEvents(){let r=new m().set("filter.EventTypeId=","1");return this.getList({params:r})}getSubscriptionDetailsDefinitions(r){return this.http.get(`${this.baseUrl}/${r}/SubscriptionDetails`).pipe(s(d(b)))}};t.\u0275fac=function(i){return new(i||t)(o(a),o(u))},t.\u0275prov=p({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();export{T as a}; diff --git a/public/apps/webapp-schulverwaltung/chunk-ZK2M6PDV.js b/public/apps/webapp-schulverwaltung/chunk-Y673JQTS.js similarity index 89% rename from public/apps/webapp-schulverwaltung/chunk-ZK2M6PDV.js rename to public/apps/webapp-schulverwaltung/chunk-Y673JQTS.js index 61548f7e..11427fe5 100644 --- a/public/apps/webapp-schulverwaltung/chunk-ZK2M6PDV.js +++ b/public/apps/webapp-schulverwaltung/chunk-Y673JQTS.js @@ -1 +1 @@ -import{$ as b,$a as k,Ga as v,Ha as _,Ia as s,Ja as C,Sa as l,Ta as r,Tb as E,Ya as y,_a as p,ha as f,ia as g,jb as c,ra as h,tb as x,ua as u,vd as I}from"./chunk-T7QWSMKM.js";function F(t,e){return e?t.filter(S(e)):t}function S(t){let e=w(t);return i=>o(i.studentFullName,e)||o(i.studyClassNumber,e)||o(i.designation,e)||o(i.evaluationText,e)}function o(t,e){return t?w(t).includes(e):!1}function w(t){return I(t.toLowerCase())}function T(t,e){if(t&1){let i=y();l(0,"button",5),p("click",function(){f(i);let a=k();return g(a.valueChange.emit(""))}),l(1,"i",2),c(2,"clear"),r()()}}var j=(()=>{let e=class e{constructor(){this.value="",this.disabled=!1,this.valueChange=new h}};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=b({type:e,selectors:[["bkd-resettable-input"]],inputs:{value:"value",disabled:"disabled",placeholder:"placeholder",label:"label"},outputs:{valueChange:"valueChange"},standalone:!0,features:[x],decls:6,vars:7,consts:[[1,"input-group"],["id","resettable-input",1,"input-group-text"],[1,"material-icons"],["type","text","aria-describedby","resettable-input",1,"form-control",3,"keyup","value","disabled"],["class","clear btn btn-link text-decoration-none","type","button",3,"click",4,"ngIf"],["type","button",1,"clear","btn","btn-link","text-decoration-none",3,"click"]],template:function(a,n){a&1&&(l(0,"div",0)(1,"span",1)(2,"i",2),c(3,"search"),r()(),l(4,"input",3),p("keyup",function(m){return n.valueChange.emit(m.target==null?null:m.target.value)}),r(),v(5,T,3,0,"button",4),r()),a&2&&(u(4),C("has-value",n.value),s("value",n.value)("disabled",n.disabled),_("placeholder",n.placeholder)("aria-label",n.label),u(),s("ngIf",n.value))},dependencies:[E],styles:["input.has-value[_ngcontent-%COMP%]{padding-right:2.5em}.btn.clear[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5;padding-left:.5rem;padding-right:.5rem}"]});let t=e;return t})();export{F as a,j as b}; +import{$ as b,$a as k,Ga as v,Ha as _,Ia as s,Ja as C,Sa as l,Sb as E,Ta as r,Ya as y,_a as p,ha as f,ia as g,jb as c,ra as h,tb as x,ua as u,ud as I}from"./chunk-XTHSYQMN.js";function F(t,e){return e?t.filter(S(e)):t}function S(t){let e=w(t);return i=>o(i.studentFullName,e)||o(i.studyClassNumber,e)||o(i.designation,e)||o(i.evaluationText,e)}function o(t,e){return t?w(t).includes(e):!1}function w(t){return I(t.toLowerCase())}function T(t,e){if(t&1){let i=y();l(0,"button",5),p("click",function(){f(i);let a=k();return g(a.valueChange.emit(""))}),l(1,"i",2),c(2,"clear"),r()()}}var j=(()=>{let e=class e{constructor(){this.value="",this.disabled=!1,this.valueChange=new h}};e.\u0275fac=function(a){return new(a||e)},e.\u0275cmp=b({type:e,selectors:[["bkd-resettable-input"]],inputs:{value:"value",disabled:"disabled",placeholder:"placeholder",label:"label"},outputs:{valueChange:"valueChange"},standalone:!0,features:[x],decls:6,vars:7,consts:[[1,"input-group"],["id","resettable-input",1,"input-group-text"],[1,"material-icons"],["type","text","aria-describedby","resettable-input",1,"form-control",3,"keyup","value","disabled"],["class","clear btn btn-link text-decoration-none","type","button",3,"click",4,"ngIf"],["type","button",1,"clear","btn","btn-link","text-decoration-none",3,"click"]],template:function(a,n){a&1&&(l(0,"div",0)(1,"span",1)(2,"i",2),c(3,"search"),r()(),l(4,"input",3),p("keyup",function(m){return n.valueChange.emit(m.target==null?null:m.target.value)}),r(),v(5,T,3,0,"button",4),r()),a&2&&(u(4),C("has-value",n.value),s("value",n.value)("disabled",n.disabled),_("placeholder",n.placeholder)("aria-label",n.label),u(),s("ngIf",n.value))},dependencies:[E],styles:["input.has-value[_ngcontent-%COMP%]{padding-right:2.5em}.btn.clear[_ngcontent-%COMP%]{position:absolute;right:0;z-index:5;padding-left:.5rem;padding-right:.5rem}"]});let t=e;return t})();export{F as a,j as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-MVTCHCDH.js b/public/apps/webapp-schulverwaltung/chunk-YMJC6QZX.js similarity index 87% rename from public/apps/webapp-schulverwaltung/chunk-MVTCHCDH.js rename to public/apps/webapp-schulverwaltung/chunk-YMJC6QZX.js index cba3f234..de078e87 100644 --- a/public/apps/webapp-schulverwaltung/chunk-MVTCHCDH.js +++ b/public/apps/webapp-schulverwaltung/chunk-YMJC6QZX.js @@ -1 +1 @@ -import{a as I}from"./chunk-WN7VWSJW.js";import{b as E}from"./chunk-33NXTXD7.js";import{Ac as t,Bc as y,Dc as l,Dd as j,Ed as m,Gc as d,Ic as P,L as u,Nc as i,O as n,Oc as f,Sc as b,Uc as S,W as p,Wc as g,Z as a,ec as c,m as h}from"./chunk-T7QWSMKM.js";var x=(()=>{let r=class r{constructor(e,s){this.http=e,this.settings=s}getAbsenceConfirmationStates(){return this.http.get(`${this.baseUrl}/AbsenceConfirmationStates`).pipe(n(m(I)),u(1))}getStayPermits(){return this.http.get(`${this.baseUrl}/StayPermits`).pipe(n(m(I)),u(1))}get baseUrl(){return`${this.settings.apiUrl}/DropDownItems`}};r.\u0275fac=function(s){return new(s||r)(a(c),a(g))},r.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var A=d({Id:y,FormOfAddress:t,Nationality:i(t),AddressLine1:i(t),AddressLine2:i(t),BillingAddress:i(t),Birthdate:i(b),CorrespondenceAddress:i(t),DisplayEmail:i(t),Email:f(t),Email2:f(t),FirstName:i(t),Gender:i(P([l("M"),l("F"),l("X")])),HomeTown:i(t),LastName:i(t),FullName:i(t),Location:i(t),MiddleName:i(t),NativeLanguage:i(t),PhoneMobile:i(t),PhonePrivate:i(t),PhoneBusiness:f(t),SocialSecurityNumber:i(t),StayPermit:i(y),StayPermitExpiry:i(b),Zip:i(t)});var q=(()=>{let r=class r extends E{constructor(e,s){super(e,s,A,"Persons"),this.personEmailCodec=d(S(this.codec.props,["Email","FormOfAddress"]))}getListForIds(e){return this.getList({params:{"filter.Id":`;${e.join(";")}`}})}getMyself(e){return this.http.get(`${this.baseUrl}/me`,e).pipe(n(j(this.codec)))}getByIdWithEmailInfos(e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id=":e.toString(),fields:["FormOfAddress","Email"].join(",")}}).pipe(n(m(this.personEmailCodec)),h(s=>s[0]))}update(e,s,F,N){let L={PhonePrivate:s,PhoneMobile:F,Email2:N};return this.http.put(`${this.baseUrl}/${e}`,L).pipe(h(()=>{}))}};r.\u0275fac=function(s){return new(s||r)(a(c),a(g))},r.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();export{x as a,q as b}; +import{a as I}from"./chunk-HII3S2DL.js";import{b as E}from"./chunk-SOHFFTKU.js";import{Ac as y,Cc as l,Cd as j,Dd as m,Fc as d,Hc as P,L as u,Mc as i,Nc as f,O as n,Rc as b,Tc as S,Vc as g,W as p,Z as a,dc as c,m as h,zc as t}from"./chunk-XTHSYQMN.js";var x=(()=>{let r=class r{constructor(e,s){this.http=e,this.settings=s}getAbsenceConfirmationStates(){return this.http.get(`${this.baseUrl}/AbsenceConfirmationStates`).pipe(n(m(I)),u(1))}getStayPermits(){return this.http.get(`${this.baseUrl}/StayPermits`).pipe(n(m(I)),u(1))}get baseUrl(){return`${this.settings.apiUrl}/DropDownItems`}};r.\u0275fac=function(s){return new(s||r)(a(c),a(g))},r.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();var A=d({Id:y,FormOfAddress:t,Nationality:i(t),AddressLine1:i(t),AddressLine2:i(t),BillingAddress:i(t),Birthdate:i(b),CorrespondenceAddress:i(t),DisplayEmail:i(t),Email:f(t),Email2:f(t),FirstName:i(t),Gender:i(P([l("M"),l("F"),l("X")])),HomeTown:i(t),LastName:i(t),FullName:i(t),Location:i(t),MiddleName:i(t),NativeLanguage:i(t),PhoneMobile:i(t),PhonePrivate:i(t),PhoneBusiness:f(t),SocialSecurityNumber:i(t),StayPermit:i(y),StayPermitExpiry:i(b),Zip:i(t)});var q=(()=>{let r=class r extends E{constructor(e,s){super(e,s,A,"Persons"),this.personEmailCodec=d(S(this.codec.props,["Email","FormOfAddress"]))}getListForIds(e){return this.getList({params:{"filter.Id":`;${e.join(";")}`}})}getMyself(e){return this.http.get(`${this.baseUrl}/me`,e).pipe(n(j(this.codec)))}getByIdWithEmailInfos(e){return this.http.get(`${this.baseUrl}/`,{params:{"filter.Id=":e.toString(),fields:["FormOfAddress","Email"].join(",")}}).pipe(n(m(this.personEmailCodec)),h(s=>s[0]))}update(e,s,F,N){let L={PhonePrivate:s,PhoneMobile:F,Email2:N};return this.http.put(`${this.baseUrl}/${e}`,L).pipe(h(()=>{}))}};r.\u0275fac=function(s){return new(s||r)(a(c),a(g))},r.\u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"});let o=r;return o})();export{x as a,q as b}; diff --git a/public/apps/webapp-schulverwaltung/chunk-GI4AZI25.js b/public/apps/webapp-schulverwaltung/chunk-ZK2MNT7Z.js similarity index 98% rename from public/apps/webapp-schulverwaltung/chunk-GI4AZI25.js rename to public/apps/webapp-schulverwaltung/chunk-ZK2MNT7Z.js index 68cf4516..716b6e04 100644 --- a/public/apps/webapp-schulverwaltung/chunk-GI4AZI25.js +++ b/public/apps/webapp-schulverwaltung/chunk-ZK2MNT7Z.js @@ -1,2 +1,2 @@ -import{d}from"./chunk-Q5U6YZUT.js";import{a as lt}from"./chunk-N6FFLIGM.js";import{a as ut,b as dt,c as mt}from"./chunk-33NXTXD7.js";import{u as st,w as ct,z as Pe}from"./chunk-FTRAQKUW.js";import{$ as re,$a as x,Ac as rt,Bb as m,Bc as De,Bd as de,Cb as h,Cc as L,Db as z,E as V,Fb as ke,G as ne,Ga as T,Gc as it,Gd as at,Hd as le,Ia as b,Id as me,J as Ne,Ja as Ve,L as I,N as W,Nc as ot,O as Te,P as Be,Sa as l,Sb as Ze,Ta as f,Tb as et,Ua as Se,Va as U,W as D,Wa as X,Wb as tt,Wc as F,Xb as nt,Ya as oe,Z as k,_a as J,ab as Ge,bb as Qe,ca as je,cb as Ue,db as Xe,e as Ee,ec as ce,f as Ae,fb as Je,g as H,ga as qe,gb as Ke,ha as G,hb as ze,ia as Q,ib as ae,jb as _,k as We,kb as K,lb as C,m as u,mb as Ie,n as Re,q as $e,sc as ue,ta as He,tb as se,ua as c,va as ie,w as Ye}from"./chunk-T7QWSMKM.js";var pt=function(e){return function(t){return!e(t)}};function Jt(e){return!e}function Kt(e){return!!(e&&e.IsComment)}function zt(e){return!!(e&&e.IsIncident)}function pe(e){return!!(e&&(e.IsAbsence||e.IsDispensation||e.IsHalfDay))}function Ce(e,t){return!!(e&&t&&e.Id===t.absencePresenceTypeId)}function Oe(e,t){return!!(e&&t&&t===e.checkableAbsenceStateId)}function ft(e,t,n){return!!(Jt(t)&&e.ConfirmationStateId===null||Kt(t)||zt(t)||pe(t)&&e.ConfirmationStateId===n.unconfirmedAbsenceStateId||Oe(n,e.ConfirmationStateId))}function gr(e,t){return e?.IsAbsence?t.unconfirmedAbsenceStateId:null}var S=function(e){return e.Present="present",e.Unapproved="unapproved",e.Absent="absent",e}(S||{});function Zt(e){switch(e){case S.Absent:return"cancel";case S.Unapproved:return"help";default:return"check_circle"}}var fe=class{constructor(t,n,r,i){this.lessonPresence=t,this.presenceType=n,this.precedingAbsences=r,this.confirmationState=i,this.studentFullName=t.StudentFullName}get presenceCategory(){return Oe(this.settings,this.confirmationState&&Number(this.confirmationState.Key))?S.Unapproved:pe(this.presenceType)?S.Absent:S.Present}get nextPresenceCategory(){return this.presenceCategory===S.Absent?S.Present:S.Absent}getNextPresenceType(t){switch(this.nextPresenceCategory){case S.Absent:return this.presenceCategory===S.Unapproved?this.presenceType:t.find(n=>Ce(n,this.settings))||null;default:return null}}get canChangePresenceType(){return ft(this.lessonPresence,this.presenceType,this.settings)}get canChangeIncident(){return!pe(this.presenceType)}get showDesignation(){return!this.canChangePresenceType||this.presenceCategory===S.Absent&&!Ce(this.presenceType,this.settings)||this.presenceCategory===S.Unapproved}get presenceCategoryIcon(){return Zt(this.presenceCategory)}get settings(){return window.schulverwaltung.settings}};function v(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function ht(e,t){let n=d(e);return isNaN(t)?v(e,NaN):(t&&n.setDate(n.getDate()+t),n)}var en=Math.pow(10,8)*24*60*60*1e3,Sr=-en,he=6048e5,gt=864e5,Ir=6e4,kr=36e5,Dr=1e3;var tn=3600;var yt=tn*24,Pr=yt*7,nn=yt*365.2425,rn=nn/12,Cr=rn*3;var on={};function E(){return on}function O(e,t){let n=E(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=d(e),o=i.getDay(),a=(o=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Z(e){let t=d(e);return t.setHours(0,0,0,0),t}function Me(e){let t=d(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ye(e,t){let n=Z(e),r=Z(t),i=+n-Me(n),o=+r-Me(r);return Math.round((i-o)/gt)}function bt(e){let t=ge(e),n=v(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),R(n)}function xt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _t(e){if(!xt(e)&&typeof e!="number")return!1;let t=d(e);return!isNaN(Number(t))}function wt(e){let t=d(e),n=v(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var an={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vt=(e,t,n)=>{let r,i=an[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function be(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var sn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},un={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tt={date:be({formats:sn,defaultWidth:"full"}),time:be({formats:cn,defaultWidth:"full"}),dateTime:be({formats:un,defaultWidth:"full"})};var dn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},St=(e,t,n,r)=>dn[e];function B(e){return(t,n)=>{let r=n?.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,p=n?.width?String(n.width):a;i=e.formattingValues[p]||e.formattingValues[a]}else{let a=e.defaultWidth,p=n?.width?String(n.width):e.defaultWidth;i=e.values[p]||e.values[a]}let o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}var ln={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},hn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yn=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},It={ordinalNumber:yn,era:B({values:ln,defaultWidth:"wide"}),quarter:B({values:mn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:B({values:pn,defaultWidth:"wide"}),day:B({values:fn,defaultWidth:"wide"}),dayPeriod:B({values:hn,defaultWidth:"wide",formattingValues:gn,defaultFormattingWidth:"wide"})};function j(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;let a=o[0],p=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],g=Array.isArray(p)?xn(p,y=>y.test(a)):bn(p,y=>y.test(a)),P;P=e.valueCallback?e.valueCallback(g):g,P=n.valueCallback?n.valueCallback(P):P;let w=t.slice(a.length);return{value:P,rest:w}}}function bn(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function xn(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;let p=t.slice(i.length);return{value:a,rest:p}}}var _n=/^(\d+)(th|st|nd|rd)?/i,wn=/\d+/i,vn={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Tn={any:[/^b/i,/^(a|c)/i]},Sn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},In={any:[/1/i,/2/i,/3/i,/4/i]},kn={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Dn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Pn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Cn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},On={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Mn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dt={ordinalNumber:kt({matchPattern:_n,parsePattern:wn,valueCallback:e=>parseInt(e,10)}),era:j({matchPatterns:vn,defaultMatchWidth:"wide",parsePatterns:Tn,defaultParseWidth:"any"}),quarter:j({matchPatterns:Sn,defaultMatchWidth:"wide",parsePatterns:In,defaultParseWidth:"any",valueCallback:e=>e+1}),month:j({matchPatterns:kn,defaultMatchWidth:"wide",parsePatterns:Dn,defaultParseWidth:"any"}),day:j({matchPatterns:Pn,defaultMatchWidth:"wide",parsePatterns:Cn,defaultParseWidth:"any"}),dayPeriod:j({matchPatterns:On,defaultMatchWidth:"any",parsePatterns:Mn,defaultParseWidth:"any"})};var Le={code:"en-US",formatDistance:vt,formatLong:Tt,formatRelative:St,localize:It,match:Dt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pt(e){let t=d(e);return ye(t,wt(t))+1}function Ct(e){let t=d(e),n=+R(t)-+bt(t);return Math.round(n/he)+1}function xe(e,t){let n=d(e),r=n.getFullYear(),i=E(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=v(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);let p=O(a,t),g=v(e,0);g.setFullYear(r,0,o),g.setHours(0,0,0,0);let P=O(g,t);return n.getTime()>=p.getTime()?r+1:n.getTime()>=P.getTime()?r:r-1}function Ot(e,t){let n=E(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=xe(e,t),o=v(e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),O(o,t)}function Mt(e,t){let n=d(e),r=+O(n,t)-+Ot(n,t);return Math.round(r/he)+1}function s(e,t){let n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}var M={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return s(t==="yy"?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t==="M"?String(n+1):s(n+1,2)},d(e,t){return s(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return s(e.getHours()%12||12,t.length)},H(e,t){return s(e.getHours(),t.length)},m(e,t){return s(e.getMinutes(),t.length)},s(e,t){return s(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return s(i,t.length)}};var q={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fe={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){let r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return M.y(e,t)},Y:function(e,t,n,r){let i=xe(e,r),o=i>0?i:1-i;if(t==="YY"){let a=o%100;return s(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):s(o,t.length)},R:function(e,t){let n=ge(e);return s(n,t.length)},u:function(e,t){let n=e.getFullYear();return s(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return M.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let i=Mt(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):s(i,t.length)},I:function(e,t,n){let r=Ct(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):M.d(e,t)},D:function(e,t,n){let r=Pt(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return s(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return s(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return s(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r=e.getHours(),i;switch(r===12?i=q.noon:r===0?i=q.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r=e.getHours(),i;switch(r>=17?i=q.evening:r>=12?i=q.afternoon:r>=4?i=q.morning:i=q.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return M.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):M.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):M.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):M.s(e,t)},S:function(e,t){return M.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ft(r);case"XXXX":case"XX":return $(r);case"XXXXX":case"XXX":default:return $(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return Ft(r);case"xxxx":case"xx":return $(r);case"xxxxx":case"xxx":default:return $(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Lt(r,":");case"OOOO":default:return"GMT"+$(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Lt(r,":");case"zzzz":default:return"GMT"+$(r,":")}},t:function(e,t,n){let r=Math.trunc(e.getTime()/1e3);return s(r,t.length)},T:function(e,t,n){let r=e.getTime();return s(r,t.length)}};function Lt(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+s(o,2)}function Ft(e,t){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):$(e,t)}function $(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=s(Math.trunc(r/60),2),o=s(r%60,2);return n+i+t+o}var Et=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},At=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ln=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Et(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Et(r,t)).replace("{{time}}",At(i,t))},Wt={p:At,P:Ln};var Fn=/^D+$/,En=/^Y+$/,An=["D","DD","YY","YYYY"];function Rt(e){return Fn.test(e)}function $t(e){return En.test(e)}function Yt(e,t,n){let r=Wn(e,t,n);if(console.warn(r),An.includes(e))throw new RangeError(r)}function Wn(e,t,n){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Rn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$n=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,Nn=/''/g,Bn=/[a-zA-Z]/;function A(e,t,n){let r=E(),i=n?.locale??r.locale??Le,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,p=d(e);if(!_t(p))throw new RangeError("Invalid time value");let g=t.match($n).map(w=>{let y=w[0];if(y==="p"||y==="P"){let ve=Wt[y];return ve(w,i.formatLong)}return w}).join("").match(Rn).map(w=>{if(w==="''")return{isToken:!1,value:"'"};let y=w[0];if(y==="'")return{isToken:!1,value:jn(w)};if(Fe[y])return{isToken:!0,value:w};if(y.match(Bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(g=i.localize.preprocessor(p,g));let P={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return g.map(w=>{if(!w.isToken)return w.value;let y=w.value;(!n?.useAdditionalWeekYearTokens&&$t(y)||!n?.useAdditionalDayOfYearTokens&&Rt(y))&&Yt(y,t,String(e));let ve=Fe[y[0]];return ve(p,y,i.localize,P)}).join("")}function jn(e){let t=e.match(Yn);return t?t[1].replace(Nn,"'"):e}function _o(e,t){return ht(e,-t)}var Y=class{constructor(t){if(this.absences=t,t.length===0)throw new Error("Absences array is empty");this.date=Z(this.absences[0].LessonDateTimeFrom),this.dateString=A(this.date,"yyyy-MM-dd"),this.studentId=this.absences[0].StudentRef.Id,this.studentFullName=this.absences[0].StudentFullName,this.studyClassNumber=this.absences[0].StudyClassNumber,this.lessonsCount=this.absences.length}};function ko(e,t){return e===null&&t===null||e!==null&&t!==null&&e.LessonRef.Id===t.LessonRef.Id&&e.EventDesignation===t.EventDesignation&&e.StudyClassNumber===t.StudyClassNumber&&e.TeacherInformation===t.TeacherInformation&&e.LessonDateTimeFrom.getTime()===t.LessonDateTimeFrom.getTime()&&e.LessonDateTimeTo.getTime()===t.LessonDateTimeTo.getTime()}function qn(e,t){return e?t.filter(n=>e.lessons.map(r=>r.LessonRef.Id).indexOf(n.LessonRef.Id)>=0).sort(Gn):[]}function Hn(e,t,n){return de(e.filter(r=>r.StudentRef.Id===t.StudentRef.Id&&r.LessonRef.From&&r.LessonRef.From.toDateString()===n?.LessonDateTimeFrom.toDateString()&&r.LessonRef.FromVn(e,o,n,r,i))}function Vn(e,t,n,r,i){let o=null;t.TypeRef.Id&&(o=n.find(g=>g.Id===t.TypeRef.Id)||null);let a=Hn(i,t,e),p;return t.ConfirmationStateId&&(p=r.find(g=>g.Key===t.ConfirmationStateId)),new fe(t,o,a,p)}function Nt(e,t){let n=e.LessonDateTimeFrom.getTime(),r=t.LessonDateTimeFrom.getTime();return n-r===0?e.LessonDateTimeTo.getTime()-t.LessonDateTimeTo.getTime():n-r}function Gn(e,t){return e.StudentFullName.localeCompare(t.StudentFullName)}function Qn(e,t){return e.LessonRef.From&&e.LessonRef.To&&t.LessonRef.From&&t.LessonRef.To?e.LessonRef.From.getTime()-t.LessonRef.From.getTime()===0?e.LessonRef.To.getTime()-t.LessonRef.To.getTime():e.LessonRef.From.getTime()-t.LessonRef.From.getTime():0}var _e=class extends Error{constructor(t,n){super(`TypeScript thought we could never end up here +import{d}from"./chunk-AW7CSGKI.js";import{a as lt}from"./chunk-FTDG26ID.js";import{a as ut,b as dt,c as mt}from"./chunk-SOHFFTKU.js";import{u as st,w as ct,z as Pe}from"./chunk-C56YGDXA.js";import{$ as re,$a as x,Ab as m,Ac as De,Ad as de,Bb as h,Bc as L,Cb as z,E as V,Eb as ke,Fc as it,Fd as at,G as ne,Ga as T,Gd as le,Hd as me,Ia as b,J as Ne,Ja as Ve,L as I,Mc as ot,N as W,O as Te,P as Be,Rb as Ze,Sa as l,Sb as et,Ta as f,Ua as Se,Va as U,Vb as tt,Vc as F,W as D,Wa as X,Wb as nt,Ya as oe,Z as k,_a as J,ab as Ge,bb as Qe,ca as je,cb as Ue,db as Xe,dc as ce,e as Ee,f as Ae,fb as Je,g as H,ga as qe,gb as Ke,ha as G,hb as ze,ia as Q,ib as ae,jb as _,k as We,kb as K,lb as C,m as u,mb as Ie,n as Re,q as $e,rc as ue,ta as He,tb as se,ua as c,va as ie,w as Ye,zc as rt}from"./chunk-XTHSYQMN.js";var pt=function(e){return function(t){return!e(t)}};function Jt(e){return!e}function Kt(e){return!!(e&&e.IsComment)}function zt(e){return!!(e&&e.IsIncident)}function pe(e){return!!(e&&(e.IsAbsence||e.IsDispensation||e.IsHalfDay))}function Ce(e,t){return!!(e&&t&&e.Id===t.absencePresenceTypeId)}function Oe(e,t){return!!(e&&t&&t===e.checkableAbsenceStateId)}function ft(e,t,n){return!!(Jt(t)&&e.ConfirmationStateId===null||Kt(t)||zt(t)||pe(t)&&e.ConfirmationStateId===n.unconfirmedAbsenceStateId||Oe(n,e.ConfirmationStateId))}function gr(e,t){return e?.IsAbsence?t.unconfirmedAbsenceStateId:null}var S=function(e){return e.Present="present",e.Unapproved="unapproved",e.Absent="absent",e}(S||{});function Zt(e){switch(e){case S.Absent:return"cancel";case S.Unapproved:return"help";default:return"check_circle"}}var fe=class{constructor(t,n,r,i){this.lessonPresence=t,this.presenceType=n,this.precedingAbsences=r,this.confirmationState=i,this.studentFullName=t.StudentFullName}get presenceCategory(){return Oe(this.settings,this.confirmationState&&Number(this.confirmationState.Key))?S.Unapproved:pe(this.presenceType)?S.Absent:S.Present}get nextPresenceCategory(){return this.presenceCategory===S.Absent?S.Present:S.Absent}getNextPresenceType(t){switch(this.nextPresenceCategory){case S.Absent:return this.presenceCategory===S.Unapproved?this.presenceType:t.find(n=>Ce(n,this.settings))||null;default:return null}}get canChangePresenceType(){return ft(this.lessonPresence,this.presenceType,this.settings)}get canChangeIncident(){return!pe(this.presenceType)}get showDesignation(){return!this.canChangePresenceType||this.presenceCategory===S.Absent&&!Ce(this.presenceType,this.settings)||this.presenceCategory===S.Unapproved}get presenceCategoryIcon(){return Zt(this.presenceCategory)}get settings(){return window.schulverwaltung.settings}};function v(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function ht(e,t){let n=d(e);return isNaN(t)?v(e,NaN):(t&&n.setDate(n.getDate()+t),n)}var en=Math.pow(10,8)*24*60*60*1e3,Sr=-en,he=6048e5,gt=864e5,Ir=6e4,kr=36e5,Dr=1e3;var tn=3600;var yt=tn*24,Pr=yt*7,nn=yt*365.2425,rn=nn/12,Cr=rn*3;var on={};function E(){return on}function O(e,t){let n=E(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=d(e),o=i.getDay(),a=(o=i.getTime()?n+1:t.getTime()>=a.getTime()?n:n-1}function Z(e){let t=d(e);return t.setHours(0,0,0,0),t}function Me(e){let t=d(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function ye(e,t){let n=Z(e),r=Z(t),i=+n-Me(n),o=+r-Me(r);return Math.round((i-o)/gt)}function bt(e){let t=ge(e),n=v(e,0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),R(n)}function xt(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _t(e){if(!xt(e)&&typeof e!="number")return!1;let t=d(e);return!isNaN(Number(t))}function wt(e){let t=d(e),n=v(e,0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}var an={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vt=(e,t,n)=>{let r,i=an[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function be(e){return(t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var sn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},cn={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},un={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Tt={date:be({formats:sn,defaultWidth:"full"}),time:be({formats:cn,defaultWidth:"full"}),dateTime:be({formats:un,defaultWidth:"full"})};var dn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},St=(e,t,n,r)=>dn[e];function B(e){return(t,n)=>{let r=n?.context?String(n.context):"standalone",i;if(r==="formatting"&&e.formattingValues){let a=e.defaultFormattingWidth||e.defaultWidth,p=n?.width?String(n.width):a;i=e.formattingValues[p]||e.formattingValues[a]}else{let a=e.defaultWidth,p=n?.width?String(n.width):e.defaultWidth;i=e.values[p]||e.values[a]}let o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}var ln={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mn={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},fn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},hn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yn=(e,t)=>{let n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},It={ordinalNumber:yn,era:B({values:ln,defaultWidth:"wide"}),quarter:B({values:mn,defaultWidth:"wide",argumentCallback:e=>e-1}),month:B({values:pn,defaultWidth:"wide"}),day:B({values:fn,defaultWidth:"wide"}),dayPeriod:B({values:hn,defaultWidth:"wide",formattingValues:gn,defaultFormattingWidth:"wide"})};function j(e){return(t,n={})=>{let r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;let a=o[0],p=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],g=Array.isArray(p)?xn(p,y=>y.test(a)):bn(p,y=>y.test(a)),P;P=e.valueCallback?e.valueCallback(g):g,P=n.valueCallback?n.valueCallback(P):P;let w=t.slice(a.length);return{value:P,rest:w}}}function bn(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function xn(e,t){for(let n=0;n{let r=t.match(e.matchPattern);if(!r)return null;let i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;let p=t.slice(i.length);return{value:a,rest:p}}}var _n=/^(\d+)(th|st|nd|rd)?/i,wn=/\d+/i,vn={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Tn={any:[/^b/i,/^(a|c)/i]},Sn={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},In={any:[/1/i,/2/i,/3/i,/4/i]},kn={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Dn={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Pn={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Cn={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},On={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Mn={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Dt={ordinalNumber:kt({matchPattern:_n,parsePattern:wn,valueCallback:e=>parseInt(e,10)}),era:j({matchPatterns:vn,defaultMatchWidth:"wide",parsePatterns:Tn,defaultParseWidth:"any"}),quarter:j({matchPatterns:Sn,defaultMatchWidth:"wide",parsePatterns:In,defaultParseWidth:"any",valueCallback:e=>e+1}),month:j({matchPatterns:kn,defaultMatchWidth:"wide",parsePatterns:Dn,defaultParseWidth:"any"}),day:j({matchPatterns:Pn,defaultMatchWidth:"wide",parsePatterns:Cn,defaultParseWidth:"any"}),dayPeriod:j({matchPatterns:On,defaultMatchWidth:"any",parsePatterns:Mn,defaultParseWidth:"any"})};var Le={code:"en-US",formatDistance:vt,formatLong:Tt,formatRelative:St,localize:It,match:Dt,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Pt(e){let t=d(e);return ye(t,wt(t))+1}function Ct(e){let t=d(e),n=+R(t)-+bt(t);return Math.round(n/he)+1}function xe(e,t){let n=d(e),r=n.getFullYear(),i=E(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=v(e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);let p=O(a,t),g=v(e,0);g.setFullYear(r,0,o),g.setHours(0,0,0,0);let P=O(g,t);return n.getTime()>=p.getTime()?r+1:n.getTime()>=P.getTime()?r:r-1}function Ot(e,t){let n=E(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=xe(e,t),o=v(e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),O(o,t)}function Mt(e,t){let n=d(e),r=+O(n,t)-+Ot(n,t);return Math.round(r/he)+1}function s(e,t){let n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}var M={y(e,t){let n=e.getFullYear(),r=n>0?n:1-n;return s(t==="yy"?r%100:r,t.length)},M(e,t){let n=e.getMonth();return t==="M"?String(n+1):s(n+1,2)},d(e,t){return s(e.getDate(),t.length)},a(e,t){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return s(e.getHours()%12||12,t.length)},H(e,t){return s(e.getHours(),t.length)},m(e,t){return s(e.getMinutes(),t.length)},s(e,t){return s(e.getSeconds(),t.length)},S(e,t){let n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return s(i,t.length)}};var q={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Fe={G:function(e,t,n){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){let r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return M.y(e,t)},Y:function(e,t,n,r){let i=xe(e,r),o=i>0?i:1-i;if(t==="YY"){let a=o%100;return s(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):s(o,t.length)},R:function(e,t){let n=ge(e);return s(n,t.length)},u:function(e,t){let n=e.getFullYear();return s(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){let r=e.getMonth();switch(t){case"M":case"MM":return M.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){let i=Mt(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):s(i,t.length)},I:function(e,t,n){let r=Ct(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):M.d(e,t)},D:function(e,t,n){let r=Pt(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,t.length)},E:function(e,t,n){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return s(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return s(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return s(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){let i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){let r=e.getHours(),i;switch(r===12?i=q.noon:r===0?i=q.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){let r=e.getHours(),i;switch(r>=17?i=q.evening:r>=12?i=q.afternoon:r>=4?i=q.morning:i=q.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return M.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):M.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):M.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):M.s(e,t)},S:function(e,t){return M.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ft(r);case"XXXX":case"XX":return $(r);case"XXXXX":case"XXX":default:return $(r,":")}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"x":return Ft(r);case"xxxx":case"xx":return $(r);case"xxxxx":case"xxx":default:return $(r,":")}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Lt(r,":");case"OOOO":default:return"GMT"+$(r,":")}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Lt(r,":");case"zzzz":default:return"GMT"+$(r,":")}},t:function(e,t,n){let r=Math.trunc(e.getTime()/1e3);return s(r,t.length)},T:function(e,t,n){let r=e.getTime();return s(r,t.length)}};function Lt(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+s(o,2)}function Ft(e,t){return e%60===0?(e>0?"-":"+")+s(Math.abs(e)/60,2):$(e,t)}function $(e,t=""){let n=e>0?"-":"+",r=Math.abs(e),i=s(Math.trunc(r/60),2),o=s(r%60,2);return n+i+t+o}var Et=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},At=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ln=(e,t)=>{let n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Et(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Et(r,t)).replace("{{time}}",At(i,t))},Wt={p:At,P:Ln};var Fn=/^D+$/,En=/^Y+$/,An=["D","DD","YY","YYYY"];function Rt(e){return Fn.test(e)}function $t(e){return En.test(e)}function Yt(e,t,n){let r=Wn(e,t,n);if(console.warn(r),An.includes(e))throw new RangeError(r)}function Wn(e,t,n){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Rn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,$n=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yn=/^'([^]*?)'?$/,Nn=/''/g,Bn=/[a-zA-Z]/;function A(e,t,n){let r=E(),i=n?.locale??r.locale??Le,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,p=d(e);if(!_t(p))throw new RangeError("Invalid time value");let g=t.match($n).map(w=>{let y=w[0];if(y==="p"||y==="P"){let ve=Wt[y];return ve(w,i.formatLong)}return w}).join("").match(Rn).map(w=>{if(w==="''")return{isToken:!1,value:"'"};let y=w[0];if(y==="'")return{isToken:!1,value:jn(w)};if(Fe[y])return{isToken:!0,value:w};if(y.match(Bn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return{isToken:!1,value:w}});i.localize.preprocessor&&(g=i.localize.preprocessor(p,g));let P={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return g.map(w=>{if(!w.isToken)return w.value;let y=w.value;(!n?.useAdditionalWeekYearTokens&&$t(y)||!n?.useAdditionalDayOfYearTokens&&Rt(y))&&Yt(y,t,String(e));let ve=Fe[y[0]];return ve(p,y,i.localize,P)}).join("")}function jn(e){let t=e.match(Yn);return t?t[1].replace(Nn,"'"):e}function _o(e,t){return ht(e,-t)}var Y=class{constructor(t){if(this.absences=t,t.length===0)throw new Error("Absences array is empty");this.date=Z(this.absences[0].LessonDateTimeFrom),this.dateString=A(this.date,"yyyy-MM-dd"),this.studentId=this.absences[0].StudentRef.Id,this.studentFullName=this.absences[0].StudentFullName,this.studyClassNumber=this.absences[0].StudyClassNumber,this.lessonsCount=this.absences.length}};function ko(e,t){return e===null&&t===null||e!==null&&t!==null&&e.LessonRef.Id===t.LessonRef.Id&&e.EventDesignation===t.EventDesignation&&e.StudyClassNumber===t.StudyClassNumber&&e.TeacherInformation===t.TeacherInformation&&e.LessonDateTimeFrom.getTime()===t.LessonDateTimeFrom.getTime()&&e.LessonDateTimeTo.getTime()===t.LessonDateTimeTo.getTime()}function qn(e,t){return e?t.filter(n=>e.lessons.map(r=>r.LessonRef.Id).indexOf(n.LessonRef.Id)>=0).sort(Gn):[]}function Hn(e,t,n){return de(e.filter(r=>r.StudentRef.Id===t.StudentRef.Id&&r.LessonRef.From&&r.LessonRef.From.toDateString()===n?.LessonDateTimeFrom.toDateString()&&r.LessonRef.FromVn(e,o,n,r,i))}function Vn(e,t,n,r,i){let o=null;t.TypeRef.Id&&(o=n.find(g=>g.Id===t.TypeRef.Id)||null);let a=Hn(i,t,e),p;return t.ConfirmationStateId&&(p=r.find(g=>g.Key===t.ConfirmationStateId)),new fe(t,o,a,p)}function Nt(e,t){let n=e.LessonDateTimeFrom.getTime(),r=t.LessonDateTimeFrom.getTime();return n-r===0?e.LessonDateTimeTo.getTime()-t.LessonDateTimeTo.getTime():n-r}function Gn(e,t){return e.StudentFullName.localeCompare(t.StudentFullName)}function Qn(e,t){return e.LessonRef.From&&e.LessonRef.To&&t.LessonRef.From&&t.LessonRef.To?e.LessonRef.From.getTime()-t.LessonRef.From.getTime()===0?e.LessonRef.To.getTime()-t.LessonRef.To.getTime():e.LessonRef.From.getTime()-t.LessonRef.From.getTime():0}var _e=class extends Error{constructor(t,n){super(`TypeScript thought we could never end up here ${n}`)}};function Ao(e){let t=Xn(e);return Object.keys(t).reduce((n,r)=>(Object.keys(t[r]).forEach(i=>{n=[...n,new Y(t[r][i].sort(Nt))]}),n),[])}function Wo(e,t){return[...e].sort(Un(t))}function we(e){return e.reduce((t,n)=>t.concat(n.absences),[])}function Ro(e,t){return e.filter(n=>!t.some(({lessonIds:r,personId:i})=>r.includes(n.LessonRef.Id)&&i===n.StudentRef.Id))}function $o(e,t){return de([...e,...t],"Id")}function Un(e){return(t,n)=>{switch(e.primarySortKey){case"date":{let r=t.date.getTime(),i=n.date.getTime();return r===i?t.studentFullName.localeCompare(n.studentFullName):e.ascending?r-i:i-r}case"name":{let r=e.ascending?t.studentFullName.localeCompare(n.studentFullName):n.studentFullName.localeCompare(t.studentFullName);return r===0?n.date.getTime()-t.date.getTime():r}default:throw new _e(e.primarySortKey,"Unhandled sort criteria")}}}function Xn(e){return e.reduce((t,n)=>{let r=A(n.LessonDateTimeFrom,"yyyy-MM-dd"),i=n.StudentRef.Id;return t[r]||(t[r]={}),t[r][i]||(t[r][i]=[]),t[r][i].push(n),t},{})}var ee=function(e){return e.ToggleSelection="TOGGLE",e.ClearSelection="CLEAR",e}(ee||{}),Bt=(()=>{let t=class t{constructor(){this.action$=new Ee,this.selection$=$e(this.action$.pipe(Ne(this.reduceSelection.bind(this),[]),W([])),{connector:()=>new H(1)}),this.selectionSub=this.selection$.connect()}ngOnDestroy(){this.selectionSub.unsubscribe()}toggle(r){this.action$.next({type:ee.ToggleSelection,payload:r})}clear(r=null){this.action$.next({type:ee.ClearSelection,payload:r})}isSelected$(r){return this.selection$.pipe(u(i=>i.includes(r)),ne())}reduceSelection(r,i){switch(i.type){case ee.ToggleSelection:return r.includes(i.payload)?r.filter(o=>o!==i.payload):[...r,i.payload];case ee.ClearSelection:return i.payload||[];default:return r}}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=D({token:t,factory:t.\u0275fac});let e=t;return e})();function Ho(e){let t=e.reduce((n,r)=>(n[r.StudentRef.Id]||(n[r.StudentRef.Id]=[]),n[r.StudentRef.Id].push(r.LessonRef.Id),n),{});return Object.keys(t).map(n=>({personIds:[Number(n)],lessonIds:t[n]}))}function jt(e){let t={};return e.forEach(n=>{t[n.StudentRef.Id]||(t[n.StudentRef.Id]={}),t[n.StudentRef.Id][String(n.TypeRef.Id)]||(t[n.StudentRef.Id][String(n.TypeRef.Id)]=[]),t[n.StudentRef.Id][String(n.TypeRef.Id)].push(n.LessonRef.Id)}),Object.keys(t).reduce((n,r)=>[...n,...Object.keys(t[r]).map(i=>({personId:Number(r),presenceTypeId:i==="null"?null:Number(i),lessonIds:t[r][String(i)]}))],[])}function Vo(e){return e.slice().sort((t,n)=>t.LessonDateTimeFrom.getTime()-n.LessonDateTimeFrom.getTime())}function Go(e){return`${e.EventDesignation}, ${A(e.LessonDateTimeFrom,"dd.MM.yyyy")}, ${A(e.LessonDateTimeFrom,"HH:mm")}-${A(e.LessonDateTimeTo,"HH:mm")}`}var na=(()=>{let t=class t extends Bt{constructor(r){super(),this.settings=r,this.selectedIds$=this.selection$.pipe(u(te),u(({openAbsencesEntries:i,lessonPresences:o})=>jt([...we(i),...o])),I(1)),this.selectedLessons$=this.selection$.pipe(u(te),u(({openAbsencesEntries:i,lessonPresences:o})=>[...we(i),...o]),I(1)),this.selectedWithoutPresenceType$=this.selection$.pipe(u(te),u(({openAbsencesEntries:i,lessonPresences:o})=>[...we(i),...o].filter(a=>a.TypeRef.Id===this.settings.absencePresenceTypeId)))}clearNonOpenAbsencesEntries(){this.selection$.pipe(V(1),u(te)).subscribe(({openAbsencesEntries:r})=>this.clear(r))}clearNonLessonPresences(){this.selection$.pipe(V(1),u(te)).subscribe(({lessonPresences:r})=>this.clear(r))}};t.\u0275fac=function(i){return new(i||t)(k(F))},t.\u0275prov=D({token:t,factory:t.\u0275fac});let e=t;return e})();function te(e){return{openAbsencesEntries:e.filter(Pe(Y)),lessonPresences:e.filter(pt(Pe(Y)))}}function qt(e){return e.slice().sort((t,n)=>t.Sort-n.Sort)}function ia(e){return e.map(t=>({Key:t.Id,Value:t.Designation||""}))}function oa(e,t){return e.map(n=>Object.assign(n,{Group:t}))}var Ht=it({Id:De,Active:L,Designation:ot(rt),IsAbsence:L,IsComment:L,IsDispensation:L,IsIncident:L,IsHalfDay:L,NeedsConfirmation:L,Sort:De});var Vt=(()=>{let t=class t extends dt{constructor(r,i){super(r,i,Ht,"PresenceTypes")}};t.\u0275fac=function(i){return new(i||t)(k(ce),k(F))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Gt=(()=>{let t=class t{constructor(r,i){this.restService=r,this.settings=i,this.presenceTypes$=this.loadPresenceTypes().pipe(I(1)),this.activePresenceTypes$=this.presenceTypes$.pipe(u(this.filterActiveTypes.bind(this)),I(1)),this.confirmationTypes$=this.presenceTypes$.pipe(u(this.filterConfirmationTypes.bind(this)),I(1)),this.incidentTypes$=this.presenceTypes$.pipe(u(this.filterIncidentTypes.bind(this)),I(1)),this.displayedTypes$=this.presenceTypes$.pipe(u(this.filterDisplayedTypes.bind(this)),I(1)),this.halfDayActive$=this.presenceTypes$.pipe(u(this.isHalfDayActive.bind(this)),W(!1),ne(),I(1))}getPresenceType(r){return this.presenceTypes$.pipe(u(i=>{let o=i.find(a=>a.Id===r);if(!o)throw new Error("presence type not found");return o}))}loadPresenceTypes(){return this.restService.getList().pipe(u(qt))}filterActiveTypes(r){return r.filter(i=>i.Active)}filterConfirmationTypes(r){return r.filter(i=>i.NeedsConfirmation&&i.Active&&i.Id!==this.settings.absencePresenceTypeId)}filterIncidentTypes(r){return r.filter(i=>i.IsIncident&&i.Active)}filterDisplayedTypes(r){return r.filter(i=>i.Id!==this.settings.absencePresenceTypeId)}isHalfDayActive(r){return!!r.find(i=>i.Id===this.settings.halfDayPresenceTypeId)?.Active}};t.\u0275fac=function(i){return new(i||t)(k(Vt),k(F))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var ba=(()=>{let t=class t{constructor(r,i){this.http=r,this.settings=i}editLessonPresences(r,i,o,a,p){let g={LessonIds:r,PersonIds:i};return o!==void 0&&(g.PresenceTypeId=o),a!==void 0&&(g.ConfirmationValue=a),this.http.put(`${this.settings.apiUrl}/LessonPresences/Edit`,g,p).pipe(u(()=>{}))}removeLessonPresences(r,i,o){return this.http.put(`${this.settings.apiUrl}/LessonPresences/Reset`,{LessonIds:r,PersonIds:i,WithComment:!0},o).pipe(u(()=>{}))}confirmLessonPresences(r,i,o,a){let p={LessonIds:r,PersonIds:i,AbsenceTypeId:o,ConfirmationValue:a};return this.http.put(`${this.settings.apiUrl}/LessonAbsences/Confirm`,p).pipe(u(()=>{}))}};t.\u0275fac=function(i){return new(i||t)(k(ce),k(F))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ut=(()=>{let t=class t{constructor(r){this.translate=r}transform(r){if(!r)return"";let i=ye(r,new Date);return this.translate.instant(`shared.daysDifference.${this.getKey(i)}`,{count:Math.abs(i)})}getKey(r){return r===0?"today":r===1?"tomorrow":r===-1?"yesterday":r>0?"in":"ago"}};t.\u0275fac=function(i){return new(i||t)(ie(at,16))},t.\u0275pipe=je({name:"bkdDaysDifference",type:t,pure:!0,standalone:!0});let e=t;return e})();function va(e){return e.length===0}function Xt(e){return Array.isArray(e)}var Zn=["checkbox"];function er(e,t){if(e&1&&Se(0,"bkd-reports-link",17),e&2){let n=x(4);b("reports",n.reports)("disableIfUnavailable",!0)}}function tr(e,t){if(e&1&&(l(0,"a",18),m(1,"async"),l(2,"i",13),_(3,"mail"),f()()),e&2){let n=x(4);Xe("href","mailto:",h(1,2,n.mailTo$),"",He)}}function nr(e,t){if(e&1&&(l(0,"div",19),_(1),f()),e&2){let n=x(4);c(),C(" ",n.defaultAbsenceSelectionMessage," ")}}function rr(e,t){if(e&1){let n=oe();l(0,"div",7),J("click",function(i){G(n);let o=ae(3),a=x(3);return Q(a.onRowClick(i,o))}),l(1,"div",8)(2,"input",9,2),m(4,"async"),J("change",function(i){G(n);let o=x(3);return Q(o.toggleAll(i.target==null?null:i.target.checked))}),f()(),l(5,"div",10),_(6),m(7,"translate"),f(),l(8,"div",11)(9,"a",12),m(10,"async"),l(11,"i",13),_(12,"edit"),f()(),T(13,er,1,2,"bkd-reports-link",14)(14,tr,4,4,"a",15),f(),T(15,nr,2,1,"div",16),m(16,"async"),f()}if(e&2){let n,r,i=x(3);c(2),b("checked",h(4,8,i.allSelected$)),c(4),K(h(7,10,"open-absences.detail.all")),c(3),Ve("disabled",((n=h(10,12,i.selectionService==null?null:i.selectionService.selection$))==null?null:n.length)===0),Ue("routerLink",i.confirmLink),c(4),b("ngIf",i.reports),c(),b("ngIf",i.displayEmail),c(),b("ngIf",i.defaultAbsenceSelectionMessage&&((r=h(16,14,i.selectionService==null?null:i.selectionService.selectedWithoutPresenceType$))==null?null:r.length)||!1)}}function ir(e,t){if(e&1){let n=oe();l(0,"div",8)(1,"input",9,3),m(3,"async"),J("change",function(){G(n);let i=x().$implicit,o=x(3);return Q(o.selectionService==null?null:o.selectionService.toggle(i))}),f()()}if(e&2){let n=x().$implicit,r=x(3);c(),b("checked",h(3,1,r.selectionService==null?null:r.selectionService.isSelected$(n)))}}function or(e,t){if(e&1&&(U(0),_(1),X()),e&2){let n=x().$implicit;c(),C(", ",n.StudyClassNumber,"")}}function ar(e,t){if(e&1&&(l(0,"div",32),_(1),f()),e&2){let n=x().bkdLet;c(),C(" ",n," ")}}function sr(e,t){e&1&&(l(0,"div",33),_(1),m(2,"translate"),f()),e&2&&(c(),C(" ",h(2,1,"my-absences.show.confirm-presence-type")," "))}function cr(e,t){if(e&1&&(U(0),T(1,ar,2,1,"div",30)(2,sr,3,3,"div",31),X()),e&2){let n=t.bkdLet,r=x(4);c(),b("ngIf",n),c(),b("ngIf",r.displayPresenceType&&!n&&r.defaultAbsenceSelectionMessage)}}function ur(e,t){if(e&1){let n=oe();l(0,"div",20),J("click",function(i){let o=G(n).index,a=x(3);return Q(a.onRowClick(i,o))}),T(1,ir,4,3,"div",21),m(2,"async"),l(3,"div",22),_(4),T(5,or,2,1,"ng-container",23),f(),l(6,"div",24),_(7),m(8,"date"),m(9,"date"),f(),l(10,"div",25),_(11),f(),T(12,cr,3,2,"ng-container",26),m(13,"async"),l(14,"div",27),_(15),m(16,"date"),f(),l(17,"div",28),_(18),m(19,"bkdDaysDifference"),f(),l(20,"div",29),_(21),m(22,"date"),m(23,"bkdDaysDifference"),f()()}if(e&2){let n=t.$implicit,r=x(3);c(),b("ngIf",h(2,11,r.editable$)),c(3),C(" ",n.EventDesignation,""),c(),b("ngIf",n.StudyClassNumber),c(2),Ie(" ",z(8,13,n.LessonDateTimeFrom,"HH:mm"),"\u2013",z(9,16,n.LessonDateTimeTo,"HH:mm")," "),c(4),C(" ",n.TeacherInformation," "),c(),b("bkdLet",h(13,19,r.getPresenceTypeDesignation(n))),c(3),C(" ",z(16,21,n.LessonDateTimeFrom,"dd.MM.yyyy")," "),c(3),C(" ",h(19,24,n.LessonDateTimeFrom)," "),c(3),Ie(" ",z(22,26,n.LessonDateTimeFrom,"dd.MM.yyyy"),", ",h(23,29,n.LessonDateTimeFrom)," ")}}function dr(e,t){if(e&1&&(U(0),T(1,rr,17,16,"div",5),m(2,"async"),T(3,ur,24,31,"div",6),m(4,"async"),X()),e&2){let n=x(2);c(),b("ngIf",h(2,2,n.editable$)),c(2),b("ngForOf",h(4,4,n.lessonPresences$))}}function lr(e,t){e&1&&(l(0,"p",34),_(1),m(2,"translate"),f()),e&2&&(c(),K(h(2,1,"shared.profile.no-absences")))}function mr(e,t){if(e&1&&(U(0),T(1,dr,5,6,"ng-container",4),m(2,"async"),T(3,lr,3,3,"ng-template",null,1,ke),X()),e&2){let n,r=ae(4),i=x();c(),b("ngIf",((n=(n=h(2,2,i.lessonPresences$))==null?null:n.length)!==null&&n!==void 0?n:0)>0)("ngIfElse",r)}}function pr(e,t){e&1&&Se(0,"bkd-spinner",35)}var Aa=(()=>{let t=class t{constructor(r){this.presenceTypesService=r,this.selectionService=null,this.displayPresenceType=!0,this.defaultAbsenceSelectionMessage=null,this.reports=null,this.confirmLink="confirm",this.displayEmail=!1,this.lessonPresences$$=new H(1),this.lessonPresences$=this.lessonPresences$$.pipe(Be(),W(null),I(1)),this.loading$=this.lessonPresences$.pipe(u(ct(Xt))),this.selectionService$=new H(1),this.editable$=this.selectionService$.pipe(u(()=>!0),W(!1)),this.displayPresenceType$=new Ae(!0),this.allSelected$=Re([this.lessonPresences$.pipe(Ye(st)),this.selectionService$.pipe(Te(i=>i.selection$))]).pipe(u(([i,o])=>i.length===o.length))}ngOnChanges(r){r.absences$&&this.lessonPresences$$.next(r.absences$.currentValue),r.selectionService&&r.selectionService.currentValue&&(r.selectionService.currentValue.clear(),this.selectionService$.next(r.selectionService.currentValue)),r.displayPresenceType&&this.displayPresenceType$.next(r.displayPresenceType.currentValue)}toggleAll(r){r?this.lessonPresences$.pipe(V(1)).subscribe(i=>this.selectionService?.clear(i)):this.selectionService?.clear()}onRowClick(r,i){if(this.checkboxes.length===0)return;let o;typeof i=="number"?o=this.checkboxes.toArray()[i].nativeElement:o=i,r.target!==o&&!r.target.closest(".buttons")&&o.click()}getPresenceTypeDesignation(r){return this.displayPresenceType$.pipe(Te(i=>i?this.presenceTypesService.displayedTypes$:We([])),u(i=>r.TypeRef.Id&&i.find(o=>o.Id===r.TypeRef.Id)?.Designation||null))}};t.\u0275fac=function(i){return new(i||t)(ie(Gt))},t.\u0275cmp=re({type:t,selectors:[["bkd-student-dossier-absences"]],viewQuery:function(i,o){if(i&1&&Je(Zn,5),i&2){let a;Ke(a=ze())&&(o.checkboxes=a)}},inputs:{absences$:"absences$",selectionService:"selectionService",displayPresenceType:"displayPresenceType",defaultAbsenceSelectionMessage:"defaultAbsenceSelectionMessage",reports:"reports",confirmLink:"confirmLink",displayEmail:"displayEmail",mailTo$:"mailTo$"},standalone:!0,features:[qe,se],decls:4,vars:4,consts:[["loading",""],["noAbsences",""],["allCheckbox",""],["checkbox",""],[4,"ngIf","ngIfElse"],["class","absence-all",3,"click",4,"ngIf"],["class","absence-entry",3,"click",4,"ngFor","ngForOf"],[1,"absence-all",3,"click"],[1,"checkbox"],["type","checkbox",1,"form-check-input",3,"change","checked"],[1,"all"],[1,"buttons"],[1,"edit","btn","btn-primary","btn-icon","me-2",3,"routerLink"],[1,"material-icons"],["class","me-2",3,"reports","disableIfUnavailable",4,"ngIf"],["class","mail btn btn-primary btn-icon me-2","target","_blank",3,"href",4,"ngIf"],["class","validation",4,"ngIf"],[1,"me-2",3,"reports","disableIfUnavailable"],["target","_blank",1,"mail","btn","btn-primary","btn-icon","me-2",3,"href"],[1,"validation"],[1,"absence-entry",3,"click"],["class","checkbox",4,"ngIf"],[1,"lesson-class"],[4,"ngIf"],[1,"time","pe-2"],[1,"teacher"],[4,"bkdLet"],[1,"date"],[1,"days-ago"],[1,"date-days-ago"],["class","presence-type",4,"ngIf"],["class","presence-type confirm",4,"ngIf"],[1,"presence-type"],[1,"presence-type","confirm"],[1,"mx-3"],[1,"inline","d-block","mb-3"]],template:function(i,o){if(i&1&&(T(0,mr,5,4,"ng-container",4),m(1,"async"),T(2,pr,1,0,"ng-template",null,0,ke)),i&2){let a=ae(3);b("ngIf",h(1,2,o.loading$)===!1)("ngIfElse",a)}},dependencies:[et,ue,lt,Ze,ut,mt,tt,nt,me,le,Ut],styles:['.absence-all[_ngcontent-%COMP%]{padding:0 0 .5rem 1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox all buttons" "validation validation validation";grid-template-columns:min-content 1fr min-content}.absence-entry[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid #dee2e6;display:grid;grid-template-areas:"checkbox lesson-class time teacher" "checkbox presence-type date days-ago";grid-template-columns:min-content 2fr 1fr 2fr}.absence-entry[_ngcontent-%COMP%]:first-child{padding-top:0}.absence-all[_ngcontent-%COMP%] + .absence-entry[_ngcontent-%COMP%]{padding-top:1rem}.checkbox[_ngcontent-%COMP%]{grid-area:checkbox;margin:0;padding:.3rem 1rem 0 0}.checkbox[_ngcontent-%COMP%] input.form-check-input[_ngcontent-%COMP%]{position:static!important;margin:0!important;display:block}.all[_ngcontent-%COMP%]{grid-area:all}.buttons[_ngcontent-%COMP%]{grid-area:buttons;display:flex}.validation[_ngcontent-%COMP%]{grid-area:validation}.validation[_ngcontent-%COMP%], .presence-type.confirm[_ngcontent-%COMP%]{color:#ea161f}.lesson-class[_ngcontent-%COMP%]{grid-area:lesson-class;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.time[_ngcontent-%COMP%]{grid-area:time}.teacher[_ngcontent-%COMP%]{grid-area:teacher}.presence-type[_ngcontent-%COMP%]{color:#adb5bd;grid-area:presence-type}.date[_ngcontent-%COMP%]{grid-area:date}.days-ago[_ngcontent-%COMP%]{color:#adb5bd;grid-area:days-ago}.date-days-ago[_ngcontent-%COMP%]{grid-area:date-days-ago;display:none}@media (max-width: 750px){.absence-entry[_ngcontent-%COMP%]{grid-template-areas:"checkbox lesson-class" "checkbox teacher" "checkbox date-days-ago" "checkbox time" "checkbox presence-type";grid-template-columns:min-content 1fr}.date-days-ago[_ngcontent-%COMP%]{display:block}.date[_ngcontent-%COMP%], .days-ago[_ngcontent-%COMP%]{display:none}}'],changeDetection:0});let e=t;return e})();var fr=["*"],Ya=(()=>{let t=class t{constructor(){this.link=[]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=re({type:t,selectors:[["bkd-backlink"]],inputs:{link:"link",params:"params"},standalone:!0,features:[se],ngContentSelectors:fr,decls:8,vars:5,consts:[[1,"d-flex","align-items-start","justify-content-between","w-100","mb-3"],[3,"routerLink","queryParams"],[1,"material-icons"],[1,"label"]],template:function(i,o){i&1&&(Ge(),l(0,"div",0)(1,"a",1)(2,"span",2),_(3,"arrow_back"),f(),l(4,"span",3),_(5),m(6,"translate"),f()(),Qe(7),f()),i&2&&(c(),b("routerLink",o.link)("queryParams",o.params),c(4),K(h(6,3,"global.back")))},dependencies:[ue,me,le],styles:["[_nghost-%COMP%]{display:flex}[_nghost-%COMP%] > div[_ngcontent-%COMP%]{height:calc(var(--bs-body-font-size) * var(--bs-body-line-height))}a[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.3rem}a[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:hover, a[_ngcontent-%COMP%]:focus{text-decoration:none}a[_ngcontent-%COMP%]:hover .label[_ngcontent-%COMP%], a[_ngcontent-%COMP%]:focus .label[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-color:#ea161f}"]});let e=t;return e})();export{pt as a,v as b,ht as c,Ir as d,kr as e,Dr as f,E as g,O as h,R as i,Z as j,Me as k,Le as l,Ct as m,xe as n,Mt as o,Wt as p,Rt as q,$t as r,Yt as s,A as t,_o as u,Kt as v,zt as w,pe as x,ft as y,gr as z,S as A,Zt as B,fe as C,ko as D,Do as E,Vn as F,Nt as G,Ao as H,Wo as I,Ro as J,$o as K,Bt as L,Ho as M,Vo as N,Go as O,na as P,qt as Q,ia as R,oa as S,Gt as T,ba as U,Ut as V,va as W,Aa as X,Ya as Y}; diff --git a/public/apps/webapp-schulverwaltung/chunk-IA3IH2MK.js b/public/apps/webapp-schulverwaltung/chunk-ZROJU7EX.js similarity index 81% rename from public/apps/webapp-schulverwaltung/chunk-IA3IH2MK.js rename to public/apps/webapp-schulverwaltung/chunk-ZROJU7EX.js index a8116b42..9d27a4a2 100644 --- a/public/apps/webapp-schulverwaltung/chunk-IA3IH2MK.js +++ b/public/apps/webapp-schulverwaltung/chunk-ZROJU7EX.js @@ -1 +1 @@ -import{C as u}from"./chunk-GI4AZI25.js";function l(e,n,i){return e.map(t=>{let r=null;t.TypeRef.Id&&(r=n.find(f=>f.Id===t.TypeRef.Id)||null);let o;return t.ConfirmationStateId&&(o=i.find(f=>f.Key===t.ConfirmationStateId)),new u(t,r,null,o)})}function p(e,n,i){return e?n.filter(t=>i.find(r=>r===t.lessonPresence.StudentRef.Id)):n}export{l as a,p as b}; +import{C as u}from"./chunk-ZK2MNT7Z.js";function l(e,n,i){return e.map(t=>{let r=null;t.TypeRef.Id&&(r=n.find(f=>f.Id===t.TypeRef.Id)||null);let o;return t.ConfirmationStateId&&(o=i.find(f=>f.Key===t.ConfirmationStateId)),new u(t,r,null,o)})}function p(e,n,i){return e?n.filter(t=>i.find(r=>r===t.lessonPresence.StudentRef.Id)):n}export{l as a,p as b}; diff --git a/public/apps/webapp-schulverwaltung/index.html b/public/apps/webapp-schulverwaltung/index.html index 645c1e96..524264c8 100644 --- a/public/apps/webapp-schulverwaltung/index.html +++ b/public/apps/webapp-schulverwaltung/index.html @@ -14,5 +14,5 @@ - + diff --git a/public/apps/webapp-schulverwaltung/main.js b/public/apps/webapp-schulverwaltung/main.js index 4daae9e2..ffbb55aa 100644 --- a/public/apps/webapp-schulverwaltung/main.js +++ b/public/apps/webapp-schulverwaltung/main.js @@ -1 +1 @@ -import{b as Ps}from"./chunk-HHGALFFJ.js";import{c as Ms}from"./chunk-DMYOU5OM.js";import{a as ws,b as As}from"./chunk-RWNJF4OZ.js";import{r as _s}from"./chunk-FTRAQKUW.js";import{a as _e}from"./chunk-3AROKYRB.js";import{$ as J,$a as ot,A as Ht,Aa as Zt,Ba as ke,Bb as ge,Cb as ye,Dd as Es,Fd as vs,Ga as be,Gd as Ts,Hd as $e,Ia as oe,Id as Se,Jd as bs,Ka as es,Mb as ns,Qb as lt,Sa as U,Sb as Ie,Ta as Y,Tb as rs,U as v,Ua as ts,Vc as ys,W,Wb as os,Wc as Z,Y as Gt,Ya as ss,Z as j,_ as H,_a as is,a as Re,c as Qt,da as xt,dc as as,ec as ls,fc as cs,gc as us,ha as Wt,hc as hs,ia as Jt,ic as ds,j as Vt,jb as ae,kb as at,lb as Oe,oa as Yt,qc as fs,rc as Le,sa as rt,sc as ms,tb as X,ua as q,uc as ps,va as re,vc as gs,wd as Ss,ya as Xt}from"./chunk-T7QWSMKM.js";function Ei(n){let e=n,t=Math.floor(Math.abs(n)),s=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&s===0?1:5}var Ds=["de-CH",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So","Mo","Di","Mi","Do","Fr","Sa"]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[".","\u2019",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00;\xA4-#,##0.00","#E0"],"CHF","CHF","Schweizer Franken",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],EUR:[],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",Ei];function vi(n){let e=n,t=Math.floor(Math.abs(n)),s=n.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(n.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:i===0&&t!==0&&t%1e6===0&&s===0||!(i>=0&&i<=5)?4:5}var Ns=["fr-CH",[["AM","PM"],void 0,void 0],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd.MM.yy","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH.mm:ss 'h' zzzz"],["{1} {0}","{1}, {0}","{1} '\xE0' {0}",void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":","."],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"CHF","CHF","franc suisse",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",vi];function Ti(n,e){if(n&1&&(U(0,"i",4),ae(1),Y()),n&2){let t=ot().$implicit;q(),at(t.icon)}}function bi(n,e){if(n&1){let t=ss();U(0,"ngb-toast",1),is("hidden",function(){let i=Wt(t).$implicit,r=ot();return Jt(r.toastService.remove(i))}),U(1,"div",2),be(2,Ti,2,1,"i",3),U(3,"span"),ae(4),Y()()()}if(n&2){let t=e.$implicit;es(t.classname),oe("header",t.header||"")("autohide",!0),q(2),oe("ngIf",t.icon),q(2),at(t.message)}}var Fs=(()=>{let e=class e{constructor(s){this.toastService=s}};e.\u0275fac=function(i){return new(i||e)(re(_e))},e.\u0275cmp=J({type:e,selectors:[["bkd-toast"]],standalone:!0,features:[X],decls:2,vars:3,consts:[[3,"header","class","autohide","hidden",4,"ngFor","ngForOf"],[3,"hidden","header","autohide"],[1,"d-flex","gap-2"],["class","material-icons",4,"ngIf"],[1,"material-icons"]],template:function(i,r){i&1&&(be(0,bi,5,6,"ngb-toast",0),ge(1,"async")),i&2&&oe("ngForOf",ye(1,1,r.toastService.toasts$))},dependencies:[Ie,_s,rs,os],styles:["[_nghost-%COMP%]{position:fixed;top:0;right:0;margin:.5em;z-index:1200}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{font-size:medium}"]});let n=e;return n})();var Rs=new Gt("Navigator API",{providedIn:"root",factory:()=>navigator});var ks=(()=>{let e=class e{constructor(s,i,r,o){this.toastService=i,this.settings=r,this.navigator=o,s.initialize(),this.checkSettings()}checkSettings(){Es(ys)(this.settings).pipe(Ht(s=>(console.error(String(s)),this.toastService.error("Please check the contents of the settings.js file (see Console output for more details).","Invalid Settings"),Vt))).subscribe()}};e.\u0275fac=function(i){return new(i||e)(re(As),re(_e),re(Z),re(Rs))},e.\u0275cmp=J({type:e,selectors:[["bkd-app"]],standalone:!0,features:[X],decls:2,vars:0,consts:[["aria-live","polite","aria-atomic","true"]],template:function(i,r){i&1&&ts(0,"bkd-toast",0)(1,"router-outlet")},dependencies:[Fs,fs],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0});let n=e;return n})();var _=function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n}(_||{}),Q="*";function Os(n,e=null){return{type:_.Sequence,steps:n,options:e}}function ct(n){return{type:_.Style,styles:n,offset:null}}var ee=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},we=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,s=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++s==r&&this._onDestroy()}),o.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(s=>{let i=s.totalTime?Math.min(1,t/s.totalTime):1;s.setPosition(i)})}getPosition(){let e=this.players.reduce((t,s)=>t===null||s.totalTime>t.totalTime?s:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},ze="!";function Is(n){return new v(3e3,!1)}function wi(){return new v(3100,!1)}function Ai(){return new v(3101,!1)}function Mi(n){return new v(3001,!1)}function Pi(n){return new v(3003,!1)}function Di(n){return new v(3004,!1)}function Ni(n,e){return new v(3005,!1)}function Ci(){return new v(3006,!1)}function Fi(){return new v(3007,!1)}function Ri(n,e){return new v(3008,!1)}function ki(n){return new v(3002,!1)}function Oi(n,e,t,s,i){return new v(3010,!1)}function Ii(){return new v(3011,!1)}function Li(){return new v(3012,!1)}function $i(){return new v(3200,!1)}function zi(){return new v(3202,!1)}function Bi(){return new v(3013,!1)}function Ki(n){return new v(3014,!1)}function ji(n){return new v(3015,!1)}function qi(n){return new v(3016,!1)}function Ui(n,e){return new v(3404,!1)}function Qi(n){return new v(3502,!1)}function Vi(n){return new v(3503,!1)}function Hi(){return new v(3300,!1)}function Gi(n){return new v(3504,!1)}function xi(n){return new v(3301,!1)}function Wi(n,e){return new v(3302,!1)}function Ji(n){return new v(3303,!1)}function Yi(n,e){return new v(3400,!1)}function Xi(n){return new v(3401,!1)}function Zi(n){return new v(3402,!1)}function en(n,e){return new v(3505,!1)}function te(n){switch(n.length){case 0:return new ee;case 1:return n[0];default:return new we(n)}}function Ws(n,e,t=new Map,s=new Map){let i=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((S,y)=>{let f=y,g=S;if(y!=="offset")switch(f=n.normalizePropertyName(f,i),g){case ze:g=t.get(y);break;case Q:g=s.get(y);break;default:g=n.normalizeStyleValue(y,f,g,i);break}u.set(f,g)}),h||r.push(u),a=u,o=c}),i.length)throw Qi(i);return r}function Rt(n,e,t,s){switch(e){case"start":n.onStart(()=>s(t&&ut(t,"start",n)));break;case"done":n.onDone(()=>s(t&&ut(t,"done",n)));break;case"destroy":n.onDestroy(()=>s(t&&ut(t,"destroy",n)));break}}function ut(n,e,t){let s=t.totalTime,i=!!t.disabled,r=kt(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,s??n.totalTime,i),o=n._data;return o!=null&&(r._data=o),r}function kt(n,e,t,s,i="",r=0,o){return{element:n,triggerName:e,fromState:t,toState:s,phaseName:i,totalTime:r,disabled:!!o}}function O(n,e,t){let s=n.get(e);return s||n.set(e,s=t),s}function Ls(n){let e=n.indexOf(":"),t=n.substring(1,e),s=n.slice(e+1);return[t,s]}var tn=typeof document>"u"?null:document.documentElement;function Ot(n){let e=n.parentNode||n.host||null;return e===tn?null:e}function sn(n){return n.substring(1,6)=="ebkit"}var ce=null,$s=!1;function nn(n){ce||(ce=rn()||{},$s=ce.style?"WebkitAppearance"in ce.style:!1);let e=!0;return ce.style&&!sn(n)&&(e=n in ce.style,!e&&$s&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ce.style)),e}function rn(){return typeof document<"u"?document.body:null}function Js(n,e){for(;e;){if(e===n)return!0;e=Ot(e)}return!1}function Ys(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let s=n.querySelector(e);return s?[s]:[]}var It=(()=>{let e=class e{validateStyleProperty(s){return nn(s)}containsElement(s,i){return Js(s,i)}getParentElement(s){return Ot(s)}query(s,i,r){return Ys(s,i,r)}computeStyle(s,i,r){return r||""}animate(s,i,r,o,a,l=[],c){return new ee(r,o)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=W({token:e,factory:e.\u0275fac});let n=e;return n})(),Bt=class Bt{};Bt.NOOP=new It;var de=Bt,fe=class{};var on=1e3,Xs="{{",an="}}",Zs="ng-enter",gt="ng-leave",Be="ng-trigger",Qe=".ng-trigger",zs="ng-animating",yt=".ng-animating";function G(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:_t(parseFloat(e[1]),e[2])}function _t(n,e){switch(e){case"s":return n*on;default:return n}}function Ve(n,e,t){return n.hasOwnProperty("duration")?n:ln(n,e,t)}function ln(n,e,t){let s=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,r=0,o="";if(typeof n=="string"){let a=n.match(s);if(a===null)return e.push(Is(n)),{duration:0,delay:0,easing:""};i=_t(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=_t(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else i=n;if(!t){let a=!1,l=e.length;i<0&&(e.push(wi()),a=!0),r<0&&(e.push(Ai()),a=!0),a&&e.splice(l,0,Is(n))}return{duration:i,delay:r,easing:o}}function cn(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function V(n,e,t){e.forEach((s,i)=>{let r=Lt(i);t&&!t.has(i)&&t.set(i,n.style[r]),n.style[r]=s})}function he(n,e){e.forEach((t,s)=>{let i=Lt(s);n.style[i]=""})}function Ae(n){return Array.isArray(n)?n.length==1?n[0]:Os(n):n}function un(n,e,t){let s=e.params||{},i=ei(n);i.length&&i.forEach(r=>{s.hasOwnProperty(r)||t.push(Mi(r))})}var St=new RegExp(`${Xs}\\s*(.+?)\\s*${an}`,"g");function ei(n){let e=[];if(typeof n=="string"){let t;for(;t=St.exec(n);)e.push(t[1]);St.lastIndex=0}return e}function Pe(n,e,t){let s=`${n}`,i=s.replace(St,(r,o)=>{let a=e[o];return a==null&&(t.push(Pi(o)),a=""),a.toString()});return i==s?n:i}var hn=/-+([a-z0-9])/g;function Lt(n){return n.replace(hn,(...e)=>e[1].toUpperCase())}function dn(n,e){return n===0||e===0}function fn(n,e,t){if(t.size&&e.length){let s=e[0],i=[];if(t.forEach((r,o)=>{s.has(o)||i.push(o),s.set(o,r)}),i.length)for(let r=1;ro.set(a,$t(n,a)))}}return e}function k(n,e,t){switch(e.type){case _.Trigger:return n.visitTrigger(e,t);case _.State:return n.visitState(e,t);case _.Transition:return n.visitTransition(e,t);case _.Sequence:return n.visitSequence(e,t);case _.Group:return n.visitGroup(e,t);case _.Animate:return n.visitAnimate(e,t);case _.Keyframes:return n.visitKeyframes(e,t);case _.Style:return n.visitStyle(e,t);case _.Reference:return n.visitReference(e,t);case _.AnimateChild:return n.visitAnimateChild(e,t);case _.AnimateRef:return n.visitAnimateRef(e,t);case _.Query:return n.visitQuery(e,t);case _.Stagger:return n.visitStagger(e,t);default:throw Di(e.type)}}function $t(n,e){return window.getComputedStyle(n)[e]}var mn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),He=class extends fe{normalizePropertyName(e,t){return Lt(e)}normalizeStyleValue(e,t,s,i){let r="",o=s.toString().trim();if(mn.has(t)&&s!==0&&s!=="0")if(typeof s=="number")r="px";else{let a=s.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(Ni(e,s))}return o+r}};var Ge="*";function pn(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(s=>gn(s,t,e)):t.push(n),t}function gn(n,e,t){if(n[0]==":"){let l=yn(n,t);if(typeof l=="function"){e.push(l);return}n=l}let s=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(s==null||s.length<4)return t.push(ji(n)),e;let i=s[1],r=s[2],o=s[3];e.push(Bs(i,o));let a=i==Ge&&o==Ge;r[0]=="<"&&!a&&e.push(Bs(o,i))}function yn(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,s)=>parseFloat(s)>parseFloat(t);case":decrement":return(t,s)=>parseFloat(s) *"}}var Ke=new Set(["true","1"]),je=new Set(["false","0"]);function Bs(n,e){let t=Ke.has(n)||je.has(n),s=Ke.has(e)||je.has(e);return(i,r)=>{let o=n==Ge||n==i,a=e==Ge||e==r;return!o&&t&&typeof i=="boolean"&&(o=i?Ke.has(n):je.has(n)),!a&&s&&typeof r=="boolean"&&(a=r?Ke.has(e):je.has(e)),o&&a}}var ti=":self",_n=new RegExp(`s*${ti}s*,?`,"g");function si(n,e,t,s){return new Et(n).build(e,t,s)}var Ks="",Et=class{constructor(e){this._driver=e}build(e,t,s){let i=new vt(t);return this._resetContextStyleTimingState(i),k(this,Ae(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=Ks,e.collectedStyles=new Map,e.collectedStyles.set(Ks,new Map),e.currentTime=0}visitTrigger(e,t){let s=t.queryCount=0,i=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Ci()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==_.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==_.Transition){let l=this.visitTransition(a,t);s+=l.queryCount,i+=l.depCount,o.push(l)}else t.errors.push(Fi())}),{type:_.Trigger,name:e.name,states:r,transitions:o,queryCount:s,depCount:i,options:null}}visitState(e,t){let s=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(s.containsDynamicStyles){let r=new Set,o=i||{};s.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{ei(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Ri(e.name,[...r.values()]))}return{type:_.State,name:e.name,style:s,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let s=k(this,Ae(e.animation),t),i=pn(e.expr,t.errors);return{type:_.Transition,matchers:i,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:ue(e.options)}}visitSequence(e,t){return{type:_.Sequence,steps:e.steps.map(s=>k(this,s,t)),options:ue(e.options)}}visitGroup(e,t){let s=t.currentTime,i=0,r=e.steps.map(o=>{t.currentTime=s;let a=k(this,o,t);return i=Math.max(i,t.currentTime),a});return t.currentTime=i,{type:_.Group,steps:r,options:ue(e.options)}}visitAnimate(e,t){let s=Tn(e.timings,t.errors);t.currentAnimateTimings=s;let i,r=e.styles?e.styles:ct({});if(r.type==_.Keyframes)i=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};s.easing&&(c.easing=s.easing),o=ct(c)}t.currentTime+=s.duration+s.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,i=l}return t.currentAnimateTimings=null,{type:_.Animate,timings:s,style:i,options:null}}visitStyle(e,t){let s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){let s=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===Q?s.push(a):t.errors.push(ki(a)):s.push(new Map(Object.entries(a)));let r=!1,o=null;return s.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(Xs)>=0){r=!0;break}}}),{type:_.Style,styles:s,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let s=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(Oi(l,h.startTime,h.endTime,r,i)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:i}),t.options&&un(a,t.options,t.errors)})})}visitKeyframes(e,t){let s={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Ii()),s;let i=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),N=A.offset!=null?A.offset:vn(A.styles),P=0;return N!=null&&(r++,P=A.offset=N),l=l||P<0||P>1,a=a||P0&&r{let N=S>0?A==y?1:S*A:o[A],P=N*T;t.currentTime=f+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=N,s.styles.push(w)}),s}visitReference(e,t){return{type:_.Reference,animation:k(this,Ae(e.animation),t),options:ue(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:ue(e.options)}}visitAnimateRef(e,t){return{type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:ue(e.options)}}visitQuery(e,t){let s=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=Sn(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,O(t.collectedStyles,t.currentQuerySelector,new Map);let a=k(this,Ae(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:_.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:ue(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Bi());let s=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Ve(e.timings,t.errors,!0);return{type:_.Stagger,animation:k(this,Ae(e.animation),t),timings:s,options:null}}};function Sn(n){let e=!!n.split(/\s*,\s*/).find(t=>t==ti);return e&&(n=n.replace(_n,"")),n=n.replace(/@\*/g,Qe).replace(/@\w+/g,t=>Qe+"-"+t.slice(1)).replace(/:animating/g,yt),[n,e]}function En(n){return n?Re({},n):null}var vt=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function vn(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let s=t;e=parseFloat(s.get("offset")),s.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Tn(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=Ve(n,e).duration;return ht(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=ht(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=Ve(t,e);return ht(i.duration,i.delay,i.easing)}function ue(n){return n?(n=Re({},n),n.params&&(n.params=En(n.params))):n={},n}function ht(n,e,t){return{duration:n,delay:e,easing:t}}function zt(n,e,t,s,i,r,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}var De=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},bn=1,wn=":enter",An=new RegExp(wn,"g"),Mn=":leave",Pn=new RegExp(Mn,"g");function ii(n,e,t,s,i,r=new Map,o=new Map,a,l,c=[]){return new Tt().buildKeyframes(n,e,t,s,i,r,o,a,l,c)}var Tt=class{buildKeyframes(e,t,s,i,r,o,a,l,c,h=[]){c=c||new De;let u=new bt(e,t,c,i,r,h,[]);u.options=l;let S=l.delay?G(l.delay):0;u.currentTimeline.delayNextStep(S),u.currentTimeline.setStyles([o],null,u.errors,l),k(this,s,u);let y=u.timelines.filter(f=>f.containsAnimation());if(y.length&&a.size){let f;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){f=T;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,l)}return y.length?y.map(f=>f.buildKeyframes()):[zt(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let s=t.subInstructions.get(t.element);if(s){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(s,i,i.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,s){for(let i of e){let r=i?.delay;if(r){let o=typeof r=="number"?r:G(Pe(r,i?.params??{},t.errors));s.delayNextStep(o)}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime,o=s.duration!=null?G(s.duration):null,a=s.delay!=null?G(s.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),k(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let s=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==_.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=xe);let o=G(r.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>k(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>s&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let s=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?G(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),k(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),s.push(a.currentTimeline)}),s.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let s=e.strValue,i=t.params?Pe(s,t.params,t.errors):s;return Ve(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let s=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),i.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let s=t.currentTimeline,i=t.currentAnimateTimings;!i&&s.hasCurrentStyleProperties()&&s.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let s=t.currentAnimateTimings,i=t.currentTimeline.duration,r=s.duration,a=t.createSubContext().currentTimeline;a.easing=s.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let s=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?G(i.delay):0;r&&(t.previousNode.type===_.Style||s==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=xe);let o=s,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),k(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let S=u.currentTimeline.currentTime;o=Math.max(o,S)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let s=t.parentContext,i=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=s.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;k(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=i.currentTime-u+(i.startTime-s.currentTimeline.startTime)}},xe={},bt=class n{constructor(e,t,s,i,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=xe,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new We(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let s=e,i=this.options;s.duration!=null&&(i.duration=G(s.duration)),s.delay!=null&&(i.delay=G(s.delay));let r=s.params;if(r){let o=i.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Pe(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let s=e.params={};Object.keys(t).forEach(i=>{s[i]=t[i]})}}return e}createSubContext(e=null,t,s){let i=t||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=xe,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new wt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,s,i,r,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(An,"."+this._enterClassName),e=e.replace(Pn,"."+this._leaveClassName);let l=s!=1,c=this._driver.query(this.element,e,l);s!==0&&(c=s<0?c.slice(c.length+s,c.length):c.slice(0,s)),a.push(...c)}return!r&&a.length==0&&o.push(Ki(t)),a}},We=class n{constructor(e,t,s,i){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=bn,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||Q),this._currentKeyframe.set(t,Q);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,s,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},o=Dn(e,this._globalTimelineStyles);for(let[a,l]of o){let c=Pe(l,r,s);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Q),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,s)=>{let i=this._styleSummary.get(s);(!i||t.time>i.time)&&this._updateStyle(s,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,s=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ze?e.add(u):h===Q&&t.add(u)}),s||c.set("offset",l/this.duration),i.push(c)});let r=[...e.values()],o=[...t.values()];if(s){let a=i[0],l=new Map(a);a.set("offset",0),l.set("offset",1),i=[a,l]}return zt(this.element,i,r,o,this.duration,this.startTime,this.easing,!1)}},wt=class extends We{constructor(e,t,s,i,r,o,a=!1){super(e,t,o.delay),this.keyframes=s,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=s+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",js(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let S=new Map(e[u]),y=S.get("offset"),f=t+y*s;S.set("offset",js(f/o)),r.push(S)}s=o,t=0,i="",e=r}return zt(this.element,e,this.preStyleProps,this.postStyleProps,s,t,i,!0)}};function js(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function Dn(n,e){let t=new Map,s;return n.forEach(i=>{if(i==="*"){s??=e.keys();for(let r of s)t.set(r,Q)}else for(let[r,o]of i)t.set(r,o)}),t}function qs(n,e,t,s,i,r,o,a,l,c,h,u,S){return{type:0,element:n,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:s,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:S}}var dt={},Je=class{constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s}match(e,t,s,i){return Nn(this.ast.matchers,e,t,s,i)}buildStyles(e,t,s){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,s):new Map}build(e,t,s,i,r,o,a,l,c,h){let u=[],S=this.ast.options&&this.ast.options.params||dt,y=a&&a.params||dt,f=this.buildStyles(s,y,u),g=l&&l.params||dt,T=this.buildStyles(i,g,u),w=new Set,A=new Map,N=new Map,P=i==="void",me={params:ni(g,S),delay:this.ast.options?.delay},B=h?[]:ii(e,t,this.ast.animation,r,o,f,T,me,c,u),C=0;return B.forEach(F=>{C=Math.max(F.duration+F.delay,C)}),u.length?qs(t,this._triggerName,s,i,P,f,T,[],[],A,N,C,u):(B.forEach(F=>{let se=F.element,pe=O(A,se,new Set);F.preStyleProps.forEach(ie=>pe.add(ie));let Kt=O(N,se,new Set);F.postStyleProps.forEach(ie=>Kt.add(ie)),se!==t&&w.add(se)}),qs(t,this._triggerName,s,i,P,f,T,B,[...w.values()],A,N,C))}};function Nn(n,e,t,s,i){return n.some(r=>r(e,t,s,i))}function ni(n,e){let t=Re({},e);return Object.entries(n).forEach(([s,i])=>{i!=null&&(t[s]=i)}),t}var At=class{constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s}buildStyles(e,t){let s=new Map,i=ni(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=Pe(o,i,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),s.set(a,o)})}),s}};function Cn(n,e,t){return new Mt(n,e,t)}var Mt=class{constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,this.transitionFactories=[],this.states=new Map,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new At(i.style,r,s))}),Us(this.states,"true","1"),Us(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Je(e,i,this.states))}),this.fallbackTransition=Fn(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,i){return this.transitionFactories.find(o=>o.match(e,t,s,i))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}};function Fn(n,e,t){let s=[(o,a)=>!0],i={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:i,matchers:s,options:null,queryCount:0,depCount:0};return new Je(n,r,e)}function Us(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var Rn=new De,Pt=class{constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let s=[],i=[],r=si(this._driver,t,s,i);if(s.length)throw Vi(s);i.length&&void 0,this._animations.set(e,r)}_buildPlayer(e,t,s){let i=e.element,r=Ws(this._normalizer,e.keyframes,t,s);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,s={}){let i=[],r=this._animations.get(e),o,a=new Map;if(r?(o=ii(this._driver,t,r,Zs,gt,new Map,new Map,s,Rn,i),o.forEach(h=>{let u=O(a,h.element,new Map);h.postStyleProps.forEach(S=>u.set(S,null))})):(i.push(Hi()),o=[]),i.length)throw Gi(i);a.forEach((h,u)=>{h.forEach((S,y)=>{h.set(y,this._driver.computeStyle(u,y,Q))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=te(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let s=this.players.indexOf(t);s>=0&&this.players.splice(s,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw xi(e);return t}listen(e,t,s,i){let r=kt(t,"","","");return Rt(this._getPlayer(e),s,r,i),()=>{}}command(e,t,s,i){if(s=="register"){this.register(e,i[0]);return}if(s=="create"){let o=i[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(s){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},Qs="ng-animate-queued",kn=".ng-animate-queued",ft="ng-animate-disabled",On=".ng-animate-disabled",In="ng-star-inserted",Ln=".ng-star-inserted",$n=[],ri={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},zn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},$="__ng_removed",Ne=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let s=e&&e.hasOwnProperty("value"),i=s?e.value:e;if(this.value=Kn(i),s){let r=e,{value:o}=r,a=Qt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let s=this.options.params;Object.keys(t).forEach(i=>{s[i]==null&&(s[i]=t[i])})}}},Me="void",mt=new Ne(Me),Dt=class{constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,s,i){if(!this._triggers.has(t))throw Wi(s,t);if(s==null||s.length==0)throw Ji(t);if(!jn(s))throw Yi(s,t);let r=O(this._elementListeners,e,[]),o={name:t,phase:s,callback:i};r.push(o);let a=O(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,Be),L(e,Be+"-"+t),a.set(t,mt)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Xi(e);return t}trigger(e,t,s,i=!0){let r=this._getTrigger(t),o=new Ce(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,Be),L(e,Be+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new Ne(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=mt),!(c.value===Me)&&l.value===c.value){if(!Qn(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{he(e,T),V(e,w)})}return}let S=O(this._engine.playersByElement,e,[]);S.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),f=!1;if(!y){if(!i)return;y=r.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:f}),f||(L(e,Qs),o.onStart(()=>{Ee(e,Qs)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),S.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let s=this._engine.driver.query(e,Qe,!0);s.forEach(i=>{if(i[$])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(o=>o.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>s.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,s,i){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,Me,i);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),s&&te(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){let i=new Set;t.forEach(r=>{let o=r.name;if(i.has(o))return;i.add(o);let l=this._triggers.get(o).fallbackTransition,c=s.get(o)||mt,h=new Ne(Me),u=new Ce(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(s.totalAnimations){let r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(s.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)s.markElementAsRemoved(this.id,e,!1,t);else{let r=e[$];(!r||r===ri)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(s=>{let i=s.player;if(i.destroyed)return;let r=s.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==s.triggerName){let l=kt(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,Rt(s.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(s)}),this._queue=[],t.sort((s,i)=>{let r=s.transition.ast.depCount,o=i.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(s.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Nt=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,r)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s)})}),e}createNamespace(e,t){let s=new Dt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){let s=this._namespaceList,i=this.namespacesByHostElement;if(s.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=i.get(a);if(l){let c=s.indexOf(l);s.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||s.unshift(e)}else s.push(e);return i.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let i=this._namespaceLookup[e];i&&i.register(t,s)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);let i=this._namespaceList.indexOf(s);i>=0&&this._namespaceList.splice(i,1),s.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,s=this.statesByElement.get(e);if(s){for(let i of s.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,s,i){if(qe(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,s,i),!0}return!1}insertNode(e,t,s,i){if(!qe(t))return;let r=t[$];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,s)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ft)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Ee(e,ft))}removeNode(e,t,s){if(qe(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s)}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,s,i,r){this.collectedLeaveElements.push(t),t[$]={namespaceId:e,setForRemoval:i,hasAnimation:s,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,s,i,r){return qe(t)?this._fetchNamespace(e).listen(t,s,i,r):()=>{}}_buildInstruction(e,t,s,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,Qe,!0);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,yt,!0),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=!0:s.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return te(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[$];if(t&&t.setForRemoval){if(e[$]=ri,t.namespaceId){this.destroyInnerAnimations(e);let s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ft)&&this.markElementAsDisabled(e,!1),this.driver.query(e,On,!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,i)=>this._balanceNamespaceList(s,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;ss()),this._flushFns=[],this._whenQuietFns.length){let s=this._whenQuietFns;this._whenQuietFns=[],t.length?te(t).onDone(()=>{s.forEach(i=>i())}):s.forEach(i=>i())}}reportError(e){throw Zi(e)}_flushAnimations(e,t){let s=new De,i=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let m=this.driver.query(d,kn,!0);for(let p=0;p{let p=Zs+g++;f.set(m,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,A=new Set;for(let d=0;dw.add(E)):A.add(m))}let N=new Map,P=Gs(S,Array.from(w));P.forEach((d,m)=>{let p=gt+g++;N.set(m,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,m)=>{let p=f.get(m);d.forEach(E=>Ee(E,p))}),P.forEach((d,m)=>{let p=N.get(m);d.forEach(E=>Ee(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let me=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,M=p.element;if(me.push(E),this.collectedEnterElements.length){let D=M[$];if(D&&D.setForMove){if(D.previousTriggersValues&&D.previousTriggersValues.has(p.triggerName)){let ne=D.previousTriggersValues.get(p.triggerName),I=this.statesByElement.get(p.element);if(I&&I.has(p.triggerName)){let Fe=I.get(p.triggerName);Fe.value=ne,I.set(p.triggerName,Fe)}}E.destroy();return}}let K=!u||!this.driver.containsElement(u,M),R=N.get(M),x=f.get(M),b=this._buildInstruction(p,s,x,R,K);if(b.errors&&b.errors.length){B.push(b);return}if(K){E.onStart(()=>he(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}if(p.isFallbackTransition){E.onStart(()=>he(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}let Ut=[];b.timelines.forEach(D=>{D.stretchStartingKeyframe=!0,this.disabledNodes.has(D.element)||Ut.push(D)}),b.timelines=Ut,s.append(M,b.timelines);let Si={instruction:b,player:E,element:M};o.push(Si),b.queriedElements.forEach(D=>O(a,D,[]).push(E)),b.preStyleProps.forEach((D,ne)=>{if(D.size){let I=l.get(ne);I||l.set(ne,I=new Set),D.forEach((Fe,nt)=>I.add(nt))}}),b.postStyleProps.forEach((D,ne)=>{let I=c.get(ne);I||c.set(ne,I=new Set),D.forEach((Fe,nt)=>I.add(nt))})});if(B.length){let d=[];B.forEach(m=>{d.push(en(m.triggerName,m.errors))}),me.forEach(m=>m.destroy()),this.reportError(d)}let C=new Map,F=new Map;o.forEach(d=>{let m=d.element;s.has(m)&&(F.set(m,m),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,C))}),i.forEach(d=>{let m=d.element;this._getPreviousPlayers(m,!1,d.namespaceId,d.triggerName,null).forEach(E=>{O(C,m,[]).push(E),E.destroy()})});let se=T.filter(d=>xs(d,l,c)),pe=new Map;Hs(pe,this.driver,A,c,Q).forEach(d=>{xs(d,l,c)&&se.push(d)});let ie=new Map;y.forEach((d,m)=>{Hs(ie,this.driver,new Set(d),l,ze)}),se.forEach(d=>{let m=pe.get(d),p=ie.get(d);pe.set(d,new Map([...m?.entries()??[],...p?.entries()??[]]))});let it=[],jt=[],qt={};o.forEach(d=>{let{element:m,player:p,instruction:E}=d;if(s.has(m)){if(h.has(m)){p.onDestroy(()=>V(m,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),i.push(p);return}let M=qt;if(F.size>1){let R=m,x=[];for(;R=R.parentNode;){let b=F.get(R);if(b){M=b;break}x.push(R)}x.forEach(b=>F.set(b,M))}let K=this._buildAnimation(p.namespaceId,E,C,r,ie,pe);if(p.setRealPlayer(K),M===qt)it.push(p);else{let R=this.playersByElement.get(M);R&&R.length&&(p.parentPlayer=te(R)),i.push(p)}}else he(m,E.fromStyles),p.onDestroy(()=>V(m,E.toStyles)),jt.push(p),h.has(m)&&i.push(p)}),jt.forEach(d=>{let m=r.get(d.element);if(m&&m.length){let p=te(m);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d!K.destroyed);M.length?qn(this,m,M):this.processLeaveNode(m)}return T.length=0,it.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let m=this.players.indexOf(d);this.players.splice(m,1)}),d.play()}),it}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,s,i,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==Me;a.forEach(c=>{c.queued||!l&&c.triggerName!=i||o.push(c)})}}return(s||i)&&(o=o.filter(a=>!(s&&s!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,t,s){let i=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let c=l.element,h=c!==r,u=O(s,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let f=y.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),y.destroy(),u.push(y)})}he(r,t.fromStyles)}_buildAnimation(e,t,s,i,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,S=t.timelines.map(f=>{let g=f.element;h.add(g);let T=g[$];if(T&&T.removedBeforeQueried)return new ee(f.duration,f.delay);let w=g!==l,A=Un((s.get(g)||$n).map(C=>C.getRealPlayer())).filter(C=>{let F=C;return F.element?F.element===g:!1}),N=r.get(g),P=o.get(g),me=Ws(this._normalizer,f.keyframes,N,P),B=this._buildPlayer(f,me,A);if(f.subTimeline&&i&&u.add(g),w){let C=new Ce(e,a,g);C.setRealPlayer(B),c.push(C)}return B});c.forEach(f=>{O(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>Bn(this.playersByQueriedElement,f.element,f))}),h.forEach(f=>L(f,zs));let y=te(S);return y.onDestroy(()=>{h.forEach(f=>Ee(f,zs)),V(l,t.toStyles)}),u.forEach(f=>{O(i,f,[]).push(y)}),y}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new ee(e.duration,e.delay)}},Ce=class{constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s,this._player=new ee,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(i=>Rt(e,s,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){O(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Bn(n,e,t){let s=n.get(e);if(s){if(s.length){let i=s.indexOf(t);s.splice(i,1)}s.length==0&&n.delete(e)}return s}function Kn(n){return n??null}function qe(n){return n&&n.nodeType===1}function jn(n){return n=="start"||n=="done"}function Vs(n,e){let t=n.style.display;return n.style.display=e??"none",t}function Hs(n,e,t,s,i){let r=[];t.forEach(l=>r.push(Vs(l)));let o=[];s.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let S=e.computeStyle(c,u,i);h.set(u,S),(!S||S.length==0)&&(c[$]=zn,o.push(c))}),n.set(c,h)});let a=0;return t.forEach(l=>Vs(l,r[a++])),o}function Gs(n,e){let t=new Map;if(n.forEach(a=>t.set(a,[])),e.length==0)return t;let s=1,i=new Set(e),r=new Map;function o(a){if(!a)return s;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:i.has(c)?l=s:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==s&&t.get(l).push(a)}),t}function L(n,e){n.classList?.add(e)}function Ee(n,e){n.classList?.remove(e)}function qn(n,e,t){te(t).onDone(()=>n.processLeaveNode(e))}function Un(n){let e=[];return oi(n,e),e}function oi(n,e){for(let t=0;ti.add(r)):e.set(n,s),t.delete(n),!0}var Te=class{constructor(e,t,s){this._driver=t,this._normalizer=s,this._triggerCache={},this.onRemovalComplete=(i,r)=>{},this._transitionEngine=new Nt(e.body,t,s),this._timelineEngine=new Pt(e.body,t,s),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,s,i,r){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let l=[],c=[],h=si(this._driver,r,l,c);if(l.length)throw Ui(i,l);c.length&&void 0,a=Cn(i,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,i,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,s,i){this._transitionEngine.insertNode(e,t,s,i)}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,s,i){if(s.charAt(0)=="@"){let[r,o]=Ls(s),a=i;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,s,i)}listen(e,t,s,i,r){if(s.charAt(0)=="@"){let[o,a]=Ls(s);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,s,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function Vn(n,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=pt(e[0]),e.length>1&&(s=pt(e[e.length-1]))):e instanceof Map&&(t=pt(e)),t||s?new Ct(n,t,s):null}var ve=class ve{constructor(e,t,s){this._element=e,this._startStyles=t,this._endStyles=s,this._state=0;let i=ve.initialStylesByElement.get(e);i||ve.initialStylesByElement.set(e,i=new Map),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&V(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(V(this._element,this._initialStyles),this._endStyles&&(V(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(ve.initialStylesByElement.delete(this._element),this._startStyles&&(he(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(he(this._element,this._endStyles),this._endStyles=null),V(this._element,this._initialStyles),this._state=3)}};ve.initialStylesByElement=new WeakMap;var Ct=ve;function pt(n){let e=null;return n.forEach((t,s)=>{Hn(s)&&(e=e||new Map,e.set(s,t))}),e}function Hn(n){return n==="display"||n==="position"}var Ye=class{constructor(e,t,s,i){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=s.duration,this._delay=s.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(s=>{t.push(Object.fromEntries(s))}),t}_triggerWebAnimation(e,t,s){return e.animate(this._convertKeyframesToObject(t),s)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,i)=>{i!=="offset"&&e.set(i,this._finished?s:$t(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},Xe=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Js(e,t)}getParentElement(e){return Ot(e)}query(e,t,s){return Ys(e,t,s)}computeStyle(e,t,s){return $t(e,t)}animate(e,t,s,i,r,o=[]){let a=i==0?"both":"forwards",l={duration:s,delay:i,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof Ye);dn(s,i)&&h.forEach(y=>{y.currentSnapshot.forEach((f,g)=>c.set(g,f))});let u=cn(t).map(y=>new Map(y));u=fn(e,u,c);let S=Vn(e,u);return new Ye(e,u,l,S)}};var Ue="@",ai="@.disabled",Ze=class{constructor(e,t,s,i){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,s,i=!0){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,s){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,s,i){this.delegate.setAttribute(e,t,s,i)}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,s,i){this.delegate.setStyle(e,t,s,i)}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s)}setProperty(e,t,s){t.charAt(0)==Ue&&t==ai?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,s){return this.delegate.listen(e,t,s)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},Ft=class extends Ze{constructor(e,t,s,i,r){super(t,s,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,s){t.charAt(0)==Ue?t.charAt(1)=="."&&t==ai?(s=s===void 0?!0:!!s,this.disableAnimations(e,s)):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s)}listen(e,t,s){if(t.charAt(0)==Ue){let i=Gn(e),r=t.slice(1),o="";return r.charAt(0)!=Ue&&([r,o]=xn(r)),this.engine.listen(this.namespaceId,i,r,o,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,s,a)})}return this.delegate.listen(e,t,s)}};function Gn(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function xn(n){let e=n.indexOf("."),t=n.substring(0,e),s=n.slice(e+1);return[t,s]}var et=class{constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(i,r)=>{let o=r?.parentNode(i);o&&r.removeChild(o,i)}}createRenderer(e,t){let s="",i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(i);if(!h){let u=()=>c.delete(i);h=new Ze(s,i,this.engine,u),c.set(i,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new Ft(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,s){if(e>=0&&et(s));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),i.push([t,s])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var Jn=(()=>{let e=class e extends Te{constructor(s,i,r){super(s,i,r)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(i){return new(i||e)(j(ns),j(de),j(fe))},e.\u0275prov=W({token:e,factory:e.\u0275fac});let n=e;return n})();function Yn(){return new He}function Xn(n,e,t){return new et(n,e,t)}var li=[{provide:fe,useFactory:Yn},{provide:Te,useClass:Jn},{provide:Xt,useFactory:Xn,deps:[hs,Te,ke]}],Zn=[{provide:de,useFactory:()=>new Xe},{provide:rt,useValue:"BrowserAnimations"},...li],Ir=[{provide:de,useClass:It},{provide:rt,useValue:"NoopAnimations"},...li];function ci(){return Zt("NgEagerAnimations"),[...Zn]}var tt=class{http;prefix;suffix;constructor(e,t="/assets/i18n/",s=".json"){this.http=e,this.prefix=t,this.suffix=s}getTranslation(e){return this.http.get(`${this.prefix}${e}${this.suffix}`)}};function er(n,e){if(n&1&&(U(0,"li")(1,"h2")(2,"a",2),ae(3),ge(4,"translate"),Y()()()),n&2){let t,s=e.$implicit;q(2),oe("routerLink","/"+s.path),q(),Oe(" ",ye(4,2,((t=s.name)!==null&&t!==void 0?t:s.path)+".title")," ")}}var hi=(()=>{let e=class e{constructor(){this.sections=[{path:"dashboard"},{path:"presence-control"},{path:"open-absences"},{path:"edit-absences"},{path:"evaluate-absences"},{path:"events"},{path:"events/current",name:"events.current"},{path:"my-absences"},{path:"my-profile"},{path:"my-grades"},{path:"my-settings"}]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=J({type:e,selectors:[["bkd-home"]],standalone:!0,features:[X],decls:2,vars:1,consts:[[1,"mt-3"],[4,"ngFor","ngForOf"],[3,"routerLink"]],template:function(i,r){i&1&&(U(0,"ul",0),be(1,er,5,4,"li",1),Y()),i&2&&(q(),oe("ngForOf",r.sections))},dependencies:[Ie,ms,Se,$e],changeDetection:0});let n=e;return n})();var di=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=J({type:e,selectors:[["bkd-unauthenticated"]],standalone:!0,features:[X],decls:4,vars:3,consts:[[1,"bkd-container"],[1,"alert","alert-danger","my-3"]],template:function(i,r){i&1&&(U(0,"div",0)(1,"div",1),ae(2),ge(3,"translate"),Y()()),i&2&&(q(2),Oe(" ",ye(3,1,"unauthenticated.message")," "))},dependencies:[Se,$e],encapsulation:2});let n=e;return n})();var st=(()=>{let e=class e{constructor(s){this.storage=s}get isAuthenticated(){return!!this.accessToken}get accessToken(){return this.storage.getAccessToken()}};e.\u0275fac=function(i){return new(i||e)(j(bs))},e.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function z(){return()=>{let n=H(st),e=H(Le);return n.isAuthenticated?!0:(e.navigate(["/unauthenticated"]),!1)}}var fi=[{path:"dashboard",canActivate:[z()],loadChildren:()=>import("./chunk-WGARCXGP.js").then(n=>n.DASHBOARD_ROUTES)},{path:"presence-control",canActivate:[z()],loadChildren:()=>import("./chunk-73JV7FSB.js").then(n=>n.PRESENCE_CONTROL_ROUTES)},{path:"open-absences",canActivate:[z()],loadChildren:()=>import("./chunk-62KHQOYN.js").then(n=>n.OPEN_ABSENCES_ROUTES)},{path:"edit-absences",canActivate:[z()],loadChildren:()=>import("./chunk-2JTOMQIG.js").then(n=>n.EDIT_ABSENCES_ROUTES)},{path:"evaluate-absences",canActivate:[z()],loadChildren:()=>import("./chunk-BTBVZYMS.js").then(n=>n.EVALUATE_ABSENCES_ROUTES)},{path:"events",canActivate:[z()],loadChildren:()=>import("./chunk-VSATLVUN.js").then(n=>n.EVENTS_ROUTES)},{path:"my-absences",canActivate:[z()],loadChildren:()=>import("./chunk-TIZKDD7Y.js").then(n=>n.MY_ABSENCES_ROUTES)},{path:"my-profile",canActivate:[z()],loadChildren:()=>import("./chunk-AJF2ECIH.js").then(n=>n.MY_PROFILE_ROUTES)},{path:"my-grades",canActivate:[z()],loadChildren:()=>import("./chunk-UMTH7ATO.js").then(n=>n.MY_GRADES_ROUTES)},{path:"my-settings",canActivate:[z()],loadChildren:()=>import("./chunk-QUM6674D.js").then(n=>n.MY_SETTINGS_ROUTES)},{path:"unauthenticated",component:di},{path:"",component:hi,pathMatch:"full"}];function mi(){return(n,e)=>{let t=H(st),s=H(Z);if(n.url.startsWith(s.apiUrl)&&t.accessToken){let i=n.headers.set("Authorization",`Bearer ${t.accessToken}`);return e(n.clone({headers:i}))}return e(n)}}function pi(){return(n,e)=>{let t=H(Z);if(!n.headers.has("X-Role-Restriction")&&t.headerRoleRestriction){let s=tr();if(s&&t.headerRoleRestriction[s]){let i=n.headers.set("X-Role-Restriction",t.headerRoleRestriction[s]);return e(n.clone({headers:i}))}}return e(n)}}function tr(){let n=H(Le),e=n.url?Ms(n.url):null;return e?Ss(e):null}function gi(){return[{provide:Yt,useClass:sr}]}var sr=(()=>{let e=class e{constructor(s,i,r){this.ngZone=s,this.translate=i,this.toastService=r}handleError(s){console.error(String(s)),s instanceof as||this.notifyError()}notifyError(){this.ngZone.run(()=>{this.toastService.error(this.translate.instant("global.app-errors.exception-message"),this.translate.instant("global.app-errors.exception-title"))})}};e.\u0275fac=function(i){return new(i||e)(j(ke),j(Ts),j(_e))},e.\u0275prov=W({token:e,factory:e.\u0275fac});let n=e;return n})();function ir(n,e){return new tt(n,`${e.scriptsAndAssetsPath}/assets/locales/`,".json")}var yi={providers:[ps(fi,gs()),cs(us([Ps(),mi(),pi()])),ci(),gi(),xt(Se.forRoot({loader:{provide:vs,useFactory:ir,deps:[ls,Z]}})),ws()]};var _i={production:!0};_i.production&&void 0;lt(Ds);lt(Ns);ds(ks,yi).catch(n=>console.error(n)); +import{b as Ps}from"./chunk-PSXDSPKS.js";import{c as Ms}from"./chunk-5RDJZAUT.js";import{a as ws,b as As}from"./chunk-DB66EACG.js";import{r as _s}from"./chunk-C56YGDXA.js";import{a as _e}from"./chunk-UX5TA32W.js";import{$ as J,$a as ot,A as Ht,Aa as Zt,Ab as ge,Ba as ke,Bb as ye,Cd as Es,Ed as vs,Fd as Ts,Ga as be,Gd as $e,Hd as Se,Ia as oe,Id as bs,Ka as es,Lb as ns,Pb as lt,Rb as Ie,Sa as U,Sb as rs,Ta as Y,U as v,Ua as ts,Uc as ys,Vb as os,Vc as Z,W,Y as Gt,Ya as ss,Z as j,_ as H,_a as is,a as Re,c as Qt,cc as as,da as xt,dc as ls,ec as cs,fc as us,gc as hs,ha as Wt,hc as ds,ia as Jt,j as Vt,jb as ae,kb as at,lb as Oe,oa as Yt,pc as fs,qc as Le,rc as ms,sa as rt,tb as X,tc as ps,ua as q,uc as gs,va as re,vd as Ss,ya as Xt}from"./chunk-XTHSYQMN.js";function Ei(n){let e=n,t=Math.floor(Math.abs(n)),s=n.toString().replace(/^[^.]*\.?/,"").length;return t===1&&s===0?1:5}var Ds=["de-CH",[["AM","PM"],void 0,void 0],void 0,[["S","M","D","M","D","F","S"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So","Mo","Di","Mi","Do","Fr","Sa"]],[["S","M","D","M","D","F","S"],["So","Mo","Di","Mi","Do","Fr","Sa"],["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],["So.","Mo.","Di.","Mi.","Do.","Fr.","Sa."]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan.","Feb.","M\xE4rz","Apr.","Mai","Juni","Juli","Aug.","Sept.","Okt.","Nov.","Dez."],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],["Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"]],[["v. Chr.","n. Chr."],void 0,void 0],1,[6,0],["dd.MM.yy","dd.MM.y","d. MMMM y","EEEE, d. MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH:mm:ss zzzz"],["{1}, {0}",void 0,"{1} 'um' {0}",void 0],[".","\u2019",";","%","+","-","E","\xB7","\u2030","\u221E","NaN",":"],["#,##0.###","#,##0%","\xA4\xA0#,##0.00;\xA4-#,##0.00","#E0"],"CHF","CHF","Schweizer Franken",{ATS:["\xF6S"],AUD:["AU$","$"],BGM:["BGK"],BGO:["BGJ"],BYN:[void 0,"\u0440."],CUC:[void 0,"Cub$"],DEM:["DM"],EUR:[],FKP:[void 0,"Fl\xA3"],GHS:[void 0,"\u20B5"],GNF:[void 0,"F.G."],KMF:[void 0,"FC"],PHP:[void 0,"\u20B1"],RON:[void 0,"L"],RUR:[void 0,"\u0440."],RWF:[void 0,"F.Rw"],SYP:[],THB:["\u0E3F"],TWD:["NT$"],XXX:[],ZMW:[void 0,"K"]},"ltr",Ei];function vi(n){let e=n,t=Math.floor(Math.abs(n)),s=n.toString().replace(/^[^.]*\.?/,"").length,i=parseInt(n.toString().replace(/^[^e]*(e([-+]?\d+))?/,"$2"))||0;return t===0||t===1?1:i===0&&t!==0&&t%1e6===0&&s===0||!(i>=0&&i<=5)?4:5}var Ns=["fr-CH",[["AM","PM"],void 0,void 0],void 0,[["D","L","M","M","J","V","S"],["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],["di","lu","ma","me","je","ve","sa"]],void 0,[["J","F","M","A","M","J","J","A","S","O","N","D"],["janv.","f\xE9vr.","mars","avr.","mai","juin","juil.","ao\xFBt","sept.","oct.","nov.","d\xE9c."],["janvier","f\xE9vrier","mars","avril","mai","juin","juillet","ao\xFBt","septembre","octobre","novembre","d\xE9cembre"]],void 0,[["av. J.-C.","ap. J.-C."],void 0,["avant J\xE9sus-Christ","apr\xE8s J\xE9sus-Christ"]],1,[6,0],["dd.MM.yy","d MMM y","d MMMM y","EEEE, d MMMM y"],["HH:mm","HH:mm:ss","HH:mm:ss z","HH.mm:ss 'h' zzzz"],["{1} {0}","{1}, {0}","{1} '\xE0' {0}",void 0],[",","\u202F",";","%","+","-","E","\xD7","\u2030","\u221E","NaN",":","."],["#,##0.###","#,##0%","#,##0.00\xA0\xA4","#E0"],"CHF","CHF","franc suisse",{ARS:["$AR","$"],AUD:["$AU","$"],BEF:["FB"],BMD:["$BM","$"],BND:["$BN","$"],BYN:[void 0,"\u0440."],BZD:["$BZ","$"],CAD:["$CA","$"],CLP:["$CL","$"],CNY:[void 0,"\xA5"],COP:["$CO","$"],CYP:["\xA3CY"],EGP:[void 0,"\xA3E"],FJD:["$FJ","$"],FKP:["\xA3FK","\xA3"],FRF:["F"],GBP:["\xA3GB","\xA3"],GIP:["\xA3GI","\xA3"],HKD:[void 0,"$"],IEP:["\xA3IE"],ILP:["\xA3IL"],ITL:["\u20A4IT"],JPY:[void 0,"\xA5"],KMF:[void 0,"FC"],LBP:["\xA3LB","\xA3L"],MTP:["\xA3MT"],MXN:["$MX","$"],NAD:["$NA","$"],NIO:[void 0,"$C"],NZD:["$NZ","$"],PHP:[void 0,"\u20B1"],RHD:["$RH"],RON:[void 0,"L"],RWF:[void 0,"FR"],SBD:["$SB","$"],SGD:["$SG","$"],SRD:["$SR","$"],TOP:[void 0,"$T"],TTD:["$TT","$"],TWD:[void 0,"NT$"],USD:["$US","$"],UYU:["$UY","$"],WST:["$WS"],XCD:[void 0,"$"],XPF:["FCFP"],ZMW:[void 0,"Kw"]},"ltr",vi];function Ti(n,e){if(n&1&&(U(0,"i",4),ae(1),Y()),n&2){let t=ot().$implicit;q(),at(t.icon)}}function bi(n,e){if(n&1){let t=ss();U(0,"ngb-toast",1),is("hidden",function(){let i=Wt(t).$implicit,r=ot();return Jt(r.toastService.remove(i))}),U(1,"div",2),be(2,Ti,2,1,"i",3),U(3,"span"),ae(4),Y()()()}if(n&2){let t=e.$implicit;es(t.classname),oe("header",t.header||"")("autohide",!0),q(2),oe("ngIf",t.icon),q(2),at(t.message)}}var Fs=(()=>{let e=class e{constructor(s){this.toastService=s}};e.\u0275fac=function(i){return new(i||e)(re(_e))},e.\u0275cmp=J({type:e,selectors:[["bkd-toast"]],standalone:!0,features:[X],decls:2,vars:3,consts:[[3,"header","class","autohide","hidden",4,"ngFor","ngForOf"],[3,"hidden","header","autohide"],[1,"d-flex","gap-2"],["class","material-icons",4,"ngIf"],[1,"material-icons"]],template:function(i,r){i&1&&(be(0,bi,5,6,"ngb-toast",0),ge(1,"async")),i&2&&oe("ngForOf",ye(1,1,r.toastService.toasts$))},dependencies:[Ie,_s,rs,os],styles:["[_nghost-%COMP%]{position:fixed;top:0;right:0;margin:.5em;z-index:1200}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{font-size:medium}"]});let n=e;return n})();var Rs=new Gt("Navigator API",{providedIn:"root",factory:()=>navigator});var ks=(()=>{let e=class e{constructor(s,i,r,o){this.toastService=i,this.settings=r,this.navigator=o,s.initialize(),this.checkSettings()}checkSettings(){Es(ys)(this.settings).pipe(Ht(s=>(console.error(String(s)),this.toastService.error("Please check the contents of the settings.js file (see Console output for more details).","Invalid Settings"),Vt))).subscribe()}};e.\u0275fac=function(i){return new(i||e)(re(As),re(_e),re(Z),re(Rs))},e.\u0275cmp=J({type:e,selectors:[["bkd-app"]],standalone:!0,features:[X],decls:2,vars:0,consts:[["aria-live","polite","aria-atomic","true"]],template:function(i,r){i&1&&ts(0,"bkd-toast",0)(1,"router-outlet")},dependencies:[Fs,fs],styles:["[_nghost-%COMP%]{width:100%}"],changeDetection:0});let n=e;return n})();var _=function(n){return n[n.State=0]="State",n[n.Transition=1]="Transition",n[n.Sequence=2]="Sequence",n[n.Group=3]="Group",n[n.Animate=4]="Animate",n[n.Keyframes=5]="Keyframes",n[n.Style=6]="Style",n[n.Trigger=7]="Trigger",n[n.Reference=8]="Reference",n[n.AnimateChild=9]="AnimateChild",n[n.AnimateRef=10]="AnimateRef",n[n.Query=11]="Query",n[n.Stagger=12]="Stagger",n}(_||{}),Q="*";function Os(n,e=null){return{type:_.Sequence,steps:n,options:e}}function ct(n){return{type:_.Style,styles:n,offset:null}}var ee=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},we=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,s=0,i=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++s==r&&this._onDestroy()}),o.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,a)=>Math.max(o,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(s=>{let i=s.totalTime?Math.min(1,t/s.totalTime):1;s.setPosition(i)})}getPosition(){let e=this.players.reduce((t,s)=>t===null||s.totalTime>t.totalTime?s:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},ze="!";function Is(n){return new v(3e3,!1)}function wi(){return new v(3100,!1)}function Ai(){return new v(3101,!1)}function Mi(n){return new v(3001,!1)}function Pi(n){return new v(3003,!1)}function Di(n){return new v(3004,!1)}function Ni(n,e){return new v(3005,!1)}function Ci(){return new v(3006,!1)}function Fi(){return new v(3007,!1)}function Ri(n,e){return new v(3008,!1)}function ki(n){return new v(3002,!1)}function Oi(n,e,t,s,i){return new v(3010,!1)}function Ii(){return new v(3011,!1)}function Li(){return new v(3012,!1)}function $i(){return new v(3200,!1)}function zi(){return new v(3202,!1)}function Bi(){return new v(3013,!1)}function Ki(n){return new v(3014,!1)}function ji(n){return new v(3015,!1)}function qi(n){return new v(3016,!1)}function Ui(n,e){return new v(3404,!1)}function Qi(n){return new v(3502,!1)}function Vi(n){return new v(3503,!1)}function Hi(){return new v(3300,!1)}function Gi(n){return new v(3504,!1)}function xi(n){return new v(3301,!1)}function Wi(n,e){return new v(3302,!1)}function Ji(n){return new v(3303,!1)}function Yi(n,e){return new v(3400,!1)}function Xi(n){return new v(3401,!1)}function Zi(n){return new v(3402,!1)}function en(n,e){return new v(3505,!1)}function te(n){switch(n.length){case 0:return new ee;case 1:return n[0];default:return new we(n)}}function Ws(n,e,t=new Map,s=new Map){let i=[],r=[],o=-1,a=null;if(e.forEach(l=>{let c=l.get("offset"),h=c==o,u=h&&a||new Map;l.forEach((S,y)=>{let f=y,g=S;if(y!=="offset")switch(f=n.normalizePropertyName(f,i),g){case ze:g=t.get(y);break;case Q:g=s.get(y);break;default:g=n.normalizeStyleValue(y,f,g,i);break}u.set(f,g)}),h||r.push(u),a=u,o=c}),i.length)throw Qi(i);return r}function Rt(n,e,t,s){switch(e){case"start":n.onStart(()=>s(t&&ut(t,"start",n)));break;case"done":n.onDone(()=>s(t&&ut(t,"done",n)));break;case"destroy":n.onDestroy(()=>s(t&&ut(t,"destroy",n)));break}}function ut(n,e,t){let s=t.totalTime,i=!!t.disabled,r=kt(n.element,n.triggerName,n.fromState,n.toState,e||n.phaseName,s??n.totalTime,i),o=n._data;return o!=null&&(r._data=o),r}function kt(n,e,t,s,i="",r=0,o){return{element:n,triggerName:e,fromState:t,toState:s,phaseName:i,totalTime:r,disabled:!!o}}function O(n,e,t){let s=n.get(e);return s||n.set(e,s=t),s}function Ls(n){let e=n.indexOf(":"),t=n.substring(1,e),s=n.slice(e+1);return[t,s]}var tn=typeof document>"u"?null:document.documentElement;function Ot(n){let e=n.parentNode||n.host||null;return e===tn?null:e}function sn(n){return n.substring(1,6)=="ebkit"}var ce=null,$s=!1;function nn(n){ce||(ce=rn()||{},$s=ce.style?"WebkitAppearance"in ce.style:!1);let e=!0;return ce.style&&!sn(n)&&(e=n in ce.style,!e&&$s&&(e="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in ce.style)),e}function rn(){return typeof document<"u"?document.body:null}function Js(n,e){for(;e;){if(e===n)return!0;e=Ot(e)}return!1}function Ys(n,e,t){if(t)return Array.from(n.querySelectorAll(e));let s=n.querySelector(e);return s?[s]:[]}var It=(()=>{let e=class e{validateStyleProperty(s){return nn(s)}containsElement(s,i){return Js(s,i)}getParentElement(s){return Ot(s)}query(s,i,r){return Ys(s,i,r)}computeStyle(s,i,r){return r||""}animate(s,i,r,o,a,l=[],c){return new ee(r,o)}};e.\u0275fac=function(i){return new(i||e)},e.\u0275prov=W({token:e,factory:e.\u0275fac});let n=e;return n})(),Bt=class Bt{};Bt.NOOP=new It;var de=Bt,fe=class{};var on=1e3,Xs="{{",an="}}",Zs="ng-enter",gt="ng-leave",Be="ng-trigger",Qe=".ng-trigger",zs="ng-animating",yt=".ng-animating";function G(n){if(typeof n=="number")return n;let e=n.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:_t(parseFloat(e[1]),e[2])}function _t(n,e){switch(e){case"s":return n*on;default:return n}}function Ve(n,e,t){return n.hasOwnProperty("duration")?n:ln(n,e,t)}function ln(n,e,t){let s=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,i,r=0,o="";if(typeof n=="string"){let a=n.match(s);if(a===null)return e.push(Is(n)),{duration:0,delay:0,easing:""};i=_t(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(r=_t(parseFloat(l),a[4]));let c=a[5];c&&(o=c)}else i=n;if(!t){let a=!1,l=e.length;i<0&&(e.push(wi()),a=!0),r<0&&(e.push(Ai()),a=!0),a&&e.splice(l,0,Is(n))}return{duration:i,delay:r,easing:o}}function cn(n){return n.length?n[0]instanceof Map?n:n.map(e=>new Map(Object.entries(e))):[]}function V(n,e,t){e.forEach((s,i)=>{let r=Lt(i);t&&!t.has(i)&&t.set(i,n.style[r]),n.style[r]=s})}function he(n,e){e.forEach((t,s)=>{let i=Lt(s);n.style[i]=""})}function Ae(n){return Array.isArray(n)?n.length==1?n[0]:Os(n):n}function un(n,e,t){let s=e.params||{},i=ei(n);i.length&&i.forEach(r=>{s.hasOwnProperty(r)||t.push(Mi(r))})}var St=new RegExp(`${Xs}\\s*(.+?)\\s*${an}`,"g");function ei(n){let e=[];if(typeof n=="string"){let t;for(;t=St.exec(n);)e.push(t[1]);St.lastIndex=0}return e}function Pe(n,e,t){let s=`${n}`,i=s.replace(St,(r,o)=>{let a=e[o];return a==null&&(t.push(Pi(o)),a=""),a.toString()});return i==s?n:i}var hn=/-+([a-z0-9])/g;function Lt(n){return n.replace(hn,(...e)=>e[1].toUpperCase())}function dn(n,e){return n===0||e===0}function fn(n,e,t){if(t.size&&e.length){let s=e[0],i=[];if(t.forEach((r,o)=>{s.has(o)||i.push(o),s.set(o,r)}),i.length)for(let r=1;ro.set(a,$t(n,a)))}}return e}function k(n,e,t){switch(e.type){case _.Trigger:return n.visitTrigger(e,t);case _.State:return n.visitState(e,t);case _.Transition:return n.visitTransition(e,t);case _.Sequence:return n.visitSequence(e,t);case _.Group:return n.visitGroup(e,t);case _.Animate:return n.visitAnimate(e,t);case _.Keyframes:return n.visitKeyframes(e,t);case _.Style:return n.visitStyle(e,t);case _.Reference:return n.visitReference(e,t);case _.AnimateChild:return n.visitAnimateChild(e,t);case _.AnimateRef:return n.visitAnimateRef(e,t);case _.Query:return n.visitQuery(e,t);case _.Stagger:return n.visitStagger(e,t);default:throw Di(e.type)}}function $t(n,e){return window.getComputedStyle(n)[e]}var mn=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),He=class extends fe{normalizePropertyName(e,t){return Lt(e)}normalizeStyleValue(e,t,s,i){let r="",o=s.toString().trim();if(mn.has(t)&&s!==0&&s!=="0")if(typeof s=="number")r="px";else{let a=s.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&i.push(Ni(e,s))}return o+r}};var Ge="*";function pn(n,e){let t=[];return typeof n=="string"?n.split(/\s*,\s*/).forEach(s=>gn(s,t,e)):t.push(n),t}function gn(n,e,t){if(n[0]==":"){let l=yn(n,t);if(typeof l=="function"){e.push(l);return}n=l}let s=n.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(s==null||s.length<4)return t.push(ji(n)),e;let i=s[1],r=s[2],o=s[3];e.push(Bs(i,o));let a=i==Ge&&o==Ge;r[0]=="<"&&!a&&e.push(Bs(o,i))}function yn(n,e){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,s)=>parseFloat(s)>parseFloat(t);case":decrement":return(t,s)=>parseFloat(s) *"}}var Ke=new Set(["true","1"]),je=new Set(["false","0"]);function Bs(n,e){let t=Ke.has(n)||je.has(n),s=Ke.has(e)||je.has(e);return(i,r)=>{let o=n==Ge||n==i,a=e==Ge||e==r;return!o&&t&&typeof i=="boolean"&&(o=i?Ke.has(n):je.has(n)),!a&&s&&typeof r=="boolean"&&(a=r?Ke.has(e):je.has(e)),o&&a}}var ti=":self",_n=new RegExp(`s*${ti}s*,?`,"g");function si(n,e,t,s){return new Et(n).build(e,t,s)}var Ks="",Et=class{constructor(e){this._driver=e}build(e,t,s){let i=new vt(t);return this._resetContextStyleTimingState(i),k(this,Ae(e),i)}_resetContextStyleTimingState(e){e.currentQuerySelector=Ks,e.collectedStyles=new Map,e.collectedStyles.set(Ks,new Map),e.currentTime=0}visitTrigger(e,t){let s=t.queryCount=0,i=t.depCount=0,r=[],o=[];return e.name.charAt(0)=="@"&&t.errors.push(Ci()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==_.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(h=>{l.name=h,r.push(this.visitState(l,t))}),l.name=c}else if(a.type==_.Transition){let l=this.visitTransition(a,t);s+=l.queryCount,i+=l.depCount,o.push(l)}else t.errors.push(Fi())}),{type:_.Trigger,name:e.name,states:r,transitions:o,queryCount:s,depCount:i,options:null}}visitState(e,t){let s=this.visitStyle(e.styles,t),i=e.options&&e.options.params||null;if(s.containsDynamicStyles){let r=new Set,o=i||{};s.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{ei(l).forEach(c=>{o.hasOwnProperty(c)||r.add(c)})})}),r.size&&t.errors.push(Ri(e.name,[...r.values()]))}return{type:_.State,name:e.name,style:s,options:i?{params:i}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let s=k(this,Ae(e.animation),t),i=pn(e.expr,t.errors);return{type:_.Transition,matchers:i,animation:s,queryCount:t.queryCount,depCount:t.depCount,options:ue(e.options)}}visitSequence(e,t){return{type:_.Sequence,steps:e.steps.map(s=>k(this,s,t)),options:ue(e.options)}}visitGroup(e,t){let s=t.currentTime,i=0,r=e.steps.map(o=>{t.currentTime=s;let a=k(this,o,t);return i=Math.max(i,t.currentTime),a});return t.currentTime=i,{type:_.Group,steps:r,options:ue(e.options)}}visitAnimate(e,t){let s=Tn(e.timings,t.errors);t.currentAnimateTimings=s;let i,r=e.styles?e.styles:ct({});if(r.type==_.Keyframes)i=this.visitKeyframes(r,t);else{let o=e.styles,a=!1;if(!o){a=!0;let c={};s.easing&&(c.easing=s.easing),o=ct(c)}t.currentTime+=s.duration+s.delay;let l=this.visitStyle(o,t);l.isEmptyStep=a,i=l}return t.currentAnimateTimings=null,{type:_.Animate,timings:s,style:i,options:null}}visitStyle(e,t){let s=this._makeStyleAst(e,t);return this._validateStyleAst(s,t),s}_makeStyleAst(e,t){let s=[],i=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of i)typeof a=="string"?a===Q?s.push(a):t.errors.push(ki(a)):s.push(new Map(Object.entries(a)));let r=!1,o=null;return s.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(o=a.get("easing"),a.delete("easing")),!r)){for(let l of a.values())if(l.toString().indexOf(Xs)>=0){r=!0;break}}}),{type:_.Style,styles:s,easing:o,offset:e.offset,containsDynamicStyles:r,options:null}}_validateStyleAst(e,t){let s=t.currentAnimateTimings,i=t.currentTime,r=t.currentTime;s&&r>0&&(r-=s.duration+s.delay),e.styles.forEach(o=>{typeof o!="string"&&o.forEach((a,l)=>{let c=t.collectedStyles.get(t.currentQuerySelector),h=c.get(l),u=!0;h&&(r!=i&&r>=h.startTime&&i<=h.endTime&&(t.errors.push(Oi(l,h.startTime,h.endTime,r,i)),u=!1),r=h.startTime),u&&c.set(l,{startTime:r,endTime:i}),t.options&&un(a,t.options,t.errors)})})}visitKeyframes(e,t){let s={type:_.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(Ii()),s;let i=1,r=0,o=[],a=!1,l=!1,c=0,h=e.steps.map(w=>{let A=this._makeStyleAst(w,t),N=A.offset!=null?A.offset:vn(A.styles),P=0;return N!=null&&(r++,P=A.offset=N),l=l||P<0||P>1,a=a||P0&&r{let N=S>0?A==y?1:S*A:o[A],P=N*T;t.currentTime=f+g.delay+P,g.duration=P,this._validateStyleAst(w,t),w.offset=N,s.styles.push(w)}),s}visitReference(e,t){return{type:_.Reference,animation:k(this,Ae(e.animation),t),options:ue(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:_.AnimateChild,options:ue(e.options)}}visitAnimateRef(e,t){return{type:_.AnimateRef,animation:this.visitReference(e.animation,t),options:ue(e.options)}}visitQuery(e,t){let s=t.currentQuerySelector,i=e.options||{};t.queryCount++,t.currentQuery=e;let[r,o]=Sn(e.selector);t.currentQuerySelector=s.length?s+" "+r:r,O(t.collectedStyles,t.currentQuerySelector,new Map);let a=k(this,Ae(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=s,{type:_.Query,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:o,animation:a,originalSelector:e.selector,options:ue(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(Bi());let s=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Ve(e.timings,t.errors,!0);return{type:_.Stagger,animation:k(this,Ae(e.animation),t),timings:s,options:null}}};function Sn(n){let e=!!n.split(/\s*,\s*/).find(t=>t==ti);return e&&(n=n.replace(_n,"")),n=n.replace(/@\*/g,Qe).replace(/@\w+/g,t=>Qe+"-"+t.slice(1)).replace(/:animating/g,yt),[n,e]}function En(n){return n?Re({},n):null}var vt=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function vn(n){if(typeof n=="string")return null;let e=null;if(Array.isArray(n))n.forEach(t=>{if(t instanceof Map&&t.has("offset")){let s=t;e=parseFloat(s.get("offset")),s.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let t=n;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function Tn(n,e){if(n.hasOwnProperty("duration"))return n;if(typeof n=="number"){let r=Ve(n,e).duration;return ht(r,0,"")}let t=n;if(t.split(/\s+/).some(r=>r.charAt(0)=="{"&&r.charAt(1)=="{")){let r=ht(0,0,"");return r.dynamic=!0,r.strValue=t,r}let i=Ve(t,e);return ht(i.duration,i.delay,i.easing)}function ue(n){return n?(n=Re({},n),n.params&&(n.params=En(n.params))):n={},n}function ht(n,e,t){return{duration:n,delay:e,easing:t}}function zt(n,e,t,s,i,r,o=null,a=!1){return{type:1,element:n,keyframes:e,preStyleProps:t,postStyleProps:s,duration:i,delay:r,totalTime:i+r,easing:o,subTimeline:a}}var De=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let s=this._map.get(e);s||this._map.set(e,s=[]),s.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},bn=1,wn=":enter",An=new RegExp(wn,"g"),Mn=":leave",Pn=new RegExp(Mn,"g");function ii(n,e,t,s,i,r=new Map,o=new Map,a,l,c=[]){return new Tt().buildKeyframes(n,e,t,s,i,r,o,a,l,c)}var Tt=class{buildKeyframes(e,t,s,i,r,o,a,l,c,h=[]){c=c||new De;let u=new bt(e,t,c,i,r,h,[]);u.options=l;let S=l.delay?G(l.delay):0;u.currentTimeline.delayNextStep(S),u.currentTimeline.setStyles([o],null,u.errors,l),k(this,s,u);let y=u.timelines.filter(f=>f.containsAnimation());if(y.length&&a.size){let f;for(let g=y.length-1;g>=0;g--){let T=y[g];if(T.element===t){f=T;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,l)}return y.length?y.map(f=>f.buildKeyframes()):[zt(t,[],[],[],0,S,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let s=t.subInstructions.get(t.element);if(s){let i=t.createSubContext(e.options),r=t.currentTimeline.currentTime,o=this._visitSubInstructions(s,i,i.options);r!=o&&t.transformIntoNewTimeline(o)}t.previousNode=e}visitAnimateRef(e,t){let s=t.createSubContext(e.options);s.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,s),this.visitReference(e.animation,s),t.transformIntoNewTimeline(s.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,s){for(let i of e){let r=i?.delay;if(r){let o=typeof r=="number"?r:G(Pe(r,i?.params??{},t.errors));s.delayNextStep(o)}}}_visitSubInstructions(e,t,s){let r=t.currentTimeline.currentTime,o=s.duration!=null?G(s.duration):null,a=s.delay!=null?G(s.delay):null;return o!==0&&e.forEach(l=>{let c=t.appendInstructionToTimeline(l,o,a);r=Math.max(r,c.duration+c.delay)}),r}visitReference(e,t){t.updateOptions(e.options,!0),k(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let s=t.subContextCount,i=t,r=e.options;if(r&&(r.params||r.delay)&&(i=t.createSubContext(r),i.transformIntoNewTimeline(),r.delay!=null)){i.previousNode.type==_.Style&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=xe);let o=G(r.delay);i.delayNextStep(o)}e.steps.length&&(e.steps.forEach(o=>k(this,o,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>s&&i.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let s=[],i=t.currentTimeline.currentTime,r=e.options&&e.options.delay?G(e.options.delay):0;e.steps.forEach(o=>{let a=t.createSubContext(e.options);r&&a.delayNextStep(r),k(this,o,a),i=Math.max(i,a.currentTimeline.currentTime),s.push(a.currentTimeline)}),s.forEach(o=>t.currentTimeline.mergeTimelineCollectedStyles(o)),t.transformIntoNewTimeline(i),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let s=e.strValue,i=t.params?Pe(s,t.params,t.errors):s;return Ve(i,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let s=t.currentAnimateTimings=this._visitTiming(e.timings,t),i=t.currentTimeline;s.delay&&(t.incrementTime(s.delay),i.snapshotCurrentStyles());let r=e.style;r.type==_.Keyframes?this.visitKeyframes(r,t):(t.incrementTime(s.duration),this.visitStyle(r,t),i.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let s=t.currentTimeline,i=t.currentAnimateTimings;!i&&s.hasCurrentStyleProperties()&&s.forwardFrame();let r=i&&i.easing||e.easing;e.isEmptyStep?s.applyEmptyStep(r):s.setStyles(e.styles,r,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let s=t.currentAnimateTimings,i=t.currentTimeline.duration,r=s.duration,a=t.createSubContext().currentTimeline;a.easing=s.easing,e.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*r),a.setStyles(l.styles,l.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(i+r),t.previousNode=e}visitQuery(e,t){let s=t.currentTimeline.currentTime,i=e.options||{},r=i.delay?G(i.delay):0;r&&(t.previousNode.type===_.Style||s==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=xe);let o=s,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!i.optional,t.errors);t.currentQueryTotal=a.length;let l=null;a.forEach((c,h)=>{t.currentQueryIndex=h;let u=t.createSubContext(e.options,c);r&&u.delayNextStep(r),c===t.element&&(l=u.currentTimeline),k(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let S=u.currentTimeline.currentTime;o=Math.max(o,S)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(o),l&&(t.currentTimeline.mergeTimelineCollectedStyles(l),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let s=t.parentContext,i=t.currentTimeline,r=e.timings,o=Math.abs(r.duration),a=o*(t.currentQueryTotal-1),l=o*t.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":l=a-l;break;case"full":l=s.currentStaggerTime;break}let h=t.currentTimeline;l&&h.delayNextStep(l);let u=h.currentTime;k(this,e.animation,t),t.previousNode=e,s.currentStaggerTime=i.currentTime-u+(i.startTime-s.currentTimeline.startTime)}},xe={},bt=class n{constructor(e,t,s,i,r,o,a,l){this._driver=e,this.element=t,this.subInstructions=s,this._enterClassName=i,this._leaveClassName=r,this.errors=o,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=xe,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new We(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let s=e,i=this.options;s.duration!=null&&(i.duration=G(s.duration)),s.delay!=null&&(i.delay=G(s.delay));let r=s.params;if(r){let o=i.params;o||(o=this.options.params={}),Object.keys(r).forEach(a=>{(!t||!o.hasOwnProperty(a))&&(o[a]=Pe(r[a],o,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let s=e.params={};Object.keys(t).forEach(i=>{s[i]=t[i]})}}return e}createSubContext(e=null,t,s){let i=t||this.element,r=new n(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,s||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(e),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(e){return this.previousNode=xe,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,s){let i={duration:t??e.duration,delay:this.currentTimeline.currentTime+(s??0)+e.delay,easing:""},r=new wt(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,i,e.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,s,i,r,o){let a=[];if(i&&a.push(this.element),e.length>0){e=e.replace(An,"."+this._enterClassName),e=e.replace(Pn,"."+this._leaveClassName);let l=s!=1,c=this._driver.query(this.element,e,l);s!==0&&(c=s<0?c.slice(c.length+s,c.length):c.slice(0,s)),a.push(...c)}return!r&&a.length==0&&o.push(Ki(t)),a}},We=class n{constructor(e,t,s,i){this._driver=e,this.element=t,this.startTime=s,this._elementTimelineStylesLookup=i,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new n(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=bn,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,s]of this._globalTimelineStyles)this._backFill.set(t,s||Q),this._currentKeyframe.set(t,Q);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,s,i){t&&this._previousKeyframe.set("easing",t);let r=i&&i.params||{},o=Dn(e,this._globalTimelineStyles);for(let[a,l]of o){let c=Pe(l,r,s);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Q),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,s)=>{let i=this._styleSummary.get(s);(!i||t.time>i.time)&&this._updateStyle(s,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,s=this._keyframes.size===1&&this.duration===0,i=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((h,u)=>{h===ze?e.add(u):h===Q&&t.add(u)}),s||c.set("offset",l/this.duration),i.push(c)});let r=[...e.values()],o=[...t.values()];if(s){let a=i[0],l=new Map(a);a.set("offset",0),l.set("offset",1),i=[a,l]}return zt(this.element,i,r,o,this.duration,this.startTime,this.easing,!1)}},wt=class extends We{constructor(e,t,s,i,r,o,a=!1){super(e,t,o.delay),this.keyframes=s,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=a,this.timings={duration:o.duration,delay:o.delay,easing:o.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:s,easing:i}=this.timings;if(this._stretchStartingKeyframe&&t){let r=[],o=s+t,a=t/o,l=new Map(e[0]);l.set("offset",0),r.push(l);let c=new Map(e[0]);c.set("offset",js(a)),r.push(c);let h=e.length-1;for(let u=1;u<=h;u++){let S=new Map(e[u]),y=S.get("offset"),f=t+y*s;S.set("offset",js(f/o)),r.push(S)}s=o,t=0,i="",e=r}return zt(this.element,e,this.preStyleProps,this.postStyleProps,s,t,i,!0)}};function js(n,e=3){let t=Math.pow(10,e-1);return Math.round(n*t)/t}function Dn(n,e){let t=new Map,s;return n.forEach(i=>{if(i==="*"){s??=e.keys();for(let r of s)t.set(r,Q)}else for(let[r,o]of i)t.set(r,o)}),t}function qs(n,e,t,s,i,r,o,a,l,c,h,u,S){return{type:0,element:n,triggerName:e,isRemovalTransition:i,fromState:t,fromStyles:r,toState:s,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:h,totalTime:u,errors:S}}var dt={},Je=class{constructor(e,t,s){this._triggerName=e,this.ast=t,this._stateStyles=s}match(e,t,s,i){return Nn(this.ast.matchers,e,t,s,i)}buildStyles(e,t,s){let i=this._stateStyles.get("*");return e!==void 0&&(i=this._stateStyles.get(e?.toString())||i),i?i.buildStyles(t,s):new Map}build(e,t,s,i,r,o,a,l,c,h){let u=[],S=this.ast.options&&this.ast.options.params||dt,y=a&&a.params||dt,f=this.buildStyles(s,y,u),g=l&&l.params||dt,T=this.buildStyles(i,g,u),w=new Set,A=new Map,N=new Map,P=i==="void",me={params:ni(g,S),delay:this.ast.options?.delay},B=h?[]:ii(e,t,this.ast.animation,r,o,f,T,me,c,u),C=0;return B.forEach(F=>{C=Math.max(F.duration+F.delay,C)}),u.length?qs(t,this._triggerName,s,i,P,f,T,[],[],A,N,C,u):(B.forEach(F=>{let se=F.element,pe=O(A,se,new Set);F.preStyleProps.forEach(ie=>pe.add(ie));let Kt=O(N,se,new Set);F.postStyleProps.forEach(ie=>Kt.add(ie)),se!==t&&w.add(se)}),qs(t,this._triggerName,s,i,P,f,T,B,[...w.values()],A,N,C))}};function Nn(n,e,t,s,i){return n.some(r=>r(e,t,s,i))}function ni(n,e){let t=Re({},e);return Object.entries(n).forEach(([s,i])=>{i!=null&&(t[s]=i)}),t}var At=class{constructor(e,t,s){this.styles=e,this.defaultParams=t,this.normalizer=s}buildStyles(e,t){let s=new Map,i=ni(e,this.defaultParams);return this.styles.styles.forEach(r=>{typeof r!="string"&&r.forEach((o,a)=>{o&&(o=Pe(o,i,t));let l=this.normalizer.normalizePropertyName(a,t);o=this.normalizer.normalizeStyleValue(a,l,o,t),s.set(a,o)})}),s}};function Cn(n,e,t){return new Mt(n,e,t)}var Mt=class{constructor(e,t,s){this.name=e,this.ast=t,this._normalizer=s,this.transitionFactories=[],this.states=new Map,t.states.forEach(i=>{let r=i.options&&i.options.params||{};this.states.set(i.name,new At(i.style,r,s))}),Us(this.states,"true","1"),Us(this.states,"false","0"),t.transitions.forEach(i=>{this.transitionFactories.push(new Je(e,i,this.states))}),this.fallbackTransition=Fn(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,s,i){return this.transitionFactories.find(o=>o.match(e,t,s,i))||null}matchStyles(e,t,s){return this.fallbackTransition.buildStyles(e,t,s)}};function Fn(n,e,t){let s=[(o,a)=>!0],i={type:_.Sequence,steps:[],options:null},r={type:_.Transition,animation:i,matchers:s,options:null,queryCount:0,depCount:0};return new Je(n,r,e)}function Us(n,e,t){n.has(e)?n.has(t)||n.set(t,n.get(e)):n.has(t)&&n.set(e,n.get(t))}var Rn=new De,Pt=class{constructor(e,t,s){this.bodyNode=e,this._driver=t,this._normalizer=s,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let s=[],i=[],r=si(this._driver,t,s,i);if(s.length)throw Vi(s);i.length&&void 0,this._animations.set(e,r)}_buildPlayer(e,t,s){let i=e.element,r=Ws(this._normalizer,e.keyframes,t,s);return this._driver.animate(i,r,e.duration,e.delay,e.easing,[],!0)}create(e,t,s={}){let i=[],r=this._animations.get(e),o,a=new Map;if(r?(o=ii(this._driver,t,r,Zs,gt,new Map,new Map,s,Rn,i),o.forEach(h=>{let u=O(a,h.element,new Map);h.postStyleProps.forEach(S=>u.set(S,null))})):(i.push(Hi()),o=[]),i.length)throw Gi(i);a.forEach((h,u)=>{h.forEach((S,y)=>{h.set(y,this._driver.computeStyle(u,y,Q))})});let l=o.map(h=>{let u=a.get(h.element);return this._buildPlayer(h,new Map,u)}),c=te(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let s=this.players.indexOf(t);s>=0&&this.players.splice(s,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw xi(e);return t}listen(e,t,s,i){let r=kt(t,"","","");return Rt(this._getPlayer(e),s,r,i),()=>{}}command(e,t,s,i){if(s=="register"){this.register(e,i[0]);return}if(s=="create"){let o=i[0]||{};this.create(e,t,o);return}let r=this._getPlayer(e);switch(s){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(e);break}}},Qs="ng-animate-queued",kn=".ng-animate-queued",ft="ng-animate-disabled",On=".ng-animate-disabled",In="ng-star-inserted",Ln=".ng-star-inserted",$n=[],ri={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},zn={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},$="__ng_removed",Ne=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let s=e&&e.hasOwnProperty("value"),i=s?e.value:e;if(this.value=Kn(i),s){let r=e,{value:o}=r,a=Qt(r,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let s=this.options.params;Object.keys(t).forEach(i=>{s[i]==null&&(s[i]=t[i])})}}},Me="void",mt=new Ne(Me),Dt=class{constructor(e,t,s){this.id=e,this.hostElement=t,this._engine=s,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,L(t,this._hostClassName)}listen(e,t,s,i){if(!this._triggers.has(t))throw Wi(s,t);if(s==null||s.length==0)throw Ji(t);if(!jn(s))throw Yi(s,t);let r=O(this._elementListeners,e,[]),o={name:t,phase:s,callback:i};r.push(o);let a=O(this._engine.statesByElement,e,new Map);return a.has(t)||(L(e,Be),L(e,Be+"-"+t),a.set(t,mt)),()=>{this._engine.afterFlush(()=>{let l=r.indexOf(o);l>=0&&r.splice(l,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw Xi(e);return t}trigger(e,t,s,i=!0){let r=this._getTrigger(t),o=new Ce(this.id,t,e),a=this._engine.statesByElement.get(e);a||(L(e,Be),L(e,Be+"-"+t),this._engine.statesByElement.set(e,a=new Map));let l=a.get(t),c=new Ne(s,this.id);if(!(s&&s.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(t,c),l||(l=mt),!(c.value===Me)&&l.value===c.value){if(!Qn(l.params,c.params)){let g=[],T=r.matchStyles(l.value,l.params,g),w=r.matchStyles(c.value,c.params,g);g.length?this._engine.reportError(g):this._engine.afterFlush(()=>{he(e,T),V(e,w)})}return}let S=O(this._engine.playersByElement,e,[]);S.forEach(g=>{g.namespaceId==this.id&&g.triggerName==t&&g.queued&&g.destroy()});let y=r.matchTransition(l.value,c.value,e,c.params),f=!1;if(!y){if(!i)return;y=r.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:y,fromState:l,toState:c,player:o,isFallbackTransition:f}),f||(L(e,Qs),o.onStart(()=>{Ee(e,Qs)})),o.onDone(()=>{let g=this.players.indexOf(o);g>=0&&this.players.splice(g,1);let T=this._engine.playersByElement.get(e);if(T){let w=T.indexOf(o);w>=0&&T.splice(w,1)}}),this.players.push(o),S.push(o),o}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,s)=>{this._elementListeners.set(s,t.filter(i=>i.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(s=>s.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let s=this._engine.driver.query(e,Qe,!0);s.forEach(i=>{if(i[$])return;let r=this._engine.fetchNamespacesByElement(i);r.size?r.forEach(o=>o.triggerLeaveAnimation(i,t,!1,!0)):this.clearElementCache(i)}),this._engine.afterFlushAnimationsDone(()=>s.forEach(i=>this.clearElementCache(i)))}triggerLeaveAnimation(e,t,s,i){let r=this._engine.statesByElement.get(e),o=new Map;if(r){let a=[];if(r.forEach((l,c)=>{if(o.set(c,l.value),this._triggers.has(c)){let h=this.trigger(e,c,Me,i);h&&a.push(h)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,o),s&&te(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),s=this._engine.statesByElement.get(e);if(t&&s){let i=new Set;t.forEach(r=>{let o=r.name;if(i.has(o))return;i.add(o);let l=this._triggers.get(o).fallbackTransition,c=s.get(o)||mt,h=new Ne(Me),u=new Ce(this.id,o,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:o,transition:l,fromState:c,toState:h,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let s=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let i=!1;if(s.totalAnimations){let r=s.players.length?s.playersByQueriedElement.get(e):[];if(r&&r.length)i=!0;else{let o=e;for(;o=o.parentNode;)if(s.statesByElement.get(o)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(e),i)s.markElementAsRemoved(this.id,e,!1,t);else{let r=e[$];(!r||r===ri)&&(s.afterFlush(()=>this.clearElementCache(e)),s.destroyInnerAnimations(e),s._onRemovalComplete(e,t))}}insertNode(e,t){L(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(s=>{let i=s.player;if(i.destroyed)return;let r=s.element,o=this._elementListeners.get(r);o&&o.forEach(a=>{if(a.name==s.triggerName){let l=kt(r,s.triggerName,s.fromState.value,s.toState.value);l._data=e,Rt(s.player,a.phase,l,a.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):t.push(s)}),this._queue=[],t.sort((s,i)=>{let r=s.transition.ast.depCount,o=i.transition.ast.depCount;return r==0||o==0?r-o:this._engine.driver.containsElement(s.element,i.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},Nt=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,s){this.bodyNode=e,this.driver=t,this._normalizer=s,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(i,r)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(s=>{s.queued&&e.push(s)})}),e}createNamespace(e,t){let s=new Dt(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(s,t):(this.newHostElements.set(t,s),this.collectEnterElement(t)),this._namespaceLookup[e]=s}_balanceNamespaceList(e,t){let s=this._namespaceList,i=this.namespacesByHostElement;if(s.length-1>=0){let o=!1,a=this.driver.getParentElement(t);for(;a;){let l=i.get(a);if(l){let c=s.indexOf(l);s.splice(c+1,0,e),o=!0;break}a=this.driver.getParentElement(a)}o||s.unshift(e)}else s.push(e);return i.set(t,e),e}register(e,t){let s=this._namespaceLookup[e];return s||(s=this.createNamespace(e,t)),s}registerTrigger(e,t,s){let i=this._namespaceLookup[e];i&&i.register(t,s)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let s=this._fetchNamespace(e);this.namespacesByHostElement.delete(s.hostElement);let i=this._namespaceList.indexOf(s);i>=0&&this._namespaceList.splice(i,1),s.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,s=this.statesByElement.get(e);if(s){for(let i of s.values())if(i.namespaceId){let r=this._fetchNamespace(i.namespaceId);r&&t.add(r)}}return t}trigger(e,t,s,i){if(qe(t)){let r=this._fetchNamespace(e);if(r)return r.trigger(t,s,i),!0}return!1}insertNode(e,t,s,i){if(!qe(t))return;let r=t[$];if(r&&r.setForRemoval){r.setForRemoval=!1,r.setForMove=!0;let o=this.collectedLeaveElements.indexOf(t);o>=0&&this.collectedLeaveElements.splice(o,1)}if(e){let o=this._fetchNamespace(e);o&&o.insertNode(t,s)}i&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),L(e,ft)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Ee(e,ft))}removeNode(e,t,s){if(qe(t)){let i=e?this._fetchNamespace(e):null;i?i.removeNode(t,s):this.markElementAsRemoved(e,t,!1,s);let r=this.namespacesByHostElement.get(t);r&&r.id!==e&&r.removeNode(t,s)}else this._onRemovalComplete(t,s)}markElementAsRemoved(e,t,s,i,r){this.collectedLeaveElements.push(t),t[$]={namespaceId:e,setForRemoval:i,hasAnimation:s,removedBeforeQueried:!1,previousTriggersValues:r}}listen(e,t,s,i,r){return qe(t)?this._fetchNamespace(e).listen(t,s,i,r):()=>{}}_buildInstruction(e,t,s,i,r){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,s,i,e.fromState.options,e.toState.options,t,r)}destroyInnerAnimations(e){let t=this.driver.query(e,Qe,!0);t.forEach(s=>this.destroyActiveAnimationsForElement(s)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,yt,!0),t.forEach(s=>this.finishActiveQueriedAnimationOnElement(s)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(s=>{s.queued?s.markedForDestroy=!0:s.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(s=>s.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return te(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[$];if(t&&t.setForRemoval){if(e[$]=ri,t.namespaceId){this.destroyInnerAnimations(e);let s=this._fetchNamespace(t.namespaceId);s&&s.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(ft)&&this.markElementAsDisabled(e,!1),this.driver.query(e,On,!0).forEach(s=>{this.markElementAsDisabled(s,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((s,i)=>this._balanceNamespaceList(s,i)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let s=0;ss()),this._flushFns=[],this._whenQuietFns.length){let s=this._whenQuietFns;this._whenQuietFns=[],t.length?te(t).onDone(()=>{s.forEach(i=>i())}):s.forEach(i=>i())}}reportError(e){throw Zi(e)}_flushAnimations(e,t){let s=new De,i=[],r=new Map,o=[],a=new Map,l=new Map,c=new Map,h=new Set;this.disabledNodes.forEach(d=>{h.add(d);let m=this.driver.query(d,kn,!0);for(let p=0;p{let p=Zs+g++;f.set(m,p),d.forEach(E=>L(E,p))});let T=[],w=new Set,A=new Set;for(let d=0;dw.add(E)):A.add(m))}let N=new Map,P=Gs(S,Array.from(w));P.forEach((d,m)=>{let p=gt+g++;N.set(m,p),d.forEach(E=>L(E,p))}),e.push(()=>{y.forEach((d,m)=>{let p=f.get(m);d.forEach(E=>Ee(E,p))}),P.forEach((d,m)=>{let p=N.get(m);d.forEach(E=>Ee(E,p))}),T.forEach(d=>{this.processLeaveNode(d)})});let me=[],B=[];for(let d=this._namespaceList.length-1;d>=0;d--)this._namespaceList[d].drainQueuedTransitions(t).forEach(p=>{let E=p.player,M=p.element;if(me.push(E),this.collectedEnterElements.length){let D=M[$];if(D&&D.setForMove){if(D.previousTriggersValues&&D.previousTriggersValues.has(p.triggerName)){let ne=D.previousTriggersValues.get(p.triggerName),I=this.statesByElement.get(p.element);if(I&&I.has(p.triggerName)){let Fe=I.get(p.triggerName);Fe.value=ne,I.set(p.triggerName,Fe)}}E.destroy();return}}let K=!u||!this.driver.containsElement(u,M),R=N.get(M),x=f.get(M),b=this._buildInstruction(p,s,x,R,K);if(b.errors&&b.errors.length){B.push(b);return}if(K){E.onStart(()=>he(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}if(p.isFallbackTransition){E.onStart(()=>he(M,b.fromStyles)),E.onDestroy(()=>V(M,b.toStyles)),i.push(E);return}let Ut=[];b.timelines.forEach(D=>{D.stretchStartingKeyframe=!0,this.disabledNodes.has(D.element)||Ut.push(D)}),b.timelines=Ut,s.append(M,b.timelines);let Si={instruction:b,player:E,element:M};o.push(Si),b.queriedElements.forEach(D=>O(a,D,[]).push(E)),b.preStyleProps.forEach((D,ne)=>{if(D.size){let I=l.get(ne);I||l.set(ne,I=new Set),D.forEach((Fe,nt)=>I.add(nt))}}),b.postStyleProps.forEach((D,ne)=>{let I=c.get(ne);I||c.set(ne,I=new Set),D.forEach((Fe,nt)=>I.add(nt))})});if(B.length){let d=[];B.forEach(m=>{d.push(en(m.triggerName,m.errors))}),me.forEach(m=>m.destroy()),this.reportError(d)}let C=new Map,F=new Map;o.forEach(d=>{let m=d.element;s.has(m)&&(F.set(m,m),this._beforeAnimationBuild(d.player.namespaceId,d.instruction,C))}),i.forEach(d=>{let m=d.element;this._getPreviousPlayers(m,!1,d.namespaceId,d.triggerName,null).forEach(E=>{O(C,m,[]).push(E),E.destroy()})});let se=T.filter(d=>xs(d,l,c)),pe=new Map;Hs(pe,this.driver,A,c,Q).forEach(d=>{xs(d,l,c)&&se.push(d)});let ie=new Map;y.forEach((d,m)=>{Hs(ie,this.driver,new Set(d),l,ze)}),se.forEach(d=>{let m=pe.get(d),p=ie.get(d);pe.set(d,new Map([...m?.entries()??[],...p?.entries()??[]]))});let it=[],jt=[],qt={};o.forEach(d=>{let{element:m,player:p,instruction:E}=d;if(s.has(m)){if(h.has(m)){p.onDestroy(()=>V(m,E.toStyles)),p.disabled=!0,p.overrideTotalTime(E.totalTime),i.push(p);return}let M=qt;if(F.size>1){let R=m,x=[];for(;R=R.parentNode;){let b=F.get(R);if(b){M=b;break}x.push(R)}x.forEach(b=>F.set(b,M))}let K=this._buildAnimation(p.namespaceId,E,C,r,ie,pe);if(p.setRealPlayer(K),M===qt)it.push(p);else{let R=this.playersByElement.get(M);R&&R.length&&(p.parentPlayer=te(R)),i.push(p)}}else he(m,E.fromStyles),p.onDestroy(()=>V(m,E.toStyles)),jt.push(p),h.has(m)&&i.push(p)}),jt.forEach(d=>{let m=r.get(d.element);if(m&&m.length){let p=te(m);d.setRealPlayer(p)}}),i.forEach(d=>{d.parentPlayer?d.syncPlayerEvents(d.parentPlayer):d.destroy()});for(let d=0;d!K.destroyed);M.length?qn(this,m,M):this.processLeaveNode(m)}return T.length=0,it.forEach(d=>{this.players.push(d),d.onDone(()=>{d.destroy();let m=this.players.indexOf(d);this.players.splice(m,1)}),d.play()}),it}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,s,i,r){let o=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(o=a)}else{let a=this.playersByElement.get(e);if(a){let l=!r||r==Me;a.forEach(c=>{c.queued||!l&&c.triggerName!=i||o.push(c)})}}return(s||i)&&(o=o.filter(a=>!(s&&s!=a.namespaceId||i&&i!=a.triggerName))),o}_beforeAnimationBuild(e,t,s){let i=t.triggerName,r=t.element,o=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:i;for(let l of t.timelines){let c=l.element,h=c!==r,u=O(s,c,[]);this._getPreviousPlayers(c,h,o,a,t.toState).forEach(y=>{let f=y.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),y.destroy(),u.push(y)})}he(r,t.fromStyles)}_buildAnimation(e,t,s,i,r,o){let a=t.triggerName,l=t.element,c=[],h=new Set,u=new Set,S=t.timelines.map(f=>{let g=f.element;h.add(g);let T=g[$];if(T&&T.removedBeforeQueried)return new ee(f.duration,f.delay);let w=g!==l,A=Un((s.get(g)||$n).map(C=>C.getRealPlayer())).filter(C=>{let F=C;return F.element?F.element===g:!1}),N=r.get(g),P=o.get(g),me=Ws(this._normalizer,f.keyframes,N,P),B=this._buildPlayer(f,me,A);if(f.subTimeline&&i&&u.add(g),w){let C=new Ce(e,a,g);C.setRealPlayer(B),c.push(C)}return B});c.forEach(f=>{O(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>Bn(this.playersByQueriedElement,f.element,f))}),h.forEach(f=>L(f,zs));let y=te(S);return y.onDestroy(()=>{h.forEach(f=>Ee(f,zs)),V(l,t.toStyles)}),u.forEach(f=>{O(i,f,[]).push(y)}),y}_buildPlayer(e,t,s){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,s):new ee(e.duration,e.delay)}},Ce=class{constructor(e,t,s){this.namespaceId=e,this.triggerName=t,this.element=s,this._player=new ee,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,s)=>{t.forEach(i=>Rt(e,s,void 0,i))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){O(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function Bn(n,e,t){let s=n.get(e);if(s){if(s.length){let i=s.indexOf(t);s.splice(i,1)}s.length==0&&n.delete(e)}return s}function Kn(n){return n??null}function qe(n){return n&&n.nodeType===1}function jn(n){return n=="start"||n=="done"}function Vs(n,e){let t=n.style.display;return n.style.display=e??"none",t}function Hs(n,e,t,s,i){let r=[];t.forEach(l=>r.push(Vs(l)));let o=[];s.forEach((l,c)=>{let h=new Map;l.forEach(u=>{let S=e.computeStyle(c,u,i);h.set(u,S),(!S||S.length==0)&&(c[$]=zn,o.push(c))}),n.set(c,h)});let a=0;return t.forEach(l=>Vs(l,r[a++])),o}function Gs(n,e){let t=new Map;if(n.forEach(a=>t.set(a,[])),e.length==0)return t;let s=1,i=new Set(e),r=new Map;function o(a){if(!a)return s;let l=r.get(a);if(l)return l;let c=a.parentNode;return t.has(c)?l=c:i.has(c)?l=s:l=o(c),r.set(a,l),l}return e.forEach(a=>{let l=o(a);l!==s&&t.get(l).push(a)}),t}function L(n,e){n.classList?.add(e)}function Ee(n,e){n.classList?.remove(e)}function qn(n,e,t){te(t).onDone(()=>n.processLeaveNode(e))}function Un(n){let e=[];return oi(n,e),e}function oi(n,e){for(let t=0;ti.add(r)):e.set(n,s),t.delete(n),!0}var Te=class{constructor(e,t,s){this._driver=t,this._normalizer=s,this._triggerCache={},this.onRemovalComplete=(i,r)=>{},this._transitionEngine=new Nt(e.body,t,s),this._timelineEngine=new Pt(e.body,t,s),this._transitionEngine.onRemovalComplete=(i,r)=>this.onRemovalComplete(i,r)}registerTrigger(e,t,s,i,r){let o=e+"-"+i,a=this._triggerCache[o];if(!a){let l=[],c=[],h=si(this._driver,r,l,c);if(l.length)throw Ui(i,l);c.length&&void 0,a=Cn(i,h,this._normalizer),this._triggerCache[o]=a}this._transitionEngine.registerTrigger(t,i,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,s,i){this._transitionEngine.insertNode(e,t,s,i)}onRemove(e,t,s){this._transitionEngine.removeNode(e,t,s)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,s,i){if(s.charAt(0)=="@"){let[r,o]=Ls(s),a=i;this._timelineEngine.command(r,t,o,a)}else this._transitionEngine.trigger(e,t,s,i)}listen(e,t,s,i,r){if(s.charAt(0)=="@"){let[o,a]=Ls(s);return this._timelineEngine.listen(o,t,a,r)}return this._transitionEngine.listen(e,t,s,i,r)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function Vn(n,e){let t=null,s=null;return Array.isArray(e)&&e.length?(t=pt(e[0]),e.length>1&&(s=pt(e[e.length-1]))):e instanceof Map&&(t=pt(e)),t||s?new Ct(n,t,s):null}var ve=class ve{constructor(e,t,s){this._element=e,this._startStyles=t,this._endStyles=s,this._state=0;let i=ve.initialStylesByElement.get(e);i||ve.initialStylesByElement.set(e,i=new Map),this._initialStyles=i}start(){this._state<1&&(this._startStyles&&V(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(V(this._element,this._initialStyles),this._endStyles&&(V(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(ve.initialStylesByElement.delete(this._element),this._startStyles&&(he(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(he(this._element,this._endStyles),this._endStyles=null),V(this._element,this._initialStyles),this._state=3)}};ve.initialStylesByElement=new WeakMap;var Ct=ve;function pt(n){let e=null;return n.forEach((t,s)=>{Hn(s)&&(e=e||new Map,e.set(s,t))}),e}function Hn(n){return n==="display"||n==="position"}var Ye=class{constructor(e,t,s,i){this.element=e,this.keyframes=t,this.options=s,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=s.duration,this._delay=s.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(s=>{t.push(Object.fromEntries(s))}),t}_triggerWebAnimation(e,t,s){return e.animate(this._convertKeyframesToObject(t),s)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((s,i)=>{i!=="offset"&&e.set(i,this._finished?s:$t(this.element,i))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(s=>s()),t.length=0}},Xe=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return Js(e,t)}getParentElement(e){return Ot(e)}query(e,t,s){return Ys(e,t,s)}computeStyle(e,t,s){return $t(e,t)}animate(e,t,s,i,r,o=[]){let a=i==0?"both":"forwards",l={duration:s,delay:i,fill:a};r&&(l.easing=r);let c=new Map,h=o.filter(y=>y instanceof Ye);dn(s,i)&&h.forEach(y=>{y.currentSnapshot.forEach((f,g)=>c.set(g,f))});let u=cn(t).map(y=>new Map(y));u=fn(e,u,c);let S=Vn(e,u);return new Ye(e,u,l,S)}};var Ue="@",ai="@.disabled",Ze=class{constructor(e,t,s,i){this.namespaceId=e,this.delegate=t,this.engine=s,this._onDestroy=i,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,s,i=!0){this.delegate.insertBefore(e,t,s),this.engine.onInsert(this.namespaceId,t,e,i)}removeChild(e,t,s){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,s,i){this.delegate.setAttribute(e,t,s,i)}removeAttribute(e,t,s){this.delegate.removeAttribute(e,t,s)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,s,i){this.delegate.setStyle(e,t,s,i)}removeStyle(e,t,s){this.delegate.removeStyle(e,t,s)}setProperty(e,t,s){t.charAt(0)==Ue&&t==ai?this.disableAnimations(e,!!s):this.delegate.setProperty(e,t,s)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,s){return this.delegate.listen(e,t,s)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},Ft=class extends Ze{constructor(e,t,s,i,r){super(t,s,i,r),this.factory=e,this.namespaceId=t}setProperty(e,t,s){t.charAt(0)==Ue?t.charAt(1)=="."&&t==ai?(s=s===void 0?!0:!!s,this.disableAnimations(e,s)):this.engine.process(this.namespaceId,e,t.slice(1),s):this.delegate.setProperty(e,t,s)}listen(e,t,s){if(t.charAt(0)==Ue){let i=Gn(e),r=t.slice(1),o="";return r.charAt(0)!=Ue&&([r,o]=xn(r)),this.engine.listen(this.namespaceId,i,r,o,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,s,a)})}return this.delegate.listen(e,t,s)}};function Gn(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}function xn(n){let e=n.indexOf("."),t=n.substring(0,e),s=n.slice(e+1);return[t,s]}var et=class{constructor(e,t,s){this.delegate=e,this.engine=t,this._zone=s,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(i,r)=>{let o=r?.parentNode(i);o&&r.removeChild(o,i)}}createRenderer(e,t){let s="",i=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let c=this._rendererCache,h=c.get(i);if(!h){let u=()=>c.delete(i);h=new Ze(s,i,this.engine,u),c.set(i,h)}return h}let r=t.id,o=t.id+"-"+this._currentId;this._currentId++,this.engine.register(o,e);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(r,o,e,c.name,c)};return t.data.animation.forEach(a),new Ft(this,o,i,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,s){if(e>=0&&et(s));return}let i=this._animationCallbacksBuffer;i.length==0&&queueMicrotask(()=>{this._zone.run(()=>{i.forEach(r=>{let[o,a]=r;o(a)}),this._animationCallbacksBuffer=[]})}),i.push([t,s])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var Jn=(()=>{let e=class e extends Te{constructor(s,i,r){super(s,i,r)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(i){return new(i||e)(j(ns),j(de),j(fe))},e.\u0275prov=W({token:e,factory:e.\u0275fac});let n=e;return n})();function Yn(){return new He}function Xn(n,e,t){return new et(n,e,t)}var li=[{provide:fe,useFactory:Yn},{provide:Te,useClass:Jn},{provide:Xt,useFactory:Xn,deps:[hs,Te,ke]}],Zn=[{provide:de,useFactory:()=>new Xe},{provide:rt,useValue:"BrowserAnimations"},...li],Ir=[{provide:de,useClass:It},{provide:rt,useValue:"NoopAnimations"},...li];function ci(){return Zt("NgEagerAnimations"),[...Zn]}var tt=class{http;prefix;suffix;constructor(e,t="/assets/i18n/",s=".json"){this.http=e,this.prefix=t,this.suffix=s}getTranslation(e){return this.http.get(`${this.prefix}${e}${this.suffix}`)}};function er(n,e){if(n&1&&(U(0,"li")(1,"h2")(2,"a",2),ae(3),ge(4,"translate"),Y()()()),n&2){let t,s=e.$implicit;q(2),oe("routerLink","/"+s.path),q(),Oe(" ",ye(4,2,((t=s.name)!==null&&t!==void 0?t:s.path)+".title")," ")}}var hi=(()=>{let e=class e{constructor(){this.sections=[{path:"dashboard"},{path:"presence-control"},{path:"open-absences"},{path:"edit-absences"},{path:"evaluate-absences"},{path:"events"},{path:"events/current",name:"events.current"},{path:"my-absences"},{path:"my-profile"},{path:"my-grades"},{path:"my-settings"}]}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=J({type:e,selectors:[["bkd-home"]],standalone:!0,features:[X],decls:2,vars:1,consts:[[1,"mt-3"],[4,"ngFor","ngForOf"],[3,"routerLink"]],template:function(i,r){i&1&&(U(0,"ul",0),be(1,er,5,4,"li",1),Y()),i&2&&(q(),oe("ngForOf",r.sections))},dependencies:[Ie,ms,Se,$e],changeDetection:0});let n=e;return n})();var di=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(i){return new(i||e)},e.\u0275cmp=J({type:e,selectors:[["bkd-unauthenticated"]],standalone:!0,features:[X],decls:4,vars:3,consts:[[1,"bkd-container"],[1,"alert","alert-danger","my-3"]],template:function(i,r){i&1&&(U(0,"div",0)(1,"div",1),ae(2),ge(3,"translate"),Y()()),i&2&&(q(2),Oe(" ",ye(3,1,"unauthenticated.message")," "))},dependencies:[Se,$e],encapsulation:2});let n=e;return n})();var st=(()=>{let e=class e{constructor(s){this.storage=s}get isAuthenticated(){return!!this.accessToken}get accessToken(){return this.storage.getAccessToken()}};e.\u0275fac=function(i){return new(i||e)(j(bs))},e.\u0275prov=W({token:e,factory:e.\u0275fac,providedIn:"root"});let n=e;return n})();function z(){return()=>{let n=H(st),e=H(Le);return n.isAuthenticated?!0:(e.navigate(["/unauthenticated"]),!1)}}var fi=[{path:"dashboard",canActivate:[z()],loadChildren:()=>import("./chunk-XHR5YBGK.js").then(n=>n.DASHBOARD_ROUTES)},{path:"presence-control",canActivate:[z()],loadChildren:()=>import("./chunk-WIOGFCJH.js").then(n=>n.PRESENCE_CONTROL_ROUTES)},{path:"open-absences",canActivate:[z()],loadChildren:()=>import("./chunk-LLDSAKSP.js").then(n=>n.OPEN_ABSENCES_ROUTES)},{path:"edit-absences",canActivate:[z()],loadChildren:()=>import("./chunk-WMKWXTQE.js").then(n=>n.EDIT_ABSENCES_ROUTES)},{path:"evaluate-absences",canActivate:[z()],loadChildren:()=>import("./chunk-ON6N652E.js").then(n=>n.EVALUATE_ABSENCES_ROUTES)},{path:"events",canActivate:[z()],loadChildren:()=>import("./chunk-MI65GEUZ.js").then(n=>n.EVENTS_ROUTES)},{path:"my-absences",canActivate:[z()],loadChildren:()=>import("./chunk-KNS2BM7M.js").then(n=>n.MY_ABSENCES_ROUTES)},{path:"my-profile",canActivate:[z()],loadChildren:()=>import("./chunk-7T3G7FUV.js").then(n=>n.MY_PROFILE_ROUTES)},{path:"my-grades",canActivate:[z()],loadChildren:()=>import("./chunk-EO6OESLF.js").then(n=>n.MY_GRADES_ROUTES)},{path:"my-settings",canActivate:[z()],loadChildren:()=>import("./chunk-S2U6O7J2.js").then(n=>n.MY_SETTINGS_ROUTES)},{path:"unauthenticated",component:di},{path:"",component:hi,pathMatch:"full"}];function mi(){return(n,e)=>{let t=H(st),s=H(Z);if(n.url.startsWith(s.apiUrl)&&t.accessToken){let i=n.headers.set("Authorization",`Bearer ${t.accessToken}`);return e(n.clone({headers:i}))}return e(n)}}function pi(){return(n,e)=>{let t=H(Z);if(!n.headers.has("X-Role-Restriction")&&t.headerRoleRestriction){let s=tr();if(s&&t.headerRoleRestriction[s]){let i=n.headers.set("X-Role-Restriction",t.headerRoleRestriction[s]);return e(n.clone({headers:i}))}}return e(n)}}function tr(){let n=H(Le),e=n.url?Ms(n.url):null;return e?Ss(e):null}function gi(){return[{provide:Yt,useClass:sr}]}var sr=(()=>{let e=class e{constructor(s,i,r){this.ngZone=s,this.translate=i,this.toastService=r}handleError(s){console.error(String(s)),s instanceof as||this.notifyError()}notifyError(){this.ngZone.run(()=>{this.toastService.error(this.translate.instant("global.app-errors.exception-message"),this.translate.instant("global.app-errors.exception-title"))})}};e.\u0275fac=function(i){return new(i||e)(j(ke),j(Ts),j(_e))},e.\u0275prov=W({token:e,factory:e.\u0275fac});let n=e;return n})();function ir(n,e){return new tt(n,`${e.scriptsAndAssetsPath}/assets/locales/`,".json")}var yi={providers:[ps(fi,gs()),cs(us([Ps(),mi(),pi()])),ci(),gi(),xt(Se.forRoot({loader:{provide:vs,useFactory:ir,deps:[ls,Z]}})),ws()]};var _i={production:!0};_i.production&&void 0;lt(Ds);lt(Ns);ds(ks,yi).catch(n=>console.error(n));